@everymatrix/general-registration 1.45.5 → 1.45.8
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_13.cjs.entry.js +35 -11
- package/dist/cjs/index.cjs.js +4 -2
- package/dist/collection/components/general-registration/general-registration.js +16 -2
- package/dist/collection/index.js +4 -2
- package/dist/collection/utils/locale.utils.js +10 -0
- package/dist/esm/checkbox-group-input_13.entry.js +35 -11
- package/dist/esm/index.js +4 -2
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/index.esm.js +1 -1
- package/dist/general-registration/{p-68859405.entry.js → p-12d7a191.entry.js} +60 -60
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as o,H as r}from"./p-35ed5ec5.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",
|
|
1
|
+
import{r as t,c as e,h as i,g as o,H as r}from"./p-35ed5ec5.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==";
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -26,7 +26,7 @@ const c=window,u=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"
|
|
|
26
26
|
* Copyright 2017 Google LLC
|
|
27
27
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
28
|
*/
|
|
29
|
-
var C;S[A]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:S}),(null!==(g=b.reactiveElementVersions)&&void 0!==g?g:b.reactiveElementVersions=[]).push("1.6.3");const T=window,
|
|
29
|
+
var C;S[A]=!0,S.elementProperties=new Map,S.elementStyles=[],S.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:S}),(null!==(g=b.reactiveElementVersions)&&void 0!==g?g:b.reactiveElementVersions=[]).push("1.6.3");const T=window,I=T.trustedTypes,D=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,z="$lit$",N=`lit$${(Math.random()+"").slice(9)}$`,O="?"+N,R=`<${O}>`,M=document,P=()=>M.createComment(""),G=t=>null===t||"object"!=typeof t&&"function"!=typeof t,F=Array.isArray,L="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,j=/>/g,V=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),q=/'/g,W=/"/g,H=/^(?:script|style|textarea|title)$/i,Y=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),X=new WeakMap,Z=M.createTreeWalker(M,129,null,!1);function Q(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==D?D.createHTML(e):e}const J=(t,e)=>{const i=t.length-1,o=[];let r,s=2===e?"<svg>":"",a=U;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===U?"!--"===l[1]?a=B:void 0!==l[1]?a=j:void 0!==l[2]?(H.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=V):void 0!==l[3]&&(a=V):a===V?">"===l[0]?(a=null!=r?r:U,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?V:'"'===l[3]?W:q):a===W||a===q?a=V:a===B||a===j?a=U:(a=V,r=void 0);const u=a===V&&t[e+1].startsWith("/>")?" ":"";s+=a===U?i+R:h>=0?(o.push(n),i.slice(0,h)+z+i.slice(h)+N+u):i+N+(-2===h?(o.push(void 0),e):u)}return[Q(t,s+(t[i]||"<?>")+(2===e?"</svg>":"")),o]};class ${constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,s=0;const a=t.length-1,n=this.parts,[l,h]=J(t,e);if(this.el=$.createElement(l,i),Z.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=Z.nextNode())&&n.length<a;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(z)||e.startsWith(N)){const i=h[s++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+z).split(N),e=/([.?@])?(.*)/.exec(i);n.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?at:"@"===e[1]?nt:ot})}else n.push({type:6,index:r})}for(const e of t)o.removeAttribute(e)}if(H.test(o.tagName)){const t=o.textContent.split(N),e=t.length-1;if(e>0){o.textContent=I?I.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],P()),Z.nextNode(),n.push({type:2,index:++r});o.append(t[e],P())}}}else if(8===o.nodeType)if(o.data===O)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(N,t+1));)n.push({type:7,index:r}),t+=N.length-1}r++}}static createElement(t,e){const i=M.createElement("template");return i.innerHTML=t,i}}function tt(t,e,i=t,o){var r,s,a,n;if(e===Y)return e;let l=void 0!==o?null===(r=i._$Co)||void 0===r?void 0:r[o]:i._$Cl;const h=G(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(s=null==l?void 0:l._$AO)||void 0===s||s.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,o)),void 0!==o?(null!==(a=(n=i)._$Co)&&void 0!==a?a:n._$Co=[])[o]=l:i._$Cl=l),void 0!==l&&(e=tt(t,l._$AS(t,e.values),l,o)),e}class et{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:M).importNode(i,!0);Z.currentNode=r;let s=Z.nextNode(),a=0,n=0,l=o[0];for(;void 0!==l;){if(a===l.index){let e;2===l.type?e=new it(s,s.nextSibling,this,t):1===l.type?e=new l.ctor(s,l.name,l.strings,this,t):6===l.type&&(e=new lt(s,this,t)),this._$AV.push(e),l=o[++n]}a!==(null==l?void 0:l.index)&&(s=Z.nextNode(),a++)}return Z.currentNode=M,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class it{constructor(t,e,i,o){var r;this.type=2,this._$AH=K,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=tt(this,t,e),G(t)?t===K||null==t||""===t?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==Y&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>F(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==K&&G(this._$AH)?this._$AA.nextSibling.data=t:this.$(M.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=$.createElement(Q(o.h,o.h[0]),this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new et(r,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=X.get(t.strings);return void 0===e&&X.set(t.strings,e=new $(t)),e}T(t){F(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new it(this.k(P()),this.k(P()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class ot{constructor(t,e,i,o,r){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const r=this.strings;let s=!1;if(void 0===r)t=tt(this,t,e,0),s=!G(t)||t!==this._$AH&&t!==Y,s&&(this._$AH=t);else{const o=t;let a,n;for(t=r[0],a=0;a<r.length-1;a++)n=tt(this,o[i+a],e,a),n===Y&&(n=this._$AH[a]),s||(s=!G(n)||n!==this._$AH[a]),n===K?t=K:t!==K&&(t+=(null!=n?n:"")+r[a+1]),this._$AH[a]=n}s&&!o&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends ot{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}const st=I?I.emptyScript:"";class at extends ot{constructor(){super(...arguments),this.type=4}j(t){t&&t!==K?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class nt extends ot{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=tt(this,t,e,0))&&void 0!==i?i:K)===Y)return;const o=this._$AH,r=t===K&&o!==K||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==K&&(o===K||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class lt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){tt(this,t)}}const ht=T.litHtmlPolyfillSupport;
|
|
30
30
|
/**
|
|
31
31
|
* @license
|
|
32
32
|
* Copyright 2017 Google LLC
|
|
@@ -652,7 +652,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
652
652
|
Code distributed by Google as part of the polymer project is also
|
|
653
653
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
654
654
|
*/
|
|
655
|
-
let St,Ct,Tt=/(url\()([^)]*)(\))/g,
|
|
655
|
+
let St,Ct,Tt=/(url\()([^)]*)(\))/g,It=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Dt(t,e){if(t&&It.test(t))return t;if("//"===t)return t;if(void 0===St){St=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",St="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),St)try{return new URL(t,e).href}catch(e){return t}return Ct||(Ct=document.implementation.createHTMLDocument("temp"),Ct.base=Ct.createElement("base"),Ct.head.appendChild(Ct.base),Ct.anchor=Ct.createElement("a"),Ct.body.appendChild(Ct.anchor)),Ct.base.href=e,Ct.anchor.href=t,Ct.anchor.href||t}function zt(t,e){return t.replace(Tt,(function(t,i,o,r){return i+"'"+Dt(o.replace(/["']/g,""),e)+"'"+r}))}function Nt(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
656
656
|
/**
|
|
657
657
|
@license
|
|
658
658
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -661,7 +661,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
661
661
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
662
662
|
Code distributed by Google as part of the polymer project is also
|
|
663
663
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
664
|
-
*/const Ot=!window.ShadyDOM||!window.ShadyDOM.inUse,Rt=Ot&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Mt=window.Polymer&&window.Polymer.rootPath||Nt(document.baseURI||window.location.href),Pt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Gt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Ft=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,
|
|
664
|
+
*/const Ot=!window.ShadyDOM||!window.ShadyDOM.inUse,Rt=Ot&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Mt=window.Polymer&&window.Polymer.rootPath||Nt(document.baseURI||window.location.href),Pt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Gt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Ft=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Lt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ut=window.Polymer&&window.Polymer.legacyWarnings||!1,Bt=window.Polymer&&window.Polymer.syncInitialRender||!1,jt=window.Polymer&&window.Polymer.legacyUndefined||!1,Vt=window.Polymer&&window.Polymer.orderedComputed||!1,qt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Wt=window.Polymer&&window.Polymer.fastDomIf||!1,Ht=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Yt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Kt=0;const Xt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Kt++;return function(o){let r=o.__mixinSet;if(r&&r[i])return o;let s=e,a=s.get(o);if(!a){a=t(o),s.set(o,a);let e=Object.create(a.__mixinSet||r||null);e[i]=!0,a.__mixinSet=e}return a}};
|
|
665
665
|
/**
|
|
666
666
|
@license
|
|
667
667
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -670,7 +670,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
670
670
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
671
671
|
Code distributed by Google as part of the polymer project is also
|
|
672
672
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
673
|
-
*/let Zt={},
|
|
673
|
+
*/let Zt={},Qt={};function Jt(t,e){Zt[t]=Qt[t.toLowerCase()]=e}function $t(t){return Zt[t]||Qt[t.toLowerCase()]}class te extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=$t(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Dt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Nt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Gt&&void 0!==$t(t))throw Jt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Jt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}te.prototype.modules=Zt,customElements.define("dom-module",te);
|
|
674
674
|
/**
|
|
675
675
|
@license
|
|
676
676
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -716,7 +716,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
716
716
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
717
717
|
Code distributed by Google as part of the polymer project is also
|
|
718
718
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
719
|
-
*/let Ae=0,Se=0,Ce=[],Te=0,
|
|
719
|
+
*/let Ae=0,Se=0,Ce=[],Te=0,Ie=!1,De=document.createTextNode("");new window.MutationObserver((function(){Ie=!1;const t=Ce.length;for(let e=0;e<t;e++){let t=Ce[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ce.splice(0,t),Se+=t})).observe(De,{characterData:!0});const ze={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ne={run:t=>(Ie||(Ie=!0,De.textContent=Te++),Ce.push(t),Ae++),cancel(t){const e=t-Se;if(e>=0){if(!Ce[e])throw new Error("invalid async handle: "+t);Ce[e]=null}}},Oe=Ne,Re=Xt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let o=this.__data[t],r=this._shouldPropertyChange(t,e,o);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=o),this.__data[t]=e,this.__dataPending[t]=e),r}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Oe.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,o){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,o)}_attributeToProperty(t,e,i){if(!this.__serializing){const o=this.__dataAttributes,r=o&&o[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const o=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=ce(t)),void 0===o?t.removeAttribute(i):t.setAttribute(i,""===o&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Me={};let Pe=HTMLElement.prototype;for(;Pe;){let t=Object.getOwnPropertyNames(Pe);for(let e=0;e<t.length;e++)Me[t[e]]=!0;Pe=Object.getPrototypeOf(Pe)}const Ge=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Fe=Xt((t=>{const e=Re(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ke(t[e]))}static attributeNameForProperty(t){return Ee(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Ge(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Me[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Le={"dom-if":!0,"dom-repeat":!0};let Ue=!1,Be=!1;const je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,o)=>{const r=i.getAttribute(o);t&&o.startsWith("on-")?e.setAttribute(o,t.createScript(r,o)):e.setAttribute(o,r)}})();function Ve(t){let e=t.getAttribute("is");if(e&&Le[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];je(t,i,e),i.removeAttribute(e)}}return t}function qe(t,e){let i=e.parentInfo&&qe(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,o=0;t;t=t.nextSibling)if(e.parentIndex===o++)return t}function We(t,e,i,o){o.id&&(e[o.id]=i)}function He(t,e,i){if(i.events&&i.events.length)for(let o,r=0,s=i.events;r<s.length&&(o=s[r]);r++)t._addMethodEventListenerToNode(e,o.name,o.value,t)}function Ye(t,e,i,o){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=o)}const Ke=Xt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let o=!1,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):o=this._parseTemplateNestedTemplate(r,e,i)||o,function(t){(function(){if(!Ue){Ue=!0;const t=document.createElement("textarea");t.placeholder="a",Be=t.placeholder===t.textContent}return Be})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(o=this._parseTemplateNodeAttributes(r,e,i)||o),o||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let o,r=t.firstChild,s=0;r;r=o){if("template"==r.localName&&(r=Ve(r)),o=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=o;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,o=i.nextSibling,t.removeChild(i),i=o;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let a={parentIndex:s,parentInfo:i};this._parseTemplateNode(r,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),r.parentNode&&s++}}static _parseTemplateNestedTemplate(t,e,i){let o=t,r=this._parseTemplate(o,e);return(r.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let o=!1,r=Array.from(t.attributes);for(let s,a=r.length-1;s=r[a];a--)o=this._parseTemplateNodeAttribute(t,e,i,s.name,s.value)||o;return o}static _parseTemplateNodeAttribute(t,e,i,o,r){return"on-"===o.slice(0,3)?(t.removeAttribute(o),i.events=i.events||[],i.events.push({name:o.slice(3),value:r}),!0):"id"===o&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,o=document.importNode(e.content||t.content,!0);o.__noInsertionPoint=!e.hasInsertionPoint;let r=o.nodeList=new Array(i.length);o.$={};for(let t,s=0,a=i.length;s<a&&(t=i[s]);s++){let i=r[s]=qe(o,t);We(0,o.$,i,t),Ye(0,i,t,e),He(this,i,t)}return o}_addMethodEventListenerToNode(t,e,i,o){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(o=o||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
720
720
|
/**
|
|
721
721
|
* @fileoverview
|
|
722
722
|
* @suppress {checkPrototypalTypes}
|
|
@@ -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 Xe=0;const Ze=[],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=Xe++;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===Xe||r&&!oi(t,a.trigger)||(a.info.lastRun=Xe,hi(a.info,i,o))}};function ui(t,e,i,o,r){let s=bi(t,e,i,0,r);if(s===Ze)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!==Ze&&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===Ze?Ze: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};jt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),jt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ti(t,e,i,o,r,s){Ci(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const Di=Xt((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(Ii.length){let t=Ii[Ii.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){Xe++;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=Xe++;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&&Ti(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&&Ti(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)&&Ti(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&&Ti(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&&Ti(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(jt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ze;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),Ii.push(this);let i=super._stampTemplate(t,e);if(Ii.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(Wt&&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}}})),Ii=[],zi=Xt((t=>{const e=Re(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 Xe=0;const Ze=[],Qe={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Je="__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=Xe++;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===Xe||r&&!oi(t,a.trigger)||(a.info.lastRun=Xe,hi(a.info,i,o))}};function ui(t,e,i,o,r){let s=bi(t,e,i,0,r);if(s===Ze)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!==Ze&&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[Qe.READ_ONLY]&&e[Qe.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[Qe.READ_ONLY]&&e[Qe.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===Ze?Ze: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};jt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),jt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ti(t,e,i,o,r,s){Ci(t,e,i,[{index:o,addedCount:r,removed:s,object:e,type:"splice"}])}const Ii=Xt((t=>{const e=Ke(Fe(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Qe}_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[Qe.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==Qe.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,Qe.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Qe.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Qe.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Qe.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[Qe.NOTIFY]&&this[Qe.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[Qe.READ_ONLY]&&this[Qe.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[Qe.COMPUTE];if(r)if(Vt){Xe++;const s=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Qe.COMPUTE];let o,{counts:r,ready:s,total:a}=function(t){const e=t[Je],i={},o=t[Qe.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[Qe.REFLECT],e,i,r),ei(this,this[Qe.OBSERVE],e,i,r),o&&function(t,e,i,o,r){let s,a,n=t[Qe.NOTIFY],l=Xe++;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[Qe.PROPAGATE]&&ei(this,this[Qe.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[Qe.READ_ONLY]&&this[Qe.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&&Ti(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&&Ti(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)&&Ti(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&&Ti(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&&Ti(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,Qe.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,Qe.OBSERVE,{fn:ri,info:o,trigger:{name:t}}),i&&this._addPropertyEffect(e,Qe.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,Qe.OBSERVE,bi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Qe.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,Qe.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,Qe.COMPUTE,ui,t,i);ti(this,Je)[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(jt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Ze;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(Wt&&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=Xt((t=>{const e=Re(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.
|
|
@@ -737,7 +737,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
737
737
|
Code distributed by Google as part of the polymer project is also
|
|
738
738
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
739
739
|
*/
|
|
740
|
-
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),Ni=window.ShadyCSS&&window.ShadyCSS.cssBuild,Oi=Xt((t=>{const e=zi(
|
|
740
|
+
function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{type:o}:o}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=o(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,o(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),Ni=window.ShadyCSS&&window.ShadyCSS.cssBuild,Oi=Xt((t=>{const e=zi(Ii(t));function i(t,e,i,o){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,o)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,o[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):Lt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let o=0;o<t.length;o++)i._createMethodObserver(t[o],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Gt||Ft)&&(e=te.import(t,"template"),Gt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Nt(t.url);else{const t=te.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Mt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let o=e[i];"value"in o&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=o)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return zt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,o){if(!Ni){const r=e.content.querySelectorAll("style"),s=le(e),a=function(t){let e=re(t);return e?he(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let r=a[i];r.textContent=t._processStyleText(r.textContent,o),e.content.insertBefore(r,n)}let l=0;for(let e=0;e<s.length;e++){let i=s[e],a=r[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,o)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Yt&&Ni&&Rt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?Dt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ce(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Bt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=Dt(this.importPath)),Dt(t,e)}static _parseTemplateContent(t,i,o){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,o)}static _addTemplatePropertyEffect(t,i,o){return!Ut||i in this._properties||o.info.part.signature&&o.info.part.signature.static||o.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,o)}}})),Ri=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Mi{constructor(t,e){Fi(t,e);const i=e.reduce(((e,i,o)=>e+Pi(i)+t[o+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Pi(t){if(t instanceof Mi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Gi=function(t,...e){Fi(t,e);const i=document.createElement("template");let o=e.reduce(((e,i,o)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Mi)return Pi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[o+1]),t[0]);return Ri&&(o=Ri.createHTML(o)),i.innerHTML=o,i},Fi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Li=Oi(HTMLElement),Ui=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Bi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function ji(t,e){if("function"!=typeof t)return;const i=Ui.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function Vi(){}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(Bi?!(Bi&&Object.keys(Bi).map((t=>Bi[t])).filter((t=>t.productionMode)).length>0):!ji((function(){return!0})))}catch(t){return!1}}());
|
|
741
741
|
/**
|
|
742
742
|
* @license
|
|
743
743
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -747,7 +747,7 @@ function(t){const e={};for(let i in t){const o=t[i];e[i]="function"==typeof o?{t
|
|
|
747
747
|
* Code distributed by Google as part of the polymer project is also
|
|
748
748
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
749
749
|
*/
|
|
750
|
-
let qi=0,Wi=0;const Hi=[];let Yi=!1;const Ki={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Xi={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Zi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},
|
|
750
|
+
let qi=0,Wi=0;const Hi=[];let Yi=!1;const Ki={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Xi={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Zi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Qi={run(t){Yi||(Yi=!0,queueMicrotask((()=>function(){Yi=!1;const t=Hi.length;for(let e=0;e<t;e++){const t=Hi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Hi.splice(0,t),Wi+=t}()))),Hi.push(t);const e=qi;return qi+=1,e},cancel(t){const e=t-Wi;if(e>=0){if(!Hi[e])throw new Error(`invalid async handle: ${t}`);Hi[e]=null}}},Ji=new Set;class $i{static debounce(t,e,i){return t instanceof $i?t._cancelAsync():t=new $i,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,Ji.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Ji.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}function to(t){Ji.add(t)}function eo(){const t=Boolean(Ji.size);return Ji.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const io=()=>{let t;do{t=eo()}while(t)},oo=[];
|
|
751
751
|
/**
|
|
752
752
|
* @license
|
|
753
753
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -792,12 +792,12 @@ 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 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 To(t){return Ao.indexOf(t)>-1}let
|
|
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 To(t){return Ao.indexOf(t)>-1}let Io=!1;function Do(t){if(!To(t)&&"touchend"!==t)return wo&&Io&&yo?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Io=!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(!To(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 Ro={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Mo(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 Bo(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&&(Ro.touch.id=i.identifier),Ro.touch.id!==i.identifier)return;wo||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Ro.touch.x=e.clientX,Ro.touch.y=e.clientY,Ro.touch.scrollDecided=!1;else if("touchmove"===i){if(Ro.touch.scrollDecided)return;Ro.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(Ro.touch.x-e.clientX),s=Math.abs(Ro.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():Ho("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 jo(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&&To(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Bo,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&&Qi.run((()=>{t.style.touchAction=e})),t[Eo]=e}function Wo(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 Ho(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&&Wo(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:o,prevent:t=>Ho(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 Xo(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),Wo(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 Zo(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||Wo(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.
|
|
799
799
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
800
|
-
*/Vo({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Po(this.info)},mousedown(t){if(!Oo(t))return;const e=
|
|
800
|
+
*/Vo({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Po(this.info)},mousedown(t){if(!Oo(t))return;const e=Uo(t),i=this;Mo(this.info,(t=>{Oo(t)||(Yo("up",e,t),Po(i.info))}),(t=>{Oo(t)&&Yo("up",e,t),Po(i.info)})),Yo("down",e,t)},touchstart(t){Yo("down",Uo(t),t.changedTouches[0],t)},touchend(t){Yo("up",Uo(t),t.changedTouches[0],t)}}),Vo({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Po(this.info)},mousedown(t){if(!Oo(t))return;const e=Uo(t),i=this,o=t=>{const o=t.clientX,r=t.clientY;Ko(i.info,o,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Ho("tap"),i.info.addMove({x:o,y:r}),Oo(t)||(i.info.state="end",Po(i.info)),e&&Xo(i.info,e,t),i.info.started=!0)};Mo(this.info,o,(t=>{i.info.started&&o(t),Po(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=Uo(t),i=t.changedTouches[0],o=i.clientX,r=i.clientY;Ko(this.info,o,r)&&("start"===this.info.state&&Ho("tap"),this.info.addMove({x:o,y:r}),Xo(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Uo(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Xo(this.info,e,i))}}),Vo({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){Oo(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Oo(t)&&Zo(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Zo(this.info,t.changedTouches[0],t)}});const Qo=Xt((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),Jo=Xt((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),$o=t=>class extends(Qo(Jo(t))){get _activeKeys(){return[" "]}ready(){super.ready(),jo(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),jo(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
|
|
801
801
|
/**
|
|
802
802
|
* @license
|
|
803
803
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -813,12 +813,12 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
813
813
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
814
814
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
815
815
|
*/
|
|
816
|
-
const ar=Xt((t=>class extends t{get _keyboardActive(){return tr}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),nr=t=>class extends(
|
|
816
|
+
const ar=Xt((t=>class extends t{get _keyboardActive(){return tr}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),nr=t=>class extends(Qo(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
|
|
817
817
|
/**
|
|
818
818
|
* @license
|
|
819
819
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
820
820
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
821
|
-
*/,lr=Xt((t=>class extends(ar(nr(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),hr=Xt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),cr=Xt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),ur=Xt((t=>class extends(hr(
|
|
821
|
+
*/,lr=Xt((t=>class extends(ar(nr(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),hr=Xt((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),cr=Xt((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),ur=Xt((t=>class extends(hr(Qo(cr(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}}));
|
|
822
822
|
/**
|
|
823
823
|
* @license
|
|
824
824
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -948,7 +948,7 @@ gt("vaadin-checkbox",f`
|
|
|
948
948
|
outline-width: 2px;
|
|
949
949
|
}
|
|
950
950
|
}
|
|
951
|
-
`,{moduleId:"vaadin-checkbox-styles"});class yr extends(br(ho(xt(
|
|
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>
|
|
@@ -1178,12 +1178,12 @@ class Cr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1178
1178
|
* @license
|
|
1179
1179
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1180
1180
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1181
|
-
*/class
|
|
1181
|
+
*/class Ir extends pr{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
1182
1182
|
/**
|
|
1183
1183
|
* @license
|
|
1184
1184
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1185
1185
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1186
|
-
*/const
|
|
1186
|
+
*/const Dr=Xt((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),zr=t=>class extends(Dr(vr(mr(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Cr(this),this._helperController=new Ir(this),this._errorController=new Tr(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
|
|
1187
1187
|
/**
|
|
1188
1188
|
* @license
|
|
1189
1189
|
* Copyright (c) 2018 - 2023 Vaadin Ltd.
|
|
@@ -1193,7 +1193,7 @@ class Cr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
|
|
|
1193
1193
|
* @license
|
|
1194
1194
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1195
1195
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1196
|
-
*/class Nr extends(zr(ar(
|
|
1196
|
+
*/class Nr extends(zr(ar(Qo(ho(xt(Li)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return Gi`
|
|
1197
1197
|
<style>
|
|
1198
1198
|
:host {
|
|
1199
1199
|
display: inline-flex;
|
|
@@ -1785,7 +1785,7 @@ const Gr=f`
|
|
|
1785
1785
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1786
1786
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1787
1787
|
*/
|
|
1788
|
-
class Fr extends(xt(ao(
|
|
1788
|
+
class Fr extends(xt(ao(Li))){static get is(){return"vaadin-input-container"}static get template(){return Gi`
|
|
1789
1789
|
<style>
|
|
1790
1790
|
:host {
|
|
1791
1791
|
display: flex;
|
|
@@ -1861,7 +1861,7 @@ class Fr extends(xt(ao(Ui))){static get is(){return"vaadin-input-container"}stat
|
|
|
1861
1861
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1862
1862
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1863
1863
|
*/
|
|
1864
|
-
const
|
|
1864
|
+
const Lr=f`
|
|
1865
1865
|
:host {
|
|
1866
1866
|
top: var(--lumo-space-m);
|
|
1867
1867
|
right: var(--lumo-space-m);
|
|
@@ -1924,13 +1924,13 @@ const Ur=f`
|
|
|
1924
1924
|
opacity: 1;
|
|
1925
1925
|
}
|
|
1926
1926
|
}
|
|
1927
|
-
`;gt("",
|
|
1927
|
+
`;gt("",Lr,{moduleId:"lumo-overlay"});
|
|
1928
1928
|
/**
|
|
1929
1929
|
* @license
|
|
1930
1930
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1931
1931
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1932
1932
|
*/
|
|
1933
|
-
const
|
|
1933
|
+
const Ur=f`
|
|
1934
1934
|
:host([opening]),
|
|
1935
1935
|
:host([closing]) {
|
|
1936
1936
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -1960,7 +1960,7 @@ const Lr=f`
|
|
|
1960
1960
|
opacity: 0;
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
`;gt("",
|
|
1963
|
+
`;gt("",Ur,{moduleId:"lumo-menu-overlay-core"});const Br=[Lr,Ur,f`
|
|
1964
1964
|
/* Small viewport (bottom sheet) styles */
|
|
1965
1965
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1966
1966
|
@media (max-width: 420px), (max-height: 420px) {
|
|
@@ -2780,7 +2780,7 @@ const Hr=f`
|
|
|
2780
2780
|
* @license
|
|
2781
2781
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2782
2782
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2783
|
-
*/;gt("vaadin-button",Hr,{moduleId:"vaadin-button-styles"});class Kr extends(Yr(ho(xt(mr(
|
|
2783
|
+
*/;gt("vaadin-button",Hr,{moduleId:"vaadin-button-styles"});class Kr extends(Yr(ho(xt(mr(Li))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
|
|
2784
2784
|
<div class="vaadin-button-container">
|
|
2785
2785
|
<span part="prefix" aria-hidden="true">
|
|
2786
2786
|
<slot name="prefix"></slot>
|
|
@@ -3151,7 +3151,7 @@ const Zr=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
|
|
3154
|
+
const Qr=[wr,Zr,_r,f`
|
|
3155
3155
|
:host {
|
|
3156
3156
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
3157
3157
|
color: var(--lumo-body-text-color);
|
|
@@ -3285,7 +3285,7 @@ const Jr=[wr,Zr,_r,f`
|
|
|
3285
3285
|
[part='clear-button']::before {
|
|
3286
3286
|
content: var(--lumo-icons-cross);
|
|
3287
3287
|
}
|
|
3288
|
-
`];gt("",
|
|
3288
|
+
`];gt("",Qr,{moduleId:"lumo-input-field-shared-styles"}),gt("vaadin-date-picker",[Qr,f`
|
|
3289
3289
|
:host {
|
|
3290
3290
|
outline: none;
|
|
3291
3291
|
}
|
|
@@ -3321,7 +3321,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3321
3321
|
Code distributed by Google as part of the polymer project is also
|
|
3322
3322
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3323
3323
|
*/
|
|
3324
|
-
let
|
|
3324
|
+
let Jr=!1,$r=[],ts=[];function es(t){const e=t[0],i=t[1],o=t[2];try{i.apply(e,o)}catch(t){setTimeout((()=>{throw t}))}}function is(t,e,i){Jr||(Jr=!0,requestAnimationFrame((function(){Jr=!1,function(t){for(;t.length;)es(t.shift())}($r),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)es(t.shift())}(ts)}))}))),ts.push([t,e,i])}
|
|
3325
3325
|
/**
|
|
3326
3326
|
* @license
|
|
3327
3327
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
@@ -3373,7 +3373,7 @@ class gs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3373
3373
|
* @license
|
|
3374
3374
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3375
3375
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3376
|
-
*/,
|
|
3376
|
+
*/,Is=f`
|
|
3377
3377
|
:host {
|
|
3378
3378
|
z-index: 200;
|
|
3379
3379
|
position: fixed;
|
|
@@ -3442,7 +3442,7 @@ class gs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t
|
|
|
3442
3442
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3443
3443
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3444
3444
|
*/
|
|
3445
|
-
gt("vaadin-date-picker-overlay",[
|
|
3445
|
+
gt("vaadin-date-picker-overlay",[Is,f`
|
|
3446
3446
|
[part='overlay'] {
|
|
3447
3447
|
display: flex;
|
|
3448
3448
|
flex: auto;
|
|
@@ -3457,7 +3457,7 @@ gt("vaadin-date-picker-overlay",[Ds,f`
|
|
|
3457
3457
|
outline: 3px solid;
|
|
3458
3458
|
}
|
|
3459
3459
|
}
|
|
3460
|
-
`],{moduleId:"vaadin-date-picker-overlay-styles"});class
|
|
3460
|
+
`],{moduleId:"vaadin-date-picker-overlay-styles"});class Ds extends(Ts(Es(ao(xt(Li))))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Gi`
|
|
3461
3461
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
3462
3462
|
<div part="overlay" id="overlay">
|
|
3463
3463
|
<div part="content" id="content">
|
|
@@ -3469,24 +3469,24 @@ gt("vaadin-date-picker-overlay",[Ds,f`
|
|
|
3469
3469
|
* @license
|
|
3470
3470
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3471
3471
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3472
|
-
*/l(
|
|
3472
|
+
*/l(Ds);const Gs=document.createElement("template");Gs.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class Fs extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Gs.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px",ss&&(this.$.scroller.tabIndex=-1))}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=$i.debounce(this._debouncerScrollFinish,Ki.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=$i.debounce(this._debouncerUpdateClones,Ki.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const o=`vaadin-infinite-scroller-item-content-${vo()}`,r=document.createElement("slot");r.setAttribute("name",o),r._itemWrapper=i,e.appendChild(r),i.setAttribute("slot",o),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=~~((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach(((i,o)=>{const s=i._itemWrapper;t&&!this._isVisible(s,e)||this._updateElement(s.instance,r+o)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
|
|
3473
3473
|
/**
|
|
3474
3474
|
* @license
|
|
3475
3475
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3476
3476
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3477
|
-
*/const
|
|
3477
|
+
*/const Ls=document.createElement("template");Ls.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",l(class extends Fs{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Ls.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Ms(e)}});
|
|
3478
3478
|
/**
|
|
3479
3479
|
* @license
|
|
3480
3480
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3481
3481
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3482
3482
|
*/
|
|
3483
|
-
const
|
|
3483
|
+
const Us=document.createElement("template");Us.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",l(class extends Fs{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Us.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
|
|
3484
3484
|
/**
|
|
3485
3485
|
* @license
|
|
3486
3486
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3487
3487
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3488
3488
|
*/
|
|
3489
|
-
class Bs extends(xt(
|
|
3489
|
+
class Bs extends(xt(Li)){static get is(){return"vaadin-date-picker-year"}static get template(){return Gi`
|
|
3490
3490
|
<style>
|
|
3491
3491
|
:host {
|
|
3492
3492
|
display: block;
|
|
@@ -3515,7 +3515,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3515
3515
|
Code distributed by Google as part of the polymer project is also
|
|
3516
3516
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3517
3517
|
*/
|
|
3518
|
-
let Ws=null;function Hs(){return Ws}Hs.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Hs,writable:!0}});const Ys=
|
|
3518
|
+
let Ws=null;function Hs(){return Ws}Hs.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Hs,writable:!0}});const Ys=Ii(Hs),Ks=Vs(Ys),Xs=Ii(class{});class Zs extends Xs{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let o=e[i];if(Boolean(t)!=Boolean(o.__hideTemplateChildren__))if(o.nodeType===Node.TEXT_NODE)t?(o.__polymerTextContent__=o.textContent,o.textContent=""):o.textContent=o.__polymerTextContent__;else if("slot"===o.localName)if(t)o.__polymerReplaced__=document.createComment("hidden-slot"),ce(ce(o).parentNode).replaceChild(o.__polymerReplaced__,o);else{const t=o.__polymerReplaced__;t&&ce(ce(t).parentNode).replaceChild(o,t)}else o.style&&(t?(o.__polymerDisplay__=o.style.display,o.style.display="none"):o.style.display=o.__polymerDisplay__);o.__hideTemplateChildren__=t,o._showHideChildren&&o._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const Qs=Vs(Zs);function Js(t){let e=t.__dataHost;return e&&e._methodHost||e}function $s(t,e){return function(t,i,o){e.call(t.__templatizeOwner,i.substring(6),o[i])}}function ta(t,e){return function(t,i,o){e.call(t.__templatizeOwner,t,i,o[i])}}function ea(t,e,i){if(Gt&&!Js(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let o=(e?e.constructor:Zs)._parseTemplate(t),r=o.templatizeInstanceClass;r||(r=function(t,e,i){let o=i.mutableData?Qs:Zs;ea.mixin&&(o=ea.mixin(o));let r=class extends o{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,o){let r=i.hostProps||{};for(let e in o.instanceProps){delete r[e];let i=o.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ta(0,i)})}if(o.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,o,i),o.templatizeInstanceClass=r);const s=Js(t);!function(t,e,i,o){let r=i.forwardHostProp;if(r&&e.hasHostProps){const s="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(s){let t=i.mutableData?Ks:Ys;class o extends t{}a=e.templatizeTemplateClass=o}else{const i=t.constructor;class o extends i{}a=e.templatizeTemplateClass=o}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:$s(0,r)}),a.prototype._createNotifyingProperty("_host_"+t);Ut&&o&&function(t,e,i){const o=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:s}=e;for(let t in r)if(!(o[t]||s&&s[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:o}=e[i].info;if(!o.signature||!o.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,o)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),s)!function(t,e){Ws=t,Object.setPrototypeOf(t,e.prototype),new e,Ws=null}(t,a),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,o,i,s);let a=class extends r{};return a.prototype._methodHost=s,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=o.hostProps,a}
|
|
3519
3519
|
/**
|
|
3520
3520
|
@license
|
|
3521
3521
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -3545,7 +3545,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
|
|
|
3545
3545
|
Code distributed by Google as part of the polymer project is also
|
|
3546
3546
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3547
3547
|
*/
|
|
3548
|
-
const na=qs(
|
|
3548
|
+
const na=qs(Li);class la extends na{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Ht,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(Lt&&!Ot){if(!aa){aa=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=ce(ce(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=ea(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let o,r=0;r<i.length&&(o=i[r]);r++)o.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((o=this.as)===(r=e)||me(o,r)||pe(o,r)){let o=t[this.itemsIndexAs];e==this.as&&(this.items[o]=i);let r=fe(this.as,`${JSCompiler_renameProperty("items",this)}.${o}`,e);this.notifyPath(r,i)}var o,r}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=ia.debounce(this.__renderDebouncer,e>0?ze.after(e):Ne,t.bind(this)),oa.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),sa()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),i=this.__calculateLimit(e.length);this.__updateInstances(t,i,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>{this.__chunkingId=null,this.__continueChunking()}))),this._setRenderedItemCount(this.__instances.length),Ht&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,o)=>this.__filterFn(t[e],i,o)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let e=this.__instances[r],s=i[r],a=t[s];o[s]=r,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,s),e._flushProperties()):this.__insertInstance(a,r,s)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=ce(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],s=r?r.children[0]:this;return ce(ce(this).parentNode).insertBefore(o.root,s),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let t=o<0?"":i.substring(o+1);this.__handleObservedPaths(t);let s=this.__instances[this.__itemsIdxToInstIdx[r]];return s&&(s._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),s._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=ce(e).parentNode;return null}(this.template,t)}}customElements.define(la.is,la);
|
|
3549
3549
|
/**
|
|
3550
3550
|
* @license
|
|
3551
3551
|
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
@@ -3624,7 +3624,7 @@ gt("vaadin-month-calendar",f`
|
|
|
3624
3624
|
outline: 3px solid;
|
|
3625
3625
|
}
|
|
3626
3626
|
}
|
|
3627
|
-
`,{moduleId:"vaadin-month-calendar-styles"});class ca extends(ha(xt(
|
|
3627
|
+
`,{moduleId:"vaadin-month-calendar-styles"});class ca extends(ha(xt(Li))){static get template(){return Gi`
|
|
3628
3628
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
3629
3629
|
<table
|
|
3630
3630
|
id="monthGrid"
|
|
@@ -3748,7 +3748,7 @@ gt("vaadin-date-picker-overlay-content",f`
|
|
|
3748
3748
|
z-index: 2;
|
|
3749
3749
|
flex-shrink: 0;
|
|
3750
3750
|
}
|
|
3751
|
-
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class ma extends(da(mr(xt(ao(
|
|
3751
|
+
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class ma extends(da(mr(xt(ao(Li))))){static get template(){return Gi`
|
|
3752
3752
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
3753
3753
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
3754
3754
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -3774,12 +3774,12 @@ gt("vaadin-date-picker-overlay-content",f`
|
|
|
3774
3774
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3775
3775
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3776
3776
|
*/
|
|
3777
|
-
const pa=new WeakMap,fa=Xt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return pa.has(t)||pa.set(t,new Set),pa.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),va=t=>class extends(cr(
|
|
3777
|
+
const pa=new WeakMap,fa=Xt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return pa.has(t)||pa.set(t,new Set),pa.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),va=t=>class extends(cr(Jo(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),hs||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
|
|
3778
3778
|
/**
|
|
3779
3779
|
* @license
|
|
3780
3780
|
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3781
3781
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3782
|
-
*/,ga=Xt((t=>class extends(hr(
|
|
3782
|
+
*/,ga=Xt((t=>class extends(hr(Dr(cr(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),o=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():o&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),ba=t=>class extends(fa(lr(ga(zr(va(Jo(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=$i.debounce(this._preventInputDebouncer,Ki.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
|
|
3783
3783
|
/**
|
|
3784
3784
|
* @license
|
|
3785
3785
|
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
@@ -3864,7 +3864,7 @@ const pa=new WeakMap,fa=Xt((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(_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(Rs(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(Jo(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(Rs(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.
|
|
@@ -3888,7 +3888,7 @@ gt("vaadin-date-picker",[ya,f`
|
|
|
3888
3888
|
direction: rtl;
|
|
3889
3889
|
text-align: left;
|
|
3890
3890
|
}
|
|
3891
|
-
`],{moduleId:"vaadin-date-picker-styles"});class ka extends(xa(ba(xt(ho(
|
|
3891
|
+
`],{moduleId:"vaadin-date-picker-styles"});class ka extends(xa(ba(xt(ho(Li))))){static get is(){return"vaadin-date-picker"}static get template(){return Gi`
|
|
3892
3892
|
<div class="vaadin-date-picker-container">
|
|
3893
3893
|
<div part="label">
|
|
3894
3894
|
<slot name="label"></slot>
|
|
@@ -3930,7 +3930,7 @@ gt("vaadin-date-picker",[ya,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 Ta(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 Da(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 Ia(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=Da(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Da(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=Da(e).getTime()-function(t){Aa(1,arguments);var e=Ia(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Da(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ra(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 Ma(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=Ra(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ra(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=Ra(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=Ma(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ra(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)},Ua=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Ga(i+1,2)},La=function(t,e){return Ga(t.getUTCDate(),e.length)},Ba=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},ja=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)},Wa=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ha(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 Xa={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=Ma(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(Ia(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 Ua(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"}):La(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 Ba(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ja(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 Wa(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"+Ha(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"+Ha(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 Za=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 Za(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}}",Za(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=Ta(S,tn(S)),T={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=Xa[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,T);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 Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function Dn(t){var e=Tn();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 In(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 Rn(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 Mn=function(){function t(){In(this,t),Rn(this,"priority",void 0),Rn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Mn);var t=Dn(e);function e(i,o,r,s,a){var n;return In(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,Mn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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(){In(this,t),Rn(this,"incompatibleTokens",void 0),Rn(this,"priority",void 0),Rn(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}(),Un=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Rn(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}(),Ln=/^(1[0-2]|0?\d)/,Bn=/^(3[0-1]|[0-2]?\d)/,jn=/^(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)/,Wn=/^(2[0-4]|[0-1]?\d)/,Hn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Xn=/^[0-5]?\d/,Zn=/^\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(Zn,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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=Ma(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(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),Ra(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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),Da(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Rn(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(Ln,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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Rn(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(Ln,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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(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 Ra(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}(),Tl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(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 Da(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}(),Dl=[31,28,31,30,31,30,31,31,30,31,30,31],Il=[31,29,31,30,31,30,31,31,30,31,30,31],zl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subPriority",1),Rn(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(Bn,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<=Il[o]:e>=1&&e<=Dl[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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subpriority",1),Rn(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(jn,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 Rl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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}(),Ml=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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}(),Ul=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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}(),Ll=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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}(),Bl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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}(),jl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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(Hn,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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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(Wn,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}(),Wl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Rn(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}(),Hl=function(){Sn(e,Fn);var t=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Xn,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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Rn(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=Dn(e);function e(){var i;In(this,e);for(var o=arguments.length,r=new Array(o),s=0;s<o;s++)r[s]=arguments[s];return Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Rn(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 Un,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 Tl,d:new zl,D:new Nl,E:new Rl,e:new Ml,c:new Pl,i:new Gl,a:new Fl,b:new Ul,B:new Ll,h:new Bl,H:new jl,K:new Vl,k:new ql,m:new Wl,s:new Hl,S:new Yl,X:new Kl,x:new Xl,t:new Zl,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 T,D={firstWeekContainsDate:S,weekStartsOn:C,locale:A},I=[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 R=function(){var e=T.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,D);if(!n)return{v:new Date(NaN)};I.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();!(T=O.n()).done;){var M=R();if("object"===Ea(M))return M.v}}catch(t){O.e(t)}finally{O.f()}if(x.length>0&&oh.test(x))return new Date(NaN);var P=I.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 I.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,U=Ta(G,tn(G)),L={},B=xn(P);try{for(B.s();!(F=B.n()).done;){var j=F.value;if(!j.validate(U,D))return new Date(NaN);var V=j.set(U,L,D);Array.isArray(V)?(U=V[0],kn(L,V[1])):U=V}}catch(t){B.e(t)}finally{B.f()}return U}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=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())}};ch.style=":host{display:block;height:100%}";const uh={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_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.",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_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.",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_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.",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_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.",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_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.",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.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},dh=(t,e,i)=>{let o=uh[uh[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},mh=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.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)}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(){this.registerCredentialsEvent=new CustomEvent("RegisterCredentials",{bubbles:!0,detail:{userNameEmail:this.registrationStepsState.Step1.registerUserData.Email.value,userPassword:this.registrationStepsState.Step1.registerUserData.Password.value}}),window.dispatchEvent(this.registerCredentialsEvent)}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].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)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[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)}))}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]=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?dh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("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"),this.setRegister()):(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:dh(`${this.errorCode}`,this.language)||dh("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:dh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;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,o,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var o,r;t.push({name:i.name,value:"checkbox"==(null===(o=i.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(o=e.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":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.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])uh[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){uh[uh[this.language]?this.language:"en"][t.name]&&Object.keys(uh[this.language][t.name]).forEach((e=>{t[e]=uh[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.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}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},dh(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)},dh("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"]}}};mh.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 ph=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"]}}};ph.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 Ta(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 Ia(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=Ia(o),s=new Date(0);s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0);var a=Ia(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=Ia(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),Ia(i)}(e).getTime();return Math.round(i/6048e5)+1}var Na={};function Oa(){return Na}function Ra(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 Ma(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=Ra(p,e),v=new Date(0);v.setUTCFullYear(u,0,m),v.setUTCHours(0,0,0,0);var g=Ra(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=Ra(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=Ma(t,e),m=new Date(0);return m.setUTCFullYear(d,0,u),m.setUTCHours(0,0,0,0),Ra(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)},Ba=function(t,e){return Ga(t.getUTCHours()%12||12,e.length)},ja=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)},Wa=function(t,e){var i=e.length,o=t.getUTCMilliseconds();return Ga(Math.floor(o*Math.pow(10,i-3)),e.length)};function Ha(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 Xa={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=Ma(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 Ba(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ja(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 Wa(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"+Ha(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"+Ha(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 Za=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"})}},Qa=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"})}},Ja={p:Qa,P:function(t,e){var i,o=t.match(/(P+)(p+)?/)||[],r=o[1],s=o[2];if(!s)return Za(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}}",Za(r,e)).replace("{{time}}",Qa(s,e))}};const $a=Ja;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=Ta(S,tn(S)),T={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=Xa[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,T);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 Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function In(t){var e=Tn();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 Rn(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 Mn=function(){function t(){Dn(this,t),Rn(this,"priority",void 0),Rn(this,"subPriority",0)}return On(t,[{key:"validate",value:function(){return!0}}]),t}(),Pn=function(){Sn(e,Mn);var t=In(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,Mn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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),Rn(this,"incompatibleTokens",void 0),Rn(this,"priority",void 0),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",140),Rn(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)/,Bn=/^(3[0-1]|[0-2]?\d)/,jn=/^(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)/,Wn=/^(2[0-4]|[0-1]?\d)/,Hn=/^(1[0-1]|0?\d)/,Yn=/^(1[0-2]|0?\d)/,Kn=/^[0-5]?\d/,Xn=/^[0-5]?\d/,Zn=/^\d/,Qn=/^\d{1,2}/,Jn=/^\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(Zn,e);case 2:return ul(Qn,e);case 3:return ul(Jn,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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=Ma(t,o);if(i.isTwoDigitYear){var s=gl(i.year,r);return t.setUTCFullYear(s,0,o.firstWeekContainsDate),t.setUTCHours(0,0,0,0),Ra(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),Ra(t,o)}}]),e}(),wl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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),Ia(o)}}]),e}(),xl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",130),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",120),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",110),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(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 Ra(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}(),Tl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",100),Rn(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 Ia(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}(),Il=[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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subPriority",1),Rn(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(Bn,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<=Il[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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(En(i),"subpriority",1),Rn(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(jn,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 Rl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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}(),Ml=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",90),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",80),Rn(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}(),Bl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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}(),jl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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(Hn,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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",70),Rn(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(Wn,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}(),Wl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",60),Rn(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}(),Hl=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",50),Rn(En(i),"incompatibleTokens",["t","T"]),i}return On(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return ul(Xn,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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",30),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",10),Rn(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=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",40),Rn(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}(),Ql=function(){Sn(e,Fn);var t=In(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 Rn(En(i=t.call.apply(t,[this].concat(r))),"priority",20),Rn(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}(),Jl={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 Tl,d:new zl,D:new Nl,E:new Rl,e:new Ml,c:new Pl,i:new Gl,a:new Fl,b:new Ll,B:new Ul,h:new Bl,H:new jl,K:new Vl,k:new ql,m:new Wl,s:new Hl,S:new Yl,X:new Kl,x:new Xl,t:new Zl,T:new Ql},$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 T,I={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 R=function(){var e=T.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=Jl[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,I);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();!(T=O.n()).done;){var M=R();if("object"===Ea(M))return M.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=Ta(G,tn(G)),U={},B=xn(P);try{for(B.s();!(F=B.n()).done;){var j=F.value;if(!j.validate(L,I))return new Date(NaN);var V=j.set(L,U,I);Array.isArray(V)?(L=V[0],kn(U,V[1])):L=V}}catch(t){B.e(t)}finally{B.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=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())}};ch.style=":host{display:block;height:100%}";const uh={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",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",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",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",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",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.",generalError:"Something went wrong... Please try again.",successMessage:"Register successful"}},dh=(t,e,i)=>{let o=uh[uh[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},mh=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.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)}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){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs,this.registrationStepsState[this.registrationStep].actions=this.listOfActions,this.registrationStepsState[this.registrationStep].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)),{})),localStorage.setItem("registrationStepsState",JSON.stringify(this.registrationStepsState));break;case"get":const e=JSON.parse(localStorage.getItem("registrationStepsState"));if(!e)return;if("inputs"==t.type&&(this.listOfInputs=this.registrationStepsState[this.registrationStep].fields,this.listOfActions=this.registrationStepsState[this.registrationStep].actions,this.listOfInputValidity=this.registrationStepsState[this.registrationStep].fieldsValidity),"values"==t.type){const t=e[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)}))}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]=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?dh(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:dh(`${this.errorCode}`,this.language)||dh("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"),this.setRegister()):(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:dh(`${this.errorCode}`,this.language)||dh("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:dh("successMessage",this.language)}},window.location.href))})).catch((t=>{this.isLoading=!1,console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){var e;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,o,r;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var o,r;t.push({name:i.name,value:"checkbox"==(null===(o=i.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(o=e.inputType)||void 0===o?void 0:o.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"checkboxgroup":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.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])uh[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){uh[uh[this.language]?this.language:"en"][t.name]&&Object.keys(uh[this.language][t.name]).forEach((e=>{t[e]=uh[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.buttonInsideForm&&this.renderButtons(),i("div",{class:"registration__wrapper--flex"},i("p",{class:"registration__error-message",innerHTML:this.errorMessage})))))}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},dh(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)},dh("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"]}}};mh.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 ph=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"]}}};ph.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.
|
|
@@ -4726,7 +4726,7 @@ const xh=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",ya,{moduleId:"vaadin-text-field-styles"});class Eh extends(kh(xt(ho(
|
|
4729
|
+
*/;gt("vaadin-text-field",ya,{moduleId:"vaadin-text-field-styles"});class Eh extends(kh(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;
|
|
@@ -4774,7 +4774,7 @@ const xh=t=>class extends(ba(t)){static get properties(){return{autocomplete:{ty
|
|
|
4774
4774
|
background: transparent;
|
|
4775
4775
|
outline: none;
|
|
4776
4776
|
}
|
|
4777
|
-
`],{moduleId:"lumo-password-field-button"}),gt("vaadin-password-field",[
|
|
4777
|
+
`],{moduleId:"lumo-password-field-button"}),gt("vaadin-password-field",[Qr,f`
|
|
4778
4778
|
[part='reveal-button']::before {
|
|
4779
4779
|
content: var(--lumo-icons-eye);
|
|
4780
4780
|
}
|
|
@@ -4825,12 +4825,12 @@ const Ah=Gi`
|
|
|
4825
4825
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
4826
4826
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4827
4827
|
*/
|
|
4828
|
-
class
|
|
4828
|
+
class Ih extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}l(Ih);const Dh=(t,...e)=>{kt(`lumo-${t}`,e)};
|
|
4829
4829
|
/**
|
|
4830
4830
|
* @license
|
|
4831
4831
|
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
4832
4832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
4833
|
-
*/
|
|
4833
|
+
*/Dh("font-icons",f`
|
|
4834
4834
|
@font-face {
|
|
4835
4835
|
font-family: 'lumo-icons';
|
|
4836
4836
|
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==)
|
|
@@ -4883,7 +4883,7 @@ class Dh extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4883
4883
|
--lumo-icons-upload: '\\ea29';
|
|
4884
4884
|
--lumo-icons-user: '\\ea2a';
|
|
4885
4885
|
}
|
|
4886
|
-
`),
|
|
4886
|
+
`),Dh("sizing-props",f`
|
|
4887
4887
|
:host {
|
|
4888
4888
|
--lumo-size-xs: 1.625rem;
|
|
4889
4889
|
--lumo-size-s: 1.875rem;
|
|
@@ -4898,7 +4898,7 @@ class Dh extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4898
4898
|
/* For backwards compatibility */
|
|
4899
4899
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
4900
4900
|
}
|
|
4901
|
-
`),
|
|
4901
|
+
`),Dh("spacing-props",f`
|
|
4902
4902
|
:host {
|
|
4903
4903
|
/* Square */
|
|
4904
4904
|
--lumo-space-xs: 0.25rem;
|
|
@@ -4927,7 +4927,7 @@ class Dh extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static g
|
|
|
4927
4927
|
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
4928
4928
|
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
4929
4929
|
}
|
|
4930
|
-
`,
|
|
4930
|
+
`,Dh("style-props",f`
|
|
4931
4931
|
:host {
|
|
4932
4932
|
/* Border radius */
|
|
4933
4933
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -5062,7 +5062,7 @@ const zh=f`
|
|
|
5062
5062
|
border-left: none;
|
|
5063
5063
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
5064
5064
|
}
|
|
5065
|
-
`,{moduleId:"lumo-typography"}),
|
|
5065
|
+
`,{moduleId:"lumo-typography"}),Dh("typography-props",zh);const Nh=f`
|
|
5066
5066
|
:host {
|
|
5067
5067
|
display: flex;
|
|
5068
5068
|
align-items: center;
|
|
@@ -5153,7 +5153,7 @@ const zh=f`
|
|
|
5153
5153
|
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
5154
5154
|
}
|
|
5155
5155
|
}
|
|
5156
|
-
`],{moduleId:"lumo-combo-box-item"}),gt("vaadin-combo-box-overlay",[Ur,
|
|
5156
|
+
`],{moduleId:"lumo-combo-box-item"}),gt("vaadin-combo-box-overlay",[Lr,Ur,f`
|
|
5157
5157
|
[part='content'] {
|
|
5158
5158
|
padding: 0;
|
|
5159
5159
|
}
|
|
@@ -5238,7 +5238,7 @@ const zh=f`
|
|
|
5238
5238
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
5239
5239
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
5240
5240
|
}
|
|
5241
|
-
`],{moduleId:"lumo-combo-box-overlay"}),gt("vaadin-combo-box",[
|
|
5241
|
+
`],{moduleId:"lumo-combo-box-overlay"}),gt("vaadin-combo-box",[Qr,f`
|
|
5242
5242
|
:host {
|
|
5243
5243
|
outline: none;
|
|
5244
5244
|
}
|
|
@@ -5257,7 +5257,7 @@ const Oh=t=>class extends t{static get properties(){return{index:{type:Number},i
|
|
|
5257
5257
|
* @license
|
|
5258
5258
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
5259
5259
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5260
|
-
*/;class Rh extends(Oh(xt(ao(
|
|
5260
|
+
*/;class Rh extends(Oh(xt(ao(Li)))){static get template(){return Gi`
|
|
5261
5261
|
<style>
|
|
5262
5262
|
:host {
|
|
5263
5263
|
display: block;
|
|
@@ -5282,7 +5282,7 @@ const Mh=t=>class extends(Ts(t)){static get observers(){return["_setOverlayWidth
|
|
|
5282
5282
|
* @license
|
|
5283
5283
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
5284
5284
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5285
|
-
*/;gt("vaadin-combo-box-overlay",[
|
|
5285
|
+
*/;gt("vaadin-combo-box-overlay",[Is,f`
|
|
5286
5286
|
#overlay {
|
|
5287
5287
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
5288
5288
|
}
|
|
@@ -5292,7 +5292,7 @@ const Mh=t=>class extends(Ts(t)){static get observers(){return["_setOverlayWidth
|
|
|
5292
5292
|
flex-direction: column;
|
|
5293
5293
|
height: 100%;
|
|
5294
5294
|
}
|
|
5295
|
-
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Ph extends(Mh(Es(ao(xt(
|
|
5295
|
+
`],{moduleId:"vaadin-combo-box-overlay-styles"});class Ph extends(Mh(Es(ao(xt(Li))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Gi`
|
|
5296
5296
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
5297
5297
|
<div part="overlay" id="overlay">
|
|
5298
5298
|
<div part="loader"></div>
|
|
@@ -5313,7 +5313,7 @@ function Gh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
5313
5313
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
5314
5314
|
* Code distributed by Google as part of the polymer project is also
|
|
5315
5315
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
5316
|
-
*/l(Ph);const Fh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Uh=Fh&&Fh[1]>=8,Lh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,o)=>{e<this._scrollBottom&&(t=o),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Ji)}},_getReusables(t){let e,i,o;const r=[],s=this._hiddenContentSize*this._ratio,a=this._virtualStart,n=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,u=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-u);o=this._getPhysicalSizeIncrement(e),i-=o,!(r.length>=l||i<=s);)if(t){if(n+r.length+1>=this._virtualCount)break;if(h+o>=c-this._scrollOffset)break;r.push(e),h+=o,e=(e+1)%l}else{if(a-r.length<=0)break;if(h+this._physicalSize-o<=u)break;r.push(e),h-=o,e=0===e?l-1:e-1}return{indexes:r,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Zi):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Ji))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Xi))},_iterateItems(t,e){let i,o,r,s;if(2===arguments.length&&e){for(s=0;s<e.length;s++)if(i=e[s],o=this._computeVidx(i),null!=(r=t.call(this,i,o)))return r}else{for(i=this._physicalStart,o=this._virtualStart;i<this._physicalCount;i++,o++)if(null!=(r=t.call(this,i,o)))return r;for(i=0;i<this._physicalStart;i++,o++)if(null!=(r=t.call(this,i,o)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Uh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(io(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,o=0;const r=this._hiddenContentSize;for(;i<t&&o<=r;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Xi)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=$i.debounce(this._debouncers[t],i,e.bind(this)),to(this._debouncers[t])}},Bh=1e3;class jh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:s}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=s,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<Bh?(i=t,this._vidxOffset=0):(i=Bh,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),io(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o))})),this.__afterElementsUpdated(i)}_updateMetrics(t){io();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.style.paddingTop&&(t.style.paddingTop=""),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,this.__placeholderClearDebouncer=$i.debounce(this.__placeholderClearDebouncer,Xi,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}}))}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){t!==this.size&&(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__size=t,this._physicalItems?(this._updateScrollerSize(),this._virtualCount=this.items.length,this._render()):(this._itemsChanged({path:"items"}),this.__preventElementUpdates=!0,io(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),io())}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const o=this._physicalItems[t];o.hidden=i>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),e.push(o))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=$i.debounce(this.__fixInvalidItemPositioningDebouncer,Ki.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=$i.debounce(this.__scrollReorderDebouncer,Ki.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=$i.debounce(this.__debouncerWheelAnimationFrame,Xi,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=$i.debounce(this._debouncerIgnoreNewWheel,Ki.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(ls){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight);this._vidxOffset=Math.round(t*this.size-t*this._virtualCount)}else{const t=this._vidxOffset,e=Bh,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const o=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(jh.prototype,Lh);class Vh{constructor(t){this.__adapter=new jh(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
|
|
5316
|
+
*/l(Ph);const Fh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Lh=Fh&&Fh[1]>=8,Uh={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,o)=>{e<this._scrollBottom&&(t=o),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Qi)}},_getReusables(t){let e,i,o;const r=[],s=this._hiddenContentSize*this._ratio,a=this._virtualStart,n=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,u=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-u);o=this._getPhysicalSizeIncrement(e),i-=o,!(r.length>=l||i<=s);)if(t){if(n+r.length+1>=this._virtualCount)break;if(h+o>=c-this._scrollOffset)break;r.push(e),h+=o,e=(e+1)%l}else{if(a-r.length<=0)break;if(h+this._physicalSize-o<=u)break;r.push(e),h-=o,e=0===e?l-1:e-1}return{indexes:r,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Zi):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Qi))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Xi))},_iterateItems(t,e){let i,o,r,s;if(2===arguments.length&&e){for(s=0;s<e.length;s++)if(i=e[s],o=this._computeVidx(i),null!=(r=t.call(this,i,o)))return r}else{for(i=this._physicalStart,o=this._virtualStart;i<this._physicalCount;i++,o++)if(null!=(r=t.call(this,i,o)))return r;for(i=0;i<this._physicalStart;i++,o++)if(null!=(r=t.call(this,i,o)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Lh&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(io(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,o=0;const r=this._hiddenContentSize;for(;i<t&&o<=r;)o+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+o),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),Xi)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=$i.debounce(this._debouncers[t],i,e.bind(this)),to(this._debouncers[t])}},Bh=1e3;class jh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:s}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=s,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<Bh?(i=t,this._vidxOffset=0):(i=Bh,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),io(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o))})),this.__afterElementsUpdated(i)}_updateMetrics(t){io();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.style.paddingTop&&(t.style.paddingTop=""),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,this.__placeholderClearDebouncer=$i.debounce(this.__placeholderClearDebouncer,Xi,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}}))}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){t!==this.size&&(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__size=t,this._physicalItems?(this._updateScrollerSize(),this._virtualCount=this.items.length,this._render()):(this._itemsChanged({path:"items"}),this.__preventElementUpdates=!0,io(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),io())}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const o=this._physicalItems[t];o.hidden=i>=this.size,o.hidden?delete o.__lastUpdatedIndex:(o.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(o,o.__virtualIndex),e.push(o))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=$i.debounce(this.__fixInvalidItemPositioningDebouncer,Ki.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=$i.debounce(this.__scrollReorderDebouncer,Ki.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalBottom<this._scrollBottom;if(this._physicalTop>this._scrollTop&&0!==this.adjustedFirstVisibleIndex||t&&this.adjustedLastVisibleIndex!==this.size-1){const e=t,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(e?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=$i.debounce(this.__debouncerWheelAnimationFrame,Xi,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=$i.debounce(this._debouncerIgnoreNewWheel,Ki.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage);super._increasePoolIfNeeded(Math.max(t,Math.min(100,e-this._physicalCount)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(ls){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight);this._vidxOffset=Math.round(t*this.size-t*this._virtualCount)}else{const t=this._vidxOffset,e=Bh,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const o=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(jh.prototype,Uh);class Vh{constructor(t){this.__adapter=new jh(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
|
|
5317
5317
|
/**
|
|
5318
5318
|
* @license
|
|
5319
5319
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
@@ -5328,7 +5328,7 @@ function Gh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
|
5328
5328
|
* @license
|
|
5329
5329
|
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
5330
5330
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5331
|
-
*/class Hh extends(Wh(
|
|
5331
|
+
*/class Hh extends(Wh(Li)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Gi`
|
|
5332
5332
|
<style>
|
|
5333
5333
|
:host {
|
|
5334
5334
|
display: block;
|
|
@@ -5377,12 +5377,12 @@ const Yh=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 Xh(t){return null!=t}function Zh(t,e){return t.findIndex((t=>!(t instanceof qh)&&e(t)))}const Jh=t=>class extends(_a(mr(Ir(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?Gh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Gh(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||(Xh(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&&Xh(e)?Zh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Zh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof qh||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 Xh(t){return null!=t}function Zh(t,e){return t.findIndex((t=>!(t instanceof qh)&&e(t)))}const Qh=t=>class extends(_a(mr(Dr(ar(Jo(cr(Qo(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?Gh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Gh(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||(Xh(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&&Xh(e)?Zh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Zh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof qh||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",ya,{moduleId:"vaadin-combo-box-styles"});class
|
|
5385
|
+
*/;gt("vaadin-combo-box",ya,{moduleId:"vaadin-combo-box-styles"});class Jh extends(Kh(Qh(Yh(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;
|
|
@@ -5428,4 +5428,4 @@ function Xh(t){return null!=t}function Zh(t,e){return t.findIndex((t=>!(t instan
|
|
|
5428
5428
|
></vaadin-combo-box-overlay>
|
|
5429
5429
|
|
|
5430
5430
|
<slot name="tooltip"></slot>
|
|
5431
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}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._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}l(Qh);const $h=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!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.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],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)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}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.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__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:"c235991f572ea3f8659f66d660fd1fb41b0094ad",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"50931d2e1345bb8337820409a6aff2eee4d33cd5",class:"select__wrapper--flex"},i("label",{key:"28a05e2a88132fb8ad279ec0fbc0d49253d3ffbc",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"1d53254871214080c3f1d25c73380a9b9df19aab",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"020465f83dd9a03a37b223521bfce37a66df818d",class:"select__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"bbf7aff9102f6c849c84ff7cb390ed57e5b992b2",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{key:"4cda22e9fdccb3960107a661fa24649946d6bb14",class:"select__error-message"},this.errorMessage))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$h.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__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))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emfe-w-color-black, #000000)}.select__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-color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__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}.select__tooltip.visible{opacity:1}';const tc=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.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},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.touched=!0,this.errorMessage=this.setErrorMessage()},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.showLabels=void 0,this.action=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.isValid=void 0,this.errorMessage=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,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}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(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}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,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}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.tooShort||this.inputReference.validity.tooLong?a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__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:"5febd36c339710683111039d477196daac87853c",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"fb779beee03992b23478ffcaac85095420048ceb",class:"tel__wrapper--flex-label"},i("label",{key:"5b69271c1c8bf403a003d765adb40a553e09466e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"040c487308231459fc92eba2e643a80639df09d6",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"91efd4656c718c75e5047413daf10c22c37e8f93",class:"tel__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"6215f80b6bccb3dfb03dbbc485c850725633627c",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"3b7b1ef3415619c51d74f5fc7c5e034acb8f037f",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"886553206896c367ba96f015d81b44ea86f741ea",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"d4c88d386c3342c789527d925e9cd061494b785c",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};tc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__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))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emfe-w-color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));background-color:var(--emfe-w-color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emfe-w-color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__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}.tel__tooltip.visible{opacity:1}';const ec=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,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.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},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="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",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,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}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}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.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:"text__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:"bfb803110a70b89dd484e993c204b572f0115a17",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab",class:"text__wrapper--flex"},i("label",{key:"05cf07855121a79641475a5b020774cf8120d1ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"f8c48a999f6827a61ec392ce99858c19559c77d2",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"e866f1df104ce57c29164e73b4ad4d017c7201cd",class:"text__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"d761c265b1487fe73af54568b6da7fed82656b8d",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"5c8df34dd47959eb1668cdf389524d145c69fa84",class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ec.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__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))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__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}.text__tooltip.visible{opacity:1}';const ic=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.options=void 0,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,this.showFields=void 0}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)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity()}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return a("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"d5a645fdc3409f4efdc3319c07cded8c1931991c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c18e410777502b3609dd0872487cc8281e1adf25",class:"togglecheckbox__wrapper--flex"},i("input",{key:"7c2f6204300b5c046c9ad909089619f39f6cda83",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=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:"24e57e5a5dd20e5f646a69c4fa0c0bbbe38aba1f",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"eea41bc49a5c572d86a595880d4c60093f15156e",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"bb093e1c928cf87ea69a2c49a784395bd82e542e",class:"togglecheckbox__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"eda4df7b1669eca99d4013877e2ef082ea54984c",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder})))))}};ic.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__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}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__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}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';export{Or as checkbox_group_input,Rr as checkbox_input,lh as date_input,hh as email_input,ch as general_input,mh as general_registration,ph as number_input,Ch as password_input,Th as radio_input,$h as select_input,tc as tel_input,ec as text_input,ic as toggle_checkbox_input}
|
|
5431
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}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._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}l(Jh);const $h=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.touched=!1,this.handleChange=t=>{this.touched=!0;const e=t.target.value,i=this.options.find((t=>t.value.toLowerCase()===e.toLowerCase()));this.value=i?i.value:e,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!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.action=void 0,this.defaultValue="",this.autofilled=void 0,this.tooltip=void 0,this.options=[],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)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}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.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return a("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__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:"c235991f572ea3f8659f66d660fd1fb41b0094ad",class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"50931d2e1345bb8337820409a6aff2eee4d33cd5",class:"select__wrapper--flex"},i("label",{key:"28a05e2a88132fb8ad279ec0fbc0d49253d3ffbc",class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{key:"1d53254871214080c3f1d25c73380a9b9df19aab",class:"select__wrapper--relative"},this.tooltip&&i("img",{key:"020465f83dd9a03a37b223521bfce37a66df818d",class:"select__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{key:"bbf7aff9102f6c849c84ff7cb390ed57e5b992b2",name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{key:"4cda22e9fdccb3960107a661fa24649946d6bb14",class:"select__error-message"},this.errorMessage))}get element(){return o(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$h.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}:host{height:100%}vaadin-combo-box>input{background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));font-weight:300;font-size:16px;-webkit-font-smoothing:initial;}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.select__wrapper--autofilled .select__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__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))}.select__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.select__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:var(--emfe-w-color-black, #000000)}.select__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-color-black, #000000);font-family:inherit;font-style:normal;font-size:16px;font-weight:300;line-height:1.5;padding:0;height:44px}.select__input::part(toggle-button){position:relative;right:10px}.select__input>input{padding:5px 15px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.select__tooltip-icon{width:16px;height:auto}.select__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}.select__tooltip.visible{opacity:1}';const tc=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.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},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.touched=!0,this.errorMessage=this.setErrorMessage()},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.showLabels=void 0,this.action=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.isValid=void 0,this.errorMessage=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,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}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(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}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,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}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.tooShort||this.inputReference.validity.tooLong?a("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?a("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__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:"5febd36c339710683111039d477196daac87853c",class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"fb779beee03992b23478ffcaac85095420048ceb",class:"tel__wrapper--flex-label"},i("label",{key:"5b69271c1c8bf403a003d765adb40a553e09466e",class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"040c487308231459fc92eba2e643a80639df09d6",class:"tel__wrapper--relative"},this.tooltip&&i("img",{key:"91efd4656c718c75e5047413daf10c22c37e8f93",class:"tel__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{key:"6215f80b6bccb3dfb03dbbc485c850725633627c",class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{key:"3b7b1ef3415619c51d74f5fc7c5e034acb8f037f",class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{key:"886553206896c367ba96f015d81b44ea86f741ea",type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{key:"d4c88d386c3342c789527d925e9cd061494b785c",class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};tc.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__wrapper--autofilled .tel__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.tel__wrapper--flex{width:inherit;display:flex;align-items:center;border-radius:4px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);overflow:hidden}.tel__wrapper--flex:focus-within{border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.tel__wrapper--flex--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__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))}.tel__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.tel__prefix{--vaadin-field-default-width:90px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 5px 5px 0;background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;border:none;border-right:2px solid #DDE0EE;border-image-source:linear-gradient(to bottom, rgba(221, 224, 238, 0) 25%, rgb(221, 224, 238) 25%, rgb(221, 224, 238) 75%, rgba(221, 224, 238, 0) 75%);border-image-slice:1;border-image-repeat:round}.tel__prefix::part(input-field):hover{background-color:var(--emfe-w-color-white, #FFFFFF)}.tel__prefix::part(toggle-button){color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.tel__input{font-family:inherit;border-radius:5px;width:100%;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));background-color:var(--emfe-w-color-white, #FFFFFF);border:none;width:inherit;position:relative;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px;height:42px;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input::placeholder{color:var(--emfe-w-color-gray-150, #979797)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.tel__tooltip-icon{width:16px;height:auto}.tel__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}.tel__tooltip.visible{opacity:1}';const ec=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.value="",this.validationPattern="",this.duplicateInputValue=null,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.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},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="",this.autofilled=void 0,this.tooltip=void 0,this.language=void 0,this.checkValidity=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.isValid=void 0,this.errorMessage="",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,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}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}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.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:"text__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:"bfb803110a70b89dd484e993c204b572f0115a17",class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{key:"6e9f8f5aada98821d5dc78ccb8b1431ba23b81ab",class:"text__wrapper--flex"},i("label",{key:"05cf07855121a79641475a5b020774cf8120d1ed",class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{key:"f8c48a999f6827a61ec392ce99858c19559c77d2",class:"text__wrapper--relative"},this.tooltip&&i("img",{key:"e866f1df104ce57c29164e73b4ad4d017c7201cd",class:"text__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{key:"d761c265b1487fe73af54568b6da7fed82656b8d",name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{key:"5c8df34dd47959eb1668cdf389524d145c69fa84",class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ec.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.text__wrapper--autofilled .text__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__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))}.text__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.text__input{font-family:inherit;width:100%;height:44px;border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);background-color:var(--emfe-w-color-white, #FFFFFF);color:var(--emfe-w-color-black, #000000);border-radius:5px;font-size:16px;font-weight:300;line-height:1.5;padding:5px 15px}.text__input:focus{border:1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.text__input--invalid{border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__input::placeholder{color:var(--emfe-w-color-gray-150, #828282)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.text__tooltip-icon{width:16px;height:auto}.text__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}.text__tooltip.visible{opacity:1}';const ic=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.options=void 0,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,this.showFields=void 0}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)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity()}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return a("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{key:"d5a645fdc3409f4efdc3319c07cded8c1931991c",class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{key:"c18e410777502b3609dd0872487cc8281e1adf25",class:"togglecheckbox__wrapper--flex"},i("input",{key:"7c2f6204300b5c046c9ad909089619f39f6cda83",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.checkboxReference=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:"24e57e5a5dd20e5f646a69c4fa0c0bbbe38aba1f",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"eea41bc49a5c572d86a595880d4c60093f15156e",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"bb093e1c928cf87ea69a2c49a784395bd82e542e",class:"togglecheckbox__tooltip-icon",src:n,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"eda4df7b1669eca99d4013877e2ef082ea54984c",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:t.tooltip,placeholder:null==t.placeholder?"":t.placeholder})))))}};ic.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__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}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__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}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';export{Or as checkbox_group_input,Rr as checkbox_input,lh as date_input,hh as email_input,ch as general_input,mh as general_registration,ph as number_input,Ch as password_input,Th as radio_input,$h as select_input,tc as tel_input,ec as text_input,ic as toggle_checkbox_input}
|