diff --git a/api/replication_job.go b/api/replication_job.go index c5126bf95..346e58f96 100644 --- a/api/replication_job.go +++ b/api/replication_job.go @@ -1,16 +1,16 @@ /* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Copyright (c) 2016 VMware, Inc. All Rights Reserved. + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ package api @@ -55,17 +55,25 @@ func (ra *RepJobAPI) Prepare() { } -// Get gets all the jobs according to the policy -func (ra *RepJobAPI) Get() { - policyID, err := ra.GetInt64("policy_id") - if err != nil { - log.Errorf("Failed to get policy id, error: %v", err) - ra.RenderError(http.StatusBadRequest, "Invalid policy id") - return +// List filters jobs according to the policy and repository +func (ra *RepJobAPI) List() { + var policyID int64 + var repository string + var err error + + policyIDStr := ra.GetString("policy_id") + if len(policyIDStr) != 0 { + policyID, err = strconv.ParseInt(policyIDStr, 10, 64) + if err != nil || policyID <= 0 { + ra.CustomAbort(http.StatusBadRequest, fmt.Sprintf("invalid policy ID: %s", policyIDStr)) + } } - jobs, err := dao.GetRepJobByPolicy(policyID) + + repository = ra.GetString("repository") + + jobs, err := dao.FilterRepJobs(repository, policyID) if err != nil { - log.Errorf("Failed to query job from db, error: %v", err) + log.Errorf("failed to filter jobs according policy ID %d and repository %s: %v", policyID, repository, err) ra.RenderError(http.StatusInternalServerError, "Failed to query job") return } diff --git a/api/replication_policy.go b/api/replication_policy.go index 6eefaa087..4f851a343 100644 --- a/api/replication_policy.go +++ b/api/replication_policy.go @@ -141,7 +141,7 @@ func (pa *RepPolicyAPI) Post() { pa.Redirect(http.StatusCreated, strconv.FormatInt(pid, 10)) } -// Put modifies name and description of policy +// Put modifies name, description, target and enablement of policy func (pa *RepPolicyAPI) Put() { id := pa.GetIDFromURL() originalPolicy, err := dao.GetRepPolicy(id) @@ -157,7 +157,6 @@ func (pa *RepPolicyAPI) Put() { policy := &models.RepPolicy{} pa.DecodeJSONReq(policy) policy.ProjectID = originalPolicy.ProjectID - policy.TargetID = originalPolicy.TargetID pa.Validate(policy) if policy.Name != originalPolicy.Name { @@ -172,19 +171,77 @@ func (pa *RepPolicyAPI) Put() { } } + if policy.TargetID != originalPolicy.TargetID { + target, err := dao.GetRepTarget(policy.TargetID) + if err != nil { + log.Errorf("failed to get target %d: %v", policy.TargetID, err) + pa.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } + + if target == nil { + pa.CustomAbort(http.StatusBadRequest, fmt.Sprintf("target %d does not exist", policy.TargetID)) + } + } + policy.ID = id + isTargetChanged := !(policy.TargetID == originalPolicy.TargetID) + isEnablementChanged := !(policy.Enabled == policy.Enabled) + + var shouldStop, shouldTrigger bool + + // if target and enablement are not changed, do nothing + if !isTargetChanged && !isEnablementChanged { + shouldStop = false + shouldTrigger = false + } else if !isTargetChanged && isEnablementChanged { + // target is not changed, but enablement is changed + if policy.Enabled == 0 { + shouldStop = true + shouldTrigger = false + } else { + shouldStop = false + shouldTrigger = true + } + } else if isTargetChanged && !isEnablementChanged { + // target is changed, but enablement is not changed + if policy.Enabled == 0 { + // enablement is 0, do nothing + shouldStop = false + shouldTrigger = false + } else { + // enablement is 1, so stop original target's jobs + // and trigger new target's jobs + shouldStop = true + shouldTrigger = true + } + } else { + // both target and enablement are changed + + // enablement: 1 -> 0 + if policy.Enabled == 0 { + shouldStop = true + shouldTrigger = false + } else { + shouldStop = false + shouldTrigger = true + } + } + + if shouldStop { + if err := postReplicationAction(id, "stop"); err != nil { + log.Errorf("failed to stop replication of %d: %v", id, err) + pa.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } + log.Infof("replication of %d has been stopped", id) + } + if err = dao.UpdateRepPolicy(policy); err != nil { log.Errorf("failed to update policy %d: %v", id, err) pa.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) } - if policy.Enabled == originalPolicy.Enabled { - return - } - - //enablement has been modified - if policy.Enabled == 1 { + if shouldTrigger { go func() { if err := TriggerReplication(id, "", nil, models.RepOpTransfer); err != nil { log.Errorf("failed to trigger replication of %d: %v", id, err) @@ -192,14 +249,6 @@ func (pa *RepPolicyAPI) Put() { log.Infof("replication of %d triggered", id) } }() - } else { - go func() { - if err := postReplicationAction(id, "stop"); err != nil { - log.Errorf("failed to stop replication of %d: %v", id, err) - } else { - log.Infof("try to stop replication of %d", id) - } - }() } } diff --git a/api/target.go b/api/target.go index 7d94e12f1..089771c2b 100644 --- a/api/target.go +++ b/api/target.go @@ -258,6 +258,16 @@ func (t *TargetAPI) Delete() { t.CustomAbort(http.StatusNotFound, http.StatusText(http.StatusNotFound)) } + policies, err := dao.GetRepPolicyByTarget(id) + if err != nil { + log.Errorf("failed to get policies according target %d: %v", id, err) + t.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) + } + + if len(policies) > 0 { + t.CustomAbort(http.StatusBadRequest, "the target is used by policies, can not be deleted") + } + if err = dao.DeleteRepTarget(id); err != nil { log.Errorf("failed to delete target %d: %v", id, err) t.CustomAbort(http.StatusInternalServerError, http.StatusText(http.StatusInternalServerError)) diff --git a/api/user.go b/api/user.go index 24f004c4b..54b85e140 100644 --- a/api/user.go +++ b/api/user.go @@ -292,7 +292,7 @@ func (ua *UserAPI) ChangePassword() { } } -// ToggleUserAdminRole handles PUT api/users/{}/toggleadmin +// ToggleUserAdminRole handles PUT api/users/{}/sysadmin func (ua *UserAPI) ToggleUserAdminRole() { if !ua.IsAdmin { log.Warningf("current user, id: %d does not have admin role, can not update other user's role", ua.currentUserID) diff --git a/controllers/ng/accountsetting.go b/controllers/accountsetting.go similarity index 70% rename from controllers/ng/accountsetting.go rename to controllers/accountsetting.go index 5bb240d9c..03fe368cf 100644 --- a/controllers/ng/accountsetting.go +++ b/controllers/accountsetting.go @@ -1,6 +1,6 @@ -package ng +package controllers -// AccountSettingController handles request to /ng/account_setting +// AccountSettingController handles request to /account_setting type AccountSettingController struct { BaseController } diff --git a/controllers/ng/adminoption.go b/controllers/adminoption.go similarity index 70% rename from controllers/ng/adminoption.go rename to controllers/adminoption.go index 1fc366296..c0ae69bbb 100644 --- a/controllers/ng/adminoption.go +++ b/controllers/adminoption.go @@ -1,6 +1,6 @@ -package ng +package controllers -// AdminOptionController handles requests to /ng/admin_option +// AdminOptionController handles requests to /admin_option type AdminOptionController struct { BaseController } diff --git a/controllers/base.go b/controllers/base.go index 7d4b3e535..e8b67f908 100644 --- a/controllers/base.go +++ b/controllers/base.go @@ -1,47 +1,24 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - package controllers import ( "net/http" "os" + "path/filepath" "strings" "github.com/astaxie/beego" "github.com/beego/i18n" + "github.com/vmware/harbor/auth" "github.com/vmware/harbor/dao" + "github.com/vmware/harbor/models" "github.com/vmware/harbor/utils/log" ) -// CommonController handles request from UI that doesn't expect a page, such as /login /logout ... -type CommonController struct { - BaseController -} - -// Render returns nil. -func (c *CommonController) Render() error { - return nil -} - // BaseController wraps common methods such as i18n support, forward, which can be leveraged by other UI render controllers. type BaseController struct { beego.Controller i18n.Locale SelfRegistration bool - IsLdapAdminUser bool IsAdmin bool AuthMode string } @@ -52,6 +29,8 @@ type langType struct { } const ( + viewPath = "sections" + prefixNg = "" defaultLang = "en-US" ) @@ -98,6 +77,7 @@ func (b *BaseController) Prepare() { b.Data["Lang"] = curLang.Lang b.Data["CurLang"] = curLang.Name b.Data["RestLangs"] = restLangs + b.Data["SupportLanguages"] = supportLanguages authMode := strings.ToLower(os.Getenv("AUTH_MODE")) if authMode == "" { @@ -106,50 +86,92 @@ func (b *BaseController) Prepare() { b.AuthMode = authMode b.Data["AuthMode"] = b.AuthMode - selfRegistration := strings.ToLower(os.Getenv("SELF_REGISTRATION")) - - if selfRegistration == "on" { - b.SelfRegistration = true - } - - sessionUserID := b.GetSession("userId") - if sessionUserID != nil { - b.Data["Username"] = b.GetSession("username") - b.Data["UserId"] = sessionUserID.(int) - - if (sessionUserID == 1 && b.AuthMode == "ldap_auth") { - b.IsLdapAdminUser = true - } - - var err error - b.IsAdmin, err = dao.IsAdminRole(sessionUserID.(int)) - if err != nil { - log.Errorf("Error occurred in IsAdminRole:%v", err) - b.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - } - - b.Data["IsAdmin"] = b.IsAdmin - b.Data["SelfRegistration"] = b.SelfRegistration - b.Data["IsLdapAdminUser"] = b.IsLdapAdminUser - } -// ForwardTo setup layout and template for content for a page. -func (b *BaseController) ForwardTo(pageTitle string, pageName string) { - b.Layout = "segment/base-layout.tpl" - b.TplName = "segment/base-layout.tpl" - b.Data["PageTitle"] = b.Tr(pageTitle) +// Forward to setup layout and template for content for a page. +func (b *BaseController) Forward(title, templateName string) { + b.Layout = filepath.Join(prefixNg, "layout.htm") + b.TplName = filepath.Join(prefixNg, templateName) + b.Data["Title"] = title b.LayoutSections = make(map[string]string) - b.LayoutSections["HeaderInc"] = "segment/header-include.tpl" - b.LayoutSections["HeaderContent"] = "segment/header-content.tpl" - b.LayoutSections["BodyContent"] = pageName + ".tpl" - b.LayoutSections["ModalDialog"] = "segment/modal-dialog.tpl" - b.LayoutSections["FootContent"] = "segment/foot-content.tpl" + b.LayoutSections["HeaderInclude"] = filepath.Join(prefixNg, viewPath, "header-include.htm") + b.LayoutSections["FooterInclude"] = filepath.Join(prefixNg, viewPath, "footer-include.htm") + b.LayoutSections["HeaderContent"] = filepath.Join(prefixNg, viewPath, "header-content.htm") + b.LayoutSections["FooterContent"] = filepath.Join(prefixNg, viewPath, "footer-content.htm") + } var langTypes []*langType +// CommonController handles request from UI that doesn't expect a page, such as /SwitchLanguage /logout ... +type CommonController struct { + BaseController +} + +// Render returns nil. +func (cc *CommonController) Render() error { + return nil +} + +// Login handles login request from UI. +func (cc *CommonController) Login() { + principal := cc.GetString("principal") + password := cc.GetString("password") + + user, err := auth.Login(models.AuthModel{ + Principal: principal, + Password: password, + }) + if err != nil { + log.Errorf("Error occurred in UserLogin: %v", err) + cc.CustomAbort(http.StatusUnauthorized, "") + } + + if user == nil { + cc.CustomAbort(http.StatusUnauthorized, "") + } + + cc.SetSession("userId", user.UserID) + cc.SetSession("username", user.Username) +} + +// LogOut Habor UI +func (cc *CommonController) LogOut() { + cc.DestroySession() +} + +// SwitchLanguage User can swith to prefered language +func (cc *CommonController) SwitchLanguage() { + lang := cc.GetString("lang") + if _, exist := supportLanguages[lang]; exist { + cc.SetSession("lang", lang) + cc.Data["Lang"] = lang + } + cc.Redirect(cc.Ctx.Request.Header.Get("Referer"), http.StatusFound) +} + +// UserExists checks if user exists when user input value in sign in form. +func (cc *CommonController) UserExists() { + target := cc.GetString("target") + value := cc.GetString("value") + + user := models.User{} + switch target { + case "username": + user.Username = value + case "email": + user.Email = value + } + + exist, err := dao.UserExists(user, target) + if err != nil { + log.Errorf("Error occurred in UserExists: %v", err) + cc.CustomAbort(http.StatusInternalServerError, "Internal error.") + } + cc.Data["json"] = exist + cc.ServeJSON() +} + func init() { //conf/app.conf -> os.Getenv("config_path") @@ -179,9 +201,4 @@ func init() { supportLanguages[v] = t } - for _, lang := range langs { - if err := i18n.SetMessage(lang, "static/i18n/"+"locale_"+lang+".ini"); err != nil { - log.Errorf("Fail to set message file: %s", err.Error()) - } - } } diff --git a/controllers/ng/dashboard.go b/controllers/dashboard.go similarity index 69% rename from controllers/ng/dashboard.go rename to controllers/dashboard.go index 9fa0a6448..78cff7472 100644 --- a/controllers/ng/dashboard.go +++ b/controllers/dashboard.go @@ -1,6 +1,6 @@ -package ng +package controllers -// DashboardController handles requests to /ng/dashboard +// DashboardController handles requests to /dashboard type DashboardController struct { BaseController } diff --git a/controllers/ng/index.go b/controllers/index.go similarity index 71% rename from controllers/ng/index.go rename to controllers/index.go index 69020cbad..aee12f854 100644 --- a/controllers/ng/index.go +++ b/controllers/index.go @@ -1,6 +1,6 @@ -package ng +package controllers -// IndexController handles request to /ng +// IndexController handles request to / type IndexController struct { BaseController } diff --git a/controllers/itemdetail.go b/controllers/itemdetail.go deleted file mode 100644 index 895083469..000000000 --- a/controllers/itemdetail.go +++ /dev/null @@ -1,102 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package controllers - -import ( - "net/http" - "net/url" - "os" - - "github.com/vmware/harbor/dao" - "github.com/vmware/harbor/utils/log" -) - -// ItemDetailController handles requet to /registry/detail, which shows the detail of a project. -type ItemDetailController struct { - BaseController -} - -// Get will check if user has permission to view a certain project, if not user will be redirected to signin or his homepage. -// If the check is passed it renders the project detail page. -func (idc *ItemDetailController) Get() { - - projectID, _ := idc.GetInt64("project_id") - - if projectID <= 0 { - log.Errorf("Invalid project id: %d", projectID) - idc.Redirect("/signIn", http.StatusFound) - return - } - - project, err := dao.GetProjectByID(projectID) - - if err != nil { - log.Errorf("Error occurred in GetProjectById: %v", err) - idc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - - if project == nil { - idc.Redirect("/signIn", http.StatusFound) - return - } - - sessionUserID := idc.GetSession("userId") - - if project.Public != 1 && sessionUserID == nil { - idc.Redirect("/signIn?uri="+url.QueryEscape(idc.Ctx.Input.URI()), http.StatusFound) - return - } - - if sessionUserID != nil { - - userID := sessionUserID.(int) - - idc.Data["Username"] = idc.GetSession("username") - idc.Data["UserId"] = userID - - roleList, err := dao.GetUserProjectRoles(userID, projectID) - if err != nil { - log.Errorf("Error occurred in GetUserProjectRoles: %v", err) - idc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - - isAdmin, err := dao.IsAdminRole(userID) - if err != nil { - log.Errorf("Error occurred in IsAdminRole: %v", err) - idc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - - if !isAdmin && (project.Public == 0 && len(roleList) == 0) { - idc.Redirect("/registry/project", http.StatusFound) - return - } - - if len(roleList) > 0 { - idc.Data["RoleId"] = roleList[0].RoleID - } - } - - idc.Data["ProjectId"] = project.ProjectID - idc.Data["ProjectName"] = project.Name - idc.Data["OwnerName"] = project.OwnerName - idc.Data["OwnerId"] = project.OwnerID - - idc.Data["HarborRegUrl"] = os.Getenv("HARBOR_REG_URL") - idc.Data["RepoName"] = idc.GetString("repo_name") - - idc.ForwardTo("page_title_item_details", "item-detail") - -} diff --git a/controllers/login.go b/controllers/login.go deleted file mode 100644 index d608f8fbb..000000000 --- a/controllers/login.go +++ /dev/null @@ -1,82 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package controllers - -import ( - "net/http" - - "github.com/vmware/harbor/auth" - "github.com/vmware/harbor/models" - "github.com/vmware/harbor/utils/log" -) - -// IndexController handles request to / -type IndexController struct { - BaseController -} - -// Get renders the index page. -func (c *IndexController) Get() { - c.Data["Username"] = c.GetSession("username") - c.ForwardTo("page_title_index", "index") -} - -// SignInController handles request to /signIn -type SignInController struct { - BaseController -} - -// Get renders Sign In page. -func (sic *SignInController) Get() { - sic.ForwardTo("page_title_sign_in", "sign-in") -} - -// Login handles login request from UI. -func (c *CommonController) Login() { - principal := c.GetString("principal") - password := c.GetString("password") - - user, err := auth.Login(models.AuthModel{ - Principal: principal, - Password: password, - }) - if err != nil { - log.Errorf("Error occurred in UserLogin: %v", err) - c.CustomAbort(http.StatusUnauthorized, "") - } - - if user == nil { - c.CustomAbort(http.StatusUnauthorized, "") - } - - c.SetSession("userId", user.UserID) - c.SetSession("username", user.Username) -} - -// SwitchLanguage handles UI request to switch between different languages and re-render template based on language. -func (c *CommonController) SwitchLanguage() { - lang := c.GetString("lang") - if lang == "en-US" || lang == "zh-CN" || lang == "de-DE" || lang == "ru-RU" || lang == "ja-JP" { - c.SetSession("lang", lang) - c.Data["Lang"] = lang - } - c.Redirect(c.Ctx.Request.Header.Get("Referer"), http.StatusFound) -} - -// Logout handles UI request to logout. -func (c *CommonController) Logout() { - c.DestroySession() -} diff --git a/controllers/ng/navigationdetail.go b/controllers/navigationdetail.go similarity index 81% rename from controllers/ng/navigationdetail.go rename to controllers/navigationdetail.go index fc5006997..2de56ef41 100644 --- a/controllers/ng/navigationdetail.go +++ b/controllers/navigationdetail.go @@ -1,4 +1,4 @@ -package ng +package controllers import ( "net/http" @@ -8,10 +8,12 @@ import ( "github.com/vmware/harbor/utils/log" ) +// NavigationDetailController handles requests to /navigation_detail type NavigationDetailController struct { BaseController } +// Get renders user's navigation details header func (ndc *NavigationDetailController) Get() { sessionUserID := ndc.GetSession("userId") var isAdmin int @@ -29,6 +31,6 @@ func (ndc *NavigationDetailController) Get() { isAdmin = u.HasAdminRole } ndc.Data["IsAdmin"] = isAdmin - ndc.TplName = "ng/navigation-detail.htm" + ndc.TplName = "navigation-detail.htm" ndc.Render() } diff --git a/controllers/ng/navigationheader.go b/controllers/navigationheader.go similarity index 87% rename from controllers/ng/navigationheader.go rename to controllers/navigationheader.go index 2f88723f9..36513764c 100644 --- a/controllers/ng/navigationheader.go +++ b/controllers/navigationheader.go @@ -1,4 +1,4 @@ -package ng +package controllers import ( "net/http" @@ -8,7 +8,7 @@ import ( "github.com/vmware/harbor/utils/log" ) -// NavigationHeaderController handles requests to /ng/navigation_header +// NavigationHeaderController handles requests to /navigation_header type NavigationHeaderController struct { BaseController } @@ -34,6 +34,6 @@ func (nhc *NavigationHeaderController) Get() { } nhc.Data["HasLoggedIn"] = hasLoggedIn nhc.Data["IsAdmin"] = isAdmin - nhc.TplName = "ng/navigation-header.htm" + nhc.TplName = "navigation-header.htm" nhc.Render() } diff --git a/controllers/ng/base.go b/controllers/ng/base.go deleted file mode 100644 index 4171894e1..000000000 --- a/controllers/ng/base.go +++ /dev/null @@ -1,162 +0,0 @@ -package ng - -import ( - "net/http" - "os" - "path/filepath" - "strings" - - "github.com/astaxie/beego" - "github.com/beego/i18n" - "github.com/vmware/harbor/utils/log" -) - -// BaseController wraps common methods such as i18n support, forward, which can be leveraged by other UI render controllers. -type BaseController struct { - beego.Controller - i18n.Locale - SelfRegistration bool - IsAdmin bool - AuthMode string -} - -type langType struct { - Lang string - Name string -} - -const ( - viewPath = "sections" - prefixNg = "ng" - defaultLang = "en-US" -) - -var supportLanguages map[string]langType - -// Prepare extracts the language information from request and populate data for rendering templates. -func (b *BaseController) Prepare() { - - var lang string - al := b.Ctx.Request.Header.Get("Accept-Language") - - if len(al) > 4 { - al = al[:5] // Only compare first 5 letters. - if i18n.IsExist(al) { - lang = al - } - } - - if _, exist := supportLanguages[lang]; exist == false { //Check if support the request language. - lang = defaultLang //Set default language if not supported. - } - - sessionLang := b.GetSession("lang") - if sessionLang != nil { - b.SetSession("Lang", lang) - lang = sessionLang.(string) - } - - curLang := langType{ - Lang: lang, - } - - restLangs := make([]*langType, 0, len(langTypes)-1) - for _, v := range langTypes { - if lang != v.Lang { - restLangs = append(restLangs, v) - } else { - curLang.Name = v.Name - } - } - - // Set language properties. - b.Lang = lang - b.Data["Lang"] = curLang.Lang - b.Data["CurLang"] = curLang.Name - b.Data["RestLangs"] = restLangs - b.Data["SupportLanguages"] = supportLanguages - - authMode := strings.ToLower(os.Getenv("AUTH_MODE")) - if authMode == "" { - authMode = "db_auth" - } - b.AuthMode = authMode - b.Data["AuthMode"] = b.AuthMode - -} - -// Forward to setup layout and template for content for a page. -func (b *BaseController) Forward(title, templateName string) { - b.Layout = filepath.Join(prefixNg, "layout.htm") - b.TplName = filepath.Join(prefixNg, templateName) - b.Data["Title"] = title - b.LayoutSections = make(map[string]string) - b.LayoutSections["HeaderInclude"] = filepath.Join(prefixNg, viewPath, "header-include.htm") - b.LayoutSections["FooterInclude"] = filepath.Join(prefixNg, viewPath, "footer-include.htm") - b.LayoutSections["HeaderContent"] = filepath.Join(prefixNg, viewPath, "header-content.htm") - b.LayoutSections["FooterContent"] = filepath.Join(prefixNg, viewPath, "footer-content.htm") - -} - -var langTypes []*langType - -// CommonController handles request from UI that doesn't expect a page, such as /SwitchLanguage /logout ... -type CommonController struct { - BaseController -} - -// Render returns nil. -func (cc *CommonController) Render() error { - return nil -} - -// LogOut Habor UI -func (cc *CommonController) LogOut() { - cc.DestroySession() -} - -// SwitchLanguage User can swith to prefered language -func (cc *CommonController) SwitchLanguage() { - lang := cc.GetString("lang") - if _, exist := supportLanguages[lang]; exist { - cc.SetSession("lang", lang) - cc.Data["Lang"] = lang - } - cc.Redirect(cc.Ctx.Request.Header.Get("Referer"), http.StatusFound) -} - -func init() { - - //conf/app.conf -> os.Getenv("config_path") - configPath := os.Getenv("CONFIG_PATH") - if len(configPath) != 0 { - log.Infof("Config path: %s", configPath) - beego.AppConfigPath = configPath - if err := beego.ParseConfig(); err != nil { - log.Warningf("Failed to parse config file: %s, error: %v", configPath, err) - } - } - - beego.AddFuncMap("i18n", i18n.Tr) - - langs := strings.Split(beego.AppConfig.String("lang::types"), "|") - names := strings.Split(beego.AppConfig.String("lang::names"), "|") - - supportLanguages = make(map[string]langType) - - langTypes = make([]*langType, 0, len(langs)) - for i, v := range langs { - t := langType{ - Lang: v, - Name: names[i], - } - langTypes = append(langTypes, &t) - supportLanguages[v] = t - } - - for _, lang := range langs { - if err := i18n.SetMessage(lang, "static/i18n/"+"locale_"+lang+".ini"); err != nil { - log.Errorf("Fail to set message file: %s", err.Error()) - } - } -} diff --git a/controllers/ng/password.go b/controllers/ng/password.go deleted file mode 100644 index 4a655ff95..000000000 --- a/controllers/ng/password.go +++ /dev/null @@ -1,169 +0,0 @@ -package ng - -import ( - "bytes" - "net/http" - "os" - "regexp" - "text/template" - - "github.com/astaxie/beego" - "github.com/vmware/harbor/dao" - "github.com/vmware/harbor/models" - "github.com/vmware/harbor/utils" - "github.com/vmware/harbor/utils/log" -) - -type messageDetail struct { - Hint string - URL string - UUID string -} - -// SendEmail verifies the Email address and contact SMTP server to send reset password Email. -func (cc *CommonController) SendEmail() { - - email := cc.GetString("email") - - pass, _ := regexp.MatchString(`^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$`, email) - - if !pass { - cc.CustomAbort(http.StatusBadRequest, "email_content_illegal") - } else { - - queryUser := models.User{Email: email} - exist, err := dao.UserExists(queryUser, "email") - if err != nil { - log.Errorf("Error occurred in UserExists: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - if !exist { - cc.CustomAbort(http.StatusNotFound, "email_does_not_exist") - } - - messageTemplate, err := template.ParseFiles("views/ng/reset-password-mail.tpl") - if err != nil { - log.Errorf("Parse email template file failed: %v", err) - cc.CustomAbort(http.StatusInternalServerError, err.Error()) - } - - message := new(bytes.Buffer) - - harborURL := os.Getenv("HARBOR_URL") - if harborURL == "" { - harborURL = "localhost" - } - uuid, err := dao.GenerateRandomString() - if err != nil { - log.Errorf("Error occurred in GenerateRandomString: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - err = messageTemplate.Execute(message, messageDetail{ - Hint: cc.Tr("reset_email_hint"), - URL: harborURL, - UUID: uuid, - }) - - if err != nil { - log.Errorf("Message template error: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "internal_error") - } - - config, err := beego.AppConfig.GetSection("mail") - if err != nil { - log.Errorf("Can not load app.conf: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "internal_error") - } - - mail := utils.Mail{ - From: config["from"], - To: []string{email}, - Subject: cc.Tr("reset_email_subject"), - Message: message.String()} - - err = mail.SendMail() - - if err != nil { - log.Errorf("Send email failed: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "send_email_failed") - } - - user := models.User{ResetUUID: uuid, Email: email} - dao.UpdateUserResetUUID(user) - - } - -} - -// ForgotPasswordController handles requests to /ng/forgot_password -type ForgotPasswordController struct { - BaseController -} - -// Get renders forgot password page -func (fpc *ForgotPasswordController) Get() { - fpc.Forward("Forgot Password", "forgot-password.htm") -} - -// ResetPasswordController handles request to /resetPassword -type ResetPasswordController struct { - BaseController -} - -// Get checks if reset_uuid in the reset link is valid and render the result page for user to reset password. -func (rpc *ResetPasswordController) Get() { - - resetUUID := rpc.GetString("reset_uuid") - if resetUUID == "" { - log.Error("Reset uuid is blank.") - rpc.Redirect("/", http.StatusFound) - return - } - - queryUser := models.User{ResetUUID: resetUUID} - user, err := dao.GetUser(queryUser) - if err != nil { - log.Errorf("Error occurred in GetUser: %v", err) - rpc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - - if user != nil { - rpc.Data["ResetUuid"] = user.ResetUUID - rpc.Forward("Reset Password", "reset-password.htm") - } else { - rpc.Redirect("/", http.StatusFound) - } -} - -// ResetPassword handles request from the reset page and reset password -func (cc *CommonController) ResetPassword() { - - resetUUID := cc.GetString("reset_uuid") - if resetUUID == "" { - cc.CustomAbort(http.StatusBadRequest, "Reset uuid is blank.") - } - - queryUser := models.User{ResetUUID: resetUUID} - user, err := dao.GetUser(queryUser) - if err != nil { - log.Errorf("Error occurred in GetUser: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - if user == nil { - log.Error("User does not exist") - cc.CustomAbort(http.StatusBadRequest, "User does not exist") - } - - password := cc.GetString("password") - - if password != "" { - user.Password = password - err = dao.ResetUserPassword(*user) - if err != nil { - log.Errorf("Error occurred in ResetUserPassword: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - } else { - cc.CustomAbort(http.StatusBadRequest, "password_is_required") - } -} diff --git a/controllers/ng/project.go b/controllers/ng/project.go deleted file mode 100644 index af5dcd7a9..000000000 --- a/controllers/ng/project.go +++ /dev/null @@ -1,11 +0,0 @@ -package ng - -// ProjectController handles requests to /ng/projec -type ProjectController struct { - BaseController -} - -// Get renders project page -func (pc *ProjectController) Get() { - pc.Forward("My Projects", "project.htm") -} diff --git a/controllers/ng/search.go b/controllers/ng/search.go deleted file mode 100644 index 0d6f3321e..000000000 --- a/controllers/ng/search.go +++ /dev/null @@ -1,11 +0,0 @@ -package ng - -// SearchController handles request to ng/search -type SearchController struct { - BaseController -} - -// Get rendlers search bar -func (sc *SearchController) Get() { - sc.Forward("Search", "search.htm") -} diff --git a/controllers/ng/optionalmenu.go b/controllers/optionalmenu.go similarity index 88% rename from controllers/ng/optionalmenu.go rename to controllers/optionalmenu.go index 7afac21e6..21118c7f1 100644 --- a/controllers/ng/optionalmenu.go +++ b/controllers/optionalmenu.go @@ -1,4 +1,4 @@ -package ng +package controllers import ( "net/http" @@ -8,7 +8,7 @@ import ( "github.com/vmware/harbor/utils/log" ) -// OptionalMenuController handles request to /ng/optional_menu +// OptionalMenuController handles request to /optional_menu type OptionalMenuController struct { BaseController } @@ -33,7 +33,7 @@ func (omc *OptionalMenuController) Get() { omc.Data["Username"] = u.Username } omc.Data["HasLoggedIn"] = hasLoggedIn - omc.TplName = "ng/optional-menu.htm" + omc.TplName = "optional-menu.htm" omc.Render() } diff --git a/controllers/password.go b/controllers/password.go index 210e5cf9f..f285e64a9 100644 --- a/controllers/password.go +++ b/controllers/password.go @@ -1,18 +1,3 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - package controllers import ( @@ -22,40 +7,13 @@ import ( "regexp" "text/template" + "github.com/astaxie/beego" "github.com/vmware/harbor/dao" "github.com/vmware/harbor/models" "github.com/vmware/harbor/utils" "github.com/vmware/harbor/utils/log" - - "github.com/astaxie/beego" ) -// ChangePasswordController handles request to /changePassword -type ChangePasswordController struct { - BaseController -} - -// Get renders the page for user to change password. -func (cpc *ChangePasswordController) Get() { - sessionUserID := cpc.GetSession("userId") - if sessionUserID == nil { - cpc.Redirect("/signIn", http.StatusFound) - return - } - cpc.Data["Username"] = cpc.GetSession("username") - cpc.ForwardTo("page_title_change_password", "change-password") -} - -// ForgotPasswordController handles request to /forgotPassword -type ForgotPasswordController struct { - BaseController -} - -// Get Renders the page for user to input Email to reset password. -func (fpc *ForgotPasswordController) Get() { - fpc.ForwardTo("page_title_forgot_password", "forgot-password") -} - type messageDetail struct { Hint string URL string @@ -137,6 +95,16 @@ func (cc *CommonController) SendEmail() { } +// ForgotPasswordController handles requests to /forgot_password +type ForgotPasswordController struct { + BaseController +} + +// Get renders forgot password page +func (fpc *ForgotPasswordController) Get() { + fpc.Forward("Forgot Password", "forgot-password.htm") +} + // ResetPasswordController handles request to /resetPassword type ResetPasswordController struct { BaseController @@ -161,7 +129,7 @@ func (rpc *ResetPasswordController) Get() { if user != nil { rpc.Data["ResetUuid"] = user.ResetUUID - rpc.ForwardTo("page_title_reset_password", "reset-password") + rpc.Forward("Reset Password", "reset-password.htm") } else { rpc.Redirect("/", http.StatusFound) } diff --git a/controllers/project.go b/controllers/project.go index 1125bcaa1..68104ff0d 100644 --- a/controllers/project.go +++ b/controllers/project.go @@ -1,27 +1,11 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - package controllers -// ProjectController handles request to /registry/project +// ProjectController handles requests to /project type ProjectController struct { BaseController } -// Get renders project page. -func (p *ProjectController) Get() { - p.Data["Username"] = p.GetSession("username") - p.ForwardTo("page_title_project", "project") +// Get renders project page +func (pc *ProjectController) Get() { + pc.Forward("My Projects", "project.htm") } diff --git a/controllers/register.go b/controllers/register.go deleted file mode 100644 index d8ed05715..000000000 --- a/controllers/register.go +++ /dev/null @@ -1,87 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package controllers - -import ( - "net/http" - - "github.com/vmware/harbor/dao" - "github.com/vmware/harbor/models" - - "github.com/vmware/harbor/utils/log" -) - -// RegisterController handles request to /register -type RegisterController struct { - BaseController -} - -// Get renders the Sign In page, it only works if the auth mode is set to db_auth -func (rc *RegisterController) Get() { - - if !rc.SelfRegistration { - log.Warning("Registration is disabled when self-registration is off.") - rc.Redirect("/signIn", http.StatusFound) - } - - if rc.AuthMode == "db_auth" { - rc.ForwardTo("page_title_registration", "register") - } else { - rc.Redirect("/signIn", http.StatusFound) - } -} - -// AddUserController handles request for adding user with an admin role user -type AddUserController struct { - BaseController -} - -// Get renders the Sign In page, it only works if the auth mode is set to db_auth -func (ac *AddUserController) Get() { - - if !ac.IsAdmin { - log.Warning("Add user can only be used by admin role user.") - ac.Redirect("/signIn", http.StatusFound) - } - - if ac.AuthMode == "db_auth" { - ac.ForwardTo("page_title_add_user", "register") - } else { - ac.Redirect("/signIn", http.StatusFound) - } -} - -// UserExists checks if user exists when user input value in sign in form. -func (cc *CommonController) UserExists() { - target := cc.GetString("target") - value := cc.GetString("value") - - user := models.User{} - switch target { - case "username": - user.Username = value - case "email": - user.Email = value - } - - exist, err := dao.UserExists(user, target) - if err != nil { - log.Errorf("Error occurred in UserExists: %v", err) - cc.CustomAbort(http.StatusInternalServerError, "Internal error.") - } - cc.Data["json"] = exist - cc.ServeJSON() -} diff --git a/controllers/ng/repository.go b/controllers/repository.go similarity index 76% rename from controllers/ng/repository.go rename to controllers/repository.go index e9173f15e..dbb08bbf2 100644 --- a/controllers/ng/repository.go +++ b/controllers/repository.go @@ -1,8 +1,8 @@ -package ng +package controllers import "os" -// RepositoryController handles request to /ng/repository +// RepositoryController handles request to /repository type RepositoryController struct { BaseController } diff --git a/controllers/search.go b/controllers/search.go index 8762a2975..41d6a2927 100644 --- a/controllers/search.go +++ b/controllers/search.go @@ -1,18 +1,3 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - package controllers // SearchController handles request to /search @@ -20,9 +5,7 @@ type SearchController struct { BaseController } -// Get renders page for displaying search result. +// Get rendlers search bar func (sc *SearchController) Get() { - sc.Data["Username"] = sc.GetSession("username") - sc.Data["QueryParam"] = sc.GetString("q") - sc.ForwardTo("page_title_search", "search") + sc.Forward("Search", "search.htm") } diff --git a/controllers/ng/signin.go b/controllers/signin.go similarity index 90% rename from controllers/ng/signin.go rename to controllers/signin.go index 7e83aa24a..4adfd0942 100644 --- a/controllers/ng/signin.go +++ b/controllers/signin.go @@ -1,4 +1,4 @@ -package ng +package controllers import ( "net/http" @@ -8,7 +8,7 @@ import ( "github.com/vmware/harbor/utils/log" ) -// SignInController handles requests to /ng/sign_in +// SignInController handles requests to /sign_in type SignInController struct { BaseController } @@ -34,6 +34,6 @@ func (sic *SignInController) Get() { } sic.Data["Username"] = username sic.Data["HasLoggedIn"] = hasLoggedIn - sic.TplName = "ng/sign-in.htm" + sic.TplName = "sign-in.htm" sic.Render() } diff --git a/controllers/ng/signup.go b/controllers/signup.go similarity index 69% rename from controllers/ng/signup.go rename to controllers/signup.go index 28d77761a..97214aab1 100644 --- a/controllers/ng/signup.go +++ b/controllers/signup.go @@ -1,6 +1,6 @@ -package ng +package controllers -// SignUpController handles requests to /ng/sign_up +// SignUpController handles requests to /sign_up type SignUpController struct { BaseController } diff --git a/dao/dao_test.go b/dao/dao_test.go index 837ff01bd..b3b323a88 100644 --- a/dao/dao_test.go +++ b/dao/dao_test.go @@ -911,6 +911,21 @@ func TestAddRepPolicy(t *testing.T) { } +func TestGetRepPolicyByTarget(t *testing.T) { + policies, err := GetRepPolicyByTarget(targetID) + if err != nil { + t.Fatalf("failed to get policy according target %d: %v", targetID, err) + } + + if len(policies) == 0 { + t.Fatal("unexpected length of policies 0, expected is >0") + } + + if policies[0].ID != policyID { + t.Fatalf("unexpected policy: %d, expected: %d", policies[0].ID, policyID) + } +} + func TestGetRepPolicyByName(t *testing.T) { policy, err := GetRepPolicy(policyID) if err != nil { @@ -1102,9 +1117,27 @@ func TestDeleteRepJob(t *testing.T) { j, err := GetRepJob(jobID) if err != nil { t.Errorf("Error occured in GetRepJob:%v", err) + return } if j != nil { t.Errorf("Able to find rep job after deletion, id: %d", jobID) + return + } +} + +func TestFilterRepJobs(t *testing.T) { + jobs, err := FilterRepJobs("", policyID) + if err != nil { + log.Errorf("Error occured in FilterRepJobs: %v, policy ID: %d", err, policyID) + return + } + if len(jobs) != 1 { + log.Errorf("Unexpected length of jobs, expected: 1, in fact: %d", len(jobs)) + return + } + if jobs[0].ID != jobID { + log.Errorf("Unexpected job ID in the result, expected: %d, in fact: %d", jobID, jobs[0].ID) + return } } diff --git a/dao/replication_job.go b/dao/replication_job.go index b23db707f..c07d850ea 100644 --- a/dao/replication_job.go +++ b/dao/replication_job.go @@ -192,10 +192,24 @@ func GetRepPolicyByProject(projectID int64) ([]*models.RepPolicy, error) { return policies, nil } +// GetRepPolicyByTarget ... +func GetRepPolicyByTarget(targetID int64) ([]*models.RepPolicy, error) { + o := GetOrmer() + sql := `select * from replication_policy where target_id = ?` + + var policies []*models.RepPolicy + + if _, err := o.Raw(sql, targetID).QueryRows(&policies); err != nil { + return nil, err + } + + return policies, nil +} + // UpdateRepPolicy ... func UpdateRepPolicy(policy *models.RepPolicy) error { o := GetOrmer() - _, err := o.Update(policy, "Name", "Enabled", "Description", "CronStr") + _, err := o.Update(policy, "TargetID", "Name", "Enabled", "Description", "CronStr") return err } @@ -259,6 +273,38 @@ func GetRepJobByPolicy(policyID int64) ([]*models.RepJob, error) { return res, err } +// FilterRepJobs filters jobs by repo and policy ID +func FilterRepJobs(repo string, policyID int64) ([]*models.RepJob, error) { + o := GetOrmer() + + var args []interface{} + + sql := `select * from replication_job ` + + if len(repo) != 0 && policyID != 0 { + sql += `where repository like ? and policy_id = ? ` + args = append(args, "%"+repo+"%") + args = append(args, policyID) + } else if len(repo) != 0 { + sql += `where repository like ? ` + args = append(args, "%"+repo+"%") + } else if policyID != 0 { + sql += `where policy_id = ? ` + args = append(args, policyID) + } + + sql += `order by creation_time` + + var jobs []*models.RepJob + if _, err := o.Raw(sql, args).QueryRows(&jobs); err != nil { + return nil, err + } + + genTagListForJob(jobs...) + + return jobs, nil +} + // GetRepJobToStop get jobs that are possibly being handled by workers of a certain policy. func GetRepJobToStop(policyID int64) ([]*models.RepJob, error) { var res []*models.RepJob diff --git a/job/replication/transfer.go b/job/replication/transfer.go index 83113e8e4..5e63f9fcb 100644 --- a/job/replication/transfer.go +++ b/job/replication/transfer.go @@ -18,6 +18,7 @@ package replication import ( "bytes" "encoding/json" + "errors" "fmt" "io/ioutil" "net/http" @@ -43,6 +44,11 @@ const ( StatePushManifest = "push_manifest" ) +var ( + // ErrConflict represents http 409 error + ErrConflict = errors.New("conflict") +) + // BaseHandler holds informations shared by other state handlers type BaseHandler struct { project string // project_name @@ -136,15 +142,24 @@ type Checker struct { // Enter check existence of project, if it does not exist, create it, // if it exists, check whether the user has write privilege to it. func (c *Checker) Enter() (string, error) { +enter: exist, canWrite, err := c.projectExist() if err != nil { c.logger.Errorf("an error occurred while checking existence of project %s on %s with user %s : %v", c.project, c.dstURL, c.dstUsr, err) return "", err } if !exist { - if err := c.createProject(); err != nil { - c.logger.Errorf("an error occurred while creating project %s on %s with user %s : %v", c.project, c.dstURL, c.dstUsr, err) - return "", err + err := c.createProject() + if err != nil { + // other job may be also doing the same thing when the current job + // is creating project, so when the response code is 409, re-check + // the existence of project + if err == ErrConflict { + goto enter + } else { + c.logger.Errorf("an error occurred while creating project %s on %s with user %s : %v", c.project, c.dstURL, c.dstUsr, err) + return "", err + } } c.logger.Infof("project %s is created on %s with user %s", c.project, c.dstURL, c.dstUsr) return StatePullManifest, nil @@ -246,6 +261,10 @@ func (c *Checker) createProject() error { } if resp.StatusCode != http.StatusCreated { + if resp.StatusCode == http.StatusConflict { + return ErrConflict + } + defer resp.Body.Close() message, err := ioutil.ReadAll(resp.Body) if err != nil { diff --git a/static/ng/Gruntfile.js b/static/Gruntfile.js similarity index 100% rename from static/ng/Gruntfile.js rename to static/Gruntfile.js diff --git a/static/i18n/locale_de-DE.ini b/static/i18n/locale_de-DE.ini deleted file mode 100644 index c5303e2f9..000000000 --- a/static/i18n/locale_de-DE.ini +++ /dev/null @@ -1,88 +0,0 @@ -page_title_index = Harbor -page_title_sign_in = Anmelden - Harbor -page_title_project = Projekt - Harbor -page_title_item_details = Details - Harbor -page_title_registration = Registrieren - Harbor -page_title_add_user = Benutzer anlegen - Harbor -page_title_forgot_password = Passwort vergessen - Harbor -title_forgot_password = Passwort vergessen -page_title_reset_password = Passwort zurücksetzen - Harbor -title_reset_password = Passwort zurücksetzen -page_title_change_password = Passwort ändern - Harbor -title_change_password = Passwort ändern -page_title_search = Suche - Harbor -sign_in = Anmelden -sign_up = Registrieren -add_user = Benutzer anlegen -log_out = Abmelden -search_placeholder = Projekte oder Repositories -change_password = Passwort ändern -username_email = Benutzername/E-Mail -password = Passwort -forgot_password = Passwort vergessen -welcome = Willkommen -my_projects = Meine Projekte -public_projects = Öffentliche Projekte -admin_options = Admin Optionen -project_name = Projektname -creation_time = Erstellungsdatum -publicity = Öffentlich -add_project = Projekt hinzufügen -check_for_publicity = öffentliches Projekt -button_save = Speichern -button_cancel = Abbrechen -button_submit = Absenden -username = Benutzername -email = E-Mail -system_admin = System Admininistrator -dlg_button_ok = OK -dlg_button_cancel = Abbrechen -registration = Registrieren -username_description = Dies wird Ihr Benutzername sein. -email_description = Die E-Mail Adresse wird für das Zurücksetzen des Passworts genutzt. -full_name = Sollständiger Name -full_name_description = Vor- und Nachname. -password_description = Mindestens sieben Zeichen bestehend aus einem Kleinbuchstaben, einem Großbuchstaben und einer Zahl -confirm_password = Passwort bestätigen -note_to_the_admin = Kommentar -old_password = Altes Passwort -new_password = Neues Passwort -forgot_password_description = Bitte gebe die E-Mail Adresse ein, die du zur Registrierung verwendet hast. Ein Link zur Wiederherstellung wird dir per E-Mail an diese Adresse geschickt. - -projects = Projekte -repositories = Repositories -search = Suche -home = Home -project = Projekt -owner = Besitzer -repo = Repositories -user = Benutzer -logs = Logs -repo_name = Repository -add_members = Benutzer hinzufügen -operation = Aktion -advance = erweiterte Suche -all = Alle -others = Andere -start_date = Start Datum -end_date = End Datum -timestamp = Zeitstempel -role = Rolle -reset_email_hint = Bitte klicke auf diesen Link um dein Passwort zurückzusetzen -reset_email_subject = Passwort zurücksetzen -language = Deutsch -language_en-US = English -language_zh-CN = 中文 -language_de-DE = Deutsch -language_ru-RU = Русский -language_ja-JP = 日本語 -copyright = Copyright -all_rights_reserved = Alle Rechte vorbehalten. -index_desc = Project Harbor ist ein zuverlässiger Enterprise-Class Registry Server. Unternehmen können ihren eigenen Registry Server aufsetzen um die Produktivität und Sicherheit zu erhöhen. Project Harbor kann für Entwicklungs- wie auch Produktiv-Umgebungen genutzt werden. -index_desc_0 = Vorteile: -index_desc_1 = 1. Sicherheit: Halten Sie ihr geistiges Eigentum innerhalb der Organisation. -index_desc_2 = 2. Effizienz: Ein privater Registry Server innerhalb des Netzwerks ihrer Organisation kann den Traffic zu öffentlichen Services im Internet signifikant reduzieren. -index_desc_3 = 3. Zugriffskontrolle: RBAC (Role Based Access Control) wird zur Verfügung gestellt. Benutzerverwaltung kann mit bestehenden Identitätsservices wie AD/LDAP integriert werden. -index_desc_4 = 4. Audit: Jeglicher Zugriff auf die Registry wird protokolliert und kann für ein Audit verwendet werden. -index_desc_5 = 5. GUI: Benutzerfreundliche Verwaltung über eine einzige Management-Konsole -index_title = Ein Enterprise-Class Registry Server diff --git a/static/i18n/locale_en-US.ini b/static/i18n/locale_en-US.ini deleted file mode 100644 index 7444d4537..000000000 --- a/static/i18n/locale_en-US.ini +++ /dev/null @@ -1,89 +0,0 @@ -page_title_index = Harbor -page_title_sign_in = Sign In - Harbor -page_title_project = Project - Harbor -page_title_item_details = Details - Harbor -page_title_registration = Sign Up - Harbor -page_title_add_user = Add User - Harbor -page_title_forgot_password = Forgot Password - Harbor -title_forgot_password = Forgot Password -page_title_reset_password = Reset Password - Harbor -title_reset_password = Reset Password -page_title_change_password = Change Password - Harbor -title_change_password = Change Password -page_title_search = Search - Harbor -sign_in = Sign In -sign_up = Sign Up -add_user = Add User -log_out = Log Out -search_placeholder = projects or repositories -change_password = Change Password -username_email = Username/Email -password = Password -forgot_password = Forgot Password -welcome = Welcome -my_projects = My Projects -public_projects = Public Projects -admin_options = Admin Options -project_name = Project Name -creation_time = Creation Time -publicity = Publicity -add_project = Add Project -check_for_publicity = Public project -button_save = Save -button_cancel = Cancel -button_submit = Submit -username = Username -email = Email -system_admin = System Admin -dlg_button_ok = OK -dlg_button_cancel = Cancel -registration = Sign Up -username_description = This will be your username. -email_description = The Email address will be used for resetting password. -full_name = Full Name -full_name_description = First name & Last name. -password_description = At least 7 characters with 1 lowercase letter, 1 capital letter and 1 numeric character. -confirm_password = Confirm Password -note_to_the_admin = Comments -old_password = Old Password -new_password = New Password -forgot_password_description = Please input the Email used when you signed up, a reset password Email will be sent to you. - -projects = Projects -repositories = Repositories -search = Search -home = Home -project = Project -owner = Owner -repo = Repositories -user = Users -logs = Logs -repo_name = Repository Name -repo_tag = Tag -add_members = Add Members -operation = Operation -advance = Advanced Search -all = All -others = Others -start_date = Start Date -end_date = End Date -timestamp = Timestamp -role = Role -reset_email_hint = Please click this link to reset your password -reset_email_subject = Reset your password -language = English -language_en-US = English -language_zh-CN = 中文 -language_de-DE = Deutsch -language_ru-RU = Русский -language_ja-JP = 日本語 -copyright = Copyright -all_rights_reserved = All rights reserved. -index_desc = Project Harbor is to build an enterprise-class, reliable registry server. Enterprises can set up a private registry server in their own environment to improve productivity as well as security. Project Harbor can be used in both development and production environment. -index_desc_0 = Key benefits: -index_desc_1 = 1. Security: Keep their intellectual properties within their organizations. -index_desc_2 = 2. Efficiency: A private registry server is set up within the organization's network and can reduce significantly the internet traffic to the public service. -index_desc_3 = 3. Access Control: RBAC (Role Based Access Control) is provided. User management can be integrated with existing enterprise identity services like AD/LDAP. -index_desc_4 = 4. Audit: All access to the registry are logged and can be used for audit purpose. -index_desc_5 = 5. GUI: User friendly single-pane-of-glass management console. -index_title = An enterprise-class registry server diff --git a/static/i18n/locale_ja-JP.ini b/static/i18n/locale_ja-JP.ini deleted file mode 100644 index cf93bcbe1..000000000 --- a/static/i18n/locale_ja-JP.ini +++ /dev/null @@ -1,89 +0,0 @@ -page_title_index = Harbor -page_title_sign_in = ログイン - Harbor -page_title_project = プロジェクト - Harbor -page_title_item_details = 詳しい - Harbor -page_title_registration = 登録 - Harbor -page_title_add_user = ユーザを追加 - Harbor -page_title_forgot_password = パスワードを忘れました - Harbor -title_forgot_password = パスワードを忘れました -page_title_reset_password = パスワードをリセット - Harbor -title_reset_password = パスワードをリセット -page_title_change_password = パスワードを変更 - Harbor -title_change_password = パスワードを変更 -page_title_search = サーチ - Harbor -sign_in = ログイン -sign_up = 登録 -add_user = ユーザを追加 -log_out = ログアウト -search_placeholder = プロジェクト名またはイメージ名 -change_password = パスワードを変更 -username_email = ユーザ名/メールアドレス -password = パスワード -forgot_password = パスワードを忘れました -welcome = ようこそ -my_projects = マイプロジェクト -public_projects = パブリックプロジェクト -admin_options = 管理者 -project_name = プロジェクト名 -creation_time = 作成日時 -publicity = パブリック -add_project = プロジェクトを追加 -check_for_publicity = パブリックプロジェクト -button_save = 保存する -button_cancel = 取り消しする -button_submit = 送信する -username = ユーザ名 -email = メールアドレス -system_admin = システム管理者 -dlg_button_ok = OK -dlg_button_cancel = 取り消し -registration = 登録 -username_description = ログイン際に使うユーザ名を入力してください。 -email_description = メールアドレスはパスワードをリセットする際に使われます。 -full_name = フルネーム -full_name_description = フルネームを入力してください。 -password_description = パスワード7英数字以上で、少なくとも 1小文字、 1大文字と 1数字でなければなりません。 -confirm_password = パスワードを確認する -note_to_the_admin = メモ -old_password = 現在のパスワード -new_password = 新しいパスワード -forgot_password_description = ぱプロジェクトをリセットするメールはこのアドレスに送信します。 - -projects = プロジェクト -repositories = リポジトリ -search = サーチ -home = ホーム -project = プロジェクト -owner = オーナー -repo = リポジトリ -user = ユーザ -logs = ログ -repo_name = リポジトリ名 -repo_tag = リポジトリタグ -add_members = メンバーを追加 -operation = 操作 -advance = さらに絞りこみで検索 -all = 全部 -others = その他 -start_date = 開始日 -end_date = 終了日 -timestamp = タイムスタンプ -role = 役割 -reset_email_hint = このリンクをクリックしてパスワードリセットの処理を続けてください -reset_email_subject = パスワードをリセットします -language = 日本語 -language_en-US = English -language_zh-CN = 中文 -language_de-DE = Deutsch -language_ru-RU = Русский -language_ja-JP = 日本語 -copyright = コピーライト -all_rights_reserved = 無断複写・転載を禁じます -index_desc = Harborは、信頼性の高いエンタープライズクラスのRegistryサーバです。タープライズユーザはHarborを利用し、プライベートのRegistryサビースを構築し、生産性および安全性を向上させる事ができます。開発環境はもちろん、生産環境にも使用する事ができます。 -index_desc_0 = 主な利点: -index_desc_1 = 1. セキュリティ: 知的財産権を組織内で確保する。 -index_desc_2 = 2. 効率: プライベートなので、パブリックRegistryサビースにネットワーク通信が減らす。 -index_desc_3 = 3. アクセス制御: ロールベースアクセス制御機能を実装し、更に既存のユーザ管理システム(AD/LDAP)と統合することも可能。 -index_desc_4 = 4. 監査: すべてRegistryサビースへの操作が記録され、検査にに利用できる。 -index_desc_5 = 5. 管理UI: 使いやすい管理UIが搭載する。 -index_title = エンタープライズ Registry サビース diff --git a/static/i18n/locale_messages.js b/static/i18n/locale_messages.js deleted file mode 100644 index 819dd53d0..000000000 --- a/static/i18n/locale_messages.js +++ /dev/null @@ -1,457 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -var global_messages = { - "username_is_required" : { - "en-US": "Username is required.", - "zh-CN": "用户名为必填项。", - "ja-JP": "ユーザ名は必須項目です。", - "de-DE": "Benutzername erforderlich.", - "ru-RU": "Требуется ввести имя пользователя." - }, - "username_has_been_taken" : { - "en-US": "Username has been taken.", - "zh-CN": "用户名已被占用。", - "ja-JP": "ユーザ名はすでに登録されました。", - "de-DE": "Benutzername bereits vergeben.", - "ru-RU": "Имя пользователя уже используется." - }, - "username_is_too_long" : { - "en-US": "Username is too long. (maximum 20 characters)", - "zh-CN": "用户名长度超出限制。(最长为20个字符)", - "ja-JP": "ユーザ名が長すぎです。(20文字まで)", - "de-DE": "Benutzername ist zu lang. (maximal 20 Zeichen)", - "ru-RU": "Имя пользователя слишком длинное. (максимум 20 символов)" - }, - "username_contains_illegal_chars": { - "en-US": "Username contains illegal character(s).", - "zh-CN": "用户名包含不合法的字符。", - "ja-JP": "ユーザ名に使えない文字が入っています。", - "de-DE": "Benutzername enthält ungültige Zeichen.", - "ru-RU": "Имя пользователя содержит недопустимые символы." - }, - "email_is_required" : { - "en-US": "Email is required.", - "zh-CN": "邮箱为必填项。", - "ja-JP": "メールアドレスが必須です。", - "de-DE": "E-Mail Adresse erforderlich.", - "ru-RU": "Требуется ввести E-mail адрес." - }, - "email_contains_illegal_chars" : { - "en-US": "Email contains illegal character(s).", - "zh-CN": "邮箱包含不合法的字符。", - "ja-JP": "メールアドレスに使えない文字が入っています。", - "de-DE": "E-Mail Adresse enthält ungültige Zeichen.", - "ru-RU": "E-mail адрес содержит недопеустимые символы." - }, - "email_has_been_taken" : { - "en-US": "Email has been taken.", - "zh-CN": "邮箱已被占用。", - "ja-JP": "メールアドレスがすでに使われました。", - "de-DE": "E-Mail Adresse wird bereits verwendet.", - "ru-RU": "Такой E-mail адрес уже используется." - }, - "email_content_illegal" : { - "en-US": "Email format is illegal.", - "zh-CN": "邮箱格式不合法。", - "ja-JP": "メールアドレスフォーマットエラー。", - "de-DE": "Format der E-Mail Adresse ist ungültig.", - "ru-RU": "Недопустимый формат E-mail адреса." - }, - "email_does_not_exist" : { - "en-US": "Email does not exist.", - "zh-CN": "邮箱不存在。", - "ja-JP": "メールアドレスが存在しません。", - "de-DE": "E-Mail Adresse existiert nicht.", - "ru-RU": "E-mail адрес не существует." - }, - "realname_is_required" : { - "en-US": "Full name is required.", - "zh-CN": "全名为必填项。", - "ja-JP": "フルネームが必須です。", - "de-DE": "Vollständiger Name erforderlich.", - "ru-RU": "Требуется ввести полное имя." - }, - "realname_is_too_long" : { - "en-US": "Full name is too long. (maximum 20 characters)", - "zh-CN": "全名长度超出限制。(最长为20个字符)", - "ja-JP": "フルネームは長すぎです。(20文字まで)", - "de-DE": "Vollständiger Name zu lang. (maximal 20 Zeichen)", - "ru-RU": "Полное имя слишком длинное. (максимум 20 символов)" - }, - "realname_contains_illegal_chars" : { - "en-US": "Full name contains illegal character(s).", - "zh-CN": "全名包含不合法的字符。", - "ja-JP": "フルネームに使えない文字が入っています。", - "de-DE": "Vollständiger Name enthält ungültige Zeichen.", - "ru-RU": "Полное имя содержит недопустимые символы." - }, - "password_is_required" : { - "en-US": "Password is required.", - "zh-CN": "密码为必填项。", - "ja-JP": "パスワードは必須です。", - "de-DE": "Passwort erforderlich.", - "ru-RU": "Требуется ввести пароль." - }, - "password_is_invalid" : { - "en-US": "Password is invalid. At least 7 characters with 1 lowercase letter, 1 capital letter and 1 numeric character.", - "zh-CN": "密码无效。至少输入 7个字符且包含 1个小写字母,1个大写字母和 1个数字。", - "ja-JP": "無効なパスワードです。7英数字以上で、 少なくとも1小文字、1大文字と1数字となります。", - "de-DE": "Passwort ungültig. Mindestens sieben Zeichen bestehend aus einem Kleinbuchstaben, einem Großbuchstaben und einer Zahl", - "ru-RU": "Такой пароль недопустим. Парольл должен содержать Минимум 7 символов, в которых будет присутствовать по меньшей мере 1 буква нижнего регистра, 1 буква верхнего регистра и 1 цифра" - }, - "password_is_too_long" : { - "en-US": "Password is too long. (maximum 20 characters)", - "zh-CN": "密码长度超出限制。(最长为20个字符)", - "ja-JP": "パスワードは長すぎです。(20文字まで)", - "de-DE": "Passwort zu lang. (maximal 20 Zeichen)", - "ru-RU": "Пароль слишком длинный (максимум 20 символов)" - }, - "password_does_not_match" : { - "en-US": "Passwords do not match.", - "zh-CN": "两次密码输入不一致。", - "ja-JP": "確認のパスワードが正しくありません。", - "de-DE": "Passwörter stimmen nicht überein.", - "ru-RU": "Пароли не совпадают." - }, - "comment_is_too_long" : { - "en-US": "Comment is too long. (maximum 20 characters)", - "zh-CN": "备注长度超出限制。(最长为20个字符)", - "ja-JP": "コメントは長すぎです。(20文字まで)", - "de-DE": "Kommentar zu lang. (maximal 20 Zeichen)", - "ru-RU": "Комментарий слишком длинный. (максимум 20 символов)" - }, - "comment_contains_illegal_chars" : { - "en-US": "Comment contains illegal character(s).", - "zh-CN": "备注包含不合法的字符。", - "ja-JP": "コメントに使えない文字が入っています。", - "de-DE": "Kommentar enthält ungültige Zeichen.", - "ru-RU": "Комментарий содержит недопустимые символы." - }, - "project_name_is_required" : { - "en-US": "Project name is required.", - "zh-CN": "项目名称为必填项。", - "ja-JP": "プロジェクト名は必須です。", - "de-DE": "Projektname erforderlich.", - "ru-RU": "Необходимо ввести название Проекта." - }, - "project_name_is_too_short" : { - "en-US": "Project name is too short. (minimum 4 characters)", - "zh-CN": "项目名称至少要求 4个字符。", - "ja-JP": "プロジェクト名は4文字以上です。", - "de-DE": "Projektname zu kurz. (mindestens 4 Zeichen)", - "ru-RU": "Название проекта слишком короткое. (миниму 4 символа)" - }, - "project_name_is_too_long" : { - "en-US": "Project name is too long. (maximum 30 characters)", - "zh-CN": "项目名称长度超出限制。(最长为30个字符)", - "ja-JP": "プロジェクト名は長すぎです。(30文字まで)", - "de-DE": "Projektname zu lang. (maximal 30 Zeichen)", - "ru-RU": "Название проекта слишком длинное (максимум 30 символов)" - }, - "project_name_contains_illegal_chars" : { - "en-US": "Project name contains illegal character(s).", - "zh-CN": "项目名称包含不合法的字符。", - "ja-JP": "プロジェクト名に使えない文字が入っています。", - "de-DE": "Projektname enthält ungültige Zeichen.", - "ru-RU": "Название проекта содержит недопустимые символы." - }, - "project_exists" : { - "en-US": "Project exists.", - "zh-CN": "项目已存在。", - "ja-JP": "プロジェクトはすでに存在しました。", - "de-DE": "Projekt existiert bereits.", - "ru-RU": "Такой проект уже существует." - }, - "delete_user" : { - "en-US": "Delete User", - "zh-CN": "删除用户", - "ja-JP": "ユーザを削除", - "de-DE": "Benutzer löschen", - "ru-RU": "Удалить пользователя" - }, - "are_you_sure_to_delete_user" : { - "en-US": "Are you sure to delete ", - "zh-CN": "确认要删除用户 ", - "ja-JP": "ユーザを削除でよろしでしょうか ", - "de-DE": "Sind Sie sich sicher, dass Sie folgenden Benutzer löschen möchten: ", - "ru-RU": "Вы уверены что хотите удалить пользователя? " - }, - "input_your_username_and_password" : { - "en-US": "Please input your username and password.", - "zh-CN": "请输入用户名和密码。", - "ja-JP": "ユーザ名とパスワードを入力してください。", - "de-DE": "Bitte geben Sie ihr Benutzername und Passwort ein.", - "ru-RU": "Введите имя пользователя и пароль." - }, - "check_your_username_or_password" : { - "en-US": "Please check your username or password.", - "zh-CN": "请输入正确的用户名或密码。", - "ja-JP": "正しいユーザ名とパスワードを入力してください。", - "de-DE": "Bitte überprüfen Sie ihren Benutzernamen und Passwort.", - "ru-RU": "Проверьте свои имя пользователя и пароль." - }, - "title_login_failed" : { - "en-US": "Login Failed", - "zh-CN": "登录失败", - "ja-JP": "ログインに失敗しました。", - "de-DE": "Anmeldung fehlgeschlagen", - "ru-RU": "Ошибка входа" - }, - "title_change_password" : { - "en-US": "Change Password", - "zh-CN": "修改密码", - "ja-JP": "パスワードを変更します。", - "de-DE": "Passwort ändern", - "ru-RU": "Сменить пароль" - }, - "change_password_successfully" : { - "en-US": "Password changed successfully.", - "zh-CN": "密码已修改。", - "ja-JP": "パスワードを変更しました。", - "de-DE": "Passwort erfolgreich geändert.", - "ru-RU": "Пароль успешно изменен." - }, - "title_forgot_password" : { - "en-US": "Forgot Password", - "zh-CN": "忘记密码", - "ja-JP": "パスワードをリセットします。", - "de-DE": "Passwort vergessen", - "ru-RU": "Забыли пароль?" - }, - "email_has_been_sent" : { - "en-US": "Email for resetting password has been sent.", - "zh-CN": "重置密码邮件已发送。", - "ja-JP": "パスワードをリセットするメールを送信しました。", - "de-DE": "Eine E-Mail mit einem Wiederherstellungslink wurde an Sie gesendet.", - "ru-RU": "На ваш E-mail было выслано письмо с инструкциями по сбросу пароля." - }, - "send_email_failed" : { - "en-US": "Failed to send Email for resetting password.", - "zh-CN": "重置密码邮件发送失败。", - "ja-JP": "パスワードをリセットするメールを送信する際エラーが出ました", - "de-DE": "Fehler beim Senden der Wiederherstellungs-E-Mail.", - "ru-RU": "Ошибка отправки сообщения." - }, - "please_login_first" : { - "en-US": "Please login first.", - "zh-CN": "请先登录。", - "ja-JP": "この先にログインが必要です。", - "de-DE": "Bitte melden Sie sich zuerst an.", - "ru-RU": "Сначала выполните вход в систему." - }, - "old_password_is_not_correct" : { - "en-US": "Old password is not correct.", - "zh-CN": "原密码输入不正确。", - "ja-JP": "現在のパスワードが正しく入力されていません。", - "de-DE": "Altes Passwort ist nicht korrekt.", - "ru-RU": "Старый пароль введен неверно." - }, - "please_input_new_password" : { - "en-US": "Please input new password.", - "zh-CN": "请输入新密码。", - "ja-JP": "あたらしいパスワードを入力してください", - "de-DE": "Bitte geben Sie ihr neues Passwort ein.", - "ru-RU": "Пожалуйста, введите новый пароль." - }, - "invalid_reset_url": { - "en-US": "Invalid URL for resetting password.", - "zh-CN": "无效密码重置链接。", - "ja-JP": "無効なパスワードをリセットするリンク。", - "de-DE": "Ungültige URL zum Passwort wiederherstellen.", - "ru-RU": "Неверный URL для сброса пароля." - }, - "reset_password_successfully" : { - "en-US": "Reset password successfully.", - "zh-CN": "密码重置成功。", - "ja-JP": "パスワードをリセットしました。", - "de-DE": "Passwort erfolgreich wiederhergestellt.", - "ru-RU": "Пароль успешно сброшен." - }, - "internal_error": { - "en-US": "Internal error.", - "zh-CN": "内部错误,请联系系统管理员。", - "ja-JP": "エラーが出ました、管理者に連絡してください。", - "de-DE": "Interner Fehler.", - "ru-RU": "Внутренняя ошибка." - }, - "title_reset_password" : { - "en-US": "Reset Password", - "zh-CN": "重置密码", - "ja-JP": "パスワードをリセットする", - "de-DE": "Passwort zurücksetzen", - "ru-RU": "Сбросить пароль" - }, - "title_sign_up" : { - "en-US": "Sign Up", - "zh-CN": "注册", - "ja-JP": "登録", - "de-DE": "Registrieren", - "ru-RU": "Регистрация" - }, - "title_add_user": { - "en-US": "Add User", - "zh-CN": "新增用户", - "ja-JP": "ユーザを追加", - "de-DE": "Benutzer hinzufügen", - "ru-RU": "Добавить пользователя" - }, - "registered_successfully": { - "en-US": "Signed up successfully.", - "zh-CN": "注册成功。", - "ja-JP": "登録しました。", - "de-DE": "Erfolgreich registriert.", - "ru-RU": "Регистрация прошла успешно." - }, - "registered_failed" : { - "en-US": "Failed to sign up.", - "zh-CN": "注册失败。", - "ja-JP": "登録でませんでした。", - "de-DE": "Registrierung fehlgeschlagen.", - "ru-RU": "Ошибка регистрации." - }, - "added_user_successfully": { - "en-US": "Added user successfully.", - "zh-CN": "新增用户成功。", - "ja-JP": "ユーザを追加しました。", - "de-DE": "Benutzer erfolgreich erstellt.", - "ru-RU": "Пользователь успешно добавлен." - }, - "added_user_failed": { - "en-US": "Adding user failed.", - "zh-CN": "新增用户失败。", - "ja-JP": "ユーザを追加できませんでした。", - "de-DE": "Benutzer erstellen fehlgeschlagen.", - "ru-RU": "Ошибка добавления пользователя." - }, - "projects": { - "en-US": "Projects", - "zh-CN": "项目", - "ja-JP": "プロジェクト", - "de-DE": "Projekte", - "ru-RU": "Проекты" - }, - "repositories" : { - "en-US": "Repositories", - "zh-CN": "镜像仓库", - "ja-JP": "リポジトリ", - "de-DE": "Repositories", - "ru-RU": "Репозитории" - }, - "no_repo_exists" : { - "en-US": "No repositories found, please use 'docker push' to upload images.", - "zh-CN": "未发现镜像,请用‘docker push’命令上传镜像。", - "ja-JP": "イメージが見つかりませんでした。’docker push’を利用しイメージをアップロードしてください。", - "de-DE": "Keine Repositories gefunden, bitte benutzen Sie 'docker push' um ein Image hochzuladen.", - "ru-RU": "Репозитории не найдены, используйте команду 'docker push' для добавления образов." - }, - "tag" : { - "en-US": "Tag", - "zh-CN": "标签", - "ja-JP": "タグ", - "de-DE": "Tag", - "ru-RU": "Метка" - }, - "pull_command": { - "en-US": "Pull Command", - "zh-CN": "Pull 命令", - "ja-JP": "Pull コマンド", - "de-DE": "Pull Befehl", - "ru-RU": "Команда для скачивания образа" - }, - "image_details" : { - "en-US": "Image Details", - "zh-CN": "镜像详细信息", - "ja-JP": "イメージ詳細", - "de-DE": "Image Details", - "ru-RU": "Информация об образе" - }, - "add_members" : { - "en-US": "Add Member", - "zh-CN": "添加成员", - "ja-JP": "メンバーを追加する", - "de-DE": "Mitglied hinzufügen", - "ru-RU": "Добавить Участника" - }, - "edit_members" : { - "en-US": "Edit Members", - "zh-CN": "编辑成员", - "ja-JP": "メンバーを編集する", - "de-DE": "Mitglieder bearbeiten", - "ru-RU": "Редактировать Участников" - }, - "add_member_failed" : { - "en-US": "Adding Member Failed", - "zh-CN": "添加成员失败", - "ja-JP": "メンバーを追加できません出した", - "de-DE": "Mitglied hinzufügen fehlgeschlagen", - "ru-RU": "Ошибка при добавлении нового участника" - }, - "please_input_username" : { - "en-US": "Please input a username.", - "zh-CN": "请输入用户名。", - "ja-JP": "ユーザ名を入力してください。", - "de-DE": "Bitte geben Sie einen Benutzernamen ein.", - "ru-RU": "Пожалуйста, введите имя пользователя." - }, - "please_assign_a_role_to_user" : { - "en-US": "Please assign a role to the user.", - "zh-CN": "请为用户分配角色。", - "ja-JP": "ユーザーに役割を割り当てるしてください。", - "de-DE": "Bitte weisen Sie dem Benutzer eine Rolle zu.", - "ru-RU": "Пожалуйста, назначьте роль пользователю." - }, - "user_id_exists" : { - "en-US": "User is already a member.", - "zh-CN": "用户已经是成员。", - "ja-JP": "すでにメンバーに登録しました。", - "de-DE": "Benutzer ist bereits Mitglied.", - "ru-RU": "Пользователь уже является участником." - }, - "user_id_does_not_exist" : { - "en-US": "User does not exist.", - "zh-CN": "不存在此用户。", - "ja-JP": "ユーザが見つかりませんでした。", - "de-DE": "Benutzer existiert nicht.", - "ru-RU": "Пользователя с таким именем не существует." - }, - "insufficient_privileges" : { - "en-US": "Insufficient privileges.", - "zh-CN": "权限不足。", - "ja-JP": "権限エラー。", - "de-DE": "Unzureichende Berechtigungen.", - "ru-RU": "Недостаточно прав." - }, - "operation_failed" : { - "en-US": "Operation Failed", - "zh-CN": "操作失败", - "ja-JP": "操作に失敗しました。", - "de-DE": "Befehl fehlgeschlagen", - "ru-RU": "Ошибка при выполнении данной операции" - }, - "button_on" : { - "en-US": "On", - "zh-CN": "打开", - "ja-JP": "オン", - "de-DE": "An", - "ru-RU": "Вкл." - }, - "button_off" : { - "en-US": "Off", - "zh-CN": "关闭", - "ja-JP": "オフ", - "de-DE": "Aus", - "ru-RU": "Откл." - } -}; diff --git a/static/i18n/locale_ru-RU.ini b/static/i18n/locale_ru-RU.ini deleted file mode 100644 index eb5521e0b..000000000 --- a/static/i18n/locale_ru-RU.ini +++ /dev/null @@ -1,89 +0,0 @@ -page_title_index = Harbor -page_title_sign_in = Войти - Harbor -page_title_project = Проект - Harbor -page_title_item_details = Подробнее - Harbor -page_title_registration = Регистрация - Harbor -page_title_add_user = Добавить пользователя - Harbor -page_title_forgot_password = Забыли пароль - Harbor -title_forgot_password = Забыли пароль -page_title_reset_password = Сбросить пароль - Harbor -title_reset_password = Сбросить пароль -page_title_change_password = Поменять пароль - Harbor -title_change_password = Поменять пароль -page_title_search = Поиск - Harbor -sign_in = Войти -sign_up = Регистрация -add_user = Добавить пользователя -log_out = Выйти -search_placeholder = проекты или репозитории -change_password = Сменить Пароль -username_email = Логин/Email -password = Пароль -forgot_password = Забыли пароль -welcome = Добро пожаловать -my_projects = Мои Проекты -public_projects = Общедоступные Проекты -admin_options = Административные Настройки -project_name = Название Проекта -creation_time = Время Создания -publicity = Публичность -add_project = Добавить Проект -check_for_publicity = Публичный проекта -button_save = Сохранить -button_cancel = Отмена -button_submit = Применить -username = Имя пользователя -email = Email -system_admin = Системный администратор -dlg_button_ok = OK -dlg_button_cancel = Отмена -registration = Регистрация -username_description = Ваше имя пользователя. -email_description = Email адрес, который будет использоваться для сброса пароля. -full_name = Полное Имя -full_name_description = Имя и Фамилия. -password_description = Минимум 7 символов, в которых будет присутствовать по меньшей мере 1 буква нижнего регистра, 1 буква верхнего регистра и 1 цифра. -confirm_password = Подтвердить Пароль -note_to_the_admin = Комментарии -old_password = Старый Пароль -new_password = Новый Пароль -forgot_password_description = Введите Email, который вы использовали для регистрации, вам будет выслано письмо для сброса пароля. - -projects = Проекты -repositories = Репозитории -search = Поиск -home = Домой -project = Проект -owner = Владелец -repo = Репозитории -user = Пользователи -logs = Логи -repo_name = Имя Репозитория -repo_tag = Метка -add_members = Добавить Участников -operation = Операция -advance = Расширенный Поиск -all = Все -others = Другие -start_date = Дата Начала -end_date = Дата Окончания -timestamp = Временная метка -role = Роль -reset_email_hint = Нажмите на ссылку ниже для сброса вашего пароля -reset_email_subject = Сброс вашего пароля -language = Русский -language_en-US = English -language_zh-CN = 中文 -language_de-DE = Deutsch -language_ru-RU = Русский -language_ja-JP = 日本語 -copyright = Copyright -all_rights_reserved = Все права защищены. -index_desc = Проект Harbor представляет собой надежный сервер управления docker-образами корпоративного класса. Компании могут использовать данный сервер в своей инфарструктуе для повышения производительности и безопасности . Проект Harbor может использоваться как в среде разработки так и в продуктивной среде. -index_desc_0 = Основные преимущества данного решения: -index_desc_1 = 1. Безопасность: Хранение интеллектуальной собственности внутри организации. -index_desc_2 = 2. Эффективность: сервер хранения docker образов устанавливается в рамках внутренней сети организации, и может значительно сократить расход Интернет траффика -index_desc_3 = 3. Управление доступом: реализована модель RBAC (Ролевая модель управление доступом). Управление пользователями может быть интегрировано с существующими корпоративными сервисами идентификациями такими как AD/LDAP. -index_desc_4 = 4. Аудит: Любой доступ к хранилищу логируется и может быть использован для последующего анализа. -index_desc_5 = 5. GUI-интерфейс: удобная, единая консоль управления. -index_title = Сервер управления docker-образами корпоративного класса diff --git a/static/i18n/locale_zh-CN.ini b/static/i18n/locale_zh-CN.ini deleted file mode 100644 index f5940a9af..000000000 --- a/static/i18n/locale_zh-CN.ini +++ /dev/null @@ -1,89 +0,0 @@ -page_title_index = Harbor -page_title_sign_in = 登录 - Harbor -page_title_project = 项目 - Harbor -page_title_item_details = 详细信息 - Harbor -page_title_registration = 注册 - Harbor -page_title_add_user = 新增用户 - Harbor -page_title_forgot_password = 忘记密码 - Harbor -title_forgot_password = 忘记密码 -page_title_reset_password = 重置密码 - Harbor -title_reset_password = 重置密码 -page_title_change_password = 修改密码 - Harbor -title_change_password = 修改密码 -page_title_search = 搜索 - Harbor -sign_in = 登录 -sign_up = 注册 -add_user = 新增用户 -log_out = 注销 -search_placeholder = 项目或镜像名称 -change_password = 修改密码 -username_email = 用户名/邮箱 -password = 密码 -forgot_password = 忘记密码 -welcome = 欢迎 -my_projects = 我的项目 -public_projects = 公开项目 -admin_options = 管理员选项 -project_name = 项目名称 -creation_time = 创建时间 -publicity = 公开 -add_project = 新建项目 -check_for_publicity = 公开项目 -button_save = 保存 -button_cancel = 取消 -button_submit = 提交 -username = 用户名 -email = 邮箱 -system_admin = 系统管理员 -dlg_button_ok = 确定 -dlg_button_cancel = 取消 -registration = 注册 -username_description = 在此填入登录时的用户名。 -email_description = 此邮箱将用于重置密码。 -full_name = 全名 -full_name_description = 请输入全名。 -password_description = 至少输入 7个字符且包含 1个小写字母, 1个大写字母和 1个数字。 -confirm_password = 确认密码 -note_to_the_admin = 备注 -old_password = 原密码 -new_password = 新密码 -forgot_password_description = 重置邮件将发送到此邮箱。 - -projects = 项目 -repositories = 镜像仓库 -search = 搜索 -home = 首页 -project = 项目 -owner = 所有者 -repo = 镜像仓库 -user = 用户 -logs = 日志 -repo_name = 镜像名称 -repo_tag = 镜像标签 -add_members = 添加成员 -operation = 操作 -advance = 高级检索 -all = 全部 -others = 其他 -start_date = 开始日期 -end_date = 结束日期 -timestamp = 时间戳 -role = 角色 -reset_email_hint = 请点击下面的链接进行重置密码操作 -reset_email_subject = 重置您的密码 -language = 中文 -language_en-US = English -language_zh-CN = 中文 -language_de-DE = Deutsch -language_ru-RU = Русский -language_ja-JP = 日本語 -copyright = 版权所有 -all_rights_reserved = 保留所有权利。 -index_desc = Harbor是可靠的企业级Registry服务器。企业用户可使用Harbor搭建私有容器Registry服务,提高生产效率和安全度,既可应用于生产环境,也可以在开发环境中使用。 -index_desc_0 = 主要优点: -index_desc_1 = 1. 安全: 确保知识产权在自己组织内部的管控之下。 -index_desc_2 = 2. 效率: 搭建组织内部的私有容器Registry服务,可显著降低访问公共Registry服务的网络需求。 -index_desc_3 = 3. 访问控制: 提供基于角色的访问控制,可集成企业目前拥有的用户管理系统(如:AD/LDAP)。 -index_desc_4 = 4. 审计: 所有访问Registry服务的操作均被记录,便于日后审计。 -index_desc_5 = 5. 管理界面: 具有友好易用图形管理界面。 -index_title = 企业级 Registry 服务 diff --git a/static/ng/resources/js/components/repository/delete-repository.controller.js b/static/ng/resources/js/components/repository/delete-repository.controller.js deleted file mode 100644 index 2c80cc717..000000000 --- a/static/ng/resources/js/components/repository/delete-repository.controller.js +++ /dev/null @@ -1,15 +0,0 @@ -(function() { - 'use strict'; - - angular - .module('harbor.repository') - .controller('DeleteRepositoryController', DeleteRepositoryController); - - DeleteRepositoryController.$inject = ['DeleteRepositoryService']; - - function DeleteRepositoryController(DeleteRepositoryService) { - - - } - -})(); \ No newline at end of file diff --git a/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css b/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css deleted file mode 100644 index 63c2a3a07..000000000 --- a/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Datetimepicker for Bootstrap 3 - * version : 4.17.37 - * https://github.com/Eonasdan/bootstrap-datetimepicker/ - */.bootstrap-datetimepicker-widget{list-style:none}.bootstrap-datetimepicker-widget.dropdown-menu{margin:2px 0;padding:4px;width:19em}@media (min-width:768px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:992px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}@media (min-width:1200px){.bootstrap-datetimepicker-widget.dropdown-menu.timepicker-sbs{width:38em}}.bootstrap-datetimepicker-widget.dropdown-menu:before,.bootstrap-datetimepicker-widget.dropdown-menu:after{content:'';display:inline-block;position:absolute}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:before{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,0.2);top:-7px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.bottom:after{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid white;top:-6px;left:8px}.bootstrap-datetimepicker-widget.dropdown-menu.top:before{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #ccc;border-top-color:rgba(0,0,0,0.2);bottom:-7px;left:6px}.bootstrap-datetimepicker-widget.dropdown-menu.top:after{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid white;bottom:-6px;left:7px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:before{left:auto;right:6px}.bootstrap-datetimepicker-widget.dropdown-menu.pull-right:after{left:auto;right:7px}.bootstrap-datetimepicker-widget .list-unstyled{margin:0}.bootstrap-datetimepicker-widget a[data-action]{padding:6px 0}.bootstrap-datetimepicker-widget a[data-action]:active{box-shadow:none}.bootstrap-datetimepicker-widget .timepicker-hour,.bootstrap-datetimepicker-widget .timepicker-minute,.bootstrap-datetimepicker-widget .timepicker-second{width:54px;font-weight:bold;font-size:1.2em;margin:0}.bootstrap-datetimepicker-widget button[data-action]{padding:6px}.bootstrap-datetimepicker-widget .btn[data-action="incrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Hours"}.bootstrap-datetimepicker-widget .btn[data-action="incrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Increment Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="decrementHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Hours"}.bootstrap-datetimepicker-widget .btn[data-action="decrementMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Decrement Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="showHours"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Hours"}.bootstrap-datetimepicker-widget .btn[data-action="showMinutes"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Show Minutes"}.bootstrap-datetimepicker-widget .btn[data-action="togglePeriod"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle AM/PM"}.bootstrap-datetimepicker-widget .btn[data-action="clear"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Clear the picker"}.bootstrap-datetimepicker-widget .btn[data-action="today"]::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Set the date to today"}.bootstrap-datetimepicker-widget .picker-switch{text-align:center}.bootstrap-datetimepicker-widget .picker-switch::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Toggle Date and Time Screens"}.bootstrap-datetimepicker-widget .picker-switch td{padding:0;margin:0;height:auto;width:auto;line-height:inherit}.bootstrap-datetimepicker-widget .picker-switch td span{line-height:2.5;height:2.5em;width:100%}.bootstrap-datetimepicker-widget table{width:100%;margin:0}.bootstrap-datetimepicker-widget table td,.bootstrap-datetimepicker-widget table th{text-align:center;border-radius:4px}.bootstrap-datetimepicker-widget table th{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table th.picker-switch{width:145px}.bootstrap-datetimepicker-widget table th.disabled,.bootstrap-datetimepicker-widget table th.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table th.prev::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Previous Month"}.bootstrap-datetimepicker-widget table th.next::after{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0;content:"Next Month"}.bootstrap-datetimepicker-widget table thead tr:first-child th{cursor:pointer}.bootstrap-datetimepicker-widget table thead tr:first-child th:hover{background:#eee}.bootstrap-datetimepicker-widget table td{height:54px;line-height:54px;width:54px}.bootstrap-datetimepicker-widget table td.cw{font-size:.8em;height:20px;line-height:20px;color:#777}.bootstrap-datetimepicker-widget table td.day{height:20px;line-height:20px;width:20px}.bootstrap-datetimepicker-widget table td.day:hover,.bootstrap-datetimepicker-widget table td.hour:hover,.bootstrap-datetimepicker-widget table td.minute:hover,.bootstrap-datetimepicker-widget table td.second:hover{background:#eee;cursor:pointer}.bootstrap-datetimepicker-widget table td.old,.bootstrap-datetimepicker-widget table td.new{color:#777}.bootstrap-datetimepicker-widget table td.today{position:relative}.bootstrap-datetimepicker-widget table td.today:before{content:'';display:inline-block;border:solid transparent;border-width:0 0 7px 7px;border-bottom-color:#337ab7;border-top-color:rgba(0,0,0,0.2);position:absolute;bottom:4px;right:4px}.bootstrap-datetimepicker-widget table td.active,.bootstrap-datetimepicker-widget table td.active:hover{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td.active.today:before{border-bottom-color:#fff}.bootstrap-datetimepicker-widget table td.disabled,.bootstrap-datetimepicker-widget table td.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget table td span{display:inline-block;width:54px;height:54px;line-height:54px;margin:2px 1.5px;cursor:pointer;border-radius:4px}.bootstrap-datetimepicker-widget table td span:hover{background:#eee}.bootstrap-datetimepicker-widget table td span.active{background-color:#337ab7;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.bootstrap-datetimepicker-widget table td span.old{color:#777}.bootstrap-datetimepicker-widget table td span.disabled,.bootstrap-datetimepicker-widget table td span.disabled:hover{background:none;color:#777;cursor:not-allowed}.bootstrap-datetimepicker-widget.usetwentyfour td.hour{height:27px;line-height:27px}.bootstrap-datetimepicker-widget.wider{width:21em}.bootstrap-datetimepicker-widget .datepicker-decades .decade{line-height:1.8em !important}.input-group.date .input-group-addon{cursor:pointer}.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);border:0} \ No newline at end of file diff --git a/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js b/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js deleted file mode 100644 index db3d085d4..000000000 --- a/static/ng/vendors/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js +++ /dev/null @@ -1,9 +0,0 @@ -/*! version : 4.17.37 - ========================================================= - bootstrap-datetimejs - https://github.com/Eonasdan/bootstrap-datetimepicker - Copyright (c) 2015 Jonathan Peterson - ========================================================= - */ -!function(a){"use strict";if("function"==typeof define&&define.amd)define(["jquery","moment"],a);else if("object"==typeof exports)a(require("jquery"),require("moment"));else{if("undefined"==typeof jQuery)throw"bootstrap-datetimepicker requires jQuery to be loaded first";if("undefined"==typeof moment)throw"bootstrap-datetimepicker requires Moment.js to be loaded first";a(jQuery,moment)}}(function(a,b){"use strict";if(!b)throw new Error("bootstrap-datetimepicker requires Moment.js to be loaded first");var c=function(c,d){var e,f,g,h,i,j,k,l={},m=!0,n=!1,o=!1,p=0,q=[{clsName:"days",navFnc:"M",navStep:1},{clsName:"months",navFnc:"y",navStep:1},{clsName:"years",navFnc:"y",navStep:10},{clsName:"decades",navFnc:"y",navStep:100}],r=["days","months","years","decades"],s=["top","bottom","auto"],t=["left","right","auto"],u=["default","top","bottom"],v={up:38,38:"up",down:40,40:"down",left:37,37:"left",right:39,39:"right",tab:9,9:"tab",escape:27,27:"escape",enter:13,13:"enter",pageUp:33,33:"pageUp",pageDown:34,34:"pageDown",shift:16,16:"shift",control:17,17:"control",space:32,32:"space",t:84,84:"t","delete":46,46:"delete"},w={},x=function(a){var c,e,f,g,h,i=!1;return void 0!==b.tz&&void 0!==d.timeZone&&null!==d.timeZone&&""!==d.timeZone&&(i=!0),void 0===a||null===a?c=i?b().tz(d.timeZone).startOf("d"):b().startOf("d"):i?(e=b().tz(d.timeZone).utcOffset(),f=b(a,j,d.useStrict).utcOffset(),f!==e?(g=b().tz(d.timeZone).format("Z"),h=b(a,j,d.useStrict).format("YYYY-MM-DD[T]HH:mm:ss")+g,c=b(h,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict).tz(d.timeZone)):c=b(a,j,d.useStrict),c},y=function(a){if("string"!=typeof a||a.length>1)throw new TypeError("isEnabled expects a single character string parameter");switch(a){case"y":return-1!==i.indexOf("Y");case"M":return-1!==i.indexOf("M");case"d":return-1!==i.toLowerCase().indexOf("d");case"h":case"H":return-1!==i.toLowerCase().indexOf("h");case"m":return-1!==i.indexOf("m");case"s":return-1!==i.indexOf("s");default:return!1}},z=function(){return y("h")||y("m")||y("s")},A=function(){return y("y")||y("M")||y("d")},B=function(){var b=a("").append(a("").append(a("").addClass("prev").attr("data-action","previous").append(a("").addClass(d.icons.previous))).append(a("").addClass("picker-switch").attr("data-action","pickerSwitch").attr("colspan",d.calendarWeeks?"6":"5")).append(a("").addClass("next").attr("data-action","next").append(a("").addClass(d.icons.next)))),c=a("").append(a("").append(a("").attr("colspan",d.calendarWeeks?"8":"7")));return[a("
").addClass("datepicker-days").append(a("").addClass("table-condensed").append(b).append(a(""))),a("
").addClass("datepicker-months").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone())),a("
").addClass("datepicker-years").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone())),a("
").addClass("datepicker-decades").append(a("
").addClass("table-condensed").append(b.clone()).append(c.clone()))]},C=function(){var b=a(""),c=a(""),e=a("");return y("h")&&(b.append(a("'); - } - $('#' + targetId +' table tbody').append(row.join("")); - $('#' + targetId +' table tbody tr a').on("click", function(e){ - var imageId = $(this).attr("imageId"); - var repoName = $(this).attr("repoName"); - new AjaxUtil({ - url: "/api/repositories/manifests?repo_name=" + repoName + "&tag=" + imageId, - type: "get", - success: function(data, status, xhr){ - if(data){ - for(var i in data){ - if(data[i] == ""){ - data[i] = "N/A"; - } - } - data.Created = moment(new Date(data.Created)).format("YYYY-MM-DD HH:mm:ss"); - $("#dlgModal").dialogModal({"title": i18n.getMessage("image_details"), "content": data}); - } - } - }).exec(); - }); - } - }).exec(); - }); - } - - function needToLoginCallback(){ - - var hasAuthorization = false; - - $.when( - new AjaxUtil({ - url: "/api/projects/" + $("#projectId").val() + "/members/current", - type: "get", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200 && data.roles != null && data.roles.length > 0){ - hasAuthorization = true; - } - } - }).exec()) - .done(function(){ - - if(!hasAuthorization) return false; - - $("#tabItemDetail a:eq(1)").css({"visibility": "visible"}); - $("#tabItemDetail a:eq(2)").css({"visibility": "visible"}); - - $(".glyphicon .glyphicon-pencil", "#tblUser").on("click", function(e){ - $("#txtUserName").hide(); - $("#lblUserName").show(); - $("#dlgUserTitle").text(i18n.getMessage("edit_members")); - }); - - $("#btnAddUser").on("click", function(){ - $("#operationType").val("add"); - $("#spnSearch").show(); - $("#txtUserName").prop("disabled", false) - $("#txtUserName").val(""); - $("#lstRole input[name=chooseRole]:radio").prop("checked", false); - $("#dlgUserTitle").text(i18n.getMessage("add_members")); - }); - - $("#btnSave").on("click", function(){ - - var username = $("#txtUserName").val(); - if($.trim(username).length == 0){ - $("#dlgModal").dialogModal({"title": i18n.getMessage("add_member_failed"), "content": i18n.getMessage("please_input_username")}); - return; - } - var projectId = $("#projectId").val(); - var operationType = $("#operationType").val(); - var userId = $("#editUserId").val(); - - var checkedRole = $("#lstRole input[name='chooseRole']:checked") - if(checkedRole.length == 0){ - $("#dlgModal").dialogModal({"title": i18n.getMessage("add_member_failed"), "content": i18n.getMessage("please_assign_a_role_to_user")}); - return; - } - - var checkedRoleItemList = []; - $.each(checkedRole, function(i, e){ - checkedRoleItemList.push(new Number($(this).val())); - }); - - var ajaxOpts = {}; - if(operationType == "add"){ - ajaxOpts.url = "/api/projects/" + projectId + "/members/"; - ajaxOpts.type = "post"; - ajaxOpts.data = {"roles" : checkedRoleItemList, "username": username}; - }else if(operationType == "edit"){ - ajaxOpts.url = "/api/projects/" + projectId + "/members/" + userId; - ajaxOpts.type = "put"; - ajaxOpts.data = {"roles" : checkedRoleItemList}; - } - - new AjaxUtil({ - url: ajaxOpts.url, - data: ajaxOpts.data, - type: ajaxOpts.type, - complete: function(jqXhr, status){ - if(jqXhr && jqXhr.status == 200){ - $("#btnCancel").trigger("click"); - listUser(null); - } - }, - errors: { - 404: i18n.getMessage("user_id_does_not_exist"), - 409: i18n.getMessage("user_id_exists"), - 403: i18n.getMessage("insufficient_privileges") - } - }).exec(); - }); - - var name_mapping = { - "projectAdmin": "Project Admin", - "developer": "Developer", - "guest": "Guest" - } - - function listUserByProjectCallback(userList){ - var loginedUserId = $("#userId").val(); - var loginedUserRoleId = $("#roleId").val(); - var ownerId = $("#ownerId").val(); - - $("#tblUser tbody tr").remove(); - for(var i = 0; i < userList.length; i++){ - - var userId = userList[i].user_id; - var roleId = userList[i].role_id; - var username = userList[i].username; - - var row = '' + - '' + - '' + - ''; - $("#tblUser tbody").append(row); - - } - } - - function searchAccessLogCallback(LogList){ - $("#tabOperationLog tbody tr").remove(); - $.each(LogList || [], function(i, e){ - $("#tabOperationLog tbody").append( - '' + - '' + - '' + - '' + - '' + - '' + - ''); - }); - } - - function getUserRoleCallback(userId){ - new AjaxUtil({ - url: "/api/projects/" + $("#projectId").val() + "/members/" + userId, - type: "get", - success: function(data, status, xhr){ - var user = data; - $("#operationType").val("edit"); - $("#editUserId").val(user.user_id); - $("#spnSearch").hide(); - $("#txtUserName").val(user.username); - $("#txtUserName").prop("disabled", true); - $("#btnSave").removeClass("disabled"); - $("#dlgUserTitle").text(i18n.getMessage("edit_members")); - $("#lstRole input[name=chooseRole]:radio").not('[value=' + user.role_id + ']').prop("checked", false) - $.each(user.roles, function(i, e){ - $("#lstRole input[name=chooseRole]:radio").filter('[value=' + e.role_id + ']').prop("checked", "checked"); - }); - } - }).exec(); - } - function listUser(username){ - $.when( - new AjaxUtil({ - url: "/api/projects/" + $("#projectId").val() + "/members?username=" + (username == null ? "" : username), - type: "get", - errors: { - 403: "" - }, - success: function(data, status, xhr){ - return data || []; - } - }).exec() - ).done(function(userList){ - listUserByProjectCallback(userList || []); - $("#tblUser .glyphicon-pencil").on("click", function(e){ - var userId = $(this).attr("userid") - getUserRoleCallback(userId); - }); - $("#tblUser .glyphicon-trash").on("click", function(){ - var userId = $(this).attr("userid"); - new AjaxUtil({ - url: "/api/projects/" + $("#projectId").val() + "/members/" + userId, - type: "delete", - complete: function(jqXhr, status){ - if(jqXhr && jqXhr.status == 200){ - listUser(null); - } - } - }).exec(); - }); - }); - } - listUser(null); - listOperationLogs(); - - function listOperationLogs(){ - var projectId = $("#projectId").val(); - - $.when( - new AjaxUtil({ - url : "/api/projects/" + projectId + "/logs/filter", - data: {}, - type: "post", - success: function(data){ - return data || []; - } - }).exec() - ).done(function(operationLogs){ - searchAccessLogCallback(operationLogs); - }); - } - - $("#btnSearchUser").on("click", function(){ - var username = $("#txtSearchUser").val(); - if($.trim(username).length == 0){ - username = null; - } - listUser(username); - }); - - function toUTCSeconds(date, hour, min, sec) { - var t = new Date(date); - t.setHours(hour); - t.setMinutes(min); - t.setSeconds(sec); - var utcTime = new Date(t.getUTCFullYear(), - t.getUTCMonth(), - t.getUTCDate(), - t.getUTCHours(), - t.getUTCMinutes(), - t.getUTCSeconds()); - return utcTime.getTime() / 1000; - } - - $("#btnFilterLog").on("click", function(){ - - var projectId = $("#projectId").val(); - var username = $("#txtSearchUserName").val(); - - var beginTimestamp = 0; - var endTimestamp = 0; - - if($("#begindatepicker").val() != ""){ - beginTimestamp = toUTCSeconds($("#begindatepicker").val(), 0, 0, 0); - } - if($("#enddatepicker").val() != ""){ - endTimestamp = toUTCSeconds($("#enddatepicker").val(), 23, 59, 59); - } - - new AjaxUtil({ - url: "/api/projects/" + projectId + "/logs/filter", - data:{"username":username, "project_id" : Number(projectId), "keywords" : getKeyWords() , "begin_timestamp" : beginTimestamp, "end_timestamp" : endTimestamp}, - type: "post", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - searchAccessLogCallback(data); - } - } - }).exec(); - }); - - $("#spnFilterOption input[name=chkAll]").on("click", function(){ - $("#spnFilterOption input[name=chkOperation]").prop("checked", $(this).prop("checked")); - }); - - $("#spnFilterOption input[name=chkOperation]").on("click", function(){ - if(!$(this).prop("checked")){ - $("#spnFilterOption input[name=chkAll]").prop("checked", false); - } - - var selectedAll = true; - - $("#spnFilterOption input[name=chkOperation]").each(function(i, e){ - if(!$(e).prop("checked")){ - selectedAll = false; - } - }); - - if(selectedAll){ - $("#spnFilterOption input[name=chkAll]").prop("checked", true); - } - }); - - function getKeyWords(){ - var keywords = ""; - var checkedItemList=$("#spnFilterOption input[name=chkOperation]:checked"); - var keywords = []; - $.each(checkedItemList, function(i, e){ - var itemValue = $(e).val(); - if(itemValue == "others" && $.trim($("#txtOthers").val()).length > 0){ - keywords.push($("#txtOthers").val()); - }else{ - keywords.push($(e).val()); - } - }); - return keywords.join("/"); - } - - $('#datetimepicker1').datetimepicker({ - locale: i18n.getLocale(), - ignoreReadonly: true, - format: 'L', - showClear: true - }); - $('#datetimepicker2').datetimepicker({ - locale: i18n.getLocale(), - ignoreReadonly: true, - format: 'L', - showClear: true - }); - }); -} - -$(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#tabItemDetail li:eq(0)").is(":focus") || $("#txtRepoName").is(":focus")){ - $("#btnSearchRepo").trigger("click"); - }else if($("#tabItemDetail li:eq(1)").is(":focus") || $("#txtSearchUser").is(":focus")){ - $("#btnSearchUser").trigger("click"); - }else if($("#tabItemDetail li:eq(2)").is(":focus") || $("#txtSearchUserName").is(":focus")){ - $("#btnFilterLog").trigger("click"); - }else if($("#txtUserName").is(":focus") || $("#lstRole :radio").is(":focus")){ - $("#btnSave").trigger("click"); - } - } -}); -}) \ No newline at end of file diff --git a/static/ng/resources/js/layout/account-setting/account-setting.controller.js b/static/resources/js/layout/account-setting/account-setting.controller.js similarity index 85% rename from static/ng/resources/js/layout/account-setting/account-setting.controller.js rename to static/resources/js/layout/account-setting/account-setting.controller.js index ebd633a5e..c1a1b9812 100644 --- a/static/ng/resources/js/layout/account-setting/account-setting.controller.js +++ b/static/resources/js/layout/account-setting/account-setting.controller.js @@ -22,9 +22,8 @@ vm.changePassword= changePassword; vm.cancel = cancel; - $scope.$on('currentUser', function(e, val) { - vm.user = val; - }); + + vm.user = currentUser.get(); function reset() { vm.hasError = false; @@ -49,19 +48,19 @@ function changePassword(user) { if(user && angular.isDefined(user.oldPassword) && angular.isDefined(user.password)) { - ChangePasswordService(vm.user.UserId, user.oldPassword, user.password) + ChangePasswordService(vm.user.user_id, user.oldPassword, user.password) .success(changePasswordSuccess) .error(changePasswordFailed); } } function changePasswordSuccess(data, status) { - $window.location.href = '/ng/project'; + $window.location.href = '/project'; } function changePasswordFailed(data, status) { console.log('Failed changed password:' + data); - if(data === 'old_password_is_not_correct') { + if(data == 'old_password_is_not_correct') { vm.hasError = true; vm.errorMessage = 'old_password_is_incorrect'; } @@ -71,7 +70,7 @@ if(form) { form.$setPristine(); } - $window.location.href = '/ng/project'; + $window.location.href = '/project'; } } diff --git a/static/ng/resources/js/layout/account-setting/account-setting.module.js b/static/resources/js/layout/account-setting/account-setting.module.js similarity index 100% rename from static/ng/resources/js/layout/account-setting/account-setting.module.js rename to static/resources/js/layout/account-setting/account-setting.module.js diff --git a/static/ng/resources/js/layout/admin-option/admin-option.config.js b/static/resources/js/layout/admin-option/admin-option.config.js similarity index 100% rename from static/ng/resources/js/layout/admin-option/admin-option.config.js rename to static/resources/js/layout/admin-option/admin-option.config.js diff --git a/static/ng/resources/js/layout/admin-option/admin-option.controller.js b/static/resources/js/layout/admin-option/admin-option.controller.js similarity index 100% rename from static/ng/resources/js/layout/admin-option/admin-option.controller.js rename to static/resources/js/layout/admin-option/admin-option.controller.js diff --git a/static/ng/resources/js/layout/admin-option/admin-option.module.js b/static/resources/js/layout/admin-option/admin-option.module.js similarity index 100% rename from static/ng/resources/js/layout/admin-option/admin-option.module.js rename to static/resources/js/layout/admin-option/admin-option.module.js diff --git a/static/ng/resources/js/layout/dashboard/dashboard.controller.js b/static/resources/js/layout/dashboard/dashboard.controller.js similarity index 100% rename from static/ng/resources/js/layout/dashboard/dashboard.controller.js rename to static/resources/js/layout/dashboard/dashboard.controller.js diff --git a/static/ng/resources/js/layout/dashboard/dashboard.module.js b/static/resources/js/layout/dashboard/dashboard.module.js similarity index 100% rename from static/ng/resources/js/layout/dashboard/dashboard.module.js rename to static/resources/js/layout/dashboard/dashboard.module.js diff --git a/static/ng/resources/js/layout/details/details.config.js b/static/resources/js/layout/details/details.config.js similarity index 100% rename from static/ng/resources/js/layout/details/details.config.js rename to static/resources/js/layout/details/details.config.js diff --git a/static/ng/resources/js/layout/details/details.controller.js b/static/resources/js/layout/details/details.controller.js similarity index 100% rename from static/ng/resources/js/layout/details/details.controller.js rename to static/resources/js/layout/details/details.controller.js diff --git a/static/ng/resources/js/layout/details/details.module.js b/static/resources/js/layout/details/details.module.js similarity index 100% rename from static/ng/resources/js/layout/details/details.module.js rename to static/resources/js/layout/details/details.module.js diff --git a/static/ng/resources/js/layout/forgot-password/forgot-password.controller.js b/static/resources/js/layout/forgot-password/forgot-password.controller.js similarity index 96% rename from static/ng/resources/js/layout/forgot-password/forgot-password.controller.js rename to static/resources/js/layout/forgot-password/forgot-password.controller.js index 2742b224d..f4b8027a4 100644 --- a/static/ng/resources/js/layout/forgot-password/forgot-password.controller.js +++ b/static/resources/js/layout/forgot-password/forgot-password.controller.js @@ -31,7 +31,7 @@ } function sendMailSuccess(data, status) { - $window.location.href = '/ng'; + $window.location.href = '/'; } function sendMailFailed(data) { diff --git a/static/ng/resources/js/layout/forgot-password/forgot-password.module.js b/static/resources/js/layout/forgot-password/forgot-password.module.js similarity index 100% rename from static/ng/resources/js/layout/forgot-password/forgot-password.module.js rename to static/resources/js/layout/forgot-password/forgot-password.module.js diff --git a/static/ng/resources/js/layout/header/header.controller.js b/static/resources/js/layout/header/header.controller.js similarity index 100% rename from static/ng/resources/js/layout/header/header.controller.js rename to static/resources/js/layout/header/header.controller.js diff --git a/static/ng/resources/js/layout/header/header.module.js b/static/resources/js/layout/header/header.module.js similarity index 100% rename from static/ng/resources/js/layout/header/header.module.js rename to static/resources/js/layout/header/header.module.js diff --git a/static/ng/resources/js/layout/index/index.controller.js b/static/resources/js/layout/index/index.controller.js similarity index 100% rename from static/ng/resources/js/layout/index/index.controller.js rename to static/resources/js/layout/index/index.controller.js diff --git a/static/ng/resources/js/layout/index/index.module.js b/static/resources/js/layout/index/index.module.js similarity index 100% rename from static/ng/resources/js/layout/index/index.module.js rename to static/resources/js/layout/index/index.module.js diff --git a/static/ng/resources/js/layout/navigation/navigation-admin-options.directive.html b/static/resources/js/layout/navigation/navigation-admin-options.directive.html similarity index 100% rename from static/ng/resources/js/layout/navigation/navigation-admin-options.directive.html rename to static/resources/js/layout/navigation/navigation-admin-options.directive.html diff --git a/static/ng/resources/js/layout/navigation/navigation-admin-options.directive.js b/static/resources/js/layout/navigation/navigation-admin-options.directive.js similarity index 91% rename from static/ng/resources/js/layout/navigation/navigation-admin-options.directive.js rename to static/resources/js/layout/navigation/navigation-admin-options.directive.js index f102afa37..846f9251b 100644 --- a/static/ng/resources/js/layout/navigation/navigation-admin-options.directive.js +++ b/static/resources/js/layout/navigation/navigation-admin-options.directive.js @@ -16,7 +16,7 @@ function navigationAdminOptions() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/layout/navigation/navigation-admin-options.directive.html', + 'templateUrl': '/static/resources/js/layout/navigation/navigation-admin-options.directive.html', 'scope': { 'target': '=' }, diff --git a/static/ng/resources/js/layout/navigation/navigation-details.directive.html b/static/resources/js/layout/navigation/navigation-details.directive.html similarity index 100% rename from static/ng/resources/js/layout/navigation/navigation-details.directive.html rename to static/resources/js/layout/navigation/navigation-details.directive.html diff --git a/static/ng/resources/js/layout/navigation/navigation-details.directive.js b/static/resources/js/layout/navigation/navigation-details.directive.js similarity index 97% rename from static/ng/resources/js/layout/navigation/navigation-details.directive.js rename to static/resources/js/layout/navigation/navigation-details.directive.js index 2bb0ee2c2..a3cb6245e 100644 --- a/static/ng/resources/js/layout/navigation/navigation-details.directive.js +++ b/static/resources/js/layout/navigation/navigation-details.directive.js @@ -23,7 +23,7 @@ function navigationDetails() { var directive = { restrict: 'E', - templateUrl: '/ng/navigation_detail', + templateUrl: '/navigation_detail', link: link, scope: { 'target': '=' diff --git a/static/ng/resources/js/layout/navigation/navigation-header.directive.js b/static/resources/js/layout/navigation/navigation-header.directive.js similarity index 93% rename from static/ng/resources/js/layout/navigation/navigation-header.directive.js rename to static/resources/js/layout/navigation/navigation-header.directive.js index 0a9574c2d..2326c1ba2 100644 --- a/static/ng/resources/js/layout/navigation/navigation-header.directive.js +++ b/static/resources/js/layout/navigation/navigation-header.directive.js @@ -16,7 +16,7 @@ function navigationHeader() { var directive = { restrict: 'E', - templateUrl: '/ng/navigation_header', + templateUrl: '/navigation_header', link: link, scope: true, controller: NavigationHeaderController, @@ -28,7 +28,7 @@ function link(scope, element, attrs, ctrl) { var visited = ctrl.url; - if (visited !== "/ng") { + if (visited !== "") { element.find('a[href*="' + visited + '"]').addClass('active'); } element.find('a').on('click', click); diff --git a/static/ng/resources/js/layout/navigation/navigation.module.js b/static/resources/js/layout/navigation/navigation.module.js similarity index 100% rename from static/ng/resources/js/layout/navigation/navigation.module.js rename to static/resources/js/layout/navigation/navigation.module.js diff --git a/static/ng/resources/js/layout/project/project.controller.js b/static/resources/js/layout/project/project.controller.js similarity index 92% rename from static/ng/resources/js/layout/project/project.controller.js rename to static/resources/js/layout/project/project.controller.js index 095b6eb62..e32d05a1d 100644 --- a/static/ng/resources/js/layout/project/project.controller.js +++ b/static/resources/js/layout/project/project.controller.js @@ -36,8 +36,11 @@ } function getProjectRole(roleId) { - var role = getRole({'key': 'roleId', 'value': roleId}); - return role.name; + if(roleId !== 0) { + var role = getRole({'key': 'roleId', 'value': roleId}); + return role.name; + } + return ''; } function listProjectFailed(e) { diff --git a/static/ng/resources/js/layout/project/project.module.js b/static/resources/js/layout/project/project.module.js similarity index 100% rename from static/ng/resources/js/layout/project/project.module.js rename to static/resources/js/layout/project/project.module.js diff --git a/static/ng/resources/js/layout/reset-password/reset-password.controller.js b/static/resources/js/layout/reset-password/reset-password.controller.js similarity index 97% rename from static/ng/resources/js/layout/reset-password/reset-password.controller.js rename to static/resources/js/layout/reset-password/reset-password.controller.js index 6b8c91e2b..3eb8c2374 100644 --- a/static/ng/resources/js/layout/reset-password/reset-password.controller.js +++ b/static/resources/js/layout/reset-password/reset-password.controller.js @@ -34,7 +34,7 @@ } function resetPasswordSuccess(data, status) { - $window.location.href = '/ng'; + $window.location.href = '/'; } function resetPasswordFailed(data) { diff --git a/static/ng/resources/js/layout/reset-password/reset-password.module.js b/static/resources/js/layout/reset-password/reset-password.module.js similarity index 100% rename from static/ng/resources/js/layout/reset-password/reset-password.module.js rename to static/resources/js/layout/reset-password/reset-password.module.js diff --git a/static/ng/resources/js/layout/search/search.controller.js b/static/resources/js/layout/search/search.controller.js similarity index 100% rename from static/ng/resources/js/layout/search/search.controller.js rename to static/resources/js/layout/search/search.controller.js diff --git a/static/ng/resources/js/layout/search/search.module.js b/static/resources/js/layout/search/search.module.js similarity index 100% rename from static/ng/resources/js/layout/search/search.module.js rename to static/resources/js/layout/search/search.module.js diff --git a/static/ng/resources/js/layout/sign-up/sign-up.controller.js b/static/resources/js/layout/sign-up/sign-up.controller.js similarity index 96% rename from static/ng/resources/js/layout/sign-up/sign-up.controller.js rename to static/resources/js/layout/sign-up/sign-up.controller.js index b8a0165e7..298325543 100644 --- a/static/ng/resources/js/layout/sign-up/sign-up.controller.js +++ b/static/resources/js/layout/sign-up/sign-up.controller.js @@ -30,7 +30,7 @@ function signUpSuccess(data, status) { console.log('Signed up successfully:' + status); alert('Signed up successfully'); - $window.location.href = '/ng'; + $window.location.href = '/'; } function signUpFailed(data, status) { diff --git a/static/ng/resources/js/layout/sign-up/sign-up.module.js b/static/resources/js/layout/sign-up/sign-up.module.js similarity index 100% rename from static/ng/resources/js/layout/sign-up/sign-up.module.js rename to static/resources/js/layout/sign-up/sign-up.module.js diff --git a/static/resources/js/login.js b/static/resources/js/login.js deleted file mode 100644 index 21c0b6cd2..000000000 --- a/static/resources/js/login.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - new AjaxUtil({ - url: "/api/users/current", - type: "get", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - document.location = "/registry/project"; - } - }, - error: function(jqXhr){ - if(jqXhr.status == 401) - return false; - } - }).exec(); - -}); \ No newline at end of file diff --git a/static/resources/js/project.js b/static/resources/js/project.js deleted file mode 100644 index 427aa39dd..000000000 --- a/static/resources/js/project.js +++ /dev/null @@ -1,235 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - new AjaxUtil({ - url: "/api/users/current", - type: "get", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - if(data.has_admin_role == 1) { - renderForAdminRole(); - } - renderForAnyRole(); - } - } - }).exec(); - - function renderForAnyRole(){ - $("#tabProject a:first").tab("show"); - - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#tabProject li:eq(0)").is(":focus") || $("#txtSearchProject").is(":focus")){ - $("#btnSearch").trigger("click"); - }else if($("#tabProject li:eq(1)").is(":focus") || $("#txtSearchPublicProjects").is(":focus")){ - $("#btnSearchPublicProjects").trigger("click"); - }else if($("#tabProject li:eq(1)").is(":focus") || $("#txtSearchUsername").is(":focus")){ - $("#btnSearchUsername").trigger("click"); - }else if($("#dlgAddProject").is(":focus") || $("#projectName").is(":focus")){ - $("#btnSave").trigger("click"); - } - } - }); - - function listProject(projectName, isPublic){ - currentPublic = isPublic; - $.when( - new AjaxUtil({ - url: "/api/projects?is_public=" + isPublic + "&project_name=" + (projectName == null ? "" : projectName) + "×tamp=" + new Date().getTime(), - type: "get", - success: function(data, status, xhr){ - $("#tblProject tbody tr").remove(); - $.each(data || [], function(i, e){ - var row = '' + - '' + - ''; - if(e.public == 1 && e.Togglable){ - row += '' - } else if (e.public == 1) { - row += ''; - } else if (e.public == 0 && e.Togglable) { - row += ''; - } else if (e.public == 0) { - row += ''; - row += ''; - } - $("#tblProject tbody").append(row); - }); - } - }).exec()) - .done(function() { - $("#tblProject tbody tr :button").on("click", function(){ - var projectId = $(this).attr("projectid"); - var self = this; - new AjaxUtil({ - url: "/api/projects/" + projectId, - data: {"public": ($(self).hasClass("btn-success") ? false : true)}, - type: "put", - complete: function(jqXhr, status) { - if($(self).hasClass("btn-success")){ - $(self).removeClass("btn-success").addClass("btn-danger"); - $(self).html(i18n.getMessage("button_off")); - }else{ - $(self).removeClass("btn-danger").addClass("btn-success"); - $(self).html(i18n.getMessage("button_on")); - } - } - }).exec(); - }); - }); - } - listProject(null, 0); - var currentPublic = 0; - - $("#tabProject a:eq(0)").on("click", function(){ - $("#btnAddProject").css({"visibility": "visible"}); - listProject(null, 0); - }); - - $("#tabProject a:eq(1)").on("click", function(){ - $("#btnAddProject").css({"visibility": "hidden"}); - listProject(null, 1); - }); - - $("#divErrMsg").css({"display": "none"}); - validateOptions.Items.push("#projectName"); - - $('#dlgAddProject').on('hide.bs.modal', function () { - $("#divErrMsg").css({"display": "none"}); - $("#projectName").val(""); - $("#projectName").parent().removeClass("has-feedback").removeClass("has-error").removeClass("has-success"); - $("#projectName").siblings("span").removeClass("glyphicon-warning-sign").removeClass("glyphicon-ok"); - }); - $('#dlgAddProject').on('show.bs.modal', function () { - $("#divErrMsg").css({"display": "none"}); - $("#projectName").val(""); - $("#projectName").parent().addClass("has-feedback"); - $("#projectName").siblings("span").removeClass("glyphicon-warning-sign").removeClass("glyphicon-ok"); - $("#isPublic").prop('checked', false); - }); - - $("#btnSave").on("click", function(){ - validateOptions.Validate(function() { - new AjaxUtil({ - url: "/api/projects", - data: {"project_name" : $.trim($("#projectName").val()), "public":$("#isPublic").prop('checked'), "timestamp" : new Date().getTime()}, - type: "post", - errors: { - 409: i18n.getMessage("project_exists") - }, - complete: function(jqXhr, status){ - $("#btnCancel").trigger("click"); - listProject(null, currentPublic); - } - }).exec(); - }); - }); - - $("#btnSearch").on("click", function(){ - var projectName = $("#txtSearchProject").val(); - if($.trim(projectName).length == 0){ - projectName = null; - } - listProject(projectName, currentPublic); - }); - } - - - function renderForAdminRole(){ - $("#liAdminOption").css({"visibility": "visible"}); - $("#tabAdminOption").css({"visibility": "visible"}); - function listUserAdminRole(searchUsername){ - $.when( - new AjaxUtil({ - url: "/api/users?username=" + (searchUsername == null ? "" : searchUsername), - type: "get", - success: function(data){ - $("#tblUser tbody tr").remove(); - $.each(data || [], function(i, e){ - var row = '' + - '' + - ''; - if(e.has_admin_role == 1){ - row += ''; - } else { - row += ''; - } - row += ''; - row += ''; - $("#tblUser tbody").append(row); - }); - } - }).exec() - ).done(function(){ - $("#tblUser tbody tr :button").on("click",function(){ - var userId = $(this).attr("userid"); - var self = this; - new AjaxUtil({ - url: "/api/users/" + userId, - type: "put", - complete: function(jqXhr, status){ - if(jqXhr && jqXhr.status == 200){ - if($(self).hasClass("btn-success")){ - $(self).removeClass("btn-success").addClass("btn-danger"); - $(self).html(i18n.getMessage("button_off")); - }else{ - $(self).removeClass("btn-danger").addClass("btn-success"); - $(self).html(i18n.getMessage("button_on")); - } - } - } - }).exec(); - }); - $("#tblUser tbody tr").on("mouseover", function(e){ - $(".tdDeleteUser", this).css({"visibility":"visible"}); - }).on("mouseout", function(e){ - $(".tdDeleteUser", this).css({"visibility":"hidden"}); - }); - $("#tblUser tbody tr .tdDeleteUser").on("click", function(e){ - var userId = $(this).attr("userid"); - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("delete_user"), - "content": i18n.getMessage("are_you_sure_to_delete_user") + $(this).attr("username") + " ?", - "enableCancel": true, - "callback": function(){ - new AjaxUtil({ - url: "/api/users/" + userId, - type: "delete", - complete: function(jqXhr, status){ - if(jqXhr && jqXhr.status == 200){ - $("#btnSearchUsername").trigger("click"); - } - }, - error: function(jqXhr){} - }).exec(); - } - }); - - }); - }); - } - listUserAdminRole(null); - $("#btnSearchUsername").on("click", function(){ - var username = $("#txtSearchUsername").val(); - if($.trim(username).length == 0){ - username = null; - } - listUserAdminRole(username); - }); - } - }) diff --git a/static/resources/js/register.js b/static/resources/js/register.js deleted file mode 100644 index 397087c01..000000000 --- a/static/resources/js/register.js +++ /dev/null @@ -1,78 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - $("#divErrMsg").css({"display": "none"}); - - $(document).on("keydown", function(e){ - - if(e.keyCode == 13){ - e.preventDefault(); - if(!$("#txtCommonSearch").is(":focus")){ - $("#btnPageSignUp").trigger("click"); - } - } - }); - - $("#Username,#Email,#Realname,#Password,#ConfirmedPassword").on("blur", validateCallback); - validateOptions.Items = ["#Username","#Email","#Realname","#Password","#ConfirmedPassword"]; - - $("#btnPageSignUp").on("click", function(){ - validateOptions.Validate(function() { - var username = $.trim($("#Username").val()); - var email = $.trim($("#Email").val()); - var password = $.trim($("#Password").val()); - var confirmedPassword = $.trim($("#ConfirmedPassword").val()); - var realname = $.trim($("#Realname").val()); - var comment = $.trim($("#Comment").val()); - var isAdmin = $("#isAdmin").val(); - - new AjaxUtil({ - url : "/api/users", - data: {"username": username, "password": password, "realname": realname, "comment": comment, "email": email}, - type: "POST", - beforeSend: function(e){ - $("#btnPageSignUp").prop("disabled", true); - }, - error:function(jqxhr, status, error){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_sign_up"), - "content": i18n.getMessage("internal_error"), - "callback": function(){ - return; - } - }); - }, - complete: function(xhr, status){ - $("#btnPageSignUp").prop("disabled", false); - if(xhr && xhr.status == 201){ - $("#dlgModal") - .dialogModal({ - "title": isAdmin == "true" ? i18n.getMessage("title_add_user") : i18n.getMessage("title_sign_up"), - "content": isAdmin == "true" ? i18n.getMessage("added_user_successfully") : i18n.getMessage("registered_successfully"), - "callback": function(){ - if(isAdmin == "true") { - document.location = "/registry/project"; - }else{ - document.location = "/signIn"; - } - } - }); - } - } - }).exec(); - }); - }); -}); \ No newline at end of file diff --git a/static/resources/js/reset-password.js b/static/resources/js/reset-password.js deleted file mode 100644 index a6c504f48..000000000 --- a/static/resources/js/reset-password.js +++ /dev/null @@ -1,81 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - $("#divErrMsg").css({"display": "none"}); - - $("#Password,#ConfirmedPassword").on("blur", validateCallback); - validateOptions.Items = ["#Password", "#ConfirmedPassword"]; - function bindEnterKey(){ - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - $("#btnSubmit").trigger("click"); - } - }); - } - function unbindEnterKey(){ - $(document).off("keydown"); - } - bindEnterKey(); - - var spinner = new Spinner({scale:1}).spin(); - - $("#btnSubmit").on("click", function(){ - validateOptions.Validate(function(){ - var resetUuid = $("#resetUuid").val(); - var password = $("#Password").val(); - $.ajax({ - "url": "/reset", - "type": "post", - "data": {"reset_uuid": resetUuid, "password": password}, - "beforeSend": function(e){ - unbindEnterKey(); - $("h1").append(spinner.el); - $("#btnSubmit").prop("disabled", true); - }, - "success": function(data, status, xhr){ - if(xhr && xhr.status == 200){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_reset_password"), - "content": i18n.getMessage("reset_password_successfully"), - "callback": function(){ - document.location="/signIn"; - } - }); - } - - }, - "complete": function(){ - spinner.stop(); - $("#btnSubmit").prop("disabled", false); - }, - "error": function(jqXhr, status, error){ - if(jqXhr){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_reset_password"), - "content": i18n.getMessage(jqXhr.responseText), - "callback": function(){ - bindEnterKey(); - return; - } - }); - } - } - }); - }); - }); -}); \ No newline at end of file diff --git a/static/resources/js/search.js b/static/resources/js/search.js deleted file mode 100644 index e0158baa8..000000000 --- a/static/resources/js/search.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#txtCommonSearch").is(":focus")){ - search($("#txtCommonSearch").val()); - } - } - }); - - var queryParam = $("#queryParam").val(); - $("#txtCommonSearch").val(queryParam); - - search(queryParam); - - function search(keyword){ - keyword = $.trim(keyword) - if(keyword.length > 0){ - $.ajax({ - url: "/api/search", - data: {"q": keyword}, - type: "get", - dataType: "json", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - $("#panelCommonSearchProjectsHeader").text(i18n.getMessage("projects") + " (" + data.project.length + ")"); - $("#panelCommonSearchRepositoriesHeader").text(i18n.getMessage("repositories") +" (" + data.repository.length + ")"); - - render($("#panelCommonSearchProjectsBody"), data.project, "project"); - render($("#panelCommonSearchRepositoriesBody"), data.repository, "repository"); - } - } - }); - } - } - - var Project = function(id, name, public){ - this.id = id; - this.name = name; - this.public = public; - } - - function render(element, data, discriminator){ - $(element).children().remove(); - $.each(data, function(i, e){ - var project, description, repoName; - switch(discriminator){ - case "project": - project = new Project(e.id, e.name, e.public); - description = project.name; - repoName = ""; - break; - case "repository": - project = new Project(e.project_id, e.project_name, e.project_public); - description = e.repository_name; - repoName = e.repository_name.substring(e.repository_name.lastIndexOf("/") + 1); - break; - } - if(project){ - $(element).append('
' + description + '
'); - } - }); - } -}); \ No newline at end of file diff --git a/static/ng/resources/js/services/destination/services.create-destination.js b/static/resources/js/services/destination/services.create-destination.js similarity index 100% rename from static/ng/resources/js/services/destination/services.create-destination.js rename to static/resources/js/services/destination/services.create-destination.js diff --git a/static/ng/resources/js/services/destination/services.delete-destination.js b/static/resources/js/services/destination/services.delete-destination.js similarity index 100% rename from static/ng/resources/js/services/destination/services.delete-destination.js rename to static/resources/js/services/destination/services.delete-destination.js diff --git a/static/ng/resources/js/services/destination/services.destination.module.js b/static/resources/js/services/destination/services.destination.module.js similarity index 100% rename from static/ng/resources/js/services/destination/services.destination.module.js rename to static/resources/js/services/destination/services.destination.module.js diff --git a/static/ng/resources/js/services/destination/services.list-destination.js b/static/resources/js/services/destination/services.list-destination.js similarity index 100% rename from static/ng/resources/js/services/destination/services.list-destination.js rename to static/resources/js/services/destination/services.list-destination.js diff --git a/static/ng/resources/js/services/destination/services.ping-destination.js b/static/resources/js/services/destination/services.ping-destination.js similarity index 100% rename from static/ng/resources/js/services/destination/services.ping-destination.js rename to static/resources/js/services/destination/services.ping-destination.js diff --git a/static/ng/resources/js/services/destination/services.update-destination.js b/static/resources/js/services/destination/services.update-destination.js similarity index 100% rename from static/ng/resources/js/services/destination/services.update-destination.js rename to static/resources/js/services/destination/services.update-destination.js diff --git a/static/ng/resources/js/services/i18n/locale_messages_en-US.js b/static/resources/js/services/i18n/locale_messages_en-US.js similarity index 100% rename from static/ng/resources/js/services/i18n/locale_messages_en-US.js rename to static/resources/js/services/i18n/locale_messages_en-US.js diff --git a/static/ng/resources/js/services/i18n/locale_messages_zh-CN.js b/static/resources/js/services/i18n/locale_messages_zh-CN.js similarity index 100% rename from static/ng/resources/js/services/i18n/locale_messages_zh-CN.js rename to static/resources/js/services/i18n/locale_messages_zh-CN.js diff --git a/static/ng/resources/js/services/i18n/services.i18n.js b/static/resources/js/services/i18n/services.i18n.js similarity index 100% rename from static/ng/resources/js/services/i18n/services.i18n.js rename to static/resources/js/services/i18n/services.i18n.js diff --git a/static/ng/resources/js/services/i18n/services.i18n.module.js b/static/resources/js/services/i18n/services.i18n.module.js similarity index 100% rename from static/ng/resources/js/services/i18n/services.i18n.module.js rename to static/resources/js/services/i18n/services.i18n.module.js diff --git a/static/ng/resources/js/services/log/services.list-integrated-log.js b/static/resources/js/services/log/services.list-integrated-log.js similarity index 100% rename from static/ng/resources/js/services/log/services.list-integrated-log.js rename to static/resources/js/services/log/services.list-integrated-log.js diff --git a/static/ng/resources/js/services/log/services.list-log.js b/static/resources/js/services/log/services.list-log.js similarity index 100% rename from static/ng/resources/js/services/log/services.list-log.js rename to static/resources/js/services/log/services.list-log.js diff --git a/static/ng/resources/js/services/log/services.log.module.js b/static/resources/js/services/log/services.log.module.js similarity index 100% rename from static/ng/resources/js/services/log/services.log.module.js rename to static/resources/js/services/log/services.log.module.js diff --git a/static/ng/resources/js/services/project-member/services.add-project-member.js b/static/resources/js/services/project-member/services.add-project-member.js similarity index 94% rename from static/ng/resources/js/services/project-member/services.add-project-member.js rename to static/resources/js/services/project-member/services.add-project-member.js index 3b3b8aedf..0a0265eea 100644 --- a/static/ng/resources/js/services/project-member/services.add-project-member.js +++ b/static/resources/js/services/project-member/services.add-project-member.js @@ -16,7 +16,7 @@ return $http .post('/api/projects/' + projectId + '/members/', { 'roles': [ Number(roles) ], - 'user_name': username + 'username': username }); } diff --git a/static/ng/resources/js/services/project-member/services.current-project-member.js b/static/resources/js/services/project-member/services.current-project-member.js similarity index 100% rename from static/ng/resources/js/services/project-member/services.current-project-member.js rename to static/resources/js/services/project-member/services.current-project-member.js diff --git a/static/ng/resources/js/services/project-member/services.delete-project-member.js b/static/resources/js/services/project-member/services.delete-project-member.js similarity index 100% rename from static/ng/resources/js/services/project-member/services.delete-project-member.js rename to static/resources/js/services/project-member/services.delete-project-member.js diff --git a/static/ng/resources/js/services/project-member/services.edit-project-member.js b/static/resources/js/services/project-member/services.edit-project-member.js similarity index 100% rename from static/ng/resources/js/services/project-member/services.edit-project-member.js rename to static/resources/js/services/project-member/services.edit-project-member.js diff --git a/static/ng/resources/js/services/project-member/services.list-project-member.js b/static/resources/js/services/project-member/services.list-project-member.js similarity index 100% rename from static/ng/resources/js/services/project-member/services.list-project-member.js rename to static/resources/js/services/project-member/services.list-project-member.js diff --git a/static/ng/resources/js/services/project-member/services.project-member.module.js b/static/resources/js/services/project-member/services.project-member.module.js similarity index 100% rename from static/ng/resources/js/services/project-member/services.project-member.module.js rename to static/resources/js/services/project-member/services.project-member.module.js diff --git a/static/ng/resources/js/services/project/services.add-project.js b/static/resources/js/services/project/services.add-project.js similarity index 100% rename from static/ng/resources/js/services/project/services.add-project.js rename to static/resources/js/services/project/services.add-project.js diff --git a/static/ng/resources/js/services/project/services.edit-project.js b/static/resources/js/services/project/services.edit-project.js similarity index 100% rename from static/ng/resources/js/services/project/services.edit-project.js rename to static/resources/js/services/project/services.edit-project.js diff --git a/static/ng/resources/js/services/project/services.get-project-by-id.js b/static/resources/js/services/project/services.get-project-by-id.js similarity index 100% rename from static/ng/resources/js/services/project/services.get-project-by-id.js rename to static/resources/js/services/project/services.get-project-by-id.js diff --git a/static/ng/resources/js/services/project/services.list-project.js b/static/resources/js/services/project/services.list-project.js similarity index 100% rename from static/ng/resources/js/services/project/services.list-project.js rename to static/resources/js/services/project/services.list-project.js diff --git a/static/ng/resources/js/services/project/services.project.module.js b/static/resources/js/services/project/services.project.module.js similarity index 100% rename from static/ng/resources/js/services/project/services.project.module.js rename to static/resources/js/services/project/services.project.module.js diff --git a/static/ng/resources/js/services/project/services.stat-project.js b/static/resources/js/services/project/services.stat-project.js similarity index 100% rename from static/ng/resources/js/services/project/services.stat-project.js rename to static/resources/js/services/project/services.stat-project.js diff --git a/static/ng/resources/js/services/project/services.toggle-project-publicity.js b/static/resources/js/services/project/services.toggle-project-publicity.js similarity index 100% rename from static/ng/resources/js/services/project/services.toggle-project-publicity.js rename to static/resources/js/services/project/services.toggle-project-publicity.js diff --git a/static/ng/resources/js/services/replication-job/services.list-replication-job.js b/static/resources/js/services/replication-job/services.list-replication-job.js similarity index 83% rename from static/ng/resources/js/services/replication-job/services.list-replication-job.js rename to static/resources/js/services/replication-job/services.list-replication-job.js index 79b5de1b6..6a5bbd34d 100644 --- a/static/ng/resources/js/services/replication-job/services.list-replication-job.js +++ b/static/resources/js/services/replication-job/services.list-replication-job.js @@ -12,12 +12,12 @@ return listReplicationJob; - function listReplicationJob(policyId, name) { + function listReplicationJob(policyId, repository) { return $http .get('/api/jobs/replication/', { 'params': { 'policy_id': policyId, - 'name': name + 'repository': repository } }); } diff --git a/static/ng/resources/js/services/replication-job/services.replication-job.module.js b/static/resources/js/services/replication-job/services.replication-job.module.js similarity index 100% rename from static/ng/resources/js/services/replication-job/services.replication-job.module.js rename to static/resources/js/services/replication-job/services.replication-job.module.js diff --git a/static/ng/resources/js/services/replication-policy/services.create-replication-policy.js b/static/resources/js/services/replication-policy/services.create-replication-policy.js similarity index 100% rename from static/ng/resources/js/services/replication-policy/services.create-replication-policy.js rename to static/resources/js/services/replication-policy/services.create-replication-policy.js diff --git a/static/ng/resources/js/services/replication-policy/services.list-replication-policy.js b/static/resources/js/services/replication-policy/services.list-replication-policy.js similarity index 100% rename from static/ng/resources/js/services/replication-policy/services.list-replication-policy.js rename to static/resources/js/services/replication-policy/services.list-replication-policy.js diff --git a/static/ng/resources/js/services/replication-policy/services.replication-policy.module.js b/static/resources/js/services/replication-policy/services.replication-policy.module.js similarity index 100% rename from static/ng/resources/js/services/replication-policy/services.replication-policy.module.js rename to static/resources/js/services/replication-policy/services.replication-policy.module.js diff --git a/static/ng/resources/js/services/replication-policy/services.toggle-replication-policy.js b/static/resources/js/services/replication-policy/services.toggle-replication-policy.js similarity index 100% rename from static/ng/resources/js/services/replication-policy/services.toggle-replication-policy.js rename to static/resources/js/services/replication-policy/services.toggle-replication-policy.js diff --git a/static/ng/resources/js/services/replication-policy/services.update-replication-policy.js b/static/resources/js/services/replication-policy/services.update-replication-policy.js similarity index 100% rename from static/ng/resources/js/services/replication-policy/services.update-replication-policy.js rename to static/resources/js/services/replication-policy/services.update-replication-policy.js diff --git a/static/ng/resources/js/services/repository/services.delete-repository.js b/static/resources/js/services/repository/services.delete-repository.js similarity index 100% rename from static/ng/resources/js/services/repository/services.delete-repository.js rename to static/resources/js/services/repository/services.delete-repository.js diff --git a/static/ng/resources/js/services/repository/services.list-manifest.js b/static/resources/js/services/repository/services.list-manifest.js similarity index 100% rename from static/ng/resources/js/services/repository/services.list-manifest.js rename to static/resources/js/services/repository/services.list-manifest.js diff --git a/static/ng/resources/js/services/repository/services.list-repository.js b/static/resources/js/services/repository/services.list-repository.js similarity index 100% rename from static/ng/resources/js/services/repository/services.list-repository.js rename to static/resources/js/services/repository/services.list-repository.js diff --git a/static/ng/resources/js/services/repository/services.list-tag.js b/static/resources/js/services/repository/services.list-tag.js similarity index 100% rename from static/ng/resources/js/services/repository/services.list-tag.js rename to static/resources/js/services/repository/services.list-tag.js diff --git a/static/ng/resources/js/services/repository/services.list-top-repository.js b/static/resources/js/services/repository/services.list-top-repository.js similarity index 100% rename from static/ng/resources/js/services/repository/services.list-top-repository.js rename to static/resources/js/services/repository/services.list-top-repository.js diff --git a/static/ng/resources/js/services/repository/services.repository.module.js b/static/resources/js/services/repository/services.repository.module.js similarity index 100% rename from static/ng/resources/js/services/repository/services.repository.module.js rename to static/resources/js/services/repository/services.repository.module.js diff --git a/static/ng/resources/js/services/search/services.search.js b/static/resources/js/services/search/services.search.js similarity index 100% rename from static/ng/resources/js/services/search/services.search.js rename to static/resources/js/services/search/services.search.js diff --git a/static/ng/resources/js/services/search/services.search.module.js b/static/resources/js/services/search/services.search.module.js similarity index 100% rename from static/ng/resources/js/services/search/services.search.module.js rename to static/resources/js/services/search/services.search.module.js diff --git a/static/ng/resources/js/services/user/services.change-password.js b/static/resources/js/services/user/services.change-password.js similarity index 100% rename from static/ng/resources/js/services/user/services.change-password.js rename to static/resources/js/services/user/services.change-password.js diff --git a/static/ng/resources/js/services/user/services.current-user.js b/static/resources/js/services/user/services.current-user.js similarity index 100% rename from static/ng/resources/js/services/user/services.current-user.js rename to static/resources/js/services/user/services.current-user.js diff --git a/static/ng/resources/js/services/user/services.delete-user.js b/static/resources/js/services/user/services.delete-user.js similarity index 100% rename from static/ng/resources/js/services/user/services.delete-user.js rename to static/resources/js/services/user/services.delete-user.js diff --git a/static/ng/resources/js/services/user/services.is-admin.js b/static/resources/js/services/user/services.is-admin.js similarity index 100% rename from static/ng/resources/js/services/user/services.is-admin.js rename to static/resources/js/services/user/services.is-admin.js diff --git a/static/ng/resources/js/services/user/services.list-user.js b/static/resources/js/services/user/services.list-user.js similarity index 100% rename from static/ng/resources/js/services/user/services.list-user.js rename to static/resources/js/services/user/services.list-user.js diff --git a/static/ng/resources/js/services/user/services.log-out.js b/static/resources/js/services/user/services.log-out.js similarity index 90% rename from static/ng/resources/js/services/user/services.log-out.js rename to static/resources/js/services/user/services.log-out.js index 0f639851a..448c955a2 100644 --- a/static/ng/resources/js/services/user/services.log-out.js +++ b/static/resources/js/services/user/services.log-out.js @@ -12,7 +12,7 @@ return logOut; function logOut() { return $http - .get('/ng/log_out'); + .get('/log_out'); } } diff --git a/static/ng/resources/js/services/user/services.reset-password.js b/static/resources/js/services/user/services.reset-password.js similarity index 100% rename from static/ng/resources/js/services/user/services.reset-password.js rename to static/resources/js/services/user/services.reset-password.js diff --git a/static/ng/resources/js/services/user/services.send-mail.js b/static/resources/js/services/user/services.send-mail.js similarity index 92% rename from static/ng/resources/js/services/user/services.send-mail.js rename to static/resources/js/services/user/services.send-mail.js index 4ebe6cbbd..3c7bf8796 100644 --- a/static/ng/resources/js/services/user/services.send-mail.js +++ b/static/resources/js/services/user/services.send-mail.js @@ -14,7 +14,7 @@ function SendMail(email) { return $http - .get('/ng/sendEmail', { + .get('/sendEmail', { 'params': { 'email': email } diff --git a/static/ng/resources/js/services/user/services.sign-in.js b/static/resources/js/services/user/services.sign-in.js similarity index 100% rename from static/ng/resources/js/services/user/services.sign-in.js rename to static/resources/js/services/user/services.sign-in.js diff --git a/static/ng/resources/js/services/user/services.sign-up.js b/static/resources/js/services/user/services.sign-up.js similarity index 100% rename from static/ng/resources/js/services/user/services.sign-up.js rename to static/resources/js/services/user/services.sign-up.js diff --git a/static/ng/resources/js/services/user/services.toggle-admin.js b/static/resources/js/services/user/services.toggle-admin.js similarity index 67% rename from static/ng/resources/js/services/user/services.toggle-admin.js rename to static/resources/js/services/user/services.toggle-admin.js index cb90d5af5..290cac4a5 100644 --- a/static/ng/resources/js/services/user/services.toggle-admin.js +++ b/static/resources/js/services/user/services.toggle-admin.js @@ -12,9 +12,11 @@ return toggleAdmin; - function toggleAdmin(userId) { + function toggleAdmin(userId, enabled) { return $http - .put('/api/users/' + userId); + .put('/api/users/' + userId + '/sysadmin', { + 'has_admin_role' : enabled + }); } } diff --git a/static/ng/resources/js/services/user/services.user-exist.js b/static/resources/js/services/user/services.user-exist.js similarity index 100% rename from static/ng/resources/js/services/user/services.user-exist.js rename to static/resources/js/services/user/services.user-exist.js diff --git a/static/ng/resources/js/services/user/services.user.module.js b/static/resources/js/services/user/services.user.module.js similarity index 100% rename from static/ng/resources/js/services/user/services.user.module.js rename to static/resources/js/services/user/services.user.module.js diff --git a/static/ng/resources/js/session/session.current-user.js b/static/resources/js/session/session.current-user.js similarity index 84% rename from static/ng/resources/js/session/session.current-user.js rename to static/resources/js/session/session.current-user.js index e50406cb9..04b8dbbbb 100644 --- a/static/ng/resources/js/session/session.current-user.js +++ b/static/resources/js/session/session.current-user.js @@ -25,18 +25,18 @@ function getCurrentUserFailed(e){ var url = location.pathname; var exclusions = [ - '/ng', - '/ng/forgot_password', - '/ng/sign_up', - '/ng/reset_password', - '/ng/search' + '/', + '/forgot_password', + '/sign_up', + '/reset_password', + '/search' ]; for(var i = 0; i < exclusions.length; i++) { if(exclusions[i]===url) { return; } } - $window.location.href = '/ng'; + $window.location.href = '/'; } } diff --git a/static/ng/resources/js/session/session.module.js b/static/resources/js/session/session.module.js similarity index 100% rename from static/ng/resources/js/session/session.module.js rename to static/resources/js/session/session.module.js diff --git a/static/resources/js/sign-in.js b/static/resources/js/sign-in.js deleted file mode 100644 index 2aaa24c5f..000000000 --- a/static/resources/js/sign-in.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - new AjaxUtil({ - url: "/api/users/current", - type: "get", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - document.location = "/registry/project"; - } - }, - error: function(jqxhr){ - return false; - } - }).exec(); - - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#Principal").is(":focus") || $("#Password").is(":focus") || $("#btnPageSignIn").is(":focus")){ - $("#btnPageSignIn").trigger("click"); - } - } - }); - $("#btnForgot").on("click", function(){ - document.location = "/forgotPassword"; - }); - - $("#btnPageSignIn").on("click", function(){ - - var principal = $.trim($("#Principal").val()); - var password = $.trim($("#Password").val()); - - if($.trim(principal).length <= 0 || $.trim(password).length <= 0) { - $("#dlgModal").dialogModal({"title": i18n.getMessage("title_login_failed"), "content": i18n.getMessage("input_your_username_and_password")}); - return; - } - - $.ajax({ - url:'/login', - data: {principal: principal, password: password}, - type: "post", - success: function(jqXhr, status){ - var lastUri = location.search; - if(lastUri != "" && lastUri.indexOf("=") > 0){ - document.location = decodeURIComponent(lastUri.split("=")[1]); - }else{ - document.location = "/registry/project"; - } - }, - error: function(jqXhr){ - var i18nKey = ""; - if(jqXhr.status == 500){ - i18nKey = "internal_error"; - }else{ - i18nKey = "check_your_username_or_password" - } - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_login_failed"), - "content": i18n.getMessage(i18nKey) - }); - } - }); - }); -}); \ No newline at end of file diff --git a/static/resources/js/validate-options.js b/static/resources/js/validate-options.js deleted file mode 100644 index 492366ca7..000000000 --- a/static/resources/js/validate-options.js +++ /dev/null @@ -1,183 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -var validateOptions = { - "Result" : [], - "Items" : [], - "Validate": function(callback){ - for(var i = 0; i < this.Items.length; i++){ - if(validateCallback(this.Items[i]) == false){ - return false; - } - } - callback(); - }, - "Username" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("username_is_required")}, - "CheckExist": { "value" : function(value){ - var result = true; - $.ajax({ - url: "/userExists", - data: {"target": "username", "value" : value}, - dataType: "json", - type: "post", - async: false, - success: function(data){ - result = data; - } - }); - return result; - }, "errMsg" : i18n.getMessage("username_has_been_taken")}, - "MaxLength": {"value" : 20, "errMsg" : i18n.getMessage("username_is_too_long")}, - "IllegalChar": {"value": [",","~","#", "$", "%"] , "errMsg": i18n.getMessage("username_contains_illegal_chars")} - }, - "Email" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("email_is_required")}, - "RegExp": {"value": /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, - "errMsg": i18n.getMessage("email_contains_illegal_chars")}, - "CheckExist": { "value" : function(value){ - var result = true; - $.ajax({ - url: "/userExists", - data: {"target": "email", "value": value}, - dataType: "json", - type: "post", - async: false, - success: function(data){ - result = data; - } - }); - return result; - }, "errMsg" : i18n.getMessage("email_has_been_taken")} - }, - "EmailF" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("email_is_required")}, - "RegExp": {"value": /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, - "errMsg": i18n.getMessage("email_content_illegal")}, - "CheckIfNotExist": { "value" : function(value){ - var result = true; - $.ajax({ - url: "/userExists", - data: {"target": "email", "value": value}, - dataType: "json", - type: "post", - async: false, - success: function(data){ - result = data; - } - }); - return result; - }, "errMsg" : i18n.getMessage("email_does_not_exist")} - }, - "Realname" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("realname_is_required")}, - "MaxLength": {"value" : 20, "errMsg" : i18n.getMessage("realname_is_too_long")}, - "IllegalChar": {"value": [",","~","#", "$", "%"] , "errMsg": i18n.getMessage("realname_contains_illegal_chars")} - }, - "OldPassword" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("password_is_required")} - }, - "Password" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("password_is_required")}, - "RegExp": {"value" : /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{7,20}$/, "errMsg" : i18n.getMessage("password_is_invalid")}, - "MaxLength": {"value" : 20, "errMsg" : i18n.getMessage("password_is_too_long")} - }, - "ConfirmedPassword" :{ - "CompareWith": {"value" : "#Password", "errMsg" : i18n.getMessage("password_does_not_match")}, - "RegExp": {"value" : /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*\s).{7,20}$/, "errMsg" : i18n.getMessage("password_is_invalid")} - }, - "Comment" :{ - "MaxLength": {"value" : 20, "errMsg" : i18n.getMessage("comment_is_too_long")}, - "IllegalChar": {"value": [",","~","#", "$", "%"] , "errMsg": i18n.getMessage("comment_contains_illegal_chars")} - }, - "projectName" :{ - "Required": { "value" : true, "errMsg" : i18n.getMessage("project_name_is_required")}, - "MinLength": {"value" : 4, "errMsg" : i18n.getMessage("project_name_is_too_short")}, - "MaxLength": {"value" : 30, "errMsg" : i18n.getMessage("project_name_is_too_long")}, - "IllegalChar": {"value": ["~","$","-", "\\", "[", "]", "{", "}", "(", ")", "&", "^", "%", "*", "<", ">", "\"", "'","/","?","@"] , "errMsg": i18n.getMessage("project_name_contains_illegal_chars")} - } -}; -function validateCallback(target){ - - if (typeof target != "string"){ - target = this; - } - - var isValid = true; - var inputValue = $.trim($(target).val()); - var currentId = $(target).attr("id"); - var validateItem = validateOptions[currentId]; - - var errMsg = ""; - - for(var checkTitle in validateItem){ - - var checkValue = validateItem[checkTitle].value; - - if(checkTitle == "Required" && checkValue && inputValue.length == 0){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "CheckOldPasswordIsCorrect" && checkValue(inputValue) == false){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "CheckExist" && checkValue(inputValue) == true){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "CheckIfNotExist" && checkValue(inputValue) == false){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "RegExp" && checkValue.test(inputValue) == false){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "MinLength" && inputValue.length < checkValue){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "MaxLength" && inputValue.length > checkValue){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "CompareWith" && $.trim($(checkValue).val()).length > 0 && inputValue != $.trim($(checkValue).val())){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - break; - }else if(checkTitle == "IllegalChar"){ - for(var i = 0; i < checkValue.length; i++){ - if(inputValue.indexOf(checkValue[i]) > -1){ - isValid = false; - errMsg = validateItem[checkTitle].errMsg; - } - } - break; - } - } - - if(isValid == false){ - $(target).parent().removeClass("has-success").addClass("has-error"); - $(target).siblings("span").removeClass("glyphicon-ok").addClass("glyphicon-warning-sign"); - $("#divErrMsg").css({"display": "block"}); - $("#divErrMsg").text(errMsg); - }else { - $(target).parent().removeClass("has-error").addClass("has-success"); - $(target).siblings("span").removeClass("glyphicon-warning-sign").addClass("glyphicon-ok"); - $("#divErrMsg").css({"display": "none"}); - } - validateOptions.Result.push(isValid); - return isValid; -} \ No newline at end of file diff --git a/static/ng/vendors/angularjs/angular-cookies.js b/static/vendors/angularjs/angular-cookies.js similarity index 100% rename from static/ng/vendors/angularjs/angular-cookies.js rename to static/vendors/angularjs/angular-cookies.js diff --git a/static/ng/vendors/angularjs/angular-messages.js b/static/vendors/angularjs/angular-messages.js similarity index 100% rename from static/ng/vendors/angularjs/angular-messages.js rename to static/vendors/angularjs/angular-messages.js diff --git a/static/ng/vendors/angularjs/angular-resource.js b/static/vendors/angularjs/angular-resource.js similarity index 100% rename from static/ng/vendors/angularjs/angular-resource.js rename to static/vendors/angularjs/angular-resource.js diff --git a/static/ng/vendors/angularjs/angular-route.js b/static/vendors/angularjs/angular-route.js similarity index 100% rename from static/ng/vendors/angularjs/angular-route.js rename to static/vendors/angularjs/angular-route.js diff --git a/static/ng/vendors/angularjs/angular.js b/static/vendors/angularjs/angular.js similarity index 100% rename from static/ng/vendors/angularjs/angular.js rename to static/vendors/angularjs/angular.js diff --git a/static/ng/vendors/jquery/jquery-1.12.3.js b/static/vendors/jquery/jquery-1.12.3.js similarity index 100% rename from static/ng/vendors/jquery/jquery-1.12.3.js rename to static/vendors/jquery/jquery-1.12.3.js diff --git a/static/vendors/spinner.min.js b/static/vendors/spinner.min.js deleted file mode 100644 index bd3ae4f4e..000000000 --- a/static/vendors/spinner.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// http://spin.js.org/#v2.3.2 -!function(a,b){"object"==typeof module&&module.exports?module.exports=b():"function"==typeof define&&define.amd?define(b):a.Spinner=b()}(this,function(){"use strict";function a(a,b){var c,d=document.createElement(a||"div");for(c in b)d[c]=b[c];return d}function b(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function c(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=j.substring(0,j.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return m[e]||(k.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",k.cssRules.length),m[e]=1),e}function d(a,b){var c,d,e=a.style;if(b=b.charAt(0).toUpperCase()+b.slice(1),void 0!==e[b])return b;for(d=0;d',c)}k.addRule(".spin-vml","behavior:url(#default#VML)"),h.prototype.lines=function(a,d){function f(){return e(c("group",{coordsize:k+" "+k,coordorigin:-j+" "+-j}),{width:k,height:k})}function h(a,h,i){b(m,b(e(f(),{rotation:360/d.lines*a+"deg",left:~~h}),b(e(c("roundrect",{arcsize:d.corners}),{width:j,height:d.scale*d.width,left:d.scale*d.radius,top:-d.scale*d.width>>1,filter:i}),c("fill",{color:g(d.color,a),opacity:d.opacity}),c("stroke",{opacity:0}))))}var i,j=d.scale*(d.length+d.width),k=2*d.scale*j,l=-(d.width+d.length)*d.scale*2+"px",m=e(f(),{position:"absolute",top:l,left:l});if(d.shadow)for(i=1;i<=d.lines;i++)h(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=d.lines;i++)h(i);return b(a,m)},h.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d>1)+"px"})}for(var i,k=0,l=(f.lines-1)*(1-f.direction)/2;k
-
+
").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementHour}).addClass("btn").attr("data-action","incrementHours").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-hour").attr({"data-time-component":"hours",title:d.tooltips.pickHour}).attr("data-action","showHours"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementHour}).addClass("btn").attr("data-action","decrementHours").append(a("").addClass(d.icons.down))))),y("m")&&(y("h")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementMinute}).addClass("btn").attr("data-action","incrementMinutes").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-minute").attr({"data-time-component":"minutes",title:d.tooltips.pickMinute}).attr("data-action","showMinutes"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementMinute}).addClass("btn").attr("data-action","decrementMinutes").append(a("").addClass(d.icons.down))))),y("s")&&(y("m")&&(b.append(a("").addClass("separator")),c.append(a("").addClass("separator").html(":")),e.append(a("").addClass("separator"))),b.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.incrementSecond}).addClass("btn").attr("data-action","incrementSeconds").append(a("").addClass(d.icons.up)))),c.append(a("").append(a("").addClass("timepicker-second").attr({"data-time-component":"seconds",title:d.tooltips.pickSecond}).attr("data-action","showSeconds"))),e.append(a("").append(a("").attr({href:"#",tabindex:"-1",title:d.tooltips.decrementSecond}).addClass("btn").attr("data-action","decrementSeconds").append(a("").addClass(d.icons.down))))),h||(b.append(a("").addClass("separator")),c.append(a("").append(a("").addClass("separator"))),a("
").addClass("timepicker-picker").append(a("").addClass("table-condensed").append([b,c,e]))},D=function(){var b=a("
").addClass("timepicker-hours").append(a("
").addClass("table-condensed")),c=a("
").addClass("timepicker-minutes").append(a("
").addClass("table-condensed")),d=a("
").addClass("timepicker-seconds").append(a("
").addClass("table-condensed")),e=[C()];return y("h")&&e.push(b),y("m")&&e.push(c),y("s")&&e.push(d),e},E=function(){var b=[];return d.showTodayButton&&b.push(a(" - + + - + +
").append(a("").attr({"data-action":"today",title:d.tooltips.today}).append(a("").addClass(d.icons.today)))),!d.sideBySide&&A()&&z()&&b.push(a("").append(a("").attr({"data-action":"togglePicker",title:d.tooltips.selectTime}).append(a("").addClass(d.icons.time)))),d.showClear&&b.push(a("").append(a("").attr({"data-action":"clear",title:d.tooltips.clear}).append(a("").addClass(d.icons.clear)))),d.showClose&&b.push(a("").append(a("").attr({"data-action":"close",title:d.tooltips.close}).append(a("").addClass(d.icons.close)))),a("").addClass("table-condensed").append(a("").append(a("").append(b)))},F=function(){var b=a("
").addClass("bootstrap-datetimepicker-widget dropdown-menu"),c=a("
").addClass("datepicker").append(B()),e=a("
").addClass("timepicker").append(D()),f=a("
    ").addClass("list-unstyled"),g=a("
  • ").addClass("picker-switch"+(d.collapse?" accordion-toggle":"")).append(E());return d.inline&&b.removeClass("dropdown-menu"),h&&b.addClass("usetwentyfour"),y("s")&&!h&&b.addClass("wider"),d.sideBySide&&A()&&z()?(b.addClass("timepicker-sbs"),"top"===d.toolbarPlacement&&b.append(g),b.append(a("
    ").addClass("row").append(c.addClass("col-md-6")).append(e.addClass("col-md-6"))),"bottom"===d.toolbarPlacement&&b.append(g),b):("top"===d.toolbarPlacement&&f.append(g),A()&&f.append(a("
  • ").addClass(d.collapse&&z()?"collapse in":"").append(c)),"default"===d.toolbarPlacement&&f.append(g),z()&&f.append(a("
  • ").addClass(d.collapse&&A()?"collapse":"").append(e)),"bottom"===d.toolbarPlacement&&f.append(g),b.append(f))},G=function(){var b,e={};return b=c.is("input")||d.inline?c.data():c.find("input").data(),b.dateOptions&&b.dateOptions instanceof Object&&(e=a.extend(!0,e,b.dateOptions)),a.each(d,function(a){var c="date"+a.charAt(0).toUpperCase()+a.slice(1);void 0!==b[c]&&(e[a]=b[c])}),e},H=function(){var b,e=(n||c).position(),f=(n||c).offset(),g=d.widgetPositioning.vertical,h=d.widgetPositioning.horizontal;if(d.widgetParent)b=d.widgetParent.append(o);else if(c.is("input"))b=c.after(o).parent();else{if(d.inline)return void(b=c.append(o));b=c,c.children().first().after(o)}if("auto"===g&&(g=f.top+1.5*o.height()>=a(window).height()+a(window).scrollTop()&&o.height()+c.outerHeight()a(window).width()?"right":"left"),"top"===g?o.addClass("top").removeClass("bottom"):o.addClass("bottom").removeClass("top"),"right"===h?o.addClass("pull-right"):o.removeClass("pull-right"),"relative"!==b.css("position")&&(b=b.parents().filter(function(){return"relative"===a(this).css("position")}).first()),0===b.length)throw new Error("datetimepicker component should be placed within a relative positioned container");o.css({top:"top"===g?"auto":e.top+c.outerHeight(),bottom:"top"===g?e.top+c.outerHeight():"auto",left:"left"===h?b===c?0:e.left:"auto",right:"left"===h?"auto":b.outerWidth()-c.outerWidth()-(b===c?0:e.left)})},I=function(a){"dp.change"===a.type&&(a.date&&a.date.isSame(a.oldDate)||!a.date&&!a.oldDate)||c.trigger(a)},J=function(a){"y"===a&&(a="YYYY"),I({type:"dp.update",change:a,viewDate:f.clone()})},K=function(a){o&&(a&&(k=Math.max(p,Math.min(3,k+a))),o.find(".datepicker > div").hide().filter(".datepicker-"+q[k].clsName).show())},L=function(){var b=a("
"),c=f.clone().startOf("w").startOf("d");for(d.calendarWeeks===!0&&b.append(a(""),d.calendarWeeks&&c.append('"),k.push(c)),g="",b.isBefore(f,"M")&&(g+=" old"),b.isAfter(f,"M")&&(g+=" new"),b.isSame(e,"d")&&!m&&(g+=" active"),Q(b,"d")||(g+=" disabled"),b.isSame(x(),"d")&&(g+=" today"),(0===b.day()||6===b.day())&&(g+=" weekend"),c.append('"),b.add(1,"d");i.find("tbody").empty().append(k),S(),T(),U()}},W=function(){var b=o.find(".timepicker-hours table"),c=f.clone().startOf("d"),d=[],e=a("");for(f.hour()>11&&!h&&c.hour(12);c.isSame(f,"d")&&(h||f.hour()<12&&c.hour()<12||f.hour()>11);)c.hour()%4===0&&(e=a(""),d.push(e)),e.append('"),c.add(1,"h");b.empty().append(d)},X=function(){for(var b=o.find(".timepicker-minutes table"),c=f.clone().startOf("h"),e=[],g=a(""),h=1===d.stepping?5:d.stepping;f.isSame(c,"h");)c.minute()%(4*h)===0&&(g=a(""),e.push(g)),g.append('"),c.add(h,"m");b.empty().append(e)},Y=function(){for(var b=o.find(".timepicker-seconds table"),c=f.clone().startOf("m"),d=[],e=a("");f.isSame(c,"m");)c.second()%20===0&&(e=a(""),d.push(e)),e.append('"),c.add(5,"s");b.empty().append(d)},Z=function(){var a,b,c=o.find(".timepicker span[data-time-component]");h||(a=o.find(".timepicker [data-action=togglePeriod]"),b=e.clone().add(e.hours()>=12?-12:12,"h"),a.text(e.format("A")),Q(b,"h")?a.removeClass("disabled"):a.addClass("disabled")),c.filter("[data-time-component=hours]").text(e.format(h?"HH":"hh")),c.filter("[data-time-component=minutes]").text(e.format("mm")),c.filter("[data-time-component=seconds]").text(e.format("ss")),W(),X(),Y()},$=function(){o&&(V(),Z())},_=function(a){var b=m?null:e;return a?(a=a.clone().locale(d.locale),1!==d.stepping&&a.minutes(Math.round(a.minutes()/d.stepping)*d.stepping%60).seconds(0),void(Q(a)?(e=a,f=e.clone(),g.val(e.format(i)),c.data("date",e.format(i)),m=!1,$(),I({type:"dp.change",date:e.clone(),oldDate:b})):(d.keepInvalid||g.val(m?"":e.format(i)),I({type:"dp.error",date:a})))):(m=!0,g.val(""),c.data("date",""),I({type:"dp.change",date:!1,oldDate:b}),void $())},aa=function(){var b=!1;return o?(o.find(".collapse").each(function(){var c=a(this).data("collapse");return c&&c.transitioning?(b=!0,!1):!0}),b?l:(n&&n.hasClass("btn")&&n.toggleClass("active"),o.hide(),a(window).off("resize",H),o.off("click","[data-action]"),o.off("mousedown",!1),o.remove(),o=!1,I({type:"dp.hide",date:e.clone()}),g.blur(),l)):l},ba=function(){_(null)},ca={next:function(){var a=q[k].navFnc;f.add(q[k].navStep,a),V(),J(a)},previous:function(){var a=q[k].navFnc;f.subtract(q[k].navStep,a),V(),J(a)},pickerSwitch:function(){K(1)},selectMonth:function(b){var c=a(b.target).closest("tbody").find("span").index(a(b.target));f.month(c),k===p?(_(e.clone().year(f.year()).month(f.month())),d.inline||aa()):(K(-1),V()),J("M")},selectYear:function(b){var c=parseInt(a(b.target).text(),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J("YYYY")},selectDecade:function(b){var c=parseInt(a(b.target).data("selection"),10)||0;f.year(c),k===p?(_(e.clone().year(f.year())),d.inline||aa()):(K(-1),V()),J("YYYY")},selectDay:function(b){var c=f.clone();a(b.target).is(".old")&&c.subtract(1,"M"),a(b.target).is(".new")&&c.add(1,"M"),_(c.date(parseInt(a(b.target).text(),10))),z()||d.keepOpen||d.inline||aa()},incrementHours:function(){var a=e.clone().add(1,"h");Q(a,"h")&&_(a)},incrementMinutes:function(){var a=e.clone().add(d.stepping,"m");Q(a,"m")&&_(a)},incrementSeconds:function(){var a=e.clone().add(1,"s");Q(a,"s")&&_(a)},decrementHours:function(){var a=e.clone().subtract(1,"h");Q(a,"h")&&_(a)},decrementMinutes:function(){var a=e.clone().subtract(d.stepping,"m");Q(a,"m")&&_(a)},decrementSeconds:function(){var a=e.clone().subtract(1,"s");Q(a,"s")&&_(a)},togglePeriod:function(){_(e.clone().add(e.hours()>=12?-12:12,"h"))},togglePicker:function(b){var c,e=a(b.target),f=e.closest("ul"),g=f.find(".in"),h=f.find(".collapse:not(.in)");if(g&&g.length){if(c=g.data("collapse"),c&&c.transitioning)return;g.collapse?(g.collapse("hide"),h.collapse("show")):(g.removeClass("in"),h.addClass("in")),e.is("span")?e.toggleClass(d.icons.time+" "+d.icons.date):e.find("span").toggleClass(d.icons.time+" "+d.icons.date)}},showPicker:function(){o.find(".timepicker > div:not(.timepicker-picker)").hide(),o.find(".timepicker .timepicker-picker").show()},showHours:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-hours").show()},showMinutes:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-minutes").show()},showSeconds:function(){o.find(".timepicker .timepicker-picker").hide(),o.find(".timepicker .timepicker-seconds").show()},selectHour:function(b){var c=parseInt(a(b.target).text(),10);h||(e.hours()>=12?12!==c&&(c+=12):12===c&&(c=0)),_(e.clone().hours(c)),ca.showPicker.call(l)},selectMinute:function(b){_(e.clone().minutes(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},selectSecond:function(b){_(e.clone().seconds(parseInt(a(b.target).text(),10))),ca.showPicker.call(l)},clear:ba,today:function(){var a=x();Q(a,"d")&&_(a)},close:aa},da=function(b){return a(b.currentTarget).is(".disabled")?!1:(ca[a(b.currentTarget).data("action")].apply(l,arguments),!1)},ea=function(){var b,c={year:function(a){return a.month(0).date(1).hours(0).seconds(0).minutes(0)},month:function(a){return a.date(1).hours(0).seconds(0).minutes(0)},day:function(a){return a.hours(0).seconds(0).minutes(0)},hour:function(a){return a.seconds(0).minutes(0)},minute:function(a){return a.seconds(0)}};return g.prop("disabled")||!d.ignoreReadonly&&g.prop("readonly")||o?l:(void 0!==g.val()&&0!==g.val().trim().length?_(ga(g.val().trim())):d.useCurrent&&m&&(g.is("input")&&0===g.val().trim().length||d.inline)&&(b=x(),"string"==typeof d.useCurrent&&(b=c[d.useCurrent](b)),_(b)),o=F(),L(),R(),o.find(".timepicker-hours").hide(),o.find(".timepicker-minutes").hide(),o.find(".timepicker-seconds").hide(),$(),K(),a(window).on("resize",H),o.on("click","[data-action]",da),o.on("mousedown",!1),n&&n.hasClass("btn")&&n.toggleClass("active"),o.show(),H(),d.focusOnShow&&!g.is(":focus")&&g.focus(),I({type:"dp.show"}),l)},fa=function(){return o?aa():ea()},ga=function(a){return a=void 0===d.parseInputDate?b.isMoment(a)||a instanceof Date?b(a):x(a):d.parseInputDate(a),a.locale(d.locale),a},ha=function(a){var b,c,e,f,g=null,h=[],i={},j=a.which,k="p";w[j]=k;for(b in w)w.hasOwnProperty(b)&&w[b]===k&&(h.push(b),parseInt(b,10)!==j&&(i[b]=!0));for(b in d.keyBinds)if(d.keyBinds.hasOwnProperty(b)&&"function"==typeof d.keyBinds[b]&&(e=b.split(" "),e.length===h.length&&v[j]===e[e.length-1])){for(f=!0,c=e.length-2;c>=0;c--)if(!(v[e[c]]in i)){f=!1;break}if(f){g=d.keyBinds[b];break}}g&&(g.call(l,o),a.stopPropagation(),a.preventDefault())},ia=function(a){w[a.which]="r",a.stopPropagation(),a.preventDefault()},ja=function(b){var c=a(b.target).val().trim(),d=c?ga(c):null;return _(d),b.stopImmediatePropagation(),!1},ka=function(){g.on({change:ja,blur:d.debug?"":aa,keydown:ha,keyup:ia,focus:d.allowInputToggle?ea:""}),c.is("input")?g.on({focus:ea}):n&&(n.on("click",fa),n.on("mousedown",!1))},la=function(){g.off({change:ja,blur:blur,keydown:ha,keyup:ia,focus:d.allowInputToggle?aa:""}),c.is("input")?g.off({focus:ea}):n&&(n.off("click",fa),n.off("mousedown",!1))},ma=function(b){var c={};return a.each(b,function(){var a=ga(this);a.isValid()&&(c[a.format("YYYY-MM-DD")]=!0)}),Object.keys(c).length?c:!1},na=function(b){var c={};return a.each(b,function(){c[this]=!0}),Object.keys(c).length?c:!1},oa=function(){var a=d.format||"L LT";i=a.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){var b=e.localeData().longDateFormat(a)||a;return b.replace(/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,function(a){return e.localeData().longDateFormat(a)||a})}),j=d.extraFormats?d.extraFormats.slice():[],j.indexOf(a)<0&&j.indexOf(i)<0&&j.push(i),h=i.toLowerCase().indexOf("a")<1&&i.replace(/\[.*?\]/g,"").indexOf("h")<1,y("y")&&(p=2),y("M")&&(p=1),y("d")&&(p=0),k=Math.max(p,k),m||_(e)};if(l.destroy=function(){aa(),la(),c.removeData("DateTimePicker"),c.removeData("date")},l.toggle=fa,l.show=ea,l.hide=aa,l.disable=function(){return aa(),n&&n.hasClass("btn")&&n.addClass("disabled"),g.prop("disabled",!0),l},l.enable=function(){return n&&n.hasClass("btn")&&n.removeClass("disabled"),g.prop("disabled",!1),l},l.ignoreReadonly=function(a){if(0===arguments.length)return d.ignoreReadonly;if("boolean"!=typeof a)throw new TypeError("ignoreReadonly () expects a boolean parameter");return d.ignoreReadonly=a,l},l.options=function(b){if(0===arguments.length)return a.extend(!0,{},d);if(!(b instanceof Object))throw new TypeError("options() options parameter should be an object");return a.extend(!0,d,b),a.each(d,function(a,b){if(void 0===l[a])throw new TypeError("option "+a+" is not recognized!");l[a](b)}),l},l.date=function(a){if(0===arguments.length)return m?null:e.clone();if(!(null===a||"string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("date() parameter must be one of [null, string, moment or Date]");return _(null===a?null:ga(a)),l},l.format=function(a){if(0===arguments.length)return d.format;if("string"!=typeof a&&("boolean"!=typeof a||a!==!1))throw new TypeError("format() expects a sting or boolean:false parameter "+a);return d.format=a,i&&oa(),l},l.timeZone=function(a){return 0===arguments.length?d.timeZone:(d.timeZone=a,l)},l.dayViewHeaderFormat=function(a){if(0===arguments.length)return d.dayViewHeaderFormat;if("string"!=typeof a)throw new TypeError("dayViewHeaderFormat() expects a string parameter");return d.dayViewHeaderFormat=a,l},l.extraFormats=function(a){if(0===arguments.length)return d.extraFormats;if(a!==!1&&!(a instanceof Array))throw new TypeError("extraFormats() expects an array or false parameter");return d.extraFormats=a,j&&oa(),l},l.disabledDates=function(b){if(0===arguments.length)return d.disabledDates?a.extend({},d.disabledDates):d.disabledDates;if(!b)return d.disabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledDates() expects an array parameter");return d.disabledDates=ma(b),d.enabledDates=!1,$(),l},l.enabledDates=function(b){if(0===arguments.length)return d.enabledDates?a.extend({},d.enabledDates):d.enabledDates;if(!b)return d.enabledDates=!1,$(),l;if(!(b instanceof Array))throw new TypeError("enabledDates() expects an array parameter");return d.enabledDates=ma(b),d.disabledDates=!1,$(),l},l.daysOfWeekDisabled=function(a){if(0===arguments.length)return d.daysOfWeekDisabled.splice(0);if("boolean"==typeof a&&!a)return d.daysOfWeekDisabled=!1,$(),l;if(!(a instanceof Array))throw new TypeError("daysOfWeekDisabled() expects an array parameter");if(d.daysOfWeekDisabled=a.reduce(function(a,b){return b=parseInt(b,10),b>6||0>b||isNaN(b)?a:(-1===a.indexOf(b)&&a.push(b),a)},[]).sort(),d.useCurrent&&!d.keepInvalid){for(var b=0;!Q(e,"d");){if(e.add(1,"d"),7===b)throw"Tried 7 times to find a valid date";b++}_(e)}return $(),l},l.maxDate=function(a){if(0===arguments.length)return d.maxDate?d.maxDate.clone():d.maxDate;if("boolean"==typeof a&&a===!1)return d.maxDate=!1,$(),l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("maxDate() Could not parse date parameter: "+a);if(d.minDate&&b.isBefore(d.minDate))throw new TypeError("maxDate() date parameter is before options.minDate: "+b.format(i));return d.maxDate=b,d.useCurrent&&!d.keepInvalid&&e.isAfter(a)&&_(d.maxDate),f.isAfter(b)&&(f=b.clone().subtract(d.stepping,"m")),$(),l},l.minDate=function(a){if(0===arguments.length)return d.minDate?d.minDate.clone():d.minDate;if("boolean"==typeof a&&a===!1)return d.minDate=!1,$(),l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("minDate() Could not parse date parameter: "+a);if(d.maxDate&&b.isAfter(d.maxDate))throw new TypeError("minDate() date parameter is after options.maxDate: "+b.format(i));return d.minDate=b,d.useCurrent&&!d.keepInvalid&&e.isBefore(a)&&_(d.minDate),f.isBefore(b)&&(f=b.clone().add(d.stepping,"m")),$(),l},l.defaultDate=function(a){if(0===arguments.length)return d.defaultDate?d.defaultDate.clone():d.defaultDate;if(!a)return d.defaultDate=!1,l;"string"==typeof a&&("now"===a||"moment"===a)&&(a=x());var b=ga(a);if(!b.isValid())throw new TypeError("defaultDate() Could not parse date parameter: "+a);if(!Q(b))throw new TypeError("defaultDate() date passed is invalid according to component setup validations");return d.defaultDate=b,(d.defaultDate&&d.inline||""===g.val().trim())&&_(d.defaultDate),l},l.locale=function(a){if(0===arguments.length)return d.locale;if(!b.localeData(a))throw new TypeError("locale() locale "+a+" is not loaded from moment locales!");return d.locale=a,e.locale(d.locale),f.locale(d.locale),i&&oa(),o&&(aa(),ea()),l},l.stepping=function(a){return 0===arguments.length?d.stepping:(a=parseInt(a,10),(isNaN(a)||1>a)&&(a=1),d.stepping=a,l)},l.useCurrent=function(a){var b=["year","month","day","hour","minute"];if(0===arguments.length)return d.useCurrent;if("boolean"!=typeof a&&"string"!=typeof a)throw new TypeError("useCurrent() expects a boolean or string parameter");if("string"==typeof a&&-1===b.indexOf(a.toLowerCase()))throw new TypeError("useCurrent() expects a string parameter of "+b.join(", "));return d.useCurrent=a,l},l.collapse=function(a){if(0===arguments.length)return d.collapse;if("boolean"!=typeof a)throw new TypeError("collapse() expects a boolean parameter");return d.collapse===a?l:(d.collapse=a,o&&(aa(),ea()),l)},l.icons=function(b){if(0===arguments.length)return a.extend({},d.icons);if(!(b instanceof Object))throw new TypeError("icons() expects parameter to be an Object");return a.extend(d.icons,b),o&&(aa(),ea()),l},l.tooltips=function(b){if(0===arguments.length)return a.extend({},d.tooltips);if(!(b instanceof Object))throw new TypeError("tooltips() expects parameter to be an Object");return a.extend(d.tooltips,b),o&&(aa(),ea()),l},l.useStrict=function(a){if(0===arguments.length)return d.useStrict;if("boolean"!=typeof a)throw new TypeError("useStrict() expects a boolean parameter");return d.useStrict=a,l},l.sideBySide=function(a){if(0===arguments.length)return d.sideBySide;if("boolean"!=typeof a)throw new TypeError("sideBySide() expects a boolean parameter");return d.sideBySide=a,o&&(aa(),ea()),l},l.viewMode=function(a){if(0===arguments.length)return d.viewMode;if("string"!=typeof a)throw new TypeError("viewMode() expects a string parameter");if(-1===r.indexOf(a))throw new TypeError("viewMode() parameter must be one of ("+r.join(", ")+") value");return d.viewMode=a,k=Math.max(r.indexOf(a),p),K(),l},l.toolbarPlacement=function(a){if(0===arguments.length)return d.toolbarPlacement;if("string"!=typeof a)throw new TypeError("toolbarPlacement() expects a string parameter");if(-1===u.indexOf(a))throw new TypeError("toolbarPlacement() parameter must be one of ("+u.join(", ")+") value");return d.toolbarPlacement=a,o&&(aa(),ea()),l},l.widgetPositioning=function(b){if(0===arguments.length)return a.extend({},d.widgetPositioning);if("[object Object]"!=={}.toString.call(b))throw new TypeError("widgetPositioning() expects an object variable");if(b.horizontal){if("string"!=typeof b.horizontal)throw new TypeError("widgetPositioning() horizontal variable must be a string");if(b.horizontal=b.horizontal.toLowerCase(),-1===t.indexOf(b.horizontal))throw new TypeError("widgetPositioning() expects horizontal parameter to be one of ("+t.join(", ")+")");d.widgetPositioning.horizontal=b.horizontal}if(b.vertical){if("string"!=typeof b.vertical)throw new TypeError("widgetPositioning() vertical variable must be a string");if(b.vertical=b.vertical.toLowerCase(),-1===s.indexOf(b.vertical))throw new TypeError("widgetPositioning() expects vertical parameter to be one of ("+s.join(", ")+")");d.widgetPositioning.vertical=b.vertical}return $(),l},l.calendarWeeks=function(a){if(0===arguments.length)return d.calendarWeeks;if("boolean"!=typeof a)throw new TypeError("calendarWeeks() expects parameter to be a boolean value");return d.calendarWeeks=a,$(),l},l.showTodayButton=function(a){if(0===arguments.length)return d.showTodayButton;if("boolean"!=typeof a)throw new TypeError("showTodayButton() expects a boolean parameter");return d.showTodayButton=a,o&&(aa(),ea()),l},l.showClear=function(a){if(0===arguments.length)return d.showClear;if("boolean"!=typeof a)throw new TypeError("showClear() expects a boolean parameter");return d.showClear=a,o&&(aa(),ea()),l},l.widgetParent=function(b){if(0===arguments.length)return d.widgetParent;if("string"==typeof b&&(b=a(b)),null!==b&&"string"!=typeof b&&!(b instanceof a))throw new TypeError("widgetParent() expects a string or a jQuery object parameter");return d.widgetParent=b,o&&(aa(),ea()),l},l.keepOpen=function(a){if(0===arguments.length)return d.keepOpen;if("boolean"!=typeof a)throw new TypeError("keepOpen() expects a boolean parameter");return d.keepOpen=a,l},l.focusOnShow=function(a){if(0===arguments.length)return d.focusOnShow;if("boolean"!=typeof a)throw new TypeError("focusOnShow() expects a boolean parameter");return d.focusOnShow=a,l},l.inline=function(a){if(0===arguments.length)return d.inline;if("boolean"!=typeof a)throw new TypeError("inline() expects a boolean parameter");return d.inline=a,l},l.clear=function(){return ba(),l},l.keyBinds=function(a){return d.keyBinds=a,l},l.getMoment=function(a){return x(a)},l.debug=function(a){if("boolean"!=typeof a)throw new TypeError("debug() expects a boolean parameter");return d.debug=a,l},l.allowInputToggle=function(a){if(0===arguments.length)return d.allowInputToggle;if("boolean"!=typeof a)throw new TypeError("allowInputToggle() expects a boolean parameter");return d.allowInputToggle=a,l},l.showClose=function(a){if(0===arguments.length)return d.showClose;if("boolean"!=typeof a)throw new TypeError("showClose() expects a boolean parameter");return d.showClose=a,l},l.keepInvalid=function(a){if(0===arguments.length)return d.keepInvalid;if("boolean"!=typeof a)throw new TypeError("keepInvalid() expects a boolean parameter");return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)return d.datepickerInput;if("string"!=typeof a)throw new TypeError("datepickerInput() expects a string parameter");return d.datepickerInput=a,l},l.parseInputDate=function(a){if(0===arguments.length)return d.parseInputDate; -if("function"!=typeof a)throw new TypeError("parseInputDate() sholud be as function");return d.parseInputDate=a,l},l.disabledTimeIntervals=function(b){if(0===arguments.length)return d.disabledTimeIntervals?a.extend({},d.disabledTimeIntervals):d.disabledTimeIntervals;if(!b)return d.disabledTimeIntervals=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledTimeIntervals() expects an array parameter");return d.disabledTimeIntervals=b,$(),l},l.disabledHours=function(b){if(0===arguments.length)return d.disabledHours?a.extend({},d.disabledHours):d.disabledHours;if(!b)return d.disabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError("disabledHours() expects an array parameter");if(d.disabledHours=na(b),d.enabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}_(e)}return $(),l},l.enabledHours=function(b){if(0===arguments.length)return d.enabledHours?a.extend({},d.enabledHours):d.enabledHours;if(!b)return d.enabledHours=!1,$(),l;if(!(b instanceof Array))throw new TypeError("enabledHours() expects an array parameter");if(d.enabledHours=na(b),d.disabledHours=!1,d.useCurrent&&!d.keepInvalid){for(var c=0;!Q(e,"h");){if(e.add(1,"h"),24===c)throw"Tried 24 times to find a valid date";c++}_(e)}return $(),l},l.viewDate=function(a){if(0===arguments.length)return f.clone();if(!a)return f=e.clone(),l;if(!("string"==typeof a||b.isMoment(a)||a instanceof Date))throw new TypeError("viewDate() parameter must be one of [string, moment or Date]");return f=ga(a),J(),l},c.is("input"))g=c;else if(g=c.find(d.datepickerInput),0===g.size())g=c.find("input");else if(!g.is("input"))throw new Error('CSS class "'+d.datepickerInput+'" cannot be applied to non input element');if(c.hasClass("input-group")&&(n=0===c.find(".datepickerbutton").size()?c.find(".input-group-addon"):c.find(".datepickerbutton")),!d.inline&&!g.is("input"))throw new Error("Could not initialize DateTimePicker without an input element");return e=x(),f=e.clone(),a.extend(!0,d,G()),l.options(d),oa(),ka(),g.prop("disabled")&&l.disable(),g.is("input")&&0!==g.val().trim().length?_(ga(g.val().trim())):d.defaultDate&&void 0===g.attr("placeholder")&&_(d.defaultDate),d.inline&&ea(),l};a.fn.datetimepicker=function(b){return this.each(function(){var d=a(this);d.data("DateTimePicker")||(b=a.extend(!0,{},a.fn.datetimepicker.defaults,b),d.data("DateTimePicker",c(d,b)))})},a.fn.datetimepicker.defaults={timeZone:"Etc/UTC",format:!1,dayViewHeaderFormat:"MMMM YYYY",extraFormats:!1,stepping:1,minDate:!1,maxDate:!1,useCurrent:!0,collapse:!0,locale:b.locale(),defaultDate:!1,disabledDates:!1,enabledDates:!1,icons:{time:"glyphicon glyphicon-time",date:"glyphicon glyphicon-calendar",up:"glyphicon glyphicon-chevron-up",down:"glyphicon glyphicon-chevron-down",previous:"glyphicon glyphicon-chevron-left",next:"glyphicon glyphicon-chevron-right",today:"glyphicon glyphicon-screenshot",clear:"glyphicon glyphicon-trash",close:"glyphicon glyphicon-remove"},tooltips:{today:"Go to today",clear:"Clear selection",close:"Close the picker",selectMonth:"Select Month",prevMonth:"Previous Month",nextMonth:"Next Month",selectYear:"Select Year",prevYear:"Previous Year",nextYear:"Next Year",selectDecade:"Select Decade",prevDecade:"Previous Decade",nextDecade:"Next Decade",prevCentury:"Previous Century",nextCentury:"Next Century",pickHour:"Pick Hour",incrementHour:"Increment Hour",decrementHour:"Decrement Hour",pickMinute:"Pick Minute",incrementMinute:"Increment Minute",decrementMinute:"Decrement Minute",pickSecond:"Pick Second",incrementSecond:"Increment Second",decrementSecond:"Decrement Second",togglePeriod:"Toggle Period",selectTime:"Select Time"},useStrict:!1,sideBySide:!1,daysOfWeekDisabled:!1,calendarWeeks:!1,viewMode:"days",toolbarPlacement:"default",showTodayButton:!1,showClear:!1,showClose:!1,widgetPositioning:{horizontal:"auto",vertical:"auto"},widgetParent:null,ignoreReadonly:!1,keepOpen:!1,focusOnShow:!0,inline:!1,keepInvalid:!1,datepickerInput:".datepickerinput",keyBinds:{up:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(7,"d")):this.date(b.clone().add(this.stepping(),"m"))}},down:function(a){if(!a)return void this.show();var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(7,"d")):this.date(b.clone().subtract(this.stepping(),"m"))},"control up":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().subtract(1,"y")):this.date(b.clone().add(1,"h"))}},"control down":function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")?this.date(b.clone().add(1,"y")):this.date(b.clone().subtract(1,"h"))}},left:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"d"))}},right:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"d"))}},pageUp:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().subtract(1,"M"))}},pageDown:function(a){if(a){var b=this.date()||this.getMoment();a.find(".datepicker").is(":visible")&&this.date(b.clone().add(1,"M"))}},enter:function(){this.hide()},escape:function(){this.hide()},"control space":function(a){a.find(".timepicker").is(":visible")&&a.find('.btn[data-action="togglePeriod"]').click()},t:function(){this.date(this.getMoment())},"delete":function(){this.clear()}},debug:!1,allowInputToggle:!1,disabledTimeIntervals:!1,disabledHours:!1,enabledHours:!1,viewDate:!1}}); \ No newline at end of file diff --git a/static/ng/vendors/moment/min/moment-with-locales.min.js b/static/ng/vendors/moment/min/moment-with-locales.min.js deleted file mode 100644 index edaaeb8a6..000000000 --- a/static/ng/vendors/moment/min/moment-with-locales.min.js +++ /dev/null @@ -1,74 +0,0 @@ -!function(a,b){"object"==typeof exports&&"undefined"!=typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):a.moment=b()}(this,function(){"use strict";function a(){return Rd.apply(null,arguments)}function b(a){Rd=a}function c(a){return"[object Array]"===Object.prototype.toString.call(a)}function d(a){return a instanceof Date||"[object Date]"===Object.prototype.toString.call(a)}function e(a,b){var c,d=[];for(c=0;c0)for(c in Td)d=Td[c],e=b[d],m(e)||(a[d]=e);return a}function o(b){n(this,b),this._d=new Date(null!=b._d?b._d.getTime():NaN),Ud===!1&&(Ud=!0,a.updateOffset(this),Ud=!1)}function p(a){return a instanceof o||null!=a&&null!=a._isAMomentObject}function q(a){return 0>a?Math.ceil(a):Math.floor(a)}function r(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=q(b)),c}function s(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&r(a[d])!==r(b[d]))&&g++;return g+f}function t(){}function u(a){return a?a.toLowerCase().replace("_","-"):a}function v(a){for(var b,c,d,e,f=0;f0;){if(d=w(e.slice(0,b).join("-")))return d;if(c&&c.length>=b&&s(e,c,!0)>=b-1)break;b--}f++}return null}function w(a){var b=null;if(!Vd[a]&&"undefined"!=typeof module&&module&&module.exports)try{b=Sd._abbr,require("./locale/"+a),x(b)}catch(c){}return Vd[a]}function x(a,b){var c;return a&&(c=m(b)?z(a):y(a,b),c&&(Sd=c)),Sd._abbr}function y(a,b){return null!==b?(b.abbr=a,Vd[a]=Vd[a]||new t,Vd[a].set(b),x(a),Vd[a]):(delete Vd[a],null)}function z(a){var b;if(a&&a._locale&&a._locale._abbr&&(a=a._locale._abbr),!a)return Sd;if(!c(a)){if(b=w(a))return b;a=[a]}return v(a)}function A(a,b){var c=a.toLowerCase();Wd[c]=Wd[c+"s"]=Wd[b]=a}function B(a){return"string"==typeof a?Wd[a]||Wd[a.toLowerCase()]:void 0}function C(a){var b,c,d={};for(c in a)f(a,c)&&(b=B(c),b&&(d[b]=a[c]));return d}function D(a){return a instanceof Function||"[object Function]"===Object.prototype.toString.call(a)}function E(b,c){return function(d){return null!=d?(G(this,b,d),a.updateOffset(this,c),this):F(this,b)}}function F(a,b){return a.isValid()?a._d["get"+(a._isUTC?"UTC":"")+b]():NaN}function G(a,b,c){a.isValid()&&a._d["set"+(a._isUTC?"UTC":"")+b](c)}function H(a,b){var c;if("object"==typeof a)for(c in a)this.set(c,a[c]);else if(a=B(a),D(this[a]))return this[a](b);return this}function I(a,b,c){var d=""+Math.abs(a),e=b-d.length,f=a>=0;return(f?c?"+":"":"-")+Math.pow(10,Math.max(0,e)).toString().substr(1)+d}function J(a,b,c,d){var e=d;"string"==typeof d&&(e=function(){return this[d]()}),a&&($d[a]=e),b&&($d[b[0]]=function(){return I(e.apply(this,arguments),b[1],b[2])}),c&&($d[c]=function(){return this.localeData().ordinal(e.apply(this,arguments),a)})}function K(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function L(a){var b,c,d=a.match(Xd);for(b=0,c=d.length;c>b;b++)$d[d[b]]?d[b]=$d[d[b]]:d[b]=K(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function M(a,b){return a.isValid()?(b=N(b,a.localeData()),Zd[b]=Zd[b]||L(b),Zd[b](a)):a.localeData().invalidDate()}function N(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(Yd.lastIndex=0;d>=0&&Yd.test(a);)a=a.replace(Yd,c),Yd.lastIndex=0,d-=1;return a}function O(a,b,c){qe[a]=D(b)?b:function(a,d){return a&&c?c:b}}function P(a,b){return f(qe,a)?qe[a](b._strict,b._locale):new RegExp(Q(a))}function Q(a){return R(a.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e}))}function R(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function S(a,b){var c,d=b;for("string"==typeof a&&(a=[a]),"number"==typeof b&&(d=function(a,c){c[b]=r(a)}),c=0;cd;d++){if(e=h([2e3,d]),c&&!this._longMonthsParse[d]&&(this._longMonthsParse[d]=new RegExp("^"+this.months(e,"").replace(".","")+"$","i"),this._shortMonthsParse[d]=new RegExp("^"+this.monthsShort(e,"").replace(".","")+"$","i")),c||this._monthsParse[d]||(f="^"+this.months(e,"")+"|^"+this.monthsShort(e,""),this._monthsParse[d]=new RegExp(f.replace(".",""),"i")),c&&"MMMM"===b&&this._longMonthsParse[d].test(a))return d;if(c&&"MMM"===b&&this._shortMonthsParse[d].test(a))return d;if(!c&&this._monthsParse[d].test(a))return d}}function Z(a,b){var c;return a.isValid()?"string"==typeof b&&(b=a.localeData().monthsParse(b),"number"!=typeof b)?a:(c=Math.min(a.date(),V(a.year(),b)),a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c),a):a}function $(b){return null!=b?(Z(this,b),a.updateOffset(this,!0),this):F(this,"Month")}function _(){return V(this.year(),this.month())}function aa(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&a?this._monthsShortStrictRegex:this._monthsShortRegex}function ba(a){return this._monthsParseExact?(f(this,"_monthsRegex")||ca.call(this),a?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&a?this._monthsStrictRegex:this._monthsRegex}function ca(){function a(a,b){return b.length-a.length}var b,c,d=[],e=[],f=[];for(b=0;12>b;b++)c=h([2e3,b]),d.push(this.monthsShort(c,"")),e.push(this.months(c,"")),f.push(this.months(c,"")),f.push(this.monthsShort(c,""));for(d.sort(a),e.sort(a),f.sort(a),b=0;12>b;b++)d[b]=R(d[b]),e[b]=R(e[b]),f[b]=R(f[b]);this._monthsRegex=new RegExp("^("+f.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+e.join("|")+")$","i"),this._monthsShortStrictRegex=new RegExp("^("+d.join("|")+")$","i")}function da(a){var b,c=a._a;return c&&-2===j(a).overflow&&(b=c[te]<0||c[te]>11?te:c[ue]<1||c[ue]>V(c[se],c[te])?ue:c[ve]<0||c[ve]>24||24===c[ve]&&(0!==c[we]||0!==c[xe]||0!==c[ye])?ve:c[we]<0||c[we]>59?we:c[xe]<0||c[xe]>59?xe:c[ye]<0||c[ye]>999?ye:-1,j(a)._overflowDayOfYear&&(se>b||b>ue)&&(b=ue),j(a)._overflowWeeks&&-1===b&&(b=ze),j(a)._overflowWeekday&&-1===b&&(b=Ae),j(a).overflow=b),a}function ea(b){a.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+b)}function fa(a,b){var c=!0;return g(function(){return c&&(ea(a+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),c=!1),b.apply(this,arguments)},b)}function ga(a,b){Ge[a]||(ea(b),Ge[a]=!0)}function ha(a){var b,c,d,e,f,g,h=a._i,i=He.exec(h)||Ie.exec(h);if(i){for(j(a).iso=!0,b=0,c=Ke.length;c>b;b++)if(Ke[b][1].exec(i[1])){e=Ke[b][0],d=Ke[b][2]!==!1;break}if(null==e)return void(a._isValid=!1);if(i[3]){for(b=0,c=Le.length;c>b;b++)if(Le[b][1].exec(i[3])){f=(i[2]||" ")+Le[b][0];break}if(null==f)return void(a._isValid=!1)}if(!d&&null!=f)return void(a._isValid=!1);if(i[4]){if(!Je.exec(i[4]))return void(a._isValid=!1);g="Z"}a._f=e+(f||"")+(g||""),wa(a)}else a._isValid=!1}function ia(b){var c=Me.exec(b._i);return null!==c?void(b._d=new Date(+c[1])):(ha(b),void(b._isValid===!1&&(delete b._isValid,a.createFromInputFallback(b))))}function ja(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 100>a&&a>=0&&isFinite(h.getFullYear())&&h.setFullYear(a),h}function ka(a){var b=new Date(Date.UTC.apply(null,arguments));return 100>a&&a>=0&&isFinite(b.getUTCFullYear())&&b.setUTCFullYear(a),b}function la(a){return ma(a)?366:365}function ma(a){return a%4===0&&a%100!==0||a%400===0}function na(){return ma(this.year())}function oa(a,b,c){var d=7+b-c,e=(7+ka(a,0,d).getUTCDay()-b)%7;return-e+d-1}function pa(a,b,c,d,e){var f,g,h=(7+c-d)%7,i=oa(a,d,e),j=1+7*(b-1)+h+i;return 0>=j?(f=a-1,g=la(f)+j):j>la(a)?(f=a+1,g=j-la(a)):(f=a,g=j),{year:f,dayOfYear:g}}function qa(a,b,c){var d,e,f=oa(a.year(),b,c),g=Math.floor((a.dayOfYear()-f-1)/7)+1;return 1>g?(e=a.year()-1,d=g+ra(e,b,c)):g>ra(a.year(),b,c)?(d=g-ra(a.year(),b,c),e=a.year()+1):(e=a.year(),d=g),{week:d,year:e}}function ra(a,b,c){var d=oa(a,b,c),e=oa(a+1,b,c);return(la(a)-d+e)/7}function sa(a,b,c){return null!=a?a:null!=b?b:c}function ta(b){var c=new Date(a.now());return b._useUTC?[c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()]:[c.getFullYear(),c.getMonth(),c.getDate()]}function ua(a){var b,c,d,e,f=[];if(!a._d){for(d=ta(a),a._w&&null==a._a[ue]&&null==a._a[te]&&va(a),a._dayOfYear&&(e=sa(a._a[se],d[se]),a._dayOfYear>la(e)&&(j(a)._overflowDayOfYear=!0),c=ka(e,0,a._dayOfYear),a._a[te]=c.getUTCMonth(),a._a[ue]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=f[b]=d[b];for(;7>b;b++)a._a[b]=f[b]=null==a._a[b]?2===b?1:0:a._a[b];24===a._a[ve]&&0===a._a[we]&&0===a._a[xe]&&0===a._a[ye]&&(a._nextDay=!0,a._a[ve]=0),a._d=(a._useUTC?ka:ja).apply(null,f),null!=a._tzm&&a._d.setUTCMinutes(a._d.getUTCMinutes()-a._tzm),a._nextDay&&(a._a[ve]=24)}}function va(a){var b,c,d,e,f,g,h,i;b=a._w,null!=b.GG||null!=b.W||null!=b.E?(f=1,g=4,c=sa(b.GG,a._a[se],qa(Ea(),1,4).year),d=sa(b.W,1),e=sa(b.E,1),(1>e||e>7)&&(i=!0)):(f=a._locale._week.dow,g=a._locale._week.doy,c=sa(b.gg,a._a[se],qa(Ea(),f,g).year),d=sa(b.w,1),null!=b.d?(e=b.d,(0>e||e>6)&&(i=!0)):null!=b.e?(e=b.e+f,(b.e<0||b.e>6)&&(i=!0)):e=f),1>d||d>ra(c,f,g)?j(a)._overflowWeeks=!0:null!=i?j(a)._overflowWeekday=!0:(h=pa(c,d,e,f,g),a._a[se]=h.year,a._dayOfYear=h.dayOfYear)}function wa(b){if(b._f===a.ISO_8601)return void ha(b);b._a=[],j(b).empty=!0;var c,d,e,f,g,h=""+b._i,i=h.length,k=0;for(e=N(b._f,b._locale).match(Xd)||[],c=0;c0&&j(b).unusedInput.push(g),h=h.slice(h.indexOf(d)+d.length),k+=d.length),$d[f]?(d?j(b).empty=!1:j(b).unusedTokens.push(f),U(f,d,b)):b._strict&&!d&&j(b).unusedTokens.push(f);j(b).charsLeftOver=i-k,h.length>0&&j(b).unusedInput.push(h),j(b).bigHour===!0&&b._a[ve]<=12&&b._a[ve]>0&&(j(b).bigHour=void 0),b._a[ve]=xa(b._locale,b._a[ve],b._meridiem),ua(b),da(b)}function xa(a,b,c){var d;return null==c?b:null!=a.meridiemHour?a.meridiemHour(b,c):null!=a.isPM?(d=a.isPM(c),d&&12>b&&(b+=12),d||12!==b||(b=0),b):b}function ya(a){var b,c,d,e,f;if(0===a._f.length)return j(a).invalidFormat=!0,void(a._d=new Date(NaN));for(e=0;ef)&&(d=f,c=b));g(a,c||b)}function za(a){if(!a._d){var b=C(a._i);a._a=e([b.year,b.month,b.day||b.date,b.hour,b.minute,b.second,b.millisecond],function(a){return a&&parseInt(a,10)}),ua(a)}}function Aa(a){var b=new o(da(Ba(a)));return b._nextDay&&(b.add(1,"d"),b._nextDay=void 0),b}function Ba(a){var b=a._i,e=a._f;return a._locale=a._locale||z(a._l),null===b||void 0===e&&""===b?l({nullInput:!0}):("string"==typeof b&&(a._i=b=a._locale.preparse(b)),p(b)?new o(da(b)):(c(e)?ya(a):e?wa(a):d(b)?a._d=b:Ca(a),k(a)||(a._d=null),a))}function Ca(b){var f=b._i;void 0===f?b._d=new Date(a.now()):d(f)?b._d=new Date(+f):"string"==typeof f?ia(b):c(f)?(b._a=e(f.slice(0),function(a){return parseInt(a,10)}),ua(b)):"object"==typeof f?za(b):"number"==typeof f?b._d=new Date(f):a.createFromInputFallback(b)}function Da(a,b,c,d,e){var f={};return"boolean"==typeof c&&(d=c,c=void 0),f._isAMomentObject=!0,f._useUTC=f._isUTC=e,f._l=c,f._i=a,f._f=b,f._strict=d,Aa(f)}function Ea(a,b,c,d){return Da(a,b,c,d,!1)}function Fa(a,b){var d,e;if(1===b.length&&c(b[0])&&(b=b[0]),!b.length)return Ea();for(d=b[0],e=1;ea&&(a=-a,c="-"),c+I(~~(a/60),2)+b+I(~~a%60,2)})}function La(a,b){var c=(b||"").match(a)||[],d=c[c.length-1]||[],e=(d+"").match(Re)||["-",0,0],f=+(60*e[1])+r(e[2]);return"+"===e[0]?f:-f}function Ma(b,c){var e,f;return c._isUTC?(e=c.clone(),f=(p(b)||d(b)?+b:+Ea(b))-+e,e._d.setTime(+e._d+f),a.updateOffset(e,!1),e):Ea(b).local()}function Na(a){return 15*-Math.round(a._d.getTimezoneOffset()/15)}function Oa(b,c){var d,e=this._offset||0;return this.isValid()?null!=b?("string"==typeof b?b=La(ne,b):Math.abs(b)<16&&(b=60*b),!this._isUTC&&c&&(d=Na(this)),this._offset=b,this._isUTC=!0,null!=d&&this.add(d,"m"),e!==b&&(!c||this._changeInProgress?cb(this,Za(b-e,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,a.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?e:Na(this):null!=b?this:NaN}function Pa(a,b){return null!=a?("string"!=typeof a&&(a=-a),this.utcOffset(a,b),this):-this.utcOffset()}function Qa(a){return this.utcOffset(0,a)}function Ra(a){return this._isUTC&&(this.utcOffset(0,a),this._isUTC=!1,a&&this.subtract(Na(this),"m")),this}function Sa(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(La(me,this._i)),this}function Ta(a){return this.isValid()?(a=a?Ea(a).utcOffset():0,(this.utcOffset()-a)%60===0):!1}function Ua(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Va(){if(!m(this._isDSTShifted))return this._isDSTShifted;var a={};if(n(a,this),a=Ba(a),a._a){var b=a._isUTC?h(a._a):Ea(a._a);this._isDSTShifted=this.isValid()&&s(a._a,b.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wa(){return this.isValid()?!this._isUTC:!1}function Xa(){return this.isValid()?this._isUTC:!1}function Ya(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Za(a,b){var c,d,e,g=a,h=null;return Ja(a)?g={ms:a._milliseconds,d:a._days,M:a._months}:"number"==typeof a?(g={},b?g[b]=a:g.milliseconds=a):(h=Se.exec(a))?(c="-"===h[1]?-1:1,g={y:0,d:r(h[ue])*c,h:r(h[ve])*c,m:r(h[we])*c,s:r(h[xe])*c,ms:r(h[ye])*c}):(h=Te.exec(a))?(c="-"===h[1]?-1:1,g={y:$a(h[2],c),M:$a(h[3],c),d:$a(h[4],c),h:$a(h[5],c),m:$a(h[6],c),s:$a(h[7],c),w:$a(h[8],c)}):null==g?g={}:"object"==typeof g&&("from"in g||"to"in g)&&(e=ab(Ea(g.from),Ea(g.to)),g={},g.ms=e.milliseconds,g.M=e.months),d=new Ia(g),Ja(a)&&f(a,"_locale")&&(d._locale=a._locale),d}function $a(a,b){var c=a&&parseFloat(a.replace(",","."));return(isNaN(c)?0:c)*b}function _a(a,b){var c={milliseconds:0,months:0};return c.months=b.month()-a.month()+12*(b.year()-a.year()),a.clone().add(c.months,"M").isAfter(b)&&--c.months,c.milliseconds=+b-+a.clone().add(c.months,"M"),c}function ab(a,b){var c;return a.isValid()&&b.isValid()?(b=Ma(b,a),a.isBefore(b)?c=_a(a,b):(c=_a(b,a),c.milliseconds=-c.milliseconds,c.months=-c.months),c):{milliseconds:0,months:0}}function bb(a,b){return function(c,d){var e,f;return null===d||isNaN(+d)||(ga(b,"moment()."+b+"(period, number) is deprecated. Please use moment()."+b+"(number, period)."),f=c,c=d,d=f),c="string"==typeof c?+c:c,e=Za(c,d),cb(this,e,a),this}}function cb(b,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;b.isValid()&&(e=null==e?!0:e,f&&b._d.setTime(+b._d+f*d),g&&G(b,"Date",F(b,"Date")+g*d),h&&Z(b,F(b,"Month")+h*d),e&&a.updateOffset(b,g||h))}function db(a,b){var c=a||Ea(),d=Ma(c,this).startOf("day"),e=this.diff(d,"days",!0),f=-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse",g=b&&(D(b[f])?b[f]():b[f]);return this.format(g||this.localeData().calendar(f,this,Ea(c)))}function eb(){return new o(this)}function fb(a,b){var c=p(a)?a:Ea(a);return this.isValid()&&c.isValid()?(b=B(m(b)?"millisecond":b),"millisecond"===b?+this>+c:+c<+this.clone().startOf(b)):!1}function gb(a,b){var c=p(a)?a:Ea(a);return this.isValid()&&c.isValid()?(b=B(m(b)?"millisecond":b),"millisecond"===b?+c>+this:+this.clone().endOf(b)<+c):!1}function hb(a,b,c){return this.isAfter(a,c)&&this.isBefore(b,c)}function ib(a,b){var c,d=p(a)?a:Ea(a);return this.isValid()&&d.isValid()?(b=B(b||"millisecond"),"millisecond"===b?+this===+d:(c=+d,+this.clone().startOf(b)<=c&&c<=+this.clone().endOf(b))):!1}function jb(a,b){return this.isSame(a,b)||this.isAfter(a,b)}function kb(a,b){return this.isSame(a,b)||this.isBefore(a,b)}function lb(a,b,c){var d,e,f,g;return this.isValid()?(d=Ma(a,this),d.isValid()?(e=6e4*(d.utcOffset()-this.utcOffset()),b=B(b),"year"===b||"month"===b||"quarter"===b?(g=mb(this,d),"quarter"===b?g/=3:"year"===b&&(g/=12)):(f=this-d,g="second"===b?f/1e3:"minute"===b?f/6e4:"hour"===b?f/36e5:"day"===b?(f-e)/864e5:"week"===b?(f-e)/6048e5:f),c?g:q(g)):NaN):NaN}function mb(a,b){var c,d,e=12*(b.year()-a.year())+(b.month()-a.month()),f=a.clone().add(e,"months");return 0>b-f?(c=a.clone().add(e-1,"months"),d=(b-f)/(f-c)):(c=a.clone().add(e+1,"months"),d=(b-f)/(c-f)),-(e+d)}function nb(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ob(){var a=this.clone().utc();return 0f&&(b=f),Ob.call(this,a,b,c,d,e))}function Ob(a,b,c,d,e){var f=pa(a,b,c,d,e),g=ka(f.year,0,f.dayOfYear);return this.year(g.getUTCFullYear()),this.month(g.getUTCMonth()),this.date(g.getUTCDate()),this}function Pb(a){return null==a?Math.ceil((this.month()+1)/3):this.month(3*(a-1)+this.month()%3)}function Qb(a){return qa(a,this._week.dow,this._week.doy).week}function Rb(){return this._week.dow}function Sb(){return this._week.doy}function Tb(a){var b=this.localeData().week(this);return null==a?b:this.add(7*(a-b),"d")}function Ub(a){var b=qa(this,1,4).week;return null==a?b:this.add(7*(a-b),"d")}function Vb(a,b){return"string"!=typeof a?a:isNaN(a)?(a=b.weekdaysParse(a),"number"==typeof a?a:null):parseInt(a,10)}function Wb(a,b){return c(this._weekdays)?this._weekdays[a.day()]:this._weekdays[this._weekdays.isFormat.test(b)?"format":"standalone"][a.day()]}function Xb(a){return this._weekdaysShort[a.day()]}function Yb(a){return this._weekdaysMin[a.day()]}function Zb(a,b,c){var d,e,f;for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),d=0;7>d;d++){if(e=Ea([2e3,1]).day(d),c&&!this._fullWeekdaysParse[d]&&(this._fullWeekdaysParse[d]=new RegExp("^"+this.weekdays(e,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[d]=new RegExp("^"+this.weekdaysShort(e,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[d]=new RegExp("^"+this.weekdaysMin(e,"").replace(".",".?")+"$","i")),this._weekdaysParse[d]||(f="^"+this.weekdays(e,"")+"|^"+this.weekdaysShort(e,"")+"|^"+this.weekdaysMin(e,""),this._weekdaysParse[d]=new RegExp(f.replace(".",""),"i")),c&&"dddd"===b&&this._fullWeekdaysParse[d].test(a))return d;if(c&&"ddd"===b&&this._shortWeekdaysParse[d].test(a))return d;if(c&&"dd"===b&&this._minWeekdaysParse[d].test(a))return d;if(!c&&this._weekdaysParse[d].test(a))return d}}function $b(a){if(!this.isValid())return null!=a?this:NaN;var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=Vb(a,this.localeData()),this.add(a-b,"d")):b}function _b(a){if(!this.isValid())return null!=a?this:NaN;var b=(this.day()+7-this.localeData()._week.dow)%7;return null==a?b:this.add(a-b,"d")}function ac(a){return this.isValid()?null==a?this.day()||7:this.day(this.day()%7?a:a-7):null!=a?this:NaN}function bc(a){var b=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==a?b:this.add(a-b,"d")}function cc(){return this.hours()%12||12}function dc(a,b){J(a,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),b)})}function ec(a,b){return b._meridiemParse}function fc(a){return"p"===(a+"").toLowerCase().charAt(0)}function gc(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"}function hc(a,b){b[ye]=r(1e3*("0."+a))}function ic(){return this._isUTC?"UTC":""}function jc(){return this._isUTC?"Coordinated Universal Time":""}function kc(a){return Ea(1e3*a)}function lc(){return Ea.apply(null,arguments).parseZone()}function mc(a,b,c){var d=this._calendar[a];return D(d)?d.call(b,c):d}function nc(a){var b=this._longDateFormat[a],c=this._longDateFormat[a.toUpperCase()];return b||!c?b:(this._longDateFormat[a]=c.replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a])}function oc(){return this._invalidDate}function pc(a){return this._ordinal.replace("%d",a)}function qc(a){return a}function rc(a,b,c,d){var e=this._relativeTime[c];return D(e)?e(a,b,c,d):e.replace(/%d/i,a)}function sc(a,b){var c=this._relativeTime[a>0?"future":"past"];return D(c)?c(b):c.replace(/%s/i,b)}function tc(a){var b,c;for(c in a)b=a[c],D(b)?this[c]=b:this["_"+c]=b;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function uc(a,b,c,d){var e=z(),f=h().set(d,b);return e[c](f,a)}function vc(a,b,c,d,e){if("number"==typeof a&&(b=a,a=void 0),a=a||"",null!=b)return uc(a,b,c,e);var f,g=[];for(f=0;d>f;f++)g[f]=uc(a,f,c,e);return g}function wc(a,b){return vc(a,b,"months",12,"month")}function xc(a,b){return vc(a,b,"monthsShort",12,"month")}function yc(a,b){return vc(a,b,"weekdays",7,"day")}function zc(a,b){return vc(a,b,"weekdaysShort",7,"day")}function Ac(a,b){return vc(a,b,"weekdaysMin",7,"day")}function Bc(){var a=this._data;return this._milliseconds=qf(this._milliseconds),this._days=qf(this._days),this._months=qf(this._months),a.milliseconds=qf(a.milliseconds),a.seconds=qf(a.seconds),a.minutes=qf(a.minutes),a.hours=qf(a.hours),a.months=qf(a.months),a.years=qf(a.years),this}function Cc(a,b,c,d){var e=Za(b,c);return a._milliseconds+=d*e._milliseconds,a._days+=d*e._days,a._months+=d*e._months,a._bubble()}function Dc(a,b){return Cc(this,a,b,1)}function Ec(a,b){return Cc(this,a,b,-1)}function Fc(a){return 0>a?Math.floor(a):Math.ceil(a)}function Gc(){var a,b,c,d,e,f=this._milliseconds,g=this._days,h=this._months,i=this._data;return f>=0&&g>=0&&h>=0||0>=f&&0>=g&&0>=h||(f+=864e5*Fc(Ic(h)+g),g=0,h=0),i.milliseconds=f%1e3,a=q(f/1e3),i.seconds=a%60,b=q(a/60),i.minutes=b%60,c=q(b/60),i.hours=c%24,g+=q(c/24),e=q(Hc(g)),h+=e,g-=Fc(Ic(e)),d=q(h/12),h%=12,i.days=g,i.months=h,i.years=d,this}function Hc(a){return 4800*a/146097}function Ic(a){return 146097*a/4800}function Jc(a){var b,c,d=this._milliseconds;if(a=B(a),"month"===a||"year"===a)return b=this._days+d/864e5,c=this._months+Hc(b),"month"===a?c:c/12;switch(b=this._days+Math.round(Ic(this._months)),a){case"week":return b/7+d/6048e5;case"day":return b+d/864e5;case"hour":return 24*b+d/36e5;case"minute":return 1440*b+d/6e4;case"second":return 86400*b+d/1e3;case"millisecond":return Math.floor(864e5*b)+d;default:throw new Error("Unknown unit "+a)}}function Kc(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*r(this._months/12)}function Lc(a){return function(){return this.as(a)}}function Mc(a){return a=B(a),this[a+"s"]()}function Nc(a){return function(){return this._data[a]}}function Oc(){return q(this.days()/7)}function Pc(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function Qc(a,b,c){var d=Za(a).abs(),e=Gf(d.as("s")),f=Gf(d.as("m")),g=Gf(d.as("h")),h=Gf(d.as("d")),i=Gf(d.as("M")),j=Gf(d.as("y")),k=e=f&&["m"]||f=g&&["h"]||g=h&&["d"]||h=i&&["M"]||i=j&&["y"]||["yy",j];return k[2]=b,k[3]=+a>0,k[4]=c,Pc.apply(null,k)}function Rc(a,b){return void 0===Hf[a]?!1:void 0===b?Hf[a]:(Hf[a]=b,!0)}function Sc(a){var b=this.localeData(),c=Qc(this,!a,b);return a&&(c=b.pastFuture(+this,c)),b.postformat(c)}function Tc(){var a,b,c,d=If(this._milliseconds)/1e3,e=If(this._days),f=If(this._months);a=q(d/60),b=q(a/60),d%=60,a%=60,c=q(f/12),f%=12;var g=c,h=f,i=e,j=b,k=a,l=d,m=this.asSeconds();return m?(0>m?"-":"")+"P"+(g?g+"Y":"")+(h?h+"M":"")+(i?i+"D":"")+(j||k||l?"T":"")+(j?j+"H":"")+(k?k+"M":"")+(l?l+"S":""):"P0D"} -//! moment.js locale configuration -//! locale : belarusian (be) -//! author : Dmitry Demidov : https://github.com/demidov91 -//! author: Praleska: http://praleska.pro/ -//! Author : Menelion Elensúle : https://github.com/Oire -function Uc(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Vc(a,b,c){var d={mm:b?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:b?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===c?b?"хвіліна":"хвіліну":"h"===c?b?"гадзіна":"гадзіну":a+" "+Uc(d[c],+a)} -//! moment.js locale configuration -//! locale : breton (br) -//! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou -function Wc(a,b,c){var d={mm:"munutenn",MM:"miz",dd:"devezh"};return a+" "+Zc(d[c],a)}function Xc(a){switch(Yc(a)){case 1:case 3:case 4:case 5:case 9:return a+" bloaz";default:return a+" vloaz"}}function Yc(a){return a>9?Yc(a%10):a}function Zc(a,b){return 2===b?$c(a):a}function $c(a){var b={m:"v",b:"v",d:"z"};return void 0===b[a.charAt(0)]?a:b[a.charAt(0)]+a.substring(1)} -//! moment.js locale configuration -//! locale : bosnian (bs) -//! author : Nedim Cholich : https://github.com/frontyard -//! based on (hr) translation by Bojan Marković -function _c(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function ad(a){return a>1&&5>a&&1!==~~(a/10)}function bd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekund":"pár sekundami";case"m":return b?"minuta":d?"minutu":"minutou";case"mm":return b||d?e+(ad(a)?"minuty":"minut"):e+"minutami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(ad(a)?"hodiny":"hodin"):e+"hodinami";break;case"d":return b||d?"den":"dnem";case"dd":return b||d?e+(ad(a)?"dny":"dní"):e+"dny";break;case"M":return b||d?"měsíc":"měsícem";case"MM":return b||d?e+(ad(a)?"měsíce":"měsíců"):e+"měsíci";break;case"y":return b||d?"rok":"rokem";case"yy":return b||d?e+(ad(a)?"roky":"let"):e+"lety"}} -//! moment.js locale configuration -//! locale : austrian german (de-at) -//! author : lluchs : https://github.com/lluchs -//! author: Menelion Elensúle: https://github.com/Oire -//! author : Martin Groller : https://github.com/MadMG -//! author : Mikolaj Dadela : https://github.com/mik01aj -function cd(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]} -//! moment.js locale configuration -//! locale : german (de) -//! author : lluchs : https://github.com/lluchs -//! author: Menelion Elensúle: https://github.com/Oire -//! author : Mikolaj Dadela : https://github.com/mik01aj -function dd(a,b,c,d){var e={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[a+" Tage",a+" Tagen"],M:["ein Monat","einem Monat"],MM:[a+" Monate",a+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[a+" Jahre",a+" Jahren"]};return b?e[c][0]:e[c][1]} -//! moment.js locale configuration -//! locale : estonian (et) -//! author : Henry Kehlmann : https://github.com/madhenry -//! improvements : Illimar Tambek : https://github.com/ragulka -function ed(a,b,c,d){var e={s:["mõne sekundi","mõni sekund","paar sekundit"],m:["ühe minuti","üks minut"],mm:[a+" minuti",a+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[a+" tunni",a+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[a+" kuu",a+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[a+" aasta",a+" aastat"]};return b?e[c][2]?e[c][2]:e[c][1]:d?e[c][0]:e[c][1]}function fd(a,b,c,d){var e="";switch(c){case"s":return d?"muutaman sekunnin":"muutama sekunti";case"m":return d?"minuutin":"minuutti";case"mm":e=d?"minuutin":"minuuttia";break;case"h":return d?"tunnin":"tunti";case"hh":e=d?"tunnin":"tuntia";break;case"d":return d?"päivän":"päivä";case"dd":e=d?"päivän":"päivää";break;case"M":return d?"kuukauden":"kuukausi";case"MM":e=d?"kuukauden":"kuukautta";break;case"y":return d?"vuoden":"vuosi";case"yy":e=d?"vuoden":"vuotta"}return e=gd(a,d)+" "+e}function gd(a,b){return 10>a?b?fg[a]:eg[a]:a} -//! moment.js locale configuration -//! locale : hrvatski (hr) -//! author : Bojan Marković : https://github.com/bmarkovic -function hd(a,b,c){var d=a+" ";switch(c){case"m":return b?"jedna minuta":"jedne minute";case"mm":return d+=1===a?"minuta":2===a||3===a||4===a?"minute":"minuta";case"h":return b?"jedan sat":"jednog sata";case"hh":return d+=1===a?"sat":2===a||3===a||4===a?"sata":"sati";case"dd":return d+=1===a?"dan":"dana";case"MM":return d+=1===a?"mjesec":2===a||3===a||4===a?"mjeseca":"mjeseci";case"yy":return d+=1===a?"godina":2===a||3===a||4===a?"godine":"godina"}}function id(a,b,c,d){var e=a;switch(c){case"s":return d||b?"néhány másodperc":"néhány másodperce";case"m":return"egy"+(d||b?" perc":" perce");case"mm":return e+(d||b?" perc":" perce");case"h":return"egy"+(d||b?" óra":" órája");case"hh":return e+(d||b?" óra":" órája");case"d":return"egy"+(d||b?" nap":" napja");case"dd":return e+(d||b?" nap":" napja");case"M":return"egy"+(d||b?" hónap":" hónapja");case"MM":return e+(d||b?" hónap":" hónapja");case"y":return"egy"+(d||b?" év":" éve");case"yy":return e+(d||b?" év":" éve")}return""}function jd(a){return(a?"":"[múlt] ")+"["+pg[this.day()]+"] LT[-kor]"} -//! moment.js locale configuration -//! locale : icelandic (is) -//! author : Hinrik Örn Sigurðsson : https://github.com/hinrik -function kd(a){return a%100===11?!0:a%10===1?!1:!0}function ld(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nokkrar sekúndur":"nokkrum sekúndum";case"m":return b?"mínúta":"mínútu";case"mm":return kd(a)?e+(b||d?"mínútur":"mínútum"):b?e+"mínúta":e+"mínútu";case"hh":return kd(a)?e+(b||d?"klukkustundir":"klukkustundum"):e+"klukkustund";case"d":return b?"dagur":d?"dag":"degi";case"dd":return kd(a)?b?e+"dagar":e+(d?"daga":"dögum"):b?e+"dagur":e+(d?"dag":"degi");case"M":return b?"mánuður":d?"mánuð":"mánuði";case"MM":return kd(a)?b?e+"mánuðir":e+(d?"mánuði":"mánuðum"):b?e+"mánuður":e+(d?"mánuð":"mánuði");case"y":return b||d?"ár":"ári";case"yy":return kd(a)?e+(b||d?"ár":"árum"):e+(b||d?"ár":"ári")}} -//! moment.js locale configuration -//! locale : Luxembourgish (lb) -//! author : mweimerskirch : https://github.com/mweimerskirch, David Raison : https://github.com/kwisatz -function md(a,b,c,d){var e={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return b?e[c][0]:e[c][1]}function nd(a){var b=a.substr(0,a.indexOf(" "));return pd(b)?"a "+a:"an "+a}function od(a){var b=a.substr(0,a.indexOf(" "));return pd(b)?"viru "+a:"virun "+a}function pd(a){if(a=parseInt(a,10),isNaN(a))return!1;if(0>a)return!0;if(10>a)return a>=4&&7>=a?!0:!1;if(100>a){var b=a%10,c=a/10;return pd(0===b?c:b)}if(1e4>a){for(;a>=10;)a/=10;return pd(a)}return a/=1e3,pd(a)}function qd(a,b,c,d){return b?"kelios sekundės":d?"kelių sekundžių":"kelias sekundes"}function rd(a,b,c,d){return b?td(c)[0]:d?td(c)[1]:td(c)[2]}function sd(a){return a%10===0||a>10&&20>a}function td(a){return rg[a].split("_")}function ud(a,b,c,d){var e=a+" ";return 1===a?e+rd(a,b,c[0],d):b?e+(sd(a)?td(c)[1]:td(c)[0]):d?e+td(c)[1]:e+(sd(a)?td(c)[1]:td(c)[2])}function vd(a,b,c){return c?b%10===1&&11!==b?a[2]:a[3]:b%10===1&&11!==b?a[0]:a[1]}function wd(a,b,c){return a+" "+vd(sg[c],a,b)}function xd(a,b,c){return vd(sg[c],a,b)}function yd(a,b){return b?"dažas sekundes":"dažām sekundēm"}function zd(a,b,c,d){var e="";if(b)switch(c){case"s":e="काही सेकंद";break;case"m":e="एक मिनिट";break;case"mm":e="%d मिनिटे";break;case"h":e="एक तास";break;case"hh":e="%d तास";break;case"d":e="एक दिवस";break;case"dd":e="%d दिवस";break;case"M":e="एक महिना";break;case"MM":e="%d महिने";break;case"y":e="एक वर्ष";break;case"yy":e="%d वर्षे"}else switch(c){case"s":e="काही सेकंदां";break;case"m":e="एका मिनिटा";break;case"mm":e="%d मिनिटां";break;case"h":e="एका तासा";break;case"hh":e="%d तासां";break;case"d":e="एका दिवसा";break;case"dd":e="%d दिवसां";break;case"M":e="एका महिन्या";break;case"MM":e="%d महिन्यां";break;case"y":e="एका वर्षा";break;case"yy":e="%d वर्षां"}return e.replace(/%d/i,a)}function Ad(a){return 5>a%10&&a%10>1&&~~(a/10)%10!==1}function Bd(a,b,c){var d=a+" ";switch(c){case"m":return b?"minuta":"minutę";case"mm":return d+(Ad(a)?"minuty":"minut");case"h":return b?"godzina":"godzinę";case"hh":return d+(Ad(a)?"godziny":"godzin");case"MM":return d+(Ad(a)?"miesiące":"miesięcy");case"yy":return d+(Ad(a)?"lata":"lat")}} -//! moment.js locale configuration -//! locale : romanian (ro) -//! author : Vlad Gurdiga : https://github.com/gurdiga -//! author : Valentin Agachi : https://github.com/avaly -function Cd(a,b,c){var d={mm:"minute",hh:"ore",dd:"zile",MM:"luni",yy:"ani"},e=" ";return(a%100>=20||a>=100&&a%100===0)&&(e=" de "),a+e+d[c]} -//! moment.js locale configuration -//! locale : russian (ru) -//! author : Viktorminator : https://github.com/Viktorminator -//! Author : Menelion Elensúle : https://github.com/Oire -function Dd(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Ed(a,b,c){var d={mm:b?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===c?b?"минута":"минуту":a+" "+Dd(d[c],+a)}function Fd(a){return a>1&&5>a}function Gd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"pár sekúnd":"pár sekundami";case"m":return b?"minúta":d?"minútu":"minútou";case"mm":return b||d?e+(Fd(a)?"minúty":"minút"):e+"minútami";break;case"h":return b?"hodina":d?"hodinu":"hodinou";case"hh":return b||d?e+(Fd(a)?"hodiny":"hodín"):e+"hodinami";break;case"d":return b||d?"deň":"dňom";case"dd":return b||d?e+(Fd(a)?"dni":"dní"):e+"dňami";break;case"M":return b||d?"mesiac":"mesiacom";case"MM":return b||d?e+(Fd(a)?"mesiace":"mesiacov"):e+"mesiacmi";break;case"y":return b||d?"rok":"rokom";case"yy":return b||d?e+(Fd(a)?"roky":"rokov"):e+"rokmi"}} -//! moment.js locale configuration -//! locale : slovenian (sl) -//! author : Robert Sedovšek : https://github.com/sedovsek -function Hd(a,b,c,d){var e=a+" ";switch(c){case"s":return b||d?"nekaj sekund":"nekaj sekundami";case"m":return b?"ena minuta":"eno minuto";case"mm":return e+=1===a?b?"minuta":"minuto":2===a?b||d?"minuti":"minutama":5>a?b||d?"minute":"minutami":b||d?"minut":"minutami";case"h":return b?"ena ura":"eno uro";case"hh":return e+=1===a?b?"ura":"uro":2===a?b||d?"uri":"urama":5>a?b||d?"ure":"urami":b||d?"ur":"urami";case"d":return b||d?"en dan":"enim dnem";case"dd":return e+=1===a?b||d?"dan":"dnem":2===a?b||d?"dni":"dnevoma":b||d?"dni":"dnevi";case"M":return b||d?"en mesec":"enim mesecem";case"MM":return e+=1===a?b||d?"mesec":"mesecem":2===a?b||d?"meseca":"mesecema":5>a?b||d?"mesece":"meseci":b||d?"mesecev":"meseci";case"y":return b||d?"eno leto":"enim letom";case"yy":return e+=1===a?b||d?"leto":"letom":2===a?b||d?"leti":"letoma":5>a?b||d?"leta":"leti":b||d?"let":"leti"}}function Id(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"leS":-1!==a.indexOf("jar")?b.slice(0,-3)+"waQ":-1!==a.indexOf("DIS")?b.slice(0,-3)+"nem":b+" pIq"}function Jd(a){var b=a;return b=-1!==a.indexOf("jaj")?b.slice(0,-3)+"Hu’":-1!==a.indexOf("jar")?b.slice(0,-3)+"wen":-1!==a.indexOf("DIS")?b.slice(0,-3)+"ben":b+" ret"}function Kd(a,b,c,d){var e=Ld(a);switch(c){case"mm":return e+" tup";case"hh":return e+" rep";case"dd":return e+" jaj";case"MM":return e+" jar";case"yy":return e+" DIS"}}function Ld(a){var b=Math.floor(a%1e3/100),c=Math.floor(a%100/10),d=a%10,e="";return b>0&&(e+=Lg[b]+"vatlh"),c>0&&(e+=(""!==e?" ":"")+Lg[c]+"maH"),d>0&&(e+=(""!==e?" ":"")+Lg[d]),""===e?"pagh":e}function Md(a,b,c,d){var e={s:["viensas secunds","'iensas secunds"],m:["'n míut","'iens míut"],mm:[a+" míuts",""+a+" míuts"],h:["'n þora","'iensa þora"],hh:[a+" þoras",""+a+" þoras"],d:["'n ziua","'iensa ziua"],dd:[a+" ziuas",""+a+" ziuas"],M:["'n mes","'iens mes"],MM:[a+" mesen",""+a+" mesen"],y:["'n ar","'iens ar"],yy:[a+" ars",""+a+" ars"]};return d?e[c][0]:b?e[c][0]:e[c][1]} -//! moment.js locale configuration -//! locale : ukrainian (uk) -//! author : zemlanin : https://github.com/zemlanin -//! Author : Menelion Elensúle : https://github.com/Oire -function Nd(a,b){var c=a.split("_");return b%10===1&&b%100!==11?c[0]:b%10>=2&&4>=b%10&&(10>b%100||b%100>=20)?c[1]:c[2]}function Od(a,b,c){var d={mm:b?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:b?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===c?b?"хвилина":"хвилину":"h"===c?b?"година":"годину":a+" "+Nd(d[c],+a)}function Pd(a,b){var c={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")},d=/(\[[ВвУу]\]) ?dddd/.test(b)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(b)?"genitive":"nominative";return c[d][a.day()]}function Qd(a){return function(){return a+"о"+(11===this.hours()?"б":"")+"] LT"}}var Rd,Sd,Td=a.momentProperties=[],Ud=!1,Vd={},Wd={},Xd=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Yd=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Zd={},$d={},_d=/\d/,ae=/\d\d/,be=/\d{3}/,ce=/\d{4}/,de=/[+-]?\d{6}/,ee=/\d\d?/,fe=/\d\d\d\d?/,ge=/\d\d\d\d\d\d?/,he=/\d{1,3}/,ie=/\d{1,4}/,je=/[+-]?\d{1,6}/,ke=/\d+/,le=/[+-]?\d+/,me=/Z|[+-]\d\d:?\d\d/gi,ne=/Z|[+-]\d\d(?::?\d\d)?/gi,oe=/[+-]?\d+(\.\d{1,3})?/,pe=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,qe={},re={},se=0,te=1,ue=2,ve=3,we=4,xe=5,ye=6,ze=7,Ae=8;J("M",["MM",2],"Mo",function(){return this.month()+1}),J("MMM",0,0,function(a){return this.localeData().monthsShort(this,a)}),J("MMMM",0,0,function(a){return this.localeData().months(this,a)}),A("month","M"),O("M",ee),O("MM",ee,ae),O("MMM",function(a,b){return b.monthsShortRegex(a)}),O("MMMM",function(a,b){return b.monthsRegex(a)}),S(["M","MM"],function(a,b){b[te]=r(a)-1}),S(["MMM","MMMM"],function(a,b,c,d){var e=c._locale.monthsParse(a,d,c._strict);null!=e?b[te]=e:j(c).invalidMonth=a});var Be=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Ce="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Ee=pe,Fe=pe,Ge={};a.suppressDeprecationWarnings=!1;var He=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Ie=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,Je=/Z|[+-]\d\d(?::?\d\d)?/,Ke=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Le=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Me=/^\/?Date\((\-?\d+)/i;a.createFromInputFallback=fa("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i+(a._useUTC?" UTC":""))}),J("Y",0,0,function(){var a=this.year();return 9999>=a?""+a:"+"+a}),J(0,["YY",2],0,function(){return this.year()%100}),J(0,["YYYY",4],0,"year"),J(0,["YYYYY",5],0,"year"),J(0,["YYYYYY",6,!0],0,"year"),A("year","y"),O("Y",le),O("YY",ee,ae),O("YYYY",ie,ce),O("YYYYY",je,de),O("YYYYYY",je,de),S(["YYYYY","YYYYYY"],se),S("YYYY",function(b,c){c[se]=2===b.length?a.parseTwoDigitYear(b):r(b)}),S("YY",function(b,c){c[se]=a.parseTwoDigitYear(b)}),S("Y",function(a,b){b[se]=parseInt(a,10)}),a.parseTwoDigitYear=function(a){return r(a)+(r(a)>68?1900:2e3)};var Ne=E("FullYear",!1);a.ISO_8601=function(){};var Oe=fa("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?this>a?this:a:l()}),Pe=fa("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var a=Ea.apply(null,arguments);return this.isValid()&&a.isValid()?a>this?this:a:l()}),Qe=function(){return Date.now?Date.now():+new Date};Ka("Z",":"),Ka("ZZ",""),O("Z",ne),O("ZZ",ne),S(["Z","ZZ"],function(a,b,c){c._useUTC=!0,c._tzm=La(ne,a)});var Re=/([\+\-]|\d\d)/gi;a.updateOffset=function(){};var Se=/(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,Te=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;Za.fn=Ia.prototype;var Ue=bb(1,"add"),Ve=bb(-1,"subtract");a.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var We=fa("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(a){return void 0===a?this.localeData():this.locale(a)});J(0,["gg",2],0,function(){return this.weekYear()%100}),J(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Ib("gggg","weekYear"),Ib("ggggg","weekYear"),Ib("GGGG","isoWeekYear"),Ib("GGGGG","isoWeekYear"),A("weekYear","gg"),A("isoWeekYear","GG"),O("G",le),O("g",le),O("GG",ee,ae),O("gg",ee,ae),O("GGGG",ie,ce),O("gggg",ie,ce),O("GGGGG",je,de),O("ggggg",je,de),T(["gggg","ggggg","GGGG","GGGGG"],function(a,b,c,d){b[d.substr(0,2)]=r(a)}),T(["gg","GG"],function(b,c,d,e){c[e]=a.parseTwoDigitYear(b)}),J("Q",0,"Qo","quarter"),A("quarter","Q"),O("Q",_d),S("Q",function(a,b){b[te]=3*(r(a)-1)}),J("w",["ww",2],"wo","week"),J("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),O("w",ee),O("ww",ee,ae),O("W",ee),O("WW",ee,ae),T(["w","ww","W","WW"],function(a,b,c,d){b[d.substr(0,1)]=r(a)});var Xe={dow:0,doy:6};J("D",["DD",2],"Do","date"),A("date","D"),O("D",ee),O("DD",ee,ae),O("Do",function(a,b){return a?b._ordinalParse:b._ordinalParseLenient}),S(["D","DD"],ue),S("Do",function(a,b){b[ue]=r(a.match(ee)[0],10)});var Ye=E("Date",!0);J("d",0,"do","day"),J("dd",0,0,function(a){return this.localeData().weekdaysMin(this,a)}),J("ddd",0,0,function(a){return this.localeData().weekdaysShort(this,a)}),J("dddd",0,0,function(a){return this.localeData().weekdays(this,a)}),J("e",0,0,"weekday"),J("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),O("d",ee),O("e",ee),O("E",ee),O("dd",pe),O("ddd",pe),O("dddd",pe),T(["dd","ddd","dddd"],function(a,b,c,d){var e=c._locale.weekdaysParse(a,d,c._strict);null!=e?b.d=e:j(c).invalidWeekday=a}),T(["d","e","E"],function(a,b,c,d){b[d]=r(a)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),$e="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),_e="Su_Mo_Tu_We_Th_Fr_Sa".split("_");J("DDD",["DDDD",3],"DDDo","dayOfYear"),A("dayOfYear","DDD"),O("DDD",he),O("DDDD",be),S(["DDD","DDDD"],function(a,b,c){c._dayOfYear=r(a)}),J("H",["HH",2],0,"hour"),J("h",["hh",2],0,cc),J("hmm",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)}),J("hmmss",0,0,function(){return""+cc.apply(this)+I(this.minutes(),2)+I(this.seconds(),2)}),J("Hmm",0,0,function(){return""+this.hours()+I(this.minutes(),2)}),J("Hmmss",0,0,function(){return""+this.hours()+I(this.minutes(),2)+I(this.seconds(),2)}),dc("a",!0),dc("A",!1),A("hour","h"),O("a",ec),O("A",ec),O("H",ee),O("h",ee),O("HH",ee,ae),O("hh",ee,ae),O("hmm",fe),O("hmmss",ge),O("Hmm",fe),O("Hmmss",ge),S(["H","HH"],ve),S(["a","A"],function(a,b,c){c._isPm=c._locale.isPM(a),c._meridiem=a}),S(["h","hh"],function(a,b,c){b[ve]=r(a),j(c).bigHour=!0}),S("hmm",function(a,b,c){var d=a.length-2;b[ve]=r(a.substr(0,d)),b[we]=r(a.substr(d)),j(c).bigHour=!0}),S("hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[ve]=r(a.substr(0,d)),b[we]=r(a.substr(d,2)),b[xe]=r(a.substr(e)),j(c).bigHour=!0}),S("Hmm",function(a,b,c){var d=a.length-2;b[ve]=r(a.substr(0,d)),b[we]=r(a.substr(d))}),S("Hmmss",function(a,b,c){var d=a.length-4,e=a.length-2;b[ve]=r(a.substr(0,d)),b[we]=r(a.substr(d,2)),b[xe]=r(a.substr(e))});var af=/[ap]\.?m?\.?/i,bf=E("Hours",!0);J("m",["mm",2],0,"minute"),A("minute","m"),O("m",ee),O("mm",ee,ae),S(["m","mm"],we);var cf=E("Minutes",!1);J("s",["ss",2],0,"second"),A("second","s"),O("s",ee),O("ss",ee,ae),S(["s","ss"],xe);var df=E("Seconds",!1);J("S",0,0,function(){return~~(this.millisecond()/100)}),J(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),J(0,["SSS",3],0,"millisecond"),J(0,["SSSS",4],0,function(){return 10*this.millisecond()}),J(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),J(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),J(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),J(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),J(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),A("millisecond","ms"),O("S",he,_d),O("SS",he,ae),O("SSS",he,be);var ef;for(ef="SSSS";ef.length<=9;ef+="S")O(ef,ke);for(ef="S";ef.length<=9;ef+="S")S(ef,hc);var ff=E("Milliseconds",!1);J("z",0,0,"zoneAbbr"),J("zz",0,0,"zoneName");var gf=o.prototype;gf.add=Ue,gf.calendar=db,gf.clone=eb,gf.diff=lb,gf.endOf=xb,gf.format=pb,gf.from=qb,gf.fromNow=rb,gf.to=sb,gf.toNow=tb,gf.get=H,gf.invalidAt=Gb,gf.isAfter=fb,gf.isBefore=gb,gf.isBetween=hb,gf.isSame=ib,gf.isSameOrAfter=jb,gf.isSameOrBefore=kb,gf.isValid=Eb,gf.lang=We,gf.locale=ub,gf.localeData=vb,gf.max=Pe,gf.min=Oe,gf.parsingFlags=Fb,gf.set=H,gf.startOf=wb,gf.subtract=Ve,gf.toArray=Bb,gf.toObject=Cb,gf.toDate=Ab,gf.toISOString=ob,gf.toJSON=Db,gf.toString=nb,gf.unix=zb,gf.valueOf=yb,gf.creationData=Hb,gf.year=Ne,gf.isLeapYear=na,gf.weekYear=Jb,gf.isoWeekYear=Kb,gf.quarter=gf.quarters=Pb,gf.month=$,gf.daysInMonth=_,gf.week=gf.weeks=Tb,gf.isoWeek=gf.isoWeeks=Ub,gf.weeksInYear=Mb,gf.isoWeeksInYear=Lb,gf.date=Ye,gf.day=gf.days=$b,gf.weekday=_b,gf.isoWeekday=ac,gf.dayOfYear=bc,gf.hour=gf.hours=bf,gf.minute=gf.minutes=cf,gf.second=gf.seconds=df,gf.millisecond=gf.milliseconds=ff,gf.utcOffset=Oa,gf.utc=Qa,gf.local=Ra,gf.parseZone=Sa,gf.hasAlignedHourOffset=Ta,gf.isDST=Ua,gf.isDSTShifted=Va,gf.isLocal=Wa,gf.isUtcOffset=Xa,gf.isUtc=Ya,gf.isUTC=Ya,gf.zoneAbbr=ic,gf.zoneName=jc,gf.dates=fa("dates accessor is deprecated. Use date instead.",Ye),gf.months=fa("months accessor is deprecated. Use month instead",$),gf.years=fa("years accessor is deprecated. Use year instead",Ne),gf.zone=fa("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Pa);var hf=gf,jf={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},kf={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},lf="Invalid date",mf="%d",nf=/\d{1,2}/,of={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},pf=t.prototype;pf._calendar=jf,pf.calendar=mc,pf._longDateFormat=kf,pf.longDateFormat=nc,pf._invalidDate=lf,pf.invalidDate=oc,pf._ordinal=mf,pf.ordinal=pc,pf._ordinalParse=nf,pf.preparse=qc,pf.postformat=qc,pf._relativeTime=of,pf.relativeTime=rc,pf.pastFuture=sc,pf.set=tc,pf.months=W,pf._months=Ce,pf.monthsShort=X,pf._monthsShort=De,pf.monthsParse=Y,pf._monthsRegex=Fe,pf.monthsRegex=ba,pf._monthsShortRegex=Ee,pf.monthsShortRegex=aa,pf.week=Qb,pf._week=Xe,pf.firstDayOfYear=Sb,pf.firstDayOfWeek=Rb,pf.weekdays=Wb,pf._weekdays=Ze,pf.weekdaysMin=Yb,pf._weekdaysMin=_e,pf.weekdaysShort=Xb,pf._weekdaysShort=$e,pf.weekdaysParse=Zb,pf.isPM=fc,pf._meridiemParse=af,pf.meridiem=gc,x("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(a){var b=a%10,c=1===r(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),a.lang=fa("moment.lang is deprecated. Use moment.locale instead.",x),a.langData=fa("moment.langData is deprecated. Use moment.localeData instead.",z);var qf=Math.abs,rf=Lc("ms"),sf=Lc("s"),tf=Lc("m"),uf=Lc("h"),vf=Lc("d"),wf=Lc("w"),xf=Lc("M"),yf=Lc("y"),zf=Nc("milliseconds"),Af=Nc("seconds"),Bf=Nc("minutes"),Cf=Nc("hours"),Df=Nc("days"),Ef=Nc("months"),Ff=Nc("years"),Gf=Math.round,Hf={s:45,m:45,h:22,d:26,M:11},If=Math.abs,Jf=Ia.prototype;Jf.abs=Bc,Jf.add=Dc,Jf.subtract=Ec,Jf.as=Jc,Jf.asMilliseconds=rf,Jf.asSeconds=sf,Jf.asMinutes=tf,Jf.asHours=uf,Jf.asDays=vf,Jf.asWeeks=wf,Jf.asMonths=xf,Jf.asYears=yf,Jf.valueOf=Kc,Jf._bubble=Gc,Jf.get=Mc,Jf.milliseconds=zf,Jf.seconds=Af,Jf.minutes=Bf,Jf.hours=Cf,Jf.days=Df,Jf.weeks=Oc,Jf.months=Ef,Jf.years=Ff,Jf.humanize=Sc,Jf.toISOString=Tc,Jf.toString=Tc,Jf.toJSON=Tc,Jf.locale=ub,Jf.localeData=vb,Jf.toIsoString=fa("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Tc),Jf.lang=We,J("X",0,0,"unix"),J("x",0,0,"valueOf"),O("x",le),O("X",oe),S("X",function(a,b,c){c._d=new Date(1e3*parseFloat(a,10))}),S("x",function(a,b,c){c._d=new Date(r(a))}), -//! moment.js -//! version : 2.11.1 -//! authors : Tim Wood, Iskren Chernev, Moment.js contributors -//! license : MIT -//! momentjs.com -a.version="2.11.1",b(Ea),a.fn=hf,a.min=Ga,a.max=Ha,a.now=Qe,a.utc=h,a.unix=kc,a.months=wc,a.isDate=d,a.locale=x,a.invalid=l,a.duration=Za,a.isMoment=p,a.weekdays=yc,a.parseZone=lc,a.localeData=z,a.isDuration=Ja,a.monthsShort=xc,a.weekdaysMin=Ac,a.defineLocale=y,a.weekdaysShort=zc,a.normalizeUnits=B,a.relativeTimeThreshold=Rc,a.prototype=hf;var Kf=a,Lf=(Kf.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(a){return/^nm$/i.test(a)},meridiem:function(a,b,c){return 12>a?c?"vm":"VM":c?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}}),Kf.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:6,doy:12}}),{1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"}),Mf={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},Nf=(Kf.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(a){return a.replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(a){return Mf[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return Lf[a]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),Kf.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}}),{1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"}),Of={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},Pf=function(a){return 0===a?0:1===a?1:2===a?2:a%100>=3&&10>=a%100?3:a%100>=11?4:5},Qf={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},Rf=function(a){return function(b,c,d,e){var f=Pf(b),g=Qf[a][Pf(b)];return 2===f&&(g=g[c?0:1]),g.replace(/%d/i,b)}},Sf=["كانون الثاني يناير","شباط فبراير","آذار مارس","نيسان أبريل","أيار مايو","حزيران يونيو","تموز يوليو","آب أغسطس","أيلول سبتمبر","تشرين الأول أكتوبر","تشرين الثاني نوفمبر","كانون الأول ديسمبر"],Tf=(Kf.defineLocale("ar",{months:Sf,monthsShort:Sf,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/‏M/‏YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(a){return"م"===a},meridiem:function(a,b,c){return 12>a?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:Rf("s"),m:Rf("m"),mm:Rf("m"),h:Rf("h"),hh:Rf("h"),d:Rf("d"),dd:Rf("d"),M:Rf("M"),MM:Rf("M"),y:Rf("y"),yy:Rf("y")},preparse:function(a){return a.replace(/\u200f/g,"").replace(/[١٢٣٤٥٦٧٨٩٠]/g,function(a){return Of[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return Nf[a]}).replace(/,/g,"،")},week:{dow:6,doy:12}}),{1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"}),Uf=(Kf.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"birneçə saniyyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(a){return/^(gündüz|axşam)$/.test(a)},meridiem:function(a,b,c){return 4>a?"gecə":12>a?"səhər":17>a?"gündüz":"axşam"},ordinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(a){if(0===a)return a+"-ıncı";var b=a%10,c=a%100-b,d=a>=100?100:null;return a+(Tf[b]||Tf[c]||Tf[d])},week:{dow:1,doy:7}}),Kf.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Вв] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:Vc,mm:Vc,h:Vc,hh:Vc,d:"дзень",dd:Vc,M:"месяц",MM:Vc,y:"год",yy:Vc},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(a){return/^(дня|вечара)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночы":12>a?"раніцы":17>a?"дня":"вечара"},ordinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a%10!==2&&a%10!==3||a%100===12||a%100===13?a+"-ы":a+"-і";case"D":return a+"-га";default:return a}},week:{dow:1,doy:7}}),Kf.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"янр_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[В изминалата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[В изминалия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дни",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-ти":1===b?a+"-ви":2===b?a+"-ри":7===b||8===b?a+"-ми":a+"-ти"},week:{dow:1,doy:7}}),{1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"}),Vf={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},Wf=(Kf.defineLocale("bn",{months:"জানুয়ারী_ফেবুয়ারী_মার্চ_এপ্রিল_মে_জুন_জুলাই_অগাস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব_মার্চ_এপর_মে_জুন_জুল_অগ_সেপ্ট_অক্টো_নভ_ডিসেম্".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পত্তিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পত্তি_শুক্র_শনি".split("_"),weekdaysMin:"রব_সম_মঙ্গ_বু_ব্রিহ_শু_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(a){return a.replace(/[১২৩৪৫৬৭৮৯০]/g,function(a){return Vf[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Uf[a]})},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,isPM:function(a){return/^(দুপুর|বিকাল|রাত)$/.test(a)},meridiem:function(a,b,c){return 4>a?"রাত":10>a?"সকাল":17>a?"দুপুর":20>a?"বিকাল":"রাত"},week:{dow:0,doy:6}}),{1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"}),Xf={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},Yf=(Kf.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(a){return a.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,function(a){return Xf[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Wf[a]})},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,isPM:function(a){return/^(ཉིན་གུང|དགོང་དག|མཚན་མོ)$/.test(a)},meridiem:function(a,b,c){return 4>a?"མཚན་མོ":10>a?"ཞོགས་ཀས":17>a?"ཉིན་གུང":20>a?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}}),Kf.defineLocale("br",{months:"Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),longDateFormat:{LT:"h[e]mm A",LTS:"h[e]mm:ss A",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY h[e]mm A",LLLL:"dddd, D [a viz] MMMM YYYY h[e]mm A"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc'hoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec'h da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s 'zo",s:"un nebeud segondennoù",m:"ur vunutenn",mm:Wc,h:"un eur",hh:"%d eur",d:"un devezh",dd:Wc,M:"ur miz",MM:Wc,y:"ur bloaz",yy:Xc},ordinalParse:/\d{1,2}(añ|vet)/,ordinal:function(a){var b=1===a?"añ":"vet";return a+b},week:{dow:1,doy:4}}),Kf.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:_c,mm:_c,h:_c,hh:_c,d:"dan",dd:_c,M:"mjesec",MM:_c,y:"godinu",yy:_c},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),Kf.defineLocale("ca",{months:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),monthsShort:"gen._febr._mar._abr._mai._jun._jul._ag._set._oct._nov._des.".split("_"),weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(a,b){var c=1===a?"r":2===a?"n":3===a?"r":4===a?"t":"è";return("w"===b||"W"===b)&&(c="a"),a+c},week:{dow:1,doy:4}}),"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_")),Zf="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),$f=(Kf.defineLocale("cs",{months:Yf,monthsShort:Zf,monthsParse:function(a,b){var c,d=[];for(c=0;12>c;c++)d[c]=new RegExp("^"+a[c]+"$|^"+b[c]+"$","i");return d}(Yf,Zf),shortMonthsParse:function(a){var b,c=[];for(b=0;12>b;b++)c[b]=new RegExp("^"+a[b]+"$","i");return c}(Zf),longMonthsParse:function(a){var b,c=[];for(b=0;12>b;b++)c[b]=new RegExp("^"+a[b]+"$","i");return c}(Yf),weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:bd,m:bd,mm:bd,h:bd,hh:bd,d:bd,dd:bd,M:bd,MM:bd,y:bd,yy:bd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(a){var b=/сехет$/i.exec(a)?"рен":/ҫул$/i.exec(a)?"тан":"ран";return a+b},past:"%s каялла",s:"пӗр-ик ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},ordinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}}),Kf.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},ordinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(a){var b=a,c="",d=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return b>20?c=40===b||50===b||60===b||80===b||100===b?"fed":"ain":b>0&&(c=d[b]),a+c},week:{dow:1,doy:4}}),Kf.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY HH:mm"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I går kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:cd,mm:"%d Minuten",h:cd,hh:"%d Stunden",d:cd,dd:cd,M:cd,MM:cd,y:cd,yy:cd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:dd,mm:"%d Minuten",h:dd,hh:"%d Stunden",d:dd,dd:dd,M:dd,MM:dd,y:dd,yy:dd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"]),_f=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],ag=(Kf.defineLocale("dv",{months:$f,monthsShort:$f,weekdays:_f,weekdaysShort:_f,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(a){return""===a},meridiem:function(a,b,c){return 12>a?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(a){return a.replace(/،/g,",")},postformat:function(a){return a.replace(/,/g,"،")},week:{dow:7,doy:12}}),Kf.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(a,b){return/D/.test(b.substring(0,b.indexOf("MMMM")))?this._monthsGenitiveEl[a.month()]:this._monthsNominativeEl[a.month()]},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(a,b,c){return a>11?c?"μμ":"ΜΜ":c?"πμ":"ΠΜ"},isPM:function(a){return"μ"===(a+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(a,b){var c=this._calendarEl[a],d=b&&b.hours();return D(c)&&(c=c.apply(b)),c.replace("{}",d%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},ordinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}}),Kf.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}}),Kf.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY h:mm A",LLLL:"dddd, D MMMM, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Kf.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}}),Kf.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}}),Kf.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ordinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c},week:{dow:1,doy:4}}),Kf.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),weekdays:"Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"), -weekdaysShort:"Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D[-an de] MMMM, YYYY",LLL:"D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd, [la] D[-an de] MMMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(a){return"p"===a.charAt(0).toLowerCase()},meridiem:function(a,b,c){return a>11?c?"p.t.m.":"P.T.M.":c?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd [je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasinta] dddd [je] LT",sameElse:"L"},relativeTime:{future:"je %s",past:"antaŭ %s",s:"sekundoj",m:"minuto",mm:"%d minutoj",h:"horo",hh:"%d horoj",d:"tago",dd:"%d tagoj",M:"monato",MM:"%d monatoj",y:"jaro",yy:"%d jaroj"},ordinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}}),"ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_")),bg="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),cg=(Kf.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?bg[a.month()]:ag[a.month()]},weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),Kf.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:ed,m:ed,mm:ed,h:ed,hh:ed,d:ed,dd:"%d päeva",M:ed,MM:ed,y:ed,yy:ed},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),{1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"}),dg={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},eg=(Kf.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysShort:"یک‌شنبه_دوشنبه_سه‌شنبه_چهارشنبه_پنج‌شنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(a){return/بعد از ظهر/.test(a)},meridiem:function(a,b,c){return 12>a?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چندین ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(a){return a.replace(/[۰-۹]/g,function(a){return dg[a]}).replace(/،/g,",")},postformat:function(a){return a.replace(/\d/g,function(a){return cg[a]}).replace(/,/g,"،")},ordinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}}),"nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" ")),fg=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",eg[7],eg[8],eg[9]],gg=(Kf.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:fd,m:fd,mm:fd,h:fd,hh:fd,d:fd,dd:fd,M:fd,MM:fd,y:fd,yy:fd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",m:"ein minutt",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaði",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")}}),Kf.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|e)/,ordinal:function(a){return a+(1===a?"er":"e")},week:{dow:1,doy:4}}),Kf.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd'hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinalParse:/\d{1,2}(er|)/,ordinal:function(a){return a+(1===a?"er":"")},week:{dow:1,doy:4}}),"jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_")),hg="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),ig=(Kf.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?hg[a.month()]:gg[a.month()]},weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}}),["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"]),jg=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],kg=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],lg=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],mg=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],ng=(Kf.defineLocale("gd",{months:ig,monthsShort:jg,monthsParseExact:!0,weekdays:kg,weekdaysShort:lg,weekdaysMin:mg,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},ordinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(a){var b=1===a?"d":a%10===2?"na":"mh";return a+b},week:{dow:1,doy:4}}),Kf.defineLocale("gl",{months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),weekdaysMin:"Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd D MMMM YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(a){return"uns segundos"===a?"nuns segundos":"en "+a},past:"hai %s",s:"uns segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:7}}),Kf.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(a){return 2===a?"שעתיים":a+" שעות"},d:"יום",dd:function(a){return 2===a?"יומיים":a+" ימים"},M:"חודש",MM:function(a){return 2===a?"חודשיים":a+" חודשים"},y:"שנה",yy:function(a){return 2===a?"שנתיים":a%10===0&&10!==a?a+" שנה":a+" שנים"}}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),og={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},pg=(Kf.defineLocale("hi",{months:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return og[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return ng[a]})},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(a,b){return 12===a&&(a=0),"रात"===b?4>a?a:a+12:"सुबह"===b?a:"दोपहर"===b?a>=10?a:a+12:"शाम"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"रात":10>a?"सुबह":17>a?"दोपहर":20>a?"शाम":"रात"},week:{dow:0,doy:6}}),Kf.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",m:hd,mm:hd,h:hd,hh:hd,d:"dan",dd:hd,M:"mjesec",MM:hd,y:"godinu",yy:hd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),"vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ")),qg=(Kf.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(a){return"u"===a.charAt(1).toLowerCase()},meridiem:function(a,b,c){return 12>a?c===!0?"de":"DE":c===!0?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return jd.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return jd.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:id,m:id,mm:id,h:id,hh:id,d:id,dd:id,M:id,MM:id,y:id,yy:id},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),Kf.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(a){return/^(ցերեկվա|երեկոյան)$/.test(a)},meridiem:function(a){return 4>a?"գիշերվա":12>a?"առավոտվա":17>a?"ցերեկվա":"երեկոյան"},ordinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(a,b){switch(b){case"DDD":case"w":case"W":case"DDDo":return 1===a?a+"-ին":a+"-րդ";default:return a}},week:{dow:1,doy:7}}),Kf.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"siang"===b?a>=11?a:a+12:"sore"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"siang":19>a?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),Kf.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:ld,m:ld,mm:ld,h:"klukkustund",hh:ld,d:ld,dd:ld,M:ld,MM:ld,y:ld,yy:ld},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"Do_Lu_Ma_Me_Gi_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(a){return(/^[0-9].+$/.test(a)?"tra":"in")+" "+a},past:"%s fa",s:"alcuni secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),Kf.defineLocale("ja",{months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"Ah時m分",LTS:"Ah時m分s秒",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah時m分",LLLL:"YYYY年M月D日Ah時m分 dddd"},meridiemParse:/午前|午後/i,isPM:function(a){return"午後"===a},meridiem:function(a,b,c){return 12>a?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:"[来週]dddd LT",lastDay:"[昨日] LT",lastWeek:"[前週]dddd LT",sameElse:"L"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}}),Kf.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(a,b){return 12===a&&(a=0),"enjing"===b?a:"siyang"===b?a>=11?a:a+12:"sonten"===b||"ndalu"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"enjing":15>a?"siyang":19>a?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}}),Kf.defineLocale("ka",{months:{standalone:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),format:"იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს".split("_")},monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(a){return/(წამი|წუთი|საათი|წელი)/.test(a)?a.replace(/ი$/,"ში"):a+"ში"},past:function(a){return/(წამი|წუთი|საათი|დღე|თვე)/.test(a)?a.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(a)?a.replace(/წელი$/,"წლის წინ"):void 0},s:"რამდენიმე წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},ordinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(a){return 0===a?a:1===a?a+"-ლი":20>a||100>=a&&a%20===0||a%100===0?"მე-"+a:a+"-ე"},week:{dow:1,doy:7}}),{0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"}),rg=(Kf.defineLocale("kk",{months:"Қаңтар_Ақпан_Наурыз_Сәуір_Мамыр_Маусым_Шілде_Тамыз_Қыркүйек_Қазан_Қараша_Желтоқсан".split("_"),monthsShort:"Қаң_Ақп_Нау_Сәу_Мам_Мау_Шіл_Там_Қыр_Қаз_Қар_Жел".split("_"),weekdays:"Жексенбі_Дүйсенбі_Сейсенбі_Сәрсенбі_Бейсенбі_Жұма_Сенбі".split("_"),weekdaysShort:"Жек_Дүй_Сей_Сәр_Бей_Жұм_Сен".split("_"),weekdaysMin:"Жк_Дй_Сй_Ср_Бй_Жм_Сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},ordinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(a){var b=a%10,c=a>=100?100:null;return a+(qg[a]||qg[b]||qg[c])},week:{dow:1,doy:7}}),Kf.defineLocale("km",{months:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មិនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysMin:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},week:{dow:1,doy:4}}),Kf.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h시 m분",LTS:"A h시 m분 s초",L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 m분",LLLL:"YYYY년 MMMM D일 dddd A h시 m분"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinalParse:/\d{1,2}일/,ordinal:"%d일",meridiemParse:/오전|오후/,isPM:function(a){return"오후"===a},meridiem:function(a,b,c){return 12>a?"오전":"오후"}}),Kf.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:nd,past:od,s:"e puer Sekonnen",m:md,mm:"%d Minutten",h:md,hh:"%d Stonnen",d:md,dd:"%d Deeg",M:md,MM:"%d Méint",y:md,yy:"%d Joer"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(a){return"ຕອນແລງ"===a},meridiem:function(a,b,c){return 12>a?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},ordinalParse:/(ທີ່)\d{1,2}/,ordinal:function(a){ -return"ທີ່"+a}}),{m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"}),sg=(Kf.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_")},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:qd,m:rd,mm:ud,h:rd,hh:ud,d:rd,dd:ud,M:rd,MM:ud,y:rd,yy:ud},ordinalParse:/\d{1,2}-oji/,ordinal:function(a){return a+"-oji"},week:{dow:1,doy:4}}),{m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")}),tg=(Kf.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:yd,m:xd,mm:wd,h:xd,hh:wd,d:xd,dd:wd,M:xd,MM:wd,y:xd,yy:wd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),{words:{m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=tg.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+tg.correctGrammaticalCase(a,d)}}),ug=(Kf.defineLocale("me",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedjelja","ponedjeljak","utorak","srijeda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sri.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var a=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",m:tg.translate,mm:tg.translate,h:tg.translate,hh:tg.translate,d:"dan",dd:tg.translate,M:"mjesec",MM:tg.translate,y:"godinu",yy:tg.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),Kf.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"после %s",past:"пред %s",s:"неколку секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",M:"месец",MM:"%d месеци",y:"година",yy:"%d години"},ordinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(a){var b=a%10,c=a%100;return 0===a?a+"-ев":0===c?a+"-ен":c>10&&20>c?a+"-ти":1===b?a+"-ви":2===b?a+"-ри":7===b||8===b?a+"-ми":a+"-ти"},week:{dow:1,doy:7}}),Kf.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,isPM:function(a){return/^(ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി)$/.test(a)},meridiem:function(a,b,c){return 4>a?"രാത്രി":12>a?"രാവിലെ":17>a?"ഉച്ച കഴിഞ്ഞ്":20>a?"വൈകുന്നേരം":"രാത്രി"}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),vg={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},wg=(Kf.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:zd,m:zd,mm:zd,h:zd,hh:zd,d:zd,dd:zd,M:zd,MM:zd,y:zd,yy:zd},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return vg[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return ug[a]})},meridiemParse:/रात्री|सकाळी|दुपारी|सायंकाळी/,meridiemHour:function(a,b){return 12===a&&(a=0),"रात्री"===b?4>a?a:a+12:"सकाळी"===b?a:"दुपारी"===b?a>=10?a:a+12:"सायंकाळी"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"रात्री":10>a?"सकाळी":17>a?"दुपारी":20>a?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}}),Kf.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"tengahari"===b?a>=11?a:a+12:"petang"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"tengahari":19>a?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),Kf.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(a,b){return 12===a&&(a=0),"pagi"===b?a:"tengahari"===b?a>=11?a:a+12:"petang"===b||"malam"===b?a+12:void 0},meridiem:function(a,b,c){return 11>a?"pagi":15>a?"tengahari":19>a?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}}),{1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"}),xg={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},yg=(Kf.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(a){return a.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,function(a){return xg[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return wg[a]})},week:{dow:1,doy:4}}),Kf.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),{1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"}),zg={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},Ag=(Kf.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(a){return a.replace(/[१२३४५६७८९०]/g,function(a){return zg[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return yg[a]})},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(a,b){return 12===a&&(a=0),"राति"===b?4>a?a:a+12:"बिहान"===b?a:"दिउँसो"===b?a>=10?a:a+12:"साँझ"===b?a+12:void 0},meridiem:function(a,b,c){return 3>a?"राति":12>a?"बिहान":16>a?"दिउँसो":20>a?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}}),"jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_")),Bg="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),Cg=(Kf.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(a,b){return/-MMM-/.test(b)?Bg[a.month()]:Ag[a.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinalParse:/\d{1,2}(ste|de)/,ordinal:function(a){return a+(1===a||8===a||a>=20?"ste":"de")},week:{dow:1,doy:4}}),Kf.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"sun_mån_tys_ons_tor_fre_lau".split("_"),weekdaysMin:"su_må_ty_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"for %s sidan",s:"nokre sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_")),Dg="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),Eg=(Kf.defineLocale("pl",{months:function(a,b){return""===b?"("+Dg[a.month()]+"|"+Cg[a.month()]+")":/D MMMM/.test(b)?Dg[a.month()]:Cg[a.month()]},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:Bd,mm:Bd,h:Bd,hh:Bd,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:Bd,y:"rok",yy:Bd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("pt-br",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atrás",s:"poucos segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº"}),Kf.defineLocale("pt",{months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-Feira_Terça-Feira_Quarta-Feira_Quinta-Feira_Sexta-Feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}}),Kf.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._febr._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",m:"un minut",mm:Cd,h:"o oră",hh:Cd,d:"o zi",dd:Cd,M:"o lună",MM:Cd,y:"un an",yy:Cd},week:{dow:1,doy:7}}),[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[й|я]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i]),Fg=(Kf.defineLocale("ru",{months:{format:"Января_Февраля_Марта_Апреля_Мая_Июня_Июля_Августа_Сентября_Октября_Ноября_Декабря".split("_"),standalone:"Январь_Февраль_Март_Апрель_Май_Июнь_Июль_Август_Сентябрь_Октябрь_Ноябрь_Декабрь".split("_")},monthsShort:{format:"янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек".split("_"),standalone:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_")},weekdays:{standalone:"Воскресенье_Понедельник_Вторник_Среда_Четверг_Пятница_Суббота".split("_"),format:"Воскресенье_Понедельник_Вторник_Среду_Четверг_Пятницу_Субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?\] ?dddd/},weekdaysShort:"Вс_Пн_Вт_Ср_Чт_Пт_Сб".split("_"),weekdaysMin:"Вс_Пн_Вт_Ср_Чт_Пт_Сб".split("_"),monthsParse:Eg,longMonthsParse:Eg,shortMonthsParse:Eg,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сегодня в] LT",nextDay:"[Завтра в] LT",lastDay:"[Вчера в] LT",nextWeek:function(a){if(a.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В следующее] dddd [в] LT";case 1:case 2:case 4:return"[В следующий] dddd [в] LT";case 3:case 5:case 6:return"[В следующую] dddd [в] LT"}},lastWeek:function(a){if(a.week()===this.week())return 2===this.day()?"[Во] dddd [в] LT":"[В] dddd [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:Ed,mm:Ed,h:"час",hh:Ed,d:"день",dd:Ed,M:"месяц",MM:Ed,y:"год",yy:Ed},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(a){return/^(дня|вечера)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночи":12>a?"утра":17>a?"дня":"вечера"},ordinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":return a+"-й";case"D":return a+"-го";case"w":case"W":return a+"-я";default:return a}},week:{dow:1,doy:7}}),Kf.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්‍ර_සි_සෙ".split("_"),longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},ordinalParse:/\d{1,2} වැනි/,ordinal:function(a){return a+" වැනි"},meridiem:function(a,b,c){return a>11?c?"ප.ව.":"පස් වරු":c?"පෙ.ව.":"පෙර වරු"}}),"január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_")),Gg="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_"),Hg=(Kf.defineLocale("sk",{months:Fg,monthsShort:Gg,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:Gd,m:Gd,mm:Gd,h:Gd,hh:Gd,d:Gd,dd:Gd,M:Gd,MM:Gd,y:Gd,yy:Gd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:Hd,m:Hd,mm:Hd,h:Hd,hh:Hd,d:Hd,dd:Hd,M:Hd,MM:Hd,y:Hd,yy:Hd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),Kf.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),meridiemParse:/PD|MD/,isPM:function(a){return"M"===a.charAt(0)},meridiem:function(a,b,c){return 12>a?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),{words:{m:["један минут","једне минуте"],mm:["минут","минуте","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],dd:["дан","дана","дана"],MM:["месец","месеца","месеци"],yy:["година","године","година"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=Hg.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+Hg.correctGrammaticalCase(a,d)}}),Ig=(Kf.defineLocale("sr-cyrl",{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],monthsShort:["јан.","феб.","мар.","апр.","мај","јун","јул","авг.","сеп.","окт.","нов.","дец."],weekdays:["недеља","понедељак","уторак","среда","четвртак","петак","субота"],weekdaysShort:["нед.","пон.","уто.","сре.","чет.","пет.","суб."],weekdaysMin:["не","по","ут","ср","че","пе","су"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var a=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",m:Hg.translate,mm:Hg.translate,h:Hg.translate,hh:Hg.translate,d:"дан",dd:Hg.translate,M:"месец",MM:Hg.translate,y:"годину",yy:Hg.translate},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),{words:{m:["jedan minut","jedne minute"],mm:["minut","minute","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mesec","meseca","meseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(a,b){return 1===a?b[0]:a>=2&&4>=a?b[1]:b[2]},translate:function(a,b,c){var d=Ig.words[c];return 1===c.length?b?d[0]:d[1]:a+" "+Ig.correctGrammaticalCase(a,d)}}),Jg=(Kf.defineLocale("sr",{months:["januar","februar","mart","april","maj","jun","jul","avgust","septembar","oktobar","novembar","decembar"],monthsShort:["jan.","feb.","mar.","apr.","maj","jun","jul","avg.","sep.","okt.","nov.","dec."],weekdays:["nedelja","ponedeljak","utorak","sreda","četvrtak","petak","subota"],weekdaysShort:["ned.","pon.","uto.","sre.","čet.","pet.","sub."],weekdaysMin:["ne","po","ut","sr","če","pe","su"],longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var a=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return a[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",m:Ig.translate,mm:Ig.translate,h:Ig.translate,hh:Ig.translate,d:"dan",dd:Ig.translate,M:"mesec",MM:Ig.translate,y:"godinu",yy:Ig.translate -},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}}),Kf.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinalParse:/\d{1,2}(e|a)/,ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"e":1===b?"a":2===b?"a":"e";return a+c},week:{dow:1,doy:4}}),Kf.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"masiku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}}),{1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"}),Kg={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},Lg=(Kf.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},ordinalParse:/\d{1,2}வது/,ordinal:function(a){return a+"வது"},preparse:function(a){return a.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,function(a){return Kg[a]})},postformat:function(a){return a.replace(/\d/g,function(a){return Jg[a]})},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(a,b,c){return 2>a?" யாமம்":6>a?" வைகறை":10>a?" காலை":14>a?" நண்பகல்":18>a?" எற்பாடு":22>a?" மாலை":" யாமம்"},meridiemHour:function(a,b){return 12===a&&(a=0),"யாமம்"===b?2>a?a:a+12:"வைகறை"===b||"காலை"===b?a:"நண்பகல்"===b&&a>=10?a:a+12},week:{dow:0,doy:6}}),Kf.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జూలై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జూలై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},ordinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(a,b){return 12===a&&(a=0),"రాత్రి"===b?4>a?a:a+12:"ఉదయం"===b?a:"మధ్యాహ్నం"===b?a>=10?a:a+12:"సాయంత్రం"===b?a+12:void 0},meridiem:function(a,b,c){return 4>a?"రాత్రి":10>a?"ఉదయం":17>a?"మధ్యాహ్నం":20>a?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}}),Kf.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),longDateFormat:{LT:"H นาฬิกา m นาที",LTS:"H นาฬิกา m นาที s วินาที",L:"YYYY/MM/DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H นาฬิกา m นาที",LLLL:"วันddddที่ D MMMM YYYY เวลา H นาฬิกา m นาที"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(a){return"หลังเที่ยง"===a},meridiem:function(a,b,c){return 12>a?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}}),Kf.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"[Ngayon sa] LT",nextDay:"[Bukas sa] LT",nextWeek:"dddd [sa] LT",lastDay:"[Kahapon sa] LT",lastWeek:"dddd [huling linggo] LT",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},ordinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}}),"pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_")),Mg=(Kf.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:Id,past:Jd,s:"puS lup",m:"wa’ tup",mm:Kd,h:"wa’ rep",hh:Kd,d:"wa’ jaj",dd:Kd,M:"wa’ jar",MM:Kd,y:"wa’ DIS",yy:Kd},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),{1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"}),Ng=(Kf.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinalParse:/\d{1,2}'(inci|nci|üncü|ncı|uncu|ıncı)/,ordinal:function(a){if(0===a)return a+"'ıncı";var b=a%10,c=a%100-b,d=a>=100?100:null;return a+(Mg[b]||Mg[c]||Mg[d])},week:{dow:1,doy:7}}),Kf.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiem:function(a,b,c){return a>11?c?"d'o":"D'O":c?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:Md,m:Md,mm:Md,h:Md,hh:Md,d:Md,dd:Md,M:Md,MM:Md,y:Md,yy:Md},ordinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}}),Kf.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}}),Kf.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}}),Kf.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:Pd,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:Qd("[Сьогодні "),nextDay:Qd("[Завтра "),lastDay:Qd("[Вчора "),nextWeek:Qd("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return Qd("[Минулої] dddd [").call(this);case 1:case 2:case 4:return Qd("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",m:Od,mm:Od,h:"годину",hh:Od,d:"день",dd:Od,M:"місяць",MM:Od,y:"рік",yy:Od},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(a){return/^(дня|вечора)$/.test(a)},meridiem:function(a,b,c){return 4>a?"ночі":12>a?"ранку":17>a?"дня":"вечора"},ordinalParse:/\d{1,2}-(й|го)/,ordinal:function(a,b){switch(b){case"M":case"d":case"DDD":case"w":case"W":return a+"-й";case"D":return a+"-го";default:return a}},week:{dow:1,doy:7}}),Kf.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}}),Kf.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Th01_Th02_Th03_Th04_Th05_Th06_Th07_Th08_Th09_Th10_Th11_Th12".split("_"),weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần rồi lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},ordinalParse:/\d{1,2}/,ordinal:function(a){return a},week:{dow:1,doy:4}}),Kf.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"Ah点mm分",LTS:"Ah点m分s秒",L:"YYYY-MM-DD",LL:"YYYY年MMMD日",LLL:"YYYY年MMMD日Ah点mm分",LLLL:"YYYY年MMMD日ddddAh点mm分",l:"YYYY-MM-DD",ll:"YYYY年MMMD日",lll:"YYYY年MMMD日Ah点mm分",llll:"YYYY年MMMD日ddddAh点mm分"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(a,b){return 12===a&&(a=0),"凌晨"===b||"早上"===b||"上午"===b?a:"下午"===b||"晚上"===b?a+12:a>=11?a:a+12},meridiem:function(a,b,c){var d=100*a+b;return 600>d?"凌晨":900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:function(){return 0===this.minutes()?"[今天]Ah[点整]":"[今天]LT"},nextDay:function(){return 0===this.minutes()?"[明天]Ah[点整]":"[明天]LT"},lastDay:function(){return 0===this.minutes()?"[昨天]Ah[点整]":"[昨天]LT"},nextWeek:function(){var a,b;return a=Kf().startOf("week"),b=this.unix()-a.unix()>=604800?"[下]":"[本]",0===this.minutes()?b+"dddAh点整":b+"dddAh点mm"},lastWeek:function(){var a,b;return a=Kf().startOf("week"),b=this.unix()=11?a:a+12:"下午"===b||"晚上"===b?a+12:void 0},meridiem:function(a,b,c){var d=100*a+b;return 900>d?"早上":1130>d?"上午":1230>d?"中午":1800>d?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},ordinalParse:/\d{1,2}(日|月|週)/,ordinal:function(a,b){switch(b){case"d":case"D":case"DDD":return a+"日";case"M":return a+"月";case"w":case"W":return a+"週";default:return a}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"一分鐘",mm:"%d分鐘",h:"一小時",hh:"%d小時",d:"一天",dd:"%d天",M:"一個月",MM:"%d個月",y:"一年",yy:"%d年"}}),Kf);return Ng.locale("en"),Ng}); \ No newline at end of file diff --git a/static/ng/package.json b/static/package.json similarity index 100% rename from static/ng/package.json rename to static/package.json diff --git a/static/ng/resources/.DS_Store b/static/resources/.DS_Store similarity index 100% rename from static/ng/resources/.DS_Store rename to static/resources/.DS_Store diff --git a/static/ng/resources/css/.DS_Store b/static/resources/css/.DS_Store similarity index 100% rename from static/ng/resources/css/.DS_Store rename to static/resources/css/.DS_Store diff --git a/static/ng/resources/css/account-settings.css b/static/resources/css/account-settings.css similarity index 100% rename from static/ng/resources/css/account-settings.css rename to static/resources/css/account-settings.css diff --git a/static/ng/resources/css/admin-options.css b/static/resources/css/admin-options.css similarity index 100% rename from static/ng/resources/css/admin-options.css rename to static/resources/css/admin-options.css diff --git a/static/resources/css/base.css b/static/resources/css/base.css deleted file mode 100644 index 685da65ea..000000000 --- a/static/resources/css/base.css +++ /dev/null @@ -1,38 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -.footer { - width: 100%; - /* Set the fixed height of the footer here */ - height: 60px; -} -.div-height { - overflow-y: auto; -} -.blue { - color: #428bca; -} -sub { - font-size: 6pt; - color: blue; -} - -.table-responsive { - height: 430px; - overflow-y: auto; -} - -table > tbody > tr > td { - vertical-align: bottom; -} \ No newline at end of file diff --git a/static/ng/resources/css/dashboard.css b/static/resources/css/dashboard.css similarity index 100% rename from static/ng/resources/css/dashboard.css rename to static/resources/css/dashboard.css diff --git a/static/ng/resources/css/destination.css b/static/resources/css/destination.css similarity index 100% rename from static/ng/resources/css/destination.css rename to static/resources/css/destination.css diff --git a/static/ng/resources/css/footer.css b/static/resources/css/footer.css similarity index 95% rename from static/ng/resources/css/footer.css rename to static/resources/css/footer.css index 40f827d2e..2975c4bdc 100644 --- a/static/ng/resources/css/footer.css +++ b/static/resources/css/footer.css @@ -16,6 +16,7 @@ clear: both; background-color: #A8A8A8; height: 44px; + z-index: 10; } .footer p { padding-top: 8px; diff --git a/static/ng/resources/css/header.css b/static/resources/css/header.css similarity index 100% rename from static/ng/resources/css/header.css rename to static/resources/css/header.css diff --git a/static/ng/resources/css/index.css b/static/resources/css/index.css similarity index 100% rename from static/ng/resources/css/index.css rename to static/resources/css/index.css diff --git a/static/ng/resources/css/project.css b/static/resources/css/project.css similarity index 90% rename from static/ng/resources/css/project.css rename to static/resources/css/project.css index a2d9eb004..eb299ba37 100644 --- a/static/ng/resources/css/project.css +++ b/static/resources/css/project.css @@ -1,12 +1,11 @@ .container-custom { position: relative; - height: 680px; + height: 100%; } .extend-height { height: 100%; min-height: 1px; - max-height: 680px; min-width: 1024px; overflow: hidden; } @@ -16,10 +15,10 @@ padding: 15px; margin-top: 20px; background-color: #FFFFFF; - height: 660px; + height: 100%; width: 100%; min-height: 1px; - max-height: 660px; + max-height: 100%; } .search-pane { diff --git a/static/ng/resources/css/replication.css b/static/resources/css/replication.css similarity index 100% rename from static/ng/resources/css/replication.css rename to static/resources/css/replication.css diff --git a/static/ng/resources/css/repository.css b/static/resources/css/repository.css similarity index 100% rename from static/ng/resources/css/repository.css rename to static/resources/css/repository.css diff --git a/static/ng/resources/css/search.css b/static/resources/css/search.css similarity index 100% rename from static/ng/resources/css/search.css rename to static/resources/css/search.css diff --git a/static/resources/css/sign-in.css b/static/resources/css/sign-in.css deleted file mode 100644 index 2bea229cf..000000000 --- a/static/resources/css/sign-in.css +++ /dev/null @@ -1,27 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -body { - background-color: #fff; -} - -.form-signin { - padding-top: 40px; - padding-bottom: 40px; - max-width: 380px; - margin: 10% auto; -} - - - diff --git a/static/ng/resources/css/sign-up.css b/static/resources/css/sign-up.css similarity index 100% rename from static/ng/resources/css/sign-up.css rename to static/resources/css/sign-up.css diff --git a/static/resources/image/Harbor_Logo_rec.png b/static/resources/image/Harbor_Logo_rec.png deleted file mode 100755 index 5cfafb87c..000000000 Binary files a/static/resources/image/Harbor_Logo_rec.png and /dev/null differ diff --git a/static/ng/resources/img/.DS_Store b/static/resources/img/.DS_Store similarity index 100% rename from static/ng/resources/img/.DS_Store rename to static/resources/img/.DS_Store diff --git a/static/ng/resources/img/Harbor_Logo_rec.png b/static/resources/img/Harbor_Logo_rec.png similarity index 100% rename from static/ng/resources/img/Harbor_Logo_rec.png rename to static/resources/img/Harbor_Logo_rec.png diff --git a/static/ng/resources/img/Step1.png b/static/resources/img/Step1.png similarity index 100% rename from static/ng/resources/img/Step1.png rename to static/resources/img/Step1.png diff --git a/static/ng/resources/img/Step2.png b/static/resources/img/Step2.png similarity index 100% rename from static/ng/resources/img/Step2.png rename to static/resources/img/Step2.png diff --git a/static/ng/resources/img/Step3.png b/static/resources/img/Step3.png similarity index 100% rename from static/ng/resources/img/Step3.png rename to static/resources/img/Step3.png diff --git a/static/ng/resources/img/magnitude-glass.jpg b/static/resources/img/magnitude-glass.jpg similarity index 100% rename from static/ng/resources/img/magnitude-glass.jpg rename to static/resources/img/magnitude-glass.jpg diff --git a/static/ng/resources/img/magnitude-glass.png b/static/resources/img/magnitude-glass.png similarity index 100% rename from static/ng/resources/img/magnitude-glass.png rename to static/resources/img/magnitude-glass.png diff --git a/static/resources/js/change-password.js b/static/resources/js/change-password.js deleted file mode 100644 index 0a536b7b4..000000000 --- a/static/resources/js/change-password.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - new AjaxUtil({ - url: "/api/users/current", - type: "get", - success: function(data, status, xhr){}, - errors: { - 403: "" - }, - error: function(jqXhr){ - if(jqXhr && jqXhr.status == 401){ - document.location = "/signIn"; - } - } - }).exec(); - - $("#divErrMsg").css({"display": "none"}); - - $("#OldPassword,#Password,#ConfirmedPassword").on("blur", validateCallback); - validateOptions.Items = ["#OldPassword", "#Password", "#ConfirmedPassword"]; - - function bindEnterKey(){ - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#txtCommonSearch").is(":focus")){ - document.location = "/search?q=" + $("#txtCommonSearch").val(); - }else{ - $("#btnSubmit").trigger("click"); - } - } - }); - } - function unbindEnterKey(){ - $(document).off("keydown"); - } - bindEnterKey(); - - var spinner = new Spinner({scale:1}).spin(); - - $("#btnSubmit").on("click", function(){ - validateOptions.Validate(function(){ - var oldPassword = $("#OldPassword").val(); - var password = $("#Password").val(); - new AjaxUtil({ - url: "/api/users/current/password", - type: "put", - data: {"old_password": oldPassword, "new_password" : password}, - beforeSend: function(e){ - unbindEnterKey(); - $("h1").append(spinner.el); - $("#btnSubmit").prop("disabled", true); - }, - complete: function(xhr, status){ - spinner.stop(); - $("#btnSubmit").prop("disabled", false); - if(xhr && xhr.status == 200){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_change_password"), - "content": i18n.getMessage("change_password_successfully"), - "callback": function(){ - window.close(); - } - }); - } - }, - error: function(jqXhr, status, error){ - if(jqXhr && jqXhr.responseText.length){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_change_password"), - "content": i18n.getMessage(jqXhr.responseText), - "callback": function(){ - bindEnterKey(); - return; - } - }); - } - } - }).exec(); - }); - }); -}); \ No newline at end of file diff --git a/static/resources/js/common.js b/static/resources/js/common.js deleted file mode 100644 index f434d0960..000000000 --- a/static/resources/js/common.js +++ /dev/null @@ -1,169 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -var AjaxUtil = function(params){ - - this.url = params.url; - this.data = params.data; - this.dataRaw = params.dataRaw; - this.type = params.type; - this.errors = params.errors || {}; - - this.success = params.success; - this.complete = params.complete; - this.error = params.error; - -}; - -AjaxUtil.prototype.exec = function(){ - - var self = this; - - return $.ajax({ - url: self.url, - contentType: (self.dataRaw ? "application/x-www-form-urlencoded; charset=UTF-8" : "application/json; charset=utf-8"), - data: JSON.stringify(self.data) || self.dataRaw, - type: self.type, - dataType: "json", - success: function(data, status, xhr){ - if(self.success != null){ - self.success(data, status, xhr); - } - }, - complete: function(jqXhr, status) { - if(self.complete != null){ - self.complete(jqXhr, status); - } - }, - error: function(jqXhr){ - if(self.error != null){ - self.error(jqXhr); - }else{ - var errorMessage = self.errors[jqXhr.status] || jqXhr.responseText; - if(jqXhr.status == 401){ - var lastUri = location.pathname + location.search; - if(lastUri != ""){ - document.location = "/signIn?uri=" + encodeURIComponent(lastUri); - }else{ - document.location = "/signIn"; - } - }else if($.trim(errorMessage).length > 0){ - $("#dlgModal").dialogModal({"title": i18n.getMessage("operation_failed"), "content": errorMessage}); - } - } - } - }); -}; - -var SUPPORT_LANGUAGES = { - "en-US": "English", - "zh-CN": "Chinese", - "de-DE": "German", - "ru-RU": "Russian", - "ja-JP": "Japanese" -}; - -var DEFAULT_LANGUAGE = "en-US"; - -var I18n = function(messages) { - this.messages = messages; -}; - -I18n.prototype.isSupportLanguage = function(lang){ - return (lang in SUPPORT_LANGUAGES); -} - -I18n.prototype.getLocale = function(){ - var lang = $("#currentLanguage").val(); - if(this.isSupportLanguage(lang)){ - return lang; - }else{ - return DEFAULT_LANGUAGE; - } -}; - -I18n.prototype.getMessage = function(key){ - return this.messages[key][this.getLocale()]; -}; - -var i18n = new I18n(global_messages); - -moment().locale(i18n.getLocale()); - -jQuery(function(){ - - $("#aLogout").on("click", function(){ - new AjaxUtil({ - url:'/logout', - dataRaw:{"timestamp" : new Date().getTime()}, - type: "get", - complete: function(jqXhr){ - if(jqXhr && jqXhr.status == 200){ - document.location = "/"; - } - } - }).exec(); - }); - - $.fn.dialogModal = function(options){ - var settings = $.extend({ - title: '', - content: '', - text: false, - callback: null, - enableCancel: false, - }, options || {}); - - if(settings.enableCancel){ - $("#dlgCancel").show(); - $("#dlgCancel").on("click", function(){ - $(self).modal('close'); - }); - } - - var self = this; - $("#dlgLabel", self).text(settings.title); - - if(options.text){ - $("#dlgBody", self).html(settings.content); - }else if(typeof settings.content == "object"){ - $(".modal-dialog", self).addClass("modal-lg"); - var lines = ['
']; - for(var item in settings.content){ - lines.push('
'+ - '' + - '

' + settings.content[item] + '

' + - '
'); - } - lines.push(''); - $("#dlgBody", self).html(lines.join("")); - }else{ - $(".modal-dialog", self).removeClass("modal-lg"); - $("#dlgBody", self).text(settings.content); - } - - if(settings.callback != null){ - var hasEntered = false; - $("#dlgConfirm").on("click", function(e){ - if(!hasEntered) { - hasEntered = true; - settings.callback(); - - } - }); - } - $(self).modal('show'); - } -}); diff --git a/static/ng/resources/js/components/details/retrieve-projects.directive.html b/static/resources/js/components/details/retrieve-projects.directive.html similarity index 75% rename from static/ng/resources/js/components/details/retrieve-projects.directive.html rename to static/resources/js/components/details/retrieve-projects.directive.html index 4479679f3..bee11f255 100644 --- a/static/ng/resources/js/components/details/retrieve-projects.directive.html +++ b/static/resources/js/components/details/retrieve-projects.directive.html @@ -10,8 +10,8 @@ diff --git a/static/ng/resources/js/components/details/retrieve-projects.directive.js b/static/resources/js/components/details/retrieve-projects.directive.js similarity index 97% rename from static/ng/resources/js/components/details/retrieve-projects.directive.js rename to static/resources/js/components/details/retrieve-projects.directive.js index 776246ea4..a9da0a5b5 100644 --- a/static/ng/resources/js/components/details/retrieve-projects.directive.js +++ b/static/resources/js/components/details/retrieve-projects.directive.js @@ -69,7 +69,7 @@ vm.resultCount = vm.projects.length; $scope.$watch('vm.filterInput', function(current, origin) { - vm.resultCount = $filter('name')(vm.projects, vm.filterInput, 'Name').length; + vm.resultCount = $filter('name')(vm.projects, vm.filterInput, 'name').length; }); } @@ -109,7 +109,7 @@ function retrieveProjects() { var directive = { restrict: 'E', - templateUrl: '/static/ng/resources/js/components/details/retrieve-projects.directive.html', + templateUrl: '/static/resources/js/components/details/retrieve-projects.directive.html', scope: { 'isOpen': '=', 'selectedProject': '=', diff --git a/static/ng/resources/js/components/details/switch-pane-projects.directive.html b/static/resources/js/components/details/switch-pane-projects.directive.html similarity index 100% rename from static/ng/resources/js/components/details/switch-pane-projects.directive.html rename to static/resources/js/components/details/switch-pane-projects.directive.html diff --git a/static/ng/resources/js/components/details/switch-pane-projects.directive.js b/static/resources/js/components/details/switch-pane-projects.directive.js similarity index 90% rename from static/ng/resources/js/components/details/switch-pane-projects.directive.js rename to static/resources/js/components/details/switch-pane-projects.directive.js index 9d87f6a8a..1084442ff 100644 --- a/static/ng/resources/js/components/details/switch-pane-projects.directive.js +++ b/static/resources/js/components/details/switch-pane-projects.directive.js @@ -33,7 +33,7 @@ function switchPaneProjects() { var directive = { restrict: 'E', - templateUrl: '/static/ng/resources/js/components/details/switch-pane-projects.directive.html', + templateUrl: '/static/resources/js/components/details/switch-pane-projects.directive.html', scope: { 'isOpen': '=', 'selectedProject': '=' diff --git a/static/ng/resources/js/components/log/advanced-search.directive.html b/static/resources/js/components/log/advanced-search.directive.html similarity index 100% rename from static/ng/resources/js/components/log/advanced-search.directive.html rename to static/resources/js/components/log/advanced-search.directive.html diff --git a/static/ng/resources/js/components/log/advanced-search.directive.js b/static/resources/js/components/log/advanced-search.directive.js similarity index 96% rename from static/ng/resources/js/components/log/advanced-search.directive.js rename to static/resources/js/components/log/advanced-search.directive.js index facb0649b..47da563bb 100644 --- a/static/ng/resources/js/components/log/advanced-search.directive.js +++ b/static/resources/js/components/log/advanced-search.directive.js @@ -72,7 +72,7 @@ function advancedSearch() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/log/advanced-search.directive.html', + 'templateUrl': '/static/resources/js/components/log/advanced-search.directive.html', 'scope': { 'isOpen': '=', 'op': '=', diff --git a/static/ng/resources/js/components/log/list-log.directive.html b/static/resources/js/components/log/list-log.directive.html similarity index 100% rename from static/ng/resources/js/components/log/list-log.directive.html rename to static/resources/js/components/log/list-log.directive.html diff --git a/static/ng/resources/js/components/log/list-log.directive.js b/static/resources/js/components/log/list-log.directive.js similarity index 97% rename from static/ng/resources/js/components/log/list-log.directive.js rename to static/resources/js/components/log/list-log.directive.js index 74e732f2a..899141522 100644 --- a/static/ng/resources/js/components/log/list-log.directive.js +++ b/static/resources/js/components/log/list-log.directive.js @@ -102,7 +102,7 @@ function listLog() { var directive = { restrict: 'E', - templateUrl: '/static/ng/resources/js/components/log/list-log.directive.html', + templateUrl: '/static/resources/js/components/log/list-log.directive.html', scope: true, controller: ListLogController, controllerAs: 'vm', diff --git a/static/ng/resources/js/components/log/log.config.js b/static/resources/js/components/log/log.config.js similarity index 100% rename from static/ng/resources/js/components/log/log.config.js rename to static/resources/js/components/log/log.config.js diff --git a/static/ng/resources/js/components/log/log.module.js b/static/resources/js/components/log/log.module.js similarity index 100% rename from static/ng/resources/js/components/log/log.module.js rename to static/resources/js/components/log/log.module.js diff --git a/static/ng/resources/js/components/modal-dialog/modal-dialog.directive.html b/static/resources/js/components/modal-dialog/modal-dialog.directive.html similarity index 100% rename from static/ng/resources/js/components/modal-dialog/modal-dialog.directive.html rename to static/resources/js/components/modal-dialog/modal-dialog.directive.html diff --git a/static/ng/resources/js/components/modal-dialog/modal-dialog.directive.js b/static/resources/js/components/modal-dialog/modal-dialog.directive.js similarity index 93% rename from static/ng/resources/js/components/modal-dialog/modal-dialog.directive.js rename to static/resources/js/components/modal-dialog/modal-dialog.directive.js index 7884b23c0..09c1d3835 100644 --- a/static/ng/resources/js/components/modal-dialog/modal-dialog.directive.js +++ b/static/resources/js/components/modal-dialog/modal-dialog.directive.js @@ -15,7 +15,7 @@ function modalDialog() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/modal-dialog/modal-dialog.directive.html', + 'templateUrl': '/static/resources/js/components/modal-dialog/modal-dialog.directive.html', 'link': link, 'scope': { 'contentType': '@', diff --git a/static/ng/resources/js/components/modal-dialog/modal-dialog.module.js b/static/resources/js/components/modal-dialog/modal-dialog.module.js similarity index 100% rename from static/ng/resources/js/components/modal-dialog/modal-dialog.module.js rename to static/resources/js/components/modal-dialog/modal-dialog.module.js diff --git a/static/ng/resources/js/components/optional-menu/optional-menu.directive.js b/static/resources/js/components/optional-menu/optional-menu.directive.js similarity index 90% rename from static/ng/resources/js/components/optional-menu/optional-menu.directive.js rename to static/resources/js/components/optional-menu/optional-menu.directive.js index 8d30ee06c..309973d65 100644 --- a/static/ng/resources/js/components/optional-menu/optional-menu.directive.js +++ b/static/resources/js/components/optional-menu/optional-menu.directive.js @@ -22,7 +22,7 @@ function setLanguage(language) { I18nService().setCurrentLanguage(language); - $window.location.href = '/ng/language?lang=' + language; + $window.location.href = '/language?lang=' + language; } function logOut() { LogOutService() @@ -32,7 +32,7 @@ function logOutSuccess(data, status) { currentUser.unset(); I18nService().unset(); - $window.location.href= '/ng'; + $window.location.href= '/'; } function logOutFailed(data, status) { console.log('Failed to log out:' + data); @@ -42,7 +42,7 @@ function optionalMenu() { var directive = { 'restrict': 'E', - 'templateUrl': '/ng/optional_menu', + 'templateUrl': '/optional_menu', 'scope': true, 'controller': OptionalMenuController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/optional-menu/optional-menu.module.js b/static/resources/js/components/optional-menu/optional-menu.module.js similarity index 100% rename from static/ng/resources/js/components/optional-menu/optional-menu.module.js rename to static/resources/js/components/optional-menu/optional-menu.module.js diff --git a/static/ng/resources/js/components/project-member/add-project-member.directive.html b/static/resources/js/components/project-member/add-project-member.directive.html similarity index 100% rename from static/ng/resources/js/components/project-member/add-project-member.directive.html rename to static/resources/js/components/project-member/add-project-member.directive.html diff --git a/static/ng/resources/js/components/project-member/add-project-member.directive.js b/static/resources/js/components/project-member/add-project-member.directive.js similarity index 94% rename from static/ng/resources/js/components/project-member/add-project-member.directive.js rename to static/resources/js/components/project-member/add-project-member.directive.js index 04f6cf267..3c1343c3b 100644 --- a/static/ng/resources/js/components/project-member/add-project-member.directive.js +++ b/static/resources/js/components/project-member/add-project-member.directive.js @@ -65,7 +65,7 @@ function addProjectMember() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/project-member/add-project-member.directive.html', + 'templateUrl': '/static/resources/js/components/project-member/add-project-member.directive.html', 'scope': { 'projectId': '@', 'isOpen': '=', diff --git a/static/ng/resources/js/components/project-member/edit-project-member.directive.html b/static/resources/js/components/project-member/edit-project-member.directive.html similarity index 100% rename from static/ng/resources/js/components/project-member/edit-project-member.directive.html rename to static/resources/js/components/project-member/edit-project-member.directive.html diff --git a/static/ng/resources/js/components/project-member/edit-project-member.directive.js b/static/resources/js/components/project-member/edit-project-member.directive.js similarity index 95% rename from static/ng/resources/js/components/project-member/edit-project-member.directive.js rename to static/resources/js/components/project-member/edit-project-member.directive.js index fa31c8354..5c6cfb642 100644 --- a/static/ng/resources/js/components/project-member/edit-project-member.directive.js +++ b/static/resources/js/components/project-member/edit-project-member.directive.js @@ -64,7 +64,7 @@ function editProjectMember() { var directive = { 'restrict': 'A', - 'templateUrl': '/static/ng/resources/js/components/project-member/edit-project-member.directive.html', + 'templateUrl': '/static/resources/js/components/project-member/edit-project-member.directive.html', 'scope': { 'username': '=', 'userId': '=', diff --git a/static/ng/resources/js/components/project-member/list-project-member.directive.html b/static/resources/js/components/project-member/list-project-member.directive.html similarity index 100% rename from static/ng/resources/js/components/project-member/list-project-member.directive.html rename to static/resources/js/components/project-member/list-project-member.directive.html diff --git a/static/ng/resources/js/components/project-member/list-project-member.directive.js b/static/resources/js/components/project-member/list-project-member.directive.js similarity index 94% rename from static/ng/resources/js/components/project-member/list-project-member.directive.js rename to static/resources/js/components/project-member/list-project-member.directive.js index 7012157f6..e0d6d79b1 100644 --- a/static/ng/resources/js/components/project-member/list-project-member.directive.js +++ b/static/resources/js/components/project-member/list-project-member.directive.js @@ -59,7 +59,7 @@ function listProjectMember() { var directive = { restrict: 'E', - templateUrl: '/static/ng/resources/js/components/project-member/list-project-member.directive.html', + templateUrl: '/static/resources/js/components/project-member/list-project-member.directive.html', scope: true, controller: ListProjectMemberController, controllerAs: 'vm', diff --git a/static/ng/resources/js/components/project-member/project-member.config.js b/static/resources/js/components/project-member/project-member.config.js similarity index 93% rename from static/ng/resources/js/components/project-member/project-member.config.js rename to static/resources/js/components/project-member/project-member.config.js index 49825c5e7..91f76fc63 100644 --- a/static/ng/resources/js/components/project-member/project-member.config.js +++ b/static/resources/js/components/project-member/project-member.config.js @@ -9,7 +9,6 @@ function roles() { return [ - {'id': '0', 'name': 'N/A', 'roleName': 'n/a'}, {'id': '1', 'name': 'Project Admin', 'roleName': 'projectAdmin'}, {'id': '2', 'name': 'Developer', 'roleName': 'developer'}, {'id': '3', 'name': 'Guest', 'roleName': 'guest'} diff --git a/static/ng/resources/js/components/project-member/project-member.module.js b/static/resources/js/components/project-member/project-member.module.js similarity index 100% rename from static/ng/resources/js/components/project-member/project-member.module.js rename to static/resources/js/components/project-member/project-member.module.js diff --git a/static/ng/resources/js/components/project-member/switch-role.directive.html b/static/resources/js/components/project-member/switch-role.directive.html similarity index 100% rename from static/ng/resources/js/components/project-member/switch-role.directive.html rename to static/resources/js/components/project-member/switch-role.directive.html diff --git a/static/ng/resources/js/components/project-member/switch-role.directive.js b/static/resources/js/components/project-member/switch-role.directive.js similarity index 90% rename from static/ng/resources/js/components/project-member/switch-role.directive.js rename to static/resources/js/components/project-member/switch-role.directive.js index 0953820e6..6729d3e03 100644 --- a/static/ng/resources/js/components/project-member/switch-role.directive.js +++ b/static/resources/js/components/project-member/switch-role.directive.js @@ -29,7 +29,7 @@ function switchRole() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/project-member/switch-role.directive.html', + 'templateUrl': '/static/resources/js/components/project-member/switch-role.directive.html', 'scope': { 'roles': '=', 'editMode': '=', diff --git a/static/ng/resources/js/components/project/add-project.directive.html b/static/resources/js/components/project/add-project.directive.html similarity index 100% rename from static/ng/resources/js/components/project/add-project.directive.html rename to static/resources/js/components/project/add-project.directive.html diff --git a/static/ng/resources/js/components/project/add-project.directive.js b/static/resources/js/components/project/add-project.directive.js similarity index 87% rename from static/ng/resources/js/components/project/add-project.directive.js rename to static/resources/js/components/project/add-project.directive.js index eb51e0730..5aca66cca 100644 --- a/static/ng/resources/js/components/project/add-project.directive.js +++ b/static/resources/js/components/project/add-project.directive.js @@ -40,13 +40,12 @@ } function addProjectFailed(data, status) { - if(status === 409) { - vm.hasError = true; - vm.errorMessage = 'project_already_exist'; + vm.hasError = true; + if(status == 400) { + vm.errorMessage = 'project_name_is_invalid'; } - if(status === 500) { - vm.hasError = true; - vm.errorMessage = 'project_name_is_invalid'; + if(status === 409) { + vm.errorMessage = 'project_already_exist'; } console.log('Failed to add project:' + status); } @@ -64,7 +63,7 @@ function addProject() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/project/add-project.directive.html', + 'templateUrl': '/static/resources/js/components/project/add-project.directive.html', 'controller': AddProjectController, 'scope' : { 'isOpen': '=' diff --git a/static/ng/resources/js/components/project/project.module.js b/static/resources/js/components/project/project.module.js similarity index 100% rename from static/ng/resources/js/components/project/project.module.js rename to static/resources/js/components/project/project.module.js diff --git a/static/ng/resources/js/components/project/publicity-button.directive.html b/static/resources/js/components/project/publicity-button.directive.html similarity index 100% rename from static/ng/resources/js/components/project/publicity-button.directive.html rename to static/resources/js/components/project/publicity-button.directive.html diff --git a/static/ng/resources/js/components/project/publicity-button.directive.js b/static/resources/js/components/project/publicity-button.directive.js similarity index 93% rename from static/ng/resources/js/components/project/publicity-button.directive.js rename to static/resources/js/components/project/publicity-button.directive.js index fcb817dba..ebbea0eff 100644 --- a/static/ng/resources/js/components/project/publicity-button.directive.js +++ b/static/resources/js/components/project/publicity-button.directive.js @@ -43,7 +43,7 @@ function publicityButton() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/project/publicity-button.directive.html', + 'templateUrl': '/static/resources/js/components/project/publicity-button.directive.html', 'scope': { 'isPublic': '=', 'owned': '=', diff --git a/static/ng/resources/js/components/replication/create-policy.directive.html b/static/resources/js/components/replication/create-policy.directive.html similarity index 100% rename from static/ng/resources/js/components/replication/create-policy.directive.html rename to static/resources/js/components/replication/create-policy.directive.html diff --git a/static/ng/resources/js/components/replication/create-policy.directive.js b/static/resources/js/components/replication/create-policy.directive.js similarity index 86% rename from static/ng/resources/js/components/replication/create-policy.directive.js rename to static/resources/js/components/replication/create-policy.directive.js index d20ba55d7..963a1ef58 100644 --- a/static/ng/resources/js/components/replication/create-policy.directive.js +++ b/static/resources/js/components/replication/create-policy.directive.js @@ -19,27 +19,30 @@ var vm0 = $scope.replication.policy; var vm1 = $scope.replication.destination; - + vm.selectDestination = selectDestination; vm.projectId = getParameterByName('project_id', $location.absUrl()); + $scope.$on('$locationChangeSuccess', function() { + vm.projectId = getParameterByName('project_id', $location.absUrl()); + }); + vm.addNew = addNew; vm.edit = edit; vm.prepareDestination = prepareDestination; - vm.createPolicy = createPolicy; - vm.updatePolicy = updatePolicy; + vm.create = create; + vm.update = update; vm.pingDestination = pingDestination; $scope.$watch('vm.destinations', function(current) { if(current) { - console.log('destination:' + angular.toJson(current)); vm1.selection = current[0]; vm1.endpoint = vm1.selection.endpoint; vm1.username = vm1.selection.username; vm1.password = vm1.selection.password; } }); - + $scope.$watch('vm.action+","+vm.policyId', function(current) { if(current) { console.log('Current action for replication policy:' + current); @@ -48,9 +51,11 @@ vm.policyId = Number(parts[1]); switch(parts[0]) { case 'ADD_NEW': - vm.addNew(); break; + vm.addNew(); + break; case 'EDIT': - vm.edit(vm.policyId); break; + vm.edit(vm.policyId); + break; } } }); @@ -68,7 +73,7 @@ .error(listDestinationFailed); } - function addNew() { + function addNew() { vm0.name = ''; vm0.description = ''; vm0.enabled = true; @@ -81,13 +86,13 @@ .error(listReplicationPolicyFailed); } - function createPolicy(policy) { + function create(policy) { CreateReplicationPolicyService(policy) .success(createReplicationPolicySuccess) .error(createReplicationPolicyFailed); } - function updatePolicy(policy) { + function update(policy) { console.log('Update policy ID:' + vm.policyId); UpdateReplicationPolicyService(vm.policyId, policy) .success(updateReplicationPolicySuccess) @@ -119,7 +124,7 @@ } function listDestinationSuccess(data, status) { - vm.destinations = data; + vm.destinations = data || []; } function listDestinationFailed(data, status) { console.log('Failed list destination:' + data); @@ -136,13 +141,17 @@ } function createReplicationPolicySuccess(data, status) { console.log('Successful create replication policy.'); - vm.clearUp(); + vm.reload(); } function createReplicationPolicyFailed(data, status) { + if(status === 409) { + alert('Policy name already exists.'); + } console.log('Failed create replication policy.'); } function updateReplicationPolicySuccess(data, status) { console.log('Successful update replication policy.'); + vm.reload(); } function updateReplicationPolicyFailed(data, status) { console.log('Failed update replication policy.'); @@ -164,7 +173,7 @@ function createPolicy() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/replication/create-policy.directive.html', + 'templateUrl': '/static/resources/js/components/replication/create-policy.directive.html', 'scope': { 'policyId': '@', 'modalTitle': '@', @@ -178,16 +187,17 @@ }; return directive; - function link(scope, element, attr, ctrl) { - - element.find('#createPolicyModal').on('shown.bs.modal', function() { + function link(scope, element, attr, ctrl) { + + element.find('#createPolicyModal').on('show.bs.modal', function() { ctrl.prepareDestination(); scope.form.$setPristine(); - }); + scope.form.$setUntouched(); + }); + ctrl.save = save; function save(form) { - console.log(angular.toJson(form)); var postPayload = { 'projectId': Number(ctrl.projectId), 'targetId': form.destination.selection.id, @@ -199,14 +209,14 @@ }; switch(ctrl.action) { case 'ADD_NEW': - ctrl.createPolicy(postPayload); break; + ctrl.create(postPayload); + break; case 'EDIT': - ctrl.updatePolicy(postPayload); break; + ctrl.update(postPayload); + break; } element.find('#createPolicyModal').modal('hide'); - ctrl.reload(); } - } } diff --git a/static/ng/resources/js/components/replication/list-replication.directive.html b/static/resources/js/components/replication/list-replication.directive.html similarity index 86% rename from static/ng/resources/js/components/replication/list-replication.directive.html rename to static/resources/js/components/replication/list-replication.directive.html index d569832a2..85756ba7f 100644 --- a/static/ng/resources/js/components/replication/list-replication.directive.html +++ b/static/resources/js/components/replication/list-replication.directive.html @@ -4,7 +4,7 @@
- +
@@ -49,15 +49,15 @@
").addClass("cw").text("#"));c.isBefore(f.clone().endOf("w"));)b.append(a("").addClass("dow").text(c.format("dd"))),c.add(1,"d");o.find(".datepicker-days thead").append(b)},M=function(a){return d.disabledDates[a.format("YYYY-MM-DD")]===!0},N=function(a){return d.enabledDates[a.format("YYYY-MM-DD")]===!0},O=function(a){return d.disabledHours[a.format("H")]===!0},P=function(a){return d.enabledHours[a.format("H")]===!0},Q=function(b,c){if(!b.isValid())return!1;if(d.disabledDates&&"d"===c&&M(b))return!1;if(d.enabledDates&&"d"===c&&!N(b))return!1;if(d.minDate&&b.isBefore(d.minDate,c))return!1;if(d.maxDate&&b.isAfter(d.maxDate,c))return!1;if(d.daysOfWeekDisabled&&"d"===c&&-1!==d.daysOfWeekDisabled.indexOf(b.day()))return!1;if(d.disabledHours&&("h"===c||"m"===c||"s"===c)&&O(b))return!1;if(d.enabledHours&&("h"===c||"m"===c||"s"===c)&&!P(b))return!1;if(d.disabledTimeIntervals&&("h"===c||"m"===c||"s"===c)){var e=!1;if(a.each(d.disabledTimeIntervals,function(){return b.isBetween(this[0],this[1])?(e=!0,!1):void 0}),e)return!1}return!0},R=function(){for(var b=[],c=f.clone().startOf("y").startOf("d");c.isSame(f,"y");)b.push(a("").attr("data-action","selectMonth").addClass("month").text(c.format("MMM"))),c.add(1,"M");o.find(".datepicker-months td").empty().append(b)},S=function(){var b=o.find(".datepicker-months"),c=b.find("th"),g=b.find("tbody").find("span");c.eq(0).find("span").attr("title",d.tooltips.prevYear),c.eq(1).attr("title",d.tooltips.selectYear),c.eq(2).find("span").attr("title",d.tooltips.nextYear),b.find(".disabled").removeClass("disabled"),Q(f.clone().subtract(1,"y"),"y")||c.eq(0).addClass("disabled"),c.eq(1).text(f.year()),Q(f.clone().add(1,"y"),"y")||c.eq(2).addClass("disabled"),g.removeClass("active"),e.isSame(f,"y")&&!m&&g.eq(e.month()).addClass("active"),g.each(function(b){Q(f.clone().month(b),"M")||a(this).addClass("disabled")})},T=function(){var a=o.find(".datepicker-years"),b=a.find("th"),c=f.clone().subtract(5,"y"),g=f.clone().add(6,"y"),h="";for(b.eq(0).find("span").attr("title",d.tooltips.prevDecade),b.eq(1).attr("title",d.tooltips.selectDecade),b.eq(2).find("span").attr("title",d.tooltips.nextDecade),a.find(".disabled").removeClass("disabled"),d.minDate&&d.minDate.isAfter(c,"y")&&b.eq(0).addClass("disabled"),b.eq(1).text(c.year()+"-"+g.year()),d.maxDate&&d.maxDate.isBefore(g,"y")&&b.eq(2).addClass("disabled");!c.isAfter(g,"y");)h+=''+c.year()+"",c.add(1,"y");a.find("td").html(h)},U=function(){var a=o.find(".datepicker-decades"),c=a.find("th"),g=b({y:f.year()-f.year()%100-1}),h=g.clone().add(100,"y"),i=g.clone(),j="";for(c.eq(0).find("span").attr("title",d.tooltips.prevCentury),c.eq(2).find("span").attr("title",d.tooltips.nextCentury),a.find(".disabled").removeClass("disabled"),(g.isSame(b({y:1900}))||d.minDate&&d.minDate.isAfter(g,"y"))&&c.eq(0).addClass("disabled"),c.eq(1).text(g.year()+"-"+h.year()),(g.isSame(b({y:2e3}))||d.maxDate&&d.maxDate.isBefore(h,"y"))&&c.eq(2).addClass("disabled");!g.isAfter(h,"y");)j+=''+(g.year()+1)+" - "+(g.year()+12)+"",g.add(12,"y");j+="",a.find("td").html(j),c.eq(1).text(i.year()+1+"-"+g.year())},V=function(){var b,c,g,h,i=o.find(".datepicker-days"),j=i.find("th"),k=[];if(A()){for(j.eq(0).find("span").attr("title",d.tooltips.prevMonth),j.eq(1).attr("title",d.tooltips.selectMonth),j.eq(2).find("span").attr("title",d.tooltips.nextMonth),i.find(".disabled").removeClass("disabled"),j.eq(1).text(f.format(d.dayViewHeaderFormat)),Q(f.clone().subtract(1,"M"),"M")||j.eq(0).addClass("disabled"),Q(f.clone().add(1,"M"),"M")||j.eq(2).addClass("disabled"),b=f.clone().startOf("M").startOf("w").startOf("d"),h=0;42>h;h++)0===b.weekday()&&(c=a("
'+b.week()+"'+b.date()+"
'+c.format(h?"HH":"hh")+"
'+c.format("mm")+"
'+c.format("ss")+"
-
//vm.projects ? vm.projects.length : 0// // 'items' | tr //
+
//vm.replicationPolicies ? vm.replicationPolicies.length : 0// // 'items' | tr //

Replication Jobs


- + - +
@@ -67,18 +67,20 @@
Name OperationStart TimeStart Time StatusLogs

No replication jobs.

//r.tags != null ? r.tags.join(',') : 'N/A'////r.repository// //r.operation// //r.update_time | dateL : 'YYYY-MM-DD HH:mm:ss'// //r.status//
diff --git a/static/ng/resources/js/components/replication/list-replication.directive.js b/static/resources/js/components/replication/list-replication.directive.js similarity index 87% rename from static/ng/resources/js/components/replication/list-replication.directive.js rename to static/resources/js/components/replication/list-replication.directive.js index 0e944cd9e..a95f3b6d5 100644 --- a/static/ng/resources/js/components/replication/list-replication.directive.js +++ b/static/resources/js/components/replication/list-replication.directive.js @@ -6,9 +6,9 @@ .module('harbor.replication') .directive('listReplication', listReplication); - ListReplicationController.$inject = ['$scope', 'getParameterByName', '$location', 'ListReplicationPolicyService', 'ToggleReplicationPolicyService', 'ListReplicationJobService']; + ListReplicationController.$inject = ['$scope', 'getParameterByName', '$location', 'ListReplicationPolicyService', 'ToggleReplicationPolicyService', 'ListReplicationJobService', '$window']; - function ListReplicationController($scope, getParameterByName, $location, ListReplicationPolicyService, ToggleReplicationPolicyService, ListReplicationJobService) { + function ListReplicationController($scope, getParameterByName, $location, ListReplicationPolicyService, ToggleReplicationPolicyService, ListReplicationJobService, $window) { var vm = this; $scope.$on('$locationChangeSuccess', function() { @@ -19,19 +19,30 @@ vm.addReplication = addReplication; vm.editReplication = editReplication; - vm.search = search; + vm.searchReplicationPolicy = searchReplicationPolicy; + vm.searchReplicationJob = searchReplicationJob; vm.retrievePolicy = retrievePolicy; vm.retrieveJob = retrieveJob; vm.togglePolicy = togglePolicy; + + vm.downloadLog = downloadLog; vm.last = false; + + vm.projectId = getParameterByName('project_id', $location.absUrl()); vm.retrievePolicy(); - function search() { + function searchReplicationPolicy() { vm.retrievePolicy(); } + function searchReplicationJob() { + if(vm.lastPolicyId !== -1) { + vm.retrieveJob(vm.lastPolicyId); + } + } + function retrievePolicy() { ListReplicationPolicyService('', vm.projectId, vm.replicationPolicyName) .success(listReplicationPolicySuccess) @@ -45,6 +56,7 @@ } function listReplicationPolicySuccess(data, status) { + vm.replicationJobs = []; vm.replicationPolicies = data || []; } @@ -88,12 +100,15 @@ console.log('Failed toggle replication policy.'); } + function downloadLog(policyId) { + $window.open('/api/jobs/replication/' + policyId + '/log', '_blank'); + } } function listReplication($timeout) { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/replication/list-replication.directive.html', + 'templateUrl': '/static/resources/js/components/replication/list-replication.directive.html', 'scope': true, 'link': link, 'controller': ListReplicationController, @@ -151,7 +166,7 @@ } }); }); - + function trClickHandler(e) { element .find('#upon-pane table>tbody>tr') diff --git a/static/ng/resources/js/components/replication/replication.module.js b/static/resources/js/components/replication/replication.module.js similarity index 100% rename from static/ng/resources/js/components/replication/replication.module.js rename to static/resources/js/components/replication/replication.module.js diff --git a/static/ng/resources/js/components/repository/list-repository.directive.html b/static/resources/js/components/repository/list-repository.directive.html similarity index 100% rename from static/ng/resources/js/components/repository/list-repository.directive.html rename to static/resources/js/components/repository/list-repository.directive.html diff --git a/static/ng/resources/js/components/repository/list-repository.directive.js b/static/resources/js/components/repository/list-repository.directive.js similarity index 96% rename from static/ng/resources/js/components/repository/list-repository.directive.js rename to static/resources/js/components/repository/list-repository.directive.js index d9665d0a6..2955ece6f 100644 --- a/static/ng/resources/js/components/repository/list-repository.directive.js +++ b/static/resources/js/components/repository/list-repository.directive.js @@ -105,7 +105,7 @@ function listRepository() { var directive = { restrict: 'E', - templateUrl: '/static/ng/resources/js/components/repository/list-repository.directive.html', + templateUrl: '/static/resources/js/components/repository/list-repository.directive.html', controller: ListRepositoryController, controllerAs: 'vm', bindToController: true diff --git a/static/ng/resources/js/components/repository/list-tag.directive.html b/static/resources/js/components/repository/list-tag.directive.html similarity index 100% rename from static/ng/resources/js/components/repository/list-tag.directive.html rename to static/resources/js/components/repository/list-tag.directive.html diff --git a/static/ng/resources/js/components/repository/list-tag.directive.js b/static/resources/js/components/repository/list-tag.directive.js similarity index 95% rename from static/ng/resources/js/components/repository/list-tag.directive.js rename to static/resources/js/components/repository/list-tag.directive.js index b683364a5..9c1a79b10 100644 --- a/static/ng/resources/js/components/repository/list-tag.directive.js +++ b/static/resources/js/components/repository/list-tag.directive.js @@ -54,7 +54,7 @@ function listTag() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/repository/list-tag.directive.html', + 'templateUrl': '/static/resources/js/components/repository/list-tag.directive.html', 'scope': { 'tagCount': '=', 'associateId': '=', diff --git a/static/ng/resources/js/components/repository/popup-details.directive.html b/static/resources/js/components/repository/popup-details.directive.html similarity index 100% rename from static/ng/resources/js/components/repository/popup-details.directive.html rename to static/resources/js/components/repository/popup-details.directive.html diff --git a/static/ng/resources/js/components/repository/popup-details.directive.js b/static/resources/js/components/repository/popup-details.directive.js similarity index 97% rename from static/ng/resources/js/components/repository/popup-details.directive.js rename to static/resources/js/components/repository/popup-details.directive.js index 82d34c4c3..e3b95902e 100644 --- a/static/ng/resources/js/components/repository/popup-details.directive.js +++ b/static/resources/js/components/repository/popup-details.directive.js @@ -33,7 +33,7 @@ function popupDetails() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/repository/popup-details.directive.html', + 'templateUrl': '/static/resources/js/components/repository/popup-details.directive.html', 'scope': { 'repoName': '@', 'tag': '@', diff --git a/static/ng/resources/js/components/repository/pull-command.directive.html b/static/resources/js/components/repository/pull-command.directive.html similarity index 100% rename from static/ng/resources/js/components/repository/pull-command.directive.html rename to static/resources/js/components/repository/pull-command.directive.html diff --git a/static/ng/resources/js/components/repository/pull-command.directive.js b/static/resources/js/components/repository/pull-command.directive.js similarity index 88% rename from static/ng/resources/js/components/repository/pull-command.directive.js rename to static/resources/js/components/repository/pull-command.directive.js index c48aa9c30..d6ccab6d3 100644 --- a/static/ng/resources/js/components/repository/pull-command.directive.js +++ b/static/resources/js/components/repository/pull-command.directive.js @@ -13,7 +13,7 @@ function pullCommand() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/repository/pull-command.directive.html', + 'templateUrl': '/static/resources/js/components/repository/pull-command.directive.html', 'scope': { 'repoName': '@', 'tag': '@' diff --git a/static/ng/resources/js/components/repository/repository.module.js b/static/resources/js/components/repository/repository.module.js similarity index 100% rename from static/ng/resources/js/components/repository/repository.module.js rename to static/resources/js/components/repository/repository.module.js diff --git a/static/ng/resources/js/components/search/search-input.directive.html b/static/resources/js/components/search/search-input.directive.html similarity index 100% rename from static/ng/resources/js/components/search/search-input.directive.html rename to static/resources/js/components/search/search-input.directive.html diff --git a/static/ng/resources/js/components/search/search-input.directive.js b/static/resources/js/components/search/search-input.directive.js similarity index 89% rename from static/ng/resources/js/components/search/search-input.directive.js rename to static/resources/js/components/search/search-input.directive.js index fe9eaaac2..f84f3e922 100644 --- a/static/ng/resources/js/components/search/search-input.directive.js +++ b/static/resources/js/components/search/search-input.directive.js @@ -15,7 +15,7 @@ function searchFor(searchContent) { $location - .path('/ng/search') + .path('/search') .search({'q': searchContent}); $window.location.href = $location.url(); } @@ -26,7 +26,7 @@ var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/search/search-input.directive.html', + 'templateUrl': '/static/resources/js/components/search/search-input.directive.html', 'scope': { 'searchInput': '=', }, diff --git a/static/ng/resources/js/components/search/search.directive.html b/static/resources/js/components/search/search.directive.html similarity index 100% rename from static/ng/resources/js/components/search/search.directive.html rename to static/resources/js/components/search/search.directive.html diff --git a/static/ng/resources/js/components/search/search.directive.js b/static/resources/js/components/search/search.directive.js similarity index 92% rename from static/ng/resources/js/components/search/search.directive.js rename to static/resources/js/components/search/search.directive.js index 037a1f1d6..541b6457f 100644 --- a/static/ng/resources/js/components/search/search.directive.js +++ b/static/resources/js/components/search/search.directive.js @@ -37,7 +37,7 @@ function search() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/search/search.directive.html', + 'templateUrl': '/static/resources/js/components/search/search.directive.html', 'scope': { 'filterBy': '=' }, diff --git a/static/ng/resources/js/components/search/search.module.js b/static/resources/js/components/search/search.module.js similarity index 100% rename from static/ng/resources/js/components/search/search.module.js rename to static/resources/js/components/search/search.module.js diff --git a/static/ng/resources/js/components/sign-in/sign-in.directive.js b/static/resources/js/components/sign-in/sign-in.directive.js similarity index 88% rename from static/ng/resources/js/components/sign-in/sign-in.directive.js rename to static/resources/js/components/sign-in/sign-in.directive.js index b53217e3e..e1f63ff2b 100644 --- a/static/ng/resources/js/components/sign-in/sign-in.directive.js +++ b/static/resources/js/components/sign-in/sign-in.directive.js @@ -35,7 +35,7 @@ } function signedInSuccess(data, status) { - $window.location.href = "/ng/dashboard"; + $window.location.href = "/dashboard"; } function signedInFailed(data, status) { @@ -47,15 +47,15 @@ } function doSignUp() { - $window.location.href = '/ng/sign_up'; + $window.location.href = '/sign_up'; } function doForgotPassword() { - $window.location.href = '/ng/forgot_password'; + $window.location.href = '/forgot_password'; } function doContinue() { - $window.location.href = '/ng/dashboard'; + $window.location.href = '/dashboard'; } function doLogOut() { @@ -67,7 +67,7 @@ function logOutSuccess(data, status) { currentUser.unset(); I18nService().unset(); - $window.location.href= '/ng'; + $window.location.href= '/'; } function logOutFailed(data, status) { @@ -78,7 +78,7 @@ function signIn() { var directive = { 'restrict': 'E', - 'templateUrl': '/ng/sign_in', + 'templateUrl': '/sign_in', 'scope': true, 'controller': SignInController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/sign-in/sign-in.module.js b/static/resources/js/components/sign-in/sign-in.module.js similarity index 100% rename from static/ng/resources/js/components/sign-in/sign-in.module.js rename to static/resources/js/components/sign-in/sign-in.module.js diff --git a/static/ng/resources/js/components/summary/summary.directive.html b/static/resources/js/components/summary/summary.directive.html similarity index 100% rename from static/ng/resources/js/components/summary/summary.directive.html rename to static/resources/js/components/summary/summary.directive.html diff --git a/static/ng/resources/js/components/summary/summary.directive.js b/static/resources/js/components/summary/summary.directive.js similarity index 90% rename from static/ng/resources/js/components/summary/summary.directive.js rename to static/resources/js/components/summary/summary.directive.js index 2341d7c7f..8e8f804b2 100644 --- a/static/ng/resources/js/components/summary/summary.directive.js +++ b/static/resources/js/components/summary/summary.directive.js @@ -27,7 +27,7 @@ function projectSummary() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/summary/summary.directive.html', + 'templateUrl': '/static/resources/js/components/summary/summary.directive.html', 'controller': ProjectSummaryController, 'scope' : true, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/summary/summary.module.js b/static/resources/js/components/summary/summary.module.js similarity index 100% rename from static/ng/resources/js/components/summary/summary.module.js rename to static/resources/js/components/summary/summary.module.js diff --git a/static/ng/resources/js/components/system-management/configuration.directive.html b/static/resources/js/components/system-management/configuration.directive.html similarity index 100% rename from static/ng/resources/js/components/system-management/configuration.directive.html rename to static/resources/js/components/system-management/configuration.directive.html diff --git a/static/ng/resources/js/components/system-management/configuration.directive.js b/static/resources/js/components/system-management/configuration.directive.js similarity index 90% rename from static/ng/resources/js/components/system-management/configuration.directive.js rename to static/resources/js/components/system-management/configuration.directive.js index e37388ef1..8bc559a8c 100644 --- a/static/ng/resources/js/components/system-management/configuration.directive.js +++ b/static/resources/js/components/system-management/configuration.directive.js @@ -42,7 +42,7 @@ function configuration() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/system-management/configuration.directive.html', + 'templateUrl': '/static/resources/js/components/system-management/configuration.directive.html', 'scope': true, 'controller': ConfigurationController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/system-management/create-destination.directive.html b/static/resources/js/components/system-management/create-destination.directive.html similarity index 100% rename from static/ng/resources/js/components/system-management/create-destination.directive.html rename to static/resources/js/components/system-management/create-destination.directive.html diff --git a/static/ng/resources/js/components/system-management/create-destination.directive.js b/static/resources/js/components/system-management/create-destination.directive.js similarity index 87% rename from static/ng/resources/js/components/system-management/create-destination.directive.js rename to static/resources/js/components/system-management/create-destination.directive.js index fa669d320..301682b58 100644 --- a/static/ng/resources/js/components/system-management/create-destination.directive.js +++ b/static/resources/js/components/system-management/create-destination.directive.js @@ -20,7 +20,7 @@ vm.update = update; vm.pingDestination = pingDestination; - $scope.$watch('vm.action + "," + vm.targetId', function(current) { + $scope.$watch('vm.action+","+vm.targetId', function(current) { if(current) { var parts = current.split(','); vm.action = parts[0]; @@ -57,10 +57,14 @@ } function createDestinationSuccess(data, status) { - alert('Successful created destination.'); + console.log('Successful created destination.'); + vm.reload(); } function createDestinationFailed(data, status) { + if(status === 409) { + alert('Destination already exists.'); + } console.log('Failed create destination:' + data); } @@ -72,6 +76,7 @@ function updateDestinationSuccess(data, status) { console.log('Successful update destination.'); + vm.reload(); } function updateDestinationFailed(data, status) { @@ -103,7 +108,6 @@ 'username': vm0.username, 'password': vm0.password }; - console.log('Ping target:' + angular.toJson(target)); PingDestinationService(target) .success(pingDestinationSuccess) .error(pingDestinationFailed); @@ -119,7 +123,7 @@ function createDestination() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/system-management/create-destination.directive.html', + 'templateUrl': '/static/resources/js/components/system-management/create-destination.directive.html', 'scope': { 'action': '@', 'targetId': '@', @@ -134,24 +138,24 @@ function link(scope, element, attrs, ctrl) { - element.find('#createDestinationModal').on('hidden.bs.modal', function() { - scope.form.$setPristine(); + element.find('#createDestinationModal').on('show.bs.modal', function() { + scope.form.$setPristine(); + scope.form.$setUntouched(); }); ctrl.save = save; function save(destination) { - if(destination) { - console.log('destination:' + angular.toJson(destination)); + if(destination) { switch(ctrl.action) { case 'ADD_NEW': ctrl.create(destination); break; case 'EDIT': ctrl.update(destination); + break; } element.find('#createDestinationModal').modal('hide'); - ctrl.reload(); } } } diff --git a/static/ng/resources/js/components/system-management/destination.directive.html b/static/resources/js/components/system-management/destination.directive.html similarity index 100% rename from static/ng/resources/js/components/system-management/destination.directive.html rename to static/resources/js/components/system-management/destination.directive.html diff --git a/static/ng/resources/js/components/system-management/destination.directive.js b/static/resources/js/components/system-management/destination.directive.js similarity index 95% rename from static/ng/resources/js/components/system-management/destination.directive.js rename to static/resources/js/components/system-management/destination.directive.js index 96f0daf87..2d8fb3544 100644 --- a/static/ng/resources/js/components/system-management/destination.directive.js +++ b/static/resources/js/components/system-management/destination.directive.js @@ -67,7 +67,7 @@ function destination() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/system-management/destination.directive.html', + 'templateUrl': '/static/resources/js/components/system-management/destination.directive.html', 'scope': true, 'controller': DestinationController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/system-management/replication.directive.html b/static/resources/js/components/system-management/replication.directive.html similarity index 100% rename from static/ng/resources/js/components/system-management/replication.directive.html rename to static/resources/js/components/system-management/replication.directive.html diff --git a/static/ng/resources/js/components/system-management/replication.directive.js b/static/resources/js/components/system-management/replication.directive.js similarity index 94% rename from static/ng/resources/js/components/system-management/replication.directive.js rename to static/resources/js/components/system-management/replication.directive.js index 80e61b597..7218849d9 100644 --- a/static/ng/resources/js/components/system-management/replication.directive.js +++ b/static/resources/js/components/system-management/replication.directive.js @@ -59,7 +59,7 @@ function replication() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/system-management/replication.directive.html', + 'templateUrl': '/static/resources/js/components/system-management/replication.directive.html', 'scope': true, 'controller': ReplicationController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/system-management/system-management.directive.html b/static/resources/js/components/system-management/system-management.directive.html similarity index 100% rename from static/ng/resources/js/components/system-management/system-management.directive.html rename to static/resources/js/components/system-management/system-management.directive.html diff --git a/static/ng/resources/js/components/system-management/system-management.directive.js b/static/resources/js/components/system-management/system-management.directive.js similarity index 81% rename from static/ng/resources/js/components/system-management/system-management.directive.js rename to static/resources/js/components/system-management/system-management.directive.js index 4a6b97823..205e854d0 100644 --- a/static/ng/resources/js/components/system-management/system-management.directive.js +++ b/static/resources/js/components/system-management/system-management.directive.js @@ -14,7 +14,7 @@ function systemManagement() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/system-management/system-management.directive.html', + 'templateUrl': '/static/resources/js/components/system-management/system-management.directive.html', 'scope': true, 'controller': SystemManagementController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/system-management/system-management.module.js b/static/resources/js/components/system-management/system-management.module.js similarity index 100% rename from static/ng/resources/js/components/system-management/system-management.module.js rename to static/resources/js/components/system-management/system-management.module.js diff --git a/static/ng/resources/js/components/top-repository/top-repository.directive.html b/static/resources/js/components/top-repository/top-repository.directive.html similarity index 100% rename from static/ng/resources/js/components/top-repository/top-repository.directive.html rename to static/resources/js/components/top-repository/top-repository.directive.html diff --git a/static/ng/resources/js/components/top-repository/top-repository.directive.js b/static/resources/js/components/top-repository/top-repository.directive.js similarity index 90% rename from static/ng/resources/js/components/top-repository/top-repository.directive.js rename to static/resources/js/components/top-repository/top-repository.directive.js index e66a6176d..34896ddd4 100644 --- a/static/ng/resources/js/components/top-repository/top-repository.directive.js +++ b/static/resources/js/components/top-repository/top-repository.directive.js @@ -28,7 +28,7 @@ function topRepository() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/top-repository/top-repository.directive.html', + 'templateUrl': '/static/resources/js/components/top-repository/top-repository.directive.html', 'controller': TopRepositoryController, 'scope' : true, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/top-repository/top-repository.module.js b/static/resources/js/components/top-repository/top-repository.module.js similarity index 100% rename from static/ng/resources/js/components/top-repository/top-repository.module.js rename to static/resources/js/components/top-repository/top-repository.module.js diff --git a/static/ng/resources/js/components/user-log/user-log.directive.html b/static/resources/js/components/user-log/user-log.directive.html similarity index 100% rename from static/ng/resources/js/components/user-log/user-log.directive.html rename to static/resources/js/components/user-log/user-log.directive.html diff --git a/static/ng/resources/js/components/user-log/user-log.directive.js b/static/resources/js/components/user-log/user-log.directive.js similarity index 90% rename from static/ng/resources/js/components/user-log/user-log.directive.js rename to static/resources/js/components/user-log/user-log.directive.js index 17ded8c65..bc274383c 100644 --- a/static/ng/resources/js/components/user-log/user-log.directive.js +++ b/static/resources/js/components/user-log/user-log.directive.js @@ -27,7 +27,7 @@ function userLog() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/user-log/user-log.directive.html', + 'templateUrl': '/static/resources/js/components/user-log/user-log.directive.html', 'controller': UserLogController, 'scope' : true, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/user-log/user-log.module.js b/static/resources/js/components/user-log/user-log.module.js similarity index 100% rename from static/ng/resources/js/components/user-log/user-log.module.js rename to static/resources/js/components/user-log/user-log.module.js diff --git a/static/ng/resources/js/components/user/list-user.directive.html b/static/resources/js/components/user/list-user.directive.html similarity index 72% rename from static/ng/resources/js/components/user/list-user.directive.html rename to static/resources/js/components/user/list-user.directive.html index 3a00ddd6c..928dfea97 100644 --- a/static/ng/resources/js/components/user/list-user.directive.html +++ b/static/resources/js/components/user/list-user.directive.html @@ -12,17 +12,16 @@
- + - diff --git a/static/ng/resources/js/components/user/list-user.directive.js b/static/resources/js/components/user/list-user.directive.js similarity index 94% rename from static/ng/resources/js/components/user/list-user.directive.js rename to static/resources/js/components/user/list-user.directive.js index 172a1ad77..7a5277391 100644 --- a/static/ng/resources/js/components/user/list-user.directive.js +++ b/static/resources/js/components/user/list-user.directive.js @@ -55,7 +55,7 @@ function listUser() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/user/list-user.directive.html', + 'templateUrl': '/static/resources/js/components/user/list-user.directive.html', 'scope': true, 'controller': ListUserController, 'controllerAs': 'vm', diff --git a/static/ng/resources/js/components/user/toggle-admin.directive.html b/static/resources/js/components/user/toggle-admin.directive.html similarity index 100% rename from static/ng/resources/js/components/user/toggle-admin.directive.html rename to static/resources/js/components/user/toggle-admin.directive.html diff --git a/static/ng/resources/js/components/user/toggle-admin.directive.js b/static/resources/js/components/user/toggle-admin.directive.js similarity index 87% rename from static/ng/resources/js/components/user/toggle-admin.directive.js rename to static/resources/js/components/user/toggle-admin.directive.js index d0eb96a1a..68274cbe7 100644 --- a/static/ng/resources/js/components/user/toggle-admin.directive.js +++ b/static/resources/js/components/user/toggle-admin.directive.js @@ -12,10 +12,11 @@ var vm = this; vm.isAdmin = (vm.hasAdminRole == 1) ? true : false; + vm.enabled = vm.isAdmin ? 0 : 1; vm.toggle = toggle; function toggle() { - ToggleAdminService(vm.userId) + ToggleAdminService(vm.userId, vm.enabled) .success(toggleAdminSuccess) .error(toggleAdminFailed); } @@ -37,7 +38,7 @@ function toggleAdmin() { var directive = { 'restrict': 'E', - 'templateUrl': '/static/ng/resources/js/components/user/toggle-admin.directive.html', + 'templateUrl': '/static/resources/js/components/user/toggle-admin.directive.html', 'scope': { 'hasAdminRole': '=', 'userId': '@' diff --git a/static/ng/resources/js/components/user/user.module.js b/static/resources/js/components/user/user.module.js similarity index 100% rename from static/ng/resources/js/components/user/user.module.js rename to static/resources/js/components/user/user.module.js diff --git a/static/ng/resources/js/components/validator/confirm-password.validator.js b/static/resources/js/components/validator/confirm-password.validator.js similarity index 100% rename from static/ng/resources/js/components/validator/confirm-password.validator.js rename to static/resources/js/components/validator/confirm-password.validator.js diff --git a/static/ng/resources/js/components/validator/invalid-chars.validator.js b/static/resources/js/components/validator/invalid-chars.validator.js similarity index 100% rename from static/ng/resources/js/components/validator/invalid-chars.validator.js rename to static/resources/js/components/validator/invalid-chars.validator.js diff --git a/static/ng/resources/js/components/validator/password.validator.js b/static/resources/js/components/validator/password.validator.js similarity index 100% rename from static/ng/resources/js/components/validator/password.validator.js rename to static/resources/js/components/validator/password.validator.js diff --git a/static/ng/resources/js/components/validator/user-exist.validator.js b/static/resources/js/components/validator/user-exist.validator.js similarity index 100% rename from static/ng/resources/js/components/validator/user-exist.validator.js rename to static/resources/js/components/validator/user-exist.validator.js diff --git a/static/ng/resources/js/components/validator/validator.config.js b/static/resources/js/components/validator/validator.config.js similarity index 100% rename from static/ng/resources/js/components/validator/validator.config.js rename to static/resources/js/components/validator/validator.config.js diff --git a/static/ng/resources/js/components/validator/validator.module.js b/static/resources/js/components/validator/validator.module.js similarity index 100% rename from static/ng/resources/js/components/validator/validator.module.js rename to static/resources/js/components/validator/validator.module.js diff --git a/static/resources/js/forgot-password.js b/static/resources/js/forgot-password.js deleted file mode 100644 index d6fdea319..000000000 --- a/static/resources/js/forgot-password.js +++ /dev/null @@ -1,84 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - $("#divErrMsg").css({"display": "none"}); - - validateOptions.Items = ["#EmailF"]; - function bindEnterKey(){ - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#txtCommonSearch").is(":focus")){ - document.location = "/search?q=" + $("#txtCommonSearch").val(); - }else{ - $("#btnSubmit").trigger("click"); - } - } - }); - } - function unbindEnterKey(){ - $(document).off("keydown"); - } - bindEnterKey(); - var spinner = new Spinner({scale:1}).spin(); - - $("#btnSubmit").on("click", function(){ - validateOptions.Validate(function(){ - var username = $("#UsernameF").val(); - var email = $("#EmailF").val(); - $.ajax({ - "url":"/sendEmail", - "type": "get", - "data": {"username": username, "email": email}, - "beforeSend": function(e){ - unbindEnterKey(); - $("h1").append(spinner.el); - $("#btnSubmit").prop("disabled", true); - }, - "success": function(data, status, xhr){ - if(xhr && xhr.status == 200){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_forgot_password"), - "content": i18n.getMessage("email_has_been_sent"), - "callback": function(){ - document.location="/"; - } - }); - } - - }, - "complete": function(){ - spinner.stop(); - $("#btnSubmit").prop("disabled", false); - }, - "error": function(jqXhr, status, error){ - if(jqXhr){ - $("#dlgModal") - .dialogModal({ - "title": i18n.getMessage("title_forgot_password"), - "content": i18n.getMessage(jqXhr.responseText), - "callback": function(){ - bindEnterKey(); - return; - } - }); - } - } - }); - }); - }); -}); \ No newline at end of file diff --git a/static/ng/resources/js/harbor.config.js b/static/resources/js/harbor.config.js similarity index 100% rename from static/ng/resources/js/harbor.config.js rename to static/resources/js/harbor.config.js diff --git a/static/ng/resources/js/harbor.constants.js b/static/resources/js/harbor.constants.js similarity index 100% rename from static/ng/resources/js/harbor.constants.js rename to static/resources/js/harbor.constants.js diff --git a/static/ng/resources/js/harbor.data.js b/static/resources/js/harbor.data.js similarity index 100% rename from static/ng/resources/js/harbor.data.js rename to static/resources/js/harbor.data.js diff --git a/static/ng/resources/js/harbor.initialize.js b/static/resources/js/harbor.initialize.js similarity index 100% rename from static/ng/resources/js/harbor.initialize.js rename to static/resources/js/harbor.initialize.js diff --git a/static/ng/resources/js/harbor.module.js b/static/resources/js/harbor.module.js similarity index 100% rename from static/ng/resources/js/harbor.module.js rename to static/resources/js/harbor.module.js diff --git a/static/resources/js/header-login.js b/static/resources/js/header-login.js deleted file mode 100644 index 1bd5cda0d..000000000 --- a/static/resources/js/header-login.js +++ /dev/null @@ -1,32 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - $("#btnSignUp").css({"visibility": "visible"}); - - $(document).on("keydown", function(e){ - if(e.keyCode == 13){ - e.preventDefault(); - if($("#txtCommonSearch").is(":focus")){ - document.location = "/search?q=" + $("#txtCommonSearch").val(); - } - } - }); - $("#btnSignIn").on("click", function(){ - document.location = "/signIn"; - }); - $("#btnSignUp").on("click", function(){ - document.location = "/register"; - }); -}); \ No newline at end of file diff --git a/static/resources/js/item-detail.js b/static/resources/js/item-detail.js deleted file mode 100644 index bfab81536..000000000 --- a/static/resources/js/item-detail.js +++ /dev/null @@ -1,473 +0,0 @@ -/* - Copyright (c) 2016 VMware, Inc. All Rights Reserved. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -jQuery(function(){ - - $.when( - new AjaxUtil({ - url: "/api/users/current", - type: "get", - error: function(jqXhr){ - if(jqXhr){ - if(jqXhr.status == 403){ - return false; - } - } - } - }).exec() - ).then(function(){ - noNeedToLoginCallback(); - needToLoginCallback(); - }).fail(function(){ - noNeedToLoginCallback(); - }); - - function noNeedToLoginCallback(){ - - $("#tabItemDetail a:first").tab("show"); - $("#btnFilterOption button:first").addClass("active"); - $("#divErrMsg").hide(); - - if($("#public").val() == 1){ - $("#tabItemDetail li:eq(1)").hide(); - $("#tabItemDetail li:eq(2)").hide(); - } - - listRepo($("#repoName").val()); - - function listRepo(repoName){ - - $("#divErrMsg").hide(); - - new AjaxUtil({ - url: "/api/repositories?project_id=" + $("#projectId").val() + "&q=" + repoName, - type: "get", - success: function(data, status, xhr){ - if(xhr && xhr.status == 200){ - $("#accordionRepo").children().remove(); - if(data == null){ - $("#divErrMsg").show(); - $("#divErrMsg center").html(i18n.getMessage("no_repo_exists")); - return; - } - $.each(data, function(i, e){ - var targetId = e.replace(/\//g, "------").replace(/\./g, "---"); - var row = '
' + - '' + - '
' + - '
' + - '
' + - '
// 'username' | tr //// 'role' | tr //// 'email' | tr //// 'registration_time' | tr //// 'operation' | tr //// 'username' | tr //// 'email' | tr //// 'registration_time' | tr //// 'operation' | tr //
//u.username//N/A //u.email// //u.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'// -    -    +    +   
' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '
' + i18n.getMessage("tag")+ ' ' + i18n.getMessage("pull_command") + '
' - '
' + - '
' + - '' + - ''; - $("#accordionRepo").append(row); - }); - if(repoName != ""){ - $("#txtRepoName").val(repoName); - $("#accordionRepo #heading0 a").trigger("click"); - } - } - } - }).exec(); - } - $("#btnSearchRepo").on("click", function(){ - listRepo($.trim($("#txtRepoName").val())); - }); - - $('#accordionRepo').on('show.bs.collapse', function (e) { - $('#accordionRepo .in').collapse('hide'); - var targetId = $(e.target).attr("targetId"); - var repoName = targetId.replace(/[-]{6}/g, "/").replace(/[-]{3}/g, "."); - new AjaxUtil({ - url: "/api/repositories/tags?repo_name=" + repoName, - type: "get", - success: function(data, status, xhr){ - $('#' + targetId +' table tbody tr').remove(); - var row = []; - for(var i in data){ - var tagName = data[i] - row.push('
' + tagName + '
' + username + '' + name_mapping[userList[i].role_name] + ''; - var isShowOperations = true; - if(loginedUserRoleId >= 3 /*role: developer guest*/){ - isShowOperations = false; - }else if(ownerId == userId){ - isShowOperations = false; - }else if (loginedUserId == userId){ - isShowOperations = false; - } - if(isShowOperations){ - row += ' ' + - ''; - } - - row += '
' + e.username + '' + e.repo_name + '' + e.repo_tag + '' + e.operation + '' + moment(new Date(e.op_time)).format("YYYY-MM-DD HH:mm:ss") + '
' + e.name + '' + moment(new Date(e.creation_time)).format("YYYY-MM-DD HH:mm:ss") + '
' + e.username + '' + e.email + '
- - - - - - - - - -
{{i18n .Lang "username"}}{{i18n .Lang "role"}}{{i18n .Lang "operation"}}
-
- -
-
-
- -
-
{{i18n .Lang "username"}}:
- - - - -
-
-
-
- -
-
-

-

- -
- -
-
{{i18n .Lang "operation"}}:
- - {{i18n .Lang "all"}} - Create - Pull - Push - Delete - {{i18n .Lang "others"}}: - - -
-
-

-
- -
-
{{i18n .Lang "start_date"}}:
-
- - - - -
-
-
-
-
-
{{i18n .Lang "end_date"}}:
-
- - - - -
-
-
- -
-
- - - - - - - - - - - - -
{{i18n .Lang "username"}}{{i18n .Lang "repo_name"}}{{i18n .Lang "repo_tag"}}{{i18n .Lang "operation"}}{{i18n .Lang "timestamp"}}
-
- -
- - - - - - - \ No newline at end of file diff --git a/views/ng/layout.htm b/views/layout.htm similarity index 100% rename from views/ng/layout.htm rename to views/layout.htm diff --git a/views/ng/navigation-detail.htm b/views/navigation-detail.htm similarity index 100% rename from views/ng/navigation-detail.htm rename to views/navigation-detail.htm diff --git a/views/navigation-header.htm b/views/navigation-header.htm new file mode 100644 index 000000000..6c9b5da9d --- /dev/null +++ b/views/navigation-header.htm @@ -0,0 +1,9 @@ +{{ if eq .HasLoggedIn true }} + +{{ end }} \ No newline at end of file diff --git a/views/ng/navigation-header.htm b/views/ng/navigation-header.htm deleted file mode 100644 index 4b0e67e69..000000000 --- a/views/ng/navigation-header.htm +++ /dev/null @@ -1,9 +0,0 @@ -{{ if eq .HasLoggedIn true }} - -{{ end }} \ No newline at end of file diff --git a/views/ng/project.htm b/views/ng/project.htm deleted file mode 100644 index 9bf321101..000000000 --- a/views/ng/project.htm +++ /dev/null @@ -1,52 +0,0 @@ -
-
-
-
-
- -
-
-
- - - - -
- - -
-
-
- -
- - - - - - - - - - - - - - - - -
// 'project_name' | tr //// 'repositories' | tr //// 'role' | tr //// 'creation_time' | tr //// 'publicity' | tr //

// 'no_projects_add_new_project' | tr //

//p.name////p.repo_count////vm.getProjectRole(p.current_user_role_id)////p.creation_time | dateL : 'YYYY-MM-DD HH:mm:ss'//
-
-
//vm.projects ? vm.projects.length : 0// // 'items' | tr //
-
-
-
-
-
-
\ No newline at end of file diff --git a/views/ng/reset-password-mail.tpl b/views/ng/reset-password-mail.tpl deleted file mode 100644 index 213124846..000000000 --- a/views/ng/reset-password-mail.tpl +++ /dev/null @@ -1,21 +0,0 @@ - - - - -

{{.Hint}}:

- {{.URL}}/ng/reset_password?reset_uuid={{.UUID}} - - \ No newline at end of file diff --git a/views/ng/sections/header-include.htm b/views/ng/sections/header-include.htm deleted file mode 100644 index 1155bc23f..000000000 --- a/views/ng/sections/header-include.htm +++ /dev/null @@ -1,227 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -{{ if eq .Lang "zh-CN" }} - -{{ else if eq .Lang "en-US"}} - -{{ end }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/views/ng/optional-menu.htm b/views/optional-menu.htm similarity index 91% rename from views/ng/optional-menu.htm rename to views/optional-menu.htm index f7512665e..e7bb51f43 100644 --- a/views/ng/optional-menu.htm +++ b/views/optional-menu.htm @@ -4,7 +4,7 @@ {{ .Username }}