@everymatrix/general-registration 1.48.0 → 1.48.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_14.cjs.entry.js +18 -8
- package/dist/collection/components/general-registration/general-registration.js +6 -2
- package/dist/esm/checkbox-group-input_14.entry.js +18 -8
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/{p-9ce83c86.entry.js → p-785b1dfb.entry.js} +30 -30
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/package.json +3 -3
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +0 -2
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +0 -2
- /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as o,H as r}from"./p-c4f9a319.js";const s={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",OnlyNumbers:"Should contains only numbers."},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",OnlyNumbers:"Csak számokat kell tartalmaznia."},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",OnlyNumbers:"Treba sadržavati samo brojeve."},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",OnlyNumbers:"Sadece sayılar içermelidir."},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",OnlyNumbers:"Deve conter apenas números"},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números"}},a=(t,e,i)=>{let o=s[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==";
|
|
1
|
+
import{r as t,c as e,h as i,g as o,H as r}from"./p-c4f9a319.js";const s={en:{dateError:"The selected date should be between {min} and {max}",dateError2:"The selected date is not within the accepted range",numberLengthError:"The number should be between {min} and {max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Password strength",passwordStrengthWeak:"is not adequate",passwordStrengthStrong:"is adequate",SpecialCharactersNotAllowed:"Should not contain special characters",InvalidEmailFormat:"Invalid email format.",EmailNotMatching:"Emails not matching!",PasswordNotMatching:"Passwords not matching",MustIncludeNumber:"Password must include a number",MustContainCapital:"Password must include a capital letter",MustIncludePunctation:"Password must include punctuation",OnlyNumbers:"Should contains only numbers.",InvalidFieldSize:"The length must be exactly 11 digits."},hu:{dateError:"A választott dátumnak {min} és {max} között kell lennie",numberLengthError:"A számnak {min} és {max} között kell lennie",lengthError:"A hossznak {minLength} és {maxLength} között kell lennie",requiredError:"Ez a beviteli mező kötelező.",invalidOriginalPasswordError:"Initial password field does not validate all criteria.",passwordStrength:"Jelszó erőssége",passwordStrengthWeak:"nem megfelelő",passwordStrengthStrong:"megfelelő",SpecialCharactersNotAllowed:"Nem tartalmazhat speciális karaktereket",InvalidEmailFormat:"Érvénytelen e-mail formátum.",EmailNotMatching:"Az e-mailek nem egyeznek!",PasswordNotMatching:"A jelszavak nem egyeznek",MustIncludeNumber:"A jelszónak tartalmaznia kell egy számot",MustContainCapital:"A jelszónak tartalmaznia kell egy nagybetűt",MustIncludePunctation:"A jelszónak tartalmaznia kell írásjelet",OnlyNumbers:"Csak számokat kell tartalmaznia.",InvalidFieldSize:"A hosszúságnak pontosan 11 számjegynek kell lennie."},hr:{dateError:"Odabrani datum treba biti između {min} i {max}",dateError2:"Odabrani datum nije unutar prihvaćenog raspona",numberLengthError:"Broj bi trebao biti između {min} i {max}",lengthError:"Duljina bi trebala biti između {minLength} i {maxLength}",requiredError:"Ovaj unos je obavezan.",invalidOriginalPasswordError:"Lozinke se ne podudaraju",passwordStrength:"Lozinka",passwordStrengthWeak:"nije dovoljno jaka",passwordStrengthStrong:"je dovoljno jaka",SpecialCharactersNotAllowed:"Ne smije sadržavati posebne znakove",InvalidEmailFormat:"Nevažeći format e-maila",EmailNotMatching:"E-mailovi se ne podudaraju!",PasswordNotMatching:"Lozinke se ne podudaraju",MustIncludeNumber:"Lozinka mora sadržavati broj",MustContainCapital:"Lozinka mora sadržavati veliko slovo",MustIncludePunctation:"Lozinka mora sadržavati barem jedan znak",OnlyNumbers:"Treba sadržavati samo brojeve.",InvalidFieldSize:"Dužina mora biti točno 11 znamenki."},tr:{dateError:"Seçilen tarih {min} ve {max} arasında olmalıdır",dateError2:"Seçilen tarih kabul edilen aralıkta değil",numberLengthError:"Sayı {min} ve {max} arasında olmalıdır",lengthError:"Uzunluk {minLength} ve {maxLength} arasında olmalıdır",requiredError:"Bu alan zorunludur.",invalidOriginalPasswordError:"İlk şifre alanı tüm kriterleri karşılamıyor.",passwordStrength:"Şifre gücü",passwordStrengthWeak:"yetersiz",passwordStrengthStrong:"yeterli",SpecialCharactersNotAllowed:"Özel karakter içermemelidir",InvalidEmailFormat:"Geçersiz e-posta formatı.",EmailNotMatching:"E-postalar uyuşmuyor!",PasswordNotMatching:"Şifreler uyuşmuyor",MustIncludeNumber:"bir sayı içermelidir",MustContainCapital:"büyük harf içermelidir",MustIncludePunctation:"noktalama işareti içermelidir",OnlyNumbers:"Sadece sayılar içermelidir.",InvalidFieldSize:"Uzunluk tam olarak 11 rakam olmalıdır."},"pt-br":{dateError:"A data selecionada deve estar entre {min} e {max}",dateError2:"A data selecionada não está dentro de um intervalo válido",numberLengthError:"O número deve estar entre {min} e {max}",lengthError:"O comprimento deve estar entre {minLength} e {maxLength}",requiredError:"Este campo é obrigatório",invalidOriginalPasswordError:"O campo de senha inicial não faz parte dos critérios válidos",PasswordStrength:"Força da senha",PasswordStrengthWeak:"Não é adequado",PasswordStrengthStrong:"é apropriado",SpecialCharactersNotAllowed:"Não deve conter caracteres especiais",InvalidEmailFormat:"Formato de email inválido",EmailNotMatching:"E-mail não corresponde",PasswordNotMatching:"Senha não corresponde",MustIncludeNumber:"A senha deve incluir um número",MustContainCapital:"A senha deve incluir uma letra maiúscula",MustIncludePunctation:"A senha deve incluir um sinal de pontuação",OnlyNumbers:"Deve conter apenas números",InvalidFieldSize:"O comprimento deve ser exatamente 11 dígitos."},"es-mx":{dateError:"La fecha seleccionada debe ser entre {min} y {max}",dateError2:"La fecha seleccionada no está dentro de un rango válido",numberLengthError:"El número debe ser entre {min} y {max}",lengthError:"La longitud deber ser entre {minLength} y {maxLength}",requiredError:"Este campo es requerido",invalidOriginalPasswordError:"El campo de contraseña inicial no es parte del criterio válido",PasswordStrength:"La fortaleza de la contraseña",PasswordStrengthWeak:"no es adecuada",PasswordStrengthStrong:"es adecuada",SpecialCharactersNotAllowed:"No debe contener caracteres especiales",InvalidEmailFormat:"Formato inválido de correo",EmailNotMatching:"El correo electrónico no coincide",PasswordNotMatching:"La contraseña no coincide",MustIncludeNumber:"La contraseña debe incluir un número",MustContainCapital:"La contraseña debe incluir una letra mayúscula",MustIncludePunctation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números",InvalidFieldSize:"La longitud debe ser exactamente de 11 dígitos."}},a=(t,e,i)=>{let o=s[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -20,7 +20,7 @@ const c=window,u=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
|
|
|
20
20
|
* @license
|
|
21
21
|
* Copyright 2017 Google LLC
|
|
22
22
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/;var g;const b=window,
|
|
23
|
+
*/;var g;const b=window,y=b.trustedTypes,_=y?y.emptyScript:"",w=b.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?_:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},k=(t,e)=>e!==t&&(e==e||t==t),E={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:k},A="finalized";class S extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const o=this._$Ep(i,e);void 0!==o&&(this._$Ev.set(o,i),t.push(o))})),t}static createProperty(t,e=E){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);void 0!==o&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){const r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||E}static finalize(){if(this.hasOwnProperty(A))return!1;this[A]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(v(t))}else void 0!==t&&e.push(v(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),o=c.litNonce;void 0!==o&&i.setAttribute("nonce",o),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=E){var o;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const s=(void 0!==(null===(o=i.converter)||void 0===o?void 0:o.toAttribute)?i.converter:x).toAttribute(e,i.type);this._$El=t,null==s?this.removeAttribute(r):this.setAttribute(r,s),this._$El=null}}_$AK(t,e){var i;const o=this.constructor,r=o._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=o.getPropertyOptions(r),s="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:x;this._$El=r,this[r]=s.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||k)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
24
24
|
/**
|
|
25
25
|
* @license
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
@@ -43,7 +43,7 @@ const pt=t=>class extends t{static get properties(){return{_theme:{type:String,r
|
|
|
43
43
|
* @license
|
|
44
44
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
45
45
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,ft=[];function vt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function gt(t,e,i={}){t&&vt(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof p||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):ft.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function bt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ft}function
|
|
46
|
+
*/,ft=[];function vt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function gt(t,e,i={}){t&&vt(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof p||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):ft.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function bt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ft}function yt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function _t(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=bt().find((e=>e.moduleId===t));i?e.push(..._t(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function wt(t){const e=`${t}-default-theme`,i=bt().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[..._t(t),...t.styles],includePriority:yt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:bt().filter((t=>t.moduleId===e))}const xt=t=>class extends(pt(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!vt(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype);this.__themes=[...(t?t.constructor.__themes:[])||[],...wt(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,i)=>i===e.lastIndexOf(t)))}}
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -698,7 +698,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
698
698
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
699
699
|
Code distributed by Google as part of the polymer project is also
|
|
700
700
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
701
|
-
*/function ue(t){return t.indexOf(".")>=0}function de(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function me(t,e){return 0===t.indexOf(e+".")}function pe(t,e){return 0===e.indexOf(t+".")}function fe(t,e,i){return e+i.slice(t.length)}function ve(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let o=t[i].toString().split(".");for(let t=0;t<o.length;t++)e.push(o[t])}return e.join(".")}return t}function ge(t){return Array.isArray(t)?ve(t).split("."):t.toString().split(".")}function be(t,e,i){let o=t,r=ge(e);for(let t=0;t<r.length;t++){if(!o)return;o=o[r[t]]}return i&&(i.path=r.join(".")),o}function
|
|
701
|
+
*/function ue(t){return t.indexOf(".")>=0}function de(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function me(t,e){return 0===t.indexOf(e+".")}function pe(t,e){return 0===e.indexOf(t+".")}function fe(t,e,i){return e+i.slice(t.length)}function ve(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let o=t[i].toString().split(".");for(let t=0;t<o.length;t++)e.push(o[t])}return e.join(".")}return t}function ge(t){return Array.isArray(t)?ve(t).split("."):t.toString().split(".")}function be(t,e,i){let o=t,r=ge(e);for(let t=0;t<r.length;t++){if(!o)return;o=o[r[t]]}return i&&(i.path=r.join(".")),o}function ye(t,e,i){let o=t,r=ge(e),s=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(o=o[r[t]],!o)return;o[s]=i}else o[e]=i;return r.join(".")}
|
|
702
702
|
/**
|
|
703
703
|
@license
|
|
704
704
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -707,7 +707,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
707
707
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
708
708
|
Code distributed by Google as part of the polymer project is also
|
|
709
709
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
710
|
-
*/const
|
|
710
|
+
*/const _e={},we=/-[a-z]/g,xe=/([A-Z])/g;function ke(t){return _e[t]||(_e[t]=t.indexOf("-")<0?t:t.replace(we,(t=>t[1].toUpperCase())))}function Ee(t){return _e[t]||(_e[t]=t.replace(xe,"-$1").toLowerCase())}
|
|
711
711
|
/**
|
|
712
712
|
@license
|
|
713
713
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -727,7 +727,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
727
727
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
728
728
|
* Google as part of the polymer project is also subject to an additional IP
|
|
729
729
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
730
|
-
*/let Ze=0;const Xe=[],Je={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Qe="__computeInfo",$e=/[A-Z]/;function ti(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function ei(t,e,i,o,r,s){if(e){let a=!1;const n=Ze++;for(let l in i){let h=e[r?de(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===n||r&&!oi(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,o,e.info,r,s),a=!0)}return a}return!1}function ii(t,e,i,o,r,s,a,n){let l=!1,h=e[a?de(o):o];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===i||a&&!oi(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,r,s,e.info,a,n),l=!0);return l}function oi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!me(i,t))||!(!e.wildcard||!pe(i,t))}return!0}function ri(t,e,i,o,r){let s="string"==typeof r.method?t[r.method]:r.method,a=r.property;s?s.call(t,t.__data[a],o[a]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function si(t,e,i){let o=de(e);return o!==e&&(ai(t,Ee(o)+"-changed",i[e],e),!0)}function ai(t,e,i,o){let r={value:i,queueProperty:!0};o&&(r.path=o),ce(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function ni(t,e,i,o,r,s){let a=(s?de(e):e)!=e?e:null,n=a?be(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),ai(t,r.eventName,n,a)}function li(t,e,i,o,r){let s=t.__data[e];Pt&&(s=Pt(s,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,s)}const hi=(t,e,i)=>{let o=0,r=e.length-1,s=-1;for(;o<=r;){const a=o+r>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)o=a+1;else{if(!(n>0)){s=a;break}r=a-1}}s<0&&(s=r+1),e.splice(s,0,t)},ci=(t,e,i,o,r)=>{const s=e[r?de(t):t];if(s)for(let e=0;e<s.length;e++){const a=s[e];a.info.lastRun===Ze||r&&!oi(t,a.trigger)||(a.info.lastRun=Ze,hi(a.info,i,o))}};function ui(t,e,i,o,r){let s=bi(t,e,i,0,r);if(s===Xe)return!1;let a=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,s,!0):(t[a]=s,!1)}function di(t,e,i,o,r,s,a){i.bindings=i.bindings||[];let n={kind:o,target:r,parts:s,literal:a,isCompound:1!==s.length};if(i.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||Ee(r)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let o=n.parts[i];o.compoundIndex=i,mi(t,e,n,o,l)}}function mi(t,e,i,o,r){if(!o.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let s=o.dependencies,a={index:r,binding:i,part:o,evaluator:t};for(let i=0;i<s.length;i++){let o=s[i];"string"==typeof o&&(o=Ai(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:pi,info:a,trigger:o})}}}function pi(t,e,i,o,r,s,a){let n=a[r.index],l=r.binding,h=r.part;if(s&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let o=i[e];e=fe(h.source,l.target,e),n._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(n)}else{let a=r.evaluator._evaluateBinding(t,h,e,i,o,s);a!==Xe&&function(t,e,i,o,r){if(r=function(t,e,i,o){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[o.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,o),Pt&&(r=Pt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[Je.READ_ONLY]&&e[Je.READ_ONLY][o]||e._setPendingProperty(o,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,r)}}(t,n,l,h,a)}}function fi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,r=new Array(o.length);for(let t=0;t<o.length;t++)r[t]=o[t].literal;let s=e.target;i[s]=r,e.literal&&"property"==e.kind&&("className"===s&&(t=ce(t)),t[s]=e.literal)}}function vi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,r){let s,a=t.detail,n=a&&a.path;n?(o=fe(i,o,n),s=a&&a.value):s=t.currentTarget[i],s=r?!s:s,e[Je.READ_ONLY]&&e[Je.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,s,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function gi(t,e,i,o,r,s){let a={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:s=e.static||s&&("object"!=typeof s||s[e.methodName])};for(let r,s=0;s<e.args.length&&(r=e.args[s]);s++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:o,info:a,trigger:r});return s&&t._addPropertyEffect(e.methodName,i,{fn:o,info:a}),a}function bi(t,e,i,o,r){let s=t._methodHost||t,a=s[r.methodName];if(a){let o=t._marshalArgs(r.args,e,i);return o===Xe?Xe:a.apply(s,o)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const _i=[],yi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",wi="(?:("+yi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",xi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+yi+"\\s*(?:\\(\\s*(?:(?:"+wi+"(?:,\\s*"+wi+")*)?)\\)\\s*)?)(?:]]|}})","g");function ki(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ei(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:_i};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ai(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ai(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=de(e),i.structured=ue(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Si(t,e,i){let o=be(t,i);return void 0===o&&(o=e[i]),o}function Ci(t,e,i,o){const r={indexSplices:o};Bt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Bt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ii(t,e,i,o,r,s){Ci(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const Ti=Zt((t=>{const e=Ke(Fe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Je}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Di.length){let t=Di[Di.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Je.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Je.READ_ONLY);let o=ti(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=ti(this,e,!0)[t],r=o.indexOf(i);r>=0&&o.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Je.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Je.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Je.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Je.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||de(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=be(this,t);if(!(t=_e(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let o=t.__dataLinkedPaths;if(o){let r;for(let s in o){let a=o[s];pe(s,e)?(r=fe(s,a,e),t._setPendingPropertyOrPath(r,i,!0,!0)):pe(a,e)&&(r=fe(a,s,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ce(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&ue(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[Je.NOTIFY]&&this[Je.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[Je.READ_ONLY]&&this[Je.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let o,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let r=t[Je.COMPUTE];if(r)if(Vt){Ze++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Je.COMPUTE];let o,{counts:r,ready:s,total:a}=function(t){const e=t[Qe],i={},o=t[Je.COMPUTE],r=[];let s=0;for(let t in e){const o=e[t];s+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||r.push(t);return{counts:i,ready:r,total:s}}(t);for(;o=s.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--r[e]&&s.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)ci(t,r,a,s,o);let n;for(;n=a.shift();)ui(t,"",e,0,n)&&ci(n.methodInfo,r,a,s,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;ei(t,r,s,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}(this,e,i,r),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),ei(this,this[Je.REFLECT],e,i,r),ei(this,this[Je.OBSERVE],e,i,r),o&&function(t,e,i,o,r){let s,a,n=t[Je.NOTIFY],l=Ze++;for(let a in e)e[a]&&(n&&ii(t,n,l,a,i,o,r)||r&&si(t,a,i))&&(s=!0);s&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,o,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Je.PROPAGATE]&&ei(this,this[Je.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const r=(e,o)=>{ei(this,t.propertyEffects,e,i,o,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,o)};t.runEffects?t.runEffects(r,e,o):r(e,o)}linkPaths(t,e){t=ve(t),e=ve(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ve(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ci(this,be(this,t,i),i.path,e)}get(t,e){return be(e||this,t)}set(t,e,i){i?_e(i,t,e):this[Je.READ_ONLY]&&this[Je.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=be(this,t,i),r=o.length,s=o.push(...e);return e.length&&Ii(this,o,i.path,r,e.length,[]),s}pop(t){let e={path:""},i=be(this,t,e),o=Boolean(i.length),r=i.pop();return o&&Ii(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...o){let r,s={path:""},a=be(this,t,s);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?a.splice(e):a.splice(e,i,...o),(o.length||r.length)&&Ii(this,a,s.path,e,o.length,r),r}shift(t){let e={path:""},i=be(this,t,e),o=Boolean(i.length),r=i.shift();return o&&Ii(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},o=be(this,t,i),r=o.unshift(...e);return e.length&&Ii(this,o,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=be(this,t,o),i=o.path}else i=Array.isArray(t)?ve(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Je.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Je.OBSERVE,{fn:ri,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,Je.OBSERVE,{fn:ri,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ei(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");gi(this,i,Je.OBSERVE,bi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Je.NOTIFY,{fn:ni,info:{eventName:Ee(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Je.REFLECT,{fn:li,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=Ei(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const r=gi(this,o,Je.COMPUTE,ui,t,i);ti(this,Qe)[t]=r}_marshalArgs(t,e,i){const o=this.__data,r=[];for(let s=0,a=t.length;s<a;s++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[s];if(!c)if(l){const t=pe(a,e),r=Si(o,i,t?e:a);h={path:t?e:a,value:r,base:t?be(o,a):r}}else h=n?Si(o,i,a):o[a];if(Bt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Xe;r[s]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Di.push(this);let i=super._stampTemplate(t,e);if(Di.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:o}=e;if(o.length)for(let e=0;e<o.length;e++){let r=i[e],s=o[e].bindings;if(s)for(let e=0;e<s.length;e++){let i=s[e];fi(r,i),vi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:r}=e;i?i.nextSibling=o:r&&(r.firstChild=o),o?o.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];ce(ce(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let r=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ki(e)||" ",di(this,i,o,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,o,r,s){let a=this._parseBindings(s,i);if(a){let e=r,s="property";$e.test(r)?s="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),s="attribute");let n=ki(a);return n&&"attribute"==s&&("class"==r&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(r)),t.setAttribute(r,n)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(r=ke(r)),di(this,i,o,s,r,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,r,s)}static _parseTemplateNestedTemplate(t,i,o){let r=e._parseTemplateNestedTemplate.call(this,t,i,o);const s=t.parentNode,a=o.templateInfo,n="dom-if"===s.localName;qt&&(n||"dom-repeat"===s.localName)&&(s.removeChild(t),(o=o.parentInfo).templateInfo=a,o.noted=!0,r=!1);let l=a.hostProps;if(Ht&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),qt||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)di(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,o=[],r=0;for(;null!==(i=xi.exec(t));){i.index>r&&o.push({literal:t.slice(r,i.index)});let s=i[1][0],a=Boolean(i[2]),n=i[3].trim(),l=!1,h="",c=-1;"{"==s&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let u=Ei(n),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let o=e.dynamicFns;(o&&o[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(n);o.push({source:n,mode:s,negate:a,customEvent:l,signature:u,dependencies:d,event:h}),r=xi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,r,s){let a;return a=e.signature?bi(t,i,o,0,e.signature):i!=e.source?be(t,e.source):s&&ue(i)?be(t,i):t.__data[i],e.negate&&(a=!a),a}}})),Di=[],zi=Zt((t=>{const e=Me(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
730
|
+
*/let Ze=0;const Xe=[],Je={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Qe="__computeInfo",$e=/[A-Z]/;function ti(t,e,i){let o=t[e];if(o){if(!t.hasOwnProperty(e)&&(o=t[e]=Object.create(t[e]),i))for(let t in o){let e=o[t],i=o[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else o=t[e]={};return o}function ei(t,e,i,o,r,s){if(e){let a=!1;const n=Ze++;for(let l in i){let h=e[r?de(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===n||r&&!oi(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,o,e.info,r,s),a=!0)}return a}return!1}function ii(t,e,i,o,r,s,a,n){let l=!1,h=e[a?de(o):o];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===i||a&&!oi(o,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,o,r,s,e.info,a,n),l=!0);return l}function oi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!me(i,t))||!(!e.wildcard||!pe(i,t))}return!0}function ri(t,e,i,o,r){let s="string"==typeof r.method?t[r.method]:r.method,a=r.property;s?s.call(t,t.__data[a],o[a]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function si(t,e,i){let o=de(e);return o!==e&&(ai(t,Ee(o)+"-changed",i[e],e),!0)}function ai(t,e,i,o){let r={value:i,queueProperty:!0};o&&(r.path=o),ce(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function ni(t,e,i,o,r,s){let a=(s?de(e):e)!=e?e:null,n=a?be(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),ai(t,r.eventName,n,a)}function li(t,e,i,o,r){let s=t.__data[e];Pt&&(s=Pt(s,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,s)}const hi=(t,e,i)=>{let o=0,r=e.length-1,s=-1;for(;o<=r;){const a=o+r>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)o=a+1;else{if(!(n>0)){s=a;break}r=a-1}}s<0&&(s=r+1),e.splice(s,0,t)},ci=(t,e,i,o,r)=>{const s=e[r?de(t):t];if(s)for(let e=0;e<s.length;e++){const a=s[e];a.info.lastRun===Ze||r&&!oi(t,a.trigger)||(a.info.lastRun=Ze,hi(a.info,i,o))}};function ui(t,e,i,o,r){let s=bi(t,e,i,0,r);if(s===Xe)return!1;let a=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,s,!0):(t[a]=s,!1)}function di(t,e,i,o,r,s,a){i.bindings=i.bindings||[];let n={kind:o,target:r,parts:s,literal:a,isCompound:1!==s.length};if(i.bindings.push(n),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||Ee(r)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let o=n.parts[i];o.compoundIndex=i,mi(t,e,n,o,l)}}function mi(t,e,i,o,r){if(!o.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let s=o.dependencies,a={index:r,binding:i,part:o,evaluator:t};for(let i=0;i<s.length;i++){let o=s[i];"string"==typeof o&&(o=Ai(o),o.wildcard=!0),t._addTemplatePropertyEffect(e,o.rootProperty,{fn:pi,info:a,trigger:o})}}}function pi(t,e,i,o,r,s,a){let n=a[r.index],l=r.binding,h=r.part;if(s&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let o=i[e];e=fe(h.source,l.target,e),n._setPendingPropertyOrPath(e,o,!1,!0)&&t._enqueueClient(n)}else{let a=r.evaluator._evaluateBinding(t,h,e,i,o,s);a!==Xe&&function(t,e,i,o,r){if(r=function(t,e,i,o){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[o.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,o),Pt&&(r=Pt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let o=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[o]?e[Je.READ_ONLY]&&e[Je.READ_ONLY][o]||e._setPendingProperty(o,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,o,r)}}(t,n,l,h,a)}}function fi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),o=e.parts,r=new Array(o.length);for(let t=0;t<o.length;t++)r[t]=o[t].literal;let s=e.target;i[s]=r,e.literal&&"property"==e.kind&&("className"===s&&(t=ce(t)),t[s]=e.literal)}}function vi(t,e,i){if(i.listenerEvent){let o=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,o,r){let s,a=t.detail,n=a&&a.path;n?(o=fe(i,o,n),s=a&&a.value):s=t.currentTarget[i],s=r?!s:s,e[Je.READ_ONLY]&&e[Je.READ_ONLY][o]||!e._setPendingPropertyOrPath(o,s,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,o.source,o.negate)}))}}function gi(t,e,i,o,r,s){let a={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:s=e.static||s&&("object"!=typeof s||s[e.methodName])};for(let r,s=0;s<e.args.length&&(r=e.args[s]);s++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:o,info:a,trigger:r});return s&&t._addPropertyEffect(e.methodName,i,{fn:o,info:a}),a}function bi(t,e,i,o,r){let s=t._methodHost||t,a=s[r.methodName];if(a){let o=t._marshalArgs(r.args,e,i);return o===Xe?Xe:a.apply(s,o)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const yi=[],_i="(?:[a-zA-Z_$][\\w.:$\\-*]*)",wi="(?:("+_i+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",xi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+_i+"\\s*(?:\\(\\s*(?:(?:"+wi+"(?:,\\s*"+wi+")*)?)\\)\\s*)?)(?:]]|}})","g");function ki(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ei(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:yi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ai(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function Ai(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},o=e[0];switch("-"===o&&(o=e[1]),o>="0"&&o<="9"&&(o="#"),o){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=de(e),i.structured=ue(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Si(t,e,i){let o=be(t,i);return void 0===o&&(o=e[i]),o}function Ci(t,e,i,o){const r={indexSplices:o};Bt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Bt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ii(t,e,i,o,r,s){Ci(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const Ti=Zt((t=>{const e=Ke(Fe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Je}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(Di.length){let t=Di[Di.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Je.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Je.READ_ONLY);let o=ti(this,e,!0)[t];o||(o=this[e][t]=[]),o.push(i)}_removePropertyEffect(t,e,i){let o=ti(this,e,!0)[t],r=o.indexOf(i);r>=0&&o.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Je.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Je.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Je.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Je.COMPUTE)}_setPendingPropertyOrPath(t,e,i,o){if(o||de(Array.isArray(t)?t[0]:t)!==t){if(!o){let i=be(this,t);if(!(t=ye(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let o=t.__dataLinkedPaths;if(o){let r;for(let s in o){let a=o[s];pe(s,e)?(r=fe(s,a,e),t._setPendingPropertyOrPath(r,i,!0,!0)):pe(a,e)&&(r=fe(a,s,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ce(t)),t[e]=i)}_setPendingProperty(t,e,i){let o=this.__dataHasPaths&&ue(t);return!!this._shouldPropertyChange(t,e,(o?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),o?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(o||this[Je.NOTIFY]&&this[Je.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[Je.READ_ONLY]&&this[Je.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let o,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,o){let r=t[Je.COMPUTE];if(r)if(Vt){Ze++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Je.COMPUTE];let o,{counts:r,ready:s,total:a}=function(t){const e=t[Qe],i={},o=t[Je.COMPUTE],r=[];let s=0;for(let t in e){const o=e[t];s+=i[t]=o.args.filter((t=>!t.literal)).length+(o.dynamicFn?1:0)}for(let t in o)e[t]||r.push(t);return{counts:i,ready:r,total:s}}(t);for(;o=s.shift();){e.set(o,e.size);const t=i[o];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--r[e]&&s.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)ci(t,r,a,s,o);let n;for(;n=a.shift();)ui(t,"",e,0,n)&&ci(n.methodInfo,r,a,s,o);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let s=e;for(;ei(t,r,s,i,o);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),s=t.__dataPending,t.__dataPending=null}}(this,e,i,r),o=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),ei(this,this[Je.REFLECT],e,i,r),ei(this,this[Je.OBSERVE],e,i,r),o&&function(t,e,i,o,r){let s,a,n=t[Je.NOTIFY],l=Ze++;for(let a in e)e[a]&&(n&&ii(t,n,l,a,i,o,r)||r&&si(t,a,i))&&(s=!0);s&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,o,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Je.PROPAGATE]&&ei(this,this[Je.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,o){const r=(e,o)=>{ei(this,t.propertyEffects,e,i,o,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,o)};t.runEffects?t.runEffects(r,e,o):r(e,o)}linkPaths(t,e){t=ve(t),e=ve(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ve(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ci(this,be(this,t,i),i.path,e)}get(t,e){return be(e||this,t)}set(t,e,i){i?ye(i,t,e):this[Je.READ_ONLY]&&this[Je.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},o=be(this,t,i),r=o.length,s=o.push(...e);return e.length&&Ii(this,o,i.path,r,e.length,[]),s}pop(t){let e={path:""},i=be(this,t,e),o=Boolean(i.length),r=i.pop();return o&&Ii(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...o){let r,s={path:""},a=be(this,t,s);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?a.splice(e):a.splice(e,i,...o),(o.length||r.length)&&Ii(this,a,s.path,e,o.length,r),r}shift(t){let e={path:""},i=be(this,t,e),o=Boolean(i.length),r=i.shift();return o&&Ii(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},o=be(this,t,i),r=o.unshift(...e);return e.length&&Ii(this,o,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let o={path:""};e=be(this,t,o),i=o.path}else i=Array.isArray(t)?ve(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Je.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let o={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Je.OBSERVE,{fn:ri,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,Je.OBSERVE,{fn:ri,info:o,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ei(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");gi(this,i,Je.OBSERVE,bi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Je.NOTIFY,{fn:ni,info:{eventName:Ee(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Je.REFLECT,{fn:li,info:{attrName:e}})}_createComputedProperty(t,e,i){let o=Ei(e);if(!o)throw new Error("Malformed computed expression '"+e+"'");const r=gi(this,o,Je.COMPUTE,ui,t,i);ti(this,Qe)[t]=r}_marshalArgs(t,e,i){const o=this.__data,r=[];for(let s=0,a=t.length;s<a;s++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[s];if(!c)if(l){const t=pe(a,e),r=Si(o,i,t?e:a);h={path:t?e:a,value:r,base:t?be(o,a):r}}else h=n?Si(o,i,a):o[a];if(Bt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Xe;r[s]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),o=this.__preBoundTemplateInfo==i;if(!o)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=o,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,o=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=o,o?o.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let o=t.propertyEffects=t.propertyEffects||{};(o[e]=o[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Di.push(this);let i=super._stampTemplate(t,e);if(Di.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:o}=e;if(o.length)for(let e=0;e<o.length;e++){let r=i[e],s=o[e].bindings;if(s)for(let e=0;e<s.length;e++){let i=s[e];fi(r,i),vi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:o,parent:r}=e;i?i.nextSibling=o:r&&(r.firstChild=o),o?o.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let s=e.childNodes;for(let t=0;t<s.length;t++){let e=s[t];ce(ce(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,o){let r=e._parseTemplateNode.call(this,t,i,o);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ki(e)||" ",di(this,i,o,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,o,r,s){let a=this._parseBindings(s,i);if(a){let e=r,s="property";$e.test(r)?s="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),s="attribute");let n=ki(a);return n&&"attribute"==s&&("class"==r&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(r)),t.setAttribute(r,n)),"attribute"==s&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===s&&(r=ke(r)),di(this,i,o,s,r,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,o,r,s)}static _parseTemplateNestedTemplate(t,i,o){let r=e._parseTemplateNestedTemplate.call(this,t,i,o);const s=t.parentNode,a=o.templateInfo,n="dom-if"===s.localName;qt&&(n||"dom-repeat"===s.localName)&&(s.removeChild(t),(o=o.parentInfo).templateInfo=a,o.noted=!0,r=!1);let l=a.hostProps;if(Ht&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),qt||(o.parentInfo.noted=!0));else{let t="{";for(let e in l)di(this,i,o,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,o=[],r=0;for(;null!==(i=xi.exec(t));){i.index>r&&o.push({literal:t.slice(r,i.index)});let s=i[1][0],a=Boolean(i[2]),n=i[3].trim(),l=!1,h="",c=-1;"{"==s&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let u=Ei(n),d=[];if(u){let{args:t,methodName:i}=u;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let o=e.dynamicFns;(o&&o[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(n);o.push({source:n,mode:s,negate:a,customEvent:l,signature:u,dependencies:d,event:h}),r=xi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&o.push({literal:e})}return o.length?o:null}static _evaluateBinding(t,e,i,o,r,s){let a;return a=e.signature?bi(t,i,o,0,e.signature):i!=e.source?be(t,e.source):s&&ue(i)?be(t,i):t.__data[i],e.negate&&(a=!a),a}}})),Di=[],zi=Zt((t=>{const e=Me(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function o(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
731
731
|
/**
|
|
732
732
|
@license
|
|
733
733
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -792,7 +792,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
792
792
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
793
793
|
Code distributed by Google as part of the polymer project is also
|
|
794
794
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
795
|
-
*/const
|
|
795
|
+
*/const yo=!1,_o=t=>t,wo="string"==typeof document.head.style.touchAction,xo="__polymerGestures",ko="__polymerGesturesHandled",Eo="__polymerGesturesTouchAction",Ao=["mousedown","mousemove","mouseup","click"],So=[0,1,4,2],Co=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Io(t){return Ao.indexOf(t)>-1}let To=!1;function Do(t){if(!Io(t)&&"touchend"!==t)return wo&&To&&yo?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){To=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const zo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),No={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Oo(t){const e=t.type;if(!Io(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Co&&(e=So[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Mo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ro(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Po(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Go=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Fo={},Lo=[];function Uo(t){const e=Go(t);return e.length>0?e[0]:t.target}function jo(t){const e=t.type,i=t.currentTarget[xo];if(!i)return;const o=i[e];if(!o)return;if(!t[ko]&&(t[ko]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Mo.touch.id=i.identifier),Mo.touch.id!==i.identifier)return;wo||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Mo.touch.x=e.clientX,Mo.touch.y=e.clientY,Mo.touch.scrollDecided=!1;else if("touchmove"===i){if(Mo.touch.scrollDecided)return;Mo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Go(t);for(let t,o=0;o<i.length;o++)if(t=i[o],t[Eo]){e=t[Eo];break}return e}(t);let o=!1;const r=Math.abs(Mo.touch.x-e.clientX),s=Math.abs(Mo.touch.y-e.clientY);t.cancelable&&("none"===i?o=!0:"pan-x"===i?o=s>r:"pan-y"===i&&(o=r>s)),o?t.preventDefault():Wo("track")}}(t)}const r=t[ko];if(!r.skip){for(let e,i=0;i<Lo.length;i++)e=Lo[i],o[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,s=0;s<Lo.length;s++)i=Lo[s],o[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function Bo(t,e,i){return!!Fo[e]&&(function(t,e,i){const o=Fo[e],r=o.deps,s=o.name;let a=t[xo];a||(t[xo]=a={});for(let e,i,o=0;o<r.length;o++)e=r[o],zo&&Io(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,jo,Do(e)),i[s]=(i[s]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),o.touchAction&&qo(t,o.touchAction)}(t,e,i),!0)}function Vo(t){Lo.push(t),t.emits.forEach((e=>{Fo[e]=t}))}function qo(t,e){wo&&t instanceof HTMLElement&&Ji.run((()=>{t.style.touchAction=e})),t[Eo]=e}function Ho(t,e,i){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=i,_o(t).dispatchEvent(o),o.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Wo(t){const e=function(t){for(let e,i=0;i<Lo.length;i++){e=Lo[i];for(let i,o=0;o<e.emits.length;o++)if(i=e.emits[o],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Yo(t,e,i,o){e&&Ho(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>Wo(t)})}function Ko(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),r=Math.abs(t.y-i);return o>=5||r>=5}function Zo(t,e,i){if(!e)return;const o=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let s,a=0;o&&(s=r.x-o.x,a=r.y-o.y),Ho(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:s,ddy:a,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),o=i;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const r=o;if(o=o.shadowRoot.elementFromPoint(t,e),r===o)break;o&&(i=o)}return i}(i.clientX,i.clientY)})}function Xo(t,e,i){const o=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),s=Uo(i||e);!s||No[s.localName]&&s.hasAttribute("disabled")||(isNaN(o)||isNaN(r)||o<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Uo(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),o=t.pageX,r=t.pageY;return!(o>=i.left&&o<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||Ho(s,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
796
796
|
/**
|
|
797
797
|
* @license
|
|
798
798
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -948,20 +948,20 @@ gt("vaadin-checkbox",f`
|
|
|
948
948
|
outline-width: 2px;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
`,{moduleId:"vaadin-checkbox-styles"});class
|
|
951
|
+
`,{moduleId:"vaadin-checkbox-styles"});class yr extends(br(ho(xt(Li)))){static get is(){return"vaadin-checkbox"}static get template(){return Gi`
|
|
952
952
|
<div class="vaadin-checkbox-container">
|
|
953
953
|
<div part="checkbox" aria-hidden="true"></div>
|
|
954
954
|
<slot name="input"></slot>
|
|
955
955
|
<slot name="label"></slot>
|
|
956
956
|
</div>
|
|
957
957
|
<slot name="tooltip"></slot>
|
|
958
|
-
`}ready(){super.ready(),this._tooltipController=new bo(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}l(
|
|
958
|
+
`}ready(){super.ready(),this._tooltipController=new bo(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}l(yr);
|
|
959
959
|
/**
|
|
960
960
|
* @license
|
|
961
961
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
962
962
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
963
963
|
*/
|
|
964
|
-
const
|
|
964
|
+
const _r=f`
|
|
965
965
|
:host([has-helper]) [part='helper-text']::before {
|
|
966
966
|
content: '';
|
|
967
967
|
display: block;
|
|
@@ -1113,7 +1113,7 @@ const yr=f`
|
|
|
1113
1113
|
margin-left: 0;
|
|
1114
1114
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1115
1115
|
}
|
|
1116
|
-
`;gt("",wr,{moduleId:"lumo-required-field"}),gt("vaadin-checkbox-group",[wr,
|
|
1116
|
+
`;gt("",wr,{moduleId:"lumo-required-field"}),gt("vaadin-checkbox-group",[wr,_r,f`
|
|
1117
1117
|
:host {
|
|
1118
1118
|
color: var(--lumo-body-text-color);
|
|
1119
1119
|
font-size: var(--lumo-font-size-m);
|
|
@@ -1245,7 +1245,7 @@ class Cr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1245
1245
|
</div>
|
|
1246
1246
|
|
|
1247
1247
|
<slot name="tooltip"></slot>
|
|
1248
|
-
`}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new bo(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new po(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),o=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const r=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(r),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof _r))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}l(Nr);const Or=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"fa45026502fd8d46aa537aee03210ad68d30e577",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"15ded4fd896920c6244806e49f300c124c27186d",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"d7eaa205877f8f12c9ef7d4f77018665806f5c7c",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"aca39ed398415a6e2cef861be40dad33e0398759",class:"checkboxgroup__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"a1a6e1c3c02edcca572b8826ffba06835ca451c3",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"9f5f8a945e4ba13d7d0da6d362c15d00a7796b71",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Or.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}';const Mr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"0aae00d291d1da02adae1bc91e79ccd579aa5c7f",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"4b8c61d322b5065d8abe4e2687e270511fadc97f",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"934263cb58a0d379e8b7dc1f5004ad7e61c63ce0",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"88cc71329d88b6325d792226e64ff7f93e940178",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"3708dc613dc920bac6557f2a8020bbafd97d9127",class:"checkbox__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Mr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
1248
|
+
`}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new bo(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new po(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),o=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),o.forEach(this.__unregisterCheckbox);const r=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(r),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof yr))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}l(Nr);const Or=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[]}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{key:"fa45026502fd8d46aa537aee03210ad68d30e577",class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"15ded4fd896920c6244806e49f300c124c27186d",class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{key:"d7eaa205877f8f12c9ef7d4f77018665806f5c7c",class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{key:"aca39ed398415a6e2cef861be40dad33e0398759",class:"checkboxgroup__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{key:"a1a6e1c3c02edcca572b8826ffba06835ca451c3",class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{key:"9f5f8a945e4ba13d7d0da6d362c15d00a7796b71",theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Or.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}';const Mr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"0aae00d291d1da02adae1bc91e79ccd579aa5c7f",class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{key:"4b8c61d322b5065d8abe4e2687e270511fadc97f",class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{key:"934263cb58a0d379e8b7dc1f5004ad7e61c63ce0",class:"checkbox__error-message"},this.errorMessage),i("div",{key:"88cc71329d88b6325d792226e64ff7f93e940178",class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{key:"3708dc613dc920bac6557f2a8020bbafd97d9127",class:"checkbox__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Mr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}';
|
|
1249
1249
|
/**
|
|
1250
1250
|
* @license
|
|
1251
1251
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -3151,7 +3151,7 @@ const Xr=f`
|
|
|
3151
3151
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3152
3152
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3153
3153
|
*/
|
|
3154
|
-
const Jr=[wr,Xr,
|
|
3154
|
+
const Jr=[wr,Xr,_r,f`
|
|
3155
3155
|
:host {
|
|
3156
3156
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3157
3157
|
color: var(--lumo-body-text-color);
|
|
@@ -3348,12 +3348,12 @@ class gs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3348
3348
|
* @license
|
|
3349
3349
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3350
3350
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3351
|
-
*/const
|
|
3351
|
+
*/const ys=[];class _s{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return sr(t,e)?or(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(rr).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");ys.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,ys.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(ys).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
3352
3352
|
/**
|
|
3353
3353
|
* @license
|
|
3354
3354
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3355
3355
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3356
|
-
*/const ws=t=>class extends(mr(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new gs(this),this.__focusTrapController=new
|
|
3356
|
+
*/const ws=t=>class extends(mr(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new gs(this),this.__focusTrapController=new _s(this),this.__focusRestorationController=new bs}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=er();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
3357
3357
|
/**
|
|
3358
3358
|
* @license
|
|
3359
3359
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -3784,7 +3784,7 @@ const pa=new WeakMap,fa=Zt((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3784
3784
|
* @license
|
|
3785
3785
|
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3786
3786
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3787
|
-
*/,
|
|
3787
|
+
*/,ya=[f`
|
|
3788
3788
|
:host {
|
|
3789
3789
|
display: inline-flex;
|
|
3790
3790
|
outline: none;
|
|
@@ -3854,7 +3854,7 @@ const pa=new WeakMap,fa=Zt((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3854
3854
|
* @license
|
|
3855
3855
|
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3856
3856
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3857
|
-
*/],
|
|
3857
|
+
*/],_a=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const o="string"==typeof t?t.split(" "):[];o.length>0&&i.add(...o),this.__previousClasses=o}}
|
|
3858
3858
|
/**
|
|
3859
3859
|
* @license
|
|
3860
3860
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3864,7 +3864,7 @@ const pa=new WeakMap,fa=Zt((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3864
3864
|
* @license
|
|
3865
3865
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3866
3866
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3867
|
-
*/const xa=t=>class extends(ya(mr(lr(ga(Qo(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let o,r=i.getMonth(),s=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1]),s=parseInt(e[2]),e[2].length<3&&s>=0&&(s=function(t,e,i=0,o=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,o)?r-=100:t>new Date(r+50,i,o)&&(r+=100),r}(this.referenceDate?Ps(this.referenceDate):new Date,s,r,o))):2===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1])):1===e.length&&(o=parseInt(e[0])),void 0!==o)return{day:o,month:r,year:s}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ns},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new ua(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new wa(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date,this._selectDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value}))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Ps(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Ms(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Ns(this._selectedDate,this._minDate,this._maxDate);let o=!0;return this.inputElement&&(this.inputElement.checkValidity?o=this.inputElement.checkValidity():this.inputElement.validate&&(o=this.inputElement.validate())),e&&i&&o}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(t){const e=this.value;this._selectedDate=t,e!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,o,r,s){return!t||e&&(!s||r)||i&&r||!o.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",o="0000",r=t.getFullYear();return r<0?(r=-r,i="-",o="000000"):t.getFullYear()>=1e4&&(i="+",o="000000"),[i+e(r,o),e(t.getMonth()+1),e(t.getDate())].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=Ps(t);!t||i?(t?zs(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,o,r,s,a,n){t&&(t.i18n=e,t.label=i,t.minDate=o,t.maxDate=r,t.focusedDate=s,t.selectedDate=a,t.showWeekNumbers=n)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const o=this._nativeInput;this._noInput&&o&&(o.blur(),this._overlayContent.focusDateElement()),this.__showOthers=vs(this._noInput?t:[o,t])}_getInitialPosition(){const t=Ps(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Ns(e,this._minDate,this._maxDate)?e:Os(e,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){const e=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value?(t.stopPropagation(),void this._onClearButtonClick(t)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,zs(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Ps(t)}}
|
|
3867
|
+
*/const xa=t=>class extends(_a(mr(lr(ga(Qo(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let o,r=i.getMonth(),s=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1]),s=parseInt(e[2]),e[2].length<3&&s>=0&&(s=function(t,e,i=0,o=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,o)?r-=100:t>new Date(r+50,i,o)&&(r+=100),r}(this.referenceDate?Ps(this.referenceDate):new Date,s,r,o))):2===e.length?(r=parseInt(e[0])-1,o=parseInt(e[1])):1===e.length&&(o=parseInt(e[0])),void 0!==o)return{day:o,month:r,year:s}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ns},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new ua(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new wa(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date,this._selectDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value}))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Ps(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Ms(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Ns(this._selectedDate,this._minDate,this._maxDate);let o=!0;return this.inputElement&&(this.inputElement.checkValidity?o=this.inputElement.checkValidity():this.inputElement.validate&&(o=this.inputElement.validate())),e&&i&&o}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(t){const e=this.value;this._selectedDate=t,e!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,o,r,s){return!t||e&&(!s||r)||i&&r||!o.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",o="0000",r=t.getFullYear();return r<0?(r=-r,i="-",o="000000"):t.getFullYear()>=1e4&&(i="+",o="000000"),[i+e(r,o),e(t.getMonth()+1),e(t.getDate())].join("-")}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=Ps(t);!t||i?(t?zs(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,o,r,s,a,n){t&&(t.i18n=e,t.label=i,t.minDate=o,t.maxDate=r,t.focusedDate=s,t.selectedDate=a,t.showWeekNumbers=n)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const o=this._nativeInput;this._noInput&&o&&(o.blur(),this._overlayContent.focusDateElement()),this.__showOthers=vs(this._noInput?t:[o,t])}_getInitialPosition(){const t=Ps(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Ns(e,this._minDate,this._maxDate)?e:Os(e,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(t){t.target!==window&&this._overlayContent.contains(t.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){this.autoOpenDisabled&&!this._noInput||(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){const e=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),e===this.value&&this.validate()}_onEscape(t){if(!this.opened)return this.clearButtonVisible&&this.value?(t.stopPropagation(),void this._onClearButtonClick(t)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,zs(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Ps(t)}}
|
|
3868
3868
|
/**
|
|
3869
3869
|
* @license
|
|
3870
3870
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3875,7 +3875,7 @@ const pa=new WeakMap,fa=Zt((t=>class extends t{get slotStyles(){return{}}connect
|
|
|
3875
3875
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3876
3876
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3877
3877
|
*/
|
|
3878
|
-
gt("vaadin-date-picker",[
|
|
3878
|
+
gt("vaadin-date-picker",[ya,f`
|
|
3879
3879
|
:host([opened]) {
|
|
3880
3880
|
pointer-events: auto;
|
|
3881
3881
|
}
|
|
@@ -3930,18 +3930,18 @@ gt("vaadin-date-picker",[_a,f`
|
|
|
3930
3930
|
></vaadin-date-picker-overlay>
|
|
3931
3931
|
|
|
3932
3932
|
<slot name="tooltip"></slot>
|
|
3933
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new dr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new gr(this.inputElement,this._labelController)),this._tooltipController=new bo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Ea(t){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(t)}function Aa(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Sa(t){Aa(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ea(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Ia(t,e){return Aa(2,arguments),function(t,e){Aa(2,arguments);var i=Sa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Ta(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Da(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Ta(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Ta(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}l(ka);function za(t){Aa(1,arguments);var e=Sa(t),i=Ta(e).getTime()-function(t){Aa(1,arguments);var e=Da(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ta(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ma(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Sa(t),m=d.getUTCDay(),p=(m<u?7:0)+m-u;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function Ra(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Sa(t),u=c.getUTCFullYear(),d=Oa(),m=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(u+1,0,m),p.setUTCHours(0,0,0,0);var f=Ma(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ma(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function Pa(t,e){Aa(1,arguments);var i=Sa(t),o=Ma(i,e).getTime()-function(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Ra(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ma(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ga(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Fa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ga("yy"===e?o%100:o,e.length)},La=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ga(i+1,2)},Ua=function(t,e){return Ga(t.getUTCDate(),e.length)},ja=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},Ba=function(t,e){return Ga(t.getUTCHours(),e.length)},Va=function(t,e){return Ga(t.getUTCMinutes(),e.length)},qa=function(t,e){return Ga(t.getUTCSeconds(),e.length)},Ha=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Wa(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var a=e||"";return i+String(r)+a+Ga(s,2)}function Ya(t,e){return t%60==0?(t>0?"-":"+")+Ga(Math.abs(t)/60,2):Ka(t,e)}function Ka(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Ga(Math.floor(r/60),2)+i+Ga(r%60,2)}const Za={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Fa(t,e)},Y:function(t,e,i,o){var r=Ra(t,o),s=r>0?r:1-r;return"YY"===e?Ga(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Ga(s,e.length)},R:function(t,e){return Ga(Da(t),e.length)},u:function(t,e){return Ga(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ga(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ga(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return La(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ga(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Pa(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Ga(r,e.length)},I:function(t,e,i){var o=za(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ga(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ua(t,e)},D:function(t,e,i){var o=function(t){Aa(1,arguments);var e=Sa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ga(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ga(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ga(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Ga(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return ja(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ba(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Va(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):qa(t,e)},S:function(t,e){return Ha(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Ya(r);case"XXXX":case"XX":return Ka(r);default:return Ka(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Ya(r);case"xxxx":case"xx":return Ka(r);default:return Ka(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Wa(r,":");default:return"GMT"+Ka(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Wa(r,":");default:return"GMT"+Ka(r,":")}},t:function(t,e,i,o){return Ga(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ga((o._originalDate||t).getTime(),e.length)}};var Xa=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ja=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Qa={p:Ja,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Xa(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Xa(r,e)).replace("{{time}}",Ja(s,e))}};const $a=Qa;function tn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var en=["D","DD"],on=["YY","YYYY"];function rn(t){return-1!==en.indexOf(t)}function sn(t){return-1!==on.indexOf(t)}function an(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ln(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var hn,cn={date:ln({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ln({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ln({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},un={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function dn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function mn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,a=r[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(a.length)}}}const pn={code:"en-US",formatDistance:function(t,e,i){var o,r=nn[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:cn,formatRelative:function(t){return un[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(hn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(hn.matchPattern);if(!i)return null;var o=i[0],r=t.match(hn.parsePattern);if(!r)return null;var s=hn.valueCallback?hn.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:mn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:mn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:mn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gn=/^'([^]*?)'?$/,bn=/''/g,_n=/[a-zA-Z]/;function yn(t,e,i){var o,r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,_,y;Aa(2,arguments);var w=String(e),x=Oa(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==o?o:pn,E=Ca(null!==(s=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:x.firstWeekContainsDate)&&void 0!==a?a:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Ca(null!==(m=null!==(p=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==p?p:null===(_=x.locale)||void 0===_||null===(y=_.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==m?m:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Sa(t);if(!function(t){if(Aa(1,arguments),!function(t){return Aa(1,arguments),t instanceof Date||"object"===Ea(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Sa(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var C=Ia(S,tn(S)),I={firstWeekContainsDate:E,weekStartsOn:A,locale:k,_originalDate:S};return w.match(vn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,$a[e])(t,k.formatLong):t})).join("").match(fn).map((function(o){if("''"===o)return"'";var r,s,a=o[0];if("'"===a)return(s=(r=o).match(gn))?s[1].replace(bn,"'"):r;var n=Za[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!sn(o)||an(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!rn(o)||an(o,e,String(t)),n(C,o,k.localize,I);if(a.match(_n))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function xn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return wn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?wn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw s}}}}function kn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function In(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(In=function(){return!!t})()}function Tn(t){var e=In();return function(){var i,o=Cn(t);if(e){var r=Cn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return En(t)}(this,i)}}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ea(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function Nn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,zn(o.key),o)}}function On(t,e,i){return e&&Nn(t.prototype,e),i&&Nn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mn(t,e,i){return(e=zn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Rn=function(){function t(){Dn(this,t),Mn(this,"priority",void 0),Mn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Rn);var t=Tn(e);function e(i,o,r,s,a){var n;return Dn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=r,n.priority=s,a&&(n.subPriority=a),n}return On(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Gn=function(){Sn(e,Rn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"subPriority",-1),i}return On(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Fn=function(){function t(){Dn(this,t),Mn(this,"incompatibleTokens",void 0),Mn(this,"priority",void 0),Mn(this,"subPriority",void 0)}return On(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Pn(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Ln=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Mn(En(i),"incompatibleTokens",["R","u","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Un=/^(1[0-2]|0?\d)/,jn=/^(3[0-1]|[0-2]?\d)/,Bn=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Vn=/^(5[0-3]|[0-4]?\d)/,qn=/^(2[0-3]|[0-1]?\d)/,Hn=/^(2[0-4]|[0-1]?\d)/,Wn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Zn=/^[0-5]?\d/,Xn=/^\d/,Jn=/^\d{1,2}/,Qn=/^\d{1,3}/,$n=/^\d{1,4}/,tl=/^-?\d+/,el=/^-?\d/,il=/^-?\d{1,2}/,ol=/^-?\d{1,3}/,rl=/^-?\d{1,4}/,sl=/^([+-])(\d{2})(\d{2})?|Z/,al=/^([+-])(\d{2})(\d{2})|Z/,nl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ll=/^([+-])(\d{2}):(\d{2})|Z/,hl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ul(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function dl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ml(t){return ul(tl,t)}function pl(t,e){switch(t){case 1:return ul(Xn,e);case 2:return ul(Jn,e);case 3:return ul(Qn,e);case 4:return ul($n,e);default:return ul(new RegExp("^\\d{1,"+t+"}"),e)}}function fl(t,e){switch(t){case 1:return ul(el,e);case 2:return ul(il,e);case 3:return ul(ol,e);case 4:return ul(rl,e);default:return ul(new RegExp("^-?\\d{1,"+t+"}"),e)}}function vl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gl(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function bl(t){return t%400==0||t%4==0&&t%100!=0}var _l=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return cl(pl(4,t),o);case"yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=gl(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),yl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return cl(pl(4,t),o);case"Yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ra(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ma(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ma(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Ta(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Mn(En(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return pl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Mn(En(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return pl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Mn(En(i),"priority",110),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return cl(ul(Un,t),o);case"MM":return cl(pl(2,t),o);case"Mo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Sl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return cl(ul(Un,t),o);case"LL":return cl(pl(2,t),o);case"Lo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return ul(Vn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ma(function(t,e,i){Aa(2,arguments);var o=Sa(t),r=Ca(e),s=Pa(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Il=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Mn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return ul(Vn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ta(function(t,e){Aa(2,arguments);var i=Sa(t),o=Ca(e),r=za(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Tl=[31,28,31,30,31,30,31,31,30,31,30,31],Dl=[31,29,31,30,31,30,31,31,30,31,30,31],zl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"subPriority",1),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return ul(jn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){var i=bl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Dl[o]:e>=1&&e<=Tl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"subpriority",1),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return ul(Bn,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return bl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ol(t,e,i){var o,r,s,a,n,l,h,c;Aa(2,arguments);var u=Oa(),d=Ca(null!==(o=null!==(r=null!==(s=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Sa(t),p=Ca(e),f=((p%7+7)%7<d?7:0)+p-m.getUTCDay();return m.setUTCDate(m.getUTCDate()+f),m}var Ml=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Rl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return cl(pl(e.length,t),r);case"eo":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return cl(pl(e.length,t),r);case"co":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Gl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return pl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return cl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return cl(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return cl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return cl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Aa(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Sa(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ll=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ul=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["a","b","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),jl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["H","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return ul(Yn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Bl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return ul(qn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Vl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["h","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return ul(Wn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),ql=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return ul(Hn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Hl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return ul(Kn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Wl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Zn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Yl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return cl(pl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Kl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"incompatibleTokens",["t","T","x"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"X":return dl(sl,t);case"XX":return dl(al,t);case"XXXX":return dl(nl,t);case"XXXXX":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Zl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"incompatibleTokens",["t","T","X"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"x":return dl(sl,t);case"xx":return dl(al,t);case"xxxx":return dl(nl,t);case"xxxxx":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Xl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Mn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Jl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Mn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ql={G:new Ln,y:new _l,Y:new yl,R:new wl,u:new xl,Q:new kl,q:new El,M:new Al,L:new Sl,w:new Cl,I:new Il,d:new zl,D:new Nl,E:new Ml,e:new Rl,c:new Pl,i:new Gl,a:new Fl,b:new Ll,B:new Ul,h:new jl,H:new Bl,K:new Vl,k:new ql,m:new Hl,s:new Wl,S:new Yl,X:new Kl,x:new Zl,t:new Xl,T:new Jl},$l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,ih=/''/g,oh=/\S/,rh=/[a-zA-Z]/;function sh(t,e,i,o){var r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,_,y,w;Aa(3,arguments);var x=String(t),k=String(e),E=Oa(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:E.locale)&&void 0!==r?r:pn;if(!A.match)throw new RangeError("locale must contain match property");var S=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:E.firstWeekContainsDate)&&void 0!==n?n:null===(d=E.locale)||void 0===d||null===(m=d.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(f=null!==(v=null!==(g=null==o?void 0:o.weekStartsOn)&&void 0!==g?g:null==o||null===(b=o.locale)||void 0===b||null===(_=b.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==v?v:E.weekStartsOn)&&void 0!==f?f:null===(y=E.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Sa(i):new Date(NaN);var I,T={firstWeekContainsDate:S,weekStartsOn:C,locale:A},D=[new Gn],z=k.match(th).map((function(t){var e=t[0];return e in $a?(0,$a[e])(t,A.formatLong):t})).join("").match($l),N=[],O=xn(z);try{var M=function(){var e=I.value;null!=o&&o.useAdditionalWeekYearTokens||!sn(e)||an(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!rn(e)||an(e,k,t);var i=e[0],r=Ql[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var a=N.find((function(t){return s.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));N.push({token:i,fullToken:e});var n=r.run(x,e,A.match,T);if(!n)return{v:new Date(NaN)};D.push(n.setter),x=n.rest}else{if(i.match(rh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(eh)[1].replace(ih,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(O.s();!(I=O.n()).done;){var R=M();if("object"===Ea(R))return R.v}}catch(t){O.e(t)}finally{O.f()}if(x.length>0&&oh.test(x))return new Date(NaN);var P=D.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return D.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),G=Sa(i);if(isNaN(G.getTime()))return new Date(NaN);var F,L=Ia(G,tn(G)),U={},j=xn(P);try{for(j.s();!(F=j.n()).done;){var B=F.value;if(!B.validate(L,T))return new Date(NaN);var V=B.set(L,U,T);Array.isArray(V)?(L=V[0],kn(U,V[1])):L=V}}catch(t){j.e(t)}finally{j.f()}return L}function ah(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()>o.getTime()}function nh(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()<o.getTime()}const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return yn(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=sh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=sh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=sh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=sh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!nh(this.valueAsDate,this.minDate)&&!ah(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return nh(this.valueAsDate,this.minDate)||ah(this.valueAsDate,this.maxDate)?a("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return a("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return a(`${t}`,this.language)?a(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const ch={en:{termsandconditions__description:"Needed to prove user accepted terms and conditions.",emailmarketing__description:"Needed to prove email marketing consent.",sms__description:"Needed to prove sms marketing consent.","3rdparty__description":"Needed to prove 3rd party marketing consent.",noDataFound:"No data found for consents.",loading:"Loading...please wait",requiredError:"This field is mandatory"},hu:{termsandconditions__description:"Szükséges annak igazolására, hogy a felhasználó elfogadta a feltételeket és kikötéseket.",emailmarketing__description:"Szükséges annak igazolására, hogy a felhasználó beleegyezett az e-mail marketingbe.",sms__description:"Szükséges annak igazolására, hogy a felhasználó beleegyezett az SMS marketingbe.","3rdparty__description":"Szükséges annak igazolására, hogy a felhasználó beleegyezett a harmadik fél általi marketingbe.",noDataFound:"Nincs adat a hozzájárulásokról.",loading:"Betöltés...kérem várjon",requiredError:"Ez a mező kötelező"},hr:{termsandconditions__description:"Potrebno za dokazivanje da je korisnik prihvatio uvjete i odredbe.",emailmarketing__description:"Potrebno za dokazivanje pristanka na email marketing.",sms__description:"Potrebno za dokazivanje pristanka na SMS marketing.","3rdparty__description":"Potrebno za dokazivanje pristanka na marketing trećih strana.",noDataFound:"Nema podataka o privolama.",loading:"Učitavanje...molimo pričekajte",requiredError:"Ovo polje je obavezno"},tr:{termsandconditions__description:"Kullanıcının şartlar ve koşulları kabul ettiğini kanıtlamak için gereklidir.",emailmarketing__description:"E-posta pazarlama onayını kanıtlamak için gereklidir.",sms__description:"SMS pazarlama onayını kanıtlamak için gereklidir.","3rdparty__description":"Üçüncü taraf pazarlama onayını kanıtlamak için gereklidir.",noDataFound:"Onaylarla ilgili veri bulunamadı.",loading:"Yükleniyor...lütfen bekleyin",requiredError:"Bu alan zorunludur"},"pt-br":{termsandconditions__description:"Necessário para comprovar que o usuário aceitou os termos e condições.",emailmarketing__description:"Necessário para comprovar o consentimento para marketing por e-mail.",sms__description:"Necessário para comprovar o consentimento para marketing por SMS.","3rdparty__description":"Necessário para comprovar o consentimento para marketing de terceiros.",noDataFound:"Nenhum dado encontrado para consentimentos.",loading:"Carregando...por favor aguarde",requiredError:"Este campo é obrigatório"},"es-mx":{termsandconditions__description:"Necesario para demostrar que el usuario aceptó los términos y condiciones.",emailmarketing__description:"Necesario para demostrar el consentimiento para el marketing por correo electrónico.",sms__description:"Necesario para demostrar el consentimiento para el marketing por SMS.","3rdparty__description":"Necesario para demostrar el consentimiento para el marketing de terceros.",noDataFound:"No se encontraron datos para los consentimientos.",loading:"Cargando...por favor espera",requiredError:"Este campo es obligatorio"}},uh=(t,e,i)=>{let o=ch[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},dh=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])ch[e][i]=t[e][i]})),e(!0)}))})),mh=class{constructor(e){t(this,e),this.value="",this.registerErrors=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.debouncedHandleClick=this.debounce(this.handleClick,500),this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.name=void 0,this.tooltip=void 0,this.isLoading=!0,this.consentsData=void 0,this.showTooltip=!1,this.playerConsents=[],this.isValid=void 0}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}handleNewTranslations(){this.isLoading=!0,dh(this.translationUrl).then((()=>{this.isLoading=!1}))}sendMessage(){window.postMessage({type:"isConsentsValid",isValid:this.isValid})}messageHandler(t){t.data&&"setUpPlayerConsents"!=t.data.type||this.sendConsents(t.data.registerid)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}async componentWillLoad(){this.translationUrl.length>2&&await dh(this.translationUrl),this.getConsents()}addTranslation(t){ch[ch[this.language]][t.name]&&Object.keys(ch[this.language][t.name]).forEach((e=>{t[e]=ch[this.language][t.name][e]}))}getConsents(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/api/v2/gm/legislation/consents`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>console.error(t)))))).then((t=>{if(!this.registerErrors){if(this.consentsData=t,localStorage.getItem("playerConsents")){try{this.playerConsents=JSON.parse(localStorage.getItem("playerConsents"))}catch(t){console.error(t)}return}this.playerConsents=this.consentsData.map((t=>({status:"3",tagCode:t.tagCode}))),localStorage.setItem("playerConsents",JSON.stringify(this.playerConsents))}})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}sendConsents(t){const e=new URL(`${this.endpoint}/api/v2/gm/legislation/consents`),i={method:"POST",body:JSON.stringify({playerConsents:this.playerConsents,registrationId:t}),headers:{"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,i).then((t=>{t.ok||(this.registerErrors=!0)})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}handleClick(t){const e=this.consentsData.find((e=>t.tagCode===e.tagCode&&"3"===t.status&&e.mustAccept));localStorage.setItem("playerConsents",JSON.stringify(this.playerConsents)),this[`errorMessage__${t.tagCode}`].innerHTML=e?this.setErrorMessage():"",this.isValid=this.checkValidity()}handleInput(t,e){this.playerConsents[t].status=e.target.checked?"1":"3",this.debouncedHandleClick(this.playerConsents[t])}handleTooltipClick(){this.showTooltip=!this.showTooltip}debounce(t,e){let i;return function(...o){clearTimeout(i),i=setTimeout((()=>{t.apply(this,o)}),e)}}checkValidity(){return 0===this.playerConsents.filter((t=>this.consentsData.some((e=>t.tagCode===e.tagCode&&e.mustAccept&&"3"===t.status)))).length}setErrorMessage(){return uh("requiredError",this.language)}render(){return this.isLoading?i("p",null,uh("loading",this.language)):this.consentsData?i("form",{class:"checkbox"},this.consentsData.map(((t,e)=>i("div",{class:`checkbox__wrapper ${t.tagCode}__input`,ref:e=>this[t.tagCode]=e},i("input",{class:"checkbox__input",type:"checkbox",checked:"1"===this.playerConsents[e].status,id:`${t.tagCode}__input`,onInput:this.handleInput.bind(this,e)}),i("label",{class:"checkbox__label",htmlFor:`${t.tagCode}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${uh(`${t.tagCode}__description`,this.language)} ${t.mustAccept?"*":""}`})),i("small",{class:"checkbox__error-message",ref:e=>this[`errorMessage__${t.tagCode}`]=e}),i("div",{class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{class:"checkbox__tooltip-icon",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.handleTooltipClick()}),i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip})))))):i("p",null,uh("noDataFound",this.language))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"],isValid:["sendMessage"]}}};mh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox .checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline;margin-bottom:30px}.checkbox .checkbox__wrapper .checkbox__wrapper--relative{position:relative}.checkbox .checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:var(--emw--font-size-medium, 16px);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox .checkbox__label .checkbox__label-text{font-size:var(--emw--font-size-medium, 16px)}.checkbox .checkbox__label .checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox .checkbox__tooltip-icon{width:16px;height:auto}.checkbox .checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox .checkbox__tooltip.visible{opacity:1}';const ph=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{key:"e1c49fc91ead165c05b30c21ac568486e55c8096",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};ph.style=":host{display:block;height:100%}";const fh={en:{GmErr_AMOUNT_INVALID:"The specified amount is invalid.",GmErr_REGISTER_OVERAGE:"The registration has exceeded the allowable limit.",GmErr_REGISTER_UNDERAGE:"The registration is under the allowable limit.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"User authentication failed due to too many unsuccessful attempts.",GmErr_USER_ACCOUNT_BLOCKED:"The user account is blocked.",GmErr_USER_NOT_VERIFIED:"The user has not been verified.",GmErr_USER_NOT_FOUND:"No user found with the provided information.",GmErr_USER_ID_INVALID:"The user ID provided is invalid.",GmErr_USER_AUTH_FAILED:"User authentication failed.",GmErr_USER_DUPLICATED:"The user already exists in the system.",GmErr_USER_NOT_ACTIVATED:"The user account has not been activated.",GmErr_PASSWORD_CONTAINS_EMAIL:"The password cannot contain the email address.",GmErr_PASSWORD_CONTAINS_USERNAME:"The password cannot contain the username.",GmErr_PASSWORD_CONTAINS_SPACES:"The password cannot contain spaces.",GmErr_USER_4TS_CHECK_EXISTS:"The user 4TS check already exists.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"The user is excluded from registration.",GmErr_USER_NAV_EXCLUDED_LOGIN:"The user is excluded from login.",GmErr_USERNAME_REQUIRED:"A username is required.",GmErr_USER_EMAIL_NOT_VERIFIED:"The user's email address has not been verified.",GmErr_EMAIL_ALREADY_EXISTS:"User with same email already exists",GmErr_EMAIL_REQUIRED:"An email address is required.",GmErr_USERNAME_ALREADY_EXISTS:"The username is already taken.",GmErr_DUPLICATE_PERSONAL_ID:"Duplicate personal ID found.",GmErr_INVALID_USER_DOCUMENT:"The user document is invalid.",GmErr_INVALID_CODE:"The code provided is invalid.",GmErr_EXPIRED_TOKEN:"The token has expired.",GmErr_ATTEMPTS_EXCEEDED:"The maximum number of attempts has been exceeded.",GmErr_BLOCK_USER_INCORRECT_CODE:"The user has been blocked due to an incorrect code.",GmErr_TOKEN_NOT_FOUND:"The token was not found.",GmErr_INVALID_PHONE_NUMBER:"The phone number provided is invalid.",GmErr_CODE_MISSING:"The code is missing.",GmErr_UNREGISTERED_USER:"The user is not registered.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Maximum attempts to generate a code have been exceeded.",GmErr_UNEXPECTED_EXCEPTION:"An unexpected exception occurred.",GmErr_INVALID_USER_ID:"The user ID provided is invalid.",GmErr_NOT_ALLOWED_EXCEPTION:"This action is not allowed.",GmErr_CAN_NOT_FIND_ROLE:"Unable to find the specified role.",GmErr_NO_SESSION_PROVIDED:"No session was provided.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No active session found for this user.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"The user has already been anonymized.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No role has been set up to be assigned.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"The provided session does not belong to the user.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"The provided session does not exist.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"The role has already been assigned to the user.",GmErr_ASSIGN_USER_ROLE_FAILED:"Failed to assign a role to the user.",GmErr_BadRequest_1000:"There was a problem with the personal identification number",CountryRestricted:"Unfortunately, you are attempting to register from a country where we cannot accept gameplay. We are unable to process your registration for this reason.",nextButton:"Next",backButton:"Back",doneButton:"Done",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"},hu:{GmErr_AMOUNT_INVALID:"A megadott összeg érvénytelen.",GmErr_REGISTER_OVERAGE:"A regisztráció túllépte a megengedett határt.",GmErr_REGISTER_UNDERAGE:"A regisztráció a megengedett határ alatt van.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"A felhasználó hitelesítése túl sok sikertelen próbálkozás miatt meghiúsult.",GmErr_USER_ACCOUNT_BLOCKED:"A felhasználói fiók le van tiltva.",GmErr_USER_NOT_VERIFIED:"A felhasználó nincs ellenőrizve.",GmErr_USER_NOT_FOUND:"A megadott adatokkal nem található felhasználó.",GmErr_USER_ID_INVALID:"A megadott felhasználói azonosító érvénytelen.",GmErr_USER_AUTH_FAILED:"A felhasználó hitelesítése meghiúsult.",GmErr_USER_DUPLICATED:"A felhasználó már létezik a rendszerben.",GmErr_USER_NOT_ACTIVATED:"A felhasználó fiókja nincs aktiválva.",GmErr_PASSWORD_CONTAINS_EMAIL:"A jelszó nem tartalmazhat e-mail címet.",GmErr_PASSWORD_CONTAINS_USERNAME:"A jelszó nem tartalmazhat felhasználónevet.",GmErr_PASSWORD_CONTAINS_SPACES:"A jelszó nem tartalmazhat szóközöket.",GmErr_USER_4TS_CHECK_EXISTS:"A felhasználó 4TS ellenőrzése már létezik.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"A felhasználó kizárva a regisztrációból.",GmErr_USER_NAV_EXCLUDED_LOGIN:"A felhasználó kizárva a bejelentkezésből.",GmErr_USERNAME_REQUIRED:"Felhasználónév megadása szükséges.",GmErr_USER_EMAIL_NOT_VERIFIED:"A felhasználó e-mail címe nincs megerősítve.",GmErr_EMAIL_ALREADY_EXISTS:"A megadott e-mail címmel már létezik felhasználó",GmErr_EMAIL_REQUIRED:"E-mail cím megadása szükséges.",GmErr_USERNAME_ALREADY_EXISTS:"A felhasználónév már foglalt.",GmErr_DUPLICATE_PERSONAL_ID:"Már létező személyes azonosító.",GmErr_INVALID_USER_DOCUMENT:"A felhasználói dokumentum érvénytelen.",GmErr_INVALID_CODE:"A megadott kód érvénytelen.",GmErr_EXPIRED_TOKEN:"A token lejárt.",GmErr_ATTEMPTS_EXCEEDED:"A megengedett próbálkozások száma túllépve.",GmErr_BLOCK_USER_INCORRECT_CODE:"A felhasználó blokkolva lett a hibás kód miatt.",GmErr_TOKEN_NOT_FOUND:"A token nem található.",GmErr_INVALID_PHONE_NUMBER:"A megadott telefonszám érvénytelen.",GmErr_CODE_MISSING:"A szükséges kód hiányzik.",GmErr_UNREGISTERED_USER:"A felhasználó nincs regisztrálva.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Túllépték a kódgenerálási próbálkozások számát.",GmErr_UNEXPECTED_EXCEPTION:"Váratlan kivétel történt.",GmErr_INVALID_USER_ID:"A felhasználói azonosító érvénytelen.",GmErr_NOT_ALLOWED_EXCEPTION:"Ez a művelet nem engedélyezett.",GmErr_CAN_NOT_FIND_ROLE:"A megadott szerepkör nem található.",GmErr_NO_SESSION_PROVIDED:"Nem került megadásra munkamenet.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nincs aktív munkamenet ehhez a felhasználóhoz.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"A felhasználó már anonimizálva lett.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nincs beállítva hozzárendelhető szerepkör.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A megadott munkamenet nem tartozik a felhasználóhoz.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A megadott munkamenet nem létezik.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A szerepkör már hozzá lett rendelve a felhasználóhoz.",GmErr_ASSIGN_USER_ROLE_FAILED:"Nem sikerült a felhasználói szerepkört hozzárendelni.",GmErr_BadRequest_1000:"Probléma volt a személyi azonosító számmal",CountryRestricted:"Sajnálatos módon olyan országból próbál regisztrálni, ahonnan nem fogadhatunk játékot. Emiatt nem tudjuk feldolgozni a regisztrációját.",nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",generalError:"Valami hiba történt... Próbáld újra.",successMessage:"Sikeres regisztráció"},hr:{GmErr_AMOUNT_INVALID:"Navedeni iznos je nevažeći.",GmErr_REGISTER_OVERAGE:"Registracija je premašila dopušteni limit.",GmErr_REGISTER_UNDERAGE:"Registracija je ispod dopuštenog limita.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Neuspješno autentificiranje korisnika zbog previše pokušaja.",GmErr_USER_ACCOUNT_BLOCKED:"Korisnički račun je blokiran.",GmErr_USER_NOT_VERIFIED:"Korisnik nije verificiran.",GmErr_USER_NOT_FOUND:"Korisnik s navedenim podacima nije pronađen.",GmErr_USER_ID_INVALID:"Navedeni ID korisnika je nevažeći.",GmErr_USER_AUTH_FAILED:"Neuspješno autentificiranje korisnika.",GmErr_USER_DUPLICATED:"Korisnik već postoji u sustavu.",GmErr_USER_NOT_ACTIVATED:"Korisnički račun nije aktiviran.",GmErr_PASSWORD_CONTAINS_EMAIL:"Lozinka ne smije sadržavati e-mail adresu.",GmErr_PASSWORD_CONTAINS_USERNAME:"Lozinka ne smije sadržavati korisničko ime.",GmErr_PASSWORD_CONTAINS_SPACES:"Lozinka ne smije sadržavati razmake.",GmErr_USER_4TS_CHECK_EXISTS:"4TS provjera korisnika već postoji.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"Korisnik je isključen iz registracije.",GmErr_USER_NAV_EXCLUDED_LOGIN:"Korisnik je isključen iz prijave.",GmErr_USERNAME_REQUIRED:"Korisničko ime je obavezno.",GmErr_USER_EMAIL_NOT_VERIFIED:"E-mail adresa korisnika nije verificirana.",GmErr_EMAIL_ALREADY_EXISTS:"Korisnik s istom e-mail adresom već postoji",GmErr_EMAIL_REQUIRED:"E-mail adresa je obavezna.",GmErr_USERNAME_ALREADY_EXISTS:"Korisničko ime je već zauzeto.",GmErr_DUPLICATE_PERSONAL_ID:"Pronađen je duplicirani osobni ID.",GmErr_INVALID_USER_DOCUMENT:"Dokument korisnika je nevažeći.",GmErr_INVALID_CODE:"Navedeni kod je nevažeći.",GmErr_EXPIRED_TOKEN:"Token je istekao.",GmErr_ATTEMPTS_EXCEEDED:"Prekoračen je maksimalni broj pokušaja.",GmErr_BLOCK_USER_INCORRECT_CODE:"Korisnik je blokiran zbog pogrešnog koda.",GmErr_TOKEN_NOT_FOUND:"Token nije pronađen.",GmErr_INVALID_PHONE_NUMBER:"Navedeni broj telefona je nevažeći.",GmErr_CODE_MISSING:"Nedostaje potrebni kod.",GmErr_UNREGISTERED_USER:"Korisnik nije registriran.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Prekoračen je broj pokušaja generiranja koda.",GmErr_UNEXPECTED_EXCEPTION:"Došlo je do neočekivane iznimke.",GmErr_INVALID_USER_ID:"Navedeni ID korisnika je nevažeći.",GmErr_NOT_ALLOWED_EXCEPTION:"Ova radnja nije dopuštena.",GmErr_CAN_NOT_FIND_ROLE:"Navedena uloga nije pronađena.",GmErr_NO_SESSION_PROVIDED:"Nema pružene sesije.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nema aktivne sesije za ovog korisnika.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"Korisnik je već anonimiziran.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nema postavljene uloge za dodjeljivanje.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"Pružena sesija ne pripada korisniku.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"Pružena sesija ne postoji.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"Uloga je već dodijeljena korisniku.",GmErr_ASSIGN_USER_ROLE_FAILED:"Neuspješno dodjeljivanje uloge korisniku.",GmErr_BadRequest_1000:"Došlo je do problema s OIB-om",CountryRestricted:"Nažalost, prijavljujete se iz zemlje iz koje ne možemo prihvatiti igru. Nismo u mogućnosti obraditi registraciju iz navedenog razloga.",nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",generalError:"Korisnik s ovim podacima već postoji.",successMessage:"Register successful"},"pt-br":{GmErr_AMOUNT_INVALID:"O valor especificado é inválido.",GmErr_REGISTER_OVERAGE:"A inscrição excedeu o limite permitido.",GmErr_REGISTER_UNDERAGE:"A inscrição está abaixo do limite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Falha na autenticação do usuário devido a muitas tentativas sem sucesso.",GmErr_USER_ACCOUNT_BLOCKED:"A conta do usuário está bloqueada.",GmErr_USER_NOT_VERIFIED:"O usuário não foi verificado.",GmErr_USER_NOT_FOUND:"Nenhum usuário encontrado com as informações fornecidas.",GmErr_USER_ID_INVALID:"O ID do usuário fornecido é inválido.",GmErr_USER_AUTH_FAILED:"Falha na autenticação do usuário.",GmErr_USER_DUPLICATED:"O usuário já existe no sistema.",GmErr_USER_NOT_ACTIVATED:"A conta do usuário não está ativada.",GmErr_PASSWORD_CONTAINS_EMAIL:"A senha não pode conter o endereço de e-mail.",GmErr_PASSWORD_CONTAINS_USERNAME:"A senha não pode conter o nome de usuário.",GmErr_PASSWORD_CONTAINS_SPACES:"A senha não pode conter espaços.",GmErr_USER_4TS_CHECK_EXISTS:"A verificação 4TS do usuário já existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"O usuário está excluído da inscrição.",GmErr_USER_NAV_EXCLUDED_LOGIN:"O usuário está excluído do login.",GmErr_USERNAME_REQUIRED:"O nome de usuário é obrigatório.",GmErr_USER_EMAIL_NOT_VERIFIED:"O e-mail do usuário não foi verificado.",GmErr_EMAIL_ALREADY_EXISTS:"Usuário com o mesmo e-mail já existe",GmErr_EMAIL_REQUIRED:"Um endereço de e-mail é obrigatório.",GmErr_USERNAME_ALREADY_EXISTS:"O nome de usuário já está em uso.",GmErr_DUPLICATE_PERSONAL_ID:"ID pessoal duplicado encontrado.",GmErr_INVALID_USER_DOCUMENT:"O documento do usuário é inválido.",GmErr_INVALID_CODE:"O código fornecido é inválido.",GmErr_EXPIRED_TOKEN:"O token expirou.",GmErr_ATTEMPTS_EXCEEDED:"O número máximo de tentativas foi excedido.",GmErr_BLOCK_USER_INCORRECT_CODE:"O usuário foi bloqueado devido a um código incorreto.",GmErr_TOKEN_NOT_FOUND:"O token não foi encontrado.",GmErr_INVALID_PHONE_NUMBER:"O número de telefone fornecido é inválido.",GmErr_CODE_MISSING:"O código necessário está faltando.",GmErr_UNREGISTERED_USER:"O usuário não está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"O número máximo de tentativas para gerar um código foi excedido.",GmErr_UNEXPECTED_EXCEPTION:"Ocorreu uma exceção inesperada.",GmErr_INVALID_USER_ID:"O ID do usuário fornecido é inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta ação não é permitida.",GmErr_CAN_NOT_FIND_ROLE:"Não foi possível encontrar a função especificada.",GmErr_NO_SESSION_PROVIDED:"Nenhuma sessão foi fornecida.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nenhuma sessão ativa encontrada para este usuário.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"O usuário já foi anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nenhuma função foi configurada para ser atribuída.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A sessão fornecida não pertence ao usuário.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A sessão fornecida não existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A função já foi atribuída ao usuário.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falha ao atribuir a função ao usuário.",GmErr_BadRequest_1000:"Houve um problema com o número de identificação pessoal",CountryRestricted:"Infelizmente, você está tentando se registrar a partir de um país onde não podemos aceitar jogos. Não podemos processar seu registro por esse motivo.",nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{GmErr_AMOUNT_INVALID:"El monto especificado es inválido.",GmErr_REGISTER_OVERAGE:"La inscripción ha excedido el límite permitido.",GmErr_REGISTER_UNDERAGE:"La inscripción está por debajo del límite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Autenticación de usuario fallida debido a demasiados intentos fallidos.",GmErr_USER_ACCOUNT_BLOCKED:"La cuenta del usuario está bloqueada.",GmErr_USER_NOT_VERIFIED:"El usuario no ha sido verificado.",GmErr_USER_NOT_FOUND:"No se encontró ningún usuario con la información proporcionada.",GmErr_USER_ID_INVALID:"El ID de usuario proporcionado es inválido.",GmErr_USER_AUTH_FAILED:"La autenticación del usuario falló.",GmErr_USER_DUPLICATED:"El usuario ya existe en el sistema.",GmErr_USER_NOT_ACTIVATED:"La cuenta del usuario no está activada.",GmErr_PASSWORD_CONTAINS_EMAIL:"La contraseña no puede contener la dirección de correo electrónico.",GmErr_PASSWORD_CONTAINS_USERNAME:"La contraseña no puede contener el nombre de usuario.",GmErr_PASSWORD_CONTAINS_SPACES:"La contraseña no puede contener espacios.",GmErr_USER_4TS_CHECK_EXISTS:"La verificación 4TS del usuario ya existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"El usuario está excluido del registro.",GmErr_USER_NAV_EXCLUDED_LOGIN:"El usuario está excluido del inicio de sesión.",GmErr_USERNAME_REQUIRED:"Se requiere un nombre de usuario.",GmErr_USER_EMAIL_NOT_VERIFIED:"La dirección de correo electrónico del usuario no ha sido verificada.",GmErr_EMAIL_ALREADY_EXISTS:"Ya existe un usuario con el mismo correo electrónico",GmErr_EMAIL_REQUIRED:"Se requiere una dirección de correo electrónico.",GmErr_USERNAME_ALREADY_EXISTS:"El nombre de usuario ya está en uso.",GmErr_DUPLICATE_PERSONAL_ID:"Se encontró un ID personal duplicado.",GmErr_INVALID_USER_DOCUMENT:"El documento del usuario es inválido.",GmErr_INVALID_CODE:"El código proporcionado es inválido.",GmErr_EXPIRED_TOKEN:"El token ha expirado.",GmErr_ATTEMPTS_EXCEEDED:"Se ha excedido el número máximo de intentos.",GmErr_BLOCK_USER_INCORRECT_CODE:"El usuario ha sido bloqueado debido a un código incorrecto.",GmErr_TOKEN_NOT_FOUND:"No se encontró el token.",GmErr_INVALID_PHONE_NUMBER:"El número de teléfono proporcionado es inválido.",GmErr_CODE_MISSING:"Falta el código necesario.",GmErr_UNREGISTERED_USER:"El usuario no está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Se ha excedido el número máximo de intentos para generar un código.",GmErr_UNEXPECTED_EXCEPTION:"Ocurrió una excepción inesperada.",GmErr_INVALID_USER_ID:"El ID de usuario proporcionado es inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta acción no está permitida.",GmErr_CAN_NOT_FIND_ROLE:"No se pudo encontrar el rol especificado.",GmErr_NO_SESSION_PROVIDED:"No se proporcionó ninguna sesión.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No se encontró ninguna sesión activa para este usuario.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"El usuario ya ha sido anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No se ha configurado ningún rol para ser asignado.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"La sesión proporcionada no pertenece al usuario.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"La sesión proporcionada no existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"El rol ya ha sido asignado al usuario.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falló la asignación del rol al usuario.",GmErr_BadRequest_1000:"Hubo un problema con el número de identificación personal",CountryRestricted:"Desafortunadamente, estás intentando registrarte desde un país donde no podemos aceptar juegos. No podemos procesar tu registro por esta razón.",nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"},tr:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",CountryRestricted:"Maalesef, oyun kabul edemediğimiz bir ülkeden kayıt yapmaya çalışıyorsunuz. Bu nedenle kaydınızı işleme alamıyoruz.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},vh=(t,e,i)=>{let o=fh[fh[e]?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},gh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.extraActions=[],this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.dateFormat=void 0,this.buttonInsideForm=void 0,this.btag=null,this.emitOnClick=!1,this.errorMessage=void 0,this.isFormValid=void 0,this.isConsentValid=!1,this.isConsentReady=!1,this.isLoading=!0,this.isLoadingPOST=void 0,this.registrationStep=void 0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}messageHandler(t){t.data&&"isConsentsValid"!=t.data.type||(this.listOfInputValidity.find((t=>"Consents"===t.name)).isValid=!!t.data.isValid,this.isConsentValid=!!t.data.isValid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity))}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}dispatchRegisterCredentialsEvent(){let t="",e="";Object.keys(this.registrationStepsState).forEach((i=>{this.registrationStepsState[i].registerUserData&&(t||(t=this.registrationStepsState[i].registerUserData.Email?this.registrationStepsState[i].registerUserData.Email.value:t),e||(e=this.registrationStepsState[i].registerUserData.Password?this.registrationStepsState[i].registerUserData.Password.value:e))})),this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:t,userPassword:e}}),window.dispatchEvent(this.registerCredentialsEvent)}stepsStateMachine(t){const e=()=>{localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState))};switch(t.event){case"set":if("inputs"==t.type){const t=this.registrationStepsState[this.registrationStep];t.fields=this.listOfInputs,t.actions=this.listOfActions,t.fieldsValidity=this.listOfInputValidity}"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),e();break;case"get":const i=JSON.parse(localStorage.getItem("registrationStepsState"));if(!i)return;if("inputs"==t.type){const t=this.registrationStepsState[this.registrationStep];this.listOfInputs=t.fields,this.listOfActions=t.actions,this.listOfInputValidity=t.fieldsValidity}if("values"==t.type){const t=i[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value,"togglecheckbox"===e.inputType&&e.data.subFields.forEach((t=>{const e=this.listOfInputValues.find((e=>e.name===t.name));t.defaultValue=e.value})))}))}this.isConsentReady=this.listOfActions.some((t=>"/Consents"===t)),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const o={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,o).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]="toggle"===e.type?e.value?"true":"false":e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const o={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,o).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?vh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:vh(`${this.errorCode}`,this.language)||vh("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),localStorage.getItem("playerConsents")&&localStorage.removeItem("playerConsents"),this.setRegister()):(this.isConsentValid&&window.postMessage({type:"setUpPlayerConsents",registerid:this.registrationID}),this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:vh(`${this.errorCode}`,this.language)||vh("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:vh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){if(this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i;const o=null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase();return"togglecheckbox"===o&&e.data.subFields.forEach((e=>{var i;t.push({name:e.name,value:"checkbox"==(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"togglecheckbox"===o?"togglecheckbox":null})})),t.push({name:e.name,value:"checkbox"===o||"togglecheckbox"===o?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"===o?"checkboxgroup":"togglecheckbox"===o?"toggle":null}),t}),[]),this.btag&&this.addBtagValue(),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.listOfActions.some((t=>"/Consents"==t))){if(this.isConsentReady)return this.listOfInputValidity.find((t=>"Consents"===t.name)).isValid=!1,void(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity));this.listOfInputValidity.push({name:"Consents",isValid:!1}),this.isConsentReady=!0}else this.isConsentReady=!1;var e;this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])fh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){fh[fh[this.language]?this.language:"en"][t.name]&&Object.keys(fh[this.language][t.name]).forEach((e=>{t[e]=fh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl,emitOnClick:this.emitOnClick}))),this.isConsentReady&&this.renderConsents(),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderConsents(){return i("div",{class:"consentsContainer"},i("general-consents",{endpoint:this.endpoint}))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},vh(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},vh("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return o(this)}static get watchers(){return{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};gh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const bh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
3933
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new dr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new gr(this.inputElement,this._labelController)),this._tooltipController=new bo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}function Ea(t){return Ea="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ea(t)}function Aa(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Sa(t){Aa(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ea(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Ca(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Ia(t,e){return Aa(2,arguments),function(t,e){Aa(2,arguments);var i=Sa(t).getTime(),o=Ca(e);return new Date(i+o)}(t,-Ca(e))}function Ta(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCDay(),o=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}function Da(t){Aa(1,arguments);var e=Sa(t),i=e.getUTCFullYear(),o=new Date(0);o.setUTCFullYear(i+1,0,4),o.setUTCHours(0,0,0,0);var r=Ta(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Ta(s);return e.getTime()>=r.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}l(ka);function za(t){Aa(1,arguments);var e=Sa(t),i=Ta(e).getTime()-function(t){Aa(1,arguments);var e=Da(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Ta(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ma(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.weekStartsOn)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==r?r:c.weekStartsOn)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(u>=0&&u<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Sa(t),m=d.getUTCDay(),p=(m<u?7:0)+m-u;return d.setUTCDate(d.getUTCDate()-p),d.setUTCHours(0,0,0,0),d}function Ra(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Sa(t),u=c.getUTCFullYear(),d=Oa(),m=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==o?o:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=new Date(0);p.setUTCFullYear(u+1,0,m),p.setUTCHours(0,0,0,0);var f=Ma(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ma(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function Pa(t,e){Aa(1,arguments);var i=Sa(t),o=Ma(i,e).getTime()-function(t,e){var i,o,r,s,a,n,l,h;Aa(1,arguments);var c=Oa(),u=Ca(null!==(i=null!==(o=null!==(r=null!==(s=null==e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==r?r:c.firstWeekContainsDate)&&void 0!==o?o:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=Ra(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ma(m,e)}(i,e).getTime();return Math.round(o/6048e5)+1}function Ga(t,e){for(var i=t<0?"-":"",o=Math.abs(t).toString();o.length<e;)o="0"+o;return i+o}const Fa=function(t,e){var i=t.getUTCFullYear(),o=i>0?i:1-i;return Ga("yy"===e?o%100:o,e.length)},La=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ga(i+1,2)},Ua=function(t,e){return Ga(t.getUTCDate(),e.length)},ja=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},Ba=function(t,e){return Ga(t.getUTCHours(),e.length)},Va=function(t,e){return Ga(t.getUTCMinutes(),e.length)},qa=function(t,e){return Ga(t.getUTCSeconds(),e.length)},Ha=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Wa(t,e){var i=t>0?"-":"+",o=Math.abs(t),r=Math.floor(o/60),s=o%60;if(0===s)return i+String(r);var a=e||"";return i+String(r)+a+Ga(s,2)}function Ya(t,e){return t%60==0?(t>0?"-":"+")+Ga(Math.abs(t)/60,2):Ka(t,e)}function Ka(t,e){var i=e||"",o=t>0?"-":"+",r=Math.abs(t);return o+Ga(Math.floor(r/60),2)+i+Ga(r%60,2)}const Za={G:function(t,e,i){var o=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(o,{width:"abbreviated"});case"GGGGG":return i.era(o,{width:"narrow"});default:return i.era(o,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var o=t.getUTCFullYear();return i.ordinalNumber(o>0?o:1-o,{unit:"year"})}return Fa(t,e)},Y:function(t,e,i,o){var r=Ra(t,o),s=r>0?r:1-r;return"YY"===e?Ga(s%100,2):"Yo"===e?i.ordinalNumber(s,{unit:"year"}):Ga(s,e.length)},R:function(t,e){return Ga(Da(t),e.length)},u:function(t,e){return Ga(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(o);case"QQ":return Ga(o,2);case"Qo":return i.ordinalNumber(o,{unit:"quarter"});case"QQQ":return i.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(o,{width:"narrow",context:"formatting"});default:return i.quarter(o,{width:"wide",context:"formatting"})}},q:function(t,e,i){var o=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(o);case"qq":return Ga(o,2);case"qo":return i.ordinalNumber(o,{unit:"quarter"});case"qqq":return i.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(o,{width:"narrow",context:"standalone"});default:return i.quarter(o,{width:"wide",context:"standalone"})}},M:function(t,e,i){var o=t.getUTCMonth();switch(e){case"M":case"MM":return La(t,e);case"Mo":return i.ordinalNumber(o+1,{unit:"month"});case"MMM":return i.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(o,{width:"narrow",context:"formatting"});default:return i.month(o,{width:"wide",context:"formatting"})}},L:function(t,e,i){var o=t.getUTCMonth();switch(e){case"L":return String(o+1);case"LL":return Ga(o+1,2);case"Lo":return i.ordinalNumber(o+1,{unit:"month"});case"LLL":return i.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(o,{width:"narrow",context:"standalone"});default:return i.month(o,{width:"wide",context:"standalone"})}},w:function(t,e,i,o){var r=Pa(t,o);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):Ga(r,e.length)},I:function(t,e,i){var o=za(t);return"Io"===e?i.ordinalNumber(o,{unit:"week"}):Ga(o,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Ua(t,e)},D:function(t,e,i){var o=function(t){Aa(1,arguments);var e=Sa(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var o=e.getTime();return Math.floor((i-o)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(o,{unit:"dayOfYear"}):Ga(o,e.length)},E:function(t,e,i){var o=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},e:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return Ga(s,2);case"eo":return i.ordinalNumber(s,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,o){var r=t.getUTCDay(),s=(r-o.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return Ga(s,e.length);case"co":return i.ordinalNumber(s,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var o=t.getUTCDay(),r=0===o?7:o;switch(e){case"i":return String(r);case"ii":return Ga(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},a:function(t,e,i){var o=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(t,e,i){var o,r=t.getUTCHours();switch(o=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(t,e,i){var o,r=t.getUTCHours();switch(o=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(o,{width:"narrow",context:"formatting"});default:return i.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var o=t.getUTCHours()%12;return 0===o&&(o=12),i.ordinalNumber(o,{unit:"hour"})}return ja(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ba(t,e)},K:function(t,e,i){var o=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},k:function(t,e,i){var o=t.getUTCHours();return 0===o&&(o=24),"ko"===e?i.ordinalNumber(o,{unit:"hour"}):Ga(o,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Va(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):qa(t,e)},S:function(t,e){return Ha(t,e)},X:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return Ya(r);case"XXXX":case"XX":return Ka(r);default:return Ka(r,":")}},x:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"x":return Ya(r);case"xxxx":case"xx":return Ka(r);default:return Ka(r,":")}},O:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Wa(r,":");default:return"GMT"+Ka(r,":")}},z:function(t,e,i,o){var r=(o._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Wa(r,":");default:return"GMT"+Ka(r,":")}},t:function(t,e,i,o){return Ga(Math.floor((o._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,o){return Ga((o._originalDate||t).getTime(),e.length)}};var Xa=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Ja=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Qa={p:Ja,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Xa(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Xa(r,e)).replace("{{time}}",Ja(s,e))}};const $a=Qa;function tn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var en=["D","DD"],on=["YY","YYYY"];function rn(t){return-1!==en.indexOf(t)}function sn(t){return-1!==on.indexOf(t)}function an(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var nn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function ln(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var hn,cn={date:ln({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:ln({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:ln({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},un={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function dn(t){return function(e,i){var o;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,s=null!=i&&i.width?String(i.width):r;o=t.formattingValues[s]||t.formattingValues[r]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;o=t.values[n]||t.values[a]}return o[t.argumentCallback?t.argumentCallback(e):e]}}function mn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.width,r=e.match(o&&t.matchPatterns[o]||t.matchPatterns[t.defaultMatchWidth]);if(!r)return null;var s,a=r[0],n=o&&t.parsePatterns[o]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return s=t.valueCallback?t.valueCallback(l):l,{value:s=i.valueCallback?i.valueCallback(s):s,rest:e.slice(a.length)}}}const pn={code:"en-US",formatDistance:function(t,e,i){var o,r=nn[t];return o="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+o:o+" ago":o},formatLong:cn,formatRelative:function(t){return un[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(hn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(hn.matchPattern);if(!i)return null;var o=i[0],r=t.match(hn.parsePattern);if(!r)return null;var s=hn.valueCallback?hn.valueCallback(r[0]):r[0];return{value:s=e.valueCallback?e.valueCallback(s):s,rest:t.slice(o.length)}}),era:mn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:mn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:mn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:mn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:mn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var fn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gn=/^'([^]*?)'?$/,bn=/''/g,yn=/[a-zA-Z]/;function _n(t,e,i){var o,r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_;Aa(2,arguments);var w=String(e),x=Oa(),k=null!==(o=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==o?o:pn,E=Ca(null!==(s=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:x.firstWeekContainsDate)&&void 0!==a?a:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==s?s:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Ca(null!==(m=null!==(p=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(b=g.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==p?p:null===(y=x.locale)||void 0===y||null===(_=y.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var S=Sa(t);if(!function(t){if(Aa(1,arguments),!function(t){return Aa(1,arguments),t instanceof Date||"object"===Ea(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Sa(t);return!isNaN(Number(e))}(S))throw new RangeError("Invalid time value");var C=Ia(S,tn(S)),I={firstWeekContainsDate:E,weekStartsOn:A,locale:k,_originalDate:S};return w.match(vn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,$a[e])(t,k.formatLong):t})).join("").match(fn).map((function(o){if("''"===o)return"'";var r,s,a=o[0];if("'"===a)return(s=(r=o).match(gn))?s[1].replace(bn,"'"):r;var n=Za[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||!sn(o)||an(o,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!rn(o)||an(o,e,String(t)),n(C,o,k.localize,I);if(a.match(yn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return o})).join("")}function wn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=Array(e);i<e;i++)o[i]=t[i];return o}function xn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return wn(t,e);var i={}.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?wn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var o=0,r=function(){};return{s:r,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,n=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){n=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(n)throw s}}}}function kn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function En(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function An(t,e){return An=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},An(t,e)}function Sn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&An(t,e)}function Cn(t){return Cn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cn(t)}function In(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(In=function(){return!!t})()}function Tn(t){var e=In();return function(){var i,o=Cn(t);if(e){var r=Cn(this).constructor;i=Reflect.construct(o,arguments,r)}else i=o.apply(this,arguments);return function(t,e){if(e&&("object"==Ea(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return En(t)}(this,i)}}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function zn(t){var e=function(t){if("object"!=Ea(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=Ea(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ea(e)?e:e+""}function Nn(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,zn(o.key),o)}}function On(t,e,i){return e&&Nn(t.prototype,e),i&&Nn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Mn(t,e,i){return(e=zn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Rn=function(){function t(){Dn(this,t),Mn(this,"priority",void 0),Mn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Rn);var t=Tn(e);function e(i,o,r,s,a){var n;return Dn(this,e),(n=t.call(this)).value=i,n.validateValue=o,n.setValue=r,n.priority=s,a&&(n.subPriority=a),n}return On(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),Gn=function(){Sn(e,Rn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"subPriority",-1),i}return On(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),Fn=function(){function t(){Dn(this,t),Mn(this,"incompatibleTokens",void 0),Mn(this,"priority",void 0),Mn(this,"subPriority",void 0)}return On(t,[{key:"run",value:function(t,e,i,o){var r=this.parse(t,e,i,o);return r?{setter:new Pn(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),Ln=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Mn(En(i),"incompatibleTokens",["R","u","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Un=/^(1[0-2]|0?\d)/,jn=/^(3[0-1]|[0-2]?\d)/,Bn=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Vn=/^(5[0-3]|[0-4]?\d)/,qn=/^(2[0-3]|[0-1]?\d)/,Hn=/^(2[0-4]|[0-1]?\d)/,Wn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Zn=/^[0-5]?\d/,Xn=/^\d/,Jn=/^\d{1,2}/,Qn=/^\d{1,3}/,$n=/^\d{1,4}/,tl=/^-?\d+/,el=/^-?\d/,il=/^-?\d{1,2}/,ol=/^-?\d{1,3}/,rl=/^-?\d{1,4}/,sl=/^([+-])(\d{2})(\d{2})?|Z/,al=/^([+-])(\d{2})(\d{2})|Z/,nl=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,ll=/^([+-])(\d{2}):(\d{2})|Z/,hl=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function cl(t,e){return t?{value:e(t.value),rest:t.rest}:t}function ul(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function dl(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function ml(t){return ul(tl,t)}function pl(t,e){switch(t){case 1:return ul(Xn,e);case 2:return ul(Jn,e);case 3:return ul(Qn,e);case 4:return ul($n,e);default:return ul(new RegExp("^\\d{1,"+t+"}"),e)}}function fl(t,e){switch(t){case 1:return ul(el,e);case 2:return ul(il,e);case 3:return ul(ol,e);case 4:return ul(rl,e);default:return ul(new RegExp("^-?\\d{1,"+t+"}"),e)}}function vl(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;default:return 0}}function gl(t,e){var i,o=e>0,r=o?e:1-e;if(r<=50)i=t||100;else{var s=r+50;i=t+100*Math.floor(s/100)-(t>=s%100?100:0)}return o?i:1-i}function bl(t){return t%400==0||t%4==0&&t%100!=0}var yl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return cl(pl(4,t),o);case"yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var o=t.getUTCFullYear();if(i.isTwoDigitYear){var r=gl(i.year,o);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return cl(pl(4,t),o);case"Yo":return cl(i.ordinalNumber(t,{unit:"year"}),o);default:return cl(pl(e.length,t),o)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,o){var r=Ra(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ma(t,o)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ma(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var o=new Date(0);return o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0),Ta(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Mn(En(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return fl("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),kl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Mn(En(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return pl(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),El=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Mn(En(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return pl(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Al=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Mn(En(i),"priority",110),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"M":return cl(ul(Un,t),o);case"MM":return cl(pl(2,t),o);case"Mo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Sl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return t-1};switch(e){case"L":return cl(ul(Un,t),o);case"LL":return cl(pl(2,t),o);case"Lo":return cl(i.ordinalNumber(t,{unit:"month"}),o);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Cl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return ul(Vn,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,o){return Ma(function(t,e,i){Aa(2,arguments);var o=Sa(t),r=Ca(e),s=Pa(o,i)-r;return o.setUTCDate(o.getUTCDate()-7*s),o}(t,i,o),o)}}]),e}(),Il=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Mn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return ul(Vn,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ta(function(t,e){Aa(2,arguments);var i=Sa(t),o=Ca(e),r=za(i)-o;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Tl=[31,28,31,30,31,30,31,31,30,31,30,31],Dl=[31,29,31,30,31,30,31,31,30,31,30,31],zl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"subPriority",1),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return ul(jn,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){var i=bl(t.getUTCFullYear()),o=t.getUTCMonth();return i?e>=1&&e<=Dl[o]:e>=1&&e<=Tl[o]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Nl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"subpriority",1),Mn(En(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return ul(Bn,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return bl(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ol(t,e,i){var o,r,s,a,n,l,h,c;Aa(2,arguments);var u=Oa(),d=Ca(null!==(o=null!==(r=null!==(s=null!==(a=null==i?void 0:i.weekStartsOn)&&void 0!==a?a:null==i||null===(n=i.locale)||void 0===n||null===(l=n.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==s?s:u.weekStartsOn)&&void 0!==r?r:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==o?o:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Sa(t),p=Ca(e),f=((p%7+7)%7<d?7:0)+p-m.getUTCDay();return m.setUTCDate(m.getUTCDate()+f),m}var Ml=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Rl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return cl(pl(e.length,t),r);case"eo":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Pl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i,o){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+o.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return cl(pl(e.length,t),r);case"co":return cl(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,o){return(t=Ol(t,i,o)).setUTCHours(0,0,0,0),t}}]),e}(),Gl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Mn(En(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){var o=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return pl(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return cl(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiii":return cl(i.day(t,{width:"narrow",context:"formatting"}),o);case"iiiiii":return cl(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o);default:return cl(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),o)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return t=function(t,e){Aa(2,arguments);var i=Ca(e);i%7==0&&(i-=7);var o=Sa(t),r=((i%7+7)%7<1?7:0)+i-o.getUTCDay();return o.setUTCDate(o.getUTCDate()+r),o}(t,i),t.setUTCHours(0,0,0,0),t}}]),e}(),Fl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ll=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),Ul=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Mn(En(i),"incompatibleTokens",["a","b","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(vl(i),0,0,0),t}}]),e}(),jl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["H","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return ul(Yn,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:o||12!==i?i:0,0,0,0),t}}]),e}(),Bl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return ul(qn,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),Vl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["h","H","k","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return ul(Wn,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var o=t.getUTCHours()>=12;return t.setUTCHours(o&&i<12?i+12:i,0,0,0),t}}]),e}(),ql=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Mn(En(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return ul(Hn,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),Hl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return ul(Kn,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),Wl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Zn,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return pl(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),Yl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Mn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e){return cl(pl(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),Kl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"incompatibleTokens",["t","T","x"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"X":return dl(sl,t);case"XX":return dl(al,t);case"XXXX":return dl(nl,t);case"XXXXX":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Zl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Mn(En(i),"incompatibleTokens",["t","T","X"]),i}return On(e,[{key:"parse",value:function(t,e){switch(e){case"x":return dl(sl,t);case"xx":return dl(al,t);case"xxxx":return dl(nl,t);case"xxxxx":return dl(hl,t);default:return dl(ll,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Xl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Mn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Jl=function(){Sn(e,Fn);var t=Tn(e);function e(){var i;Dn(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Mn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Mn(En(i),"incompatibleTokens","*"),i}return On(e,[{key:"parse",value:function(t){return ml(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Ql={G:new Ln,y:new yl,Y:new _l,R:new wl,u:new xl,Q:new kl,q:new El,M:new Al,L:new Sl,w:new Cl,I:new Il,d:new zl,D:new Nl,E:new Ml,e:new Rl,c:new Pl,i:new Gl,a:new Fl,b:new Ll,B:new Ul,h:new jl,H:new Bl,K:new Vl,k:new ql,m:new Hl,s:new Wl,S:new Yl,X:new Kl,x:new Zl,t:new Xl,T:new Jl},$l=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,th=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,eh=/^'([^]*?)'?$/,ih=/''/g,oh=/\S/,rh=/[a-zA-Z]/;function sh(t,e,i,o){var r,s,a,n,l,h,c,u,d,m,p,f,v,g,b,y,_,w;Aa(3,arguments);var x=String(t),k=String(e),E=Oa(),A=null!==(r=null!==(s=null==o?void 0:o.locale)&&void 0!==s?s:E.locale)&&void 0!==r?r:pn;if(!A.match)throw new RangeError("locale must contain match property");var S=Ca(null!==(a=null!==(n=null!==(l=null!==(h=null==o?void 0:o.firstWeekContainsDate)&&void 0!==h?h:null==o||null===(c=o.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:E.firstWeekContainsDate)&&void 0!==n?n:null===(d=E.locale)||void 0===d||null===(m=d.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==a?a:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=Ca(null!==(p=null!==(f=null!==(v=null!==(g=null==o?void 0:o.weekStartsOn)&&void 0!==g?g:null==o||null===(b=o.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:E.weekStartsOn)&&void 0!==f?f:null===(_=E.locale)||void 0===_||null===(w=_.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Sa(i):new Date(NaN);var I,T={firstWeekContainsDate:S,weekStartsOn:C,locale:A},D=[new Gn],z=k.match(th).map((function(t){var e=t[0];return e in $a?(0,$a[e])(t,A.formatLong):t})).join("").match($l),N=[],O=xn(z);try{var M=function(){var e=I.value;null!=o&&o.useAdditionalWeekYearTokens||!sn(e)||an(e,k,t),null!=o&&o.useAdditionalDayOfYearTokens||!rn(e)||an(e,k,t);var i=e[0],r=Ql[i];if(r){var s=r.incompatibleTokens;if(Array.isArray(s)){var a=N.find((function(t){return s.includes(t.token)||t.token===i}));if(a)throw new RangeError("The format string mustn't contain `".concat(a.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&N.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));N.push({token:i,fullToken:e});var n=r.run(x,e,A.match,T);if(!n)return{v:new Date(NaN)};D.push(n.setter),x=n.rest}else{if(i.match(rh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=e.match(eh)[1].replace(ih,"'")),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(O.s();!(I=O.n()).done;){var R=M();if("object"===Ea(R))return R.v}}catch(t){O.e(t)}finally{O.f()}if(x.length>0&&oh.test(x))return new Date(NaN);var P=D.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return D.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),G=Sa(i);if(isNaN(G.getTime()))return new Date(NaN);var F,L=Ia(G,tn(G)),U={},j=xn(P);try{for(j.s();!(F=j.n()).done;){var B=F.value;if(!B.validate(L,T))return new Date(NaN);var V=B.set(L,U,T);Array.isArray(V)?(L=V[0],kn(U,V[1])):L=V}}catch(t){j.e(t)}finally{j.f()}return L}function ah(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()>o.getTime()}function nh(t,e){Aa(2,arguments);var i=Sa(t),o=Sa(e);return i.getTime()<o.getTime()}const lh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:o}=t;return _n(new Date(e,i,o),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=sh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.dateFormat=void 0,this.emitOnClick=!1,this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=sh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=sh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){if(this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker){const t=this.datePicker.shadowRoot.querySelector('[part="toggle-button"]');t&&t.addEventListener("click",(()=>this.handleCalendarIconClick()))}this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleCalendarIconClick(){this.datePicker.opened&&this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=sh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!nh(this.valueAsDate,this.minDate)&&!ah(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return nh(this.valueAsDate,this.minDate)||ah(this.valueAsDate,this.maxDate)?a("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"fc9cd0a618c7b6e62962c0800399a470fffa1fc4",class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{key:"abc7c1715dd2d0c60dd2ac6d028355de910be501",class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{key:"a6b40a978b573d41490457d708f9a7ac78622a6f",id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{key:"d802ea7b25a64802aca3a7491107fcee7af2a23c",class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{key:"46edd200a9ce9eba27414a6434c6b3d5e9dc9964",class:"date__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__wrapper--autofilled .date__input::part(input-field){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.date__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.date__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.date__input::part(input-field){border-radius:4px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.date__input>input{padding:5px 15px}.date__input::part(toggle-button){position:relative;right:10px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:rgba(204, 0, 0, 0.7019607843)}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const hh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,o;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return a("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(o=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===o?void 0:o.errorMessage;return a(`${t}`,this.language)?a(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"23ac67984ab7a0f4db01e5fe01f4f326b4c6a912",class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"aa2405e435aea20f1678dd74776a8ce4094bc95b",class:"email__wrapper--flex"},i("label",{key:"970b83bbcf082d1721c1647993fecd076939b65d",class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"2f03eaf161aab9b45282c1bc0de15bea8455427c",class:"email__wrapper--relative"},this.tooltip&&i("img",{key:"3c34b91f0b478cf04f5aabc5fdd33a8ed73d091b",class:"email__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"491f83c0f562893c02e3425b4d54eecc214e3c95",id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"edb6660d958cc5d0cb41b0db195bd7e847ecbefe",class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};hh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__wrapper--autofilled .email__input{color:var(--emfe-w-color-black, #000000)}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.email__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.email__input{font-family:inherit;border-radius:4px;width:100%;height:40px;border:2px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;font-size:16px;font-weight:300;line-height:1.5;padding:10px}.email__input:focus{outline-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.email__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const ch={en:{termsandconditions__description:"Needed to prove user accepted terms and conditions.",emailmarketing__description:"Needed to prove email marketing consent.",sms__description:"Needed to prove sms marketing consent.","3rdparty__description":"Needed to prove 3rd party marketing consent.",noDataFound:"No data found for consents.",loading:"Loading...please wait",requiredError:"This field is mandatory"},hu:{termsandconditions__description:"Szükséges annak igazolására, hogy a felhasználó elfogadta a feltételeket és kikötéseket.",emailmarketing__description:"Szükséges annak igazolására, hogy a felhasználó beleegyezett az e-mail marketingbe.",sms__description:"Szükséges annak igazolására, hogy a felhasználó beleegyezett az SMS marketingbe.","3rdparty__description":"Szükséges annak igazolására, hogy a felhasználó beleegyezett a harmadik fél általi marketingbe.",noDataFound:"Nincs adat a hozzájárulásokról.",loading:"Betöltés...kérem várjon",requiredError:"Ez a mező kötelező"},hr:{termsandconditions__description:"Potrebno za dokazivanje da je korisnik prihvatio uvjete i odredbe.",emailmarketing__description:"Potrebno za dokazivanje pristanka na email marketing.",sms__description:"Potrebno za dokazivanje pristanka na SMS marketing.","3rdparty__description":"Potrebno za dokazivanje pristanka na marketing trećih strana.",noDataFound:"Nema podataka o privolama.",loading:"Učitavanje...molimo pričekajte",requiredError:"Ovo polje je obavezno"},tr:{termsandconditions__description:"Kullanıcının şartlar ve koşulları kabul ettiğini kanıtlamak için gereklidir.",emailmarketing__description:"E-posta pazarlama onayını kanıtlamak için gereklidir.",sms__description:"SMS pazarlama onayını kanıtlamak için gereklidir.","3rdparty__description":"Üçüncü taraf pazarlama onayını kanıtlamak için gereklidir.",noDataFound:"Onaylarla ilgili veri bulunamadı.",loading:"Yükleniyor...lütfen bekleyin",requiredError:"Bu alan zorunludur"},"pt-br":{termsandconditions__description:"Necessário para comprovar que o usuário aceitou os termos e condições.",emailmarketing__description:"Necessário para comprovar o consentimento para marketing por e-mail.",sms__description:"Necessário para comprovar o consentimento para marketing por SMS.","3rdparty__description":"Necessário para comprovar o consentimento para marketing de terceiros.",noDataFound:"Nenhum dado encontrado para consentimentos.",loading:"Carregando...por favor aguarde",requiredError:"Este campo é obrigatório"},"es-mx":{termsandconditions__description:"Necesario para demostrar que el usuario aceptó los términos y condiciones.",emailmarketing__description:"Necesario para demostrar el consentimiento para el marketing por correo electrónico.",sms__description:"Necesario para demostrar el consentimiento para el marketing por SMS.","3rdparty__description":"Necesario para demostrar el consentimiento para el marketing de terceros.",noDataFound:"No se encontraron datos para los consentimientos.",loading:"Cargando...por favor espera",requiredError:"Este campo es obligatorio"}},uh=(t,e,i)=>{let o=ch[void 0!==e?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},dh=t=>new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])ch[e][i]=t[e][i]})),e(!0)}))})),mh=class{constructor(e){t(this,e),this.value="",this.registerErrors=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.debouncedHandleClick=this.debounce(this.handleClick,500),this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.name=void 0,this.tooltip=void 0,this.isLoading=!0,this.consentsData=void 0,this.showTooltip=!1,this.playerConsents=[],this.isValid=void 0}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}handleNewTranslations(){this.isLoading=!0,dh(this.translationUrl).then((()=>{this.isLoading=!1}))}sendMessage(){window.postMessage({type:"isConsentsValid",isValid:this.isValid})}messageHandler(t){t.data&&"setUpPlayerConsents"!=t.data.type||this.sendConsents(t.data.registerid)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}async componentWillLoad(){this.translationUrl.length>2&&await dh(this.translationUrl),this.getConsents()}addTranslation(t){ch[ch[this.language]][t.name]&&Object.keys(ch[this.language][t.name]).forEach((e=>{t[e]=ch[this.language][t.name][e]}))}getConsents(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/api/v2/gm/legislation/consents`);fetch(t.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>console.error(t)))))).then((t=>{if(!this.registerErrors){if(this.consentsData=t,localStorage.getItem("playerConsents")){try{this.playerConsents=JSON.parse(localStorage.getItem("playerConsents"))}catch(t){console.error(t)}return}this.playerConsents=this.consentsData.map((t=>({status:"3",tagCode:t.tagCode}))),localStorage.setItem("playerConsents",JSON.stringify(this.playerConsents))}})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}sendConsents(t){const e=new URL(`${this.endpoint}/api/v2/gm/legislation/consents`),i={method:"POST",body:JSON.stringify({playerConsents:this.playerConsents,registrationId:t}),headers:{"Content-Type":"application/json",Accept:"application/json"}};fetch(e.href,i).then((t=>{t.ok||(this.registerErrors=!0)})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}handleClick(t){const e=this.consentsData.find((e=>t.tagCode===e.tagCode&&"3"===t.status&&e.mustAccept));localStorage.setItem("playerConsents",JSON.stringify(this.playerConsents)),this[`errorMessage__${t.tagCode}`].innerHTML=e?this.setErrorMessage():"",this.isValid=this.checkValidity()}handleInput(t,e){this.playerConsents[t].status=e.target.checked?"1":"3",this.debouncedHandleClick(this.playerConsents[t])}handleTooltipClick(){this.showTooltip=!this.showTooltip}debounce(t,e){let i;return function(...o){clearTimeout(i),i=setTimeout((()=>{t.apply(this,o)}),e)}}checkValidity(){return 0===this.playerConsents.filter((t=>this.consentsData.some((e=>t.tagCode===e.tagCode&&e.mustAccept&&"3"===t.status)))).length}setErrorMessage(){return uh("requiredError",this.language)}render(){return this.isLoading?i("p",null,uh("loading",this.language)):this.consentsData?i("form",{class:"checkbox"},this.consentsData.map(((t,e)=>i("div",{class:`checkbox__wrapper ${t.tagCode}__input`,ref:e=>this[t.tagCode]=e},i("input",{class:"checkbox__input",type:"checkbox",checked:"1"===this.playerConsents[e].status,id:`${t.tagCode}__input`,onInput:this.handleInput.bind(this,e)}),i("label",{class:"checkbox__label",htmlFor:`${t.tagCode}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${uh(`${t.tagCode}__description`,this.language)} ${t.mustAccept?"*":""}`})),i("small",{class:"checkbox__error-message",ref:e=>this[`errorMessage__${t.tagCode}`]=e}),i("div",{class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{class:"checkbox__tooltip-icon",src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==",alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.handleTooltipClick()}),i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip})))))):i("p",null,uh("noDataFound",this.language))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"],isValid:["sendMessage"]}}};mh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox .checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline;margin-bottom:30px}.checkbox .checkbox__wrapper .checkbox__wrapper--relative{position:relative}.checkbox .checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:var(--emw--font-size-medium, 16px);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox .checkbox__label .checkbox__label-text{font-size:var(--emw--font-size-medium, 16px)}.checkbox .checkbox__label .checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox .checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox .checkbox__tooltip-icon{width:16px;height:auto}.checkbox .checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox .checkbox__tooltip.visible{opacity:1}';const ph=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){var t;this.translationUrl&&(t=this.translationUrl,new Promise((e=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])s[e][i]=t[e][i]})),e(!0)}))})))}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(r,{key:"e1c49fc91ead165c05b30c21ac568486e55c8096",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};ph.style=":host{display:block;height:100%}";const fh={en:{GmErr_AMOUNT_INVALID:"The specified amount is invalid.",GmErr_REGISTER_OVERAGE:"The registration has exceeded the allowable limit.",GmErr_REGISTER_UNDERAGE:"The registration is under the allowable limit.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"User authentication failed due to too many unsuccessful attempts.",GmErr_USER_ACCOUNT_BLOCKED:"The user account is blocked.",GmErr_USER_NOT_VERIFIED:"The user has not been verified.",GmErr_USER_NOT_FOUND:"No user found with the provided information.",GmErr_USER_ID_INVALID:"The user ID provided is invalid.",GmErr_USER_AUTH_FAILED:"User authentication failed.",GmErr_USER_DUPLICATED:"The user already exists in the system.",GmErr_USER_NOT_ACTIVATED:"The user account has not been activated.",GmErr_PASSWORD_CONTAINS_EMAIL:"The password cannot contain the email address.",GmErr_PASSWORD_CONTAINS_USERNAME:"The password cannot contain the username.",GmErr_PASSWORD_CONTAINS_SPACES:"The password cannot contain spaces.",GmErr_USER_4TS_CHECK_EXISTS:"The user 4TS check already exists.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"The user is excluded from registration.",GmErr_USER_NAV_EXCLUDED_LOGIN:"The user is excluded from login.",GmErr_USERNAME_REQUIRED:"A username is required.",GmErr_USER_EMAIL_NOT_VERIFIED:"The user's email address has not been verified.",GmErr_EMAIL_ALREADY_EXISTS:"User with same email already exists",GmErr_EMAIL_REQUIRED:"An email address is required.",GmErr_USERNAME_ALREADY_EXISTS:"The username is already taken.",GmErr_DUPLICATE_PERSONAL_ID:"Duplicate personal ID found.",GmErr_INVALID_USER_DOCUMENT:"The user document is invalid.",GmErr_INVALID_CODE:"The code provided is invalid.",GmErr_EXPIRED_TOKEN:"The token has expired.",GmErr_ATTEMPTS_EXCEEDED:"The maximum number of attempts has been exceeded.",GmErr_BLOCK_USER_INCORRECT_CODE:"The user has been blocked due to an incorrect code.",GmErr_TOKEN_NOT_FOUND:"The token was not found.",GmErr_INVALID_PHONE_NUMBER:"The phone number provided is invalid.",GmErr_CODE_MISSING:"The code is missing.",GmErr_UNREGISTERED_USER:"The user is not registered.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Maximum attempts to generate a code have been exceeded.",GmErr_UNEXPECTED_EXCEPTION:"An unexpected exception occurred.",GmErr_INVALID_USER_ID:"The user ID provided is invalid.",GmErr_NOT_ALLOWED_EXCEPTION:"This action is not allowed.",GmErr_CAN_NOT_FIND_ROLE:"Unable to find the specified role.",GmErr_NO_SESSION_PROVIDED:"No session was provided.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No active session found for this user.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"The user has already been anonymized.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No role has been set up to be assigned.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"The provided session does not belong to the user.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"The provided session does not exist.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"The role has already been assigned to the user.",GmErr_ASSIGN_USER_ROLE_FAILED:"Failed to assign a role to the user.",GmErr_BadRequest_1000:"There was a problem with the personal identification number",CountryRestricted:"Unfortunately, you are attempting to register from a country where we cannot accept gameplay. We are unable to process your registration for this reason.",nextButton:"Next",backButton:"Back",doneButton:"Done",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"},hu:{GmErr_AMOUNT_INVALID:"A megadott összeg érvénytelen.",GmErr_REGISTER_OVERAGE:"A regisztráció túllépte a megengedett határt.",GmErr_REGISTER_UNDERAGE:"A regisztráció a megengedett határ alatt van.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"A felhasználó hitelesítése túl sok sikertelen próbálkozás miatt meghiúsult.",GmErr_USER_ACCOUNT_BLOCKED:"A felhasználói fiók le van tiltva.",GmErr_USER_NOT_VERIFIED:"A felhasználó nincs ellenőrizve.",GmErr_USER_NOT_FOUND:"A megadott adatokkal nem található felhasználó.",GmErr_USER_ID_INVALID:"A megadott felhasználói azonosító érvénytelen.",GmErr_USER_AUTH_FAILED:"A felhasználó hitelesítése meghiúsult.",GmErr_USER_DUPLICATED:"A felhasználó már létezik a rendszerben.",GmErr_USER_NOT_ACTIVATED:"A felhasználó fiókja nincs aktiválva.",GmErr_PASSWORD_CONTAINS_EMAIL:"A jelszó nem tartalmazhat e-mail címet.",GmErr_PASSWORD_CONTAINS_USERNAME:"A jelszó nem tartalmazhat felhasználónevet.",GmErr_PASSWORD_CONTAINS_SPACES:"A jelszó nem tartalmazhat szóközöket.",GmErr_USER_4TS_CHECK_EXISTS:"A felhasználó 4TS ellenőrzése már létezik.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"A felhasználó kizárva a regisztrációból.",GmErr_USER_NAV_EXCLUDED_LOGIN:"A felhasználó kizárva a bejelentkezésből.",GmErr_USERNAME_REQUIRED:"Felhasználónév megadása szükséges.",GmErr_USER_EMAIL_NOT_VERIFIED:"A felhasználó e-mail címe nincs megerősítve.",GmErr_EMAIL_ALREADY_EXISTS:"A megadott e-mail címmel már létezik felhasználó",GmErr_EMAIL_REQUIRED:"E-mail cím megadása szükséges.",GmErr_USERNAME_ALREADY_EXISTS:"A felhasználónév már foglalt.",GmErr_DUPLICATE_PERSONAL_ID:"Már létező személyes azonosító.",GmErr_INVALID_USER_DOCUMENT:"A felhasználói dokumentum érvénytelen.",GmErr_INVALID_CODE:"A megadott kód érvénytelen.",GmErr_EXPIRED_TOKEN:"A token lejárt.",GmErr_ATTEMPTS_EXCEEDED:"A megengedett próbálkozások száma túllépve.",GmErr_BLOCK_USER_INCORRECT_CODE:"A felhasználó blokkolva lett a hibás kód miatt.",GmErr_TOKEN_NOT_FOUND:"A token nem található.",GmErr_INVALID_PHONE_NUMBER:"A megadott telefonszám érvénytelen.",GmErr_CODE_MISSING:"A szükséges kód hiányzik.",GmErr_UNREGISTERED_USER:"A felhasználó nincs regisztrálva.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Túllépték a kódgenerálási próbálkozások számát.",GmErr_UNEXPECTED_EXCEPTION:"Váratlan kivétel történt.",GmErr_INVALID_USER_ID:"A felhasználói azonosító érvénytelen.",GmErr_NOT_ALLOWED_EXCEPTION:"Ez a művelet nem engedélyezett.",GmErr_CAN_NOT_FIND_ROLE:"A megadott szerepkör nem található.",GmErr_NO_SESSION_PROVIDED:"Nem került megadásra munkamenet.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nincs aktív munkamenet ehhez a felhasználóhoz.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"A felhasználó már anonimizálva lett.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nincs beállítva hozzárendelhető szerepkör.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A megadott munkamenet nem tartozik a felhasználóhoz.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A megadott munkamenet nem létezik.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A szerepkör már hozzá lett rendelve a felhasználóhoz.",GmErr_ASSIGN_USER_ROLE_FAILED:"Nem sikerült a felhasználói szerepkört hozzárendelni.",GmErr_BadRequest_1000:"Probléma volt a személyi azonosító számmal",CountryRestricted:"Sajnálatos módon olyan országból próbál regisztrálni, ahonnan nem fogadhatunk játékot. Emiatt nem tudjuk feldolgozni a regisztrációját.",nextButton:"Következő",backButton:"Vissza",doneButton:"Kész",generalError:"Valami hiba történt... Próbáld újra.",successMessage:"Sikeres regisztráció"},hr:{GmErr_AMOUNT_INVALID:"Navedeni iznos je nevažeći.",GmErr_REGISTER_OVERAGE:"Registracija je premašila dopušteni limit.",GmErr_REGISTER_UNDERAGE:"Registracija je ispod dopuštenog limita.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Neuspješno autentificiranje korisnika zbog previše pokušaja.",GmErr_USER_ACCOUNT_BLOCKED:"Korisnički račun je blokiran.",GmErr_USER_NOT_VERIFIED:"Korisnik nije verificiran.",GmErr_USER_NOT_FOUND:"Korisnik s navedenim podacima nije pronađen.",GmErr_USER_ID_INVALID:"Navedeni ID korisnika je nevažeći.",GmErr_USER_AUTH_FAILED:"Neuspješno autentificiranje korisnika.",GmErr_USER_DUPLICATED:"Korisnik već postoji u sustavu.",GmErr_USER_NOT_ACTIVATED:"Korisnički račun nije aktiviran.",GmErr_PASSWORD_CONTAINS_EMAIL:"Lozinka ne smije sadržavati e-mail adresu.",GmErr_PASSWORD_CONTAINS_USERNAME:"Lozinka ne smije sadržavati korisničko ime.",GmErr_PASSWORD_CONTAINS_SPACES:"Lozinka ne smije sadržavati razmake.",GmErr_USER_4TS_CHECK_EXISTS:"4TS provjera korisnika već postoji.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"Korisnik je isključen iz registracije.",GmErr_USER_NAV_EXCLUDED_LOGIN:"Korisnik je isključen iz prijave.",GmErr_USERNAME_REQUIRED:"Korisničko ime je obavezno.",GmErr_USER_EMAIL_NOT_VERIFIED:"E-mail adresa korisnika nije verificirana.",GmErr_EMAIL_ALREADY_EXISTS:"Korisnik s istom e-mail adresom već postoji",GmErr_EMAIL_REQUIRED:"E-mail adresa je obavezna.",GmErr_USERNAME_ALREADY_EXISTS:"Korisničko ime je već zauzeto.",GmErr_DUPLICATE_PERSONAL_ID:"Pronađen je duplicirani osobni ID.",GmErr_INVALID_USER_DOCUMENT:"Dokument korisnika je nevažeći.",GmErr_INVALID_CODE:"Navedeni kod je nevažeći.",GmErr_EXPIRED_TOKEN:"Token je istekao.",GmErr_ATTEMPTS_EXCEEDED:"Prekoračen je maksimalni broj pokušaja.",GmErr_BLOCK_USER_INCORRECT_CODE:"Korisnik je blokiran zbog pogrešnog koda.",GmErr_TOKEN_NOT_FOUND:"Token nije pronađen.",GmErr_INVALID_PHONE_NUMBER:"Navedeni broj telefona je nevažeći.",GmErr_CODE_MISSING:"Nedostaje potrebni kod.",GmErr_UNREGISTERED_USER:"Korisnik nije registriran.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Prekoračen je broj pokušaja generiranja koda.",GmErr_UNEXPECTED_EXCEPTION:"Došlo je do neočekivane iznimke.",GmErr_INVALID_USER_ID:"Navedeni ID korisnika je nevažeći.",GmErr_NOT_ALLOWED_EXCEPTION:"Ova radnja nije dopuštena.",GmErr_CAN_NOT_FIND_ROLE:"Navedena uloga nije pronađena.",GmErr_NO_SESSION_PROVIDED:"Nema pružene sesije.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nema aktivne sesije za ovog korisnika.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"Korisnik je već anonimiziran.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nema postavljene uloge za dodjeljivanje.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"Pružena sesija ne pripada korisniku.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"Pružena sesija ne postoji.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"Uloga je već dodijeljena korisniku.",GmErr_ASSIGN_USER_ROLE_FAILED:"Neuspješno dodjeljivanje uloge korisniku.",GmErr_BadRequest_1000:"Došlo je do problema s OIB-om",CountryRestricted:"Nažalost, prijavljujete se iz zemlje iz koje ne možemo prihvatiti igru. Nismo u mogućnosti obraditi registraciju iz navedenog razloga.",nextButton:"Sljedeće",backButton:"Nazad",doneButton:"Gotovo",generalError:"Korisnik s ovim podacima već postoji.",successMessage:"Register successful"},"pt-br":{GmErr_AMOUNT_INVALID:"O valor especificado é inválido.",GmErr_REGISTER_OVERAGE:"A inscrição excedeu o limite permitido.",GmErr_REGISTER_UNDERAGE:"A inscrição está abaixo do limite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Falha na autenticação do usuário devido a muitas tentativas sem sucesso.",GmErr_USER_ACCOUNT_BLOCKED:"A conta do usuário está bloqueada.",GmErr_USER_NOT_VERIFIED:"O usuário não foi verificado.",GmErr_USER_NOT_FOUND:"Nenhum usuário encontrado com as informações fornecidas.",GmErr_USER_ID_INVALID:"O ID do usuário fornecido é inválido.",GmErr_USER_AUTH_FAILED:"Falha na autenticação do usuário.",GmErr_USER_DUPLICATED:"O usuário já existe no sistema.",GmErr_USER_NOT_ACTIVATED:"A conta do usuário não está ativada.",GmErr_PASSWORD_CONTAINS_EMAIL:"A senha não pode conter o endereço de e-mail.",GmErr_PASSWORD_CONTAINS_USERNAME:"A senha não pode conter o nome de usuário.",GmErr_PASSWORD_CONTAINS_SPACES:"A senha não pode conter espaços.",GmErr_USER_4TS_CHECK_EXISTS:"A verificação 4TS do usuário já existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"O usuário está excluído da inscrição.",GmErr_USER_NAV_EXCLUDED_LOGIN:"O usuário está excluído do login.",GmErr_USERNAME_REQUIRED:"O nome de usuário é obrigatório.",GmErr_USER_EMAIL_NOT_VERIFIED:"O e-mail do usuário não foi verificado.",GmErr_EMAIL_ALREADY_EXISTS:"Usuário com o mesmo e-mail já existe",GmErr_EMAIL_REQUIRED:"Um endereço de e-mail é obrigatório.",GmErr_USERNAME_ALREADY_EXISTS:"O nome de usuário já está em uso.",GmErr_DUPLICATE_PERSONAL_ID:"ID pessoal duplicado encontrado.",GmErr_INVALID_USER_DOCUMENT:"O documento do usuário é inválido.",GmErr_INVALID_CODE:"O código fornecido é inválido.",GmErr_EXPIRED_TOKEN:"O token expirou.",GmErr_ATTEMPTS_EXCEEDED:"O número máximo de tentativas foi excedido.",GmErr_BLOCK_USER_INCORRECT_CODE:"O usuário foi bloqueado devido a um código incorreto.",GmErr_TOKEN_NOT_FOUND:"O token não foi encontrado.",GmErr_INVALID_PHONE_NUMBER:"O número de telefone fornecido é inválido.",GmErr_CODE_MISSING:"O código necessário está faltando.",GmErr_UNREGISTERED_USER:"O usuário não está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"O número máximo de tentativas para gerar um código foi excedido.",GmErr_UNEXPECTED_EXCEPTION:"Ocorreu uma exceção inesperada.",GmErr_INVALID_USER_ID:"O ID do usuário fornecido é inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta ação não é permitida.",GmErr_CAN_NOT_FIND_ROLE:"Não foi possível encontrar a função especificada.",GmErr_NO_SESSION_PROVIDED:"Nenhuma sessão foi fornecida.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"Nenhuma sessão ativa encontrada para este usuário.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"O usuário já foi anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"Nenhuma função foi configurada para ser atribuída.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"A sessão fornecida não pertence ao usuário.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"A sessão fornecida não existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"A função já foi atribuída ao usuário.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falha ao atribuir a função ao usuário.",GmErr_BadRequest_1000:"Houve um problema com o número de identificação pessoal",CountryRestricted:"Infelizmente, você está tentando se registrar a partir de um país onde não podemos aceitar jogos. Não podemos processar seu registro por esse motivo.",nextButton:"Seguindo",backButton:"Voltar",doneButton:"Terminar",generalError:"Alguma coisa deu errado. Por favor tente outra vez",successMessage:"Registro bem-sucedido"},"es-mx":{GmErr_AMOUNT_INVALID:"El monto especificado es inválido.",GmErr_REGISTER_OVERAGE:"La inscripción ha excedido el límite permitido.",GmErr_REGISTER_UNDERAGE:"La inscripción está por debajo del límite permitido.",GmErr_USER_AUTH_FAILED_TOO_MANY_ATTEMPTS:"Autenticación de usuario fallida debido a demasiados intentos fallidos.",GmErr_USER_ACCOUNT_BLOCKED:"La cuenta del usuario está bloqueada.",GmErr_USER_NOT_VERIFIED:"El usuario no ha sido verificado.",GmErr_USER_NOT_FOUND:"No se encontró ningún usuario con la información proporcionada.",GmErr_USER_ID_INVALID:"El ID de usuario proporcionado es inválido.",GmErr_USER_AUTH_FAILED:"La autenticación del usuario falló.",GmErr_USER_DUPLICATED:"El usuario ya existe en el sistema.",GmErr_USER_NOT_ACTIVATED:"La cuenta del usuario no está activada.",GmErr_PASSWORD_CONTAINS_EMAIL:"La contraseña no puede contener la dirección de correo electrónico.",GmErr_PASSWORD_CONTAINS_USERNAME:"La contraseña no puede contener el nombre de usuario.",GmErr_PASSWORD_CONTAINS_SPACES:"La contraseña no puede contener espacios.",GmErr_USER_4TS_CHECK_EXISTS:"La verificación 4TS del usuario ya existe.",GmErr_USER_NAV_EXCLUDED_REGISTRATION:"El usuario está excluido del registro.",GmErr_USER_NAV_EXCLUDED_LOGIN:"El usuario está excluido del inicio de sesión.",GmErr_USERNAME_REQUIRED:"Se requiere un nombre de usuario.",GmErr_USER_EMAIL_NOT_VERIFIED:"La dirección de correo electrónico del usuario no ha sido verificada.",GmErr_EMAIL_ALREADY_EXISTS:"Ya existe un usuario con el mismo correo electrónico",GmErr_EMAIL_REQUIRED:"Se requiere una dirección de correo electrónico.",GmErr_USERNAME_ALREADY_EXISTS:"El nombre de usuario ya está en uso.",GmErr_DUPLICATE_PERSONAL_ID:"Se encontró un ID personal duplicado.",GmErr_INVALID_USER_DOCUMENT:"El documento del usuario es inválido.",GmErr_INVALID_CODE:"El código proporcionado es inválido.",GmErr_EXPIRED_TOKEN:"El token ha expirado.",GmErr_ATTEMPTS_EXCEEDED:"Se ha excedido el número máximo de intentos.",GmErr_BLOCK_USER_INCORRECT_CODE:"El usuario ha sido bloqueado debido a un código incorrecto.",GmErr_TOKEN_NOT_FOUND:"No se encontró el token.",GmErr_INVALID_PHONE_NUMBER:"El número de teléfono proporcionado es inválido.",GmErr_CODE_MISSING:"Falta el código necesario.",GmErr_UNREGISTERED_USER:"El usuario no está registrado.",GmErr_ATTEMPTS_TO_GENERATE_CODE_EXCEEDED:"Se ha excedido el número máximo de intentos para generar un código.",GmErr_UNEXPECTED_EXCEPTION:"Ocurrió una excepción inesperada.",GmErr_INVALID_USER_ID:"El ID de usuario proporcionado es inválido.",GmErr_NOT_ALLOWED_EXCEPTION:"Esta acción no está permitida.",GmErr_CAN_NOT_FIND_ROLE:"No se pudo encontrar el rol especificado.",GmErr_NO_SESSION_PROVIDED:"No se proporcionó ninguna sesión.",GmErr_NO_ACTIVE_SESSION_FOUND_FOR_THIS_USER:"No se encontró ninguna sesión activa para este usuario.",GmErr_USER_HAS_ALREADY_BEEN_ANONYMIZED:"El usuario ya ha sido anonimizado.",GmErr_NO_ROLE_HAS_BEEN_SET_UP_TO_BE_ASSIGNED:"No se ha configurado ningún rol para ser asignado.",GmErr_PROVIDED_SESSION_DOES_NOT_BELONG_TO_THE_USER:"La sesión proporcionada no pertenece al usuario.",GmErr_PROVIDED_SESSION_DOES_NOT_EXIST:"La sesión proporcionada no existe.",GmErr_ROLE_ALREADY_ASSIGNED_FOR_USER:"El rol ya ha sido asignado al usuario.",GmErr_ASSIGN_USER_ROLE_FAILED:"Falló la asignación del rol al usuario.",GmErr_BadRequest_1000:"Hubo un problema con el número de identificación personal",CountryRestricted:"Desafortunadamente, estás intentando registrarte desde un país donde no podemos aceptar juegos. No podemos procesar tu registro por esta razón.",nextButton:"Siguiente",backButton:"Atrás",doneButton:"Terminar",generalError:"Algo salió mal... Por favor intente de nuevo",successMessage:"Registro exitoso"},tr:{nextButton:"Next",backButton:"Back",doneButton:"Done",GmErr_BadRequest_Duplicate_User:"A user with this information already exists.",GmErr_BadRequest_PasswordContainsUsername:"The password cannot be the same as the username.",GmErr_BadRequest_PasswordContainsEmail:"The password cannot be the same as the email.",GmErr_BadRequest_Duplicate_PersonalId:"There is already a registration with the data you entered or you entered your data in an incorrect format.",GmErr_Forbidden_UserAccount_NavExcluded:"User is NAV Excluded. Registration was denied.",GmErr_BadRequest_ModelValidationFailed:"Something went wrong... Please try again.",GmErr_BadInternalConfigs:"Something went wrong... Please try again.",GmErr_Unauthorized:"Something went wrong... Please try again.",GmErr_NotFound:"Something went wrong... Please try again.",GmErr_UnexpectedException:"Something went wrong... Please try again.",CountryRestricted:"Maalesef, oyun kabul edemediğimiz bir ülkeden kayıt yapmaya çalışıyorsunuz. Bu nedenle kaydınızı işleme alamıyoruz.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},vh=(t,e,i)=>{let o=fh[fh[e]?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},gh=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.listOfInputValues=[],this.listOfInputValidity=[],this.listOfActions=[],this.listOfInputs=[],this.emitValue=!1,this.backButtonPressed=!1,this.registerErrors=!1,this.extraActions=[],this.registrationStepsState={regId:null},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.host.shadowRoot.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,this.clientStyling=t,setTimeout((()=>{this.host.shadowRoot.prepend(e)}),1)}))},this.endpoint=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.dateFormat=void 0,this.buttonInsideForm=void 0,this.btag=null,this.emitOnClick=!1,this.errorMessage=void 0,this.isFormValid=void 0,this.isConsentValid=!1,this.isConsentReady=!1,this.isLoading=!0,this.isLoadingPOST=void 0,this.registrationStep=void 0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1}sendStep(){this.registrationStepUpdated.emit(this.registrationStep),window.postMessage({type:"registrationStepUpdated",step:this.registrationStep},window.location.href)}handleStylingChange(t,e){t!==e&&this.setClientStyling()}handleStylingUrlChange(t,e){t!==e&&this.setClientStylingURL()}setFormValidity(){this.errorMessage="",this.listOfInputValidity&&(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)),this.listOfInputs.some((t=>t.autofill))&&(this.autofilled=!0)}addBtag(){this.addBtagValue()}checkInputsValidityHandler(t){this.listOfInputValidity.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}getInputsValueHandler(t){this.listOfInputValues.find((e=>{e.name==t.detail.name&&(e.value=t.detail.value,e.type=t.detail.type||null)})),this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity),this.stepsStateMachine({event:"set",type:"inputs"})}))}componentDidLoad(){this.registrationWidgetLoaded.emit(),window.postMessage({type:"registrationWidgetLoaded"},window.location.href),!this.limitStylingAppends&&this.host&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}messageHandler(t){t.data&&"isConsentsValid"!=t.data.type||(this.listOfInputValidity.find((t=>"Consents"===t.name)).isValid=!!t.data.isValid,this.isConsentValid=!!t.data.isValid,this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity))}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.registrationStep=this.stepChange("decrement"),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}dispatchRegisterCredentialsEvent(){let t="",e="";Object.keys(this.registrationStepsState).forEach((i=>{this.registrationStepsState[i].registerUserData&&(t||(t=this.registrationStepsState[i].registerUserData.Email?this.registrationStepsState[i].registerUserData.Email.value:t),e||(e=this.registrationStepsState[i].registerUserData.Password?this.registrationStepsState[i].registerUserData.Password.value:e))})),this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:t,userPassword:e}}),window.dispatchEvent(this.registerCredentialsEvent)}stepsStateMachine(t){const e=()=>{localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState))};switch(t.event){case"set":if("inputs"==t.type){const t=this.registrationStepsState[this.registrationStep];t.fields=this.listOfInputs,t.actions=this.listOfActions,t.fieldsValidity=this.listOfInputValidity}"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(t[e.name]={value:e.value,isDuplicate:e.isDuplicate},t)),{})),e();break;case"get":const i=JSON.parse(localStorage.getItem("registrationStepsState"));if(!i)return;if("inputs"==t.type){const t=this.registrationStepsState[this.registrationStep];this.listOfInputs=t.fields,this.listOfActions=t.actions,this.listOfInputValidity=t.fieldsValidity}if("values"==t.type){const t=i[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e].value,isDuplicate:t[e].isDuplicate}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value,"togglecheckbox"===e.inputType&&e.data.subFields.forEach((t=>{const e=this.listOfInputValues.find((e=>e.name===t.name));t.defaultValue=e.value})))}))}this.isConsentReady=this.listOfActions.some((t=>"/Consents"===t)),this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity)}}getRegisterConfig(t){const e=new URL(`${this.endpoint}/v1/player/legislation/registration/config`),i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json"),t&&e.searchParams.append("registrationId",t);const o={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,o).then((t=>t.json())).then((e=>{this.isLoading=!1,t(e)})).catch((t=>{this.isLoading=!1,console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoadingPOST=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.filter((t=>!t.isDuplicate)).reduce(((t,e)=>("TypeOfPublicArea"===e.name?t[e.name]=e.value.toLowerCase():"tel"===e.type?(t.MobilePrefix=e.value.prefix,t[e.name]=e.value.phone):"checkboxgroup"===e.type?null!==e.value&&Object.entries(e.value).forEach((([e,i])=>{t[e]=i?"true":"false"})):t[e.name]="toggle"===e.type?e.value?"true":"false":e.value,t)),{}),step:this.registrationStep},i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const o={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,o).then((t=>t.ok?t.json():t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode?t.thirdPartyResponse.message:"GmErr_Forbidden_UserAccount_NavExcluded"===this.errorCode?vh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:vh(`${this.errorCode}`,this.language)||vh("generalError",this.language)})))).then((t=>{this.isLoadingPOST=!1,this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?(this.listOfActions.some((t=>"/generate-2FA-code/Generate2FACode"==t))&&this.extraActions.push("2fa"),localStorage.getItem("playerConsents")&&localStorage.removeItem("playerConsents"),this.setRegister()):(this.isConsentValid&&window.postMessage({type:"setUpPlayerConsents",registerid:this.registrationID}),this.registrationStep=this.stepChange("increment"),Object.keys(this.registrationStepsState).find((t=>t==this.registrationStep))?(this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})):this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})})))})).catch((t=>{this.isLoadingPOST=!1,console.error(t)})).finally((()=>{this.isLoadingPOST=!1}))}setRegister(){this.isLoading=!0,this.registerErrors=!1;const t=new URL(`${this.endpoint}/v1/player/legislation/register`),e=new Headers;e.append("Content-Type","application/json"),e.append("Accept","application/json");const i={method:"PUT",body:JSON.stringify({registrationId:this.registrationID}),headers:e};fetch(t.href,i).then((t=>t.ok?t.json():(this.registerErrors=!0,t.json().then((t=>{this.errorCode=t.thirdPartyResponse.errorCode,this.errorMessage="GmErr_BadRequest_IdomsoftVerification_ShouldRetry"==this.errorCode||"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:vh(`${this.errorCode}`,this.language)||vh("generalError",this.language),window.postMessage({type:"registrationFailed",errorMessage:null==t?void 0:t.thirdPartyResponse.message},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"error",message:this.errorMessage}},window.location.href)}))))).then((t=>{this.isLoading=!1,this.registerErrors||(this.dispatchRegisterCredentialsEvent(),window.postMessage({type:"registrationSuccessful",userId:null==t?void 0:t.userId,extraActions:this.extraActions},window.location.href),window.postMessage({type:"WidgetNotification",data:{type:"success",message:vh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){if(this.listOfInputs=t.content.fields.flatMap((t=>{const e=t.validate.custom.find((t=>"duplicate-input"===t.rule)),i=Object.assign({},t);return e?[i,Object.assign(Object.assign({},t),{name:`${t.name}Duplicate`,displayName:e.displayName,isDuplicateInput:!0})]:[i]})),this.listOfInputValidity=this.listOfInputs.reduce(((t,e)=>{var i;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((e=>{t.push({name:e.name,isValid:this.setInitialValidStatus(e)})})):t.push({name:e.name,isValid:this.setInitialValidStatus(e)}),t}),[]),this.listOfInputValues=this.listOfInputs.reduce(((t,e)=>{var i;const o=null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase();return"togglecheckbox"===o&&e.data.subFields.forEach((e=>{var i;t.push({name:e.name,value:"checkbox"==(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"togglecheckbox"===o?"togglecheckbox":null})})),t.push({name:e.name,value:"checkbox"===o||"togglecheckbox"===o?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"===o?"checkboxgroup":"togglecheckbox"===o?"toggle":null}),t}),[]),this.btag&&this.addBtagValue(),this.listOfActions=t.content.actions.map((t=>t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.listOfActions.some((t=>"/register"==t))&&(this.lastStep=this.registrationStep),this.listOfActions.some((t=>"/Consents"==t))){if(this.isConsentReady)return this.listOfInputValidity.find((t=>"Consents"===t.name)).isValid=!1,void(this.isFormValid=!this.getInvalidStatus(this.listOfInputValidity));this.listOfInputValidity.push({name:"Consents",isValid:!1}),this.isConsentReady=!0}else this.isConsentReady=!1;var e;this.translationUrl?(e=this.translationUrl,new Promise((t=>{fetch(e).then((t=>t.json())).then((e=>{Object.keys(e).forEach((t=>{for(let i in e[t])fh[t][i]=e[t][i]})),t(!0)}))}))).then((()=>{this.listOfInputs.forEach((t=>{var e,i;return this.addTranslation(t),"togglecheckbox"===(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&t.data.subFields.forEach((t=>this.addTranslation(t))),"checkboxgroup"===(null===(i=t.inputType)||void 0===i?void 0:i.toLowerCase())&&(this.addTranslation(t),t.data.subFields.forEach((t=>this.addTranslation(t)))),t}))})).catch((t=>{console.error("Failed to fetch translations:",t)})).finally((()=>{this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}]})):this.forms=[...this.forms,{[this.registrationStep]:this.listOfInputs}],this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],fieldsValidity:[],registerUserData:{},actions:[]})}addBtagValue(){const t=this.listOfInputs.find((t=>"btag"===t.name.toLowerCase()));t&&(t.defaultValue=this.btag);const e=this.listOfInputValues.find((t=>"btag"===t.name.toLowerCase()));e&&(e.value=this.btag)}addTranslation(t){fh[fh[this.language]?this.language:"en"][t.name]&&Object.keys(fh[this.language][t.name]).forEach((e=>{t[e]=fh[this.language][t.name][e]}))}setInitialValidStatus(t){var e,i,o,r;return"checkbox"==(null===(e=t.inputType)||void 0===e?void 0:e.toLowerCase())&&0==(null===(i=t.validate)||void 0===i?void 0:i.mandatory)||("checkbox"!==(null===(o=t.inputType)||void 0===o?void 0:o.toLowerCase())||!(null===(r=t.validate)||void 0===r?void 0:r.mandatory)||"true"===t.defaultValue)&&null!==t.defaultValue}stepChange(t){const e=parseInt(this.registrationStep.replace("Step",""));return"increment"===t?"Step"+(e+1):"decrement"===t?"Step"+(e-1):void 0}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderForm(){return this.forms.map(((t,e)=>i("form",{action:".",id:`RegistrationForm${this.registrationStep}`,class:"registration__form "+(this.registrationStep!==`Step${e+1}`?"hidden":""),ref:t=>this.form=t},t[this.registrationStep]&&t[this.registrationStep].map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?"checkboxgroup"==t.inputType.toLowerCase()||"togglecheckbox"==t.inputType.toLowerCase()?t.data.subFields:t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,isDuplicateInput:t.isDuplicateInput,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder,dateFormat:this.dateFormat,"translation-url":this.translationUrl,emitOnClick:this.emitOnClick}))),this.isConsentReady&&this.renderConsents(),this.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}renderConsents(){return i("div",{class:"consentsContainer"},i("general-consents",{endpoint:this.endpoint}))}renderButtons(){return i("div",{class:"registration__buttons-wrapper "+(this.autofilled?"registration__buttons-wrapper--autofilled":"")},this.isLoadingPOST&&i("slot",{name:"spinner"})&&i("svg",{class:"spinner",viewBox:"0 0 50 50"},i("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})),!this.isLoadingPOST&&i("button",{class:"registration__button registration__button--next "+(this.isFormValid?"":"registration__button--disabled"),type:"submit",form:`RegistrationForm${this.registrationStep}`,onClick:t=>this.nextHandler(t),disabled:!this.isFormValid},vh(this.lastStep===this.registrationStep?"doneButton":"nextButton",this.language)),i("button",{class:"registration__button registration__button--back "+("Step1"==this.registrationStep?"registration__button--first-step":""),onClick:t=>this.backHandler(t)},vh("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:`registration registration__${this.registrationStep}`},this.renderForm(),!this.buttonInsideForm&&this.renderButtons())}get host(){return o(this)}static get watchers(){return{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};gh.style='*,\n*::before,\n*::after {\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n}\n\n.registration__form.hidden {\n display: none;\n}\n\n.registration {\n font-family: "Roboto";\n font-style: normal;\n font-family: sans-serif;\n display: flex;\n flex-direction: column;\n gap: 24px;\n width: 100%;\n height: 100%;\n container-type: inline-size;\n}\n.registration__wrapper {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.registration__error-message {\n color: var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909));\n font-size: 13px;\n display: block;\n justify-content: center;\n text-align: center;\n}\n.registration__form {\n display: grid;\n grid-template-columns: repeat(1, 1fr);\n gap: 40px;\n justify-items: stretch;\n align-content: flex-start;\n overflow: auto;\n width: 100%;\n height: 100%;\n}\n.registration__buttons-wrapper {\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n align-items: center;\n position: relative;\n}\n.registration__button {\n border-radius: 5px;\n background: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n border: 1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n color: var(--emfe-w-button-typography, var(--emfe-w-color-white, #FFFFFF));\n text-transform: uppercase;\n font-size: 20px;\n height: 44px;\n width: 100%;\n margin: 0px auto;\n padding: 10px 20px;\n font-weight: normal;\n box-shadow: none;\n cursor: pointer;\n}\n.registration__button--disabled {\n background: var(--emfe-w-color-gray-100, #E6E6E6);\n border: 1px solid var(--emfe-w-color-gray-150, #828282);\n pointer-events: none;\n box-shadow: none;\n}\n.registration__button--first-step {\n display: none;\n}\n\n@container (min-width: 450px) {\n .registration__form {\n grid-template-columns: repeat(2, 1fr);\n }\n .registration__buttons-wrapper {\n flex-direction: row-reverse;\n gap: 15px;\n }\n}\n.spinner {\n animation: rotate 2s linear infinite;\n z-index: 2;\n position: absolute;\n top: 50%;\n left: 50%;\n margin: -25px 0 0 -25px;\n width: 50px;\n height: 50px;\n}\n.spinner .path {\n stroke: var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));\n stroke-linecap: round;\n animation: dash 1.5s ease-in-out infinite;\n}\n\n@keyframes rotate {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes dash {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}';const bh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.validation=void 0,this.defaultValue=void 0,this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,o=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return a(`${i}`,this.language)?a(`${i}`,this.language):o}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?a("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{key:"2032f77ca52b330ae2e8f484d7a0aba60ee7b9d5",class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"0786901cd928bba86597180f058bff43fba522b6",class:"number__wrapper--flex"},i("label",{key:"ff7f39306cef7aeba3e0e4508df03c5a945e748b",class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"dced91223621551472fee374d56f1ad7476f4191",class:"number__wrapper--relative"},this.tooltip&&i("img",{key:"a804a983e342e4d117126720a32c4c34a2b267dc",class:"number__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"fd59afaedf7d9f761684b057a1809474d735cc26",ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"ca11558b5704b69311626736ab84a298449b98d7",class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};bh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__wrapper--autofilled .number__input{color:var(--emfe-w-color-black, #000000)}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.number__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.number__input{font-family:inherit;border-radius:5px;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-color-black, #000000);border-radius:5px;box-sizing:border-box;padding:5px 15px;font-size:16px;line-height:18px;position:relative;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}';
|
|
3934
3934
|
/**
|
|
3935
3935
|
* @license
|
|
3936
3936
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3937
3937
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3938
3938
|
*/
|
|
3939
|
-
class
|
|
3939
|
+
class yh extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}l(yh);const _h=(t,...e)=>{kt(`lumo-${t}`,e)};
|
|
3940
3940
|
/**
|
|
3941
3941
|
* @license
|
|
3942
3942
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3943
3943
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3944
|
-
*/
|
|
3944
|
+
*/_h("color-props",f`
|
|
3945
3945
|
:host {
|
|
3946
3946
|
/* Base (background) */
|
|
3947
3947
|
--lumo-base-color: #fff;
|
|
@@ -4141,7 +4141,7 @@ class _h extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4141
4141
|
background-color: var(--lumo-contrast-10pct);
|
|
4142
4142
|
border-radius: var(--lumo-border-radius-m);
|
|
4143
4143
|
}
|
|
4144
|
-
`,{moduleId:"lumo-color"}),
|
|
4144
|
+
`,{moduleId:"lumo-color"}),_h("font-icons",f`
|
|
4145
4145
|
@font-face {
|
|
4146
4146
|
font-family: 'lumo-icons';
|
|
4147
4147
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
|
|
@@ -4194,7 +4194,7 @@ class _h extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4194
4194
|
--lumo-icons-upload: '\\ea29';
|
|
4195
4195
|
--lumo-icons-user: '\\ea2a';
|
|
4196
4196
|
}
|
|
4197
|
-
`),
|
|
4197
|
+
`),_h("sizing-props",f`
|
|
4198
4198
|
:host {
|
|
4199
4199
|
--lumo-size-xs: 1.625rem;
|
|
4200
4200
|
--lumo-size-s: 1.875rem;
|
|
@@ -4209,7 +4209,7 @@ class _h extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4209
4209
|
/* For backwards compatibility */
|
|
4210
4210
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
4211
4211
|
}
|
|
4212
|
-
`),
|
|
4212
|
+
`),_h("spacing-props",f`
|
|
4213
4213
|
:host {
|
|
4214
4214
|
/* Square */
|
|
4215
4215
|
--lumo-space-xs: 0.25rem;
|
|
@@ -4238,7 +4238,7 @@ class _h extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4238
4238
|
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
4239
4239
|
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
4240
4240
|
}
|
|
4241
|
-
`,
|
|
4241
|
+
`,_h("style-props",f`
|
|
4242
4242
|
:host {
|
|
4243
4243
|
/* Border radius */
|
|
4244
4244
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -4373,7 +4373,7 @@ const wh=f`
|
|
|
4373
4373
|
border-left: none;
|
|
4374
4374
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
4375
4375
|
}
|
|
4376
|
-
`,{moduleId:"lumo-typography"}),
|
|
4376
|
+
`,{moduleId:"lumo-typography"}),_h("typography-props",wh);
|
|
4377
4377
|
/**
|
|
4378
4378
|
* @license
|
|
4379
4379
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
@@ -4726,7 +4726,7 @@ const Sh=t=>class extends(ba(t)){static get properties(){return{autocomplete:{ty
|
|
|
4726
4726
|
* @license
|
|
4727
4727
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
4728
4728
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4729
|
-
*/;gt("vaadin-text-field",
|
|
4729
|
+
*/;gt("vaadin-text-field",ya,{moduleId:"vaadin-text-field-styles"});class Ih extends(Ch(xt(ho(Li)))){static get is(){return"vaadin-text-field"}static get template(){return Gi`
|
|
4730
4730
|
<style>
|
|
4731
4731
|
[part='input-field'] {
|
|
4732
4732
|
flex-grow: 0;
|
|
@@ -5377,12 +5377,12 @@ const Jh=t=>class extends(ga(t)){static get properties(){return{pattern:{type:St
|
|
|
5377
5377
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
5378
5378
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5379
5379
|
*/
|
|
5380
|
-
function $h(t){return null!=t}function tc(t,e){return t.findIndex((t=>!(t instanceof Kh)&&e(t)))}const ec=t=>class extends(ya(mr(Dr(ar(Qo(cr(Jo(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged"},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array},_closeOnBlurIsPrevented:Boolean,_scroller:Object,_overlayOpened:{type:Boolean,observer:"_overlayOpenedChanged"}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, theme)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new wa(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=`${this._tagNamePrefix}-scroller`,i=this._overlayElement;i.renderer=t=>{t.firstChild||t.appendChild(document.createElement(e))},i.requestContentUpdate();const o=i.querySelector(e);o.owner=t||this,o.getItemLabel=this._getItemLabel.bind(this),o.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=o}_updateScroller(t,e,i,o,r,s,a,n,l){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:o,selectedItem:r,itemIdPath:s,focusedIndex:a,renderer:n,theme:l}))}_openedOrItemsChanged(t,e,i){this._overlayOpened=!(!t||!(i||e&&e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&rr(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?(this._openedWithFocusRing=this.hasAttribute("focus-ring"),this._isInputFocused()||hs||this.inputElement&&this.inputElement.focus(),this._overlayElement.restoreFocusOnClose=!0):(this._onClosed(),this._openedWithFocusRing&&this._isInputFocused()&&this.setAttribute("focus-ring",""));const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"Tab"===t.key?this._overlayElement.restoreFocusOnClose=!1:"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?jh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?jh(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){const e=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;if(!this.allowCustomValue&&e)return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_onEscape(t){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(t.stopPropagation(),this._onClearAction()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{hs&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.filter=""}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||($h(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this.filter="",this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t,e){this._setDropdownItems(t);const i=e?e[this._focusedIndex]:null,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r:this.__getItemIndexByLabel(this.filteredItems,this.filter)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){this._dropdownItems=t}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&$h(e)?tc(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?tc(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Kh||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;this._closeOrCommit()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
5380
|
+
function $h(t){return null!=t}function tc(t,e){return t.findIndex((t=>!(t instanceof Kh)&&e(t)))}const ec=t=>class extends(_a(mr(Dr(ar(Qo(cr(Jo(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,items:{type:Array,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged"},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1},filter:{type:String,value:"",notify:!0},selectedItem:{type:Object,notify:!0},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged"},itemValuePath:{type:String,value:"value"},itemIdPath:String,_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array},_closeOnBlurIsPrevented:Boolean,_scroller:Object,_overlayOpened:{type:Boolean,observer:"_overlayOpenedChanged"}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, theme)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};var e;this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),e=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`),this.addController(new wa(this))}disconnectedCallback(){super.disconnectedCallback(),this.close()}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach((t=>{t.requestContentUpdate()})))}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),void 0!==e.filter&&this._filterChanged(e.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=`${this._tagNamePrefix}-scroller`,i=this._overlayElement;i.renderer=t=>{t.firstChild||t.appendChild(document.createElement(e))},i.requestContentUpdate();const o=i.querySelector(e);o.owner=t||this,o.getItemLabel=this._getItemLabel.bind(this),o.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=o}_updateScroller(t,e,i,o,r,s,a,n,l){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:o,selectedItem:r,itemIdPath:s,focusedIndex:a,renderer:n,theme:l}))}_openedOrItemsChanged(t,e,i){this._overlayOpened=!(!t||!(i||e&&e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&rr(this.inputElement)}_updateActiveDescendant(t){const e=this._nativeInput;if(!e)return;const i=this._getItemElements().find((e=>e.index===t));i?e.setAttribute("aria-activedescendant",i.id):e.removeAttribute("aria-activedescendant")}_openedChanged(t,e){if(void 0===e)return;t?(this._openedWithFocusRing=this.hasAttribute("focus-ring"),this._isInputFocused()||hs||this.inputElement&&this.inputElement.focus(),this._overlayElement.restoreFocusOnClose=!0):(this._onClosed(),this._openedWithFocusRing&&this._isInputFocused()&&this.setAttribute("focus-ring",""));const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"Tab"===t.key?this._overlayElement.restoreFocusOnClose=!1:"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?jh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?jh(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){const e=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;if(!this.allowCustomValue&&e)return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_onEscape(t){this.autoOpenDisabled?this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.clearButtonVisible&&!this.opened&&this.value&&(t.stopPropagation(),this._onClearAction()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{hs&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._inputElementValue=this.selectedItem?this._getItemLabel(this.selectedItem):this.value||"":this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this.filter=""}_onInput(t){const e=this._inputElementValue,i={};this.filter===e?this._filterChanged(this.filter):i.filter=e,this.opened||this._isClearButton(t)||this.autoOpenDisabled||(i.opened=!0),this.setProperties(i)}_onChange(t){t.stopPropagation()}_itemLabelPathChanged(t){"string"!=typeof t&&console.error("You should set itemLabelPath to a valid string")}_filterChanged(t){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,t):this._filteredItemsChanged(this.filteredItems)}_revertInputValue(){""!==this.filter?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange()}_revertInputValueToValue(){this._inputElementValue=this.allowCustomValue&&!this.selectedItem?this.value:this._getItemLabel(this.selectedItem)}_selectedItemChanged(t){if(null==t)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else{const e=this._getItemValue(t);if(this.value!==e&&(this.value=e,this.value!==e))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(t)}}_valueChanged(t,e){""===t&&void 0===e||($h(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this.filter="",this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t,e){this._setDropdownItems(t);const i=e?e[this._focusedIndex]:null,o=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&o>=0&&(this.selectedItem=t[o]);const r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r:this.__getItemIndexByLabel(this.filteredItems,this.filter)}_filterItems(t,e){if(!t)return t;const i=t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)));return i}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){this._dropdownItems=t}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&$h(e)?tc(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?tc(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Kh||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;this._closeOrCommit()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._onClearAction())}}
|
|
5381
5381
|
/**
|
|
5382
5382
|
* @license
|
|
5383
5383
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
5384
5384
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5385
|
-
*/;gt("vaadin-combo-box",
|
|
5385
|
+
*/;gt("vaadin-combo-box",ya,{moduleId:"vaadin-combo-box-styles"});class ic extends(Qh(ec(Jh(ba(xt(ho(Li))))))){static get is(){return"vaadin-combo-box"}static get template(){return Gi`
|
|
5386
5386
|
<style>
|
|
5387
5387
|
:host([opened]) {
|
|
5388
5388
|
pointer-events: auto;
|