@everymatrix/general-registration 1.43.4 → 1.45.0
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/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +4789 -2676
- package/dist/cjs/general-registration.cjs.js +17 -11
- package/dist/cjs/index-f6c5854f.js +1331 -0
- package/dist/cjs/index.cjs.js +12 -14
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/general-registration/general-registration.css +0 -1
- package/dist/collection/components/general-registration/general-registration.js +762 -769
- package/dist/collection/components/general-registration/index.js +1 -0
- package/dist/collection/index.js +12 -14
- package/dist/collection/utils/locale.utils.js +292 -292
- package/dist/collection/utils/utils.js +1 -1
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/checkbox-group-input_13.entry.js +4789 -2676
- package/dist/esm/general-registration.js +14 -11
- package/dist/esm/index-8b4a4c93.js +1302 -0
- package/dist/esm/index.js +12 -14
- package/dist/esm/loader.js +7 -13
- package/dist/general-registration/general-registration.esm.js +1 -1
- package/dist/general-registration/index.esm.js +1 -1
- package/dist/general-registration/p-35ed5ec5.js +2 -0
- package/dist/general-registration/p-af4bdf25.entry.js +5431 -0
- package/dist/general-registration/p-e1255160.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +14 -19
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-input/src/utils/types.d.ts +87 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-registration/.stencil/packages/stencil/general-registration/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/general-registration/general-registration.d.ts +91 -91
- package/dist/types/components/general-registration/index.d.ts +1 -0
- package/dist/types/components.d.ts +18 -2
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/locale.utils.d.ts +8 -8
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +9 -2
- package/dist/cjs/index-0b9241d1.js +0 -1360
- package/dist/components/active-mixin.js +0 -975
- package/dist/components/checkbox-group-input.js +0 -6
- package/dist/components/checkbox-group-input2.js +0 -1078
- package/dist/components/checkbox-input.js +0 -6
- package/dist/components/checkbox-input2.js +0 -132
- package/dist/components/date-input.js +0 -6
- package/dist/components/date-input2.js +0 -11556
- package/dist/components/email-input.js +0 -6
- package/dist/components/email-input2.js +0 -171
- package/dist/components/field-mixin.js +0 -12426
- package/dist/components/general-input.js +0 -6
- package/dist/components/general-input2.js +0 -344
- package/dist/components/general-registration.d.ts +0 -11
- package/dist/components/general-registration.js +0 -961
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -20
- package/dist/components/input-field-shared-styles.js +0 -1211
- package/dist/components/number-input.js +0 -6
- package/dist/components/number-input2.js +0 -158
- package/dist/components/password-input.js +0 -6
- package/dist/components/password-input2.js +0 -1059
- package/dist/components/radio-input.js +0 -6
- package/dist/components/radio-input2.js +0 -114
- package/dist/components/select-input.js +0 -6
- package/dist/components/select-input2.js +0 -183
- package/dist/components/tel-input.js +0 -6
- package/dist/components/tel-input2.js +0 -197
- package/dist/components/text-input.js +0 -6
- package/dist/components/text-input2.js +0 -199
- package/dist/components/toggle-checkbox-input.js +0 -6
- package/dist/components/tooltipIcon.js +0 -146
- package/dist/components/vaadin-button.js +0 -490
- package/dist/components/vaadin-combo-box.js +0 -4512
- package/dist/components/virtual-keyboard-controller.js +0 -2001
- package/dist/esm/index-a42c182c.js +0 -1332
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/general-registration/p-4ff02444.js +0 -1
- package/dist/general-registration/p-cf70bdb5.entry.js +0 -3647
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +0 -87
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +0 -2
|
@@ -1,3647 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as r,H as s}from"./p-4ff02444.js";const o={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",MustIncludePunctuation:"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:"Polje početne lozinke ne potvrđuje sve kriterije",passwordStrength:"Jačina zaporke",passwordStrengthWeak:"nije adekvatno",passwordStrengthStrong:"je adekvatan",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",MustIncludePunctuation:"Lozinka mora sadržavati interpunkcijski 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",MustIncludePunctuation:"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",MustIncludePunctuation:"La contraseña debe incluir un signo de puntuación",OnlyNumbers:"Solo debe contener números"}},n=(t,e,i)=>{let r=o[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");r=r.replace(i,e)}return r},a="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHZpZXdCb3g9IjAgMCAxMiAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iNiIgY3k9IjYiIHI9IjUuNSIgc3Ryb2tlPSIjOTc5Nzk3Ii8+CjxyZWN0IHg9IjUiIHk9IjUiIHdpZHRoPSIyIiBoZWlnaHQ9IjUiIGZpbGw9IiM5Nzk3OTciLz4KPGNpcmNsZSBjeD0iNiIgY3k9IjMiIHI9IjEiIGZpbGw9IiM5Nzk3OTciLz4KPC9zdmc+Cg==";
|
|
2
|
-
/**
|
|
3
|
-
* @license
|
|
4
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
5
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/
|
|
7
|
-
function l(t){const e=customElements.get(t.is);if(e){const i=e.version;i&&t.version&&i===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${e.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
11
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12
|
-
*/class h extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.5"}}l(h);
|
|
13
|
-
/**
|
|
14
|
-
* @license
|
|
15
|
-
* Copyright 2019 Google LLC
|
|
16
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/
|
|
18
|
-
const c=window,u=c.ShadowRoot&&(void 0===c.ShadyCSS||c.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),p=new WeakMap;class m{constructor(t,e,i){if(this._$cssResult$=!0,i!==d)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(u&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=p.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&p.set(e,t))}return t}toString(){return this.cssText}}const f=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[r+1]),t[0]);return new m(i,t,d)},v=u?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new m("string"==typeof t?t:t+"",void 0,d))(e)})(t):t
|
|
19
|
-
/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2017 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/;var g;const _=window,b=_.trustedTypes,y=b?b.emptyScript:"",w=_.reactiveElementPolyfillSupport,x={toAttribute(t,e){switch(e){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},E=(t,e)=>e!==t&&(e==e||t==t),k={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:E},S="finalized";class A extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const r=this._$Ep(i,e);void 0!==r&&(this._$Ev.set(r,i),t.push(r))})),t}static createProperty(t,e=k){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,r=this.getPropertyDescriptor(t,i,e);void 0!==r&&Object.defineProperty(this.prototype,t,r)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(r){const s=this[t];this[e]=r,this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||k}static finalize(){if(this.hasOwnProperty(S))return!1;this[S]=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const i of e)this.createProperty(i,t[i])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(v(t))}else void 0!==t&&e.push(v(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{u?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),r=c.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=k){var r;const s=this.constructor._$Ep(t,i);if(void 0!==s&&!0===i.reflect){const o=(void 0!==(null===(r=i.converter)||void 0===r?void 0:r.toAttribute)?i.converter:x).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),this._$El=null}}_$AK(t,e){var i;const r=this.constructor,s=r._$Ev.get(t);if(void 0!==s&&this._$El!==s){const t=r.getPropertyOptions(s),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:x;this._$El=s,this[s]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let r=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||E)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,i))):r=!1),!this.isUpdatePending&&r&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(i)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}
|
|
24
|
-
/**
|
|
25
|
-
* @license
|
|
26
|
-
* Copyright 2017 Google LLC
|
|
27
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
28
|
-
*/
|
|
29
|
-
var C;A[S]=!0,A.elementProperties=new Map,A.elementStyles=[],A.shadowRootOptions={mode:"open"},null==w||w({ReactiveElement:A}),(null!==(g=_.reactiveElementVersions)&&void 0!==g?g:_.reactiveElementVersions=[]).push("1.6.3");const D=window,T=D.trustedTypes,I=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,O=`lit$${(Math.random()+"").slice(9)}$`,N="?"+O,z=`<${N}>`,R=document,M=()=>R.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,G=Array.isArray,F="[ \t\n\f\r]",L=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,j=/>/g,B=RegExp(`>|${F}(?:([^\\s"'>=/]+)(${F}*=${F}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),V=/'/g,q=/"/g,H=/^(?:script|style|textarea|title)$/i,$=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),Y=new WeakMap,X=R.createTreeWalker(R,129,null,!1);function K(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==I?I.createHTML(e):e}const Q=(t,e)=>{const i=t.length-1,r=[];let s,o=2===e?"<svg>":"",n=L;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===L?"!--"===l[1]?n=U:void 0!==l[1]?n=j:void 0!==l[2]?(H.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=B):void 0!==l[3]&&(n=B):n===B?">"===l[0]?(n=null!=s?s:L,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?B:'"'===l[3]?q:V):n===q||n===V?n=B:n===U||n===j?n=L:(n=B,s=void 0);const u=n===B&&t[e+1].startsWith("/>")?" ":"";o+=n===L?i+z:h>=0?(r.push(a),i.slice(0,h)+"$lit$"+i.slice(h)+O+u):i+O+(-2===h?(r.push(void 0),e):u)}return[K(t,o+(t[i]||"<?>")+(2===e?"</svg>":"")),r]};class J{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let s=0,o=0;const n=t.length-1,a=this.parts,[l,h]=Q(t,e);if(this.el=J.createElement(l,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=X.nextNode())&&a.length<n;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(O)){const i=h[o++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(O),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?ot:"@"===e[1]?nt:it})}else a.push({type:6,index:s})}for(const e of t)r.removeAttribute(e)}if(H.test(r.tagName)){const t=r.textContent.split(O),e=t.length-1;if(e>0){r.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],M()),X.nextNode(),a.push({type:2,index:++s});r.append(t[e],M())}}}else if(8===r.nodeType)if(r.data===N)a.push({type:2,index:s});else{let t=-1;for(;-1!==(t=r.data.indexOf(O,t+1));)a.push({type:7,index:s}),t+=O.length-1}s++}}static createElement(t,e){const i=R.createElement("template");return i.innerHTML=t,i}}function Z(t,e,i=t,r){var s,o,n,a;if(e===$)return e;let l=void 0!==r?null===(s=i._$Co)||void 0===s?void 0:s[r]:i._$Cl;const h=P(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(o=null==l?void 0:l._$AO)||void 0===o||o.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,i,r)),void 0!==r?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[r]=l:i._$Cl=l),void 0!==l&&(e=Z(t,l._$AS(t,e.values),l,r)),e}class tt{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:r}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:R).importNode(i,!0);X.currentNode=s;let o=X.nextNode(),n=0,a=0,l=r[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new et(o,o.nextSibling,this,t):1===l.type?e=new l.ctor(o,l.name,l.strings,this,t):6===l.type&&(e=new at(o,this,t)),this._$AV.push(e),l=r[++a]}n!==(null==l?void 0:l.index)&&(o=X.nextNode(),n++)}return X.currentNode=R,s}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 et{constructor(t,e,i,r){var s;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cp=null===(s=null==r?void 0:r.isConnected)||void 0===s||s}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=Z(this,t,e),P(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==$&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>G(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!==W&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(R.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:r}=t,s="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=J.createElement(K(r.h,r.h[0]),this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new tt(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=Y.get(t.strings);return void 0===e&&Y.set(t.strings,e=new J(t)),e}T(t){G(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const s of t)r===e.length?e.push(i=new et(this.k(M()),this.k(M()),this,this.options)):i=e[r],i._$AI(s),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$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 it{constructor(t,e,i,r,s){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const s=this.strings;let o=!1;if(void 0===s)t=Z(this,t,e,0),o=!P(t)||t!==this._$AH&&t!==$,o&&(this._$AH=t);else{const r=t;let n,a;for(t=s[0],n=0;n<s.length-1;n++)a=Z(this,r[i+n],e,n),a===$&&(a=this._$AH[n]),o||(o=!P(a)||a!==this._$AH[n]),a===W?t=W:t!==W&&(t+=(null!=a?a:"")+s[n+1]),this._$AH[n]=a}o&&!r&&this.j(t)}j(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends it{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===W?void 0:t}}const st=T?T.emptyScript:"";class ot extends it{constructor(){super(...arguments),this.type=4}j(t){t&&t!==W?this.element.setAttribute(this.name,st):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,r,s){super(t,e,i,r,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Z(this,t,e,0))&&void 0!==i?i:W)===$)return;const r=this._$AH,s=t===W&&r!==W||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==W&&(r===W||s);s&&this.element.removeEventListener(this.name,this,r),o&&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 at{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){Z(this,t)}}const lt=D.litHtmlPolyfillSupport;
|
|
30
|
-
/**
|
|
31
|
-
* @license
|
|
32
|
-
* Copyright 2017 Google LLC
|
|
33
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
-
*/
|
|
35
|
-
var ht,ct;null==lt||lt(J,et),(null!==(C=D.litHtmlVersions)&&void 0!==C?C:D.litHtmlVersions=[]).push("2.8.0");class ut extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var r,s;const o=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:e;let n=o._$litPart$;if(void 0===n){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;o._$litPart$=n=new et(e.insertBefore(M(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return $}}ut.finalized=!0,ut._$litElement$=!0,null===(ht=globalThis.litElementHydrateSupport)||void 0===ht||ht.call(globalThis,{LitElement:ut});const dt=globalThis.litElementPolyfillSupport;null==dt||dt({LitElement:ut}),(null!==(ct=globalThis.litElementVersions)&&void 0!==ct?ct:globalThis.litElementVersions=[]).push("3.3.3");
|
|
36
|
-
/**
|
|
37
|
-
* @license
|
|
38
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
39
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
40
|
-
*/
|
|
41
|
-
const pt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
|
|
42
|
-
/**
|
|
43
|
-
* @license
|
|
44
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
45
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
46
|
-
*/,mt=[];function ft(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function vt(t,e,i={}){t&&ft(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof m||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):mt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function gt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():mt}function _t(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function bt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=gt().find((e=>e.moduleId===t));i?e.push(...bt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function yt(t){const e=`${t}-default-theme`,i=gt().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[...bt(t),...t.styles],includePriority:_t(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:gt().filter((t=>t.moduleId===e))}const wt=t=>class extends(pt(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!ft(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype);this.__themes=[...(t?t.constructor.__themes:[])||[],...yt(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,i)=>i===e.lastIndexOf(t)))}}
|
|
47
|
-
/**
|
|
48
|
-
* @license
|
|
49
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
50
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
51
|
-
*/,xt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};xt("color-props",f`
|
|
52
|
-
:host {
|
|
53
|
-
/* Base (background) */
|
|
54
|
-
--lumo-base-color: #fff;
|
|
55
|
-
|
|
56
|
-
/* Tint */
|
|
57
|
-
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
58
|
-
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
59
|
-
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
60
|
-
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
61
|
-
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
62
|
-
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
63
|
-
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
64
|
-
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
65
|
-
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
66
|
-
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
67
|
-
--lumo-tint: #fff;
|
|
68
|
-
|
|
69
|
-
/* Shade */
|
|
70
|
-
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
71
|
-
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
72
|
-
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
73
|
-
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
74
|
-
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
75
|
-
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
76
|
-
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
77
|
-
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
78
|
-
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
79
|
-
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
80
|
-
--lumo-shade: hsl(214, 35%, 15%);
|
|
81
|
-
|
|
82
|
-
/* Contrast */
|
|
83
|
-
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
84
|
-
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
85
|
-
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
86
|
-
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
87
|
-
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
88
|
-
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
89
|
-
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
90
|
-
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
91
|
-
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
92
|
-
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
93
|
-
--lumo-contrast: var(--lumo-shade);
|
|
94
|
-
|
|
95
|
-
/* Text */
|
|
96
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
97
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
98
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
99
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
100
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
101
|
-
|
|
102
|
-
/* Primary */
|
|
103
|
-
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
104
|
-
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
105
|
-
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
106
|
-
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
107
|
-
--lumo-primary-contrast-color: #fff;
|
|
108
|
-
|
|
109
|
-
/* Error */
|
|
110
|
-
--lumo-error-color: hsl(3, 85%, 48%);
|
|
111
|
-
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
112
|
-
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
113
|
-
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
114
|
-
--lumo-error-contrast-color: #fff;
|
|
115
|
-
|
|
116
|
-
/* Success */
|
|
117
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
118
|
-
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
119
|
-
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
120
|
-
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
121
|
-
--lumo-success-contrast-color: #fff;
|
|
122
|
-
|
|
123
|
-
/* Warning */
|
|
124
|
-
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
125
|
-
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
126
|
-
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
127
|
-
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
/* forced-colors mode adjustments */
|
|
131
|
-
@media (forced-colors: active) {
|
|
132
|
-
html {
|
|
133
|
-
--lumo-disabled-text-color: GrayText;
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
`),vt("",f`
|
|
137
|
-
[theme~='dark'] {
|
|
138
|
-
/* Base (background) */
|
|
139
|
-
--lumo-base-color: hsl(214, 35%, 21%);
|
|
140
|
-
|
|
141
|
-
/* Tint */
|
|
142
|
-
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
143
|
-
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
144
|
-
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
145
|
-
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
146
|
-
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
147
|
-
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
148
|
-
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
149
|
-
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
150
|
-
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
151
|
-
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
152
|
-
--lumo-tint: hsl(214, 100%, 98%);
|
|
153
|
-
|
|
154
|
-
/* Shade */
|
|
155
|
-
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
156
|
-
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
157
|
-
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
158
|
-
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
159
|
-
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
160
|
-
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
161
|
-
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
162
|
-
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
163
|
-
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
164
|
-
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
165
|
-
--lumo-shade: hsl(214, 33%, 13%);
|
|
166
|
-
|
|
167
|
-
/* Contrast */
|
|
168
|
-
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
169
|
-
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
170
|
-
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
171
|
-
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
172
|
-
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
173
|
-
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
174
|
-
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
175
|
-
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
176
|
-
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
177
|
-
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
178
|
-
--lumo-contrast: var(--lumo-tint);
|
|
179
|
-
|
|
180
|
-
/* Text */
|
|
181
|
-
--lumo-header-text-color: var(--lumo-contrast);
|
|
182
|
-
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
183
|
-
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
184
|
-
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
185
|
-
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
186
|
-
|
|
187
|
-
/* Primary */
|
|
188
|
-
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
189
|
-
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
190
|
-
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
191
|
-
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
192
|
-
--lumo-primary-contrast-color: #fff;
|
|
193
|
-
|
|
194
|
-
/* Error */
|
|
195
|
-
--lumo-error-color: hsl(3, 79%, 49%);
|
|
196
|
-
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
197
|
-
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
198
|
-
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
199
|
-
|
|
200
|
-
/* Success */
|
|
201
|
-
--lumo-success-color: hsl(145, 72%, 30%);
|
|
202
|
-
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
203
|
-
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
204
|
-
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
205
|
-
|
|
206
|
-
/* Warning */
|
|
207
|
-
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
208
|
-
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
209
|
-
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
210
|
-
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
html {
|
|
214
|
-
color: var(--lumo-body-text-color);
|
|
215
|
-
background-color: var(--lumo-base-color);
|
|
216
|
-
color-scheme: light;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
[theme~='dark'] {
|
|
220
|
-
color: var(--lumo-body-text-color);
|
|
221
|
-
background-color: var(--lumo-base-color);
|
|
222
|
-
color-scheme: dark;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
h1,
|
|
226
|
-
h2,
|
|
227
|
-
h3,
|
|
228
|
-
h4,
|
|
229
|
-
h5,
|
|
230
|
-
h6 {
|
|
231
|
-
color: var(--lumo-header-text-color);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
a:where(:any-link) {
|
|
235
|
-
color: var(--lumo-primary-text-color);
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
a:not(:any-link) {
|
|
239
|
-
color: var(--lumo-disabled-text-color);
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
blockquote {
|
|
243
|
-
color: var(--lumo-secondary-text-color);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
code,
|
|
247
|
-
pre {
|
|
248
|
-
background-color: var(--lumo-contrast-10pct);
|
|
249
|
-
border-radius: var(--lumo-border-radius-m);
|
|
250
|
-
}
|
|
251
|
-
`,{moduleId:"lumo-color"}),xt("font-icons",f`
|
|
252
|
-
@font-face {
|
|
253
|
-
font-family: 'lumo-icons';
|
|
254
|
-
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==)
|
|
255
|
-
format('woff');
|
|
256
|
-
font-weight: normal;
|
|
257
|
-
font-style: normal;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
html {
|
|
261
|
-
--lumo-icons-align-center: '\\ea01';
|
|
262
|
-
--lumo-icons-align-left: '\\ea02';
|
|
263
|
-
--lumo-icons-align-right: '\\ea03';
|
|
264
|
-
--lumo-icons-angle-down: '\\ea04';
|
|
265
|
-
--lumo-icons-angle-left: '\\ea05';
|
|
266
|
-
--lumo-icons-angle-right: '\\ea06';
|
|
267
|
-
--lumo-icons-angle-up: '\\ea07';
|
|
268
|
-
--lumo-icons-arrow-down: '\\ea08';
|
|
269
|
-
--lumo-icons-arrow-left: '\\ea09';
|
|
270
|
-
--lumo-icons-arrow-right: '\\ea0a';
|
|
271
|
-
--lumo-icons-arrow-up: '\\ea0b';
|
|
272
|
-
--lumo-icons-bar-chart: '\\ea0c';
|
|
273
|
-
--lumo-icons-bell: '\\ea0d';
|
|
274
|
-
--lumo-icons-calendar: '\\ea0e';
|
|
275
|
-
--lumo-icons-checkmark: '\\ea0f';
|
|
276
|
-
--lumo-icons-chevron-down: '\\ea10';
|
|
277
|
-
--lumo-icons-chevron-left: '\\ea11';
|
|
278
|
-
--lumo-icons-chevron-right: '\\ea12';
|
|
279
|
-
--lumo-icons-chevron-up: '\\ea13';
|
|
280
|
-
--lumo-icons-clock: '\\ea14';
|
|
281
|
-
--lumo-icons-cog: '\\ea15';
|
|
282
|
-
--lumo-icons-cross: '\\ea16';
|
|
283
|
-
--lumo-icons-download: '\\ea17';
|
|
284
|
-
--lumo-icons-dropdown: '\\ea18';
|
|
285
|
-
--lumo-icons-edit: '\\ea19';
|
|
286
|
-
--lumo-icons-error: '\\ea1a';
|
|
287
|
-
--lumo-icons-eye: '\\ea1b';
|
|
288
|
-
--lumo-icons-eye-disabled: '\\ea1c';
|
|
289
|
-
--lumo-icons-menu: '\\ea1d';
|
|
290
|
-
--lumo-icons-minus: '\\ea1e';
|
|
291
|
-
--lumo-icons-ordered-list: '\\ea1f';
|
|
292
|
-
--lumo-icons-phone: '\\ea20';
|
|
293
|
-
--lumo-icons-photo: '\\ea21';
|
|
294
|
-
--lumo-icons-play: '\\ea22';
|
|
295
|
-
--lumo-icons-plus: '\\ea23';
|
|
296
|
-
--lumo-icons-redo: '\\ea24';
|
|
297
|
-
--lumo-icons-reload: '\\ea25';
|
|
298
|
-
--lumo-icons-search: '\\ea26';
|
|
299
|
-
--lumo-icons-undo: '\\ea27';
|
|
300
|
-
--lumo-icons-unordered-list: '\\ea28';
|
|
301
|
-
--lumo-icons-upload: '\\ea29';
|
|
302
|
-
--lumo-icons-user: '\\ea2a';
|
|
303
|
-
}
|
|
304
|
-
`),xt("sizing-props",f`
|
|
305
|
-
:host {
|
|
306
|
-
--lumo-size-xs: 1.625rem;
|
|
307
|
-
--lumo-size-s: 1.875rem;
|
|
308
|
-
--lumo-size-m: 2.25rem;
|
|
309
|
-
--lumo-size-l: 2.75rem;
|
|
310
|
-
--lumo-size-xl: 3.5rem;
|
|
311
|
-
|
|
312
|
-
/* Icons */
|
|
313
|
-
--lumo-icon-size-s: 1.25em;
|
|
314
|
-
--lumo-icon-size-m: 1.5em;
|
|
315
|
-
--lumo-icon-size-l: 2.25em;
|
|
316
|
-
/* For backwards compatibility */
|
|
317
|
-
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
318
|
-
}
|
|
319
|
-
`),xt("spacing-props",f`
|
|
320
|
-
:host {
|
|
321
|
-
/* Square */
|
|
322
|
-
--lumo-space-xs: 0.25rem;
|
|
323
|
-
--lumo-space-s: 0.5rem;
|
|
324
|
-
--lumo-space-m: 1rem;
|
|
325
|
-
--lumo-space-l: 1.5rem;
|
|
326
|
-
--lumo-space-xl: 2.5rem;
|
|
327
|
-
|
|
328
|
-
/* Wide */
|
|
329
|
-
--lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
|
|
330
|
-
--lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
|
|
331
|
-
--lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
|
|
332
|
-
--lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
|
|
333
|
-
--lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
|
|
334
|
-
|
|
335
|
-
/* Tall */
|
|
336
|
-
--lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
|
|
337
|
-
--lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
|
|
338
|
-
--lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
|
|
339
|
-
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
340
|
-
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
341
|
-
}
|
|
342
|
-
`),f`
|
|
343
|
-
html {
|
|
344
|
-
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
345
|
-
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
346
|
-
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
347
|
-
}
|
|
348
|
-
`,xt("style-props",f`
|
|
349
|
-
:host {
|
|
350
|
-
/* Border radius */
|
|
351
|
-
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
352
|
-
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
353
|
-
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
354
|
-
|
|
355
|
-
/* Shadow */
|
|
356
|
-
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
357
|
-
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
358
|
-
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
359
|
-
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
360
|
-
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
361
|
-
|
|
362
|
-
/* Clickable element cursor */
|
|
363
|
-
--lumo-clickable-cursor: default;
|
|
364
|
-
}
|
|
365
|
-
`);
|
|
366
|
-
/**
|
|
367
|
-
* @license
|
|
368
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
369
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
370
|
-
*/
|
|
371
|
-
const Et=f`
|
|
372
|
-
:host {
|
|
373
|
-
/* prettier-ignore */
|
|
374
|
-
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
375
|
-
|
|
376
|
-
/* Font sizes */
|
|
377
|
-
--lumo-font-size-xxs: 0.75rem;
|
|
378
|
-
--lumo-font-size-xs: 0.8125rem;
|
|
379
|
-
--lumo-font-size-s: 0.875rem;
|
|
380
|
-
--lumo-font-size-m: 1rem;
|
|
381
|
-
--lumo-font-size-l: 1.125rem;
|
|
382
|
-
--lumo-font-size-xl: 1.375rem;
|
|
383
|
-
--lumo-font-size-xxl: 1.75rem;
|
|
384
|
-
--lumo-font-size-xxxl: 2.5rem;
|
|
385
|
-
|
|
386
|
-
/* Line heights */
|
|
387
|
-
--lumo-line-height-xs: 1.25;
|
|
388
|
-
--lumo-line-height-s: 1.375;
|
|
389
|
-
--lumo-line-height-m: 1.625;
|
|
390
|
-
}
|
|
391
|
-
`;vt("",f`
|
|
392
|
-
body,
|
|
393
|
-
:host {
|
|
394
|
-
font-family: var(--lumo-font-family);
|
|
395
|
-
font-size: var(--lumo-font-size-m);
|
|
396
|
-
line-height: var(--lumo-line-height-m);
|
|
397
|
-
-webkit-text-size-adjust: 100%;
|
|
398
|
-
-webkit-font-smoothing: antialiased;
|
|
399
|
-
-moz-osx-font-smoothing: grayscale;
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
small,
|
|
403
|
-
[theme~='font-size-s'] {
|
|
404
|
-
font-size: var(--lumo-font-size-s);
|
|
405
|
-
line-height: var(--lumo-line-height-s);
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
[theme~='font-size-xs'] {
|
|
409
|
-
font-size: var(--lumo-font-size-xs);
|
|
410
|
-
line-height: var(--lumo-line-height-xs);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
:where(h1, h2, h3, h4, h5, h6) {
|
|
414
|
-
font-weight: 600;
|
|
415
|
-
line-height: var(--lumo-line-height-xs);
|
|
416
|
-
margin-block: 0;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
:where(h1) {
|
|
420
|
-
font-size: var(--lumo-font-size-xxxl);
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
:where(h2) {
|
|
424
|
-
font-size: var(--lumo-font-size-xxl);
|
|
425
|
-
}
|
|
426
|
-
|
|
427
|
-
:where(h3) {
|
|
428
|
-
font-size: var(--lumo-font-size-xl);
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
:where(h4) {
|
|
432
|
-
font-size: var(--lumo-font-size-l);
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
:where(h5) {
|
|
436
|
-
font-size: var(--lumo-font-size-m);
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
:where(h6) {
|
|
440
|
-
font-size: var(--lumo-font-size-xs);
|
|
441
|
-
text-transform: uppercase;
|
|
442
|
-
letter-spacing: 0.03em;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
p,
|
|
446
|
-
blockquote {
|
|
447
|
-
margin-top: 0.5em;
|
|
448
|
-
margin-bottom: 0.75em;
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
a {
|
|
452
|
-
text-decoration: none;
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
a:where(:any-link):hover {
|
|
456
|
-
text-decoration: underline;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
hr {
|
|
460
|
-
display: block;
|
|
461
|
-
align-self: stretch;
|
|
462
|
-
height: 1px;
|
|
463
|
-
border: 0;
|
|
464
|
-
padding: 0;
|
|
465
|
-
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
466
|
-
background-color: var(--lumo-contrast-10pct);
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
blockquote {
|
|
470
|
-
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
b,
|
|
474
|
-
strong {
|
|
475
|
-
font-weight: 600;
|
|
476
|
-
}
|
|
477
|
-
|
|
478
|
-
/* RTL specific styles */
|
|
479
|
-
blockquote[dir='rtl'] {
|
|
480
|
-
border-left: none;
|
|
481
|
-
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
482
|
-
}
|
|
483
|
-
`,{moduleId:"lumo-typography"}),xt("typography-props",Et),vt("vaadin-checkbox",f`
|
|
484
|
-
:host {
|
|
485
|
-
color: var(--lumo-body-text-color);
|
|
486
|
-
font-size: var(--lumo-font-size-m);
|
|
487
|
-
font-family: var(--lumo-font-family);
|
|
488
|
-
line-height: var(--lumo-line-height-s);
|
|
489
|
-
-webkit-font-smoothing: antialiased;
|
|
490
|
-
-moz-osx-font-smoothing: grayscale;
|
|
491
|
-
-webkit-tap-highlight-color: transparent;
|
|
492
|
-
-webkit-user-select: none;
|
|
493
|
-
-moz-user-select: none;
|
|
494
|
-
user-select: none;
|
|
495
|
-
cursor: default;
|
|
496
|
-
outline: none;
|
|
497
|
-
--_checkbox-size: var(--vaadin-checkbox-size, calc(var(--lumo-size-m) / 2));
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
:host([has-label]) ::slotted(label) {
|
|
501
|
-
padding-block: var(--lumo-space-xs);
|
|
502
|
-
padding-inline: var(--lumo-space-xs) var(--lumo-space-s);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
[part='checkbox'] {
|
|
506
|
-
width: var(--_checkbox-size);
|
|
507
|
-
height: var(--_checkbox-size);
|
|
508
|
-
margin: var(--lumo-space-xs);
|
|
509
|
-
position: relative;
|
|
510
|
-
border-radius: var(--lumo-border-radius-s);
|
|
511
|
-
background-color: var(--lumo-contrast-20pct);
|
|
512
|
-
transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
|
|
513
|
-
cursor: var(--lumo-clickable-cursor);
|
|
514
|
-
/* Default field border color */
|
|
515
|
-
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
:host([indeterminate]),
|
|
519
|
-
:host([checked]) {
|
|
520
|
-
--vaadin-input-field-border-color: transparent;
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
:host([indeterminate]) [part='checkbox'],
|
|
524
|
-
:host([checked]) [part='checkbox'] {
|
|
525
|
-
background-color: var(--lumo-primary-color);
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
/* Checkmark */
|
|
529
|
-
[part='checkbox']::after {
|
|
530
|
-
pointer-events: none;
|
|
531
|
-
font-family: 'lumo-icons';
|
|
532
|
-
content: var(--lumo-icons-checkmark);
|
|
533
|
-
color: var(--lumo-primary-contrast-color);
|
|
534
|
-
font-size: calc(var(--_checkbox-size) + 2px);
|
|
535
|
-
line-height: 1;
|
|
536
|
-
position: absolute;
|
|
537
|
-
top: -1px;
|
|
538
|
-
left: -1px;
|
|
539
|
-
contain: content;
|
|
540
|
-
opacity: 0;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
:host([checked]) [part='checkbox']::after {
|
|
544
|
-
opacity: 1;
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
/* Indeterminate checkmark */
|
|
548
|
-
:host([indeterminate]) [part='checkbox']::after {
|
|
549
|
-
content: '';
|
|
550
|
-
opacity: 1;
|
|
551
|
-
top: 45%;
|
|
552
|
-
height: 10%;
|
|
553
|
-
left: 22%;
|
|
554
|
-
right: 22%;
|
|
555
|
-
width: auto;
|
|
556
|
-
border: 0;
|
|
557
|
-
background-color: var(--lumo-primary-contrast-color);
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
/* Focus ring */
|
|
561
|
-
:host([focus-ring]) [part='checkbox'] {
|
|
562
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct),
|
|
563
|
-
inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
/* Disabled */
|
|
567
|
-
:host([disabled]) {
|
|
568
|
-
pointer-events: none;
|
|
569
|
-
color: var(--lumo-disabled-text-color);
|
|
570
|
-
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
:host([disabled]) ::slotted(label) {
|
|
574
|
-
color: inherit;
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
:host([disabled]) [part='checkbox'] {
|
|
578
|
-
background-color: var(--lumo-contrast-10pct);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
:host([disabled]) [part='checkbox']::after {
|
|
582
|
-
color: var(--lumo-contrast-30pct);
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
:host([indeterminate][disabled]) [part='checkbox']::after {
|
|
586
|
-
background-color: var(--lumo-contrast-30pct);
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
/* RTL specific styles */
|
|
590
|
-
:host([dir='rtl'][has-label]) ::slotted(label) {
|
|
591
|
-
padding: var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-xs) var(--lumo-space-s);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
/* Used for activation "halo" */
|
|
595
|
-
[part='checkbox']::before {
|
|
596
|
-
pointer-events: none;
|
|
597
|
-
color: transparent;
|
|
598
|
-
width: 100%;
|
|
599
|
-
height: 100%;
|
|
600
|
-
line-height: var(--_checkbox-size);
|
|
601
|
-
border-radius: inherit;
|
|
602
|
-
background-color: inherit;
|
|
603
|
-
transform: scale(1.4);
|
|
604
|
-
opacity: 0;
|
|
605
|
-
transition: transform 0.1s, opacity 0.8s;
|
|
606
|
-
}
|
|
607
|
-
|
|
608
|
-
/* Hover */
|
|
609
|
-
:host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
|
|
610
|
-
background-color: var(--lumo-contrast-30pct);
|
|
611
|
-
}
|
|
612
|
-
|
|
613
|
-
/* Disable hover for touch devices */
|
|
614
|
-
@media (pointer: coarse) {
|
|
615
|
-
:host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
|
|
616
|
-
background-color: var(--lumo-contrast-20pct);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/* Active */
|
|
621
|
-
:host([active]) [part='checkbox'] {
|
|
622
|
-
transform: scale(0.9);
|
|
623
|
-
transition-duration: 0.05s;
|
|
624
|
-
}
|
|
625
|
-
|
|
626
|
-
:host([active][checked]) [part='checkbox'] {
|
|
627
|
-
transform: scale(1.1);
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
:host([active]:not([checked])) [part='checkbox']::before {
|
|
631
|
-
transition-duration: 0.01s, 0.01s;
|
|
632
|
-
transform: scale(0);
|
|
633
|
-
opacity: 0.4;
|
|
634
|
-
}
|
|
635
|
-
`,{moduleId:"lumo-checkbox"}),
|
|
636
|
-
/**
|
|
637
|
-
@license
|
|
638
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
639
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
640
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
641
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
642
|
-
Code distributed by Google as part of the polymer project is also
|
|
643
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
644
|
-
*/
|
|
645
|
-
window.JSCompiler_renameProperty=function(t){return t};
|
|
646
|
-
/**
|
|
647
|
-
@license
|
|
648
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
649
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
650
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
651
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
652
|
-
Code distributed by Google as part of the polymer project is also
|
|
653
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
654
|
-
*/
|
|
655
|
-
let kt,St,At=/(url\()([^)]*)(\))/g,Ct=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Dt(t,e){if(t&&Ct.test(t))return t;if("//"===t)return t;if(void 0===kt){kt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",kt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),kt)try{return new URL(t,e).href}catch(e){return t}return St||(St=document.implementation.createHTMLDocument("temp"),St.base=St.createElement("base"),St.head.appendChild(St.base),St.anchor=St.createElement("a"),St.body.appendChild(St.anchor)),St.base.href=e,St.anchor.href=t,St.anchor.href||t}function Tt(t,e){return t.replace(At,(function(t,i,r,s){return i+"'"+Dt(r.replace(/["']/g,""),e)+"'"+s}))}function It(t){return t.substring(0,t.lastIndexOf("/")+1)}
|
|
656
|
-
/**
|
|
657
|
-
@license
|
|
658
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
659
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
660
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
661
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
662
|
-
Code distributed by Google as part of the polymer project is also
|
|
663
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
664
|
-
*/const Ot=!window.ShadyDOM||!window.ShadyDOM.inUse,Nt=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 zt=window.Polymer&&window.Polymer.rootPath||It(document.baseURI||window.location.href),Rt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Mt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Pt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Gt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ft=window.Polymer&&window.Polymer.legacyWarnings||!1,Lt=window.Polymer&&window.Polymer.syncInitialRender||!1,Ut=window.Polymer&&window.Polymer.legacyUndefined||!1,jt=window.Polymer&&window.Polymer.orderedComputed||!1,Bt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Vt=window.Polymer&&window.Polymer.fastDomIf||!1,qt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Ht=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,$t=0;const Wt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=$t++;return function(r){let s=r.__mixinSet;if(s&&s[i])return r;let o=e,n=o.get(r);if(!n){n=t(r),o.set(r,n);let e=Object.create(n.__mixinSet||s||null);e[i]=!0,n.__mixinSet=e}return n}};
|
|
665
|
-
/**
|
|
666
|
-
@license
|
|
667
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
668
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
669
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
670
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
671
|
-
Code distributed by Google as part of the polymer project is also
|
|
672
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
673
|
-
*/let Yt={},Xt={};function Kt(t,e){Yt[t]=Xt[t.toLowerCase()]=e}function Qt(t){return Yt[t]||Xt[t.toLowerCase()]}class Jt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=Qt(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,r){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=It(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Mt&&void 0!==Qt(t))throw Kt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Kt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function Zt(t){return Jt.import(t)}function te(t){const e=Tt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ee(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...ie(e[t]));return i}function ie(t){const e=Zt(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...se(e));const i=e.querySelector("template");i&&t.push(...re(i,e.assetpath)),e._styles=t}return e._styles}function re(t,e){if(!t._styles){const i=[],r=t.content.querySelectorAll("style");for(let t=0;t<r.length;t++){let s=r[t],o=s.getAttribute("include");o&&i.push(...ee(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(s.textContent=Tt(s.textContent,e)),i.push(s)}t._styles=i}return t._styles}function se(t){const e=[],i=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<i.length;t++){let r=i[t];if(r.import){const t=r.import,i=r.hasAttribute("shady-unscoped");if(i&&!t._unscopedStyle){const e=te(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=te(t));e.push(i?t._unscopedStyle:t._style)}}return e}
|
|
674
|
-
/**
|
|
675
|
-
@license
|
|
676
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
677
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
678
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
679
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
680
|
-
Code distributed by Google as part of the polymer project is also
|
|
681
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
682
|
-
*/Jt.prototype.modules=Yt,customElements.define("dom-module",Jt);const oe=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
|
|
683
|
-
/**
|
|
684
|
-
@license
|
|
685
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
686
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
687
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
688
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
689
|
-
Code distributed by Google as part of the polymer project is also
|
|
690
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
691
|
-
*/function ne(t){return t.indexOf(".")>=0}function ae(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function le(t,e){return 0===t.indexOf(e+".")}function he(t,e){return 0===e.indexOf(t+".")}function ce(t,e,i){return e+i.slice(t.length)}function ue(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let r=t[i].toString().split(".");for(let t=0;t<r.length;t++)e.push(r[t])}return e.join(".")}return t}function de(t){return Array.isArray(t)?ue(t).split("."):t.toString().split(".")}function pe(t,e,i){let r=t,s=de(e);for(let t=0;t<s.length;t++){if(!r)return;r=r[s[t]]}return i&&(i.path=s.join(".")),r}function me(t,e,i){let r=t,s=de(e),o=s[s.length-1];if(s.length>1){for(let t=0;t<s.length-1;t++)if(r=r[s[t]],!r)return;r[o]=i}else r[e]=i;return s.join(".")}
|
|
692
|
-
/**
|
|
693
|
-
@license
|
|
694
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
695
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
696
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
697
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
698
|
-
Code distributed by Google as part of the polymer project is also
|
|
699
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
700
|
-
*/const fe={},ve=/-[a-z]/g,ge=/([A-Z])/g;function _e(t){return fe[t]||(fe[t]=t.indexOf("-")<0?t:t.replace(ve,(t=>t[1].toUpperCase())))}function be(t){return fe[t]||(fe[t]=t.replace(ge,"-$1").toLowerCase())}
|
|
701
|
-
/**
|
|
702
|
-
@license
|
|
703
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
704
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
705
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
706
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
707
|
-
Code distributed by Google as part of the polymer project is also
|
|
708
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
709
|
-
*/let ye=0,we=0,xe=[],Ee=0,ke=!1,Se=document.createTextNode("");new window.MutationObserver((function(){ke=!1;const t=xe.length;for(let e=0;e<t;e++){let t=xe[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}xe.splice(0,t),we+=t})).observe(Se,{characterData:!0});const Ae={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)}},Ce={run:t=>(ke||(ke=!0,Se.textContent=Ee++),xe.push(t),ye++),cancel(t){const e=t-we;if(e>=0){if(!xe[e])throw new Error("invalid async handle: "+t);xe[e]=null}}},De=Ce,Te=Wt((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 r=this.__data[t],s=this._shouldPropertyChange(t,e,r);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=r),this.__data[t]=e,this.__dataPending[t]=e),s}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,De.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,r){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,r)}_attributeToProperty(t,e,i){if(!this.__serializing){const r=this.__dataAttributes,s=r&&r[t]||t;this[s]=this._deserializeValue(e,i||this.constructor.typeForProperty(s))}}_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 r=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=oe(t)),void 0===r?t.removeAttribute(i):t.setAttribute(i,""===r&&window.trustedTypes?window.trustedTypes.emptyScript:r)}_serializeValue(t){switch(typeof t){case"boolean":return t?"":void 0;default:return null!=t?t.toString():void 0}}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Ie={};let Oe=HTMLElement.prototype;for(;Oe;){let t=Object.getOwnPropertyNames(Oe);for(let e=0;e<t.length;e++)Ie[t[e]]=!0;Oe=Object.getPrototypeOf(Oe)}const Ne=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ze=Wt((t=>{const e=Te(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(_e(t[e]))}static attributeNameForProperty(t){return be(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){switch(typeof t){case"object":if(t instanceof Date)return t.toString();if(t){if(Ne(t))return t;try{return JSON.stringify(t)}catch(t){return""}}default: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(!Ie[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)}}})),Re={"dom-if":!0,"dom-repeat":!0};let Me=!1,Pe=!1;const Ge=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,r)=>{const s=i.getAttribute(r);t&&r.startsWith("on-")?e.setAttribute(r,t.createScript(s,r)):e.setAttribute(r,s)}})();function Fe(t){let e=t.getAttribute("is");if(e&&Re[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];Ge(t,i,e),i.removeAttribute(e)}}return t}function Le(t,e){let i=e.parentInfo&&Le(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,r=0;t;t=t.nextSibling)if(e.parentIndex===r++)return t}function Ue(t,e,i,r){r.id&&(e[r.id]=i)}function je(t,e,i){if(i.events&&i.events.length)for(let r,s=0,o=i.events;s<o.length&&(r=o[s]);s++)t._addMethodEventListenerToNode(e,r.name,r.value,t)}function Be(t,e,i,r){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=r)}const Ve=Wt((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 r=!1,s=t;return"template"!=s.localName||s.hasAttribute("preserve-content")?"slot"===s.localName&&(e.hasInsertionPoint=!0):r=this._parseTemplateNestedTemplate(s,e,i)||r,function(t){(function(){if(!Me){Me=!0;const t=document.createElement("textarea");t.placeholder="a",Pe=t.placeholder===t.textContent}return Pe})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(s),s.firstChild&&this._parseTemplateChildNodes(s,e,i),s.hasAttributes&&s.hasAttributes()&&(r=this._parseTemplateNodeAttributes(s,e,i)||r),r||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let r,s=t.firstChild,o=0;s;s=r){if("template"==s.localName&&(s=Fe(s)),r=s.nextSibling,s.nodeType===Node.TEXT_NODE){let i=r;for(;i&&i.nodeType===Node.TEXT_NODE;)s.textContent+=i.textContent,r=i.nextSibling,t.removeChild(i),i=r;if(e.stripWhiteSpace&&!s.textContent.trim()){t.removeChild(s);continue}}let n={parentIndex:o,parentInfo:i};this._parseTemplateNode(s,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),s.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let r=t,s=this._parseTemplate(r,e);return(s.content=r.content.ownerDocument.createDocumentFragment()).appendChild(r.content),i.templateInfo=s,!0}static _parseTemplateNodeAttributes(t,e,i){let r=!1,s=Array.from(t.attributes);for(let o,n=s.length-1;o=s[n];n--)r=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||r;return r}static _parseTemplateNodeAttribute(t,e,i,r,s){return"on-"===r.slice(0,3)?(t.removeAttribute(r),i.events=i.events||[],i.events.push({name:r.slice(3),value:s}),!0):"id"===r&&(i.id=s,!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,r=document.importNode(e.content||t.content,!0);r.__noInsertionPoint=!e.hasInsertionPoint;let s=r.nodeList=new Array(i.length);r.$={};for(let t,o=0,n=i.length;o<n&&(t=i[o]);o++){let i=s[o]=Le(r,t);Ue(0,r.$,i,t),Be(0,i,t,e),je(this,i,t)}return r=r,r}_addMethodEventListenerToNode(t,e,i,r){let s=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")}}(r=r||t,0,i);return this._addEventListenerToNode(t,e,s),s}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
|
|
710
|
-
/**
|
|
711
|
-
* @fileoverview
|
|
712
|
-
* @suppress {checkPrototypalTypes}
|
|
713
|
-
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
714
|
-
* This code may only be used under the BSD style license found at
|
|
715
|
-
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
716
|
-
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
717
|
-
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
718
|
-
* Google as part of the polymer project is also subject to an additional IP
|
|
719
|
-
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
720
|
-
*/let qe=0;const He=[],$e={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},We=/[A-Z]/;function Ye(t,e,i){let r=t[e];if(r){if(!t.hasOwnProperty(e)&&(r=t[e]=Object.create(t[e]),i))for(let t in r){let e=r[t],i=r[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else r=t[e]={};return r}function Xe(t,e,i,r,s,o){if(e){let n=!1;const a=qe++;for(let l in i){let h=e[s?ae(l):l];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===a||s&&!Qe(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,r,e.info,s,o),n=!0)}return n}return!1}function Ke(t,e,i,r,s,o,n,a){let l=!1,h=e[n?ae(r):r];if(h)for(let e,c=0,u=h.length;c<u&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!Qe(r,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,r,s,o,e.info,n,a),l=!0);return l}function Qe(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!le(i,t))||!(!e.wildcard||!he(i,t))}return!0}function Je(t,e,i,r,s){let o="string"==typeof s.method?t[s.method]:s.method,n=s.property;o?o.call(t,t.__data[n],r[n]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function Ze(t,e,i){let r=ae(e);return r!==e&&(ti(t,be(r)+"-changed",i[e],e),!0)}function ti(t,e,i,r){let s={value:i,queueProperty:!0};r&&(s.path=r),oe(t).dispatchEvent(new CustomEvent(e,{detail:s}))}function ei(t,e,i,r,s,o){let n=(o?ae(e):e)!=e?e:null,a=n?pe(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ti(t,s.eventName,a,n)}function ii(t,e,i,r,s){let o=t.__data[e];Rt&&(o=Rt(o,s.attrName,"attribute",t)),t._propertyToAttribute(e,s.attrName,o)}const ri=(t,e,i)=>{let r=0,s=e.length-1,o=-1;for(;r<=s;){const n=r+s>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)r=n+1;else{if(!(a>0)){o=n;break}s=n-1}}o<0&&(o=s+1),e.splice(o,0,t)},si=(t,e,i,r,s)=>{const o=e[s?ae(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun===qe||s&&!Qe(t,n.trigger)||(n.info.lastRun=qe,ri(n.info,i,r))}};function oi(t,e,i,r,s){let o=di(t,e,i,0,s);if(o===He)return!1;let n=s.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function ni(t,e,i,r,s,o,n){i.bindings=i.bindings||[];let a={kind:r,target:s,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||be(s)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let r=a.parts[i];r.compoundIndex=i,ai(t,e,a,r,l)}}function ai(t,e,i,r,s){if(!r.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 o=r.dependencies,n={index:s,binding:i,part:r,evaluator:t};for(let i=0;i<o.length;i++){let r=o[i];"string"==typeof r&&(r=gi(r),r.wildcard=!0),t._addTemplatePropertyEffect(e,r.rootProperty,{fn:li,info:n,trigger:r})}}}function li(t,e,i,r,s,o,n){let a=n[s.index],l=s.binding,h=s.part;if(o&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let r=i[e];e=ce(h.source,l.target,e),a._setPendingPropertyOrPath(e,r,!1,!0)&&t._enqueueClient(a)}else{let n=s.evaluator._evaluateBinding(t,h,e,i,r,o);n!==He&&function(t,e,i,r,s){if(s=function(t,e,i,r){if(i.isCompound){let s=t.__dataCompoundStorage[i.target];s[r.compoundIndex]=e,e=s.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,s,i,r),Rt&&(s=Rt(s,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,s,i.target);else{let r=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?e[$e.READ_ONLY]&&e[$e.READ_ONLY][r]||e._setPendingProperty(r,s)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,r,s)}}(t,a,l,h,n)}}function hi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),r=e.parts,s=new Array(r.length);for(let t=0;t<r.length;t++)s[t]=r[t].literal;let o=e.target;i[o]=s,e.literal&&"property"==e.kind&&("className"===o&&(t=oe(t)),t[o]=e.literal)}}function ci(t,e,i){if(i.listenerEvent){let r=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,r,s){let o,n=t.detail,a=n&&n.path;a?(r=ce(i,r,a),o=n&&n.value):o=t.currentTarget[i],o=s?!o:o,e[$e.READ_ONLY]&&e[$e.READ_ONLY][r]||!e._setPendingPropertyOrPath(r,o,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,r.source,r.negate)}))}}function ui(t,e,i,r,s,o){let n={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let s,o=0;o<e.args.length&&(s=e.args[o]);o++)s.literal||t._addPropertyEffect(s.rootProperty,i,{fn:r,info:n,trigger:s});return o&&t._addPropertyEffect(e.methodName,i,{fn:r,info:n}),n}function di(t,e,i,r,s){let o=t._methodHost||t,n=o[s.methodName];if(n){let r=t._marshalArgs(s.args,e,i);return r===He?He:n.apply(o,r)}s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const pi=[],mi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function fi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function vi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:pi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=gi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function gi(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},r=e[0];switch("-"===r&&(r=e[1]),r>="0"&&r<="9"&&(r="#"),r){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=ae(e),i.structured=ne(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function _i(t,e,i){let r=pe(t,i);return void 0===r&&(r=e[i]),r}function bi(t,e,i,r){const s={indexSplices:r};Ut&&!t._overrideLegacyUndefined&&(e.splices=s),t.notifyPath(i+".splices",s),t.notifyPath(i+".length",e.length),Ut&&!t._overrideLegacyUndefined&&(s.indexSplices=[])}function yi(t,e,i,r,s,o){bi(t,e,i,[{index:r,addedCount:s,removed:o,object:e,type:"splice"}])}const wi=Wt((t=>{const e=Ve(ze(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return $e}_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(xi.length){let t=xi[xi.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[$e.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==$e.READ_ONLY);let r=Ye(this,e,!0)[t];r||(r=this[e][t]=[]),r.push(i)}_removePropertyEffect(t,e,i){let r=Ye(this,e,!0)[t],s=r.indexOf(i);s>=0&&r.splice(s,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,$e.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,$e.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,$e.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,$e.COMPUTE)}_setPendingPropertyOrPath(t,e,i,r){if(r||ae(Array.isArray(t)?t[0]:t)!==t){if(!r){let i=pe(this,t);if(!(t=me(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 r=t.__dataLinkedPaths;if(r){let s;for(let o in r){let n=r[o];he(o,e)?(s=ce(o,n,e),t._setPendingPropertyOrPath(s,i,!0,!0)):he(n,e)&&(s=ce(n,o,e),t._setPendingPropertyOrPath(s,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=oe(t)),t[e]=i)}_setPendingProperty(t,e,i){let r=this.__dataHasPaths&&ne(t);return!!this._shouldPropertyChange(t,e,(r?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),r?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(r||this[$e.NOTIFY]&&this[$e.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[$e.READ_ONLY]&&this[$e.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 r,s=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,r){let s=t[$e.COMPUTE];if(s)if(jt){qe++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[$e.COMPUTE];let r,{counts:s,ready:o,total:n}=function(t){const e=t.__computeInfo,i={},r=t[$e.COMPUTE],s=[];let o=0;for(let t in e){const r=e[t];o+=i[t]=r.args.filter((t=>!t.literal)).length+(r.dynamicFn?1:0)}for(let t in r)e[t]||s.push(t);return{counts:i,ready:s,total:o}}(t);for(;r=o.shift();){e.set(r,e.size);const t=i[r];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--s[e]&&o.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)si(t,s,n,o,r);let a;for(;a=n.shift();)oi(t,"",e,0,a)&&si(a.methodInfo,s,n,o,r);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;Xe(t,s,o,i,r);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,s),r=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,s),this._flushClients(),Xe(this,this[$e.REFLECT],e,i,s),Xe(this,this[$e.OBSERVE],e,i,s),r&&function(t,e,i,r,s){let o,n,a=t[$e.NOTIFY],l=qe++;for(let n in e)e[n]&&(a&&Ke(t,a,l,n,i,r,s)||s&&Ze(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,r,e,i,s),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[$e.PROPAGATE]&&Xe(this,this[$e.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,r){const s=(e,r)=>{Xe(this,t.propertyEffects,e,i,r,t.nodeList);for(let s=t.firstChild;s;s=s.nextSibling)this._runEffectsForTemplate(s,e,i,r)};t.runEffects?t.runEffects(s,e,r):s(e,r)}linkPaths(t,e){t=ue(t),e=ue(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ue(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};bi(this,pe(this,t,i),i.path,e)}get(t,e){return pe(e||this,t)}set(t,e,i){i?me(i,t,e):this[$e.READ_ONLY]&&this[$e.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},r=pe(this,t,i),s=r.length,o=r.push(...e);return e.length&&yi(this,r,i.path,s,e.length,[]),o}pop(t){let e={path:""},i=pe(this,t,e),r=Boolean(i.length),s=i.pop();return r&&yi(this,i,e.path,i.length,0,[s]),s}splice(t,e,i,...r){let s,o={path:""},n=pe(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),s=2===arguments.length?n.splice(e):n.splice(e,i,...r),(r.length||s.length)&&yi(this,n,o.path,e,r.length,s),s}shift(t){let e={path:""},i=pe(this,t,e),r=Boolean(i.length),s=i.shift();return r&&yi(this,i,e.path,0,0,[s]),s}unshift(t,...e){let i={path:""},r=pe(this,t,i),s=r.unshift(...e);return e.length&&yi(this,r,i.path,0,e.length,[]),s}notifyPath(t,e){let i;if(1==arguments.length){let r={path:""};e=pe(this,t,r),i=r.path}else i=Array.isArray(t)?ue(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,$e.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let r={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,$e.OBSERVE,{fn:Je,info:r,trigger:{name:t}}),i&&this._addPropertyEffect(e,$e.OBSERVE,{fn:Je,info:r,trigger:{name:e}})}_createMethodObserver(t,e){let i=vi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");ui(this,i,$e.OBSERVE,di,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,$e.NOTIFY,{fn:ei,info:{eventName:be(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,$e.REFLECT,{fn:ii,info:{attrName:e}})}_createComputedProperty(t,e,i){let r=vi(e);if(!r)throw new Error("Malformed computed expression '"+e+"'");const s=ui(this,r,$e.COMPUTE,oi,t,i);Ye(this,"__computeInfo")[t]=s}_marshalArgs(t,e,i){const r=this.__data,s=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[o];if(!c)if(l){const t=he(n,e),s=_i(r,i,t?e:n);h={path:t?e:n,value:s,base:t?pe(r,n):s}}else h=a?_i(r,i,n):r[n];if(Ut&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return He;s[o]=h}return s}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),r=this.__preBoundTemplateInfo==i;if(!r)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=r,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,r=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=r,r?r.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 r=t.propertyEffects=t.propertyEffects||{};(r[e]=r[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),xi.push(this);let i=super._stampTemplate(t,e);if(xi.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:r}=e;if(r.length)for(let e=0;e<r.length;e++){let s=i[e],o=r[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];hi(s,i),ci(s,t,i)}s.__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:r,parent:s}=e;i?i.nextSibling=r:s&&(s.firstChild=r),r?r.previousSibling=i:s&&(s.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];oe(oe(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,r){let s=e._parseTemplateNode.call(this,t,i,r);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=fi(e)||" ",ni(this,i,r,"text","textContent",e),s=!0)}return s}static _parseTemplateNodeAttribute(t,i,r,s,o){let n=this._parseBindings(o,i);if(n){let e=s,o="property";We.test(s)?o="attribute":"$"==s[s.length-1]&&(s=s.slice(0,-1),o="attribute");let a=fi(n);return a&&"attribute"==o&&("class"==s&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(s)),t.setAttribute(s,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(s,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(s=_e(s)),ni(this,i,r,o,s,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,r,s,o)}static _parseTemplateNestedTemplate(t,i,r){let s=e._parseTemplateNestedTemplate.call(this,t,i,r);const o=t.parentNode,n=r.templateInfo,a="dom-if"===o.localName;Bt&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(r=r.parentInfo).templateInfo=n,r.noted=!0,s=!1);let l=n.hostProps;if(Vt&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),Bt||(r.parentInfo.noted=!0));else{let t="{";for(let e in l)ni(this,i,r,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return s}static _parseBindings(t,e){let i,r=[],s=0;for(;null!==(i=mi.exec(t));){i.index>s&&r.push({literal:t.slice(s,i.index)});let o=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let u=vi(a),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 r=e.dynamicFns;(r&&r[i]||u.static)&&(d.push(i),u.dynamicFn=!0)}else d.push(a);r.push({source:a,mode:o,negate:n,customEvent:l,signature:u,dependencies:d,event:h}),s=mi.lastIndex}if(s&&s<t.length){let e=t.substring(s);e&&r.push({literal:e})}return r.length?r:null}static _evaluateBinding(t,e,i,r,s,o){let n;return n=e.signature?di(t,i,r,0,e.signature):i!=e.source?pe(t,e.source):o&&ne(i)?pe(t,i):t.__data[i],e.negate&&(n=!n),n}}})),xi=[],Ei=Wt((t=>{const e=Te(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof s?e:null}function r(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
|
|
721
|
-
/**
|
|
722
|
-
@license
|
|
723
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
724
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
725
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
726
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
727
|
-
Code distributed by Google as part of the polymer project is also
|
|
728
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
729
|
-
*/
|
|
730
|
-
function(t){const e={};for(let i in t){const r=t[i];e[i]="function"==typeof r?{type:r}:r}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class s 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=r(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,r(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 s})),ki=window.ShadyCSS&&window.ShadyCSS.cssBuild,Si=Wt((t=>{const e=Ei(wi(t));function i(t,e,i,r){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,r)),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,r[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):Gt||(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 r=0;r<t.length;r++)i._createMethodObserver(t[r],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&&(!Mt||Pt)&&(e=Jt.import(t,"template"),Mt&&!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=It(t.url);else{const t=Jt.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=zt,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 r=e[i];"value"in r&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=r)}}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 Tt(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,r){if(!ki){const s=e.content.querySelectorAll("style"),o=re(e),n=function(t){let e=Zt(t);return e?se(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let s=n[i];s.textContent=t._processStyleText(s.textContent,r),e.content.insertBefore(s,a)}let l=0;for(let e=0;e<o.length;e++){let i=o[e],n=s[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,r)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Ht&&ki&&Nt){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=oe(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])),Lt&&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,r){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,r)}static _addTemplatePropertyEffect(t,i,r){return!Ft||i in this._properties||r.info.part.signature&&r.info.part.signature.static||r.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,r)}}})),Ai=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Ci{constructor(t,e){Ii(t,e);const i=e.reduce(((e,i,r)=>e+Di(i)+t[r+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Di(t){if(t instanceof Ci)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Ti=function(t,...e){Ii(t,e);const i=document.createElement("template");let r=e.reduce(((e,i,r)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Ci)return Di(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[r+1]),t[0]);return Ai&&(r=Ai.createHTML(r)),i.innerHTML=r,i},Ii=(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")},Oi=Si(HTMLElement),Ni=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,zi=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Ri(t,e){if("function"!=typeof t)return;const i=Ni.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 Mi(){}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&&(zi?!(zi&&Object.keys(zi).map((t=>zi[t])).filter((t=>t.productionMode)).length>0):!Ri((function(){return!0})))}catch(t){return!1}}());
|
|
731
|
-
/**
|
|
732
|
-
* @license
|
|
733
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
734
|
-
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
735
|
-
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
736
|
-
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
737
|
-
* Code distributed by Google as part of the polymer project is also
|
|
738
|
-
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
739
|
-
*/
|
|
740
|
-
let Pi=0,Gi=0;const Fi=[];let Li=!1;const Ui={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)}},ji={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Bi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Vi={run(t){Li||(Li=!0,queueMicrotask((()=>function(){Li=!1;const t=Fi.length;for(let e=0;e<t;e++){const t=Fi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Fi.splice(0,t),Gi+=t}()))),Fi.push(t);const e=Pi;return Pi+=1,e},cancel(t){const e=t-Gi;if(e>=0){if(!Fi[e])throw new Error(`invalid async handle: ${t}`);Fi[e]=null}}},qi=new Set;class Hi{static debounce(t,e,i){return t instanceof Hi?t._cancelAsync():t=new Hi,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,qi.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),qi.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 $i(t){qi.add(t)}function Wi(){const t=Boolean(qi.size);return qi.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const Yi=()=>{let t;do{t=Wi()}while(t)},Xi=[];
|
|
741
|
-
/**
|
|
742
|
-
* @license
|
|
743
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
744
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
745
|
-
*/function Ki(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Qi(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Qi();Xi.forEach((e=>{Ki(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Ji=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Ki(this,Qi(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const r=Qi(),s=i===r&&-1===Xi.indexOf(this),o=!i&&e&&-1===Xi.indexOf(this),n=i!==r&&e===r;s||o?(this.__subscribe(),Ki(this,r,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Xi.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){Xi.includes(this)||Xi.push(this)}__unsubscribe(){Xi.includes(this)&&Xi.splice(Xi.indexOf(this),1)}}
|
|
746
|
-
/**
|
|
747
|
-
* @license
|
|
748
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
749
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
750
|
-
*/;let Zi;window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)Ri(t,e)}(Mi)};const tr=new Set,er=t=>class extends(Ji(t)){static get version(){return"24.2.5"}static finalize(){super.finalize();const{is:t}=this;t&&!tr.has(t)&&(window.Vaadin.registrations.push(this),tr.add(t),window.Vaadin.developmentModeCallback&&(Zi=Hi.debounce(Zi,Bi,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),$i(Zi)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
|
|
751
|
-
/**
|
|
752
|
-
* @license
|
|
753
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
754
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
755
|
-
*/;function ir(t){return t?new Set(t.split(" ")):new Set}function rr(t){return t?[...t].join(" "):""}function sr(t,e,i){const r=ir(t.getAttribute(e));r.add(i),t.setAttribute(e,rr(r))}
|
|
756
|
-
/**
|
|
757
|
-
* @license
|
|
758
|
-
* Copyright (c) 2023 Vaadin Ltd.
|
|
759
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
760
|
-
*/
|
|
761
|
-
class or{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],r=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,s)=>{const o=t.indexOf(e);-1===o?i.push(e):o!==s&&r.push(e)})),(e.length||i.length||r.length)&&this.callback({addedNodes:e,movedNodes:r,removedNodes:i}),this._storedNodes=t}}
|
|
762
|
-
/**
|
|
763
|
-
* @license
|
|
764
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
765
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
766
|
-
*/let nr=0;function ar(){return nr++}
|
|
767
|
-
/**
|
|
768
|
-
* @license
|
|
769
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
770
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
771
|
-
*/class lr extends EventTarget{static generateId(t,e){return`${e||"default"}-${t.localName}-${ar()}`}constructor(t,e,i,r={}){super();const{initializer:s,multiple:o,observe:n,useUniqueId:a}=r;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof o&&o,this.slotInitializer=s,o&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let r=this.defaultNode;return!r&&i&&(r=document.createElement(i),r instanceof Element&&(""!==e&&r.setAttribute("slot",e),this.node=r,this.defaultNode=r)),r&&t.appendChild(r),r}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new or(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],r=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),r&&r.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...r].filter((t=>t!==this.defaultNode)),r.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=r[0],this.initAddedNode(this.node)))}))}}
|
|
772
|
-
/**
|
|
773
|
-
* @license
|
|
774
|
-
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
775
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
776
|
-
*/class hr extends lr{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
|
|
777
|
-
/**
|
|
778
|
-
@license
|
|
779
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
780
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
781
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
782
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
783
|
-
Code distributed by Google as part of the polymer project is also
|
|
784
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
785
|
-
*/const cr="string"==typeof document.head.style.touchAction,ur="__polymerGesturesHandled",dr="__polymerGesturesTouchAction",pr=["mousedown","mousemove","mouseup","click"],mr=[0,1,4,2],fr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function vr(t){return pr.indexOf(t)>-1}let gr=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){gr=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const _r=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),br={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function yr(t){const e=t.type;if(!vr(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!fr&&(e=mr[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const wr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function xr(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Er(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const kr=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Sr={},Ar=[];function Cr(t){const e=kr(t);return e.length>0?e[0]:t.target}function Dr(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const r=i[e];if(!r)return;if(!t[ur]&&(t[ur]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(wr.touch.id=i.identifier),wr.touch.id!==i.identifier)return;cr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)wr.touch.x=e.clientX,wr.touch.y=e.clientY,wr.touch.scrollDecided=!1;else if("touchmove"===i){if(wr.touch.scrollDecided)return;wr.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=kr(t);for(let t,r=0;r<i.length;r++)if(t=i[r],t[dr]){e=t[dr];break}return e}(t);let r=!1;const s=Math.abs(wr.touch.x-e.clientX),o=Math.abs(wr.touch.y-e.clientY);t.cancelable&&("none"===i?r=!0:"pan-x"===i?r=o>s:"pan-y"===i&&(r=s>o)),r?t.preventDefault():zr("track")}}(t)}const s=t[ur];if(!s.skip){for(let e,i=0;i<Ar.length;i++)e=Ar[i],r[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<Ar.length;o++)i=Ar[o],r[i.name]&&!s[i.name]&&(s[i.name]=!0,i[e](t))}}function Tr(t,e,i){return!!Sr[e]&&(function(t,e,i){const r=Sr[e],s=r.deps,o=r.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,r=0;r<s.length;r++)e=s[r],_r&&vr(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Dr,void vr(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),r.touchAction&&Or(t,r.touchAction)}(t,e,i),!0)}function Ir(t){Ar.push(t),t.emits.forEach((e=>{Sr[e]=t}))}function Or(t,e){cr&&t instanceof HTMLElement&&Vi.run((()=>{t.style.touchAction=e})),t[dr]=e}function Nr(t,e,i){const r=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(r.detail=i,t.dispatchEvent(r),r.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function zr(t){const e=function(t){for(let e,i=0;i<Ar.length;i++){e=Ar[i];for(let i,r=0;r<e.emits.length;r++)if(i=e.emits[r],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Rr(t,e,i,r){e&&Nr(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:r,prevent:t=>zr(t)})}function Mr(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const r=Math.abs(t.x-e),s=Math.abs(t.y-i);return r>=5||s>=5}function Pr(t,e,i){if(!e)return;const r=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1];let o,n=0;r&&(o=s.x-r.x,n=s.y-r.y),Nr(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:s.x-t.x,dy:s.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),r=i;for(;r&&r.shadowRoot&&!window.ShadyDOM;){const s=r;if(r=r.shadowRoot.elementFromPoint(t,e),s===r)break;r&&(i=r)}return i}(i.clientX,i.clientY)})}function Gr(t,e,i){const r=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),o=Cr(i||e);!o||br[o.localName]&&o.hasAttribute("disabled")||(isNaN(r)||isNaN(s)||r<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Cr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),r=t.pageX,s=t.pageY;return!(r>=i.left&&r<=i.right&&s>=i.top&&s<=i.bottom)}return!1}(e))&&(t.prevent||Nr(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
|
|
786
|
-
/**
|
|
787
|
-
* @license
|
|
788
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
789
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
790
|
-
*/Ir({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Er(this.info)},mousedown(t){if(!yr(t))return;const e=Cr(t),i=this;xr(this.info,(t=>{yr(t)||(Rr("up",e,t),Er(i.info))}),(t=>{yr(t)&&Rr("up",e,t),Er(i.info)})),Rr("down",e,t)},touchstart(t){Rr("down",Cr(t),t.changedTouches[0],t)},touchend(t){Rr("up",Cr(t),t.changedTouches[0],t)}}),Ir({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,Er(this.info)},mousedown(t){if(!yr(t))return;const e=Cr(t),i=this,r=t=>{const r=t.clientX,s=t.clientY;Mr(i.info,r,s)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&zr("tap"),i.info.addMove({x:r,y:s}),yr(t)||(i.info.state="end",Er(i.info)),e&&Pr(i.info,e,t),i.info.started=!0)};xr(this.info,r,(t=>{i.info.started&&r(t),Er(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=Cr(t),i=t.changedTouches[0],r=i.clientX,s=i.clientY;Mr(this.info,r,s)&&("start"===this.info.state&&zr("tap"),this.info.addMove({x:r,y:s}),Pr(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Cr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Pr(this.info,e,i))}}),Ir({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){yr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){yr(t)&&Gr(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Gr(this.info,t.changedTouches[0],t)}});const Fr=Wt((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()}})),Lr=Wt((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){}})),Ur=t=>class extends(Fr(Lr(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Tr(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Tr(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)}}
|
|
791
|
-
/**
|
|
792
|
-
* @license
|
|
793
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
794
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
795
|
-
*/;
|
|
796
|
-
/**
|
|
797
|
-
* @license
|
|
798
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
799
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
800
|
-
*/let jr=!1;function Br(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function Vr(t,e){const i=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===i||0===r?r>i:i>r}function qr(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)Vr(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(qr(t.slice(0,i)),qr(t.slice(i)))}function Hr(t){return t.getRootNode().activeElement===t}function $r(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let s=r>0;r>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{s=$r(t,e)||s})),s}window.addEventListener("keydown",(()=>{jr=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{jr=!1}),{capture:!0});
|
|
801
|
-
/**
|
|
802
|
-
* @license
|
|
803
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
804
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
805
|
-
*/
|
|
806
|
-
const Wr=Wt((t=>class extends t{get _keyboardActive(){return jr}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}})),Yr=t=>class extends(Fr(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)}}
|
|
807
|
-
/**
|
|
808
|
-
* @license
|
|
809
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
810
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
811
|
-
*/,Xr=Wt((t=>class extends(Wr(Yr(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)}})),Kr=Wt((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)}})),Qr=Wt((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}})),Jr=Wt((t=>class extends(Kr(Fr(Qr(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}}));
|
|
812
|
-
/**
|
|
813
|
-
* @license
|
|
814
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
815
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
816
|
-
*/
|
|
817
|
-
/**
|
|
818
|
-
* @license
|
|
819
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
820
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
821
|
-
*/
|
|
822
|
-
class Zr extends lr{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}
|
|
823
|
-
/**
|
|
824
|
-
* @license
|
|
825
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
826
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
827
|
-
*/const ts=Wt((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}}));
|
|
828
|
-
/**
|
|
829
|
-
* @license
|
|
830
|
-
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
831
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
832
|
-
*/class es extends lr{constructor(t,e,i,r={}){super(t,e,i,{...r,useUniqueId:!0})}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType!==Node.ELEMENT_NODE||this.multiple&&this.nodes&&t!==this.nodes[0]||t.id||(t.id=this.defaultId)}}
|
|
833
|
-
/**
|
|
834
|
-
* @license
|
|
835
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
836
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
837
|
-
*/class is extends es{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
|
|
838
|
-
/**
|
|
839
|
-
* @license
|
|
840
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
841
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
842
|
-
*/const rs=Wt((t=>class extends(ts(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new is(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
|
|
843
|
-
/**
|
|
844
|
-
* @license
|
|
845
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
846
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
847
|
-
*/class ss{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
|
|
848
|
-
/**
|
|
849
|
-
* @license
|
|
850
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
851
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
852
|
-
*/const os=t=>class extends(rs(Jr(Xr(Ur(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("checkbox"),this.value="on"}ready(){super.ready(),this.addController(new Zr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ss(this.inputElement,this._labelController))}_shouldSetActive(t){return"a"!==t.target.localName&&super._shouldSetActive(t)}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}}
|
|
853
|
-
/**
|
|
854
|
-
* @license
|
|
855
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
856
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
857
|
-
*/;
|
|
858
|
-
/**
|
|
859
|
-
* @license
|
|
860
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
861
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
862
|
-
*/
|
|
863
|
-
vt("vaadin-checkbox",f`
|
|
864
|
-
:host {
|
|
865
|
-
display: inline-block;
|
|
866
|
-
}
|
|
867
|
-
|
|
868
|
-
:host([hidden]) {
|
|
869
|
-
display: none !important;
|
|
870
|
-
}
|
|
871
|
-
|
|
872
|
-
:host([disabled]) {
|
|
873
|
-
-webkit-tap-highlight-color: transparent;
|
|
874
|
-
}
|
|
875
|
-
|
|
876
|
-
.vaadin-checkbox-container {
|
|
877
|
-
display: grid;
|
|
878
|
-
grid-template-columns: auto 1fr;
|
|
879
|
-
align-items: baseline;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
[part='checkbox'],
|
|
883
|
-
::slotted(input),
|
|
884
|
-
::slotted(label) {
|
|
885
|
-
grid-row: 1;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
[part='checkbox'],
|
|
889
|
-
::slotted(input) {
|
|
890
|
-
grid-column: 1;
|
|
891
|
-
}
|
|
892
|
-
|
|
893
|
-
[part='checkbox'] {
|
|
894
|
-
width: var(--vaadin-checkbox-size, 1em);
|
|
895
|
-
height: var(--vaadin-checkbox-size, 1em);
|
|
896
|
-
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
897
|
-
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
898
|
-
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
[part='checkbox']::before {
|
|
902
|
-
display: block;
|
|
903
|
-
content: '\\202F';
|
|
904
|
-
line-height: var(--vaadin-checkbox-size, 1em);
|
|
905
|
-
contain: paint;
|
|
906
|
-
}
|
|
907
|
-
|
|
908
|
-
/* visually hidden */
|
|
909
|
-
::slotted(input) {
|
|
910
|
-
opacity: 0;
|
|
911
|
-
cursor: inherit;
|
|
912
|
-
margin: 0;
|
|
913
|
-
align-self: stretch;
|
|
914
|
-
-webkit-appearance: none;
|
|
915
|
-
width: initial;
|
|
916
|
-
height: initial;
|
|
917
|
-
}
|
|
918
|
-
|
|
919
|
-
@media (forced-colors: active) {
|
|
920
|
-
[part='checkbox'] {
|
|
921
|
-
outline: 1px solid;
|
|
922
|
-
outline-offset: -1px;
|
|
923
|
-
}
|
|
924
|
-
|
|
925
|
-
:host([disabled]) [part='checkbox'],
|
|
926
|
-
:host([disabled]) [part='checkbox']::after {
|
|
927
|
-
outline-color: GrayText;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
:host(:is([checked], [indeterminate])) [part='checkbox']::after {
|
|
931
|
-
outline: 1px solid;
|
|
932
|
-
outline-offset: -1px;
|
|
933
|
-
border-radius: inherit;
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
:host([focused]) [part='checkbox'],
|
|
937
|
-
:host([focused]) [part='checkbox']::after {
|
|
938
|
-
outline-width: 2px;
|
|
939
|
-
}
|
|
940
|
-
}
|
|
941
|
-
`,{moduleId:"vaadin-checkbox-styles"});class ns extends(os(er(wt(Oi)))){static get is(){return"vaadin-checkbox"}static get template(){return Ti`
|
|
942
|
-
<div class="vaadin-checkbox-container">
|
|
943
|
-
<div part="checkbox" aria-hidden="true"></div>
|
|
944
|
-
<slot name="input"></slot>
|
|
945
|
-
<slot name="label"></slot>
|
|
946
|
-
</div>
|
|
947
|
-
<slot name="tooltip"></slot>
|
|
948
|
-
`}ready(){super.ready(),this._tooltipController=new hr(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}l(ns);
|
|
949
|
-
/**
|
|
950
|
-
* @license
|
|
951
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
952
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
953
|
-
*/
|
|
954
|
-
const as=f`
|
|
955
|
-
:host([has-helper]) [part='helper-text']::before {
|
|
956
|
-
content: '';
|
|
957
|
-
display: block;
|
|
958
|
-
height: 0.4em;
|
|
959
|
-
}
|
|
960
|
-
|
|
961
|
-
[part='helper-text'] {
|
|
962
|
-
display: block;
|
|
963
|
-
color: var(--lumo-secondary-text-color);
|
|
964
|
-
font-size: var(--lumo-font-size-xs);
|
|
965
|
-
line-height: var(--lumo-line-height-xs);
|
|
966
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
967
|
-
transition: color 0.2s;
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
:host(:hover:not([readonly])) [part='helper-text'] {
|
|
971
|
-
color: var(--lumo-body-text-color);
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
:host([disabled]) [part='helper-text'] {
|
|
975
|
-
color: var(--lumo-disabled-text-color);
|
|
976
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
|
|
980
|
-
display: none;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
|
|
984
|
-
content: '';
|
|
985
|
-
display: block;
|
|
986
|
-
height: 0.4em;
|
|
987
|
-
}
|
|
988
|
-
|
|
989
|
-
:host([has-helper][theme~='helper-above-field']) [part='label'] {
|
|
990
|
-
order: 0;
|
|
991
|
-
padding-bottom: 0.4em;
|
|
992
|
-
}
|
|
993
|
-
|
|
994
|
-
:host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
|
|
995
|
-
order: 1;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
:host([has-helper][theme~='helper-above-field']) [part='label'] + * {
|
|
999
|
-
order: 2;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
:host([has-helper][theme~='helper-above-field']) [part='error-message'] {
|
|
1003
|
-
order: 3;
|
|
1004
|
-
}
|
|
1005
|
-
`
|
|
1006
|
-
/**
|
|
1007
|
-
* @license
|
|
1008
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1009
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1010
|
-
*/,ls=f`
|
|
1011
|
-
[part='label'] {
|
|
1012
|
-
align-self: flex-start;
|
|
1013
|
-
color: var(--lumo-secondary-text-color);
|
|
1014
|
-
font-weight: 500;
|
|
1015
|
-
font-size: var(--lumo-font-size-s);
|
|
1016
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1017
|
-
transition: color 0.2s;
|
|
1018
|
-
line-height: 1;
|
|
1019
|
-
padding-right: 1em;
|
|
1020
|
-
padding-bottom: 0.5em;
|
|
1021
|
-
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
1022
|
-
negative margin to compensate */
|
|
1023
|
-
padding-top: 0.25em;
|
|
1024
|
-
margin-top: -0.25em;
|
|
1025
|
-
overflow: hidden;
|
|
1026
|
-
white-space: nowrap;
|
|
1027
|
-
text-overflow: ellipsis;
|
|
1028
|
-
position: relative;
|
|
1029
|
-
max-width: 100%;
|
|
1030
|
-
box-sizing: border-box;
|
|
1031
|
-
}
|
|
1032
|
-
|
|
1033
|
-
:host([has-label])::before {
|
|
1034
|
-
margin-top: calc(var(--lumo-font-size-s) * 1.5);
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
:host([has-label][theme~='small'])::before {
|
|
1038
|
-
margin-top: calc(var(--lumo-font-size-xs) * 1.5);
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
:host([has-label]) {
|
|
1042
|
-
padding-top: var(--lumo-space-m);
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
:host([has-label]) ::slotted([slot='tooltip']) {
|
|
1046
|
-
--vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
|
|
1047
|
-
}
|
|
1048
|
-
|
|
1049
|
-
:host([required]) [part='required-indicator']::after {
|
|
1050
|
-
content: var(--lumo-required-field-indicator, '\\2022');
|
|
1051
|
-
transition: opacity 0.2s;
|
|
1052
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
|
|
1053
|
-
position: absolute;
|
|
1054
|
-
right: 0;
|
|
1055
|
-
width: 1em;
|
|
1056
|
-
text-align: center;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
:host([invalid]) [part='required-indicator']::after {
|
|
1060
|
-
color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
|
|
1061
|
-
}
|
|
1062
|
-
|
|
1063
|
-
[part='error-message'] {
|
|
1064
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
1065
|
-
font-size: var(--lumo-font-size-xs);
|
|
1066
|
-
line-height: var(--lumo-line-height-xs);
|
|
1067
|
-
color: var(--lumo-error-text-color);
|
|
1068
|
-
will-change: max-height;
|
|
1069
|
-
transition: 0.4s max-height;
|
|
1070
|
-
max-height: 5em;
|
|
1071
|
-
}
|
|
1072
|
-
|
|
1073
|
-
:host([has-error-message]) [part='error-message']::before,
|
|
1074
|
-
:host([has-error-message]) [part='error-message']::after {
|
|
1075
|
-
content: '';
|
|
1076
|
-
display: block;
|
|
1077
|
-
height: 0.4em;
|
|
1078
|
-
}
|
|
1079
|
-
|
|
1080
|
-
:host(:not([invalid])) [part='error-message'] {
|
|
1081
|
-
max-height: 0;
|
|
1082
|
-
overflow: hidden;
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
/* RTL specific styles */
|
|
1086
|
-
|
|
1087
|
-
:host([dir='rtl']) [part='label'] {
|
|
1088
|
-
margin-left: 0;
|
|
1089
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1090
|
-
}
|
|
1091
|
-
|
|
1092
|
-
:host([dir='rtl']) [part='label'] {
|
|
1093
|
-
padding-left: 1em;
|
|
1094
|
-
padding-right: 0;
|
|
1095
|
-
}
|
|
1096
|
-
|
|
1097
|
-
:host([dir='rtl']) [part='required-indicator']::after {
|
|
1098
|
-
right: auto;
|
|
1099
|
-
left: 0;
|
|
1100
|
-
}
|
|
1101
|
-
|
|
1102
|
-
:host([dir='rtl']) [part='error-message'] {
|
|
1103
|
-
margin-left: 0;
|
|
1104
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
1105
|
-
}
|
|
1106
|
-
`;vt("",ls,{moduleId:"lumo-required-field"}),vt("vaadin-checkbox-group",[ls,as,f`
|
|
1107
|
-
:host {
|
|
1108
|
-
color: var(--lumo-body-text-color);
|
|
1109
|
-
font-size: var(--lumo-font-size-m);
|
|
1110
|
-
font-family: var(--lumo-font-family);
|
|
1111
|
-
-webkit-font-smoothing: antialiased;
|
|
1112
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1113
|
-
-webkit-tap-highlight-color: transparent;
|
|
1114
|
-
padding: var(--lumo-space-xs) 0;
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
:host::before {
|
|
1118
|
-
/* Effective height of vaadin-checkbox */
|
|
1119
|
-
height: var(--lumo-size-s);
|
|
1120
|
-
box-sizing: border-box;
|
|
1121
|
-
display: inline-flex;
|
|
1122
|
-
align-items: center;
|
|
1123
|
-
}
|
|
1124
|
-
|
|
1125
|
-
:host([theme~='vertical']) [part='group-field'] {
|
|
1126
|
-
flex-direction: column;
|
|
1127
|
-
}
|
|
1128
|
-
|
|
1129
|
-
:host([disabled]) [part='label'] {
|
|
1130
|
-
color: var(--lumo-disabled-text-color);
|
|
1131
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1132
|
-
}
|
|
1133
|
-
|
|
1134
|
-
:host([focused]:not([disabled])) [part='label'] {
|
|
1135
|
-
color: var(--lumo-primary-text-color);
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
:host(:hover:not([disabled]):not([focused])) [part='label'],
|
|
1139
|
-
:host(:hover:not([disabled]):not([focused])) [part='helper-text'] {
|
|
1140
|
-
color: var(--lumo-body-text-color);
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
/* Touch device adjustment */
|
|
1144
|
-
@media (pointer: coarse) {
|
|
1145
|
-
:host(:hover:not([disabled]):not([focused])) [part='label'] {
|
|
1146
|
-
color: var(--lumo-secondary-text-color);
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
`],{moduleId:"lumo-checkbox-group"});
|
|
1150
|
-
/**
|
|
1151
|
-
* @license
|
|
1152
|
-
* Copyright (c) 2023 Vaadin Ltd.
|
|
1153
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1154
|
-
*/
|
|
1155
|
-
const hs=new Map;function cs(t){return hs.has(t)||hs.set(t,new WeakMap),hs.get(t)}function us(t,e){t&&t.removeAttribute(e)}function ds(t,e){if(!t||!e)return;const i=cs(e);if(i.has(t))return;const r=ir(t.getAttribute(e));i.set(t,new Set(r))}function ps(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:r,oldId:s,fromUser:o}=i,n=cs(e),a=n.get(t);if(!o&&a)return s&&a.delete(s),void(r&&a.add(r));o&&(a?r||n.delete(t):ds(t,e),us(t,e)),function(t,e,i){const r=ir(t.getAttribute(e));r.delete(i),0!==r.size?t.setAttribute(e,rr(r)):t.removeAttribute(e)}(t,e,s);const l=r||rr(a);l&&sr(t,e,l)}
|
|
1156
|
-
/**
|
|
1157
|
-
* @license
|
|
1158
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1159
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1160
|
-
*/
|
|
1161
|
-
class ms{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){var e;this.__target&&(t?(ds(e=this.__target,"aria-labelledby"),us(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=cs(e),r=i.get(t);r&&0!==r.size?sr(t,e,rr(r)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){ps(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){ps(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){ps(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
|
|
1162
|
-
/**
|
|
1163
|
-
* @license
|
|
1164
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1165
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1166
|
-
*/class fs extends es{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,r=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=r?e:"",t.hidden=!r,r?t.setAttribute("role","alert"):t.removeAttribute("role")),super.updateDefaultNode(t)}}
|
|
1167
|
-
/**
|
|
1168
|
-
* @license
|
|
1169
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1170
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1171
|
-
*/class vs extends es{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)}}
|
|
1172
|
-
/**
|
|
1173
|
-
* @license
|
|
1174
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1175
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1176
|
-
*/const gs=Wt((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}})),_s=t=>class extends(gs(rs(ts(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 ms(this),this._helperController=new vs(this),this._errorController=new fs(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)}))}}
|
|
1177
|
-
/**
|
|
1178
|
-
* @license
|
|
1179
|
-
* Copyright (c) 2018 - 2023 Vaadin Ltd.
|
|
1180
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1181
|
-
*/;
|
|
1182
|
-
/**
|
|
1183
|
-
* @license
|
|
1184
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1185
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1186
|
-
*/class bs extends(_s(Wr(Fr(er(wt(Oi)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return Ti`
|
|
1187
|
-
<style>
|
|
1188
|
-
:host {
|
|
1189
|
-
display: inline-flex;
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
:host::before {
|
|
1193
|
-
content: '\\2003';
|
|
1194
|
-
width: 0;
|
|
1195
|
-
display: inline-block;
|
|
1196
|
-
}
|
|
1197
|
-
|
|
1198
|
-
:host([hidden]) {
|
|
1199
|
-
display: none !important;
|
|
1200
|
-
}
|
|
1201
|
-
|
|
1202
|
-
.vaadin-group-field-container {
|
|
1203
|
-
display: flex;
|
|
1204
|
-
flex-direction: column;
|
|
1205
|
-
width: 100%;
|
|
1206
|
-
}
|
|
1207
|
-
|
|
1208
|
-
[part='group-field'] {
|
|
1209
|
-
display: flex;
|
|
1210
|
-
flex-wrap: wrap;
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
:host(:not([has-label])) [part='label'] {
|
|
1214
|
-
display: none;
|
|
1215
|
-
}
|
|
1216
|
-
</style>
|
|
1217
|
-
|
|
1218
|
-
<div class="vaadin-group-field-container">
|
|
1219
|
-
<div part="label">
|
|
1220
|
-
<slot name="label"></slot>
|
|
1221
|
-
<span part="required-indicator" aria-hidden="true"></span>
|
|
1222
|
-
</div>
|
|
1223
|
-
|
|
1224
|
-
<div part="group-field">
|
|
1225
|
-
<slot></slot>
|
|
1226
|
-
</div>
|
|
1227
|
-
|
|
1228
|
-
<div part="helper-text">
|
|
1229
|
-
<slot name="helper"></slot>
|
|
1230
|
-
</div>
|
|
1231
|
-
|
|
1232
|
-
<div part="error-message">
|
|
1233
|
-
<slot name="error-message"></slot>
|
|
1234
|
-
</div>
|
|
1235
|
-
</div>
|
|
1236
|
-
|
|
1237
|
-
<slot name="tooltip"></slot>
|
|
1238
|
-
`}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new hr(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new or(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),r=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),r.forEach(this.__unregisterCheckbox);const s=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(s),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof ns))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}l(bs);const ys=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{class:"checkboxgroup__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};ys.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}vaadin-checkbox-group{margin-top:5px;margin-left:40px}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__input{vertical-align:baseline}.checkboxgroup__input[indeterminate]::part(checkbox)::after,.checkboxgroup__input[indeterminate]::part(checkbox),.checkboxgroup__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;padding-left:10px;vertical-align:baseline}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}.checkbox__input[indeterminate]::part(checkbox),.checkbox__input[checked]::part(checkbox){background-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}';const ws=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleLabelClick=t=>{t.stopPropagation()}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,onClick:this.handleLabelClick},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{class:"checkbox__error-message"},this.errorMessage),i("div",{class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{class:"checkbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ws.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.checkbox__label-text{font-size:16px}.checkbox__label a{color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-100, #E6E6E6);color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}',vt("vaadin-input-container",f`
|
|
1239
|
-
:host {
|
|
1240
|
-
background-color: var(--lumo-contrast-10pct);
|
|
1241
|
-
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
1242
|
-
font-weight: 500;
|
|
1243
|
-
line-height: 1;
|
|
1244
|
-
position: relative;
|
|
1245
|
-
cursor: text;
|
|
1246
|
-
box-sizing: border-box;
|
|
1247
|
-
border-radius:
|
|
1248
|
-
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
|
1249
|
-
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
1250
|
-
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
1251
|
-
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
|
1252
|
-
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
|
1253
|
-
/* Fallback */
|
|
1254
|
-
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
|
1255
|
-
/* Default field border color */
|
|
1256
|
-
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
:host([dir='rtl']) {
|
|
1260
|
-
border-radius:
|
|
1261
|
-
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
1262
|
-
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
1263
|
-
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
1264
|
-
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
|
1265
|
-
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
|
1266
|
-
}
|
|
1267
|
-
|
|
1268
|
-
/* Used for hover and activation effects */
|
|
1269
|
-
:host::after {
|
|
1270
|
-
content: '';
|
|
1271
|
-
position: absolute;
|
|
1272
|
-
inset: 0;
|
|
1273
|
-
border-radius: inherit;
|
|
1274
|
-
pointer-events: none;
|
|
1275
|
-
background-color: var(--lumo-contrast-50pct);
|
|
1276
|
-
opacity: 0;
|
|
1277
|
-
transition: transform 0.15s, opacity 0.2s;
|
|
1278
|
-
transform-origin: 100% 0;
|
|
1279
|
-
}
|
|
1280
|
-
|
|
1281
|
-
::slotted(:not([slot$='fix'])) {
|
|
1282
|
-
cursor: inherit;
|
|
1283
|
-
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
1284
|
-
padding: 0 0.25em;
|
|
1285
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
1286
|
-
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
1287
|
-
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
1288
|
-
}
|
|
1289
|
-
|
|
1290
|
-
/* Read-only */
|
|
1291
|
-
:host([readonly]) {
|
|
1292
|
-
color: var(--lumo-secondary-text-color);
|
|
1293
|
-
background-color: transparent;
|
|
1294
|
-
cursor: default;
|
|
1295
|
-
}
|
|
1296
|
-
|
|
1297
|
-
:host([readonly])::after {
|
|
1298
|
-
background-color: transparent;
|
|
1299
|
-
opacity: 1;
|
|
1300
|
-
border: 1px dashed var(--lumo-contrast-30pct);
|
|
1301
|
-
}
|
|
1302
|
-
|
|
1303
|
-
/* Disabled */
|
|
1304
|
-
:host([disabled]) {
|
|
1305
|
-
background-color: var(--lumo-contrast-5pct);
|
|
1306
|
-
}
|
|
1307
|
-
|
|
1308
|
-
:host([disabled]) ::slotted(*) {
|
|
1309
|
-
color: var(--lumo-disabled-text-color);
|
|
1310
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
/* Invalid */
|
|
1314
|
-
:host([invalid]) {
|
|
1315
|
-
background-color: var(--lumo-error-color-10pct);
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
|
-
:host([invalid])::after {
|
|
1319
|
-
background-color: var(--lumo-error-color-50pct);
|
|
1320
|
-
}
|
|
1321
|
-
|
|
1322
|
-
/* Slotted icons */
|
|
1323
|
-
::slotted(vaadin-icon) {
|
|
1324
|
-
color: var(--lumo-contrast-60pct);
|
|
1325
|
-
width: var(--lumo-icon-size-m);
|
|
1326
|
-
height: var(--lumo-icon-size-m);
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
1330
|
-
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
1331
|
-
padding: 0.25em;
|
|
1332
|
-
box-sizing: border-box !important;
|
|
1333
|
-
}
|
|
1334
|
-
|
|
1335
|
-
/* Text align */
|
|
1336
|
-
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1337
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
1338
|
-
}
|
|
1339
|
-
|
|
1340
|
-
@-moz-document url-prefix() {
|
|
1341
|
-
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1342
|
-
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
1343
|
-
}
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
1347
|
-
text-align: start;
|
|
1348
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1349
|
-
}
|
|
1350
|
-
|
|
1351
|
-
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
1352
|
-
text-align: center;
|
|
1353
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1354
|
-
}
|
|
1355
|
-
|
|
1356
|
-
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
1357
|
-
text-align: end;
|
|
1358
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
@-moz-document url-prefix() {
|
|
1362
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
1363
|
-
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
1364
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
1365
|
-
}
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
@-moz-document url-prefix() {
|
|
1369
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
1370
|
-
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
1371
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
/* RTL specific styles */
|
|
1376
|
-
:host([dir='rtl'])::after {
|
|
1377
|
-
transform-origin: 0% 0;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1381
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1385
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1386
|
-
}
|
|
1387
|
-
|
|
1388
|
-
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1389
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
@-moz-document url-prefix() {
|
|
1393
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
1394
|
-
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1395
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
1396
|
-
}
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
@-moz-document url-prefix() {
|
|
1400
|
-
/* Firefox is smart enough to align overflowing text to right */
|
|
1401
|
-
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
1402
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
`,{moduleId:"lumo-input-container"});
|
|
1406
|
-
/**
|
|
1407
|
-
* @license
|
|
1408
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1409
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1410
|
-
*/
|
|
1411
|
-
class xs extends(wt(Ji(Oi))){static get is(){return"vaadin-input-container"}static get template(){return Ti`
|
|
1412
|
-
<style>
|
|
1413
|
-
:host {
|
|
1414
|
-
display: flex;
|
|
1415
|
-
align-items: center;
|
|
1416
|
-
flex: 0 1 auto;
|
|
1417
|
-
border-radius:
|
|
1418
|
-
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
|
1419
|
-
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
|
1420
|
-
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
|
1421
|
-
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
|
1422
|
-
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
|
1423
|
-
--_border-radius: var(--vaadin-input-field-border-radius, 0px);
|
|
1424
|
-
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
1425
|
-
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
1426
|
-
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
1427
|
-
}
|
|
1428
|
-
|
|
1429
|
-
:host([dir='rtl']) {
|
|
1430
|
-
border-radius:
|
|
1431
|
-
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
1432
|
-
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
|
1433
|
-
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
|
1434
|
-
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
|
1435
|
-
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
:host([hidden]) {
|
|
1439
|
-
display: none !important;
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
/* Reset the native input styles */
|
|
1443
|
-
::slotted(input) {
|
|
1444
|
-
-webkit-appearance: none;
|
|
1445
|
-
-moz-appearance: none;
|
|
1446
|
-
flex: auto;
|
|
1447
|
-
white-space: nowrap;
|
|
1448
|
-
overflow: hidden;
|
|
1449
|
-
width: 100%;
|
|
1450
|
-
height: 100%;
|
|
1451
|
-
outline: none;
|
|
1452
|
-
margin: 0;
|
|
1453
|
-
padding: 0;
|
|
1454
|
-
border: 0;
|
|
1455
|
-
border-radius: 0;
|
|
1456
|
-
min-width: 0;
|
|
1457
|
-
font: inherit;
|
|
1458
|
-
line-height: normal;
|
|
1459
|
-
color: inherit;
|
|
1460
|
-
background-color: transparent;
|
|
1461
|
-
/* Disable default invalid style in Firefox */
|
|
1462
|
-
box-shadow: none;
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
::slotted(*) {
|
|
1466
|
-
flex: none;
|
|
1467
|
-
}
|
|
1468
|
-
|
|
1469
|
-
::slotted(:is(input, textarea))::placeholder {
|
|
1470
|
-
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
1471
|
-
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
1472
|
-
font: inherit;
|
|
1473
|
-
color: inherit;
|
|
1474
|
-
/* Override default opacity in Firefox */
|
|
1475
|
-
opacity: 1;
|
|
1476
|
-
}
|
|
1477
|
-
</style>
|
|
1478
|
-
<slot name="prefix"></slot>
|
|
1479
|
-
<slot></slot>
|
|
1480
|
-
<slot name="suffix"></slot>
|
|
1481
|
-
`}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}l(xs);
|
|
1482
|
-
/**
|
|
1483
|
-
* @license
|
|
1484
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1485
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1486
|
-
*/
|
|
1487
|
-
const Es=f`
|
|
1488
|
-
:host {
|
|
1489
|
-
top: var(--lumo-space-m);
|
|
1490
|
-
right: var(--lumo-space-m);
|
|
1491
|
-
bottom: var(--lumo-space-m);
|
|
1492
|
-
left: var(--lumo-space-m);
|
|
1493
|
-
/* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
|
|
1494
|
-
/* stylelint-disable-next-line */
|
|
1495
|
-
outline: 0px solid transparent;
|
|
1496
|
-
}
|
|
1497
|
-
|
|
1498
|
-
[part='overlay'] {
|
|
1499
|
-
background-color: var(--lumo-base-color);
|
|
1500
|
-
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
1501
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1502
|
-
box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
|
|
1503
|
-
color: var(--lumo-body-text-color);
|
|
1504
|
-
font-family: var(--lumo-font-family);
|
|
1505
|
-
font-size: var(--lumo-font-size-m);
|
|
1506
|
-
font-weight: 400;
|
|
1507
|
-
line-height: var(--lumo-line-height-m);
|
|
1508
|
-
letter-spacing: 0;
|
|
1509
|
-
text-transform: none;
|
|
1510
|
-
-webkit-text-size-adjust: 100%;
|
|
1511
|
-
-webkit-font-smoothing: antialiased;
|
|
1512
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1513
|
-
}
|
|
1514
|
-
|
|
1515
|
-
[part='content'] {
|
|
1516
|
-
padding: var(--lumo-space-xs);
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
[part='backdrop'] {
|
|
1520
|
-
background-color: var(--lumo-shade-20pct);
|
|
1521
|
-
animation: 0.2s lumo-overlay-backdrop-enter both;
|
|
1522
|
-
will-change: opacity;
|
|
1523
|
-
}
|
|
1524
|
-
|
|
1525
|
-
@keyframes lumo-overlay-backdrop-enter {
|
|
1526
|
-
0% {
|
|
1527
|
-
opacity: 0;
|
|
1528
|
-
}
|
|
1529
|
-
}
|
|
1530
|
-
|
|
1531
|
-
:host([closing]) [part='backdrop'] {
|
|
1532
|
-
animation: 0.2s lumo-overlay-backdrop-exit both;
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
@keyframes lumo-overlay-backdrop-exit {
|
|
1536
|
-
100% {
|
|
1537
|
-
opacity: 0;
|
|
1538
|
-
}
|
|
1539
|
-
}
|
|
1540
|
-
|
|
1541
|
-
@keyframes lumo-overlay-dummy-animation {
|
|
1542
|
-
0% {
|
|
1543
|
-
opacity: 1;
|
|
1544
|
-
}
|
|
1545
|
-
|
|
1546
|
-
100% {
|
|
1547
|
-
opacity: 1;
|
|
1548
|
-
}
|
|
1549
|
-
}
|
|
1550
|
-
`;vt("",Es,{moduleId:"lumo-overlay"});
|
|
1551
|
-
/**
|
|
1552
|
-
* @license
|
|
1553
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1554
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1555
|
-
*/
|
|
1556
|
-
const ks=f`
|
|
1557
|
-
:host([opening]),
|
|
1558
|
-
:host([closing]) {
|
|
1559
|
-
animation: 0.14s lumo-overlay-dummy-animation;
|
|
1560
|
-
}
|
|
1561
|
-
|
|
1562
|
-
[part='overlay'] {
|
|
1563
|
-
will-change: opacity, transform;
|
|
1564
|
-
}
|
|
1565
|
-
|
|
1566
|
-
:host([opening]) [part='overlay'] {
|
|
1567
|
-
animation: 0.1s lumo-menu-overlay-enter ease-out both;
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
@keyframes lumo-menu-overlay-enter {
|
|
1571
|
-
0% {
|
|
1572
|
-
opacity: 0;
|
|
1573
|
-
transform: translateY(-4px);
|
|
1574
|
-
}
|
|
1575
|
-
}
|
|
1576
|
-
|
|
1577
|
-
:host([closing]) [part='overlay'] {
|
|
1578
|
-
animation: 0.1s lumo-menu-overlay-exit both;
|
|
1579
|
-
}
|
|
1580
|
-
|
|
1581
|
-
@keyframes lumo-menu-overlay-exit {
|
|
1582
|
-
100% {
|
|
1583
|
-
opacity: 0;
|
|
1584
|
-
}
|
|
1585
|
-
}
|
|
1586
|
-
`;vt("",ks,{moduleId:"lumo-menu-overlay-core"});const Ss=[Es,ks,f`
|
|
1587
|
-
/* Small viewport (bottom sheet) styles */
|
|
1588
|
-
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
1589
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
1590
|
-
:host {
|
|
1591
|
-
top: 0 !important;
|
|
1592
|
-
right: 0 !important;
|
|
1593
|
-
bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
|
|
1594
|
-
left: 0 !important;
|
|
1595
|
-
align-items: stretch !important;
|
|
1596
|
-
justify-content: flex-end !important;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
[part='overlay'] {
|
|
1600
|
-
max-height: 50vh;
|
|
1601
|
-
width: 100vw;
|
|
1602
|
-
border-radius: 0;
|
|
1603
|
-
box-shadow: var(--lumo-box-shadow-xl);
|
|
1604
|
-
}
|
|
1605
|
-
|
|
1606
|
-
/* The content part scrolls instead of the overlay part, because of the gradient fade-out */
|
|
1607
|
-
[part='content'] {
|
|
1608
|
-
padding: 30px var(--lumo-space-m);
|
|
1609
|
-
max-height: inherit;
|
|
1610
|
-
box-sizing: border-box;
|
|
1611
|
-
-webkit-overflow-scrolling: touch;
|
|
1612
|
-
overflow: auto;
|
|
1613
|
-
-webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1614
|
-
mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
|
|
1615
|
-
}
|
|
1616
|
-
|
|
1617
|
-
[part='backdrop'] {
|
|
1618
|
-
display: block;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
/* Animations */
|
|
1622
|
-
|
|
1623
|
-
:host([opening]) [part='overlay'] {
|
|
1624
|
-
animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
|
|
1625
|
-
}
|
|
1626
|
-
|
|
1627
|
-
:host([closing]),
|
|
1628
|
-
:host([closing]) [part='backdrop'] {
|
|
1629
|
-
animation-delay: 0.14s;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
|
-
:host([closing]) [part='overlay'] {
|
|
1633
|
-
animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
|
|
1634
|
-
}
|
|
1635
|
-
}
|
|
1636
|
-
|
|
1637
|
-
@keyframes lumo-mobile-menu-overlay-enter {
|
|
1638
|
-
0% {
|
|
1639
|
-
transform: translateY(150%);
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
@keyframes lumo-mobile-menu-overlay-exit {
|
|
1644
|
-
100% {
|
|
1645
|
-
transform: translateY(150%);
|
|
1646
|
-
}
|
|
1647
|
-
}
|
|
1648
|
-
`];vt("",Ss,{moduleId:"lumo-menu-overlay"}),vt("vaadin-date-picker-overlay",[Ss,f`
|
|
1649
|
-
[part='overlay'] {
|
|
1650
|
-
/*
|
|
1651
|
-
Width:
|
|
1652
|
-
date cell widths
|
|
1653
|
-
+ month calendar side padding
|
|
1654
|
-
+ year scroller width
|
|
1655
|
-
*/
|
|
1656
|
-
/* prettier-ignore */
|
|
1657
|
-
width:
|
|
1658
|
-
calc(
|
|
1659
|
-
var(--lumo-size-m) * 7
|
|
1660
|
-
+ var(--lumo-space-xs) * 2
|
|
1661
|
-
+ 57px
|
|
1662
|
-
);
|
|
1663
|
-
height: 100%;
|
|
1664
|
-
max-height: calc(var(--lumo-size-m) * 14);
|
|
1665
|
-
overflow: hidden;
|
|
1666
|
-
-webkit-tap-highlight-color: transparent;
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
[part='overlay'] {
|
|
1670
|
-
flex-direction: column;
|
|
1671
|
-
}
|
|
1672
|
-
|
|
1673
|
-
[part='content'] {
|
|
1674
|
-
padding: 0;
|
|
1675
|
-
height: 100%;
|
|
1676
|
-
overflow: hidden;
|
|
1677
|
-
-webkit-mask-image: none;
|
|
1678
|
-
mask-image: none;
|
|
1679
|
-
}
|
|
1680
|
-
|
|
1681
|
-
:host([top-aligned]) [part~='overlay'] {
|
|
1682
|
-
margin-top: var(--lumo-space-xs);
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
:host([bottom-aligned]) [part~='overlay'] {
|
|
1686
|
-
margin-bottom: var(--lumo-space-xs);
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
1690
|
-
[part='overlay'] {
|
|
1691
|
-
width: 100vw;
|
|
1692
|
-
height: 70vh;
|
|
1693
|
-
max-height: 70vh;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
`],{moduleId:"lumo-date-picker-overlay"});const As=f`
|
|
1697
|
-
:host {
|
|
1698
|
-
/* Sizing */
|
|
1699
|
-
--lumo-button-size: var(--lumo-size-m);
|
|
1700
|
-
min-width: calc(var(--lumo-button-size) * 2);
|
|
1701
|
-
height: var(--lumo-button-size);
|
|
1702
|
-
padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
|
|
1703
|
-
margin: var(--lumo-space-xs) 0;
|
|
1704
|
-
box-sizing: border-box;
|
|
1705
|
-
/* Style */
|
|
1706
|
-
font-family: var(--lumo-font-family);
|
|
1707
|
-
font-size: var(--lumo-font-size-m);
|
|
1708
|
-
font-weight: 500;
|
|
1709
|
-
color: var(--_lumo-button-color, var(--lumo-primary-text-color));
|
|
1710
|
-
background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
|
|
1711
|
-
border-radius: var(--lumo-border-radius-m);
|
|
1712
|
-
cursor: var(--lumo-clickable-cursor);
|
|
1713
|
-
-webkit-tap-highlight-color: transparent;
|
|
1714
|
-
-webkit-font-smoothing: antialiased;
|
|
1715
|
-
-moz-osx-font-smoothing: grayscale;
|
|
1716
|
-
flex-shrink: 0;
|
|
1717
|
-
}
|
|
1718
|
-
|
|
1719
|
-
/* Set only for the internal parts so we don't affect the host vertical alignment */
|
|
1720
|
-
[part='label'],
|
|
1721
|
-
[part='prefix'],
|
|
1722
|
-
[part='suffix'] {
|
|
1723
|
-
line-height: var(--lumo-line-height-xs);
|
|
1724
|
-
}
|
|
1725
|
-
|
|
1726
|
-
[part='label'] {
|
|
1727
|
-
padding: calc(var(--lumo-button-size) / 6) 0;
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1730
|
-
:host([theme~='small']) {
|
|
1731
|
-
font-size: var(--lumo-font-size-s);
|
|
1732
|
-
--lumo-button-size: var(--lumo-size-s);
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
:host([theme~='large']) {
|
|
1736
|
-
font-size: var(--lumo-font-size-l);
|
|
1737
|
-
--lumo-button-size: var(--lumo-size-l);
|
|
1738
|
-
}
|
|
1739
|
-
|
|
1740
|
-
/* For interaction states */
|
|
1741
|
-
:host::before,
|
|
1742
|
-
:host::after {
|
|
1743
|
-
content: '';
|
|
1744
|
-
/* We rely on the host always being relative */
|
|
1745
|
-
position: absolute;
|
|
1746
|
-
z-index: 1;
|
|
1747
|
-
inset: 0;
|
|
1748
|
-
background-color: currentColor;
|
|
1749
|
-
border-radius: inherit;
|
|
1750
|
-
opacity: 0;
|
|
1751
|
-
pointer-events: none;
|
|
1752
|
-
}
|
|
1753
|
-
|
|
1754
|
-
/* Hover */
|
|
1755
|
-
|
|
1756
|
-
@media (any-hover: hover) {
|
|
1757
|
-
:host(:hover)::before {
|
|
1758
|
-
opacity: 0.02;
|
|
1759
|
-
}
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
/* Active */
|
|
1763
|
-
|
|
1764
|
-
:host::after {
|
|
1765
|
-
transition: opacity 1.4s, transform 0.1s;
|
|
1766
|
-
filter: blur(8px);
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
:host([active])::before {
|
|
1770
|
-
opacity: 0.05;
|
|
1771
|
-
transition-duration: 0s;
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
:host([active])::after {
|
|
1775
|
-
opacity: 0.1;
|
|
1776
|
-
transition-duration: 0s, 0s;
|
|
1777
|
-
transform: scale(0);
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
/* Keyboard focus */
|
|
1781
|
-
|
|
1782
|
-
:host([focus-ring]) {
|
|
1783
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
:host([theme~='primary'][focus-ring]) {
|
|
1787
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
1788
|
-
}
|
|
1789
|
-
|
|
1790
|
-
/* Types (primary, tertiary, tertiary-inline */
|
|
1791
|
-
|
|
1792
|
-
:host([theme~='tertiary']),
|
|
1793
|
-
:host([theme~='tertiary-inline']) {
|
|
1794
|
-
background-color: transparent !important;
|
|
1795
|
-
min-width: 0;
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
:host([theme~='tertiary']) {
|
|
1799
|
-
padding: 0 calc(var(--lumo-button-size) / 6);
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
:host([theme~='tertiary-inline'])::before {
|
|
1803
|
-
display: none;
|
|
1804
|
-
}
|
|
1805
|
-
|
|
1806
|
-
:host([theme~='tertiary-inline']) {
|
|
1807
|
-
margin: 0;
|
|
1808
|
-
height: auto;
|
|
1809
|
-
padding: 0;
|
|
1810
|
-
line-height: inherit;
|
|
1811
|
-
font-size: inherit;
|
|
1812
|
-
}
|
|
1813
|
-
|
|
1814
|
-
:host([theme~='tertiary-inline']) [part='label'] {
|
|
1815
|
-
padding: 0;
|
|
1816
|
-
overflow: visible;
|
|
1817
|
-
line-height: inherit;
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
:host([theme~='primary']) {
|
|
1821
|
-
background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
|
|
1822
|
-
color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
|
|
1823
|
-
font-weight: 600;
|
|
1824
|
-
min-width: calc(var(--lumo-button-size) * 2.5);
|
|
1825
|
-
}
|
|
1826
|
-
|
|
1827
|
-
:host([theme~='primary'])::before {
|
|
1828
|
-
background-color: black;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
@media (any-hover: hover) {
|
|
1832
|
-
:host([theme~='primary']:hover)::before {
|
|
1833
|
-
opacity: 0.05;
|
|
1834
|
-
}
|
|
1835
|
-
}
|
|
1836
|
-
|
|
1837
|
-
:host([theme~='primary'][active])::before {
|
|
1838
|
-
opacity: 0.1;
|
|
1839
|
-
}
|
|
1840
|
-
|
|
1841
|
-
:host([theme~='primary'][active])::after {
|
|
1842
|
-
opacity: 0.2;
|
|
1843
|
-
}
|
|
1844
|
-
|
|
1845
|
-
/* Colors (success, error, contrast) */
|
|
1846
|
-
|
|
1847
|
-
:host([theme~='success']) {
|
|
1848
|
-
color: var(--lumo-success-text-color);
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
:host([theme~='success'][theme~='primary']) {
|
|
1852
|
-
background-color: var(--lumo-success-color);
|
|
1853
|
-
color: var(--lumo-success-contrast-color);
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
:host([theme~='error']) {
|
|
1857
|
-
color: var(--lumo-error-text-color);
|
|
1858
|
-
}
|
|
1859
|
-
|
|
1860
|
-
:host([theme~='error'][theme~='primary']) {
|
|
1861
|
-
background-color: var(--lumo-error-color);
|
|
1862
|
-
color: var(--lumo-error-contrast-color);
|
|
1863
|
-
}
|
|
1864
|
-
|
|
1865
|
-
:host([theme~='contrast']) {
|
|
1866
|
-
color: var(--lumo-contrast);
|
|
1867
|
-
}
|
|
1868
|
-
|
|
1869
|
-
:host([theme~='contrast'][theme~='primary']) {
|
|
1870
|
-
background-color: var(--lumo-contrast);
|
|
1871
|
-
color: var(--lumo-base-color);
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
/* Disabled state. Keep selectors after other color variants. */
|
|
1875
|
-
|
|
1876
|
-
:host([disabled]) {
|
|
1877
|
-
pointer-events: none;
|
|
1878
|
-
color: var(--lumo-disabled-text-color);
|
|
1879
|
-
}
|
|
1880
|
-
|
|
1881
|
-
:host([theme~='primary'][disabled]) {
|
|
1882
|
-
background-color: var(--lumo-contrast-30pct);
|
|
1883
|
-
color: var(--lumo-base-color);
|
|
1884
|
-
}
|
|
1885
|
-
|
|
1886
|
-
:host([theme~='primary'][disabled]) [part] {
|
|
1887
|
-
opacity: 0.7;
|
|
1888
|
-
}
|
|
1889
|
-
|
|
1890
|
-
/* Icons */
|
|
1891
|
-
|
|
1892
|
-
[part] ::slotted(vaadin-icon) {
|
|
1893
|
-
display: inline-block;
|
|
1894
|
-
width: var(--lumo-icon-size-m);
|
|
1895
|
-
height: var(--lumo-icon-size-m);
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
1899
|
-
[part] ::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
1900
|
-
padding: 0.25em;
|
|
1901
|
-
box-sizing: border-box !important;
|
|
1902
|
-
}
|
|
1903
|
-
|
|
1904
|
-
[part='prefix'] {
|
|
1905
|
-
margin-left: -0.25em;
|
|
1906
|
-
margin-right: 0.25em;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
[part='suffix'] {
|
|
1910
|
-
margin-left: 0.25em;
|
|
1911
|
-
margin-right: -0.25em;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
/* Icon-only */
|
|
1915
|
-
|
|
1916
|
-
:host([theme~='icon']:not([theme~='tertiary-inline'])) {
|
|
1917
|
-
min-width: var(--lumo-button-size);
|
|
1918
|
-
padding-left: calc(var(--lumo-button-size) / 4);
|
|
1919
|
-
padding-right: calc(var(--lumo-button-size) / 4);
|
|
1920
|
-
}
|
|
1921
|
-
|
|
1922
|
-
:host([theme~='icon']) [part='prefix'],
|
|
1923
|
-
:host([theme~='icon']) [part='suffix'] {
|
|
1924
|
-
margin-left: 0;
|
|
1925
|
-
margin-right: 0;
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
/* RTL specific styles */
|
|
1929
|
-
|
|
1930
|
-
:host([dir='rtl']) [part='prefix'] {
|
|
1931
|
-
margin-left: 0.25em;
|
|
1932
|
-
margin-right: -0.25em;
|
|
1933
|
-
}
|
|
1934
|
-
|
|
1935
|
-
:host([dir='rtl']) [part='suffix'] {
|
|
1936
|
-
margin-left: -0.25em;
|
|
1937
|
-
margin-right: 0.25em;
|
|
1938
|
-
}
|
|
1939
|
-
|
|
1940
|
-
:host([dir='rtl'][theme~='icon']) [part='prefix'],
|
|
1941
|
-
:host([dir='rtl'][theme~='icon']) [part='suffix'] {
|
|
1942
|
-
margin-left: 0;
|
|
1943
|
-
margin-right: 0;
|
|
1944
|
-
}
|
|
1945
|
-
`;vt("vaadin-button",As,{moduleId:"lumo-button"});
|
|
1946
|
-
/**
|
|
1947
|
-
* @license
|
|
1948
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
1949
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1950
|
-
*/
|
|
1951
|
-
const Cs=f`
|
|
1952
|
-
:host {
|
|
1953
|
-
display: inline-block;
|
|
1954
|
-
position: relative;
|
|
1955
|
-
outline: none;
|
|
1956
|
-
white-space: nowrap;
|
|
1957
|
-
-webkit-user-select: none;
|
|
1958
|
-
-moz-user-select: none;
|
|
1959
|
-
user-select: none;
|
|
1960
|
-
}
|
|
1961
|
-
|
|
1962
|
-
:host([hidden]) {
|
|
1963
|
-
display: none !important;
|
|
1964
|
-
}
|
|
1965
|
-
|
|
1966
|
-
/* Aligns the button with form fields when placed on the same line.
|
|
1967
|
-
Note, to make it work, the form fields should have the same "::before" pseudo-element. */
|
|
1968
|
-
.vaadin-button-container::before {
|
|
1969
|
-
content: '\\2003';
|
|
1970
|
-
display: inline-block;
|
|
1971
|
-
width: 0;
|
|
1972
|
-
max-height: 100%;
|
|
1973
|
-
}
|
|
1974
|
-
|
|
1975
|
-
.vaadin-button-container {
|
|
1976
|
-
display: inline-flex;
|
|
1977
|
-
align-items: center;
|
|
1978
|
-
justify-content: center;
|
|
1979
|
-
text-align: center;
|
|
1980
|
-
width: 100%;
|
|
1981
|
-
height: 100%;
|
|
1982
|
-
min-height: inherit;
|
|
1983
|
-
text-shadow: inherit;
|
|
1984
|
-
}
|
|
1985
|
-
|
|
1986
|
-
[part='prefix'],
|
|
1987
|
-
[part='suffix'] {
|
|
1988
|
-
flex: none;
|
|
1989
|
-
}
|
|
1990
|
-
|
|
1991
|
-
[part='label'] {
|
|
1992
|
-
white-space: nowrap;
|
|
1993
|
-
overflow: hidden;
|
|
1994
|
-
text-overflow: ellipsis;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
@media (forced-colors: active) {
|
|
1998
|
-
:host {
|
|
1999
|
-
outline: 1px solid;
|
|
2000
|
-
outline-offset: -1px;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
:host([focused]) {
|
|
2004
|
-
outline-width: 2px;
|
|
2005
|
-
}
|
|
2006
|
-
|
|
2007
|
-
:host([disabled]) {
|
|
2008
|
-
outline-color: GrayText;
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
`,Ds=t=>class extends(Ur(Yr(Wr(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
|
|
2012
|
-
/**
|
|
2013
|
-
* @license
|
|
2014
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2015
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2016
|
-
*/;vt("vaadin-button",Cs,{moduleId:"vaadin-button-styles"});class Ts extends(Ds(er(wt(ts(Oi))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
|
|
2017
|
-
<div class="vaadin-button-container">
|
|
2018
|
-
<span part="prefix" aria-hidden="true">
|
|
2019
|
-
<slot name="prefix"></slot>
|
|
2020
|
-
</span>
|
|
2021
|
-
<span part="label">
|
|
2022
|
-
<slot></slot>
|
|
2023
|
-
</span>
|
|
2024
|
-
<span part="suffix" aria-hidden="true">
|
|
2025
|
-
<slot name="suffix"></slot>
|
|
2026
|
-
</span>
|
|
2027
|
-
</div>
|
|
2028
|
-
<slot name="tooltip"></slot>
|
|
2029
|
-
`
|
|
2030
|
-
/**
|
|
2031
|
-
* @license
|
|
2032
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2033
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2034
|
-
*/)(Ti)}ready(){super.ready(),this._tooltipController=new hr(this),this.addController(this._tooltipController)}}l(Ts),vt("vaadin-date-picker-year",f`
|
|
2035
|
-
:host([current]) [part='year-number'] {
|
|
2036
|
-
color: var(--lumo-primary-text-color);
|
|
2037
|
-
}
|
|
2038
|
-
|
|
2039
|
-
:host(:not([current])) [part='year-number'],
|
|
2040
|
-
[part='year-separator'] {
|
|
2041
|
-
opacity: var(--_lumo-date-picker-year-opacity, 0.7);
|
|
2042
|
-
transition: 0.2s opacity;
|
|
2043
|
-
}
|
|
2044
|
-
|
|
2045
|
-
[part='year-number'],
|
|
2046
|
-
[part='year-separator'] {
|
|
2047
|
-
display: flex;
|
|
2048
|
-
align-items: center;
|
|
2049
|
-
justify-content: center;
|
|
2050
|
-
height: 50%;
|
|
2051
|
-
transform: translateY(-50%);
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
[part='year-separator']::after {
|
|
2055
|
-
color: var(--lumo-disabled-text-color);
|
|
2056
|
-
content: '\\2022';
|
|
2057
|
-
}
|
|
2058
|
-
`,{moduleId:"lumo-date-picker-year"}),vt("vaadin-date-picker-overlay-content",f`
|
|
2059
|
-
:host {
|
|
2060
|
-
position: relative;
|
|
2061
|
-
/* Background for the year scroller, placed here as we are using a mask image on the actual years part */
|
|
2062
|
-
background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
|
|
2063
|
-
background-size: 57px 100%;
|
|
2064
|
-
background-position: top right;
|
|
2065
|
-
background-repeat: no-repeat;
|
|
2066
|
-
cursor: default;
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
::slotted([slot='months']) {
|
|
2070
|
-
/* Month calendar height:
|
|
2071
|
-
header height + margin-bottom
|
|
2072
|
-
+ weekdays height + margin-bottom
|
|
2073
|
-
+ date cell heights
|
|
2074
|
-
+ small margin between month calendars
|
|
2075
|
-
*/
|
|
2076
|
-
/* prettier-ignore */
|
|
2077
|
-
--vaadin-infinite-scroller-item-height:
|
|
2078
|
-
calc(
|
|
2079
|
-
var(--lumo-font-size-l) + var(--lumo-space-m)
|
|
2080
|
-
+ var(--lumo-font-size-xs) + var(--lumo-space-s)
|
|
2081
|
-
+ var(--lumo-size-m) * 6
|
|
2082
|
-
+ var(--lumo-space-s)
|
|
2083
|
-
);
|
|
2084
|
-
--vaadin-infinite-scroller-buffer-offset: 10%;
|
|
2085
|
-
-webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
2086
|
-
mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
|
|
2087
|
-
position: relative;
|
|
2088
|
-
margin-right: 57px;
|
|
2089
|
-
}
|
|
2090
|
-
|
|
2091
|
-
::slotted([slot='years']) {
|
|
2092
|
-
/* TODO get rid of fixed magic number */
|
|
2093
|
-
--vaadin-infinite-scroller-buffer-width: 97px;
|
|
2094
|
-
width: 57px;
|
|
2095
|
-
height: auto;
|
|
2096
|
-
top: 0;
|
|
2097
|
-
bottom: 0;
|
|
2098
|
-
font-size: var(--lumo-font-size-s);
|
|
2099
|
-
box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
|
|
2100
|
-
-webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
2101
|
-
mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
|
|
2102
|
-
cursor: var(--lumo-clickable-cursor);
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
::slotted([slot='years']:hover) {
|
|
2106
|
-
--_lumo-date-picker-year-opacity: 1;
|
|
2107
|
-
}
|
|
2108
|
-
|
|
2109
|
-
/* TODO unsupported selector */
|
|
2110
|
-
#scrollers {
|
|
2111
|
-
position: static;
|
|
2112
|
-
display: block;
|
|
2113
|
-
}
|
|
2114
|
-
|
|
2115
|
-
/* TODO fix this in vaadin-date-picker that it adapts to the width of the year scroller */
|
|
2116
|
-
:host([desktop]) ::slotted([slot='months']) {
|
|
2117
|
-
right: auto;
|
|
2118
|
-
}
|
|
2119
|
-
|
|
2120
|
-
/* Year scroller position indicator */
|
|
2121
|
-
::slotted([slot='years'])::before {
|
|
2122
|
-
border: none;
|
|
2123
|
-
width: 1em;
|
|
2124
|
-
height: 1em;
|
|
2125
|
-
background-color: var(--lumo-base-color);
|
|
2126
|
-
background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
|
|
2127
|
-
transform: translate(-75%, -50%) rotate(45deg);
|
|
2128
|
-
border-top-right-radius: var(--lumo-border-radius-s);
|
|
2129
|
-
box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
|
|
2130
|
-
z-index: 1;
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
[part='toolbar'] {
|
|
2134
|
-
padding: var(--lumo-space-s);
|
|
2135
|
-
border-bottom-left-radius: var(--lumo-border-radius-l);
|
|
2136
|
-
margin-right: 57px;
|
|
2137
|
-
}
|
|
2138
|
-
|
|
2139
|
-
[part='toolbar'] ::slotted(vaadin-button) {
|
|
2140
|
-
margin: 0;
|
|
2141
|
-
}
|
|
2142
|
-
|
|
2143
|
-
/* Narrow viewport mode (fullscreen) */
|
|
2144
|
-
|
|
2145
|
-
:host([fullscreen]) [part='toolbar'] {
|
|
2146
|
-
order: -1;
|
|
2147
|
-
background-color: var(--lumo-base-color);
|
|
2148
|
-
}
|
|
2149
|
-
|
|
2150
|
-
:host([fullscreen]) [part='overlay-header'] {
|
|
2151
|
-
order: -2;
|
|
2152
|
-
height: var(--lumo-size-m);
|
|
2153
|
-
padding: var(--lumo-space-s);
|
|
2154
|
-
position: absolute;
|
|
2155
|
-
left: 0;
|
|
2156
|
-
right: 0;
|
|
2157
|
-
justify-content: center;
|
|
2158
|
-
}
|
|
2159
|
-
|
|
2160
|
-
:host([fullscreen]) [part='toggle-button'],
|
|
2161
|
-
:host([fullscreen]) [part='clear-button'],
|
|
2162
|
-
[part='overlay-header'] [part='label'] {
|
|
2163
|
-
display: none;
|
|
2164
|
-
}
|
|
2165
|
-
|
|
2166
|
-
/* Very narrow screen (year scroller initially hidden) */
|
|
2167
|
-
|
|
2168
|
-
[part='years-toggle-button'] {
|
|
2169
|
-
display: flex;
|
|
2170
|
-
align-items: center;
|
|
2171
|
-
height: var(--lumo-size-s);
|
|
2172
|
-
padding: 0 0.5em;
|
|
2173
|
-
border-radius: var(--lumo-border-radius-m);
|
|
2174
|
-
z-index: 3;
|
|
2175
|
-
color: var(--lumo-primary-text-color);
|
|
2176
|
-
font-weight: 500;
|
|
2177
|
-
-webkit-font-smoothing: antialiased;
|
|
2178
|
-
-moz-osx-font-smoothing: grayscale;
|
|
2179
|
-
}
|
|
2180
|
-
|
|
2181
|
-
:host([years-visible]) [part='years-toggle-button'] {
|
|
2182
|
-
background-color: var(--lumo-primary-color);
|
|
2183
|
-
color: var(--lumo-primary-contrast-color);
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
/* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
|
|
2187
|
-
@media screen and (max-width: 374px) {
|
|
2188
|
-
:host {
|
|
2189
|
-
background-image: none;
|
|
2190
|
-
}
|
|
2191
|
-
|
|
2192
|
-
[part='toolbar'],
|
|
2193
|
-
::slotted([slot='months']) {
|
|
2194
|
-
margin-right: 0;
|
|
2195
|
-
}
|
|
2196
|
-
|
|
2197
|
-
/* TODO make date-picker adapt to the width of the years part */
|
|
2198
|
-
::slotted([slot='years']) {
|
|
2199
|
-
--vaadin-infinite-scroller-buffer-width: 90px;
|
|
2200
|
-
width: 50px;
|
|
2201
|
-
background-color: var(--lumo-shade-5pct);
|
|
2202
|
-
}
|
|
2203
|
-
|
|
2204
|
-
:host([years-visible]) ::slotted([slot='months']) {
|
|
2205
|
-
padding-left: 50px;
|
|
2206
|
-
}
|
|
2207
|
-
}
|
|
2208
|
-
`,{moduleId:"lumo-date-picker-overlay-content"}),vt("vaadin-month-calendar",f`
|
|
2209
|
-
:host {
|
|
2210
|
-
-moz-user-select: none;
|
|
2211
|
-
-webkit-user-select: none;
|
|
2212
|
-
-webkit-tap-highlight-color: transparent;
|
|
2213
|
-
user-select: none;
|
|
2214
|
-
font-size: var(--lumo-font-size-m);
|
|
2215
|
-
color: var(--lumo-body-text-color);
|
|
2216
|
-
text-align: center;
|
|
2217
|
-
padding: 0 var(--lumo-space-xs);
|
|
2218
|
-
}
|
|
2219
|
-
|
|
2220
|
-
/* Month header */
|
|
2221
|
-
|
|
2222
|
-
[part='month-header'] {
|
|
2223
|
-
color: var(--lumo-header-text-color);
|
|
2224
|
-
font-size: var(--lumo-font-size-l);
|
|
2225
|
-
line-height: 1;
|
|
2226
|
-
font-weight: 500;
|
|
2227
|
-
margin-bottom: var(--lumo-space-m);
|
|
2228
|
-
}
|
|
2229
|
-
|
|
2230
|
-
/* Week days and numbers */
|
|
2231
|
-
|
|
2232
|
-
[part='weekdays'],
|
|
2233
|
-
[part='weekday'],
|
|
2234
|
-
[part='week-number'] {
|
|
2235
|
-
font-size: var(--lumo-font-size-xxs);
|
|
2236
|
-
line-height: 1;
|
|
2237
|
-
color: var(--lumo-secondary-text-color);
|
|
2238
|
-
}
|
|
2239
|
-
|
|
2240
|
-
[part='weekdays'] {
|
|
2241
|
-
margin-bottom: var(--lumo-space-s);
|
|
2242
|
-
}
|
|
2243
|
-
|
|
2244
|
-
[part='weekday']:empty,
|
|
2245
|
-
[part='week-number'] {
|
|
2246
|
-
width: var(--lumo-size-xs);
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
/* Date and week number cells */
|
|
2250
|
-
|
|
2251
|
-
[part~='date'],
|
|
2252
|
-
[part='week-number'] {
|
|
2253
|
-
box-sizing: border-box;
|
|
2254
|
-
display: inline-flex;
|
|
2255
|
-
align-items: center;
|
|
2256
|
-
justify-content: center;
|
|
2257
|
-
height: var(--lumo-size-m);
|
|
2258
|
-
position: relative;
|
|
2259
|
-
}
|
|
2260
|
-
|
|
2261
|
-
[part~='date'] {
|
|
2262
|
-
transition: color 0.1s;
|
|
2263
|
-
}
|
|
2264
|
-
|
|
2265
|
-
[part~='date']:not(:empty) {
|
|
2266
|
-
cursor: var(--lumo-clickable-cursor);
|
|
2267
|
-
}
|
|
2268
|
-
|
|
2269
|
-
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
2270
|
-
:host([week-numbers]) [part~='date'] {
|
|
2271
|
-
width: calc((100% - var(--lumo-size-xs)) / 7);
|
|
2272
|
-
}
|
|
2273
|
-
|
|
2274
|
-
/* Today date */
|
|
2275
|
-
|
|
2276
|
-
[part~='date'][part~='today'] {
|
|
2277
|
-
color: var(--lumo-primary-text-color);
|
|
2278
|
-
}
|
|
2279
|
-
|
|
2280
|
-
/* Focused date */
|
|
2281
|
-
|
|
2282
|
-
[part~='date']::before {
|
|
2283
|
-
content: '';
|
|
2284
|
-
position: absolute;
|
|
2285
|
-
z-index: -1;
|
|
2286
|
-
top: 50%;
|
|
2287
|
-
left: 50%;
|
|
2288
|
-
transform: translate(-50%, -50%);
|
|
2289
|
-
min-width: 2em;
|
|
2290
|
-
min-height: 2em;
|
|
2291
|
-
width: 80%;
|
|
2292
|
-
height: 80%;
|
|
2293
|
-
max-height: 100%;
|
|
2294
|
-
max-width: 100%;
|
|
2295
|
-
border-radius: var(--lumo-border-radius-m);
|
|
2296
|
-
}
|
|
2297
|
-
|
|
2298
|
-
[part~='date'][part~='focused']::before {
|
|
2299
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
|
|
2300
|
-
}
|
|
2301
|
-
|
|
2302
|
-
:host(:not([focused])) [part~='date'][part~='focused']::before {
|
|
2303
|
-
animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
|
|
2304
|
-
}
|
|
2305
|
-
|
|
2306
|
-
@keyframes vaadin-date-picker-month-calendar-focus-date {
|
|
2307
|
-
50% {
|
|
2308
|
-
box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
|
|
2309
|
-
}
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
|
-
[part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {
|
|
2313
|
-
background-color: var(--lumo-primary-color-10pct);
|
|
2314
|
-
}
|
|
2315
|
-
|
|
2316
|
-
[part~='date'][part~='selected'] {
|
|
2317
|
-
color: var(--lumo-primary-contrast-color);
|
|
2318
|
-
}
|
|
2319
|
-
|
|
2320
|
-
[part~='date'][part~='selected']::before {
|
|
2321
|
-
background-color: var(--lumo-primary-color);
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
[part~='date'][part~='disabled'] {
|
|
2325
|
-
color: var(--lumo-disabled-text-color);
|
|
2326
|
-
}
|
|
2327
|
-
|
|
2328
|
-
@media (pointer: coarse) {
|
|
2329
|
-
[part~='date']:hover:not([part~='selected'])::before,
|
|
2330
|
-
[part~='focused']:not([part~='selected'])::before {
|
|
2331
|
-
display: none;
|
|
2332
|
-
}
|
|
2333
|
-
|
|
2334
|
-
[part~='date']:not(:empty):not([part~='disabled']):active::before {
|
|
2335
|
-
display: block;
|
|
2336
|
-
}
|
|
2337
|
-
|
|
2338
|
-
[part~='date'][part~='selected']::before {
|
|
2339
|
-
box-shadow: none;
|
|
2340
|
-
}
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
/* Disabled */
|
|
2344
|
-
|
|
2345
|
-
:host([disabled]) * {
|
|
2346
|
-
color: var(--lumo-disabled-text-color) !important;
|
|
2347
|
-
}
|
|
2348
|
-
`,{moduleId:"lumo-month-calendar"});const Is=document.createElement("template");Is.innerHTML="\n <style>\n @keyframes vaadin-date-picker-month-calendar-focus-date {\n 50% {\n box-shadow: 0 0 0 2px transparent;\n }\n }\n </style>\n",document.head.appendChild(Is.content);
|
|
2349
|
-
/**
|
|
2350
|
-
* @license
|
|
2351
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2352
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2353
|
-
*/
|
|
2354
|
-
const Os=f`
|
|
2355
|
-
[part$='button'] {
|
|
2356
|
-
flex: none;
|
|
2357
|
-
width: 1em;
|
|
2358
|
-
height: 1em;
|
|
2359
|
-
line-height: 1;
|
|
2360
|
-
font-size: var(--lumo-icon-size-m);
|
|
2361
|
-
text-align: center;
|
|
2362
|
-
color: var(--lumo-contrast-60pct);
|
|
2363
|
-
transition: 0.2s color;
|
|
2364
|
-
cursor: var(--lumo-clickable-cursor);
|
|
2365
|
-
}
|
|
2366
|
-
|
|
2367
|
-
[part$='button']:hover {
|
|
2368
|
-
color: var(--lumo-contrast-90pct);
|
|
2369
|
-
}
|
|
2370
|
-
|
|
2371
|
-
:host([disabled]) [part$='button'],
|
|
2372
|
-
:host([readonly]) [part$='button'] {
|
|
2373
|
-
color: var(--lumo-contrast-20pct);
|
|
2374
|
-
cursor: default;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
[part$='button']::before {
|
|
2378
|
-
font-family: 'lumo-icons';
|
|
2379
|
-
display: block;
|
|
2380
|
-
}
|
|
2381
|
-
`;vt("",Os,{moduleId:"lumo-field-button"});
|
|
2382
|
-
/**
|
|
2383
|
-
* @license
|
|
2384
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2385
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2386
|
-
*/
|
|
2387
|
-
const Ns=[ls,Os,as,f`
|
|
2388
|
-
:host {
|
|
2389
|
-
--lumo-text-field-size: var(--lumo-size-m);
|
|
2390
|
-
color: var(--lumo-body-text-color);
|
|
2391
|
-
font-size: var(--lumo-font-size-m);
|
|
2392
|
-
font-family: var(--lumo-font-family);
|
|
2393
|
-
-webkit-font-smoothing: antialiased;
|
|
2394
|
-
-moz-osx-font-smoothing: grayscale;
|
|
2395
|
-
-webkit-tap-highlight-color: transparent;
|
|
2396
|
-
padding: var(--lumo-space-xs) 0;
|
|
2397
|
-
}
|
|
2398
|
-
|
|
2399
|
-
:host::before {
|
|
2400
|
-
height: var(--lumo-text-field-size);
|
|
2401
|
-
box-sizing: border-box;
|
|
2402
|
-
display: inline-flex;
|
|
2403
|
-
align-items: center;
|
|
2404
|
-
}
|
|
2405
|
-
|
|
2406
|
-
:host([focused]:not([readonly])) [part='label'] {
|
|
2407
|
-
color: var(--lumo-primary-text-color);
|
|
2408
|
-
}
|
|
2409
|
-
|
|
2410
|
-
:host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
|
|
2411
|
-
-webkit-mask-image: none;
|
|
2412
|
-
mask-image: none;
|
|
2413
|
-
}
|
|
2414
|
-
|
|
2415
|
-
::slotted(:is(input, textarea):placeholder-shown) {
|
|
2416
|
-
color: var(--lumo-secondary-text-color);
|
|
2417
|
-
}
|
|
2418
|
-
|
|
2419
|
-
/* Hover */
|
|
2420
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2421
|
-
color: var(--lumo-body-text-color);
|
|
2422
|
-
}
|
|
2423
|
-
|
|
2424
|
-
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2425
|
-
opacity: 0.1;
|
|
2426
|
-
}
|
|
2427
|
-
|
|
2428
|
-
/* Touch device adjustment */
|
|
2429
|
-
@media (pointer: coarse) {
|
|
2430
|
-
:host(:hover:not([readonly]):not([focused])) [part='label'] {
|
|
2431
|
-
color: var(--lumo-secondary-text-color);
|
|
2432
|
-
}
|
|
2433
|
-
|
|
2434
|
-
:host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2435
|
-
opacity: 0;
|
|
2436
|
-
}
|
|
2437
|
-
|
|
2438
|
-
:host(:active:not([readonly]):not([focused])) [part='input-field']::after {
|
|
2439
|
-
opacity: 0.2;
|
|
2440
|
-
}
|
|
2441
|
-
}
|
|
2442
|
-
|
|
2443
|
-
/* Trigger when not focusing using the keyboard */
|
|
2444
|
-
:host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
|
|
2445
|
-
transform: scaleX(0);
|
|
2446
|
-
transition-duration: 0.15s, 1s;
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
|
-
/* Focus-ring */
|
|
2450
|
-
:host([focus-ring]) [part='input-field'] {
|
|
2451
|
-
box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
/* Read-only and disabled */
|
|
2455
|
-
:host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
|
|
2456
|
-
opacity: 0;
|
|
2457
|
-
}
|
|
2458
|
-
|
|
2459
|
-
/* Read-only style */
|
|
2460
|
-
:host([readonly]) {
|
|
2461
|
-
--vaadin-input-field-border-color: transparent;
|
|
2462
|
-
}
|
|
2463
|
-
|
|
2464
|
-
/* Disabled style */
|
|
2465
|
-
:host([disabled]) {
|
|
2466
|
-
pointer-events: none;
|
|
2467
|
-
--vaadin-input-field-border-color: var(--lumo-contrast-20pct);
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
:host([disabled]) [part='label'],
|
|
2471
|
-
:host([disabled]) [part='input-field'] ::slotted(*) {
|
|
2472
|
-
color: var(--lumo-disabled-text-color);
|
|
2473
|
-
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
2474
|
-
}
|
|
2475
|
-
|
|
2476
|
-
/* Invalid style */
|
|
2477
|
-
:host([invalid]) {
|
|
2478
|
-
--vaadin-input-field-border-color: var(--lumo-error-color);
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
:host([invalid][focus-ring]) [part='input-field'] {
|
|
2482
|
-
box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
:host([input-prevented]) [part='input-field'] {
|
|
2486
|
-
animation: shake 0.15s infinite;
|
|
2487
|
-
}
|
|
2488
|
-
|
|
2489
|
-
@keyframes shake {
|
|
2490
|
-
25% {
|
|
2491
|
-
transform: translateX(4px);
|
|
2492
|
-
}
|
|
2493
|
-
75% {
|
|
2494
|
-
transform: translateX(-4px);
|
|
2495
|
-
}
|
|
2496
|
-
}
|
|
2497
|
-
|
|
2498
|
-
/* Small theme */
|
|
2499
|
-
:host([theme~='small']) {
|
|
2500
|
-
font-size: var(--lumo-font-size-s);
|
|
2501
|
-
--lumo-text-field-size: var(--lumo-size-s);
|
|
2502
|
-
}
|
|
2503
|
-
|
|
2504
|
-
:host([theme~='small']) [part='label'] {
|
|
2505
|
-
font-size: var(--lumo-font-size-xs);
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
|
-
:host([theme~='small']) [part='error-message'] {
|
|
2509
|
-
font-size: var(--lumo-font-size-xxs);
|
|
2510
|
-
}
|
|
2511
|
-
|
|
2512
|
-
/* Slotted content */
|
|
2513
|
-
[part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
|
|
2514
|
-
color: var(--lumo-secondary-text-color);
|
|
2515
|
-
font-weight: 400;
|
|
2516
|
-
}
|
|
2517
|
-
|
|
2518
|
-
[part='clear-button']::before {
|
|
2519
|
-
content: var(--lumo-icons-cross);
|
|
2520
|
-
}
|
|
2521
|
-
`];vt("",Ns,{moduleId:"lumo-input-field-shared-styles"}),vt("vaadin-date-picker",[Ns,f`
|
|
2522
|
-
:host {
|
|
2523
|
-
outline: none;
|
|
2524
|
-
}
|
|
2525
|
-
|
|
2526
|
-
[part='toggle-button']::before {
|
|
2527
|
-
content: var(--lumo-icons-calendar);
|
|
2528
|
-
}
|
|
2529
|
-
|
|
2530
|
-
[part='clear-button']::before {
|
|
2531
|
-
content: var(--lumo-icons-cross);
|
|
2532
|
-
}
|
|
2533
|
-
|
|
2534
|
-
@media (max-width: 420px), (max-height: 420px) {
|
|
2535
|
-
[part='overlay-content'] {
|
|
2536
|
-
height: 70vh;
|
|
2537
|
-
}
|
|
2538
|
-
}
|
|
2539
|
-
|
|
2540
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input) {
|
|
2541
|
-
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
2542
|
-
}
|
|
2543
|
-
|
|
2544
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
2545
|
-
--_lumo-text-field-overflow-mask-image: none;
|
|
2546
|
-
}
|
|
2547
|
-
`],{moduleId:"lumo-date-picker"});
|
|
2548
|
-
/**
|
|
2549
|
-
@license
|
|
2550
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2551
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2552
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2553
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2554
|
-
Code distributed by Google as part of the polymer project is also
|
|
2555
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2556
|
-
*/
|
|
2557
|
-
let zs=!1,Rs=[],Ms=[];function Ps(t){const e=t[0],i=t[1],r=t[2];try{i.apply(e,r)}catch(t){setTimeout((()=>{throw t}))}}function Gs(t,e,i){zs||(zs=!0,requestAnimationFrame((function(){zs=!1,function(t){for(;t.length;)Ps(t.shift())}(Rs),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Ps(t.shift())}(Ms)}))}))),Ms.push([t,e,i])}
|
|
2558
|
-
/**
|
|
2559
|
-
* @license
|
|
2560
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2561
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2562
|
-
*/const Fs=t=>t.test(navigator.userAgent),Ls=t=>t.test(navigator.platform);Fs(/Android/u),Fs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor);const Us=Fs(/Firefox/u),js=Ls(/^iPad/u)||Ls(/^Mac/u)&&navigator.maxTouchPoints>1,Bs=Ls(/^iPhone/u)||js,Vs=Fs(/^((?!chrome|android).)*safari/iu),qs=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
|
|
2563
|
-
/**
|
|
2564
|
-
* @license
|
|
2565
|
-
* Copyright (c) 2017 Anton Korzunov
|
|
2566
|
-
* SPDX-License-Identifier: MIT
|
|
2567
|
-
*/
|
|
2568
|
-
let Hs=new WeakMap,$s=new WeakMap,Ws={},Ys=0;const Xs=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ks=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Qs=(t,e=document.body,i="data-aria-hidden")=>{const r=Array.from(Array.isArray(t)?t:[t]);return e&&r.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,r)=>{const s=((t,e)=>Xs(t)?e.map((e=>{if(!Xs(e))return Ks(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Ks(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Ks(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Ws[i]||(Ws[i]=new WeakMap);const o=Ws[i],n=[],a=new Set,l=new Set(s),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};s.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(r),s=null!==e&&"false"!==e,a=(Hs.get(t)||0)+1,l=(o.get(t)||0)+1;Hs.set(t,a),o.set(t,l),n.push(t),1===a&&s&&$s.set(t,!0),1===l&&t.setAttribute(i,"true"),s||t.setAttribute(r,"true")}}))};return c(e),a.clear(),Ys+=1,()=>{n.forEach((t=>{const e=Hs.get(t)-1,s=o.get(t)-1;Hs.set(t,e),o.set(t,s),e||($s.has(t)?$s.delete(t):t.removeAttribute(r)),s||t.removeAttribute(i)})),Ys-=1,Ys||(Hs=new WeakMap,Hs=new WeakMap,$s=new WeakMap,Ws={})}})(r,e,i,"aria-hidden")};
|
|
2569
|
-
/**
|
|
2570
|
-
* @license
|
|
2571
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2572
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2573
|
-
*/
|
|
2574
|
-
class Js{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=Qs(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
|
|
2575
|
-
/**
|
|
2576
|
-
* @license
|
|
2577
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2578
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2579
|
-
*/class Zs{saveFocus(t){this.focusNode=t||Br()}restoreFocus(){const t=this.focusNode;t&&(Br()===document.body?setTimeout((()=>t.focus())):t.focus(),this.focusNode=null)}}
|
|
2580
|
-
/**
|
|
2581
|
-
* @license
|
|
2582
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2583
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2584
|
-
*/const to=[];class eo{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return $r(t,e)?qr(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Hr).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");to.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,to.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(to).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
|
|
2585
|
-
/**
|
|
2586
|
-
* @license
|
|
2587
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2588
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2589
|
-
*/const io=t=>class extends(ts(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Js(this),this.__focusTrapController=new eo(this),this.__focusRestorationController=new Zs}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()&&this.__focusRestorationController.restoreFocus()}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=Br();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
|
|
2590
|
-
/**
|
|
2591
|
-
* @license
|
|
2592
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2593
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2594
|
-
*/,ro=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),so=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===ro().pop())()}bringToFront(){let t="";const e=ro().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ro().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=ro();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
|
|
2595
|
-
/**
|
|
2596
|
-
* @license
|
|
2597
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2598
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2599
|
-
*/,oo=t=>class extends(io(so(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Bs&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,r){const s=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const o=this._oldRenderer!==t;this._oldRenderer=t;const n=this._oldOpened!==r;this._oldOpened=r,o&&(this.innerHTML="",delete this._$litPart$),r&&t&&(o||n||s)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Gs(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,r=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",r),delete this[i])};this[i]=r,this.addEventListener("animationend",r)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
|
|
2600
|
-
/**
|
|
2601
|
-
* @license
|
|
2602
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2603
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2604
|
-
*/,no={start:"top",end:"bottom"},ao={start:"left",end:"right"},lo=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),ho=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,lo.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,lo.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,r=this.__shouldAlignStartHorizontally(t,i),s=!i&&r||i&&!r;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,no,this,e),a=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,ao,this,r);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!s),this.toggleAttribute("start-aligned",s)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,r,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,ao)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,no)}__shouldAlignStart(t,e,i,r,s,o,n){const a=i-t[o?n.end:n.start]-r[n.end],l=t[o?n.start:n.end]-r[n.start],h=s?a:l;return s===(h>(s?l:a)||h>e)}__adjustBottomProperty(t,e,i){let r;if(t===e.end){if(e.end===no.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(r=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===ao.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(r=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return r}__calculatePositionInOneDimension(t,e,i,r,s,o){const n=o?r.start:r.end,a=o?r.end:r.start,l=parseFloat(s.style[n]||getComputedStyle(s)[n]),h=this.__adjustBottomProperty(n,r,l);return{[n]:h?`${h}px`:`${l+(e[o?r.start:r.end]-t[i===o?r.end:r.start])*(o?-1:1)}px`,[a]:""}}}
|
|
2605
|
-
/**
|
|
2606
|
-
* @license
|
|
2607
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
2608
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2609
|
-
*/,co=f`
|
|
2610
|
-
:host {
|
|
2611
|
-
z-index: 200;
|
|
2612
|
-
position: fixed;
|
|
2613
|
-
|
|
2614
|
-
/* Despite of what the names say, <vaadin-overlay> is just a container
|
|
2615
|
-
for position/sizing/alignment. The actual overlay is the overlay part. */
|
|
2616
|
-
|
|
2617
|
-
/* Default position constraints: the entire viewport. Note: themes can
|
|
2618
|
-
override this to introduce gaps between the overlay and the viewport. */
|
|
2619
|
-
inset: 0;
|
|
2620
|
-
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
2621
|
-
|
|
2622
|
-
/* Use flexbox alignment for the overlay part. */
|
|
2623
|
-
display: flex;
|
|
2624
|
-
flex-direction: column; /* makes dropdowns sizing easier */
|
|
2625
|
-
/* Align to center by default. */
|
|
2626
|
-
align-items: center;
|
|
2627
|
-
justify-content: center;
|
|
2628
|
-
|
|
2629
|
-
/* Allow centering when max-width/max-height applies. */
|
|
2630
|
-
margin: auto;
|
|
2631
|
-
|
|
2632
|
-
/* The host is not clickable, only the overlay part is. */
|
|
2633
|
-
pointer-events: none;
|
|
2634
|
-
|
|
2635
|
-
/* Remove tap highlight on touch devices. */
|
|
2636
|
-
-webkit-tap-highlight-color: transparent;
|
|
2637
|
-
|
|
2638
|
-
/* CSS API for host */
|
|
2639
|
-
--vaadin-overlay-viewport-bottom: 0;
|
|
2640
|
-
}
|
|
2641
|
-
|
|
2642
|
-
:host([hidden]),
|
|
2643
|
-
:host(:not([opened]):not([closing])) {
|
|
2644
|
-
display: none !important;
|
|
2645
|
-
}
|
|
2646
|
-
|
|
2647
|
-
[part='overlay'] {
|
|
2648
|
-
-webkit-overflow-scrolling: touch;
|
|
2649
|
-
overflow: auto;
|
|
2650
|
-
pointer-events: auto;
|
|
2651
|
-
|
|
2652
|
-
/* Prevent overflowing the host */
|
|
2653
|
-
max-width: 100%;
|
|
2654
|
-
box-sizing: border-box;
|
|
2655
|
-
|
|
2656
|
-
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
2657
|
-
}
|
|
2658
|
-
|
|
2659
|
-
[part='backdrop'] {
|
|
2660
|
-
z-index: -1;
|
|
2661
|
-
content: '';
|
|
2662
|
-
background: rgba(0, 0, 0, 0.5);
|
|
2663
|
-
position: fixed;
|
|
2664
|
-
inset: 0;
|
|
2665
|
-
pointer-events: auto;
|
|
2666
|
-
}
|
|
2667
|
-
`
|
|
2668
|
-
/**
|
|
2669
|
-
* @license
|
|
2670
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2671
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2672
|
-
*/;
|
|
2673
|
-
/**
|
|
2674
|
-
* @license
|
|
2675
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2676
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2677
|
-
*/
|
|
2678
|
-
vt("vaadin-date-picker-overlay",[co,f`
|
|
2679
|
-
[part='overlay'] {
|
|
2680
|
-
display: flex;
|
|
2681
|
-
flex: auto;
|
|
2682
|
-
}
|
|
2683
|
-
|
|
2684
|
-
[part~='content'] {
|
|
2685
|
-
flex: auto;
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
|
-
@media (forced-colors: active) {
|
|
2689
|
-
[part='overlay'] {
|
|
2690
|
-
outline: 3px solid;
|
|
2691
|
-
}
|
|
2692
|
-
}
|
|
2693
|
-
`],{moduleId:"vaadin-date-picker-overlay-styles"});class uo extends(ho(oo(Ji(wt(Oi))))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Ti`
|
|
2694
|
-
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
2695
|
-
<div part="overlay" id="overlay">
|
|
2696
|
-
<div part="content" id="content">
|
|
2697
|
-
<slot></slot>
|
|
2698
|
-
</div>
|
|
2699
|
-
</div>
|
|
2700
|
-
`}}function po(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function mo(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function fo(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function vo(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function go(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function _o(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}
|
|
2701
|
-
/**
|
|
2702
|
-
* @license
|
|
2703
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2704
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2705
|
-
*/l(uo);const bo=document.createElement("template");bo.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 yo extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(bo.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",Us&&(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=Hi.debounce(this._debouncerScrollFinish,Ui.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=Hi.debounce(this._debouncerUpdateClones,Ui.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 r=`vaadin-infinite-scroller-item-content-${ar()}`,s=document.createElement("slot");s.setAttribute("name",r),s._itemWrapper=i,e.appendChild(s),i.setAttribute("slot",r),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,r)=>{if(!i.updated){const s=this._firstIndex+this.bufferSize*r;[...i.children].forEach(((i,r)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||this._updateElement(o.instance,s+r)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
|
|
2706
|
-
/**
|
|
2707
|
-
* @license
|
|
2708
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2709
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2710
|
-
*/const wo=document.createElement("template");wo.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 yo{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(wo.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=go(e)}});
|
|
2711
|
-
/**
|
|
2712
|
-
* @license
|
|
2713
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2714
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2715
|
-
*/
|
|
2716
|
-
const xo=document.createElement("template");xo.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 yo{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(xo.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()}});
|
|
2717
|
-
/**
|
|
2718
|
-
* @license
|
|
2719
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2720
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2721
|
-
*/
|
|
2722
|
-
class Eo extends(wt(Oi)){static get is(){return"vaadin-date-picker-year"}static get template(){return Ti`
|
|
2723
|
-
<style>
|
|
2724
|
-
:host {
|
|
2725
|
-
display: block;
|
|
2726
|
-
height: 100%;
|
|
2727
|
-
}
|
|
2728
|
-
</style>
|
|
2729
|
-
<div part="year-number">[[year]]</div>
|
|
2730
|
-
<div part="year-separator" aria-hidden="true"></div>
|
|
2731
|
-
`}static get properties(){return{year:{type:String},selectedDate:{type:Object}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
|
|
2732
|
-
/**
|
|
2733
|
-
@license
|
|
2734
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2735
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2736
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2737
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2738
|
-
Code distributed by Google as part of the polymer project is also
|
|
2739
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2740
|
-
*/
|
|
2741
|
-
function ko(t,e,i,r,s){let o;s&&(o="object"==typeof i&&null!==i,o&&(r=t.__dataTemp[e]));let n=r!==i&&(r==r||i==i);return o&&n&&(t.__dataTemp[e]=i),n}l(Eo);const So=Wt((t=>class extends t{_shouldPropertyChange(t,e,i){return ko(this,t,e,i,!0)}})),Ao=Wt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return ko(this,t,e,i,this.mutableData)}}));So._mutablePropertyChange=ko;
|
|
2742
|
-
/**
|
|
2743
|
-
@license
|
|
2744
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2745
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2746
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2747
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2748
|
-
Code distributed by Google as part of the polymer project is also
|
|
2749
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2750
|
-
*/
|
|
2751
|
-
let Co=null;function Do(){return Co}Do.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Do,writable:!0}});const To=wi(Do),Io=So(To),Oo=wi(class{});class No extends Oo{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 r=this.__dataHost.__dataHost;r&&r._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let r=e[i];if(Boolean(t)!=Boolean(r.__hideTemplateChildren__))if(r.nodeType===Node.TEXT_NODE)t?(r.__polymerTextContent__=r.textContent,r.textContent=""):r.textContent=r.__polymerTextContent__;else if("slot"===r.localName)if(t)r.__polymerReplaced__=document.createComment("hidden-slot"),oe(oe(r).parentNode).replaceChild(r.__polymerReplaced__,r);else{const t=r.__polymerReplaced__;t&&oe(oe(t).parentNode).replaceChild(r,t)}else r.style&&(t?(r.__polymerDisplay__=r.style.display,r.style.display="none"):r.style.display=r.__polymerDisplay__);r.__hideTemplateChildren__=t,r._showHideChildren&&r._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 zo=So(No);function Ro(t){let e=t.__dataHost;return e&&e._methodHost||e}function Mo(t,e){return function(t,i,r){e.call(t.__templatizeOwner,i.substring("_host_".length),r[i])}}function Po(t,e){return function(t,i,r){e.call(t.__templatizeOwner,t,i,r[i])}}function Go(t,e,i){if(Mt&&!Ro(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 r=(e?e.constructor:No)._parseTemplate(t),s=r.templatizeInstanceClass;s||(s=function(t,e,i){let r=i.mutableData?zo:No;Go.mixin&&(r=Go.mixin(r));let s=class extends r{};return s.prototype.__templatizeOptions=i,s.prototype._bindTemplate(t),function(t,e,i,r){let s=i.hostProps||{};for(let e in r.instanceProps){delete s[e];let i=r.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Po(0,i)})}if(r.forwardHostProp&&e.__dataHost)for(let e in s)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)}})}(s,t,e,i),s}(t,r,i),r.templatizeInstanceClass=s);const o=Ro(t);!function(t,e,i,r){let s=i.forwardHostProp;if(s&&e.hasHostProps){const o="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?Io:To;class r extends t{}n=e.templatizeTemplateClass=r}else{const i=t.constructor;class r extends i{}n=e.templatizeTemplateClass=r}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Mo(0,s)}),n.prototype._createNotifyingProperty("_host_"+t);Ft&&r&&function(t,e,i){const r=i.constructor._properties,{propertyEffects:s}=t,{instanceProps:o}=e;for(let t in s)if(!(r[t]||o&&o[t])){const e=s[t];for(let i=0;i<e.length;i++){const{part:r}=e[i].info;if(!r.signature||!r.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,r)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),o)!function(t,e){Co=t,Object.setPrototypeOf(t,e.prototype),new e,Co=null}(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.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,r,i,o);let n=class extends s{};return n.prototype._methodHost=o,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=r.hostProps,n=n,n}
|
|
2752
|
-
/**
|
|
2753
|
-
@license
|
|
2754
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2755
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2756
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2757
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2758
|
-
Code distributed by Google as part of the polymer project is also
|
|
2759
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2760
|
-
*/
|
|
2761
|
-
class Fo{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,Lo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Lo.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}static debounce(t,e,i){return t instanceof Fo?t._cancelAsync():t=new Fo,t.setConfig(e,i),t}}let Lo=new Set;const Uo=function(){const t=Boolean(Lo.size);return Lo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t},jo=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Uo()}while(t||e)};
|
|
2762
|
-
/**
|
|
2763
|
-
@license
|
|
2764
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2765
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2766
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2767
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2768
|
-
Code distributed by Google as part of the polymer project is also
|
|
2769
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2770
|
-
*/
|
|
2771
|
-
let Bo=!1;
|
|
2772
|
-
/**
|
|
2773
|
-
@license
|
|
2774
|
-
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
2775
|
-
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
2776
|
-
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
2777
|
-
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
2778
|
-
Code distributed by Google as part of the polymer project is also
|
|
2779
|
-
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
2780
|
-
*/
|
|
2781
|
-
const Vo=Ao(Oi);class qo extends Vo{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:!qt,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(Gt&&!Ot){if(!Bo){Bo=!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=oe(oe(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=Go(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let r,s=0;s<i.length&&(r=i[s]);s++)r.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((r=this.as)===(s=e)||le(r,s)||he(r,s)){let r=t[this.itemsIndexAs];e==this.as&&(this.items[r]=i);let s=ce(this.as,`${JSCompiler_renameProperty("items",this)}.${r}`,e);this.notifyPath(s,i)}var r,s}})}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=Fo.debounce(this.__renderDebouncer,e>0?Ae.after(e):Ce,t.bind(this)),Lo.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),jo()}__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),qt&&!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,r)=>this.__filterFn(t[e],i,r)))),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 r;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),r=Math.max(e-i,0),this.__chunkCount=r||1):(r=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+r,t)),this.__shouldMeasureChunk=r===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 r=this.__itemsIdxToInstIdx={};let s;for(s=0;s<e;s++){let e=this.__instances[s],o=i[s],n=t[o];r[o]=s,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,s),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(n,s,o)}for(let t=this.__instances.length-1;t>=s;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=oe(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 r={};return r[this.as]=t,r[this.indexAs]=e,r[this.itemsIndexAs]=i,new this.__ctor(r)}__insertInstance(t,e,i){const r=this.__stampInstance(t,e,i);let s=this.__instances[e+1],o=s?s.children[0]:this;return oe(oe(this).parentNode).insertBefore(r.root,o),this.__instances[e]=r,r}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),r=i.indexOf("."),s=r<0?i:i.substring(0,r);if(s==parseInt(s,10)){let t=r<0?"":i.substring(r+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[s]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._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=oe(e).parentNode;return null}(this.template,t)}}customElements.define(qo.is,qo);
|
|
2782
|
-
/**
|
|
2783
|
-
* @license
|
|
2784
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2785
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2786
|
-
*/
|
|
2787
|
-
const Ho=t=>class extends(Wr(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>po(t.date,this.focusedDate)))}ready(){super.ready(),Tr(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const r=new Date(0,0);r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()),r.setDate(1);const s=new Date(0,0);return s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()+1),s.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||mo(r,e,i)||mo(s,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:r,firstDayOfWeek:s}=t,o=this._applyFirstDayOfWeek(r,s);return this._applyFirstDayOfWeek(i,s).map(((t,e)=>({weekDay:t,weekDayShort:o[e]})))}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>po(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return po(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const r=[],s=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===s;)r.push(i.getMonth()===o?new Date(i.getTime()):null),this._dateAdd(i,1);return r}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
|
|
2788
|
-
/**
|
|
2789
|
-
* @license
|
|
2790
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2791
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2792
|
-
*/
|
|
2793
|
-
return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,r=new Date(t.getTime()+24*i*3600*1e3),s=new Date(0,0);s.setFullYear(r.getFullYear());const o=r.getTime()-s.getTime(),n=Math.round(o/864e5);return Math.floor(n/7+1)}(t.reduce(((t,e)=>!t&&e?e:t)))}__getDayAriaLabel(t){if(!t)return"";let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(e+=`, ${this.i18n.today}`),e}}
|
|
2794
|
-
/**
|
|
2795
|
-
* @license
|
|
2796
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2797
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2798
|
-
*/;
|
|
2799
|
-
/**
|
|
2800
|
-
* @license
|
|
2801
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2802
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2803
|
-
*/
|
|
2804
|
-
vt("vaadin-month-calendar",f`
|
|
2805
|
-
:host {
|
|
2806
|
-
display: block;
|
|
2807
|
-
}
|
|
2808
|
-
|
|
2809
|
-
#monthGrid {
|
|
2810
|
-
width: 100%;
|
|
2811
|
-
border-collapse: collapse;
|
|
2812
|
-
}
|
|
2813
|
-
|
|
2814
|
-
#days-container tr,
|
|
2815
|
-
#weekdays-container tr {
|
|
2816
|
-
display: flex;
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
[part~='date'] {
|
|
2820
|
-
outline: none;
|
|
2821
|
-
}
|
|
2822
|
-
|
|
2823
|
-
[part~='disabled'] {
|
|
2824
|
-
pointer-events: none;
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
[part='week-number'][hidden],
|
|
2828
|
-
[part='weekday'][hidden] {
|
|
2829
|
-
display: none;
|
|
2830
|
-
}
|
|
2831
|
-
|
|
2832
|
-
[part='weekday'],
|
|
2833
|
-
[part~='date'] {
|
|
2834
|
-
width: calc(100% / 7);
|
|
2835
|
-
padding: 0;
|
|
2836
|
-
font-weight: normal;
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
[part='weekday']:empty,
|
|
2840
|
-
[part='week-number'] {
|
|
2841
|
-
width: 12.5%;
|
|
2842
|
-
flex-shrink: 0;
|
|
2843
|
-
padding: 0;
|
|
2844
|
-
}
|
|
2845
|
-
|
|
2846
|
-
:host([week-numbers]) [part='weekday']:not(:empty),
|
|
2847
|
-
:host([week-numbers]) [part~='date'] {
|
|
2848
|
-
width: 12.5%;
|
|
2849
|
-
}
|
|
2850
|
-
|
|
2851
|
-
@media (forced-colors: active) {
|
|
2852
|
-
[part~='date'][part~='focused'] {
|
|
2853
|
-
outline: 1px solid;
|
|
2854
|
-
}
|
|
2855
|
-
|
|
2856
|
-
[part~='date'][part~='selected'] {
|
|
2857
|
-
outline: 3px solid;
|
|
2858
|
-
}
|
|
2859
|
-
}
|
|
2860
|
-
`,{moduleId:"vaadin-month-calendar-styles"});class $o extends(Ho(wt(Oi))){static get template(){return Ti`
|
|
2861
|
-
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
2862
|
-
<table
|
|
2863
|
-
id="monthGrid"
|
|
2864
|
-
role="grid"
|
|
2865
|
-
aria-labelledby="month-header"
|
|
2866
|
-
on-touchend="_preventDefault"
|
|
2867
|
-
on-touchstart="_onMonthGridTouchStart"
|
|
2868
|
-
>
|
|
2869
|
-
<thead id="weekdays-container">
|
|
2870
|
-
<tr role="row" part="weekdays">
|
|
2871
|
-
<th part="weekday" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]"></th>
|
|
2872
|
-
<template is="dom-repeat" items="[[_getWeekDayNames(i18n, showWeekNumbers)]]">
|
|
2873
|
-
<th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
|
|
2874
|
-
[[item.weekDayShort]]
|
|
2875
|
-
</th>
|
|
2876
|
-
</template>
|
|
2877
|
-
</tr>
|
|
2878
|
-
</thead>
|
|
2879
|
-
<tbody id="days-container">
|
|
2880
|
-
<template is="dom-repeat" items="[[_weeks]]" as="week">
|
|
2881
|
-
<tr role="row">
|
|
2882
|
-
<td part="week-number" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]">
|
|
2883
|
-
[[__getWeekNumber(week)]]
|
|
2884
|
-
</td>
|
|
2885
|
-
<template is="dom-repeat" items="[[week]]">
|
|
2886
|
-
<td
|
|
2887
|
-
role="gridcell"
|
|
2888
|
-
part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate)]]"
|
|
2889
|
-
date="[[item]]"
|
|
2890
|
-
tabindex$="[[__getDayTabindex(item, focusedDate)]]"
|
|
2891
|
-
disabled$="[[__isDayDisabled(item, minDate, maxDate)]]"
|
|
2892
|
-
aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
|
|
2893
|
-
aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate)]]"
|
|
2894
|
-
aria-label$="[[__getDayAriaLabel(item)]]"
|
|
2895
|
-
>[[_getDate(item)]]</td
|
|
2896
|
-
>
|
|
2897
|
-
</template>
|
|
2898
|
-
</tr>
|
|
2899
|
-
</template>
|
|
2900
|
-
</tbody>
|
|
2901
|
-
</table>
|
|
2902
|
-
`}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,r,s){const o=["date"];return this.__isDayDisabled(t,r,s)&&o.push("disabled"),this.__isDayFocused(t,e)&&o.push("focused"),this.__isDaySelected(t,i)&&o.push("selected"),this._isToday(t)&&o.push("today"),o.join(" ")}__isDayFocused(t,e){return po(t,e)}__isDaySelected(t,e){return po(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i){return!mo(t,e,i)}__getDayAriaDisabled(t,e,i){if(void 0!==t&&void 0!==e&&void 0!==i)return this.__isDayDisabled(t,e,i)?"true":void 0}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}l($o);
|
|
2903
|
-
/**
|
|
2904
|
-
* @license
|
|
2905
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
2906
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2907
|
-
*/
|
|
2908
|
-
class Wo{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
|
|
2909
|
-
/**
|
|
2910
|
-
* @license
|
|
2911
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2912
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2913
|
-
*/const Yo=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){Or(this.$.scrollers,"pan-y"),Tr(this.$.scrollers,"track",this._track.bind(this)),Tr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Tr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Tr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Wo(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new lr(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Tr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new lr(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Tr(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new lr(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new lr(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Tr(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,r))}__updateCalendars(t,e,i,r,s,o,n,a,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=r,t.focusedDate=o,t.selectedDate=s,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const r=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+r,e)}const r=this._monthScroller.position>i,s=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+s-1<i;r?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-s+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=Hi.debounce(this._debouncer,Ui.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(vo(t)):i}_onTodayTap(){const t=new Date;Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2);this._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let r=0;const s=this._monthScroller.position,o=t=>{r||(r=t);const e=t-r;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,s,this._targetPosition-s);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:s}})),this._monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return go(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){po(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate),this._close(),e=!0;break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&po(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{Gs(this,(()=>{jo(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(fo(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t)?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,r=new Date(0,0);return r.setFullYear(i.getFullYear()),r.setMonth(i.getMonth()),r.setDate(i.getDate()),this._dateAllowed(r,t,e)}}
|
|
2914
|
-
/**
|
|
2915
|
-
* @license
|
|
2916
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2917
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2918
|
-
*/;
|
|
2919
|
-
/**
|
|
2920
|
-
* @license
|
|
2921
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
2922
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
2923
|
-
*/
|
|
2924
|
-
vt("vaadin-date-picker-overlay-content",f`
|
|
2925
|
-
:host {
|
|
2926
|
-
display: flex;
|
|
2927
|
-
flex-direction: column;
|
|
2928
|
-
height: 100%;
|
|
2929
|
-
width: 100%;
|
|
2930
|
-
outline: none;
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
[part='overlay-header'] {
|
|
2934
|
-
display: flex;
|
|
2935
|
-
flex-shrink: 0;
|
|
2936
|
-
flex-wrap: nowrap;
|
|
2937
|
-
align-items: center;
|
|
2938
|
-
}
|
|
2939
|
-
|
|
2940
|
-
:host(:not([fullscreen])) [part='overlay-header'] {
|
|
2941
|
-
display: none;
|
|
2942
|
-
}
|
|
2943
|
-
|
|
2944
|
-
[part='label'] {
|
|
2945
|
-
flex-grow: 1;
|
|
2946
|
-
}
|
|
2947
|
-
|
|
2948
|
-
[hidden] {
|
|
2949
|
-
display: none !important;
|
|
2950
|
-
}
|
|
2951
|
-
|
|
2952
|
-
[part='years-toggle-button'] {
|
|
2953
|
-
display: flex;
|
|
2954
|
-
}
|
|
2955
|
-
|
|
2956
|
-
#scrollers {
|
|
2957
|
-
display: flex;
|
|
2958
|
-
height: 100%;
|
|
2959
|
-
width: 100%;
|
|
2960
|
-
position: relative;
|
|
2961
|
-
overflow: hidden;
|
|
2962
|
-
}
|
|
2963
|
-
|
|
2964
|
-
:host([desktop]) ::slotted([slot='months']) {
|
|
2965
|
-
right: 50px;
|
|
2966
|
-
transform: none !important;
|
|
2967
|
-
}
|
|
2968
|
-
|
|
2969
|
-
:host([desktop]) ::slotted([slot='years']) {
|
|
2970
|
-
transform: none !important;
|
|
2971
|
-
}
|
|
2972
|
-
|
|
2973
|
-
:host(.animate) ::slotted([slot='months']),
|
|
2974
|
-
:host(.animate) ::slotted([slot='years']) {
|
|
2975
|
-
transition: all 200ms;
|
|
2976
|
-
}
|
|
2977
|
-
|
|
2978
|
-
[part='toolbar'] {
|
|
2979
|
-
display: flex;
|
|
2980
|
-
justify-content: space-between;
|
|
2981
|
-
z-index: 2;
|
|
2982
|
-
flex-shrink: 0;
|
|
2983
|
-
}
|
|
2984
|
-
`,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Xo extends(Yo(ts(wt(Ji(Oi))))){static get template(){return Ti`
|
|
2985
|
-
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
2986
|
-
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
2987
|
-
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
2988
|
-
<div part="toggle-button"></div>
|
|
2989
|
-
|
|
2990
|
-
<div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
|
|
2991
|
-
[[_yearAfterXMonths(_visibleMonthIndex)]]
|
|
2992
|
-
</div>
|
|
2993
|
-
</div>
|
|
2994
|
-
|
|
2995
|
-
<div id="scrollers">
|
|
2996
|
-
<slot name="months"></slot>
|
|
2997
|
-
<slot name="years"></slot>
|
|
2998
|
-
</div>
|
|
2999
|
-
|
|
3000
|
-
<div on-touchend="_preventDefault" role="toolbar" part="toolbar">
|
|
3001
|
-
<slot name="today-button"></slot>
|
|
3002
|
-
<slot name="cancel-button"></slot>
|
|
3003
|
-
</div>
|
|
3004
|
-
`}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}l(Xo);
|
|
3005
|
-
/**
|
|
3006
|
-
* @license
|
|
3007
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3008
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3009
|
-
*/
|
|
3010
|
-
const Ko=new WeakMap,Qo=Wt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ko.has(t)||Ko.set(t,new Set),Ko.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))}))}})),Jo=t=>class extends(Qr(Lr(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(),qs||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}))}}
|
|
3011
|
-
/**
|
|
3012
|
-
* @license
|
|
3013
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3014
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3015
|
-
*/,Zo=Wt((t=>class extends(Kr(gs(Qr(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),r=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():r&&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}})),tn=t=>class extends(Qo(Xr(Zo(_s(Jo(Lr(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=Hi.debounce(this._preventInputDebouncer,Ui.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)}}}
|
|
3016
|
-
/**
|
|
3017
|
-
* @license
|
|
3018
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3019
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3020
|
-
*/,en=[f`
|
|
3021
|
-
:host {
|
|
3022
|
-
display: inline-flex;
|
|
3023
|
-
outline: none;
|
|
3024
|
-
}
|
|
3025
|
-
|
|
3026
|
-
:host::before {
|
|
3027
|
-
content: '\\2003';
|
|
3028
|
-
width: 0;
|
|
3029
|
-
display: inline-block;
|
|
3030
|
-
/* Size and position this element on the same vertical position as the input-field element
|
|
3031
|
-
to make vertical align for the host element work as expected */
|
|
3032
|
-
}
|
|
3033
|
-
|
|
3034
|
-
:host([hidden]) {
|
|
3035
|
-
display: none !important;
|
|
3036
|
-
}
|
|
3037
|
-
|
|
3038
|
-
:host(:not([has-label])) [part='label'] {
|
|
3039
|
-
display: none;
|
|
3040
|
-
}
|
|
3041
|
-
|
|
3042
|
-
@media (forced-colors: active) {
|
|
3043
|
-
:host(:not([readonly])) [part='input-field'] {
|
|
3044
|
-
outline: 1px solid;
|
|
3045
|
-
outline-offset: -1px;
|
|
3046
|
-
}
|
|
3047
|
-
:host([focused]) [part='input-field'] {
|
|
3048
|
-
outline-width: 2px;
|
|
3049
|
-
}
|
|
3050
|
-
:host([disabled]) [part='input-field'] {
|
|
3051
|
-
outline-color: GrayText;
|
|
3052
|
-
}
|
|
3053
|
-
}
|
|
3054
|
-
`
|
|
3055
|
-
/**
|
|
3056
|
-
* @license
|
|
3057
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3058
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3059
|
-
*/,f`
|
|
3060
|
-
[class$='container'] {
|
|
3061
|
-
display: flex;
|
|
3062
|
-
flex-direction: column;
|
|
3063
|
-
min-width: 100%;
|
|
3064
|
-
max-width: 100%;
|
|
3065
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
3066
|
-
}
|
|
3067
|
-
`
|
|
3068
|
-
/**
|
|
3069
|
-
* @license
|
|
3070
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3071
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3072
|
-
*/,f`
|
|
3073
|
-
[part='clear-button'] {
|
|
3074
|
-
display: none;
|
|
3075
|
-
cursor: default;
|
|
3076
|
-
}
|
|
3077
|
-
|
|
3078
|
-
[part='clear-button']::before {
|
|
3079
|
-
content: '\\2715';
|
|
3080
|
-
}
|
|
3081
|
-
|
|
3082
|
-
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
|
3083
|
-
display: block;
|
|
3084
|
-
}
|
|
3085
|
-
`
|
|
3086
|
-
/**
|
|
3087
|
-
* @license
|
|
3088
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
3089
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3090
|
-
*/],rn=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const r="string"==typeof t?t.split(" "):[];r.length>0&&i.add(...r),this.__previousClasses=r}}
|
|
3091
|
-
/**
|
|
3092
|
-
* @license
|
|
3093
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3094
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3095
|
-
*/;class sn{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
|
|
3096
|
-
/**
|
|
3097
|
-
* @license
|
|
3098
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3099
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3100
|
-
*/const on=t=>class extends(rn(ts(Xr(Zo(Lr(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 r,s=i.getMonth(),o=i.getFullYear();if(3===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,r=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 s=e+100*Math.floor(t.getFullYear()/100);return t<new Date(s-50,i,r)?s-=100:t>new Date(s+50,i,r)&&(s+=100),s}(this.referenceDate?_o(this.referenceDate):new Date,o,s,r))):2===e.length?(s=parseInt(e[0])-1,r=parseInt(e[1])):1===e.length&&(r=parseInt(e[0])),void 0!==r)return{day:r,month:s,year:o}},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:Bs},_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 Wo(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new sn(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=_o(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(vo(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||mo(this._selectedDate,this._minDate,this._maxDate);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),e&&i&&r}_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,r,s,o){return!t||e&&(!o||s)||i&&s||!r.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",r="0000",s=t.getFullYear();return s<0?(s=-s,i="-",r="000000"):t.getFullYear()>=1e4&&(i="+",r="000000"),[i+e(s,r),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=_o(t);!t||i?(t?po(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,r,s,o,n,a){t&&(t.i18n=e,t.label=i,t.minDate=r,t.maxDate=s,t.focusedDate=o,t.selectedDate=n,t.showWeekNumbers=a)}__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 r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Qs(this._noInput?t:[r,t])}_getInitialPosition(){const t=_o(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||mo(e,this._minDate,this._maxDate)?e:fo(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,po(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return _o(t)}}
|
|
3101
|
-
/**
|
|
3102
|
-
* @license
|
|
3103
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3104
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3105
|
-
*/;
|
|
3106
|
-
/**
|
|
3107
|
-
* @license
|
|
3108
|
-
* Copyright (c) 2016 - 2023 Vaadin Ltd.
|
|
3109
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3110
|
-
*/
|
|
3111
|
-
vt("vaadin-date-picker",[en,f`
|
|
3112
|
-
:host([opened]) {
|
|
3113
|
-
pointer-events: auto;
|
|
3114
|
-
}
|
|
3115
|
-
|
|
3116
|
-
:host([dir='rtl']) [part='input-field'] {
|
|
3117
|
-
direction: ltr;
|
|
3118
|
-
}
|
|
3119
|
-
|
|
3120
|
-
:host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
|
|
3121
|
-
direction: rtl;
|
|
3122
|
-
text-align: left;
|
|
3123
|
-
}
|
|
3124
|
-
`],{moduleId:"vaadin-date-picker-styles"});class nn extends(on(tn(wt(er(Oi))))){static get is(){return"vaadin-date-picker"}static get template(){return Ti`
|
|
3125
|
-
<div class="vaadin-date-picker-container">
|
|
3126
|
-
<div part="label">
|
|
3127
|
-
<slot name="label"></slot>
|
|
3128
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
3129
|
-
</div>
|
|
3130
|
-
|
|
3131
|
-
<vaadin-input-container
|
|
3132
|
-
part="input-field"
|
|
3133
|
-
readonly="[[readonly]]"
|
|
3134
|
-
disabled="[[disabled]]"
|
|
3135
|
-
invalid="[[invalid]]"
|
|
3136
|
-
theme$="[[_theme]]"
|
|
3137
|
-
>
|
|
3138
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
3139
|
-
<slot name="input"></slot>
|
|
3140
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
3141
|
-
<div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
|
|
3142
|
-
</vaadin-input-container>
|
|
3143
|
-
|
|
3144
|
-
<div part="helper-text">
|
|
3145
|
-
<slot name="helper"></slot>
|
|
3146
|
-
</div>
|
|
3147
|
-
|
|
3148
|
-
<div part="error-message">
|
|
3149
|
-
<slot name="error-message"></slot>
|
|
3150
|
-
</div>
|
|
3151
|
-
</div>
|
|
3152
|
-
|
|
3153
|
-
<vaadin-date-picker-overlay
|
|
3154
|
-
id="overlay"
|
|
3155
|
-
fullscreen$="[[_fullscreen]]"
|
|
3156
|
-
theme$="[[_theme]]"
|
|
3157
|
-
opened="{{opened}}"
|
|
3158
|
-
on-vaadin-overlay-escape-press="_onOverlayEscapePress"
|
|
3159
|
-
on-vaadin-overlay-open="_onOverlayOpened"
|
|
3160
|
-
on-vaadin-overlay-closing="_onOverlayClosed"
|
|
3161
|
-
restore-focus-on-close
|
|
3162
|
-
restore-focus-node="[[inputElement]]"
|
|
3163
|
-
></vaadin-date-picker-overlay>
|
|
3164
|
-
|
|
3165
|
-
<slot name="tooltip"></slot>
|
|
3166
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Zr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ss(this.inputElement,this._labelController)),this._tooltipController=new hr(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 an(t){return(an="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})(t)}function ln(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function hn(t){return ln(1,arguments),t instanceof Date||"object"===an(t)&&"[object Date]"===Object.prototype.toString.call(t)}function cn(t){ln(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===an(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 un(t){if(ln(1,arguments),!hn(t)&&"number"!=typeof t)return!1;var e=cn(t);return!isNaN(Number(e))}function dn(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 pn(t,e){ln(2,arguments);var i=cn(t).getTime(),r=dn(e);return new Date(i+r)}function mn(t,e){ln(2,arguments);var i=dn(e);return pn(t,-i)}function fn(t){ln(1,arguments);var e=1,i=cn(t),r=i.getUTCDay(),s=(r<e?7:0)+r-e;return i.setUTCDate(i.getUTCDate()-s),i.setUTCHours(0,0,0,0),i}function vn(t){ln(1,arguments);var e=cn(t),i=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(i+1,0,4),r.setUTCHours(0,0,0,0);var s=fn(r),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=fn(o);return e.getTime()>=s.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function gn(t){ln(1,arguments);var e=vn(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var r=fn(i);return r}function _n(t){ln(1,arguments);var e=cn(t),i=fn(e).getTime()-gn(e).getTime();return Math.round(i/6048e5)+1}l(nn);var bn={};function yn(){return bn}function wn(t,e){var i,r,s,o,n,a,l,h;ln(1,arguments);var c=yn(),u=dn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==s?s:c.weekStartsOn)&&void 0!==r?r: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=cn(t),p=d.getUTCDay(),m=(p<u?7:0)+p-u;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function xn(t,e){var i,r,s,o,n,a,l,h;ln(1,arguments);var c=cn(t),u=c.getUTCFullYear(),d=yn(),p=dn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:d.firstWeekContainsDate)&&void 0!==r?r:null===(l=d.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(u+1,0,p),m.setUTCHours(0,0,0,0);var f=wn(m,e),v=new Date(0);v.setUTCFullYear(u,0,p),v.setUTCHours(0,0,0,0);var g=wn(v,e);return c.getTime()>=f.getTime()?u+1:c.getTime()>=g.getTime()?u:u-1}function En(t,e){var i,r,s,o,n,a,l,h;ln(1,arguments);var c=yn(),u=dn(null!==(i=null!==(r=null!==(s=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==s?s:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),d=xn(t,e),p=new Date(0);p.setUTCFullYear(d,0,u),p.setUTCHours(0,0,0,0);var m=wn(p,e);return m}function kn(t,e){ln(1,arguments);var i=cn(t),r=wn(i,e).getTime()-En(i,e).getTime();return Math.round(r/6048e5)+1}function Sn(t,e){for(var i=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return i+r}var An={G:function(t,e,i){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(r,{width:"abbreviated"});case"GGGGG":return i.era(r,{width:"narrow"});case"GGGG":default:return i.era(r,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var r=t.getUTCFullYear();return i.ordinalNumber(r>0?r:1-r,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),r=i>0?i:1-i;return Sn("yy"===e?r%100:r,e.length)}(t,e)},Y:function(t,e,i,r){var s=xn(t,r),o=s>0?s:1-s;return"YY"===e?Sn(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):Sn(o,e.length)},R:function(t,e){return Sn(vn(t),e.length)},u:function(t,e){return Sn(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return Sn(r,2);case"Qo":return i.ordinalNumber(r,{unit:"quarter"});case"QQQ":return i.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,i){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return Sn(r,2);case"qo":return i.ordinalNumber(r,{unit:"quarter"});case"qqq":return i.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,i){var r=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):Sn(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(r+1,{unit:"month"});case"MMM":return i.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,i){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return Sn(r+1,2);case"Lo":return i.ordinalNumber(r+1,{unit:"month"});case"LLL":return i.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,i,r){var s=kn(t,r);return"wo"===e?i.ordinalNumber(s,{unit:"week"}):Sn(s,e.length)},I:function(t,e,i){var r=_n(t);return"Io"===e?i.ordinalNumber(r,{unit:"week"}):Sn(r,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return Sn(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var r=function(t){ln(1,arguments);var e=cn(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime();return Math.floor((i-r)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(r,{unit:"dayOfYear"}):Sn(r,e.length)},E:function(t,e,i){var r=t.getUTCDay();switch(e){case"E":case"EE":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"});case"EEEE":default:return i.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return Sn(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(s,{width:"short",context:"formatting"});case"eeee":default:return i.day(s,{width:"wide",context:"formatting"})}},c:function(t,e,i,r){var s=t.getUTCDay(),o=(s-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return Sn(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(s,{width:"narrow",context:"standalone"});case"cccccc":return i.day(s,{width:"short",context:"standalone"});case"cccc":default:return i.day(s,{width:"wide",context:"standalone"})}},i:function(t,e,i){var r=t.getUTCDay(),s=0===r?7:r;switch(e){case"i":return String(s);case"ii":return Sn(s,e.length);case"io":return i.ordinalNumber(s,{unit:"day"});case"iii":return i.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(r,{width:"short",context:"formatting"});case"iiii":default:return i.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,i){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,i){var r,s=t.getUTCHours();switch(r=12===s?"noon":0===s?"midnight":s/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,i){var r,s=t.getUTCHours();switch(r=s>=17?"evening":s>=12?"afternoon":s>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),i.ordinalNumber(r,{unit:"hour"})}return function(t,e){return Sn(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return Sn(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var r=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},k:function(t,e,i){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?i.ordinalNumber(r,{unit:"hour"}):Sn(r,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return Sn(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return Sn(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,r=t.getUTCMilliseconds();return Sn(Math.floor(r*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();if(0===s)return"Z";switch(e){case"X":return Dn(s);case"XXXX":case"XX":return Tn(s);case"XXXXX":case"XXX":default:return Tn(s,":")}},x:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Dn(s);case"xxxx":case"xx":return Tn(s);case"xxxxx":case"xxx":default:return Tn(s,":")}},O:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Cn(s,":");case"OOOO":default:return"GMT"+Tn(s,":")}},z:function(t,e,i,r){var s=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Cn(s,":");case"zzzz":default:return"GMT"+Tn(s,":")}},t:function(t,e,i,r){return Sn(Math.floor((r._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,r){return Sn((r._originalDate||t).getTime(),e.length)}};function Cn(t,e){var i=t>0?"-":"+",r=Math.abs(t),s=Math.floor(r/60),o=r%60;if(0===o)return i+String(s);var n=e||"";return i+String(s)+n+Sn(o,2)}function Dn(t,e){return t%60==0?(t>0?"-":"+")+Sn(Math.abs(t)/60,2):Tn(t,e)}function Tn(t,e){var i=e||"",r=t>0?"-":"+",s=Math.abs(t);return r+Sn(Math.floor(s/60),2)+i+Sn(s%60,2)}var In=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"});case"PPPP":default:return e.date({width:"full"})}},On=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"});case"pppp":default:return e.time({width:"full"})}},Nn={p:On,P:function(t,e){var i,r=t.match(/(P+)(p+)?/)||[],s=r[1],o=r[2];if(!o)return In(t,e);switch(s){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",In(s,e)).replace("{{time}}",On(o,e))}};function zn(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 Rn=["D","DD"],Mn=["YY","YYYY"];function Pn(t){return-1!==Rn.indexOf(t)}function Gn(t){return-1!==Mn.indexOf(t)}function Fn(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 Ln={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 Un(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,r=t.formats[i]||t.formats[t.defaultWidth];return r}}var jn={date:Un({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Un({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:Un({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Bn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Vn(t){return function(e,i){var r;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var s=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):s;r=t.formattingValues[o]||t.formattingValues[s]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;r=t.values[a]||t.values[n]}return r[t.argumentCallback?t.argumentCallback(e):e]}}function qn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=i.width,s=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(s);if(!o)return null;var n,a=o[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],h=Array.isArray(l)?$n(l,(function(t){return t.test(a)})):Hn(l,(function(t){return t.test(a)}));n=t.valueCallback?t.valueCallback(h):h,n=i.valueCallback?i.valueCallback(n):n;var c=e.slice(a.length);return{value:n,rest:c}}}function Hn(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function $n(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var Wn,Yn={code:"en-US",formatDistance:function(t,e,i){var r,s=Ln[t];return r="string"==typeof s?s:1===e?s.one:s.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+r:r+" ago":r},formatLong:jn,formatRelative:function(t){return Bn[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:Vn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Vn({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:Vn({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:Vn({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:Vn({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:(Wn={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(Wn.matchPattern);if(!i)return null;var r=i[0],s=t.match(Wn.parsePattern);if(!s)return null;var o=Wn.valueCallback?Wn.valueCallback(s[0]):s[0];o=e.valueCallback?e.valueCallback(o):o;var n=t.slice(r.length);return{value:o,rest:n}}),era:qn({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:qn({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:qn({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:qn({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:qn({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}},Xn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Kn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Qn=/^'([^]*?)'?$/,Jn=/''/g,Zn=/[a-zA-Z]/;function ta(t){var e=t.match(Qn);return e?e[1].replace(Jn,"'"):t}function ea(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,r=new Array(e);i<e;i++)r[i]=t[i];return r}function ia(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 ea(t,e);var i=Object.prototype.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)?ea(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var r=0,s=function(){};return{s,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:s}}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 o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function ra(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 sa(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oa(t,e){return(oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function na(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&&oa(t,e)}function aa(t){return(aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function la(t,e){if(e&&("object"===an(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return sa(t)}function ha(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,r=aa(t);if(e){var s=aa(this).constructor;i=Reflect.construct(r,arguments,s)}else i=r.apply(this,arguments);return la(this,i)}}function ca(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ua(t){var e=function(t,e){if("object"!==an(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,e);if("object"!==an(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===an(e)?e:String(e)}function da(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,ua(r.key),r)}}function pa(t,e,i){return e&&da(t.prototype,e),i&&da(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function ma(t,e,i){return(e=ua(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var fa=function(){function t(){ca(this,t),ma(this,"priority",void 0),ma(this,"subPriority",0)}return pa(t,[{key:"validate",value:function(){return!0}}]),t}(),va=function(){na(e,fa);var t=ha(e);function e(i,r,s,o,n){var a;return ca(this,e),(a=t.call(this)).value=i,a.validateValue=r,a.setValue=s,a.priority=o,n&&(a.subPriority=n),a}return pa(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}(),ga=function(){na(e,fa);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",10),ma(sa(i),"subPriority",-1),i}return pa(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}(),_a=function(){function t(){ca(this,t),ma(this,"incompatibleTokens",void 0),ma(this,"priority",void 0),ma(this,"subPriority",void 0)}return pa(t,[{key:"run",value:function(t,e,i,r){var s=this.parse(t,e,i,r);return s?{setter:new va(s.value,this.validate,this.set,this.priority,this.subPriority),rest:s.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),ba=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",140),ma(sa(i),"incompatibleTokens",["R","u","t","T"]),i}return pa(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"});case"GGGG":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}(),ya=/^(1[0-2]|0?\d)/,wa=/^(3[0-1]|[0-2]?\d)/,xa=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,Ea=/^(5[0-3]|[0-4]?\d)/,ka=/^(2[0-3]|[0-1]?\d)/,Sa=/^(2[0-4]|[0-1]?\d)/,Aa=/^(1[0-1]|0?\d)/,Ca=/^(1[0-2]|0?\d)/,Da=/^[0-5]?\d/,Ta=/^[0-5]?\d/,Ia=/^\d/,Oa=/^\d{1,2}/,Na=/^\d{1,3}/,za=/^\d{1,4}/,Ra=/^-?\d+/,Ma=/^-?\d/,Pa=/^-?\d{1,2}/,Ga=/^-?\d{1,3}/,Fa=/^-?\d{1,4}/,La=/^([+-])(\d{2})(\d{2})?|Z/,Ua=/^([+-])(\d{2})(\d{2})|Z/,ja=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ba=/^([+-])(\d{2}):(\d{2})|Z/,Va=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function qa(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Ha(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function $a(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 Wa(t){return Ha(Ra,t)}function Ya(t,e){switch(t){case 1:return Ha(Ia,e);case 2:return Ha(Oa,e);case 3:return Ha(Na,e);case 4:return Ha(za,e);default:return Ha(new RegExp("^\\d{1,"+t+"}"),e)}}function Xa(t,e){switch(t){case 1:return Ha(Ma,e);case 2:return Ha(Pa,e);case 3:return Ha(Ga,e);case 4:return Ha(Fa,e);default:return Ha(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ka(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Qa(t,e){var i,r=e>0,s=r?e:1-e;if(s<=50)i=t||100;else{var o=s+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return r?i:1-i}function Ja(t){return t%400==0||t%4==0&&t%100!=0}var Za=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",130),ma(sa(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return qa(Ya(4,t),r);case"yo":return qa(i.ordinalNumber(t,{unit:"year"}),r);default:return qa(Ya(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var r=t.getUTCFullYear();if(i.isTwoDigitYear){var s=Qa(i.year,r);return t.setUTCFullYear(s,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}(),tl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",130),ma(sa(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return qa(Ya(4,t),r);case"Yo":return qa(i.ordinalNumber(t,{unit:"year"}),r);default:return qa(Ya(e.length,t),r)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,r){var s=xn(t,r);if(i.isTwoDigitYear){var o=Qa(i.year,s);return t.setUTCFullYear(o,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),wn(t,r)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,r.firstWeekContainsDate),t.setUTCHours(0,0,0,0),wn(t,r)}}]),e}(),el=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",130),ma(sa(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Xa("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var r=new Date(0);return r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0),fn(r)}}]),e}(),il=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",130),ma(sa(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return Xa("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}(),rl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",120),ma(sa(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ya(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"});case"QQQQ":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}(),sl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",120),ma(sa(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ya(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"});case"qqqq":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}(),ol=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),ma(sa(i),"priority",110),i}return pa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"M":return qa(Ha(ya,t),r);case"MM":return qa(Ya(2,t),r);case"Mo":return qa(i.ordinalNumber(t,{unit:"month"}),r);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"});case"MMMM":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}(),nl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",110),ma(sa(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return t-1};switch(e){case"L":return qa(Ha(ya,t),r);case"LL":return qa(Ya(2,t),r);case"Lo":return qa(i.ordinalNumber(t,{unit:"month"}),r);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"});case"LLLL":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}(),al=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",100),ma(sa(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Ha(Ea,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,r){return wn(function(t,e,i){ln(2,arguments);var r=cn(t),s=dn(e),o=kn(r,i)-s;return r.setUTCDate(r.getUTCDate()-7*o),r}(t,i,r),r)}}]),e}(),ll=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",100),ma(sa(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Ha(Ea,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return fn(function(t,e){ln(2,arguments);var i=cn(t),r=dn(e),s=_n(i)-r;return i.setUTCDate(i.getUTCDate()-7*s),i}(t,i))}}]),e}(),hl=[31,28,31,30,31,30,31,31,30,31,30,31],cl=[31,29,31,30,31,30,31,31,30,31,30,31],ul=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"subPriority",1),ma(sa(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Ha(wa,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){var i=Ja(t.getUTCFullYear()),r=t.getUTCMonth();return i?e>=1&&e<=cl[r]:e>=1&&e<=hl[r]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),dl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"subpriority",1),ma(sa(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Ha(xa,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return Ja(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 pl(t,e,i){var r,s,o,n,a,l,h,c;ln(2,arguments);var u=yn(),d=dn(null!==(r=null!==(s=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(l=a.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==o?o:u.weekStartsOn)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==r?r:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=cn(t),m=dn(e),f=p.getUTCDay(),v=m%7,g=(v+7)%7,_=(g<d?7:0)+m-f;return p.setUTCDate(p.getUTCDate()+_),p}var ml=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return pa(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"});case"EEEE":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,r){return(t=pl(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),fl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return qa(Ya(e.length,t),s);case"eo":return qa(i.ordinalNumber(t,{unit:"day"}),s);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"});case"eeee":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,r){return(t=pl(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),vl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i,r){var s=function(t){var e=7*Math.floor((t-1)/7);return(t+r.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return qa(Ya(e.length,t),s);case"co":return qa(i.ordinalNumber(t,{unit:"day"}),s);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"});case"cccc":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,r){return(t=pl(t,i,r)).setUTCHours(0,0,0,0),t}}]),e}(),gl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",90),ma(sa(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){var r=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ya(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return qa(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiii":return qa(i.day(t,{width:"narrow",context:"formatting"}),r);case"iiiiii":return qa(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),r);case"iiii":default:return qa(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"}),r)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return(t=function(t,e){ln(2,arguments);var i=dn(e);i%7==0&&(i-=7);var r=1,s=cn(t),o=s.getUTCDay(),n=((i%7+7)%7<r?7:0)+i-o;return s.setUTCDate(s.getUTCDate()+n),s}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),_l=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",80),ma(sa(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return pa(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"});case"aaaa":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(Ka(i),0,0,0),t}}]),e}(),bl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",80),ma(sa(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return pa(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"});case"bbbb":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(Ka(i),0,0,0),t}}]),e}(),yl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",80),ma(sa(i),"incompatibleTokens",["a","b","t","T"]),i}return pa(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"});case"BBBB":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(Ka(i),0,0,0),t}}]),e}(),wl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",70),ma(sa(i),"incompatibleTokens",["H","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Ha(Ca,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:r||12!==i?i:0,0,0,0),t}}]),e}(),xl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",70),ma(sa(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Ha(ka,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),El=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",70),ma(sa(i),"incompatibleTokens",["h","H","k","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Ha(Aa,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var r=t.getUTCHours()>=12;return t.setUTCHours(r&&i<12?i+12:i,0,0,0),t}}]),e}(),kl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",70),ma(sa(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Ha(Sa,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ya(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}(),Sl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",60),ma(sa(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Ha(Da,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ya(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}(),Al=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",50),ma(sa(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Ha(Ta,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ya(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}(),Cl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",30),ma(sa(i),"incompatibleTokens",["t","T"]),i}return pa(e,[{key:"parse",value:function(t,e){return qa(Ya(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}(),Dl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",10),ma(sa(i),"incompatibleTokens",["t","T","x"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"X":return $a(La,t);case"XX":return $a(Ua,t);case"XXXX":return $a(ja,t);case"XXXXX":return $a(Va,t);case"XXX":default:return $a(Ba,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Tl=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",10),ma(sa(i),"incompatibleTokens",["t","T","X"]),i}return pa(e,[{key:"parse",value:function(t,e){switch(e){case"x":return $a(La,t);case"xx":return $a(Ua,t);case"xxxx":return $a(ja,t);case"xxxxx":return $a(Va,t);case"xxx":default:return $a(Ba,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),Il=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",40),ma(sa(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),Ol=function(){na(e,_a);var t=ha(e);function e(){var i;ca(this,e);for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return ma(sa(i=t.call.apply(t,[this].concat(s))),"priority",20),ma(sa(i),"incompatibleTokens","*"),i}return pa(e,[{key:"parse",value:function(t){return Wa(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),Nl={G:new ba,y:new Za,Y:new tl,R:new el,u:new il,Q:new rl,q:new sl,M:new ol,L:new nl,w:new al,I:new ll,d:new ul,D:new dl,E:new ml,e:new fl,c:new vl,i:new gl,a:new _l,b:new bl,B:new yl,h:new wl,H:new xl,K:new El,k:new kl,m:new Sl,s:new Al,S:new Cl,X:new Dl,x:new Tl,t:new Il,T:new Ol},zl=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ml=/^'([^]*?)'?$/,Pl=/''/g,Gl=/\S/,Fl=/[a-zA-Z]/;function Ll(t,e,i,r){var s,o,n,a,l,h,c,u,d,p,m,f,v,g,_,b,y,w;ln(3,arguments);var x=String(t),E=String(e),k=yn(),S=null!==(s=null!==(o=null==r?void 0:r.locale)&&void 0!==o?o:k.locale)&&void 0!==s?s:Yn;if(!S.match)throw new RangeError("locale must contain match property");var A=dn(null!==(n=null!==(a=null!==(l=null!==(h=null==r?void 0:r.firstWeekContainsDate)&&void 0!==h?h:null==r||null===(c=r.locale)||void 0===c||null===(u=c.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==l?l:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(A>=1&&A<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var C=dn(null!==(m=null!==(f=null!==(v=null!==(g=null==r?void 0:r.weekStartsOn)&&void 0!==g?g:null==r||null===(_=r.locale)||void 0===_||null===(b=_.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==v?v:k.weekStartsOn)&&void 0!==f?f:null===(y=k.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==m?m:0);if(!(C>=0&&C<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===E)return""===x?cn(i):new Date(NaN);var D,T={firstWeekContainsDate:A,weekStartsOn:C,locale:S},I=[new ga],O=E.match(Rl).map((function(t){var e=t[0];return e in Nn?(0,Nn[e])(t,S.formatLong):t})).join("").match(zl),N=[],z=ia(O);try{var R=function(){var e=D.value;null!=r&&r.useAdditionalWeekYearTokens||!Gn(e)||Fn(e,E,t),null!=r&&r.useAdditionalDayOfYearTokens||!Pn(e)||Fn(e,E,t);var i=e[0],s=Nl[i];if(s){var o=s.incompatibleTokens;if(Array.isArray(o)){var n=N.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===s.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 a=s.run(x,e,S.match,T);if(!a)return{v:new Date(NaN)};I.push(a.setter),x=a.rest}else{if(i.match(Fl))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Ul(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(z.s();!(D=z.n()).done;){var M=R();if("object"===an(M))return M.v}}catch(t){z.e(t)}finally{z.f()}if(x.length>0&&Gl.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=cn(i);if(isNaN(G.getTime()))return new Date(NaN);var F,L=mn(G,zn(G)),U={},j=ia(P);try{for(j.s();!(F=j.n()).done;){var B=F.value;if(!B.validate(L,T))return new Date(NaN);var V=B.set(L,U,T);Array.isArray(V)?(L=V[0],ra(U,V[1])):L=V}}catch(t){j.e(t)}finally{j.f()}return L}function Ul(t){return t.match(Ml)[1].replace(Pl,"'")}function jl(t,e){ln(2,arguments);var i=cn(t),r=cn(e);return i.getTime()>r.getTime()}function Bl(t,e){ln(2,arguments);var i=cn(t),r=cn(e);return i.getTime()<r.getTime()}const Vl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:r}=t;return function(t,e,i){var r,s,o,n,a,l,h,c,u,d,p,m,f,v,g,_,b,y;ln(2,arguments);var w=String(e),x=yn(),E=null!==(r=null!==(s=null==i?void 0:i.locale)&&void 0!==s?s:x.locale)&&void 0!==r?r:Yn,k=dn(null!==(o=null!==(n=null!==(a=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!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(u=x.locale)||void 0===u||null===(d=u.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:1);if(!(k>=1&&k<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=dn(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(g=i.locale)||void 0===g||null===(_=g.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(b=x.locale)||void 0===b||null===(y=b.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var A=cn(t);if(!un(A))throw new RangeError("Invalid time value");var C=zn(A),D=mn(A,C),T={firstWeekContainsDate:k,weekStartsOn:S,locale:E,_originalDate:A};return w.match(Kn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Nn[e])(t,E.formatLong):t})).join("").match(Xn).map((function(r){if("''"===r)return"'";var s=r[0];if("'"===s)return ta(r);var o=An[s];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!Gn(r)||Fn(r,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!Pn(r)||Fn(r,e,String(t)),o(D,r,E.localize,T);if(s.match(Zn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+s+"`");return r})).join("")}(new Date(e,i,r),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Ll(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)}}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=Ll((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ll((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(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),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}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Ll(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!Bl(this.valueAsDate,this.minDate)&&!jl(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return Bl(this.valueAsDate,this.minDate)||jl(this.valueAsDate,this.maxDate)?n("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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",{class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{class:"date__label "+(this.validation.mandatory?"date__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("vaadin-date-picker",{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",{class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"date__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Vl.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:1px solid 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:#cc0000b3}.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 ql=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,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)}}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,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("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===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return n(`${t}`,this.language)?n(`${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?"":"email__input--invalid"),i("div",{class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"email__wrapper--flex"},i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"email__wrapper--relative"},this.tooltip&&i("img",{class:"email__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{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",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ql.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px;height: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::part(input-field){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;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}.email__input:focus{border:1px solid var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));outline-color: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 Hl=class{constructor(e){t(this,e),this.type="text",this.clientStyling="",this.translationUrl="",this.emitOnClick=!1,this.handleClick=()=>{this.emitOnClick&&window.postMessage({type:`registration${this.name}Clicked`},window.location.href)}}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])o[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});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});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(s,{class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};Hl.style=":host{display:block;height:100%}";const $l={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:"Nešto nije u redu... Molimo pokušajte ponovo",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"}},Wl=(t,e,i)=>{let r=$l[$l[e]?e:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");r=r.replace(i,e)}return r},Yl=class{constructor(i){t(this,i),this.registrationWidgetLoaded=e(this,"registrationWidgetLoaded",7),this.registrationStepUpdated=e(this,"registrationStepUpdated",7),this.language="en",this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.btag=null,this.emitOnClick=!1,this.isLoading=!0,this.forms=[],this.limitStylingAppends=!1,this.autofilled=!1,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)}))}}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 r={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,r).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 r={method:"POST",body:JSON.stringify(e),headers:i};fetch(t.href,r).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?Wl(`${this.errorCode}`,this.language):"GmErr_BadRequest"==this.errorCode?t.thirdPartyResponse.message:Wl(`${this.errorCode}`,this.language)||Wl("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:Wl(`${this.errorCode}`,this.language)||Wl("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:Wl("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,r,s;return"togglecheckbox"===(null===(i=e.inputType)||void 0===i?void 0:i.toLowerCase())?e.data.subFields.forEach((i=>{var r,s;t.push({name:i.name,value:"checkbox"==(null===(r=i.inputType)||void 0===r?void 0:r.toLowerCase())?"false":null,isDuplicate:i.isDuplicateInput||!1,type:"togglecheckbox"==(null===(s=e.inputType)||void 0===s?void 0:s.toLowerCase())?"togglecheckbox":null})})):t.push({name:e.name,value:"checkbox"==(null===(r=e.inputType)||void 0===r?void 0:r.toLowerCase())?"false":null,isDuplicate:e.isDuplicateInput||!1,type:"checkboxgroup"==(null===(s=e.inputType)||void 0===s?void 0:s.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])$l[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){$l[$l[this.language]?this.language:"en"][t.name]&&Object.keys($l[this.language][t.name]).forEach((e=>{t[e]=$l[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},Wl(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)},Wl("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 r(this)}static get watchers(){return{registrationStep:["sendStep"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],forms:["setFormValidity"],btag:["addBtag"]}}};Yl.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\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 Xl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,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)}}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,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):r}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?n("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?n("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",{class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"number__wrapper--flex"},i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"number__wrapper--relative"},this.tooltip&&i("img",{class:"number__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{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",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Xl.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}',
|
|
3167
|
-
/**
|
|
3168
|
-
* @license
|
|
3169
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3170
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3171
|
-
*/
|
|
3172
|
-
vt("vaadin-text-field",Ns,{moduleId:"lumo-text-field-styles"});
|
|
3173
|
-
/**
|
|
3174
|
-
* @license
|
|
3175
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3176
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3177
|
-
*/
|
|
3178
|
-
const Kl=t=>class extends(tn(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
|
|
3179
|
-
/**
|
|
3180
|
-
* @license
|
|
3181
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3182
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3183
|
-
*/,Ql=t=>class extends(Kl(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Zr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ss(this.inputElement,this._labelController))}}
|
|
3184
|
-
/**
|
|
3185
|
-
* @license
|
|
3186
|
-
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
3187
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3188
|
-
*/;vt("vaadin-text-field",en,{moduleId:"vaadin-text-field-styles"});class Jl extends(Ql(wt(er(Oi)))){static get is(){return"vaadin-text-field"}static get template(){return Ti`
|
|
3189
|
-
<style>
|
|
3190
|
-
[part='input-field'] {
|
|
3191
|
-
flex-grow: 0;
|
|
3192
|
-
}
|
|
3193
|
-
</style>
|
|
3194
|
-
|
|
3195
|
-
<div class="vaadin-field-container">
|
|
3196
|
-
<div part="label">
|
|
3197
|
-
<slot name="label"></slot>
|
|
3198
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
3199
|
-
</div>
|
|
3200
|
-
|
|
3201
|
-
<vaadin-input-container
|
|
3202
|
-
part="input-field"
|
|
3203
|
-
readonly="[[readonly]]"
|
|
3204
|
-
disabled="[[disabled]]"
|
|
3205
|
-
invalid="[[invalid]]"
|
|
3206
|
-
theme$="[[_theme]]"
|
|
3207
|
-
>
|
|
3208
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
3209
|
-
<slot name="input"></slot>
|
|
3210
|
-
<slot name="suffix" slot="suffix"></slot>
|
|
3211
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
3212
|
-
</vaadin-input-container>
|
|
3213
|
-
|
|
3214
|
-
<div part="helper-text">
|
|
3215
|
-
<slot name="helper"></slot>
|
|
3216
|
-
</div>
|
|
3217
|
-
|
|
3218
|
-
<div part="error-message">
|
|
3219
|
-
<slot name="error-message"></slot>
|
|
3220
|
-
</div>
|
|
3221
|
-
</div>
|
|
3222
|
-
<slot name="tooltip"></slot>
|
|
3223
|
-
`}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new hr(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}l(Jl),vt("vaadin-password-field-button",[As,f`
|
|
3224
|
-
:host {
|
|
3225
|
-
position: absolute;
|
|
3226
|
-
right: 0;
|
|
3227
|
-
top: 0;
|
|
3228
|
-
margin: 0;
|
|
3229
|
-
padding: 0;
|
|
3230
|
-
width: 100%;
|
|
3231
|
-
height: 100%;
|
|
3232
|
-
min-width: auto;
|
|
3233
|
-
background: transparent;
|
|
3234
|
-
outline: none;
|
|
3235
|
-
}
|
|
3236
|
-
`],{moduleId:"lumo-password-field-button"}),vt("vaadin-password-field",[Ns,f`
|
|
3237
|
-
[part='reveal-button']::before {
|
|
3238
|
-
content: var(--lumo-icons-eye);
|
|
3239
|
-
}
|
|
3240
|
-
|
|
3241
|
-
:host([password-visible]) [part='reveal-button']::before {
|
|
3242
|
-
content: var(--lumo-icons-eye-disabled);
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
/* Make it easy to hide the button across the whole app */
|
|
3246
|
-
[part='reveal-button'] {
|
|
3247
|
-
position: relative;
|
|
3248
|
-
display: var(--lumo-password-field-reveal-button-display, block);
|
|
3249
|
-
}
|
|
3250
|
-
|
|
3251
|
-
[part='reveal-button'][hidden] {
|
|
3252
|
-
display: none !important;
|
|
3253
|
-
}
|
|
3254
|
-
`],{moduleId:"lumo-password-field"}),l(
|
|
3255
|
-
/**
|
|
3256
|
-
* @license
|
|
3257
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3258
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3259
|
-
*/
|
|
3260
|
-
class extends Ts{static get is(){return"vaadin-password-field-button"}static get template(){return Ti`
|
|
3261
|
-
<style>
|
|
3262
|
-
:host {
|
|
3263
|
-
display: block;
|
|
3264
|
-
}
|
|
3265
|
-
|
|
3266
|
-
:host([hidden]) {
|
|
3267
|
-
display: none !important;
|
|
3268
|
-
}
|
|
3269
|
-
</style>
|
|
3270
|
-
<slot name="tooltip"></slot>
|
|
3271
|
-
`}});
|
|
3272
|
-
/**
|
|
3273
|
-
* @license
|
|
3274
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3275
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3276
|
-
*/
|
|
3277
|
-
const Zl=Ti`
|
|
3278
|
-
<div part="reveal-button" slot="suffix">
|
|
3279
|
-
<slot name="reveal"></slot>
|
|
3280
|
-
</div>
|
|
3281
|
-
`;let th;l(class extends Jl{static get is(){return"vaadin-password-field"}static get template(){if(!th){th=super.template.cloneNode(!0);const t=Zl.content.querySelector('[part="reveal-button"]');th.content.querySelector('[part="input-field"]').appendChild(t)}return th}static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n.*)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new lr(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}});const eh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.clientStylingUrl="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),0===this.validation.custom.length||(this.showPopup=!0),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=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{0===this.validation.custom.length||(this.showPopup=!0),this.calculateComplexity(this.value)},this.setClientStyling=()=>{const t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{const t=new URL(this.clientStylingUrl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.error(t)}))}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}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())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule.toLowerCase())).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.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,r;if(this.isDuplicateInput&&!this.originalValid)return n("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("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===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return n(`${t}`,this.language)?n(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,r=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},n("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},n(r?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,n(`${t.ruleKey}`,this.language)?n(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"password__wrapper--flex"},i("label",{class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"password__wrapper--relative"},this.tooltip&&i("img",{class:"password__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};eh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%;display:flex;flex-direction:column;gap:5px}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__wrapper--autofilled .password__input::part(input-field){color:var(--emfe-w-color-black, #000000)}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__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))}.password__label--required::after{content:"*";font-family:inherit;color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C));margin-left:2px}.password__input{width:inherit;border:none}.password__input[focused]::part(input-field){border-color:var(--emfe-w-login-color-primary, var(--emfe-w-color-primary, #D0046C))}.password__input[invalid]::part(input-field){border:1px solid var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__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);background-color:var(--emfe-w-color-white, #FFFFFF);font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:1.5;position:relative;margin-bottom:unset;height:44px;padding:0;width:100%}.password__input::part(reveal-button){position:relative;right:10px}.password__input::part(reveal-button)::before{color:var(--emfe-w-registration-typography, var(--emfe-w-color-black, #000000))}.password__input>input{padding:5px 15px}.password__input>input:placeholder-shown{color:var(--emfe-w-color-gray-150, #828282)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:var(--emfe-w-color-white, #FFFFFF);-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;height:150px;border:1px solid #B0B0B0;}.password__complexity meter{border-color:transparent;}.password__complexity meter[value="1"]::-moz-meter-bar{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter[value="1"]::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-valid, #48952a)}.password__complexity meter:not([value="1"])::-moz-meter-bar{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity meter:not([value="1"])::-webkit-meter-optimum-value{background-color:var(--emfe-w-color-error, #FD2839)}.password__complexity--strength{display:flex;justify-content:space-evenly;align-items:center}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid var(--emfe-w-color-gray-150, #828282);border-right:0 solid var(--emfe-w-color-gray-150, #828282);border-left:1px solid var(--emfe-w-color-gray-150, #828282);border-bottom:0 solid var(--emfe-w-color-gray-150, #828282);bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:var(--emfe-w-color-white, #FFFFFF)}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:var(--emfe-w-color-white, #FFFFFF);border:1px solid var(--emfe-w-color-gray-150, #828282);color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const ih=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}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})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.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(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"radio__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};ih.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.radio__fieldset{border:none;position:relative}.radio__wrapper{display:flex;gap:5px}.radio__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__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}.radio__tooltip.visible{opacity:1}";const rh=f`
|
|
3282
|
-
:host {
|
|
3283
|
-
display: flex;
|
|
3284
|
-
align-items: center;
|
|
3285
|
-
box-sizing: border-box;
|
|
3286
|
-
font-family: var(--lumo-font-family);
|
|
3287
|
-
font-size: var(--lumo-font-size-m);
|
|
3288
|
-
line-height: var(--lumo-line-height-xs);
|
|
3289
|
-
padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
|
|
3290
|
-
var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
3291
|
-
min-height: var(--lumo-size-m);
|
|
3292
|
-
outline: none;
|
|
3293
|
-
border-radius: var(--lumo-border-radius-m);
|
|
3294
|
-
cursor: var(--lumo-clickable-cursor);
|
|
3295
|
-
-webkit-font-smoothing: antialiased;
|
|
3296
|
-
-moz-osx-font-smoothing: grayscale;
|
|
3297
|
-
-webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
|
|
3298
|
-
}
|
|
3299
|
-
|
|
3300
|
-
/* Checkmark */
|
|
3301
|
-
[part='checkmark']::before {
|
|
3302
|
-
display: var(--_lumo-item-selected-icon-display, none);
|
|
3303
|
-
content: var(--lumo-icons-checkmark);
|
|
3304
|
-
font-family: lumo-icons;
|
|
3305
|
-
font-size: var(--lumo-icon-size-m);
|
|
3306
|
-
line-height: 1;
|
|
3307
|
-
font-weight: normal;
|
|
3308
|
-
width: 1em;
|
|
3309
|
-
height: 1em;
|
|
3310
|
-
margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
|
|
3311
|
-
color: var(--lumo-primary-text-color);
|
|
3312
|
-
flex: none;
|
|
3313
|
-
opacity: 0;
|
|
3314
|
-
transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), opacity 0.1s;
|
|
3315
|
-
}
|
|
3316
|
-
|
|
3317
|
-
:host([selected]) [part='checkmark']::before {
|
|
3318
|
-
opacity: 1;
|
|
3319
|
-
}
|
|
3320
|
-
|
|
3321
|
-
:host([active]:not([selected])) [part='checkmark']::before {
|
|
3322
|
-
transform: scale(0.8);
|
|
3323
|
-
opacity: 0;
|
|
3324
|
-
transition-duration: 0s;
|
|
3325
|
-
}
|
|
3326
|
-
|
|
3327
|
-
[part='content'] {
|
|
3328
|
-
flex: auto;
|
|
3329
|
-
}
|
|
3330
|
-
|
|
3331
|
-
/* Disabled */
|
|
3332
|
-
:host([disabled]) {
|
|
3333
|
-
color: var(--lumo-disabled-text-color);
|
|
3334
|
-
cursor: default;
|
|
3335
|
-
pointer-events: none;
|
|
3336
|
-
}
|
|
3337
|
-
|
|
3338
|
-
/* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
|
|
3339
|
-
@media (any-hover: hover) {
|
|
3340
|
-
:host(:hover:not([disabled])) {
|
|
3341
|
-
background-color: var(--lumo-primary-color-10pct);
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
|
-
:host([focus-ring]:not([disabled])) {
|
|
3345
|
-
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
3346
|
-
}
|
|
3347
|
-
}
|
|
3348
|
-
|
|
3349
|
-
/* RTL specific styles */
|
|
3350
|
-
:host([dir='rtl']) {
|
|
3351
|
-
padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
|
|
3352
|
-
padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
|
|
3353
|
-
}
|
|
3354
|
-
|
|
3355
|
-
/* Slotted icons */
|
|
3356
|
-
:host ::slotted(vaadin-icon) {
|
|
3357
|
-
width: var(--lumo-icon-size-m);
|
|
3358
|
-
height: var(--lumo-icon-size-m);
|
|
3359
|
-
}
|
|
3360
|
-
`;vt("vaadin-item",rh,{moduleId:"lumo-item"}),vt("vaadin-combo-box-item",[rh,f`
|
|
3361
|
-
:host {
|
|
3362
|
-
transition: background-color 100ms;
|
|
3363
|
-
overflow: hidden;
|
|
3364
|
-
--_lumo-item-selected-icon-display: block;
|
|
3365
|
-
}
|
|
3366
|
-
|
|
3367
|
-
@media (any-hover: hover) {
|
|
3368
|
-
:host([focused]:not([disabled])) {
|
|
3369
|
-
box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
|
|
3370
|
-
}
|
|
3371
|
-
}
|
|
3372
|
-
`],{moduleId:"lumo-combo-box-item"}),vt("vaadin-combo-box-overlay",[Es,ks,f`
|
|
3373
|
-
[part='content'] {
|
|
3374
|
-
padding: 0;
|
|
3375
|
-
}
|
|
3376
|
-
|
|
3377
|
-
/* When items are empty, the spinner needs some room */
|
|
3378
|
-
:host(:not([closing])) [part~='content'] {
|
|
3379
|
-
min-height: calc(2 * var(--lumo-space-s) + var(--lumo-icon-size-s));
|
|
3380
|
-
}
|
|
3381
|
-
|
|
3382
|
-
[part~='overlay'] {
|
|
3383
|
-
position: relative;
|
|
3384
|
-
}
|
|
3385
|
-
|
|
3386
|
-
:host([top-aligned]) [part~='overlay'] {
|
|
3387
|
-
margin-top: var(--lumo-space-xs);
|
|
3388
|
-
}
|
|
3389
|
-
|
|
3390
|
-
:host([bottom-aligned]) [part~='overlay'] {
|
|
3391
|
-
margin-bottom: var(--lumo-space-xs);
|
|
3392
|
-
}
|
|
3393
|
-
`,f`
|
|
3394
|
-
[part~='loader'] {
|
|
3395
|
-
box-sizing: border-box;
|
|
3396
|
-
width: var(--lumo-icon-size-s);
|
|
3397
|
-
height: var(--lumo-icon-size-s);
|
|
3398
|
-
border: 2px solid transparent;
|
|
3399
|
-
border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color)
|
|
3400
|
-
var(--lumo-primary-color);
|
|
3401
|
-
border-radius: calc(0.5 * var(--lumo-icon-size-s));
|
|
3402
|
-
opacity: 0;
|
|
3403
|
-
pointer-events: none;
|
|
3404
|
-
}
|
|
3405
|
-
|
|
3406
|
-
:host(:not([loading])) [part~='loader'] {
|
|
3407
|
-
display: none;
|
|
3408
|
-
}
|
|
3409
|
-
|
|
3410
|
-
:host([loading]) [part~='loader'] {
|
|
3411
|
-
animation: 1s linear infinite lumo-loader-rotate, 0.3s 0.1s lumo-loader-fade-in both;
|
|
3412
|
-
}
|
|
3413
|
-
|
|
3414
|
-
@keyframes lumo-loader-fade-in {
|
|
3415
|
-
0% {
|
|
3416
|
-
opacity: 0;
|
|
3417
|
-
}
|
|
3418
|
-
|
|
3419
|
-
100% {
|
|
3420
|
-
opacity: 1;
|
|
3421
|
-
}
|
|
3422
|
-
}
|
|
3423
|
-
|
|
3424
|
-
@keyframes lumo-loader-rotate {
|
|
3425
|
-
0% {
|
|
3426
|
-
transform: rotate(0deg);
|
|
3427
|
-
}
|
|
3428
|
-
|
|
3429
|
-
100% {
|
|
3430
|
-
transform: rotate(360deg);
|
|
3431
|
-
}
|
|
3432
|
-
}
|
|
3433
|
-
`,f`
|
|
3434
|
-
[part~='loader'] {
|
|
3435
|
-
position: absolute;
|
|
3436
|
-
z-index: 1;
|
|
3437
|
-
left: var(--lumo-space-s);
|
|
3438
|
-
right: var(--lumo-space-s);
|
|
3439
|
-
top: var(--lumo-space-s);
|
|
3440
|
-
margin-left: auto;
|
|
3441
|
-
margin-inline-start: auto;
|
|
3442
|
-
margin-inline-end: 0;
|
|
3443
|
-
}
|
|
3444
|
-
|
|
3445
|
-
:host([dir='rtl']) [part~='loader'] {
|
|
3446
|
-
left: auto;
|
|
3447
|
-
margin-left: 0;
|
|
3448
|
-
margin-right: auto;
|
|
3449
|
-
margin-inline-start: 0;
|
|
3450
|
-
margin-inline-end: auto;
|
|
3451
|
-
}
|
|
3452
|
-
`,f`
|
|
3453
|
-
:host {
|
|
3454
|
-
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
3455
|
-
--_vaadin-combo-box-items-container-border-style: solid;
|
|
3456
|
-
}
|
|
3457
|
-
`],{moduleId:"lumo-combo-box-overlay"}),vt("vaadin-combo-box",[Ns,f`
|
|
3458
|
-
:host {
|
|
3459
|
-
outline: none;
|
|
3460
|
-
}
|
|
3461
|
-
|
|
3462
|
-
[part='toggle-button']::before {
|
|
3463
|
-
content: var(--lumo-icons-dropdown);
|
|
3464
|
-
}
|
|
3465
|
-
`],{moduleId:"lumo-combo-box"});
|
|
3466
|
-
/**
|
|
3467
|
-
* @license
|
|
3468
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3469
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3470
|
-
*/
|
|
3471
|
-
const sh=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item.*, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0!==i&&void 0!==e&&(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
|
|
3472
|
-
/**
|
|
3473
|
-
* @license
|
|
3474
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3475
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3476
|
-
*/;class oh extends(sh(wt(Ji(Oi)))){static get template(){return Ti`
|
|
3477
|
-
<style>
|
|
3478
|
-
:host {
|
|
3479
|
-
display: block;
|
|
3480
|
-
}
|
|
3481
|
-
|
|
3482
|
-
:host([hidden]) {
|
|
3483
|
-
display: none;
|
|
3484
|
-
}
|
|
3485
|
-
</style>
|
|
3486
|
-
<span part="checkmark" aria-hidden="true"></span>
|
|
3487
|
-
<div part="content">
|
|
3488
|
-
<slot></slot>
|
|
3489
|
-
</div>
|
|
3490
|
-
`}static get is(){return"vaadin-combo-box-item"}}l(oh);
|
|
3491
|
-
/**
|
|
3492
|
-
* @license
|
|
3493
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3494
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3495
|
-
*/
|
|
3496
|
-
const nh=t=>class extends(ho(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_setOverlayWidth(t,e){if(t&&e){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${t.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);""===i?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i),this._updatePosition()}}}
|
|
3497
|
-
/**
|
|
3498
|
-
* @license
|
|
3499
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3500
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3501
|
-
*/;vt("vaadin-combo-box-overlay",[co,f`
|
|
3502
|
-
#overlay {
|
|
3503
|
-
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
[part='content'] {
|
|
3507
|
-
display: flex;
|
|
3508
|
-
flex-direction: column;
|
|
3509
|
-
height: 100%;
|
|
3510
|
-
}
|
|
3511
|
-
`],{moduleId:"vaadin-combo-box-overlay-styles"});class ah extends(nh(oo(Ji(wt(Oi))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Ti`
|
|
3512
|
-
<div id="backdrop" part="backdrop" hidden></div>
|
|
3513
|
-
<div part="overlay" id="overlay">
|
|
3514
|
-
<div part="loader"></div>
|
|
3515
|
-
<div part="content" id="content"><slot></slot></div>
|
|
3516
|
-
</div>
|
|
3517
|
-
`}}
|
|
3518
|
-
/**
|
|
3519
|
-
* @license
|
|
3520
|
-
* Copyright (c) 2023 Vaadin Ltd.
|
|
3521
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3522
|
-
*/
|
|
3523
|
-
function lh(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
|
|
3524
|
-
/**
|
|
3525
|
-
* @license
|
|
3526
|
-
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
3527
|
-
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
3528
|
-
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
3529
|
-
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
3530
|
-
* Code distributed by Google as part of the polymer project is also
|
|
3531
|
-
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
3532
|
-
*/l(ah);const hh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),ch=hh&&hh[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,r)=>{e<this._scrollBottom&&(t=r),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),Vi)}},_getReusables(t){let e,i,r;const s=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=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);r=this._getPhysicalSizeIncrement(e),i-=r,!(s.length>=l||i<=o);)if(t){if(a+s.length+1>=this._virtualCount)break;if(h+r>=c-this._scrollOffset)break;s.push(e),h+=r,e=(e+1)%l}else{if(n-s.length<=0)break;if(h+this._physicalSize-r<=u)break;s.push(e),h-=r,e=0===e?l-1:e-1}return{indexes:s,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)),Bi):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Vi))}},_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,ji))},_iterateItems(t,e){let i,r,s,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],r=this._computeVidx(i),null!=(s=t.call(this,i,r)))return s}else{for(i=this._physicalStart,r=this._virtualStart;i<this._physicalCount;i++,r++)if(null!=(s=t.call(this,i,r)))return s;for(i=0;i<this._physicalStart;i++,r++)if(null!=(s=t.call(this,i,r)))return s}},_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;!ch&&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(Yi(),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,r=0;const s=this._hiddenContentSize;for(;i<t&&r<=s;)r+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+r),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)}),ji)},_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]=Hi.debounce(this._debouncers[t],i,e.bind(this)),$i(this._debouncers[t])}};class dh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:r,elementsContainer:s,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=r,this.elementsContainer=s||r,this.reorderElements=o,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<1e3?(i=t,this._vidxOffset=0):(i=1e3,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(),Yi(),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((r=>{r.__virtualIndex>=t&&r.__virtualIndex<=e&&(this.__updateElement(r,r.__virtualIndex,!0),i.push(r))})),this.__afterElementsUpdated(i)}_updateMetrics(t){Yi();let e=0,i=0;const r=this._physicalAverageCount,s=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!==r&&(this._physicalAverage=Math.round((s*r+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=Hi.debounce(this.__placeholderClearDebouncer,ji,(()=>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,Yi(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),Yi())}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 r=this._physicalItems[t];r.hidden=i>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,r){r.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=Hi.debounce(this.__fixInvalidItemPositioningDebouncer,Ui.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Hi.debounce(this.__scrollReorderDebouncer,Ui.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=Hi.debounce(this.__debouncerWheelAnimationFrame,ji,(()=>{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=Hi.debounce(this._debouncerIgnoreNewWheel,Ui.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 r=i.__virtualIndex-t,s=e.indexOf(i)-r;if(s>0)for(let t=0;t<s;t++)this.elementsContainer.appendChild(e[t]);else if(s<0)for(let t=e.length+s;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Vs){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=1e3,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 r=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=r,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<r&&(this._vidxOffset+=Math.min(r-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(dh.prototype,uh);class ph{constructor(t){this.__adapter=new dh(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()}}
|
|
3533
|
-
/**
|
|
3534
|
-
* @license
|
|
3535
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3536
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3537
|
-
*/const mh=class{toString(){return""}},fh=t=>class extends t{static get properties(){return{items:{type:Array,observer:"__itemsChanged"},focusedIndex:{type:Number,observer:"__focusedIndexChanged"},loading:{type:Boolean,observer:"__loadingChanged"},opened:{type:Boolean,observer:"__openedChanged"},selectedItem:{type:Object,observer:"__selectedItemChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${ar()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new ph({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector})}requestContentUpdate(){this.__virtualizer&&this.__virtualizer.update()}scrollIntoView(t){if(!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const r=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!r||t!==r.index)return;const s=r.getBoundingClientRect(),o=this.getBoundingClientRect(),n=s.bottom-o.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof mh)&&(i&&void 0!==t&&void 0!==e?lh(i,t)===lh(i,e):t===e)}__itemsChanged(t){this.__virtualizer&&t&&(this.__virtualizer.size=t.length,this.__virtualizer.flush(),this.requestContentUpdate())}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&this.requestContentUpdate()}__selectedItemChanged(){this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],r=this.focusedIndex,s=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:s,renderer:this.renderer,focused:!this.loading&&r===e}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",s.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof mh&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t,currentScrollerPos:this._oldScrollerPosition}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
|
|
3538
|
-
/**
|
|
3539
|
-
* @license
|
|
3540
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3541
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3542
|
-
*/;
|
|
3543
|
-
/**
|
|
3544
|
-
* @license
|
|
3545
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3546
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3547
|
-
*/class vh extends(fh(Oi)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Ti`
|
|
3548
|
-
<style>
|
|
3549
|
-
:host {
|
|
3550
|
-
display: block;
|
|
3551
|
-
min-height: 1px;
|
|
3552
|
-
overflow: auto;
|
|
3553
|
-
|
|
3554
|
-
/* Fixes item background from getting on top of scrollbars on Safari */
|
|
3555
|
-
transform: translate3d(0, 0, 0);
|
|
3556
|
-
|
|
3557
|
-
/* Enable momentum scrolling on iOS */
|
|
3558
|
-
-webkit-overflow-scrolling: touch;
|
|
3559
|
-
|
|
3560
|
-
/* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
|
|
3561
|
-
box-shadow: 0 0 0 white;
|
|
3562
|
-
}
|
|
3563
|
-
|
|
3564
|
-
#selector {
|
|
3565
|
-
border-width: var(--_vaadin-combo-box-items-container-border-width);
|
|
3566
|
-
border-style: var(--_vaadin-combo-box-items-container-border-style);
|
|
3567
|
-
border-color: var(--_vaadin-combo-box-items-container-border-color, transparent);
|
|
3568
|
-
position: relative;
|
|
3569
|
-
}
|
|
3570
|
-
</style>
|
|
3571
|
-
<div id="selector">
|
|
3572
|
-
<slot></slot>
|
|
3573
|
-
</div>
|
|
3574
|
-
`}}l(vh);
|
|
3575
|
-
/**
|
|
3576
|
-
* @license
|
|
3577
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3578
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3579
|
-
*/
|
|
3580
|
-
const gh=t=>class extends(Zo(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
|
|
3581
|
-
/**
|
|
3582
|
-
* @license
|
|
3583
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3584
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3585
|
-
*/,_h=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},size:{type:Number,observer:"_sizeChanged"},dataProvider:{type:Object,observer:"_dataProviderChanged"},_pendingRequests:{value:()=>({})},__placeHolder:{value:new mh},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{const e=t.detail.index,i=t.detail.currentScrollerPos,r=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(e,r,i)&&void 0!==e){const t=this._getPageForIndex(e);this._shouldLoadPage(t)&&this._loadPage(t)}}))}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this._pendingRequests={},this.loading=this._shouldFetchData(),this.size=void 0,this.clearCache()):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){t&&this._shouldLoadPage(0)&&this._loadPage(0)}_shouldSkipIndex(t,e,i){return 0!==i&&t>=i-e&&t<=i+e}_shouldLoadPage(t){if(!this.filteredItems||this._forceNextRequest)return this._forceNextRequest=!1,!0;const e=this.filteredItems[t*this.pageSize];return void 0!==e?e instanceof mh:void 0===this.size}_loadPage(t){if(this._pendingRequests[t]||!this.dataProvider)return;const e={page:t,pageSize:this.pageSize,filter:this.filter},i=(r,s)=>{if(this._pendingRequests[t]!==i)return;const o=this.filteredItems?[...this.filteredItems]:[];o.splice(e.page*e.pageSize,r.length,...r),this.filteredItems=o,this.opened||this._isInputFocused()||this._commitValue(),void 0!==s&&(this.size=s),delete this._pendingRequests[t],0===Object.keys(this._pendingRequests).length&&(this.loading=!1)};this._pendingRequests[t]=i,this.loading=!0,this.dataProvider(e,i)}_getPageForIndex(t){return Math.floor(t/this.pageSize)}clearCache(){if(!this.dataProvider)return;this._pendingRequests={};const t=[];for(let e=0;e<(this.size||0);e++)t.push(this.__placeHolder);this.filteredItems=t,this._shouldFetchData()?(this._forceNextRequest=!1,this._loadPage(0)):this._forceNextRequest=!0}_sizeChanged(t=0){const e=(this.filteredItems||[]).slice(0,t);for(let i=0;i<t;i++)e[i]=void 0!==e[i]?e[i]:this.__placeHolder;this.filteredItems=e,this._flushPendingRequests(t)}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.clearCache()}_ensureItemsOrDataProvider(t){if(void 0!==this.items&&void 0!==this.dataProvider)throw t(),new Error("Using `items` and `dataProvider` together is not supported");this.dataProvider&&!this.filteredItems&&(this.filteredItems=[])}_warnDataProviderValue(t,e){if(t&&""!==e&&null==this.selectedItem){const t=this.__getItemIndexByValue(this.filteredItems,e);(t<0||!this._getItemLabel(this.filteredItems[t]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`")}}_flushPendingRequests(t){if(this._pendingRequests){const e=Math.ceil(t/this.pageSize);Object.entries(this._pendingRequests).forEach((([i,r])=>{parseInt(i)>=e&&r([],t)}))}}}
|
|
3586
|
-
/**
|
|
3587
|
-
* @license
|
|
3588
|
-
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
3589
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3590
|
-
*/;
|
|
3591
|
-
/**
|
|
3592
|
-
* @license
|
|
3593
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3594
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3595
|
-
*/
|
|
3596
|
-
function bh(t){return null!=t}function yh(t,e){return t.findIndex((t=>!(t instanceof mh)&&e(t)))}const wh=t=>class extends(rn(ts(gs(Wr(Lr(Qr(Fr(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 sn(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 r=i.querySelector(e);r.owner=t||this,r.getItemLabel=this._getItemLabel.bind(this),r.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=r}_updateScroller(t,e,i,r,s,o,n,a,l){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:r,selectedItem:s,itemIdPath:o,focusedIndex:n,renderer:a,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&&Hr(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()||qs||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?lh(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?lh(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",(()=>{qs&&!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||(bh(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,r=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&r>=0&&(this.selectedItem=t[r]);const s=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=s>-1?s:this.__getItemIndexByLabel(this.filteredItems,this.filter)}_filterItems(t,e){return t?t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1))):t}_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&&bh(e)?yh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?yh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof mh||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())}}
|
|
3597
|
-
/**
|
|
3598
|
-
* @license
|
|
3599
|
-
* Copyright (c) 2015 - 2023 Vaadin Ltd.
|
|
3600
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
3601
|
-
*/;vt("vaadin-combo-box",en,{moduleId:"vaadin-combo-box-styles"});class xh extends(_h(wh(gh(tn(wt(er(Oi))))))){static get is(){return"vaadin-combo-box"}static get template(){return Ti`
|
|
3602
|
-
<style>
|
|
3603
|
-
:host([opened]) {
|
|
3604
|
-
pointer-events: auto;
|
|
3605
|
-
}
|
|
3606
|
-
</style>
|
|
3607
|
-
|
|
3608
|
-
<div class="vaadin-combo-box-container">
|
|
3609
|
-
<div part="label">
|
|
3610
|
-
<slot name="label"></slot>
|
|
3611
|
-
<span part="required-indicator" aria-hidden="true" on-click="focus"></span>
|
|
3612
|
-
</div>
|
|
3613
|
-
|
|
3614
|
-
<vaadin-input-container
|
|
3615
|
-
part="input-field"
|
|
3616
|
-
readonly="[[readonly]]"
|
|
3617
|
-
disabled="[[disabled]]"
|
|
3618
|
-
invalid="[[invalid]]"
|
|
3619
|
-
theme$="[[_theme]]"
|
|
3620
|
-
>
|
|
3621
|
-
<slot name="prefix" slot="prefix"></slot>
|
|
3622
|
-
<slot name="input"></slot>
|
|
3623
|
-
<div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
|
|
3624
|
-
<div id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></div>
|
|
3625
|
-
</vaadin-input-container>
|
|
3626
|
-
|
|
3627
|
-
<div part="helper-text">
|
|
3628
|
-
<slot name="helper"></slot>
|
|
3629
|
-
</div>
|
|
3630
|
-
|
|
3631
|
-
<div part="error-message">
|
|
3632
|
-
<slot name="error-message"></slot>
|
|
3633
|
-
</div>
|
|
3634
|
-
</div>
|
|
3635
|
-
|
|
3636
|
-
<vaadin-combo-box-overlay
|
|
3637
|
-
id="overlay"
|
|
3638
|
-
opened="[[_overlayOpened]]"
|
|
3639
|
-
loading$="[[loading]]"
|
|
3640
|
-
theme$="[[_theme]]"
|
|
3641
|
-
position-target="[[_positionTarget]]"
|
|
3642
|
-
no-vertical-overlap
|
|
3643
|
-
restore-focus-node="[[inputElement]]"
|
|
3644
|
-
></vaadin-combo-box-overlay>
|
|
3645
|
-
|
|
3646
|
-
<slot name="tooltip"></slot>
|
|
3647
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Zr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new ss(this.inputElement,this._labelController)),this._tooltipController=new hr(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(xh);const Eh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,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)}}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 n("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?"":"select__input--invalid"),i("div",{class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"select__wrapper--flex"},i("label",{class:"select__label "+(this.validation.mandatory?"select__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"select__wrapper--relative"},this.tooltip&&i("img",{class:"select__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{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",{class:"select__error-message"},this.errorMessage))}get element(){return r(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Eh.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;height:100%}.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:1px solid 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){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}.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 kh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,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)}}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||t,value:t.Prefix||t})))}))}}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,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):r}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?n("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?"":"tel__wrapper--flex--invalid"),i("div",{class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"tel__wrapper--flex-label"},i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"tel__wrapper--relative"},this.tooltip&&i("img",{class:"tel__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{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",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};kh.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%, #dde0ee 25%, #dde0ee 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 Sh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,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)}}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,r;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,r=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return n(`${i}`,this.language)?n(`${i}`,this.language):r}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return n("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return n("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===(r=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===r?void 0:r.errorMessage;return n(`${t}`,this.language)?n(`${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",{class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{class:"text__wrapper--flex"},i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"text__wrapper--relative"},this.tooltip&&i("img",{class:"text__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{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",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Sh.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));outline-color: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 Ah=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.handleLabelClick=t=>{t.stopPropagation()}}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 n("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`,onClick:this.handleLabelClick},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",{class:`togglecheckbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"togglecheckbox__wrapper--flex"},i("input",{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",{class:"togglecheckbox__error-message"},this.errorMessage),i("div",{class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{class:"togglecheckbox__tooltip-icon",src:a,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{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})))))}};Ah.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{ys as checkbox_group_input,ws as checkbox_input,Vl as date_input,ql as email_input,Hl as general_input,Yl as general_registration,Xl as number_input,eh as password_input,ih as radio_input,Eh as select_input,kh as tel_input,Sh as text_input,Ah as toggle_checkbox_input}
|