@everymatrix/general-registration 1.10.2 → 1.10.3

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.
Files changed (33) hide show
  1. package/dist/cjs/checkbox-input_11.cjs.entry.js +28191 -719
  2. package/dist/cjs/general-registration.cjs.js +2 -2
  3. package/dist/cjs/{index-c04f4a2a.js → index-9a07d1e9.js} +5 -0
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/collection/components/general-registration/general-registration.js +283 -214
  6. package/dist/components/checkbox-input2.js +9 -5
  7. package/dist/components/date-input2.js +6490 -7
  8. package/dist/components/email-input2.js +2 -1
  9. package/dist/components/general-input2.js +11 -9
  10. package/dist/components/general-registration.js +282 -214
  11. package/dist/components/locale.utils.js +2 -1
  12. package/dist/components/number-input2.js +2 -1
  13. package/dist/components/password-input2.js +8 -1
  14. package/dist/components/select-input2.js +13 -4
  15. package/dist/components/tel-input2.js +30 -2
  16. package/dist/components/text-input2.js +4 -4
  17. package/dist/components/vaadin-combo-box.js +4423 -0
  18. package/dist/components/virtual-keyboard-controller.js +16466 -0
  19. package/dist/esm/checkbox-input_11.entry.js +28191 -719
  20. package/dist/esm/general-registration.js +2 -2
  21. package/dist/esm/{index-79f297c1.js → index-0505440f.js} +5 -1
  22. package/dist/esm/loader.js +2 -2
  23. package/dist/general-registration/general-registration.esm.js +1 -1
  24. package/dist/general-registration/p-1a88a312.js +1 -0
  25. package/dist/general-registration/p-7c69629f.entry.js +3164 -0
  26. package/dist/types/Users/{user/workspace/everymatrix → adrian.pripon/Documents/Work/stencil}/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/types.d.ts +8 -0
  27. package/dist/types/Users/adrian.pripon/Documents/Work/stencil/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +2 -0
  28. package/dist/types/components/general-registration/general-registration.d.ts +265 -7
  29. package/package.json +7 -5
  30. package/dist/general-registration/p-0e7175cd.js +0 -1
  31. package/dist/general-registration/p-d92411a2.entry.js +0 -1
  32. package/dist/types/Users/user/workspace/everymatrix/widgets-stencil/packages/general-registration/.stencil/packages/general-registration/stencil.config.d.ts +0 -2
  33. /package/dist/types/Users/{user/workspace/everymatrix → adrian.pripon/Documents/Work/stencil}/widgets-stencil/packages/general-registration/.stencil/packages/general-input/src/utils/locale.utils.d.ts +0 -0
@@ -0,0 +1,3164 @@
1
+ import{r as t,c as e,h as i,g as s}from"./p-1a88a312.js";const o=["ro","en"],r={en:{dateError:"The selected date should be between {min} and {max}",numberLengthError:"The number should be between ${min} and ${max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",nextButton:"Next",backButton:"Back",doneButton:"Done"},ro:{lengthError:"Cuvântul introdus este prea scurt. {minLength} and {maxLength}",requiredError:"Acest câmp este obligatoriu."}},n=(t,e,i)=>{const s=e;let n=r[void 0!==s&&o.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");n=n.replace(i,e)}return n},a=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.value=""}validityChanged(){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)}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}render(){return i("div",{class:"checkbox__wrapper"},i("input",{type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:!!this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),i("label",{htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("small",{class:"checkbox__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};a.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:red}";
2
+ /**
3
+ * @license
4
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
5
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
+ */
7
+ class h extends HTMLElement{static get version(){return"23.3.13"}}customElements.define("vaadin-lumo-styles",h);
8
+ /**
9
+ * @license
10
+ * Copyright 2019 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */
13
+ const l=window,c=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,d=Symbol(),u=new WeakMap;class p{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(c&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=u.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&u.set(e,t))}return t}toString(){return this.cssText}}const m=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>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[s+1]),t[0]);return new p(i,t,d)},f=c?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new p("string"==typeof t?t:t+"",void 0,d))(e)})(t):t
14
+ /**
15
+ * @license
16
+ * Copyright 2017 Google LLC
17
+ * SPDX-License-Identifier: BSD-3-Clause
18
+ */;var v;const g=window,b=g.trustedTypes,y=b?b.emptyScript:"",_=g.reactiveElementPolyfillSupport,w={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}},x=(t,e)=>e!==t&&(e==e||t==t),k={attribute:!0,type:String,converter:w,reflect:!1,hasChanged:x};class C extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}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 s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),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,s=this.getPropertyDescriptor(t,i,e);void 0!==s&&Object.defineProperty(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(s){const o=this[t];this[e]=s,this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||k}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!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(f(t))}else void 0!==t&&e.push(f(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}u(){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)=>{c?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=l.litNonce;void 0!==s&&i.setAttribute("nonce",s),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 s;const o=this.constructor._$Ep(t,i);if(void 0!==o&&!0===i.reflect){const r=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:w).toAttribute(e,i.type);this._$El=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Ev.get(t);if(void 0!==o&&this._$El!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:w;this._$El=o,this[o]=r.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||x)(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))):s=!1),!this.isUpdatePending&&s&&(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){}}
19
+ /**
20
+ * @license
21
+ * Copyright 2017 Google LLC
22
+ * SPDX-License-Identifier: BSD-3-Clause
23
+ */
24
+ var A;C.finalized=!0,C.elementProperties=new Map,C.elementStyles=[],C.shadowRootOptions={mode:"open"},null==_||_({ReactiveElement:C}),(null!==(v=g.reactiveElementVersions)&&void 0!==v?v:g.reactiveElementVersions=[]).push("1.6.1");const S=window,T=S.trustedTypes,I=T?T.createPolicy("lit-html",{createHTML:t=>t}):void 0,z=`lit$${(Math.random()+"").slice(9)}$`,E="?"+z,D=`<${E}>`,P=document,O=()=>P.createComment(""),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,B="[ \t\n\f\r]",V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,F=/-->/g,L=/>/g,$=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,H=/"/g,q=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),U=Symbol.for("lit-nothing"),W=new WeakMap,Y=P.createTreeWalker(P,129,null,!1),G=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":"",n=V;for(let e=0;e<i;e++){const i=t[e];let a,h,l=-1,c=0;for(;c<i.length&&(n.lastIndex=c,h=n.exec(i),null!==h);)c=n.lastIndex,n===V?"!--"===h[1]?n=F:void 0!==h[1]?n=L:void 0!==h[2]?(q.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=$):void 0!==h[3]&&(n=$):n===$?">"===h[0]?(n=null!=o?o:V,l=-1):void 0===h[1]?l=-2:(l=n.lastIndex-h[2].length,a=h[1],n=void 0===h[3]?$:'"'===h[3]?H:j):n===H||n===j?n=$:n===F||n===L?n=V:(n=$,o=void 0);const d=n===$&&t[e+1].startsWith("/>")?" ":"";r+=n===V?i+D:l>=0?(s.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+z+d):i+z+(-2===l?(s.push(void 0),e):d)}const a=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==I?I.createHTML(a):a,s]};class J{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[h,l]=G(t,e);if(this.el=J.createElement(h,i),Y.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=Y.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(z)){const i=l[r++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(z),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:o,name:e[2],strings:t,ctor:"."===e[1]?tt:"?"===e[1]?it:"@"===e[1]?st:Q})}else a.push({type:6,index:o})}for(const e of t)s.removeAttribute(e)}if(q.test(s.tagName)){const t=s.textContent.split(z),e=t.length-1;if(e>0){s.textContent=T?T.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],O()),Y.nextNode(),a.push({type:2,index:++o});s.append(t[e],O())}}}else if(8===s.nodeType)if(s.data===E)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(z,t+1));)a.push({type:7,index:o}),t+=z.length-1}o++}}static createElement(t,e){const i=P.createElement("template");return i.innerHTML=t,i}}function K(t,e,i=t,s){var o,r,n,a;if(e===R)return e;let h=void 0!==s?null===(o=i._$Co)||void 0===o?void 0:o[s]:i._$Cl;const l=M(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==l&&(null===(r=null==h?void 0:h._$AO)||void 0===r||r.call(h,!1),void 0===l?h=void 0:(h=new l(t),h._$AT(t,i,s)),void 0!==s?(null!==(n=(a=i)._$Co)&&void 0!==n?n:a._$Co=[])[s]=h:i._$Cl=h),void 0!==h&&(e=K(t,h._$AS(t,e.values),h,s)),e}class Z{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:s}=this._$AD,o=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:P).importNode(i,!0);Y.currentNode=o;let r=Y.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new X(r,r.nextSibling,this,t):1===h.type?e=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(e=new ot(r,this,t)),this._$AV.push(e),h=s[++a]}n!==(null==h?void 0:h.index)&&(r=Y.nextNode(),n++)}return Y.currentNode=P,o}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 X{constructor(t,e,i,s){var o;this.type=2,this._$AH=U,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(o=null==s?void 0:s.isConnected)||void 0===o||o}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=K(this,t,e),M(t)?t===U||null==t||""===t?(this._$AH!==U&&this._$AR(),this._$AH=U):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>N(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!==U&&M(this._$AH)?this._$AA.nextSibling.data=t:this.$(P.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=J.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===o)this._$AH.v(i);else{const t=new Z(o,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new J(t)),e}T(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new X(this.k(O()),this.k(O()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$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 Q{constructor(t,e,i,s,o){this.type=1,this._$AH=U,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=U}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=K(this,t,e,0),r=!M(t)||t!==this._$AH&&t!==R,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=K(this,s[i+n],e,n),a===R&&(a=this._$AH[n]),r||(r=!M(a)||a!==this._$AH[n]),a===U?t=U:t!==U&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===U?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class tt extends Q{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===U?void 0:t}}const et=T?T.emptyScript:"";class it extends Q{constructor(){super(...arguments),this.type=4}j(t){t&&t!==U?this.element.setAttribute(this.name,et):this.element.removeAttribute(this.name)}}class st extends Q{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=K(this,t,e,0))&&void 0!==i?i:U)===R)return;const s=this._$AH,o=t===U&&s!==U||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==U&&(s===U||o);o&&this.element.removeEventListener(this.name,this,s),r&&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 ot{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){K(this,t)}}const rt=S.litHtmlPolyfillSupport;
25
+ /**
26
+ * @license
27
+ * Copyright 2017 Google LLC
28
+ * SPDX-License-Identifier: BSD-3-Clause
29
+ */
30
+ var nt,at;null==rt||rt(J,X),(null!==(A=S.litHtmlVersions)&&void 0!==A?A:S.litHtmlVersions=[]).push("2.7.4");class ht extends C{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 s,o;const r=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=r._$litPart$;if(void 0===n){const t=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:null;r._$litPart$=n=new X(e.insertBefore(O(),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 R}}ht.finalized=!0,ht._$litElement$=!0,null===(nt=globalThis.litElementHydrateSupport)||void 0===nt||nt.call(globalThis,{LitElement:ht});const lt=globalThis.litElementPolyfillSupport;null==lt||lt({LitElement:ht}),(null!==(at=globalThis.litElementVersions)&&void 0!==at?at:globalThis.litElementVersions=[]).push("3.3.2");
31
+ /**
32
+ * @license
33
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
34
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
35
+ */
36
+ const ct=t=>class extends t{static get properties(){return{theme:{type:String,reflectToAttribute:!0,observer:"__deprecatedThemePropertyChanged"},_theme:{type:String,readOnly:!0}}}__deprecatedThemePropertyChanged(t){this._set_theme(t)}}
37
+ /**
38
+ * @license
39
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
40
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
41
+ */,dt=[];function ut(t,e,i={}){t&&gt(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof p||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):dt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function pt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():dt}function mt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function ft(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=pt().find((e=>e.moduleId===t));i?e.push(...ft(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function vt(t){const e=`${t}-default-theme`,i=pt().filter((i=>i.moduleId!==e&&function(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`).test(e)))}(i.themeFor,t))).map((t=>({...t,styles:[...ft(t),...t.styles],includePriority:mt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:pt().filter((t=>t.moduleId===e))}function gt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const bt=t=>class extends(ct(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!gt(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:[])||[],...vt(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,i)=>i===e.lastIndexOf(t)))}}
42
+ /**
43
+ * @license
44
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
45
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
46
+ */,yt=m`
47
+ :host {
48
+ /* Base (background) */
49
+ --lumo-base-color: #fff;
50
+
51
+ /* Tint */
52
+ --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
53
+ --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
54
+ --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
55
+ --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
56
+ --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
57
+ --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
58
+ --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
59
+ --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
60
+ --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
61
+ --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
62
+ --lumo-tint: #fff;
63
+
64
+ /* Shade */
65
+ --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
66
+ --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
67
+ --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
68
+ --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
69
+ --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
70
+ --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
71
+ --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
72
+ --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
73
+ --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
74
+ --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
75
+ --lumo-shade: hsl(214, 35%, 15%);
76
+
77
+ /* Contrast */
78
+ --lumo-contrast-5pct: var(--lumo-shade-5pct);
79
+ --lumo-contrast-10pct: var(--lumo-shade-10pct);
80
+ --lumo-contrast-20pct: var(--lumo-shade-20pct);
81
+ --lumo-contrast-30pct: var(--lumo-shade-30pct);
82
+ --lumo-contrast-40pct: var(--lumo-shade-40pct);
83
+ --lumo-contrast-50pct: var(--lumo-shade-50pct);
84
+ --lumo-contrast-60pct: var(--lumo-shade-60pct);
85
+ --lumo-contrast-70pct: var(--lumo-shade-70pct);
86
+ --lumo-contrast-80pct: var(--lumo-shade-80pct);
87
+ --lumo-contrast-90pct: var(--lumo-shade-90pct);
88
+ --lumo-contrast: var(--lumo-shade);
89
+
90
+ /* Text */
91
+ --lumo-header-text-color: var(--lumo-contrast);
92
+ --lumo-body-text-color: var(--lumo-contrast-90pct);
93
+ --lumo-secondary-text-color: var(--lumo-contrast-70pct);
94
+ --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
95
+ --lumo-disabled-text-color: var(--lumo-contrast-30pct);
96
+
97
+ /* Primary */
98
+ --lumo-primary-color: hsl(214, 100%, 48%);
99
+ --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
100
+ --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
101
+ --lumo-primary-text-color: hsl(214, 100%, 43%);
102
+ --lumo-primary-contrast-color: #fff;
103
+
104
+ /* Error */
105
+ --lumo-error-color: hsl(3, 85%, 48%);
106
+ --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
107
+ --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
108
+ --lumo-error-text-color: hsl(3, 89%, 42%);
109
+ --lumo-error-contrast-color: #fff;
110
+
111
+ /* Success */
112
+ --lumo-success-color: hsl(145, 72%, 30%);
113
+ --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
114
+ --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
115
+ --lumo-success-text-color: hsl(145, 85%, 25%);
116
+ --lumo-success-contrast-color: #fff;
117
+ }
118
+ `,_t=document.createElement("template");_t.innerHTML=`<style>${yt.toString().replace(":host","html")}</style>`,document.head.appendChild(_t.content);const wt=m`
119
+ [theme~='dark'] {
120
+ /* Base (background) */
121
+ --lumo-base-color: hsl(214, 35%, 21%);
122
+
123
+ /* Tint */
124
+ --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
125
+ --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
126
+ --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
127
+ --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
128
+ --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
129
+ --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
130
+ --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
131
+ --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
132
+ --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
133
+ --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
134
+ --lumo-tint: hsl(214, 100%, 98%);
135
+
136
+ /* Shade */
137
+ --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
138
+ --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
139
+ --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
140
+ --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
141
+ --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
142
+ --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
143
+ --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
144
+ --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
145
+ --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
146
+ --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
147
+ --lumo-shade: hsl(214, 33%, 13%);
148
+
149
+ /* Contrast */
150
+ --lumo-contrast-5pct: var(--lumo-tint-5pct);
151
+ --lumo-contrast-10pct: var(--lumo-tint-10pct);
152
+ --lumo-contrast-20pct: var(--lumo-tint-20pct);
153
+ --lumo-contrast-30pct: var(--lumo-tint-30pct);
154
+ --lumo-contrast-40pct: var(--lumo-tint-40pct);
155
+ --lumo-contrast-50pct: var(--lumo-tint-50pct);
156
+ --lumo-contrast-60pct: var(--lumo-tint-60pct);
157
+ --lumo-contrast-70pct: var(--lumo-tint-70pct);
158
+ --lumo-contrast-80pct: var(--lumo-tint-80pct);
159
+ --lumo-contrast-90pct: var(--lumo-tint-90pct);
160
+ --lumo-contrast: var(--lumo-tint);
161
+
162
+ /* Text */
163
+ --lumo-header-text-color: var(--lumo-contrast);
164
+ --lumo-body-text-color: var(--lumo-contrast-90pct);
165
+ --lumo-secondary-text-color: var(--lumo-contrast-70pct);
166
+ --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
167
+ --lumo-disabled-text-color: var(--lumo-contrast-30pct);
168
+
169
+ /* Primary */
170
+ --lumo-primary-color: hsl(214, 90%, 48%);
171
+ --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
172
+ --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
173
+ --lumo-primary-text-color: hsl(214, 90%, 77%);
174
+ --lumo-primary-contrast-color: #fff;
175
+
176
+ /* Error */
177
+ --lumo-error-color: hsl(3, 79%, 49%);
178
+ --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
179
+ --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
180
+ --lumo-error-text-color: hsl(3, 100%, 80%);
181
+
182
+ /* Success */
183
+ --lumo-success-color: hsl(145, 72%, 30%);
184
+ --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
185
+ --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
186
+ --lumo-success-text-color: hsl(145, 85%, 46%);
187
+ }
188
+
189
+ html {
190
+ color: var(--lumo-body-text-color);
191
+ background-color: var(--lumo-base-color);
192
+ color-scheme: light;
193
+ }
194
+
195
+ [theme~='dark'] {
196
+ color: var(--lumo-body-text-color);
197
+ background-color: var(--lumo-base-color);
198
+ color-scheme: dark;
199
+ }
200
+
201
+ h1,
202
+ h2,
203
+ h3,
204
+ h4,
205
+ h5,
206
+ h6 {
207
+ color: var(--lumo-header-text-color);
208
+ }
209
+
210
+ a:where(:any-link) {
211
+ color: var(--lumo-primary-text-color);
212
+ }
213
+
214
+ a:not(:any-link) {
215
+ color: var(--lumo-disabled-text-color);
216
+ }
217
+
218
+ blockquote {
219
+ color: var(--lumo-secondary-text-color);
220
+ }
221
+
222
+ code,
223
+ pre {
224
+ background-color: var(--lumo-contrast-10pct);
225
+ border-radius: var(--lumo-border-radius-m);
226
+ }
227
+ `;ut("",wt,{moduleId:"lumo-color"}),ut("",[wt,m`
228
+ :host {
229
+ color: var(--lumo-body-text-color) !important;
230
+ background-color: var(--lumo-base-color) !important;
231
+ }
232
+ `],{moduleId:"lumo-color-legacy"});
233
+ /**
234
+ * @license
235
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
236
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
237
+ */
238
+ const xt=m`
239
+ :host {
240
+ --lumo-size-xs: 1.625rem;
241
+ --lumo-size-s: 1.875rem;
242
+ --lumo-size-m: 2.25rem;
243
+ --lumo-size-l: 2.75rem;
244
+ --lumo-size-xl: 3.5rem;
245
+
246
+ /* Icons */
247
+ --lumo-icon-size-s: 1.25em;
248
+ --lumo-icon-size-m: 1.5em;
249
+ --lumo-icon-size-l: 2.25em;
250
+ /* For backwards compatibility */
251
+ --lumo-icon-size: var(--lumo-icon-size-m);
252
+ }
253
+ `,kt=document.createElement("template");kt.innerHTML=`<style>${xt.toString().replace(":host","html")}</style>`,document.head.appendChild(kt.content);
254
+ /**
255
+ * @license
256
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
257
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
258
+ */
259
+ const Ct=m`
260
+ :host {
261
+ /* Border radius */
262
+ --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
263
+ --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
264
+ --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
265
+ --lumo-border-radius: 0.25em; /* Deprecated */
266
+
267
+ /* Shadow */
268
+ --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
269
+ --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
270
+ --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
271
+ --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
272
+ --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
273
+
274
+ /* Clickable element cursor */
275
+ --lumo-clickable-cursor: default;
276
+ }
277
+ `;m`
278
+ html {
279
+ --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
280
+ --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
281
+ }
282
+ `;const At=document.createElement("template");At.innerHTML=`<style>${Ct.toString().replace(":host","html")}$</style>`,document.head.appendChild(At.content);
283
+ /**
284
+ * @license
285
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
286
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
287
+ */
288
+ const St=m`
289
+ :host {
290
+ /* prettier-ignore */
291
+ --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
292
+
293
+ /* Font sizes */
294
+ --lumo-font-size-xxs: 0.75rem;
295
+ --lumo-font-size-xs: 0.8125rem;
296
+ --lumo-font-size-s: 0.875rem;
297
+ --lumo-font-size-m: 1rem;
298
+ --lumo-font-size-l: 1.125rem;
299
+ --lumo-font-size-xl: 1.375rem;
300
+ --lumo-font-size-xxl: 1.75rem;
301
+ --lumo-font-size-xxxl: 2.5rem;
302
+
303
+ /* Line heights */
304
+ --lumo-line-height-xs: 1.25;
305
+ --lumo-line-height-s: 1.375;
306
+ --lumo-line-height-m: 1.625;
307
+ }
308
+ `;ut("",m`
309
+ html,
310
+ :host {
311
+ font-family: var(--lumo-font-family);
312
+ font-size: var(--lumo-font-size, var(--lumo-font-size-m));
313
+ line-height: var(--lumo-line-height-m);
314
+ -webkit-text-size-adjust: 100%;
315
+ -webkit-font-smoothing: antialiased;
316
+ -moz-osx-font-smoothing: grayscale;
317
+ }
318
+
319
+ small,
320
+ [theme~='font-size-s'] {
321
+ font-size: var(--lumo-font-size-s);
322
+ line-height: var(--lumo-line-height-s);
323
+ }
324
+
325
+ [theme~='font-size-xs'] {
326
+ font-size: var(--lumo-font-size-xs);
327
+ line-height: var(--lumo-line-height-xs);
328
+ }
329
+
330
+ h1,
331
+ h2,
332
+ h3,
333
+ h4,
334
+ h5,
335
+ h6 {
336
+ font-weight: 600;
337
+ line-height: var(--lumo-line-height-xs);
338
+ margin-top: 1.25em;
339
+ }
340
+
341
+ h1 {
342
+ font-size: var(--lumo-font-size-xxxl);
343
+ margin-bottom: 0.75em;
344
+ }
345
+
346
+ h2 {
347
+ font-size: var(--lumo-font-size-xxl);
348
+ margin-bottom: 0.5em;
349
+ }
350
+
351
+ h3 {
352
+ font-size: var(--lumo-font-size-xl);
353
+ margin-bottom: 0.5em;
354
+ }
355
+
356
+ h4 {
357
+ font-size: var(--lumo-font-size-l);
358
+ margin-bottom: 0.5em;
359
+ }
360
+
361
+ h5 {
362
+ font-size: var(--lumo-font-size-m);
363
+ margin-bottom: 0.25em;
364
+ }
365
+
366
+ h6 {
367
+ font-size: var(--lumo-font-size-xs);
368
+ margin-bottom: 0;
369
+ text-transform: uppercase;
370
+ letter-spacing: 0.03em;
371
+ }
372
+
373
+ p,
374
+ blockquote {
375
+ margin-top: 0.5em;
376
+ margin-bottom: 0.75em;
377
+ }
378
+
379
+ a {
380
+ text-decoration: none;
381
+ }
382
+
383
+ a:where(:any-link):hover {
384
+ text-decoration: underline;
385
+ }
386
+
387
+ hr {
388
+ display: block;
389
+ align-self: stretch;
390
+ height: 1px;
391
+ border: 0;
392
+ padding: 0;
393
+ margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
394
+ background-color: var(--lumo-contrast-10pct);
395
+ }
396
+
397
+ blockquote {
398
+ border-left: 2px solid var(--lumo-contrast-30pct);
399
+ }
400
+
401
+ b,
402
+ strong {
403
+ font-weight: 600;
404
+ }
405
+
406
+ /* RTL specific styles */
407
+ blockquote[dir='rtl'] {
408
+ border-left: none;
409
+ border-right: 2px solid var(--lumo-contrast-30pct);
410
+ }
411
+ `,{moduleId:"lumo-typography"});const Tt=document.createElement("template");Tt.innerHTML=`<style>${St.toString().replace(":host","html")}</style>`,document.head.appendChild(Tt.content),ut("vaadin-input-container",m`
412
+ :host {
413
+ border-radius: var(--lumo-border-radius-m);
414
+ background-color: var(--lumo-contrast-10pct);
415
+ padding: 0 calc(0.375em + var(--lumo-border-radius-m) / 4 - 1px);
416
+ font-weight: 500;
417
+ line-height: 1;
418
+ position: relative;
419
+ cursor: text;
420
+ box-sizing: border-box;
421
+ }
422
+
423
+ /* Used for hover and activation effects */
424
+ :host::after {
425
+ content: '';
426
+ position: absolute;
427
+ top: 0;
428
+ right: 0;
429
+ bottom: 0;
430
+ left: 0;
431
+ border-radius: inherit;
432
+ pointer-events: none;
433
+ background-color: var(--lumo-contrast-50pct);
434
+ opacity: 0;
435
+ transition: transform 0.15s, opacity 0.2s;
436
+ transform-origin: 100% 0;
437
+ }
438
+
439
+ ::slotted(:not([slot$='fix'])) {
440
+ cursor: inherit;
441
+ min-height: var(--lumo-text-field-size, var(--lumo-size-m));
442
+ padding: 0 0.25em;
443
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
444
+ -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
445
+ mask-image: var(--_lumo-text-field-overflow-mask-image);
446
+ }
447
+
448
+ /* Read-only */
449
+ :host([readonly]) {
450
+ color: var(--lumo-secondary-text-color);
451
+ background-color: transparent;
452
+ cursor: default;
453
+ }
454
+
455
+ :host([readonly])::after {
456
+ background-color: transparent;
457
+ opacity: 1;
458
+ border: 1px dashed var(--lumo-contrast-30pct);
459
+ }
460
+
461
+ /* Disabled */
462
+ :host([disabled]) {
463
+ background-color: var(--lumo-contrast-5pct);
464
+ }
465
+
466
+ :host([disabled]) ::slotted(*) {
467
+ color: var(--lumo-disabled-text-color);
468
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
469
+ }
470
+
471
+ /* Invalid */
472
+ :host([invalid]) {
473
+ background-color: var(--lumo-error-color-10pct);
474
+ }
475
+
476
+ :host([invalid])::after {
477
+ background-color: var(--lumo-error-color-50pct);
478
+ }
479
+
480
+ /* Slotted icons */
481
+ ::slotted(iron-icon),
482
+ ::slotted(vaadin-icon) {
483
+ color: var(--lumo-contrast-60pct);
484
+ width: var(--lumo-icon-size-m);
485
+ height: var(--lumo-icon-size-m);
486
+ }
487
+
488
+ /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
489
+ ::slotted(iron-icon[icon^='vaadin:']),
490
+ ::slotted(vaadin-icon[icon^='vaadin:']) {
491
+ padding: 0.25em;
492
+ box-sizing: border-box !important;
493
+ }
494
+
495
+ /* Text align */
496
+ :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
497
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
498
+ }
499
+
500
+ @-moz-document url-prefix() {
501
+ :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
502
+ mask-image: var(--_lumo-text-field-overflow-mask-image);
503
+ }
504
+ }
505
+
506
+ :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
507
+ text-align: start;
508
+ --_lumo-text-field-overflow-mask-image: none;
509
+ }
510
+
511
+ :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
512
+ text-align: center;
513
+ --_lumo-text-field-overflow-mask-image: none;
514
+ }
515
+
516
+ :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
517
+ text-align: end;
518
+ --_lumo-text-field-overflow-mask-image: none;
519
+ }
520
+
521
+ @-moz-document url-prefix() {
522
+ /* Firefox is smart enough to align overflowing text to right */
523
+ :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
524
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
525
+ }
526
+ }
527
+
528
+ @-moz-document url-prefix() {
529
+ /* Firefox is smart enough to align overflowing text to right */
530
+ :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
531
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
532
+ }
533
+ }
534
+
535
+ /* RTL specific styles */
536
+ :host([dir='rtl'])::after {
537
+ transform-origin: 0% 0;
538
+ }
539
+
540
+ :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
541
+ --_lumo-text-field-overflow-mask-image: none;
542
+ }
543
+
544
+ :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
545
+ --_lumo-text-field-overflow-mask-image: none;
546
+ }
547
+
548
+ :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
549
+ --_lumo-text-field-overflow-mask-image: none;
550
+ }
551
+
552
+ @-moz-document url-prefix() {
553
+ /* Firefox is smart enough to align overflowing text to right */
554
+ :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
555
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
556
+ }
557
+ }
558
+
559
+ @-moz-document url-prefix() {
560
+ /* Firefox is smart enough to align overflowing text to right */
561
+ :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
562
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
563
+ }
564
+ }
565
+ `,{moduleId:"lumo-input-container"}),
566
+ /**
567
+ @license
568
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
569
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
570
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
571
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
572
+ Code distributed by Google as part of the polymer project is also
573
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
574
+ */
575
+ window.JSCompiler_renameProperty=function(t){return t};
576
+ /**
577
+ @license
578
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
579
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
580
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
581
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
582
+ Code distributed by Google as part of the polymer project is also
583
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
584
+ */
585
+ let It,zt,Et=/(url\()([^)]*)(\))/g,Dt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Pt(t,e){if(t&&Dt.test(t))return t;if("//"===t)return t;if(void 0===It){It=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",It="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),It)try{return new URL(t,e).href}catch(e){return t}return zt||(zt=document.implementation.createHTMLDocument("temp"),zt.base=zt.createElement("base"),zt.head.appendChild(zt.base),zt.anchor=zt.createElement("a"),zt.body.appendChild(zt.anchor)),zt.base.href=e,zt.anchor.href=t,zt.anchor.href||t}function Ot(t,e){return t.replace(Et,(function(t,i,s,o){return i+"'"+Pt(s.replace(/["']/g,""),e)+"'"+o}))}function Mt(t){return t.substring(0,t.lastIndexOf("/")+1)}
586
+ /**
587
+ @license
588
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
589
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
590
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
591
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
592
+ Code distributed by Google as part of the polymer project is also
593
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
594
+ */const Nt=!window.ShadyDOM||!window.ShadyDOM.inUse,Bt=Nt&&"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 Vt=window.Polymer&&window.Polymer.rootPath||Mt(document.baseURI||window.location.href),Ft=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Lt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,$t=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,jt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ht=window.Polymer&&window.Polymer.legacyWarnings||!1,qt=window.Polymer&&window.Polymer.syncInitialRender||!1,Rt=window.Polymer&&window.Polymer.legacyUndefined||!1,Ut=window.Polymer&&window.Polymer.orderedComputed||!1,Wt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Yt=window.Polymer&&window.Polymer.fastDomIf||!1,Gt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Jt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Kt=0;const Zt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Kt++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
595
+ /**
596
+ @license
597
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
598
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
599
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
600
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
601
+ Code distributed by Google as part of the polymer project is also
602
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
603
+ */let Xt={},Qt={};function te(t,e){Xt[t]=Qt[t.toLowerCase()]=e}function ee(t){return Xt[t]||Qt[t.toLowerCase()]}class ie extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ee(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=Pt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Mt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Lt&&void 0!==ee(t))throw te(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,te(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function se(t){return ie.import(t)}function oe(t){const e=Ot((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function re(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...ne(e[t]));return i}function ne(t){const e=se(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...he(e));const i=e.querySelector("template");i&&t.push(...ae(i,e.assetpath)),e._styles=t}return e._styles}function ae(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute("include");r&&i.push(...re(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Ot(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function he(t){const e=[],i=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute("shady-unscoped");if(i&&!t._unscopedStyle){const e=oe(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=oe(t));e.push(i?t._unscopedStyle:t._style)}}return e}
604
+ /**
605
+ @license
606
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
607
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
608
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
609
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
610
+ Code distributed by Google as part of the polymer project is also
611
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
612
+ */ie.prototype.modules=Xt,customElements.define("dom-module",ie);const le=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
613
+ /**
614
+ @license
615
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
616
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
617
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
618
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
619
+ Code distributed by Google as part of the polymer project is also
620
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
621
+ */function ce(t){return t.indexOf(".")>=0}function de(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ue(t,e){return 0===t.indexOf(e+".")}function pe(t,e){return 0===e.indexOf(t+".")}function me(t,e,i){return e+i.slice(t.length)}function fe(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function ve(t){return Array.isArray(t)?fe(t).split("."):t.toString().split(".")}function ge(t,e,i){let s=t,o=ve(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function be(t,e,i){let s=t,o=ve(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
622
+ /**
623
+ @license
624
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
625
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
626
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
627
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
628
+ Code distributed by Google as part of the polymer project is also
629
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
630
+ */const ye={},_e=/-[a-z]/g,we=/([A-Z])/g;function xe(t){return ye[t]||(ye[t]=t.indexOf("-")<0?t:t.replace(_e,(t=>t[1].toUpperCase())))}function ke(t){return ye[t]||(ye[t]=t.replace(we,"-$1").toLowerCase())}
631
+ /**
632
+ @license
633
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
634
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
635
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
636
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
637
+ Code distributed by Google as part of the polymer project is also
638
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
639
+ */let Ce=0,Ae=0,Se=[],Te=0,Ie=!1,ze=document.createTextNode("");new window.MutationObserver((function(){Ie=!1;const t=Se.length;for(let e=0;e<t;e++){let t=Se[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Se.splice(0,t),Ae+=t})).observe(ze,{characterData:!0});const Ee={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)}},De={run:t=>(Ie||(Ie=!0,ze.textContent=Te++),Se.push(t),Ce++),cancel(t){const e=t-Ae;if(e>=0){if(!Se[e])throw new Error("invalid async handle: "+t);Se[e]=null}}},Pe=De,Oe=Zt((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 s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Pe.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,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_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 s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=le(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_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}}})),Me={};let Ne=HTMLElement.prototype;for(;Ne;){let t=Object.getOwnPropertyNames(Ne);for(let e=0;e<t.length;e++)Me[t[e]]=!0;Ne=Object.getPrototypeOf(Ne)}const Be=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Ve=Zt((t=>{const e=Oe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(xe(t[e]))}static attributeNameForProperty(t){return ke(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(Be(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(!Me[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),Fe={"dom-if":!0,"dom-repeat":!0};let Le=!1,$e=!1;const je=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function He(t){let e=t.getAttribute("is");if(e&&Fe[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];je(t,i,e),i.removeAttribute(e)}}return t}function qe(t,e){let i=e.parentInfo&&qe(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function Re(t,e,i,s){s.id&&(e[s.id]=i)}function Ue(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function We(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const Ye=Zt((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 s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Le){Le=!0;const t=document.createElement("textarea");t.placeholder="a",$e=t.placeholder===t.textContent}return $e})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=He(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!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,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=qe(s,t);Re(0,s.$,i,t),We(0,i,t,e),Ue(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let o=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")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
640
+ /**
641
+ * @fileoverview
642
+ * @suppress {checkPrototypalTypes}
643
+ * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
644
+ * This code may only be used under the BSD style license found at
645
+ * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
646
+ * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
647
+ * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
648
+ * Google as part of the polymer project is also subject to an additional IP
649
+ * rights grant found at http://polymer.github.io/PATENTS.txt
650
+ */let Ge=0;const Je=[],Ke={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ze=/[A-Z]/;function Xe(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function Qe(t,e,i,s,o,r){if(e){let n=!1;const a=Ge++;for(let h in i){let l=e[o?de(h):h];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)e.info&&e.info.lastRun===a||o&&!ei(h,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,o,r),n=!0)}return n}return!1}function ti(t,e,i,s,o,r,n,a){let h=!1,l=e[n?de(s):s];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)e.info&&e.info.lastRun===i||n&&!ei(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),h=!0);return h}function ei(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!ue(i,t))||!(!e.wildcard||!pe(i,t))}return!0}function ii(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function si(t,e,i){let s=de(e);return s!==e&&(oi(t,ke(s)+"-changed",i[e],e),!0)}function oi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),le(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function ri(t,e,i,s,o,r){let n=(r?de(e):e)!=e?e:null,a=n?ge(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),oi(t,o.eventName,a,n)}function ni(t,e,i,s,o){let r=t.__data[e];Ft&&(r=Ft(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const ai=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},hi=(t,e,i,s,o)=>{const r=e[o?de(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===Ge||o&&!ei(t,n.trigger)||(n.info.lastRun=Ge,ai(n.info,i,s))}};function li(t,e,i,s,o){let r=vi(t,e,i,0,o);if(r===Je)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ci(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.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||ke(o)+"-changed",a.listenerNegate=e}let h=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,di(t,e,a,s,h)}}function di(t,e,i,s,o){if(!s.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 r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=wi(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:ui,info:n,trigger:s})}}}function ui(t,e,i,s,o,r,n){let a=n[o.index],h=o.binding,l=o.part;if(r&&l.source&&e.length>l.source.length&&"property"==h.kind&&!h.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[h.target]){let s=i[e];e=me(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,l,e,i,s,r);n!==Je&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Ft&&(o=Ft(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[Ke.READ_ONLY]&&e[Ke.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,h,l,n)}}function pi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=le(t)),t[r]=e.literal)}}function mi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=me(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[Ke.READ_ONLY]&&e[Ke.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function fi(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function vi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===Je?Je:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const gi=[],bi=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 yi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function _i(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:gi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=wi(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function wi(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=de(e),i.structured=ce(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function xi(t,e,i){let s=ge(t,i);return void 0===s&&(s=e[i]),s}function ki(t,e,i,s){const o={indexSplices:s};Rt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Rt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Ci(t,e,i,s,o,r){ki(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Ai=Zt((t=>{const e=Ye(Ve(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ke}_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(Si.length){let t=Si[Si.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[Ke.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==Ke.READ_ONLY);let s=Xe(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Xe(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ke.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ke.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ke.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ke.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||de(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=ge(this,t);if(!(t=be(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 s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];pe(r,e)?(o=me(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):pe(n,e)&&(o=me(n,r,e),t._setPendingPropertyOrPath(o,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=le(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ce(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ke.NOTIFY]&&this[Ke.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[Ke.READ_ONLY]&&this[Ke.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 s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ke.COMPUTE];if(o)if(Ut){Ge++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ke.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ke.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.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)hi(t,o,n,r,s);let a;for(;a=n.shift();)li(t,"",e,0,a)&&hi(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;Qe(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),Qe(this,this[Ke.REFLECT],e,i,o),Qe(this,this[Ke.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[Ke.NOTIFY],h=Ge++;for(let n in e)e[n]&&(a&&ti(t,a,h,n,i,s,o)||o&&si(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ke.PROPAGATE]&&Qe(this,this[Ke.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{Qe(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=fe(t),e=fe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=fe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};ki(this,ge(this,t,i),i.path,e)}get(t,e){return ge(e||this,t)}set(t,e,i){i?be(i,t,e):this[Ke.READ_ONLY]&&this[Ke.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=ge(this,t,i),o=s.length,r=s.push(...e);return e.length&&Ci(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=ge(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Ci(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=ge(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Ci(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=ge(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Ci(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=ge(this,t,i),o=s.unshift(...e);return e.length&&Ci(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=ge(this,t,s),i=s.path}else i=Array.isArray(t)?fe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ke.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,Ke.OBSERVE,{fn:ii,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ke.OBSERVE,{fn:ii,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=_i(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");fi(this,i,Ke.OBSERVE,vi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ke.NOTIFY,{fn:ri,info:{eventName:ke(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,Ke.REFLECT,{fn:ni,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=_i(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=fi(this,s,Ke.COMPUTE,li,t,i);Xe(this,"__computeInfo")[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:h,value:l,literal:c}=t[r];if(!c)if(h){const t=pe(n,e),o=xi(s,i,t?e:n);l={path:t?e:n,value:o,base:t?ge(s,n):o}}else l=a?xi(s,i,n):s[n];if(Rt&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Je;o[r]=l}return o}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),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.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 s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Si.push(this);let i=super._stampTemplate(t,e);if(Si.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:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];pi(o,i),mi(o,t,i)}o.__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:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];le(le(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=yi(e)||" ",ci(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";Ze.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=yi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=xe(o)),ci(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;Wt&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let h=n.hostProps;if(Yt&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),Wt||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)ci(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=bi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),h=!1,l="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(l=a.substring(c+2),a=a.substring(0,c),h=!0);let d=_i(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:h,signature:d,dependencies:u,event:l}),o=bi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?vi(t,i,s,0,e.signature):i!=e.source?ge(t,e.source):r&&ce(i)?ge(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Si=[],Ti=Zt((t=>{const e=Oe(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
651
+ /**
652
+ @license
653
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
654
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
655
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
656
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
657
+ Code distributed by Google as part of the polymer project is also
658
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
659
+ */
660
+ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o 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=s(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,s(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 o})),Ii=window.ShadyCSS&&window.ShadyCSS.cssBuild,zi=Zt((t=>{const e=Ti(Ai(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),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,s[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):jt||(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 s=0;s<t.length;s++)i._createMethodObserver(t[s],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&&(!Lt||$t)&&(e=ie.import(t,"template"),Lt&&!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=Mt(t.url);else{const t=ie.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=Vt,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 s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}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 Ot(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,s){if(!Ii){const o=e.content.querySelectorAll("style"),r=ae(e),n=function(t){let e=se(t);return e?he(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let h=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[h];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):h++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),Jt&&Ii&&Bt){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?Pt(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=le(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])),qt&&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=Pt(this.importPath)),Pt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!Ht||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.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,s)}}})),Ei=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Di{constructor(t,e){Mi(t,e);const i=e.reduce(((e,i,s)=>e+Pi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Pi(t){if(t instanceof Di)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Oi=function(t,...e){Mi(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Di)return Pi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ei&&(s=Ei.createHTML(s)),i.innerHTML=s,i},Mi=(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")},Ni=zi(HTMLElement);
661
+ /**
662
+ * @license
663
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
664
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
665
+ */
666
+ class Bi{static detectScrollType(){const t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let e="reverse";return t.scrollLeft>0?e="default":(t.scrollLeft=2,t.scrollLeft<2&&(e="negative")),document.body.removeChild(t),e}static getNormalizedScrollLeft(t,e,i){const{scrollLeft:s}=i;if("rtl"!==e||!t)return s;switch(t){case"negative":return i.scrollWidth-i.clientWidth+s;case"reverse":return i.scrollWidth-i.clientWidth-s;default:return s}}static setNormalizedScrollLeft(t,e,i,s){if("rtl"===e&&t)switch(t){case"negative":i.scrollLeft=i.clientWidth-i.scrollWidth+s;break;case"reverse":i.scrollLeft=i.scrollWidth-i.clientWidth-s;break;default:i.scrollLeft=s}else i.scrollLeft=s}}
667
+ /**
668
+ * @license
669
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
670
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
671
+ */const Vi=[];let Fi;function Li(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function $i(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=$i();Vi.forEach((e=>{Li(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}}}}static finalize(){super.finalize(),Fi||(Fi=Bi.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Li(this,$i(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=$i(),o=i===s&&-1===Vi.indexOf(this),r=!i&&e&&-1===Vi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Li(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Vi.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(){Vi.includes(this)||Vi.push(this)}__unsubscribe(){Vi.includes(this)&&Vi.splice(Vi.indexOf(this),1)}__getNormalizedScrollLeft(t){return Bi.getNormalizedScrollLeft(Fi,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Bi.setNormalizedScrollLeft(Fi,this.getAttribute("dir")||"ltr",t,e)}}
672
+ /**
673
+ * @license
674
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
675
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
676
+ */;class Hi extends(bt(ji(Ni))){static get is(){return"vaadin-input-container"}static get template(){return Oi`
677
+ <style>
678
+ :host {
679
+ display: flex;
680
+ align-items: center;
681
+ flex: 0 1 auto;
682
+ }
683
+
684
+ :host([hidden]) {
685
+ display: none !important;
686
+ }
687
+
688
+ /* Reset the native input styles */
689
+ ::slotted(input) {
690
+ -webkit-appearance: none;
691
+ -moz-appearance: none;
692
+ flex: auto;
693
+ white-space: nowrap;
694
+ overflow: hidden;
695
+ width: 100%;
696
+ height: 100%;
697
+ outline: none;
698
+ margin: 0;
699
+ padding: 0;
700
+ border: 0;
701
+ border-radius: 0;
702
+ min-width: 0;
703
+ font: inherit;
704
+ line-height: normal;
705
+ color: inherit;
706
+ background-color: transparent;
707
+ /* Disable default invalid style in Firefox */
708
+ box-shadow: none;
709
+ }
710
+
711
+ ::slotted(*) {
712
+ flex: none;
713
+ }
714
+
715
+ ::slotted(:is(input, textarea))::placeholder {
716
+ /* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
717
+ /* because ::slotted(...)::placeholder does not work in Safari. */
718
+ font: inherit;
719
+ color: inherit;
720
+ /* Override default opacity in Firefox */
721
+ opacity: 1;
722
+ }
723
+ </style>
724
+ <slot name="prefix"></slot>
725
+ <slot></slot>
726
+ <slot name="suffix"></slot>
727
+ `}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()))}))}}customElements.define(Hi.is,Hi);
728
+ /**
729
+ * @license
730
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
731
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
732
+ */
733
+ const qi=m`
734
+ :host {
735
+ /* Square */
736
+ --lumo-space-xs: 0.25rem;
737
+ --lumo-space-s: 0.5rem;
738
+ --lumo-space-m: 1rem;
739
+ --lumo-space-l: 1.5rem;
740
+ --lumo-space-xl: 2.5rem;
741
+
742
+ /* Wide */
743
+ --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
744
+ --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
745
+ --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
746
+ --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
747
+ --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
748
+
749
+ /* Tall */
750
+ --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
751
+ --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
752
+ --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
753
+ --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
754
+ --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
755
+ }
756
+ `,Ri=document.createElement("template");Ri.innerHTML=`<style>${qi.toString().replace(":host","html")}</style>`,document.head.appendChild(Ri.content);
757
+ /**
758
+ * @license
759
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
760
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
761
+ */
762
+ const Ui=m`
763
+ :host {
764
+ top: var(--lumo-space-m);
765
+ right: var(--lumo-space-m);
766
+ bottom: var(--lumo-space-m);
767
+ left: var(--lumo-space-m);
768
+ /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
769
+ /* stylelint-disable-next-line */
770
+ outline: 0px solid transparent;
771
+ }
772
+
773
+ [part='overlay'] {
774
+ background-color: var(--lumo-base-color);
775
+ background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
776
+ border-radius: var(--lumo-border-radius-m);
777
+ box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);
778
+ color: var(--lumo-body-text-color);
779
+ font-family: var(--lumo-font-family);
780
+ font-size: var(--lumo-font-size-m);
781
+ font-weight: 400;
782
+ line-height: var(--lumo-line-height-m);
783
+ letter-spacing: 0;
784
+ text-transform: none;
785
+ -webkit-text-size-adjust: 100%;
786
+ -webkit-font-smoothing: antialiased;
787
+ -moz-osx-font-smoothing: grayscale;
788
+ }
789
+
790
+ [part='content'] {
791
+ padding: var(--lumo-space-xs);
792
+ }
793
+
794
+ [part='backdrop'] {
795
+ background-color: var(--lumo-shade-20pct);
796
+ animation: 0.2s lumo-overlay-backdrop-enter both;
797
+ will-change: opacity;
798
+ }
799
+
800
+ @keyframes lumo-overlay-backdrop-enter {
801
+ 0% {
802
+ opacity: 0;
803
+ }
804
+ }
805
+
806
+ :host([closing]) [part='backdrop'] {
807
+ animation: 0.2s lumo-overlay-backdrop-exit both;
808
+ }
809
+
810
+ @keyframes lumo-overlay-backdrop-exit {
811
+ 100% {
812
+ opacity: 0;
813
+ }
814
+ }
815
+
816
+ @keyframes lumo-overlay-dummy-animation {
817
+ 0% {
818
+ opacity: 1;
819
+ }
820
+
821
+ 100% {
822
+ opacity: 1;
823
+ }
824
+ }
825
+ `;
826
+ /**
827
+ @license
828
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
829
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
830
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
831
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
832
+ Code distributed by Google as part of the polymer project is also
833
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
834
+ */
835
+ function Wi(t,e,i){return{index:t,removed:e,addedCount:i}}function Yi(t,e){return t===e}
836
+ /**
837
+ @license
838
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
839
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
840
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
841
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
842
+ Code distributed by Google as part of the polymer project is also
843
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
844
+ */function Gi(t){return"slot"===t.localName}ut("",Ui,{moduleId:"lumo-overlay"}),ut("vaadin-overlay",Ui,{moduleId:"lumo-vaadin-overlay"});let Ji=class{static getFlattenedNodes(t){const e=le(t);return Gi(t)?(t=t,e.assignedNodes({flatten:!0})):Array.from(e.childNodes).map((t=>Gi(t)?le(t=t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Gi(this._target)?this._listenSlots([this._target]):le(this._target).children&&(this._listenSlots(le(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Gi(this._target)?this._unlistenSlots([this._target]):le(this._target).children&&(this._unlistenSlots(le(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,De.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let i=t[e];i.addedNodes&&this._listenSlots(i.addedNodes),i.removedNodes&&this._unlistenSlots(i.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),i=function(t,e,i,s,o,r){let n,a=0,h=0,l=Math.min(i-e,r-o);if(0==e&&0==o&&(a=function(t,e,i){for(let s=0;s<i;s++)if(!Yi(t[s],e[s]))return s;return i}(t,s,l)),i==t.length&&r==s.length&&(h=function(t,e,i){let s=t.length,o=e.length,r=0;for(;r<i&&Yi(t[--s],e[--o]);)r++;return r}(t,s,l-a)),o+=a,r-=h,(i-=h)-(e+=a)==0&&r-o==0)return[];if(e==i){for(n=Wi(e,[],0);o<r;)n.removed.push(s[o++]);return[n]}if(o==r)return[Wi(e,[],i-e)];let c=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i],o=[];for(;e>0||i>0;){if(0==e){o.push(2),i--;continue}if(0==i){o.push(3),e--;continue}let r,n=t[e-1][i-1],a=t[e-1][i],h=t[e][i-1];r=a<h?a<n?a:n:h<n?h:n,r==n?(n==s?o.push(0):(o.push(1),s=n),e--,i--):r==a?(o.push(3),e--,s=a):(o.push(2),i--,s=h)}return o.reverse(),o}(function(t,e,i,s,o,r){let n=r-o+1,a=i-e+1,h=new Array(n);for(let t=0;t<n;t++)h[t]=new Array(a),h[t][0]=t;for(let t=0;t<a;t++)h[0][t]=t;for(let i=1;i<n;i++)for(let r=1;r<a;r++)if(Yi(t[e+r-1],s[o+i-1]))h[i][r]=h[i-1][r-1];else{let t=h[i-1][r]+1,e=h[i][r-1]+1;h[i][r]=t<e?t:e}return h}(t,e,i,s,o,r));n=void 0;let d=[],u=e,p=o;for(let t=0;t<c.length;t++)switch(c[t]){case 0:n&&(d.push(n),n=void 0),u++,p++;break;case 1:n||(n=Wi(u,[],0)),n.addedCount++,u++,n.removed.push(s[p]),p++;break;case 2:n||(n=Wi(u,[],0)),n.addedCount++,u++;break;case 3:n||(n=Wi(u,[],0)),n.removed.push(s[p]),p++}return n&&d.push(n),d}(s=e,0,s.length,o=this._effectiveNodes,0,o.length);var s,o;for(let e,s=0;s<i.length&&(e=i[s]);s++)for(let i,s=0;s<e.removed.length&&(i=e.removed[s]);s++)t.removedNodes.push(i);for(let s,o=0;o<i.length&&(s=i[o]);o++)for(let i=s.index;i<s.index+s.addedCount;i++)t.addedNodes.push(e[i]);this._effectiveNodes=e;let r=!1;return(t.addedNodes.length||t.removedNodes.length)&&(r=!0,this.callback.call(this._target,t)),r}_listenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Gi(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Gi(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}},Ki=!1,Zi=[],Xi=[];
845
+ /**
846
+ @license
847
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
848
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
849
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
850
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
851
+ Code distributed by Google as part of the polymer project is also
852
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
853
+ */function Qi(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function ts(t,e,i){Ki||(Ki=!0,requestAnimationFrame((function(){Ki=!1,function(t){for(;t.length;)Qi(t.shift())}(Zi),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Qi(t.shift())}(Xi)}))}))),Xi.push([t,e,i])}
854
+ /**
855
+ @license
856
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
857
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
858
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
859
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
860
+ Code distributed by Google as part of the polymer project is also
861
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
862
+ */function es(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}const is=Zt((t=>class extends t{_shouldPropertyChange(t,e,i){return es(this,t,e,i,!0)}})),ss=Zt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return es(this,t,e,i,this.mutableData)}}));is._mutablePropertyChange=es;
863
+ /**
864
+ @license
865
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
866
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
867
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
868
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
869
+ Code distributed by Google as part of the polymer project is also
870
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
871
+ */
872
+ let os=null;function rs(){return os}rs.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:rs,writable:!0}});const ns=Ai(rs),as=is(ns),hs=Ai(class{});class ls extends hs{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 s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),le(le(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&le(le(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._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 cs=is(ls);function ds(t){let e=t.__dataHost;return e&&e._methodHost||e}function us(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function ps(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function ms(t,e,i){if(Lt&&!ds(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 s=(e?e.constructor:ls)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?cs:ls;ms.mixin&&(s=ms.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ps(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)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)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=ds(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?as:ns;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:us(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);Ht&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)!function(t,e){os=t,Object.setPrototypeOf(t,e.prototype),new e,os=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,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n=n,n}
873
+ /**
874
+ * @license
875
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
876
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
877
+ */
878
+ const fs=t=>t.test(navigator.userAgent),vs=t=>t.test(navigator.platform);fs(/Android/),fs(/Chrome/)&&/Google Inc/.test(navigator.vendor);const gs=fs(/Firefox/),bs=vs(/^iPad/)||vs(/^Mac/)&&navigator.maxTouchPoints>1,ys=vs(/^iPhone/)||bs,_s=fs(/^((?!chrome|android).)*safari/i),ws=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})(),xs=Zt((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)}}));
879
+ /**
880
+ * @license
881
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
882
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
883
+ */
884
+ let ks=!1;function Cs(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function As(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;)Cs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(As(t.slice(0,i)),As(t.slice(i)))}function Ss(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,s=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 o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=Ss(t,e)||o})),o}function Ts(t){return t.getRootNode().activeElement===t}window.addEventListener("keydown",(()=>{ks=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{ks=!1}),{capture:!0});
885
+ /**
886
+ * @license
887
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
888
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
889
+ */
890
+ const Is=[];class zs{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}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.");Is.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Is.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Is).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()}get __focusableElements(){return function(t){const e=[];return Ss(t,e)?As(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Ts).pop())}}
891
+ /**
892
+ * @license
893
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
894
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
895
+ */class Es extends(bt(ji(xs(Ni)))){static get template(){return Oi`
896
+ <style>
897
+ :host {
898
+ z-index: 200;
899
+ position: fixed;
900
+
901
+ /* Despite of what the names say, <vaadin-overlay> is just a container
902
+ for position/sizing/alignment. The actual overlay is the overlay part. */
903
+
904
+ /* Default position constraints: the entire viewport. Note: themes can
905
+ override this to introduce gaps between the overlay and the viewport. */
906
+ top: 0;
907
+ right: 0;
908
+ bottom: var(--vaadin-overlay-viewport-bottom);
909
+ left: 0;
910
+
911
+ /* Use flexbox alignment for the overlay part. */
912
+ display: flex;
913
+ flex-direction: column; /* makes dropdowns sizing easier */
914
+ /* Align to center by default. */
915
+ align-items: center;
916
+ justify-content: center;
917
+
918
+ /* Allow centering when max-width/max-height applies. */
919
+ margin: auto;
920
+
921
+ /* The host is not clickable, only the overlay part is. */
922
+ pointer-events: none;
923
+
924
+ /* Remove tap highlight on touch devices. */
925
+ -webkit-tap-highlight-color: transparent;
926
+
927
+ /* CSS API for host */
928
+ --vaadin-overlay-viewport-bottom: 0;
929
+ }
930
+
931
+ :host([hidden]),
932
+ :host(:not([opened]):not([closing])) {
933
+ display: none !important;
934
+ }
935
+
936
+ [part='overlay'] {
937
+ -webkit-overflow-scrolling: touch;
938
+ overflow: auto;
939
+ pointer-events: auto;
940
+
941
+ /* Prevent overflowing the host in MSIE 11 */
942
+ max-width: 100%;
943
+ box-sizing: border-box;
944
+
945
+ -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
946
+ }
947
+
948
+ [part='backdrop'] {
949
+ z-index: -1;
950
+ content: '';
951
+ background: rgba(0, 0, 0, 0.5);
952
+ position: fixed;
953
+ top: 0;
954
+ left: 0;
955
+ bottom: 0;
956
+ right: 0;
957
+ pointer-events: auto;
958
+ }
959
+ </style>
960
+
961
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
962
+ <div part="overlay" id="overlay" tabindex="0">
963
+ <div part="content" id="content">
964
+ <slot></slot>
965
+ </div>
966
+ </div>
967
+ `}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, 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),this._observer=new Ji(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),ys&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new zs(this)}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addController(this.__focusTrapController)}_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")}_setTemplateFromNodes(t){this.template=t.find((t=>t.localName&&"template"===t.localName))||this.template}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}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.content,this.owner,this.model)}_ironOverlayCanceled(t){t.preventDefault()}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)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)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(t,e){this._instance||this._ensureTemplatized(),t?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),ts(this,(()=>{this.focusTrap&&this.__focusTrapController.trapFocus(this.$.overlay);const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this.focusTrap&&this.__focusTrapController.releaseFocus(),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).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&t&&"none"!==t}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_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(){document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")}_finishClosing(){document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing")}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){this._exitModalState();const t=this.restoreFocusNode||this.__restoreFocusNode;if(this.restoreFocusOnClose&&t){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&setTimeout((()=>t.focus())),this.__restoreFocusNode=null}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)}static get __attachedInstances(){return Array.from(document.body.children).filter((t=>t instanceof Es&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===Es.__attachedInstances.pop()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Es.__attachedInstances.forEach((t=>{t!==this&&(t.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Es.__attachedInstances;let e;for(;(e=t.pop())&&(e===this||(e.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),e.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((t=>{t.parentNode===this.content&&this.content.removeChild(t)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(t){this._removeOldContent(),t._Templatizer||(t._Templatizer=ms(t,this,{forwardHostProp(t,e){this._instance&&this._instance.forwardHostProp(t,e)}})),this._instance=new t._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const e=t._templateRoot||(t._templateRoot=t.getRootNode());if(e!==document){this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(e.querySelectorAll("style")).reduce(((t,e)=>t+e.textContent),"");if(t=t.replace(/:host/g,":host-nomatch"),t){const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(t,e,i,s){t!==e?this.template=void 0:i!==s&&(this.renderer=void 0)}_templateOrRendererChanged(t,e,i,s,o){if(t&&e)throw this._removeNewRendererOrTemplate(t,this._oldTemplate,e,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const r=this._oldOwner!==i||this._oldModel!==s;this._oldModel=s,this._oldOwner=i;const n=this._oldTemplate!==t;this._oldTemplate=t;const a=this._oldRenderer!==e;this._oldRenderer=e;const h=this._oldOpened!==o;this._oldOpened=o,a&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&n?this._stampOverlayTemplate(t):e&&(a||h||r)&&o&&this.requestContentUpdate()}_getActiveElement(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return 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}bringToFront(){let t="";const e=Es.__attachedInstances.filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(Es.is,Es);
968
+ /**
969
+ * @license
970
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
971
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
972
+ */
973
+ const Ds=m`
974
+ :host([opening]),
975
+ :host([closing]) {
976
+ animation: 0.14s lumo-overlay-dummy-animation;
977
+ }
978
+
979
+ [part='overlay'] {
980
+ will-change: opacity, transform;
981
+ }
982
+
983
+ :host([opening]) [part='overlay'] {
984
+ animation: 0.1s lumo-menu-overlay-enter ease-out both;
985
+ }
986
+
987
+ @keyframes lumo-menu-overlay-enter {
988
+ 0% {
989
+ opacity: 0;
990
+ transform: translateY(-4px);
991
+ }
992
+ }
993
+
994
+ :host([closing]) [part='overlay'] {
995
+ animation: 0.1s lumo-menu-overlay-exit both;
996
+ }
997
+
998
+ @keyframes lumo-menu-overlay-exit {
999
+ 100% {
1000
+ opacity: 0;
1001
+ }
1002
+ }
1003
+ `;ut("",Ds,{moduleId:"lumo-menu-overlay-core"});const Ps=[Ui,Ds,m`
1004
+ /* Small viewport (bottom sheet) styles */
1005
+ /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
1006
+ @media (max-width: 420px), (max-height: 420px) {
1007
+ :host {
1008
+ top: 0 !important;
1009
+ right: 0 !important;
1010
+ bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
1011
+ left: 0 !important;
1012
+ align-items: stretch !important;
1013
+ justify-content: flex-end !important;
1014
+ }
1015
+
1016
+ [part='overlay'] {
1017
+ max-height: 50vh;
1018
+ width: 100vw;
1019
+ border-radius: 0;
1020
+ box-shadow: var(--lumo-box-shadow-xl);
1021
+ }
1022
+
1023
+ /* The content part scrolls instead of the overlay part, because of the gradient fade-out */
1024
+ [part='content'] {
1025
+ padding: 30px var(--lumo-space-m);
1026
+ max-height: inherit;
1027
+ box-sizing: border-box;
1028
+ -webkit-overflow-scrolling: touch;
1029
+ overflow: auto;
1030
+ -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
1031
+ mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
1032
+ }
1033
+
1034
+ [part='backdrop'] {
1035
+ display: block;
1036
+ }
1037
+
1038
+ /* Animations */
1039
+
1040
+ :host([opening]) [part='overlay'] {
1041
+ animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
1042
+ }
1043
+
1044
+ :host([closing]),
1045
+ :host([closing]) [part='backdrop'] {
1046
+ animation-delay: 0.14s;
1047
+ }
1048
+
1049
+ :host([closing]) [part='overlay'] {
1050
+ animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
1051
+ }
1052
+ }
1053
+
1054
+ @keyframes lumo-mobile-menu-overlay-enter {
1055
+ 0% {
1056
+ transform: translateY(150%);
1057
+ }
1058
+ }
1059
+
1060
+ @keyframes lumo-mobile-menu-overlay-exit {
1061
+ 100% {
1062
+ transform: translateY(150%);
1063
+ }
1064
+ }
1065
+ `];ut("",Ps,{moduleId:"lumo-menu-overlay"}),ut("vaadin-date-picker-overlay",[Ps,m`
1066
+ [part='overlay'] {
1067
+ /*
1068
+ Width:
1069
+ date cell widths
1070
+ + month calendar side padding
1071
+ + year scroller width
1072
+ */
1073
+ /* prettier-ignore */
1074
+ width:
1075
+ calc(
1076
+ var(--lumo-size-m) * 7
1077
+ + var(--lumo-space-xs) * 2
1078
+ + 57px
1079
+ );
1080
+ height: 100%;
1081
+ max-height: calc(var(--lumo-size-m) * 14);
1082
+ overflow: hidden;
1083
+ -webkit-tap-highlight-color: transparent;
1084
+ }
1085
+
1086
+ [part='overlay'] {
1087
+ flex-direction: column;
1088
+ }
1089
+
1090
+ [part='content'] {
1091
+ padding: 0;
1092
+ height: 100%;
1093
+ overflow: hidden;
1094
+ -webkit-mask-image: none;
1095
+ mask-image: none;
1096
+ }
1097
+
1098
+ :host([top-aligned]) [part~='overlay'] {
1099
+ margin-top: var(--lumo-space-xs);
1100
+ }
1101
+
1102
+ :host([bottom-aligned]) [part~='overlay'] {
1103
+ margin-bottom: var(--lumo-space-xs);
1104
+ }
1105
+
1106
+ @media (max-width: 420px), (max-height: 420px) {
1107
+ [part='overlay'] {
1108
+ width: 100vw;
1109
+ height: 70vh;
1110
+ max-height: 70vh;
1111
+ }
1112
+ }
1113
+ `],{moduleId:"lumo-date-picker-overlay"}),ut("vaadin-button",m`
1114
+ :host {
1115
+ /* Sizing */
1116
+ --lumo-button-size: var(--lumo-size-m);
1117
+ min-width: calc(var(--lumo-button-size) * 2);
1118
+ height: var(--lumo-button-size);
1119
+ padding: 0 calc(var(--lumo-button-size) / 3 + var(--lumo-border-radius-m) / 2);
1120
+ margin: var(--lumo-space-xs) 0;
1121
+ box-sizing: border-box;
1122
+ /* Style */
1123
+ font-family: var(--lumo-font-family);
1124
+ font-size: var(--lumo-font-size-m);
1125
+ font-weight: 500;
1126
+ color: var(--_lumo-button-color, var(--lumo-primary-text-color));
1127
+ background-color: var(--_lumo-button-background-color, var(--lumo-contrast-5pct));
1128
+ border-radius: var(--lumo-border-radius-m);
1129
+ cursor: var(--lumo-clickable-cursor);
1130
+ -webkit-tap-highlight-color: transparent;
1131
+ -webkit-font-smoothing: antialiased;
1132
+ -moz-osx-font-smoothing: grayscale;
1133
+ }
1134
+
1135
+ /* Set only for the internal parts so we don't affect the host vertical alignment */
1136
+ [part='label'],
1137
+ [part='prefix'],
1138
+ [part='suffix'] {
1139
+ line-height: var(--lumo-line-height-xs);
1140
+ }
1141
+
1142
+ [part='label'] {
1143
+ padding: calc(var(--lumo-button-size) / 6) 0;
1144
+ }
1145
+
1146
+ :host([theme~='small']) {
1147
+ font-size: var(--lumo-font-size-s);
1148
+ --lumo-button-size: var(--lumo-size-s);
1149
+ }
1150
+
1151
+ :host([theme~='large']) {
1152
+ font-size: var(--lumo-font-size-l);
1153
+ --lumo-button-size: var(--lumo-size-l);
1154
+ }
1155
+
1156
+ /* For interaction states */
1157
+ :host::before,
1158
+ :host::after {
1159
+ content: '';
1160
+ /* We rely on the host always being relative */
1161
+ position: absolute;
1162
+ z-index: 1;
1163
+ top: 0;
1164
+ right: 0;
1165
+ bottom: 0;
1166
+ left: 0;
1167
+ background-color: currentColor;
1168
+ border-radius: inherit;
1169
+ opacity: 0;
1170
+ pointer-events: none;
1171
+ }
1172
+
1173
+ /* Hover */
1174
+
1175
+ @media (any-hover: hover) {
1176
+ :host(:hover)::before {
1177
+ opacity: 0.02;
1178
+ }
1179
+ }
1180
+
1181
+ /* Active */
1182
+
1183
+ :host::after {
1184
+ transition: opacity 1.4s, transform 0.1s;
1185
+ filter: blur(8px);
1186
+ }
1187
+
1188
+ :host([active])::before {
1189
+ opacity: 0.05;
1190
+ transition-duration: 0s;
1191
+ }
1192
+
1193
+ :host([active])::after {
1194
+ opacity: 0.1;
1195
+ transition-duration: 0s, 0s;
1196
+ transform: scale(0);
1197
+ }
1198
+
1199
+ /* Keyboard focus */
1200
+
1201
+ :host([focus-ring]) {
1202
+ box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
1203
+ }
1204
+
1205
+ :host([theme~='primary'][focus-ring]) {
1206
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
1207
+ }
1208
+
1209
+ /* Types (primary, tertiary, tertiary-inline */
1210
+
1211
+ :host([theme~='tertiary']),
1212
+ :host([theme~='tertiary-inline']) {
1213
+ background-color: transparent !important;
1214
+ min-width: 0;
1215
+ }
1216
+
1217
+ :host([theme~='tertiary']) {
1218
+ padding: 0 calc(var(--lumo-button-size) / 6);
1219
+ }
1220
+
1221
+ :host([theme~='tertiary-inline'])::before {
1222
+ display: none;
1223
+ }
1224
+
1225
+ :host([theme~='tertiary-inline']) {
1226
+ margin: 0;
1227
+ height: auto;
1228
+ padding: 0;
1229
+ line-height: inherit;
1230
+ font-size: inherit;
1231
+ }
1232
+
1233
+ :host([theme~='tertiary-inline']) [part='label'] {
1234
+ padding: 0;
1235
+ overflow: visible;
1236
+ line-height: inherit;
1237
+ }
1238
+
1239
+ :host([theme~='primary']) {
1240
+ background-color: var(--_lumo-button-primary-background-color, var(--lumo-primary-color));
1241
+ color: var(--_lumo-button-primary-color, var(--lumo-primary-contrast-color));
1242
+ font-weight: 600;
1243
+ min-width: calc(var(--lumo-button-size) * 2.5);
1244
+ }
1245
+
1246
+ :host([theme~='primary'])::before {
1247
+ background-color: black;
1248
+ }
1249
+
1250
+ @media (any-hover: hover) {
1251
+ :host([theme~='primary']:hover)::before {
1252
+ opacity: 0.05;
1253
+ }
1254
+ }
1255
+
1256
+ :host([theme~='primary'][active])::before {
1257
+ opacity: 0.1;
1258
+ }
1259
+
1260
+ :host([theme~='primary'][active])::after {
1261
+ opacity: 0.2;
1262
+ }
1263
+
1264
+ /* Colors (success, error, contrast) */
1265
+
1266
+ :host([theme~='success']) {
1267
+ color: var(--lumo-success-text-color);
1268
+ }
1269
+
1270
+ :host([theme~='success'][theme~='primary']) {
1271
+ background-color: var(--lumo-success-color);
1272
+ color: var(--lumo-success-contrast-color);
1273
+ }
1274
+
1275
+ :host([theme~='error']) {
1276
+ color: var(--lumo-error-text-color);
1277
+ }
1278
+
1279
+ :host([theme~='error'][theme~='primary']) {
1280
+ background-color: var(--lumo-error-color);
1281
+ color: var(--lumo-error-contrast-color);
1282
+ }
1283
+
1284
+ :host([theme~='contrast']) {
1285
+ color: var(--lumo-contrast);
1286
+ }
1287
+
1288
+ :host([theme~='contrast'][theme~='primary']) {
1289
+ background-color: var(--lumo-contrast);
1290
+ color: var(--lumo-base-color);
1291
+ }
1292
+
1293
+ /* Disabled state. Keep selectors after other color variants. */
1294
+
1295
+ :host([disabled]) {
1296
+ pointer-events: none;
1297
+ color: var(--lumo-disabled-text-color);
1298
+ }
1299
+
1300
+ :host([theme~='primary'][disabled]) {
1301
+ background-color: var(--lumo-contrast-30pct);
1302
+ color: var(--lumo-base-color);
1303
+ }
1304
+
1305
+ :host([theme~='primary'][disabled]) [part] {
1306
+ opacity: 0.7;
1307
+ }
1308
+
1309
+ /* Icons */
1310
+
1311
+ [part] ::slotted(vaadin-icon),
1312
+ [part] ::slotted(iron-icon) {
1313
+ display: inline-block;
1314
+ width: var(--lumo-icon-size-m);
1315
+ height: var(--lumo-icon-size-m);
1316
+ }
1317
+
1318
+ /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
1319
+ [part] ::slotted(vaadin-icon[icon^='vaadin:']),
1320
+ [part] ::slotted(iron-icon[icon^='vaadin:']) {
1321
+ padding: 0.25em;
1322
+ box-sizing: border-box !important;
1323
+ }
1324
+
1325
+ [part='prefix'] {
1326
+ margin-left: -0.25em;
1327
+ margin-right: 0.25em;
1328
+ }
1329
+
1330
+ [part='suffix'] {
1331
+ margin-left: 0.25em;
1332
+ margin-right: -0.25em;
1333
+ }
1334
+
1335
+ /* Icon-only */
1336
+
1337
+ :host([theme~='icon']:not([theme~='tertiary-inline'])) {
1338
+ min-width: var(--lumo-button-size);
1339
+ padding-left: calc(var(--lumo-button-size) / 4);
1340
+ padding-right: calc(var(--lumo-button-size) / 4);
1341
+ }
1342
+
1343
+ :host([theme~='icon']) [part='prefix'],
1344
+ :host([theme~='icon']) [part='suffix'] {
1345
+ margin-left: 0;
1346
+ margin-right: 0;
1347
+ }
1348
+
1349
+ /* RTL specific styles */
1350
+
1351
+ :host([dir='rtl']) [part='prefix'] {
1352
+ margin-left: 0.25em;
1353
+ margin-right: -0.25em;
1354
+ }
1355
+
1356
+ :host([dir='rtl']) [part='suffix'] {
1357
+ margin-left: -0.25em;
1358
+ margin-right: 0.25em;
1359
+ }
1360
+
1361
+ :host([dir='rtl'][theme~='icon']) [part='prefix'],
1362
+ :host([dir='rtl'][theme~='icon']) [part='suffix'] {
1363
+ margin-left: 0;
1364
+ margin-right: 0;
1365
+ }
1366
+ `,{moduleId:"lumo-button"});const Os=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ms=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Ns(t,e){if("function"!=typeof t)return;const i=Os.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 Bs(){}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&&(Ms?!(Ms&&Object.keys(Ms).map((t=>Ms[t])).filter((t=>t.productionMode)).length>0):!Ns((function(){return!0})))}catch(t){return!1}}());
1367
+ /**
1368
+ * @license
1369
+ * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1370
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1371
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1372
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1373
+ * Code distributed by Google as part of the polymer project is also
1374
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1375
+ */
1376
+ let Vs=0,Fs=0;const Ls=[];let $s=0,js=!1;const Hs=document.createTextNode("");new window.MutationObserver((function(){js=!1;const t=Ls.length;for(let e=0;e<t;e++){const t=Ls[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ls.splice(0,t),Fs+=t})).observe(Hs,{characterData:!0});const qs={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)}},Rs={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Us={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Ws={run(t){js||(js=!0,Hs.textContent=$s,$s+=1),Ls.push(t);const e=Vs;return Vs+=1,e},cancel(t){const e=t-Fs;if(e>=0){if(!Ls[e])throw new Error(`invalid async handle: ${t}`);Ls[e]=null}}};
1377
+ /**
1378
+ @license
1379
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1380
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1381
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1382
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1383
+ Code distributed by Google as part of the polymer project is also
1384
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1385
+ */
1386
+ class Ys{static debounce(t,e,i){return t instanceof Ys?t._cancelAsync():t=new Ys,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,Gs.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Gs.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}}let Gs=new Set;function Js(t){Gs.add(t)}function Ks(){const t=Boolean(Gs.size);return Gs.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const Zs=()=>{let t;do{t=Ks()}while(t)};
1387
+ /**
1388
+ * @license
1389
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1390
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1391
+ */let Xs;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)Ns(t,e)}(Bs)};const Qs=new Set,to=t=>class extends(ji(t)){static get version(){return"23.3.13"}static finalize(){super.finalize();const{is:t}=this;t&&!Qs.has(t)&&(window.Vaadin.registrations.push(this),Qs.add(t),window.Vaadin.developmentModeCallback&&(Xs=Ys.debounce(Xs,Us,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Js(Xs)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1392
+ /**
1393
+ * @license
1394
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1395
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1396
+ */;let eo=0;function io(){return eo++}
1397
+ /**
1398
+ * @license
1399
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1400
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1401
+ */class so extends EventTarget{static generateId(t,e){return`${t||"default"}-${e.localName}-${io()}`}constructor(t,e,i,s,o){super(),this.host=t,this.slotName=e,this.slotFactory=i,this.slotInitializer=s,o&&(this.defaultId=so.generateId(e,t))}hostConnected(){if(!this.initialized){let t=this.getSlotChild();t?(this.node=t,this.initCustomNode(t)):t=this.attachDefaultNode(),this.initNode(t),this.observe(),this.initialized=!0}}attachDefaultNode(){const{host:t,slotName:e,slotFactory:i}=this;let s=this.defaultNode;return!s&&i&&(s=i(t),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.node=s,this.defaultNode=s)),s&&t.appendChild(s),s}getSlotChild(){const{slotName:t}=this;return Array.from(this.host.childNodes).find((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}initNode(t){const{slotInitializer:e}=this;e&&e(this.host,t)}initCustomNode(t){}teardownNode(t){}observe(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Ji(e,(t=>{const e=this.node,i=t.addedNodes.find((t=>t!==e));t.removedNodes.length&&t.removedNodes.forEach((t=>{this.teardownNode(t)})),i&&(e&&e.isConnected&&this.host.removeChild(e),this.node=i,i!==this.defaultNode&&(this.initCustomNode(i),this.initNode(i)))}))}}
1402
+ /**
1403
+ * @license
1404
+ * Copyright (c) 2022 Vaadin Ltd.
1405
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1406
+ */class oo extends so{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,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)}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)}}
1407
+ /**
1408
+ * @license
1409
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1410
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1411
+ */const ro=Zt((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()}})),no="string"==typeof document.head.style.touchAction,ao="__polymerGesturesHandled",ho="__polymerGesturesTouchAction",lo=["mousedown","mousemove","mouseup","click"],co=[0,1,4,2],uo=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();
1412
+ /**
1413
+ @license
1414
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1415
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1416
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1417
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1418
+ Code distributed by Google as part of the polymer project is also
1419
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1420
+ */function po(t){return lo.indexOf(t)>-1}let mo=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){mo=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const fo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),vo={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function go(t){const e=t.type;if(!po(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!uo&&(e=co[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const bo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function yo(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function _o(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const wo=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],xo={},ko=[];function Co(t){const e=wo(t);return e.length>0?e[0]:t.target}function Ao(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[ao]&&(t[ao]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(bo.touch.id=i.identifier),bo.touch.id!==i.identifier)return;no||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)bo.touch.x=e.clientX,bo.touch.y=e.clientY,bo.touch.scrollDecided=!1;else if("touchmove"===i){if(bo.touch.scrollDecided)return;bo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=wo(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[ho]){e=t[ho];break}return e}(t);let s=!1;const o=Math.abs(bo.touch.x-e.clientX),r=Math.abs(bo.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():Eo("track")}}(t)}const o=t[ao];if(!o.skip){for(let e,i=0;i<ko.length;i++)e=ko[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<ko.length;r++)i=ko[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function So(t,e,i){return!!xo[e]&&(function(t,e,i){const s=xo[e],o=s.deps,r=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],fo&&po(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Ao,void po(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Io(t,s.touchAction)}(t,e,i),!0)}function To(t){ko.push(t);for(let e=0;e<t.emits.length;e++)xo[t.emits[e]]=t}function Io(t,e){no&&t instanceof HTMLElement&&Ws.run((()=>{t.style.touchAction=e})),t[ho]=e}function zo(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,t.dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Eo(t){const e=function(t){for(let e,i=0;i<ko.length;i++){e=ko[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Do(t,e,i,s){e&&zo(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Eo(t)})}function Po(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function Oo(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),zo(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function Mo(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Co(i||e);!r||vo[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Co(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||zo(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
1421
+ /**
1422
+ * @license
1423
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1424
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1425
+ */To({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){_o(this.info)},mousedown(t){if(!go(t))return;const e=Co(t),i=this;yo(this.info,(t=>{go(t)||(Do("up",e,t),_o(i.info))}),(t=>{go(t)&&Do("up",e,t),_o(i.info)})),Do("down",e,t)},touchstart(t){Do("down",Co(t),t.changedTouches[0],t)},touchend(t){Do("up",Co(t),t.changedTouches[0],t)}}),To({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,_o(this.info)},mousedown(t){if(!go(t))return;const e=Co(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;Po(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Eo("tap"),i.info.addMove({x:s,y:o}),go(t)||(i.info.state="end",_o(i.info)),e&&Oo(i.info,e,t),i.info.started=!0)};yo(this.info,s,(t=>{i.info.started&&s(t),_o(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=Co(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;Po(this.info,s,o)&&("start"===this.info.state&&Eo("tap"),this.info.addMove({x:s,y:o}),Oo(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Co(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Oo(this.info,e,i))}}),To({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){go(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){go(t)&&Mo(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Mo(this.info,t.changedTouches[0],t)}});const No=Zt((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){}})),Bo=t=>class extends(ro(No(t))){get _activeKeys(){return[" "]}ready(){super.ready(),So(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),So(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)}}
1426
+ /**
1427
+ * @license
1428
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1429
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1430
+ */,Vo=Zt((t=>class extends t{get _keyboardActive(){return ks}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}})),Fo=t=>class extends(ro(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)}}
1431
+ /**
1432
+ * @license
1433
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1434
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1435
+ */,Lo=t=>class extends(Bo(Fo(Vo(t)))){static get properties(){return{tabindex:{value:0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
1436
+ /**
1437
+ * @license
1438
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1439
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1440
+ */;
1441
+ /**
1442
+ * @license
1443
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
1444
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1445
+ */class $o extends(Lo(to(bt(xs(Ni))))){static get is(){return"vaadin-button"}static get template(){return Oi`
1446
+ <style>
1447
+ :host {
1448
+ display: inline-block;
1449
+ position: relative;
1450
+ outline: none;
1451
+ white-space: nowrap;
1452
+ -webkit-user-select: none;
1453
+ -moz-user-select: none;
1454
+ user-select: none;
1455
+ }
1456
+
1457
+ :host([hidden]) {
1458
+ display: none !important;
1459
+ }
1460
+
1461
+ /* Aligns the button with form fields when placed on the same line.
1462
+ Note, to make it work, the form fields should have the same "::before" pseudo-element. */
1463
+ .vaadin-button-container::before {
1464
+ content: '\\2003';
1465
+ display: inline-block;
1466
+ width: 0;
1467
+ max-height: 100%;
1468
+ }
1469
+
1470
+ .vaadin-button-container {
1471
+ display: inline-flex;
1472
+ align-items: center;
1473
+ justify-content: center;
1474
+ text-align: center;
1475
+ width: 100%;
1476
+ height: 100%;
1477
+ min-height: inherit;
1478
+ text-shadow: inherit;
1479
+ }
1480
+
1481
+ [part='prefix'],
1482
+ [part='suffix'] {
1483
+ flex: none;
1484
+ }
1485
+
1486
+ [part='label'] {
1487
+ white-space: nowrap;
1488
+ overflow: hidden;
1489
+ text-overflow: ellipsis;
1490
+ }
1491
+ </style>
1492
+ <div class="vaadin-button-container">
1493
+ <span part="prefix" aria-hidden="true">
1494
+ <slot name="prefix"></slot>
1495
+ </span>
1496
+ <span part="label">
1497
+ <slot></slot>
1498
+ </span>
1499
+ <span part="suffix" aria-hidden="true">
1500
+ <slot name="suffix"></slot>
1501
+ </span>
1502
+ </div>
1503
+ <slot name="tooltip"></slot>
1504
+ `}ready(){super.ready(),this._tooltipController=new oo(this),this.addController(this._tooltipController)}}customElements.define($o.is,$o),ut("vaadin-date-picker-overlay-content",m`
1505
+ :host {
1506
+ position: relative;
1507
+ /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
1508
+ background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
1509
+ background-size: 57px 100%;
1510
+ background-position: top right;
1511
+ background-repeat: no-repeat;
1512
+ cursor: default;
1513
+ }
1514
+
1515
+ /* Month scroller */
1516
+
1517
+ [part='months'] {
1518
+ /* Month calendar height:
1519
+ header height + margin-bottom
1520
+ + weekdays height + margin-bottom
1521
+ + date cell heights
1522
+ + small margin between month calendars
1523
+ */
1524
+ /* prettier-ignore */
1525
+ --vaadin-infinite-scroller-item-height:
1526
+ calc(
1527
+ var(--lumo-font-size-l) + var(--lumo-space-m)
1528
+ + var(--lumo-font-size-xs) + var(--lumo-space-s)
1529
+ + var(--lumo-size-m) * 6
1530
+ + var(--lumo-space-s)
1531
+ );
1532
+ --vaadin-infinite-scroller-buffer-offset: 10%;
1533
+ -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1534
+ mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1535
+ position: relative;
1536
+ margin-right: 57px;
1537
+ }
1538
+
1539
+ /* Year scroller */
1540
+ [part='years'] {
1541
+ /* TODO get rid of fixed magic number */
1542
+ --vaadin-infinite-scroller-buffer-width: 97px;
1543
+ width: 57px;
1544
+ height: auto;
1545
+ top: 0;
1546
+ bottom: 0;
1547
+ font-size: var(--lumo-font-size-s);
1548
+ box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
1549
+ -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1550
+ mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1551
+ cursor: var(--lumo-clickable-cursor);
1552
+ }
1553
+
1554
+ [part='year-number']:not([current]),
1555
+ [part='year-separator'] {
1556
+ opacity: 0.7;
1557
+ transition: 0.2s opacity;
1558
+ }
1559
+
1560
+ [part='years']:hover [part='year-number'],
1561
+ [part='years']:hover [part='year-separator'] {
1562
+ opacity: 1;
1563
+ }
1564
+
1565
+ /* TODO unsupported selector */
1566
+ #scrollers {
1567
+ position: static;
1568
+ display: block;
1569
+ }
1570
+
1571
+ /* TODO unsupported selector, should fix this in vaadin-date-picker that it adapts to the
1572
+ * width of the year scroller */
1573
+ #scrollers[desktop] [part='months'] {
1574
+ right: auto;
1575
+ }
1576
+
1577
+ /* Year scroller position indicator */
1578
+ [part='years']::before {
1579
+ border: none;
1580
+ width: 1em;
1581
+ height: 1em;
1582
+ background-color: var(--lumo-base-color);
1583
+ background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
1584
+ transform: translate(-75%, -50%) rotate(45deg);
1585
+ border-top-right-radius: var(--lumo-border-radius-s);
1586
+ box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
1587
+ z-index: 1;
1588
+ }
1589
+
1590
+ [part='year-number'],
1591
+ [part='year-separator'] {
1592
+ display: flex;
1593
+ align-items: center;
1594
+ justify-content: center;
1595
+ height: 50%;
1596
+ transform: translateY(-50%);
1597
+ }
1598
+
1599
+ [part='years'] [part='year-separator']::after {
1600
+ color: var(--lumo-disabled-text-color);
1601
+ content: '•';
1602
+ }
1603
+
1604
+ /* Current year */
1605
+
1606
+ [part='years'] [part='year-number'][current] {
1607
+ color: var(--lumo-primary-text-color);
1608
+ }
1609
+
1610
+ /* Toolbar (footer) */
1611
+
1612
+ [part='toolbar'] {
1613
+ padding: var(--lumo-space-s);
1614
+ border-bottom-left-radius: var(--lumo-border-radius-l);
1615
+ margin-right: 57px;
1616
+ }
1617
+
1618
+ /* Today and Cancel buttons */
1619
+
1620
+ [part='toolbar'] [part\$='button'] {
1621
+ margin: 0;
1622
+ }
1623
+
1624
+ /* Narrow viewport mode (fullscreen) */
1625
+
1626
+ :host([fullscreen]) [part='toolbar'] {
1627
+ order: -1;
1628
+ background-color: var(--lumo-base-color);
1629
+ }
1630
+
1631
+ :host([fullscreen]) [part='overlay-header'] {
1632
+ order: -2;
1633
+ height: var(--lumo-size-m);
1634
+ padding: var(--lumo-space-s);
1635
+ position: absolute;
1636
+ left: 0;
1637
+ right: 0;
1638
+ justify-content: center;
1639
+ }
1640
+
1641
+ :host([fullscreen]) [part='toggle-button'],
1642
+ :host([fullscreen]) [part='clear-button'],
1643
+ [part='overlay-header'] [part='label'] {
1644
+ display: none;
1645
+ }
1646
+
1647
+ /* Very narrow screen (year scroller initially hidden) */
1648
+
1649
+ [part='years-toggle-button'] {
1650
+ display: flex;
1651
+ align-items: center;
1652
+ height: var(--lumo-size-s);
1653
+ padding: 0 0.5em;
1654
+ border-radius: var(--lumo-border-radius-m);
1655
+ z-index: 3;
1656
+ color: var(--lumo-primary-text-color);
1657
+ font-weight: 500;
1658
+ -webkit-font-smoothing: antialiased;
1659
+ -moz-osx-font-smoothing: grayscale;
1660
+ }
1661
+
1662
+ :host([years-visible]) [part='years-toggle-button'] {
1663
+ background-color: var(--lumo-primary-color);
1664
+ color: var(--lumo-primary-contrast-color);
1665
+ }
1666
+
1667
+ /* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
1668
+ @media screen and (max-width: 374px) {
1669
+ :host {
1670
+ background-image: none;
1671
+ }
1672
+
1673
+ [part='years'] {
1674
+ background-color: var(--lumo-shade-5pct);
1675
+ }
1676
+
1677
+ [part='toolbar'],
1678
+ [part='months'] {
1679
+ margin-right: 0;
1680
+ }
1681
+
1682
+ /* TODO make date-picker adapt to the width of the years part */
1683
+ [part='years'] {
1684
+ --vaadin-infinite-scroller-buffer-width: 90px;
1685
+ width: 50px;
1686
+ }
1687
+
1688
+ :host([years-visible]) [part='months'] {
1689
+ padding-left: 50px;
1690
+ }
1691
+ }
1692
+ `,{moduleId:"lumo-date-picker-overlay-content"}),ut("vaadin-month-calendar",m`
1693
+ :host {
1694
+ -moz-user-select: none;
1695
+ -webkit-user-select: none;
1696
+ -webkit-tap-highlight-color: transparent;
1697
+ user-select: none;
1698
+ font-size: var(--lumo-font-size-m);
1699
+ color: var(--lumo-body-text-color);
1700
+ text-align: center;
1701
+ padding: 0 var(--lumo-space-xs);
1702
+ }
1703
+
1704
+ /* Month header */
1705
+
1706
+ [part='month-header'] {
1707
+ color: var(--lumo-header-text-color);
1708
+ font-size: var(--lumo-font-size-l);
1709
+ line-height: 1;
1710
+ font-weight: 500;
1711
+ margin-bottom: var(--lumo-space-m);
1712
+ }
1713
+
1714
+ /* Week days and numbers */
1715
+
1716
+ [part='weekdays'],
1717
+ [part='weekday'],
1718
+ [part='week-number'] {
1719
+ font-size: var(--lumo-font-size-xxs);
1720
+ line-height: 1;
1721
+ color: var(--lumo-secondary-text-color);
1722
+ }
1723
+
1724
+ [part='weekdays'] {
1725
+ margin-bottom: var(--lumo-space-s);
1726
+ }
1727
+
1728
+ [part='weekday']:empty,
1729
+ [part='week-number'] {
1730
+ width: var(--lumo-size-xs);
1731
+ }
1732
+
1733
+ /* Date and week number cells */
1734
+
1735
+ [part='date'],
1736
+ [part='week-number'] {
1737
+ box-sizing: border-box;
1738
+ display: inline-flex;
1739
+ align-items: center;
1740
+ justify-content: center;
1741
+ height: var(--lumo-size-m);
1742
+ position: relative;
1743
+ }
1744
+
1745
+ [part='date'] {
1746
+ transition: color 0.1s;
1747
+ }
1748
+
1749
+ [part='date']:not(:empty) {
1750
+ cursor: var(--lumo-clickable-cursor);
1751
+ }
1752
+
1753
+ :host([week-numbers]) [part='weekday']:not(:empty),
1754
+ :host([week-numbers]) [part='date'] {
1755
+ width: calc((100% - var(--lumo-size-xs)) / 7);
1756
+ }
1757
+
1758
+ /* Today date */
1759
+
1760
+ [part='date'][today] {
1761
+ color: var(--lumo-primary-text-color);
1762
+ }
1763
+
1764
+ /* Focused date */
1765
+
1766
+ [part='date']::before {
1767
+ content: '';
1768
+ position: absolute;
1769
+ z-index: -1;
1770
+ top: 50%;
1771
+ left: 50%;
1772
+ transform: translate(-50%, -50%);
1773
+ min-width: 2em;
1774
+ min-height: 2em;
1775
+ width: 80%;
1776
+ height: 80%;
1777
+ max-height: 100%;
1778
+ max-width: 100%;
1779
+ border-radius: var(--lumo-border-radius-m);
1780
+ }
1781
+
1782
+ [part='date'][focused]::before {
1783
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct);
1784
+ }
1785
+
1786
+ :host(:not([focused])) [part='date'][focused]::before {
1787
+ animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
1788
+ }
1789
+
1790
+ @keyframes vaadin-date-picker-month-calendar-focus-date {
1791
+ 50% {
1792
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px transparent;
1793
+ }
1794
+ }
1795
+
1796
+ [part='date']:not(:empty):not([disabled]):not([selected]):hover::before {
1797
+ background-color: var(--lumo-primary-color-10pct);
1798
+ }
1799
+
1800
+ [part='date'][selected] {
1801
+ color: var(--lumo-primary-contrast-color);
1802
+ }
1803
+
1804
+ [part='date'][selected]::before {
1805
+ background-color: var(--lumo-primary-color);
1806
+ }
1807
+
1808
+ [part='date'][disabled] {
1809
+ color: var(--lumo-disabled-text-color);
1810
+ }
1811
+
1812
+ @media (pointer: coarse) {
1813
+ [part='date']:hover:not([selected])::before,
1814
+ [part='date'][focused]:not([selected])::before {
1815
+ display: none;
1816
+ }
1817
+
1818
+ [part='date']:not(:empty):not([disabled]):active::before {
1819
+ display: block;
1820
+ }
1821
+
1822
+ [part='date'][selected]::before {
1823
+ box-shadow: none;
1824
+ }
1825
+ }
1826
+
1827
+ /* Disabled */
1828
+
1829
+ :host([disabled]) * {
1830
+ color: var(--lumo-disabled-text-color) !important;
1831
+ }
1832
+ `,{moduleId:"lumo-month-calendar"});const jo=document.createElement("template");jo.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(jo.content);
1833
+ /**
1834
+ * @license
1835
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1836
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1837
+ */
1838
+ const Ho=document.createElement("template");Ho.innerHTML='\n <style>\n @font-face {\n font-family: \'lumo-icons\';\n 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==) format(\'woff\');\n font-weight: normal;\n font-style: normal;\n }\n\n html {\n --lumo-icons-align-center: "\\ea01";\n --lumo-icons-align-left: "\\ea02";\n --lumo-icons-align-right: "\\ea03";\n --lumo-icons-angle-down: "\\ea04";\n --lumo-icons-angle-left: "\\ea05";\n --lumo-icons-angle-right: "\\ea06";\n --lumo-icons-angle-up: "\\ea07";\n --lumo-icons-arrow-down: "\\ea08";\n --lumo-icons-arrow-left: "\\ea09";\n --lumo-icons-arrow-right: "\\ea0a";\n --lumo-icons-arrow-up: "\\ea0b";\n --lumo-icons-bar-chart: "\\ea0c";\n --lumo-icons-bell: "\\ea0d";\n --lumo-icons-calendar: "\\ea0e";\n --lumo-icons-checkmark: "\\ea0f";\n --lumo-icons-chevron-down: "\\ea10";\n --lumo-icons-chevron-left: "\\ea11";\n --lumo-icons-chevron-right: "\\ea12";\n --lumo-icons-chevron-up: "\\ea13";\n --lumo-icons-clock: "\\ea14";\n --lumo-icons-cog: "\\ea15";\n --lumo-icons-cross: "\\ea16";\n --lumo-icons-download: "\\ea17";\n --lumo-icons-dropdown: "\\ea18";\n --lumo-icons-edit: "\\ea19";\n --lumo-icons-error: "\\ea1a";\n --lumo-icons-eye: "\\ea1b";\n --lumo-icons-eye-disabled: "\\ea1c";\n --lumo-icons-menu: "\\ea1d";\n --lumo-icons-minus: "\\ea1e";\n --lumo-icons-ordered-list: "\\ea1f";\n --lumo-icons-phone: "\\ea20";\n --lumo-icons-photo: "\\ea21";\n --lumo-icons-play: "\\ea22";\n --lumo-icons-plus: "\\ea23";\n --lumo-icons-redo: "\\ea24";\n --lumo-icons-reload: "\\ea25";\n --lumo-icons-search: "\\ea26";\n --lumo-icons-undo: "\\ea27";\n --lumo-icons-unordered-list: "\\ea28";\n --lumo-icons-upload: "\\ea29";\n --lumo-icons-user: "\\ea2a";\n }\n </style>\n',document.head.appendChild(Ho.content);
1839
+ /**
1840
+ * @license
1841
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1842
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1843
+ */
1844
+ const qo=m`
1845
+ [part$='button'] {
1846
+ flex: none;
1847
+ width: 1em;
1848
+ height: 1em;
1849
+ line-height: 1;
1850
+ font-size: var(--lumo-icon-size-m);
1851
+ text-align: center;
1852
+ color: var(--lumo-contrast-60pct);
1853
+ transition: 0.2s color;
1854
+ cursor: var(--lumo-clickable-cursor);
1855
+ }
1856
+
1857
+ [part$='button']:hover {
1858
+ color: var(--lumo-contrast-90pct);
1859
+ }
1860
+
1861
+ :host([disabled]) [part$='button'],
1862
+ :host([readonly]) [part$='button'] {
1863
+ color: var(--lumo-contrast-20pct);
1864
+ cursor: default;
1865
+ }
1866
+
1867
+ [part$='button']::before {
1868
+ font-family: 'lumo-icons';
1869
+ display: block;
1870
+ }
1871
+ `;ut("",qo,{moduleId:"lumo-field-button"});
1872
+ /**
1873
+ * @license
1874
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1875
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1876
+ */
1877
+ const Ro=m`
1878
+ :host([has-helper]) [part='helper-text']::before {
1879
+ content: '';
1880
+ display: block;
1881
+ height: 0.4em;
1882
+ }
1883
+
1884
+ [part='helper-text'] {
1885
+ display: block;
1886
+ color: var(--lumo-secondary-text-color);
1887
+ font-size: var(--lumo-font-size-xs);
1888
+ line-height: var(--lumo-line-height-xs);
1889
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1890
+ transition: color 0.2s;
1891
+ }
1892
+
1893
+ :host(:hover:not([readonly])) [part='helper-text'] {
1894
+ color: var(--lumo-body-text-color);
1895
+ }
1896
+
1897
+ :host([disabled]) [part='helper-text'] {
1898
+ color: var(--lumo-disabled-text-color);
1899
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
1900
+ }
1901
+
1902
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
1903
+ display: none;
1904
+ }
1905
+
1906
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
1907
+ content: '';
1908
+ display: block;
1909
+ height: 0.4em;
1910
+ }
1911
+
1912
+ :host([has-helper][theme~='helper-above-field']) [part='label'] {
1913
+ order: 0;
1914
+ padding-bottom: 0.4em;
1915
+ }
1916
+
1917
+ :host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
1918
+ order: 1;
1919
+ }
1920
+
1921
+ :host([has-helper][theme~='helper-above-field']) [part='label'] + * {
1922
+ order: 2;
1923
+ }
1924
+
1925
+ :host([has-helper][theme~='helper-above-field']) [part='error-message'] {
1926
+ order: 3;
1927
+ }
1928
+ `
1929
+ /**
1930
+ * @license
1931
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
1932
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1933
+ */,Uo=m`
1934
+ [part='label'] {
1935
+ align-self: flex-start;
1936
+ color: var(--lumo-secondary-text-color);
1937
+ font-weight: 500;
1938
+ font-size: var(--lumo-font-size-s);
1939
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1940
+ transition: color 0.2s;
1941
+ line-height: 1;
1942
+ padding-right: 1em;
1943
+ padding-bottom: 0.5em;
1944
+ /* As a workaround for diacritics being cut off, add a top padding and a
1945
+ negative margin to compensate */
1946
+ padding-top: 0.25em;
1947
+ margin-top: -0.25em;
1948
+ overflow: hidden;
1949
+ white-space: nowrap;
1950
+ text-overflow: ellipsis;
1951
+ position: relative;
1952
+ max-width: 100%;
1953
+ box-sizing: border-box;
1954
+ }
1955
+
1956
+ :host([has-label])::before {
1957
+ margin-top: calc(var(--lumo-font-size-s) * 1.5);
1958
+ }
1959
+
1960
+ :host([has-label][theme~='small'])::before {
1961
+ margin-top: calc(var(--lumo-font-size-xs) * 1.5);
1962
+ }
1963
+
1964
+ :host([has-label]) {
1965
+ padding-top: var(--lumo-space-m);
1966
+ }
1967
+
1968
+ :host([has-label]) ::slotted([slot='tooltip']) {
1969
+ --vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
1970
+ }
1971
+
1972
+ :host([required]) [part='required-indicator']::after {
1973
+ content: var(--lumo-required-field-indicator, '•');
1974
+ transition: opacity 0.2s;
1975
+ color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
1976
+ position: absolute;
1977
+ right: 0;
1978
+ width: 1em;
1979
+ text-align: center;
1980
+ }
1981
+
1982
+ :host([invalid]) [part='required-indicator']::after {
1983
+ color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
1984
+ }
1985
+
1986
+ [part='error-message'] {
1987
+ margin-left: calc(var(--lumo-border-radius-m) / 4);
1988
+ font-size: var(--lumo-font-size-xs);
1989
+ line-height: var(--lumo-line-height-xs);
1990
+ color: var(--lumo-error-text-color);
1991
+ will-change: max-height;
1992
+ transition: 0.4s max-height;
1993
+ max-height: 5em;
1994
+ }
1995
+
1996
+ :host([has-error-message]) [part='error-message']::before,
1997
+ :host([has-error-message]) [part='error-message']::after {
1998
+ content: '';
1999
+ display: block;
2000
+ height: 0.4em;
2001
+ }
2002
+
2003
+ :host(:not([invalid])) [part='error-message'] {
2004
+ max-height: 0;
2005
+ overflow: hidden;
2006
+ }
2007
+
2008
+ /* RTL specific styles */
2009
+
2010
+ :host([dir='rtl']) [part='label'] {
2011
+ margin-left: 0;
2012
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
2013
+ }
2014
+
2015
+ :host([dir='rtl']) [part='label'] {
2016
+ padding-left: 1em;
2017
+ padding-right: 0;
2018
+ }
2019
+
2020
+ :host([dir='rtl']) [part='required-indicator']::after {
2021
+ right: auto;
2022
+ left: 0;
2023
+ }
2024
+
2025
+ :host([dir='rtl']) [part='error-message'] {
2026
+ margin-left: 0;
2027
+ margin-right: calc(var(--lumo-border-radius-m) / 4);
2028
+ }
2029
+ `;ut("",Uo,{moduleId:"lumo-required-field"});
2030
+ /**
2031
+ * @license
2032
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
2033
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2034
+ */
2035
+ const Wo=[Uo,qo,Ro,m`
2036
+ :host {
2037
+ --lumo-text-field-size: var(--lumo-size-m);
2038
+ color: var(--lumo-body-text-color);
2039
+ font-size: var(--lumo-font-size-m);
2040
+ font-family: var(--lumo-font-family);
2041
+ -webkit-font-smoothing: antialiased;
2042
+ -moz-osx-font-smoothing: grayscale;
2043
+ -webkit-tap-highlight-color: transparent;
2044
+ padding: var(--lumo-space-xs) 0;
2045
+ }
2046
+
2047
+ :host::before {
2048
+ height: var(--lumo-text-field-size);
2049
+ box-sizing: border-box;
2050
+ display: inline-flex;
2051
+ align-items: center;
2052
+ }
2053
+
2054
+ :host([focused]:not([readonly])) [part='label'] {
2055
+ color: var(--lumo-primary-text-color);
2056
+ }
2057
+
2058
+ :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
2059
+ -webkit-mask-image: none;
2060
+ mask-image: none;
2061
+ }
2062
+
2063
+ ::slotted(:is(input, textarea):placeholder-shown) {
2064
+ color: var(--lumo-secondary-text-color);
2065
+ }
2066
+
2067
+ /* Hover */
2068
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
2069
+ color: var(--lumo-body-text-color);
2070
+ }
2071
+
2072
+ :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
2073
+ opacity: 0.1;
2074
+ }
2075
+
2076
+ /* Touch device adjustment */
2077
+ @media (pointer: coarse) {
2078
+ :host(:hover:not([readonly]):not([focused])) [part='label'] {
2079
+ color: var(--lumo-secondary-text-color);
2080
+ }
2081
+
2082
+ :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
2083
+ opacity: 0;
2084
+ }
2085
+
2086
+ :host(:active:not([readonly]):not([focused])) [part='input-field']::after {
2087
+ opacity: 0.2;
2088
+ }
2089
+ }
2090
+
2091
+ /* Trigger when not focusing using the keyboard */
2092
+ :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
2093
+ transform: scaleX(0);
2094
+ transition-duration: 0.15s, 1s;
2095
+ }
2096
+
2097
+ /* Focus-ring */
2098
+ :host([focus-ring]) [part='input-field'] {
2099
+ box-shadow: 0 0 0 2px var(--lumo-primary-color-50pct);
2100
+ }
2101
+
2102
+ /* Read-only and disabled */
2103
+ :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
2104
+ opacity: 0;
2105
+ }
2106
+
2107
+ /* Disabled style */
2108
+ :host([disabled]) {
2109
+ pointer-events: none;
2110
+ }
2111
+
2112
+ :host([disabled]) [part='label'],
2113
+ :host([disabled]) [part='input-field'] ::slotted(*) {
2114
+ color: var(--lumo-disabled-text-color);
2115
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
2116
+ }
2117
+
2118
+ /* Invalid style */
2119
+ :host([invalid][focus-ring]) [part='input-field'] {
2120
+ box-shadow: 0 0 0 2px var(--lumo-error-color-50pct);
2121
+ }
2122
+
2123
+ :host([input-prevented]) [part='input-field'] {
2124
+ animation: shake 0.15s infinite;
2125
+ }
2126
+
2127
+ @keyframes shake {
2128
+ 25% {
2129
+ transform: translateX(4px);
2130
+ }
2131
+ 75% {
2132
+ transform: translateX(-4px);
2133
+ }
2134
+ }
2135
+
2136
+ /* Small theme */
2137
+ :host([theme~='small']) {
2138
+ font-size: var(--lumo-font-size-s);
2139
+ --lumo-text-field-size: var(--lumo-size-s);
2140
+ }
2141
+
2142
+ :host([theme~='small']) [part='label'] {
2143
+ font-size: var(--lumo-font-size-xs);
2144
+ }
2145
+
2146
+ :host([theme~='small']) [part='error-message'] {
2147
+ font-size: var(--lumo-font-size-xxs);
2148
+ }
2149
+
2150
+ /* Slotted content */
2151
+ [part='input-field'] ::slotted(:not(iron-icon):not(vaadin-icon):not(input):not(textarea)) {
2152
+ color: var(--lumo-secondary-text-color);
2153
+ font-weight: 400;
2154
+ }
2155
+
2156
+ [part='clear-button']::before {
2157
+ content: var(--lumo-icons-cross);
2158
+ }
2159
+ `];ut("",Wo,{moduleId:"lumo-input-field-shared-styles"}),ut("vaadin-date-picker",[Wo,m`
2160
+ :host {
2161
+ outline: none;
2162
+ }
2163
+
2164
+ [part='toggle-button']::before {
2165
+ content: var(--lumo-icons-calendar);
2166
+ }
2167
+
2168
+ [part='clear-button']::before {
2169
+ content: var(--lumo-icons-cross);
2170
+ }
2171
+
2172
+ @media (max-width: 420px), (max-height: 420px) {
2173
+ [part='overlay-content'] {
2174
+ height: 70vh;
2175
+ }
2176
+ }
2177
+
2178
+ :host([dir='rtl']) [part='input-field'] ::slotted(input) {
2179
+ --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
2180
+ }
2181
+
2182
+ :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
2183
+ --_lumo-text-field-overflow-mask-image: none;
2184
+ }
2185
+ `],{moduleId:"lumo-date-picker"});
2186
+ /**
2187
+ * @fileoverview
2188
+ * @suppress {checkPrototypalTypes}
2189
+ * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2190
+ * This code may only be used under the BSD style license found at
2191
+ * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
2192
+ * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
2193
+ * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
2194
+ * Google as part of the polymer project is also subject to an additional IP
2195
+ * rights grant found at http://polymer.github.io/PATENTS.txt
2196
+ */
2197
+ const Yo=Zt((t=>{const e=zi(t);let i=(t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]})(e);return class extends e{constructor(){super()}static get observedAttributes(){return i.call(this).concat("disable-upgrade")}_initializeProperties(){this.hasAttribute("disable-upgrade")?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,i,s){"disable-upgrade"==t?this.__isUpgradeDisabled&&null==i&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,le(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}}));function Go(t){return t?new Set(t.split(" ")):new Set}function Jo(t){return[...t].join(" ")}
2198
+ /**
2199
+ * @license
2200
+ * Copyright (c) 2017 - 2022 Vaadin Ltd.
2201
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2202
+ */
2203
+ const Ko={start:"top",end:"bottom"},Zo={start:"left",end:"right"},Xo=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Qo=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=
2204
+ /**
2205
+ * @license
2206
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2207
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2208
+ */
2209
+ 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,Xo.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Xo.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()))}}get __isRTL(){return"rtl"===this.getAttribute("dir")}__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.__shouldAlignStartHorizontally(t,this.__isRTL),s=!this.__isRTL&&i||this.__isRTL&&!i;this.style.alignItems=s?"flex-start":"flex-end";const o=this.getBoundingClientRect(),r=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,Ko,this,e),n=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,Zo,this,i);Object.assign(this.style,r,n),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 s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Zo)}__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,Ko)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],h=t[r?n.start:n.end]-s[n.start],l=o?a:h;return o===(l>(o?h:a)||l>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Ko.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Zo.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,h=parseFloat(o.style[n]||getComputedStyle(o)[n]),l=this.__adjustBottomProperty(n,s,h);return{[n]:l?`${l}px`:`${h+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`,[a]:""}}}
2210
+ /**
2211
+ * @license
2212
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2213
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2214
+ */,tr=m`
2215
+ :host([dir='rtl']) [part='input-field'] {
2216
+ direction: ltr;
2217
+ }
2218
+
2219
+ :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
2220
+ direction: rtl;
2221
+ text-align: left;
2222
+ }
2223
+ `;let er;
2224
+ /**
2225
+ * @license
2226
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2227
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2228
+ */
2229
+ ut("vaadin-date-picker-overlay",m`
2230
+ [part='overlay'] {
2231
+ display: flex;
2232
+ flex: auto;
2233
+ }
2234
+
2235
+ [part~='content'] {
2236
+ flex: auto;
2237
+ }
2238
+ `,{moduleId:"vaadin-date-picker-overlay-styles"});class ir extends(Yo(Qo(Es))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return er||(er=super.template.cloneNode(!0),er.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),er}}customElements.define(ir.is,ir);
2239
+ /**
2240
+ @license
2241
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2242
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2243
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2244
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2245
+ Code distributed by Google as part of the polymer project is also
2246
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2247
+ */
2248
+ class sr{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,or.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),or.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 sr?t._cancelAsync():t=new sr,t.setConfig(e,i),t}}let or=new Set;const rr=function(){const t=Boolean(or.size);return or.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
2249
+ /**
2250
+ @license
2251
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2252
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2253
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2254
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2255
+ Code distributed by Google as part of the polymer project is also
2256
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2257
+ */
2258
+ let nr=!1;
2259
+ /**
2260
+ @license
2261
+ Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2262
+ This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2263
+ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2264
+ The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2265
+ Code distributed by Google as part of the polymer project is also
2266
+ subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2267
+ */
2268
+ const ar=ss(Ni);class hr extends ar{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:!Gt,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(jt&&!Nt){if(!nr){nr=!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=le(le(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=ms(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(o=e)||ue(s,o)||pe(s,o)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=me(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}var s,o}})}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=sr.debounce(this.__renderDebouncer,e>0?Ee.after(e):De,t.bind(this)),or.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=rr()}while(t||e)}()}__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),Gt&&!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,s)=>this.__filterFn(t[e],i,s)))),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 s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===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 s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=le(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 s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return le(le(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._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=le(e).parentNode;return null}(this.template,t)}}function lr(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function cr(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function dr(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 ur(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function pr(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/.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}
2269
+ /**
2270
+ * @license
2271
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2272
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2273
+ */customElements.define(hr.is,hr);class mr extends(Vo(bt(Ni))){static get template(){return Oi`
2274
+ <style>
2275
+ :host {
2276
+ display: block;
2277
+ }
2278
+
2279
+ #monthGrid {
2280
+ width: 100%;
2281
+ border-collapse: collapse;
2282
+ }
2283
+
2284
+ #days-container tr,
2285
+ #weekdays-container tr {
2286
+ display: flex;
2287
+ }
2288
+
2289
+ [part='date'] {
2290
+ outline: none;
2291
+ }
2292
+
2293
+ [part='week-number'][hidden],
2294
+ [part='weekday'][hidden] {
2295
+ display: none;
2296
+ }
2297
+
2298
+ [part='weekday'],
2299
+ [part='date'] {
2300
+ width: calc(100% / 7);
2301
+ padding: 0;
2302
+ font-weight: normal;
2303
+ }
2304
+
2305
+ [part='weekday']:empty,
2306
+ [part='week-number'] {
2307
+ width: 12.5%;
2308
+ flex-shrink: 0;
2309
+ padding: 0;
2310
+ }
2311
+
2312
+ :host([week-numbers]) [part='weekday']:not(:empty),
2313
+ :host([week-numbers]) [part='date'] {
2314
+ width: 12.5%;
2315
+ }
2316
+ </style>
2317
+
2318
+ <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n.monthNames)]]</div>
2319
+ <table
2320
+ id="monthGrid"
2321
+ role="grid"
2322
+ aria-labelledby="month-header"
2323
+ on-touchend="_preventDefault"
2324
+ on-touchstart="_onMonthGridTouchStart"
2325
+ >
2326
+ <thead id="weekdays-container">
2327
+ <tr role="row" part="weekdays">
2328
+ <th
2329
+ part="weekday"
2330
+ aria-hidden="true"
2331
+ hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
2332
+ ></th>
2333
+ <template
2334
+ is="dom-repeat"
2335
+ items="[[_getWeekDayNames(i18n.weekdays, i18n.weekdaysShort, showWeekNumbers, i18n.firstDayOfWeek)]]"
2336
+ >
2337
+ <th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
2338
+ [[item.weekDayShort]]
2339
+ </th>
2340
+ </template>
2341
+ </tr>
2342
+ </thead>
2343
+ <tbody id="days-container">
2344
+ <template is="dom-repeat" items="[[_weeks]]" as="week">
2345
+ <tr role="row">
2346
+ <td
2347
+ part="week-number"
2348
+ aria-hidden="true"
2349
+ hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n.firstDayOfWeek)]]"
2350
+ >
2351
+ [[__getWeekNumber(week)]]
2352
+ </td>
2353
+ <template is="dom-repeat" items="[[week]]">
2354
+ <td
2355
+ role="gridcell"
2356
+ part="date"
2357
+ date="[[item]]"
2358
+ today$="[[_isToday(item)]]"
2359
+ focused$="[[__isDayFocused(item, focusedDate)]]"
2360
+ tabindex$="[[__getDayTabindex(item, focusedDate)]]"
2361
+ selected$="[[__isDaySelected(item, selectedDate)]]"
2362
+ disabled$="[[__isDayDisabled(item, minDate, maxDate)]]"
2363
+ aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
2364
+ aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate)]]"
2365
+ aria-label$="[[__getDayAriaLabel(item)]]"
2366
+ >[[_getDate(item)]]</td
2367
+ >
2368
+ </template>
2369
+ </tr>
2370
+ </template>
2371
+ </tbody>
2372
+ </table>
2373
+ `}static get is(){return"vaadin-month-calendar"}static get properties(){return{month:{type:Date,value:new Date},selectedDate:{type:Date,notify:!0},focusedDate:Date,showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Date,value:null},maxDate:{type:Date,value:null},_days:{type:Array,computed:"_getDays(month, i18n.firstDayOfWeek, 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.firstDayOfWeek)","__focusedDateChanged(focusedDate, _days)"]}ready(){super.ready(),So(this.$.monthGrid,"tap",this._handleTap.bind(this))}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part=date]")].find((t=>lr(t.date,this.focusedDate)))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||cr(s,e,i)||cr(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return this.i18n.formatTitle(e[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,i,s){if(void 0!==t&&void 0!==e&&void 0!==i&&void 0!==s)return t=this._applyFirstDayOfWeek(t,s),e=this._applyFirstDayOfWeek(e,s),t.map(((t,i)=>({weekDay:t,weekDayShort:e[i]})))}__focusedDateChanged(t,e){e.some((e=>lr(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekNumbersChanged(t,e){t&&1===e?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}_showWeekSeparator(t,e){return t&&1===e}_isToday(t){return lr(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;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_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){
2374
+ /**
2375
+ * @license
2376
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2377
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2378
+ */
2379
+ return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),o=new Date(0,0);o.setFullYear(s.getFullYear());const r=s.getTime()-o.getTime(),n=Math.round(r/864e5);return Math.floor(n/7+1)}(t.reduce(((t,e)=>!t&&e?e:t)))}__isDayFocused(t,e){return lr(t,e)}__isDaySelected(t,e){return lr(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i){return!cr(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}__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}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}customElements.define(mr.is,mr);
2380
+ /**
2381
+ * @license
2382
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2383
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2384
+ */
2385
+ class fr extends Ni{static get template(){return Oi`
2386
+ <style>
2387
+ :host {
2388
+ display: block;
2389
+ overflow: hidden;
2390
+ height: 500px;
2391
+ }
2392
+
2393
+ #scroller {
2394
+ position: relative;
2395
+ height: 100%;
2396
+ overflow: auto;
2397
+ outline: none;
2398
+ margin-right: -40px;
2399
+ -webkit-overflow-scrolling: touch;
2400
+ overflow-x: hidden;
2401
+ }
2402
+
2403
+ #scroller.notouchscroll {
2404
+ -webkit-overflow-scrolling: auto;
2405
+ }
2406
+
2407
+ #scroller::-webkit-scrollbar {
2408
+ display: none;
2409
+ }
2410
+
2411
+ .buffer {
2412
+ position: absolute;
2413
+ width: var(--vaadin-infinite-scroller-buffer-width, 100%);
2414
+ box-sizing: border-box;
2415
+ padding-right: 40px;
2416
+ top: var(--vaadin-infinite-scroller-buffer-offset, 0);
2417
+ animation: fadein 0.2s;
2418
+ }
2419
+
2420
+ @keyframes fadein {
2421
+ from {
2422
+ opacity: 0;
2423
+ }
2424
+ to {
2425
+ opacity: 1;
2426
+ }
2427
+ }
2428
+ </style>
2429
+
2430
+ <div id="scroller" on-scroll="_scroll">
2431
+ <div class="buffer"></div>
2432
+ <div class="buffer"></div>
2433
+ <div id="fullHeight"></div>
2434
+ </div>
2435
+ `}static get is(){return"vaadin-infinite-scroller"}static get properties(){return{bufferSize:{type:Number,value:20},_initialScroll:{value:5e5},_initialIndex:{value:0},_buffers:Array,_preventScrollEvent:Boolean,_mayHaveMomentum:Boolean,_initialized:Boolean,active:{type:Boolean,observer:"_activated"}}}ready(){super.ready(),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px";const t=this.querySelector("template");this._TemplateClass=ms(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[...i.children].forEach((i=>{i._itemWrapper.instance[t]=e}))}))}}),gs&&(this.$.scroller.tabIndex=-1)}forceUpdate(){this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel())}_activated(t){t&&!this._initialized&&(this._createPool(),this._initialized=!0)}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0)}_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=Ys.debounce(this._debouncerScrollFinish,qs.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();this._isVisible(this._buffers[0],t)||this._isVisible(this._buffers[1],t)||(this.position=this.position)}))}get bufferOffset(){return this._buffers[0].offsetTop}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))}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}_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=Ys.debounce(this._debouncerUpdateClones,qs.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 s=`vaadin-infinite-scroller-item-content-${fr._contentIndex=fr._contentIndex+1||0}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),setTimeout((()=>{this._isVisible(i,t)&&this._ensureStampedInstance(i)}),1)}})),setTimeout((()=>{ts(this,this._finishInit.bind(this))}),1)}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=new this._TemplateClass({}),t.appendChild(t.instance.root),Object.keys(e).forEach((i=>{t.instance.set(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,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||(r.instance.index=o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(fr.is,fr);
2436
+ /**
2437
+ * @license
2438
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2439
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2440
+ */
2441
+ class vr{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)}}
2442
+ /**
2443
+ * @license
2444
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2445
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2446
+ */class gr extends(xs(bt(ji(Ni)))){static get template(){return Oi`
2447
+ <style>
2448
+ :host {
2449
+ display: flex;
2450
+ flex-direction: column;
2451
+ height: 100%;
2452
+ width: 100%;
2453
+ outline: none;
2454
+ }
2455
+
2456
+ [part='overlay-header'] {
2457
+ display: flex;
2458
+ flex-shrink: 0;
2459
+ flex-wrap: nowrap;
2460
+ align-items: center;
2461
+ }
2462
+
2463
+ :host(:not([fullscreen])) [part='overlay-header'] {
2464
+ display: none;
2465
+ }
2466
+
2467
+ [part='label'] {
2468
+ flex-grow: 1;
2469
+ }
2470
+
2471
+ [hidden] {
2472
+ display: none !important;
2473
+ }
2474
+
2475
+ [part='years-toggle-button'] {
2476
+ display: flex;
2477
+ }
2478
+
2479
+ #scrollers {
2480
+ display: flex;
2481
+ height: 100%;
2482
+ width: 100%;
2483
+ position: relative;
2484
+ overflow: hidden;
2485
+ }
2486
+
2487
+ [part='months'],
2488
+ [part='years'] {
2489
+ height: 100%;
2490
+ }
2491
+
2492
+ [part='months'] {
2493
+ --vaadin-infinite-scroller-item-height: 270px;
2494
+ position: absolute;
2495
+ top: 0;
2496
+ left: 0;
2497
+ right: 0;
2498
+ bottom: 0;
2499
+ }
2500
+
2501
+ #scrollers[desktop] [part='months'] {
2502
+ right: 50px;
2503
+ transform: none !important;
2504
+ }
2505
+
2506
+ [part='years'] {
2507
+ --vaadin-infinite-scroller-item-height: 80px;
2508
+ width: 50px;
2509
+ position: absolute;
2510
+ right: 0;
2511
+ transform: translateX(100%);
2512
+ -webkit-tap-highlight-color: transparent;
2513
+ -webkit-user-select: none;
2514
+ -moz-user-select: none;
2515
+ user-select: none;
2516
+ /* Center the year scroller position. */
2517
+ --vaadin-infinite-scroller-buffer-offset: 50%;
2518
+ }
2519
+
2520
+ #scrollers[desktop] [part='years'] {
2521
+ position: absolute;
2522
+ transform: none !important;
2523
+ }
2524
+
2525
+ [part='years']::before {
2526
+ content: '';
2527
+ display: block;
2528
+ background: transparent;
2529
+ width: 0;
2530
+ height: 0;
2531
+ position: absolute;
2532
+ left: 0;
2533
+ top: 50%;
2534
+ transform: translateY(-50%);
2535
+ border-width: 6px;
2536
+ border-style: solid;
2537
+ border-color: transparent;
2538
+ border-left-color: #000;
2539
+ }
2540
+
2541
+ :host(.animate) [part='months'],
2542
+ :host(.animate) [part='years'] {
2543
+ transition: all 200ms;
2544
+ }
2545
+
2546
+ [part='toolbar'] {
2547
+ display: flex;
2548
+ justify-content: space-between;
2549
+ z-index: 2;
2550
+ flex-shrink: 0;
2551
+ }
2552
+ </style>
2553
+
2554
+ <div part="overlay-header" on-touchend="_preventDefault" desktop$="[[_desktopMode]]" aria-hidden="true">
2555
+ <div part="label">[[_formatDisplayed(selectedDate, i18n.formatDate, label)]]</div>
2556
+ <div part="clear-button" hidden$="[[!selectedDate]]"></div>
2557
+ <div part="toggle-button"></div>
2558
+
2559
+ <div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
2560
+ [[_yearAfterXMonths(_visibleMonthIndex)]]
2561
+ </div>
2562
+ </div>
2563
+
2564
+ <div id="scrollers" desktop$="[[_desktopMode]]">
2565
+ <vaadin-infinite-scroller
2566
+ id="monthScroller"
2567
+ on-custom-scroll="_onMonthScroll"
2568
+ on-touchstart="_onMonthScrollTouchStart"
2569
+ buffer-size="3"
2570
+ active="[[initialPosition]]"
2571
+ part="months"
2572
+ >
2573
+ <template>
2574
+ <vaadin-month-calendar
2575
+ i18n="[[i18n]]"
2576
+ month="[[_dateAfterXMonths(index)]]"
2577
+ selected-date="{{selectedDate}}"
2578
+ focused-date="[[focusedDate]]"
2579
+ ignore-taps="[[_ignoreTaps]]"
2580
+ show-week-numbers="[[showWeekNumbers]]"
2581
+ min-date="[[minDate]]"
2582
+ max-date="[[maxDate]]"
2583
+ part="month"
2584
+ theme$="[[_theme]]"
2585
+ on-keydown="__onMonthCalendarKeyDown"
2586
+ >
2587
+ </vaadin-month-calendar>
2588
+ </template>
2589
+ </vaadin-infinite-scroller>
2590
+ <vaadin-infinite-scroller
2591
+ id="yearScroller"
2592
+ on-custom-scroll="_onYearScroll"
2593
+ on-touchstart="_onYearScrollTouchStart"
2594
+ buffer-size="12"
2595
+ active="[[initialPosition]]"
2596
+ part="years"
2597
+ aria-hidden="true"
2598
+ >
2599
+ <template>
2600
+ <div
2601
+ part="year-number"
2602
+ current$="[[_isCurrentYear(index)]]"
2603
+ selected$="[[_isSelectedYear(index, selectedDate)]]"
2604
+ >
2605
+ [[_yearAfterXYears(index)]]
2606
+ </div>
2607
+ <div part="year-separator" aria-hidden="true"></div>
2608
+ </template>
2609
+ </vaadin-infinite-scroller>
2610
+ </div>
2611
+
2612
+ <div on-touchend="_preventDefault" role="toolbar" part="toolbar">
2613
+ <vaadin-button
2614
+ id="todayButton"
2615
+ part="today-button"
2616
+ theme="tertiary"
2617
+ disabled="[[!_isTodayAllowed(minDate, maxDate)]]"
2618
+ on-keydown="__onTodayButtonKeyDown"
2619
+ >
2620
+ [[i18n.today]]
2621
+ </vaadin-button>
2622
+ <vaadin-button id="cancelButton" part="cancel-button" theme="tertiary" on-keydown="__onCancelButtonKeyDown">
2623
+ [[i18n.cancel]]
2624
+ </vaadin-button>
2625
+ </div>
2626
+ `}static get is(){return"vaadin-date-picker-overlay-content"}static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Date,value:null},focusedDate:{type:Date,notify:!0,observer:"_focusedDateChanged"},_focusedMonthDate:Number,initialPosition:{type:Date,observer:"_initialPositionChanged"},_originDate:{value:new Date},_visibleMonthIndex:Number,_desktopMode:Boolean,_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:Date,maxDate:Date,label:String}}get __isRTL(){return"rtl"===this.getAttribute("dir")}get __useSubMonthScrolling(){return this.$.monthScroller.clientHeight<this.$.monthScroller.itemHeight+this.$.monthScroller.bufferOffset}get calendars(){return[...this.shadowRoot.querySelectorAll("vaadin-month-calendar")]}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}ready(){super.ready(),this.setAttribute("role","dialog"),So(this.$.scrollers,"track",this._track.bind(this)),So(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),So(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),So(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),So(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),So(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),So(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new vr(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),Io(this.$.scrollers,"pan-y")}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()}_selectDate(t){this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0}))}_focusedDateChanged(t){this.revealDate(t)}_isCurrentYear(t){return 0===t}_isSelectedYear(t,e){if(e)return e.getFullYear()===this._originDate.getFullYear()+t}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this.$.monthScroller.position>i,o=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,r=this.$.monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+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.scrollToDate(t)}_repositionYearScroller(){this._visibleMonthIndex=Math.floor(this.$.monthScroller.position),this.$.yearScroller.position=(this.$.monthScroller.position+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=Ys.debounce(this._debouncer,qs.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t?e(ur(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 s=0;const o=this.$.monthScroller.position,r=t=>{s=s||t;const e=t-s;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,o,this._targetPosition-o);this.$.monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_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)`)}_yearAfterXYears(t){const e=new Date(this._originDate);return e.setFullYear(parseInt(t)+this._originDate.getFullYear()),e.getFullYear()}_yearAfterXMonths(t){return this._dateAfterXMonths(t).getFullYear()}_dateAfterXMonths(t){const e=new Date(this._originDate);return e.setDate(1),e.setMonth(parseInt(t)+this._originDate.getMonth()),e}_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){lr(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.$.cancelButton.focus():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&&lr(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=>{setTimeout(t)})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(dr(t,[this.minDate,this.maxDate]))}_moveFocusByDays(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()+t),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_moveFocusByMonths(t){const e=this.focusedDate,i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()+t);const s=i.getMonth();i.setDate(this._focusedMonthDate||(this._focusedMonthDate=e.getDate())),i.getMonth()!==s&&i.setDate(0),this._dateAllowed(i,this.minDate,this.maxDate)?this.focusDate(i,!0):this._dateAllowed(e,this.minDate,this.maxDate)?this.focusDate(t>0?this.maxDate:this.minDate):this._focusClosestDate(e)}_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.minDate,this.maxDate)?this.focusDate(i):this._dateAllowed(t,this.minDate,this.maxDate)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e,i){return(!e||t>=e)&&(!i||t<=i)}_isTodayAllowed(t,e){const i=new Date,s=new Date(0,0);return s.setFullYear(i.getFullYear()),s.setMonth(i.getMonth()),s.setDate(i.getDate()),this._dateAllowed(s,t,e)}}customElements.define(gr.is,gr);
2627
+ /**
2628
+ * @license
2629
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2630
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2631
+ */
2632
+ const br=Zt((t=>class extends(Vo(Fo(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(),this._setFocused(!0))}blur(){this.focusElement&&(this.focusElement.blur(),this._setFocused(!1))}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}_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)}}));
2633
+ /**
2634
+ * @license
2635
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2636
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2637
+ */class yr extends so{constructor(t){super(t,"error-message",(()=>document.createElement("div")),((t,e)=>{this.__updateErrorId(e),this.__updateHasError()}),!0)}get errorId(){return this.node&&this.node.id}setErrorMessage(t){this.errorMessage=t,this.__updateHasError()}setInvalid(t){this.invalid=t,this.__updateHasError()}initCustomNode(t){this.__updateErrorId(t),t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),this.__updateHasError()}teardownNode(t){let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e)),this.__updateHasError()}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__updateHasError(){const t=this.node,e=Boolean(this.invalid&&this.__isNotEmpty(this.errorMessage));t&&(t.textContent=e?this.errorMessage:"",t.hidden=!e,e?t.setAttribute("role","alert"):t.removeAttribute("role")),this.host.toggleAttribute("has-error-message",e)}__updateErrorId(t){t.id||(t.id=this.defaultId)}}
2638
+ /**
2639
+ * @license
2640
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2641
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2642
+ */class _r{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setLabelId(t){this.__setLabelIdToAriaAttribute(t,this.__labelId),this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}get __isGroupField(){return this.__target===this.host}__setLabelIdToAriaAttribute(t,e){this.__setAriaAttributeId("aria-labelledby",t,e)}__setErrorIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setHelperIdToAriaAttribute(t,e){this.__setAriaAttributeId(this.__isGroupField?"aria-labelledby":"aria-describedby",t,e)}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}__setAriaAttributeId(t,e,i){this.__target&&(i&&function(t,e,i){const s=Go(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Jo(s)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const s=Go(t.getAttribute(e));s.add(i),t.setAttribute(e,Jo(s))}(this.__target,t,e))}}
2643
+ /**
2644
+ * @license
2645
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2646
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2647
+ */class wr extends so{constructor(t){super(t,"helper",null,null,!0)}get helperId(){return this.node&&this.node.id}initCustomNode(t){this.__updateHelperId(t),this.__observeHelper(t);const e=this.__hasHelper(t);this.__toggleHasHelper(e)}teardownNode(t){this.__helperIdObserver&&this.__helperIdObserver.disconnect();const e=this.getSlotChild();if(e&&e!==this.defaultNode){const t=this.__hasHelper(e);this.__toggleHasHelper(t)}else this.__applyDefaultHelper(this.helperText,e)}setHelperText(t){this.helperText=t;const e=this.getSlotChild();e&&e!==this.defaultNode||this.__applyDefaultHelper(t,e)}__hasHelper(t){return!!t&&(t.children.length>0||t.nodeType===Node.ELEMENT_NODE&&customElements.get(t.localName)||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return t&&""!==t.trim()}__applyDefaultHelper(t,e){const i=this.__isNotEmpty(t);i&&!e&&(this.slotFactory=()=>document.createElement("div"),e=this.attachDefaultNode(),this.__updateHelperId(e),this.__observeHelper(e)),e&&(e.textContent=t),this.__toggleHasHelper(i)}__observeHelper(t){this.__helperObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateHelperId(e);else if(i||e.parentElement===this.node){const t=this.__hasHelper(this.node);this.__toggleHasHelper(t)}}))})),this.__helperObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasHelper(t){this.host.toggleAttribute("has-helper",t),this.dispatchEvent(new CustomEvent("helper-changed",{detail:{hasHelper:t,node:this.node}}))}__updateHelperId(t){t.id||(t.id=this.defaultId)}}
2648
+ /**
2649
+ * @license
2650
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2651
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2652
+ */class xr extends so{constructor(t){super(t,"label",(()=>document.createElement("label")),((t,e)=>{this.__updateLabelId(e),this.__updateDefaultLabel(this.label),this.__observeLabel(e)}),!0)}get labelId(){return this.node.id}initCustomNode(t){this.__updateLabelId(t);const e=this.__hasLabel(t);this.__toggleHasLabel(e)}teardownNode(t){this.__labelObserver&&this.__labelObserver.disconnect();let e=this.getSlotChild();e||t===this.defaultNode||(e=this.attachDefaultNode(),this.initNode(e));const i=this.__hasLabel(e);this.__toggleHasLabel(i)}setLabel(t){this.label=t,this.__updateDefaultLabel(t)}__hasLabel(t){return!!t&&(t.children.length>0||this.__isNotEmpty(t.textContent))}__isNotEmpty(t){return Boolean(t&&""!==t.trim())}__observeLabel(t){this.__labelObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;if("attributes"===t.type)i&&e.id!==this.defaultId&&this.__updateLabelId(e);else if(i||e.parentElement===this.node){const t=this.__hasLabel(this.node);this.__toggleHasLabel(t)}}))})),this.__labelObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__toggleHasLabel(t){this.host.toggleAttribute("has-label",t),this.dispatchEvent(new CustomEvent("label-changed",{detail:{hasLabel:t,node:this.node}}))}__updateDefaultLabel(t){if(this.defaultNode&&(this.defaultNode.textContent=t,this.defaultNode===this.node)){const e=this.__isNotEmpty(t);this.__toggleHasLabel(e)}}__updateLabelId(t){t.id||(t.id=this.defaultId)}}
2653
+ /**
2654
+ * @license
2655
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2656
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2657
+ */const kr=Zt((t=>class extends(xs(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}get _labelId(){return this._labelController.labelId}get _labelNode(){return this._labelController.node}constructor(){super(),this._labelController=new xr(this)}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Cr=Zt((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}})),Ar=t=>class extends(Cr(kr(xs(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}get _errorId(){return this._errorController.errorId}get _errorNode(){return this._errorController.node}get _helperId(){return this._helperController.helperId}get _helperNode(){return this._helperController.node}constructor(){super(),this._fieldAriaController=new _r(this),this._helperController=new wr(this),this._errorController=new yr(this),this._labelController.addEventListener("label-changed",(t=>{const{hasLabel:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("helper-changed",(t=>{const{hasHelper:e,node:i}=t.detail;this.__helperChanged(e,i)}))}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)}__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((()=>{this._fieldAriaController.setErrorId(t?this._errorController.errorId:null)}))}}
2658
+ /**
2659
+ * @license
2660
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2661
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2662
+ */,Sr=Zt((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)}})),Tr=Zt((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},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}clear(){this.value=""}_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.inputElement.value=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)}get _hasValue(){return null!=this.value&&""!==this.value}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Ir=Zt((t=>class extends(Sr(Cr(Tr(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),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&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}})),zr=new WeakMap,Er=Zt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return zr.has(t)||zr.set(t,new Set),zr.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))}))}})),Dr=t=>class extends(Er(br(Ir(Ar(No(t)))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,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 clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}ready(){super.ready(),this.clearElement&&this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t)))}_onClearButtonClick(t){t.preventDefault(),this.inputElement.focus(),this.__clear()}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this.__clear())}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__clear(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}_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=Ys.debounce(this._preventInputDebouncer,qs.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}$`),this.__allowedTextRegExp=new RegExp(`^${t}*$`)}catch(t){console.error(t)}}}
2663
+ /**
2664
+ * @license
2665
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2666
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2667
+ */;
2668
+ /**
2669
+ * @license
2670
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2671
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2672
+ */class Pr extends so{constructor(t,e){super(t,"input",(()=>document.createElement("input")),((t,i)=>{t.value&&i.setAttribute("value",t.value),t.type&&i.setAttribute("type",t.type),i.id=this.defaultId,"function"==typeof e&&e(i)}),!0)}}
2673
+ /**
2674
+ * @license
2675
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2676
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2677
+ */class Or{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("label-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)}}
2678
+ /**
2679
+ * @license
2680
+ * Copyright (c) 2021 - 2022 Vaadin Ltd..
2681
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2682
+ */const Mr=[m`
2683
+ :host {
2684
+ display: inline-flex;
2685
+ outline: none;
2686
+ }
2687
+
2688
+ :host::before {
2689
+ content: '\\2003';
2690
+ width: 0;
2691
+ display: inline-block;
2692
+ /* Size and position this element on the same vertical position as the input-field element
2693
+ to make vertical align for the host element work as expected */
2694
+ }
2695
+
2696
+ :host([hidden]) {
2697
+ display: none !important;
2698
+ }
2699
+
2700
+ :host(:not([has-label])) [part='label'] {
2701
+ display: none;
2702
+ }
2703
+ `
2704
+ /**
2705
+ * @license
2706
+ * Copyright (c) 2021 - 2022 Vaadin Ltd..
2707
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2708
+ */,m`
2709
+ [class$='container'] {
2710
+ display: flex;
2711
+ flex-direction: column;
2712
+ min-width: 100%;
2713
+ max-width: 100%;
2714
+ width: var(--vaadin-field-default-width, 12em);
2715
+ }
2716
+ `
2717
+ /**
2718
+ * @license
2719
+ * Copyright (c) 2021 - 2022 Vaadin Ltd..
2720
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2721
+ */,m`
2722
+ [part='clear-button'] {
2723
+ display: none;
2724
+ cursor: default;
2725
+ }
2726
+
2727
+ [part='clear-button']::before {
2728
+ content: '✕';
2729
+ }
2730
+
2731
+ :host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
2732
+ display: block;
2733
+ }
2734
+ `
2735
+ /**
2736
+ * @license
2737
+ * Copyright (c) 2021 - 2022 Vaadin Ltd..
2738
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2739
+ */];
2740
+ /**
2741
+ * @license
2742
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
2743
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2744
+ */
2745
+ class Nr{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")}}
2746
+ /**
2747
+ * @license
2748
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2749
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2750
+ */const Br=t=>class extends(xs(br(Ir(No(t))))){static get properties(){return{_selectedDate:{type:Date},_focusedDate:Date,value:{type:String,notify:!0,value:""},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged"},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean},_fullscreen:{type:Boolean,value:!1},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,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,week:"Week",calendar:"Calendar",today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=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 o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?pr(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String},max:{type:String},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)"},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)"},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ys},_focusOverlayOnOpen:Boolean,_overlayInitialized:Boolean}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n.formatDate)","_focusedDateChanged(_focusedDate, i18n.formatDate)"]}static get constraints(){return[...super.constraints,"min","max"]}get clearElement(){return null}get _inputValue(){return this.inputElement?this.inputElement.value:void 0}set _inputValue(t){this.inputElement&&(this.inputElement.value=t)}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this)}_onFocus(t){super._onFocus(t),this._noInput&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.autoOpenDisabled&&this._selectParsedOrFocusedDate(),this.validate(),""===this._inputValue&&""!==this.value&&(this.value=""))}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new vr(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Nr(this))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}_propertiesChanged(t,e,i){super._propertiesChanged(t,e,i),"value"in e&&this.__dispatchChange&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChange=!1)}open(){this.disabled||this.readonly||(this.opened=!0)}close(){(this._overlayInitialized||this.autoOpenDisabled)&&this.$.overlay.close()}_initOverlay(){this.$.overlay.removeAttribute("disable-upgrade"),this._overlayInitialized=!0,this.$.overlay.addEventListener("opened-changed",(t=>{this.opened=t.detail.value})),this.$.overlay.addEventListener("vaadin-overlay-escape-press",(()=>{this._focusedDate=this._selectedDate,this._close()})),this._overlayContent.addEventListener("close",(()=>{this._close()})),this._overlayContent.addEventListener("focus-input",this._focusAndSelect.bind(this)),this._overlayContent.addEventListener("date-tap",(t=>{this.__userConfirmedDate=!0,this._selectDate(t.detail.date),this._close()})),this._overlayContent.addEventListener("date-selected",(t=>{this.__userConfirmedDate=!!t.detail.date,this._selectDate(t.detail.date)})),this._overlayContent.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}checkValidity(){const t=!this._inputValue||!!this._selectedDate&&this._inputValue===this._getFormattedDate(this.i18n.formatDate,this._selectedDate),e=!this._selectedDate||cr(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),t&&e&&i}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){return!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}_selectDate(t){const e=this._formatISO(t);this.value!==e&&(this.__dispatchChange=!0),this._selectedDate=t}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){if(!(t instanceof Date))return"";const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.getFullYear();return o<0?(o=-o,i="-",s="000000"):t.getFullYear()>=1e4&&(i="+",s="000000"),[i+e(o,s),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){t&&!this._overlayInitialized&&this._initOverlay(),this._overlayInitialized&&(this.$.overlay.opened=t),this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){if(void 0===t||void 0===e)return;const i=this._formatISO(t);this.__keepInputValue||this._applyInputValue(t),i!==this.value&&(this.validate(),this.value=i),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))}__getOverlayTheme(t,e){if(e)return t}_valueChanged(t,e){const i=pr(t);!t||i?(t?lr(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}_onOverlayOpened(){const t=pr(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;this._overlayContent.initialPosition=t||cr(e,this._minDate,this._maxDate)?e:dr(e,[this._minDate,this._maxDate]),this._overlayContent.scrollToDate(this._overlayContent.focusedDate||this._overlayContent.initialPosition),this._ignoreFocusedDateChange=!0,this._overlayContent.focusedDate=this._overlayContent.focusedDate||this._overlayContent.initialPosition,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(this._overlayContent.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus(),this._noInput&&this.focusElement&&(this.focusElement.blur(),this._overlayContent.focusDateElement())}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this._getParsedDate(this._inputValue||"");this._isValidDate(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(){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.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._inputValue.length)}_applyInputValue(t){this._inputValue=t?this._getFormattedDate(this.i18n.formatDate,t):""}_getFormattedDate(t,e){return t(ur(e))}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_isValidDate(t){return t&&!isNaN(t.getTime())}_onChange(t){""===this._inputValue&&(this.__dispatchChange=!0),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.value="",this._inputValue="",this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_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()))}_getParsedDate(t=this._inputValue){const e=this.i18n.parseDate&&this.i18n.parseDate(t);return e&&pr(`${e.year}-${e.month+1}-${e.day}`)}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){this.opened||!this.inputElement.value||this.autoOpenDisabled||this.open(),this._userInputValueChanged()}_userInputValueChanged(){if(this._inputValue){const t=this._getParsedDate();this._isValidDate(t)&&(this._ignoreFocusedDateChange=!0,lr(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}__computeMinOrMaxDate(t){return pr(t)}}
2751
+ /**
2752
+ * @license
2753
+ * Copyright (c) 2016 - 2022 Vaadin Ltd.
2754
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2755
+ */;ut("vaadin-date-picker",[Mr,tr],{moduleId:"vaadin-date-picker-styles"});class Vr extends(Br(Dr(bt(to(Ni))))){static get is(){return"vaadin-date-picker"}static get template(){return Oi`
2756
+ <style>
2757
+ :host([opened]) {
2758
+ pointer-events: auto;
2759
+ }
2760
+ </style>
2761
+
2762
+ <div class="vaadin-date-picker-container">
2763
+ <div part="label">
2764
+ <slot name="label"></slot>
2765
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
2766
+ </div>
2767
+
2768
+ <vaadin-input-container
2769
+ part="input-field"
2770
+ readonly="[[readonly]]"
2771
+ disabled="[[disabled]]"
2772
+ invalid="[[invalid]]"
2773
+ theme$="[[_theme]]"
2774
+ >
2775
+ <slot name="prefix" slot="prefix"></slot>
2776
+ <slot name="input"></slot>
2777
+ <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
2778
+ <div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
2779
+ </vaadin-input-container>
2780
+
2781
+ <div part="helper-text">
2782
+ <slot name="helper"></slot>
2783
+ </div>
2784
+
2785
+ <div part="error-message">
2786
+ <slot name="error-message"></slot>
2787
+ </div>
2788
+ </div>
2789
+
2790
+ <vaadin-date-picker-overlay
2791
+ id="overlay"
2792
+ fullscreen$="[[_fullscreen]]"
2793
+ theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
2794
+ on-vaadin-overlay-open="_onOverlayOpened"
2795
+ on-vaadin-overlay-closing="_onOverlayClosed"
2796
+ restore-focus-on-close
2797
+ restore-focus-node="[[inputElement]]"
2798
+ disable-upgrade
2799
+ >
2800
+ <template>
2801
+ <vaadin-date-picker-overlay-content
2802
+ id="overlay-content"
2803
+ i18n="[[i18n]]"
2804
+ fullscreen$="[[_fullscreen]]"
2805
+ label="[[label]]"
2806
+ selected-date="[[_selectedDate]]"
2807
+ focused-date="{{_focusedDate}}"
2808
+ show-week-numbers="[[showWeekNumbers]]"
2809
+ min-date="[[_minDate]]"
2810
+ max-date="[[_maxDate]]"
2811
+ part="overlay-content"
2812
+ theme$="[[__getOverlayTheme(_theme, _overlayInitialized)]]"
2813
+ ></vaadin-date-picker-overlay-content>
2814
+ </template>
2815
+ </vaadin-date-picker-overlay>
2816
+
2817
+ <slot name="tooltip"></slot>
2818
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Pr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Or(this.inputElement,this._labelController)),this._tooltipController=new oo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault()))}_initOverlay(){super._initOverlay(),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[this._overlayInitialized&&this.$.overlay.opened?"close":"open"]()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}customElements.define(Vr.is,Vr);const Fr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7)}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)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input")}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){return 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}render(){return i("div",{class:"date__wrapper"},i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:"date__input",value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("small",{class:"date__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Fr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px}.date__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.date__label--required::after{content:"*";margin-left:5px;color:#666666}.date__input{width:inherit;position:relative;border:none;border-bottom:3px solid #666666;color:#666666;font-size:16px;font-family:inherit}.date__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.date__input::placeholder{color:#666666}.date__input--invalid{border-bottom:3px solid #cc0000}.date__input:placeholder-shown+.date__label{opacity:0;visibility:hidden;transform:translateY(0)}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';const Lr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern=""}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)}connectedCallback(){this.validationPattern=this.setPattern()}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return this.validation.custom.find((t=>"regex"===t.rule)).pattern}setErrorMessage(){return this.inputReference.validity.patternMismatch?this.validation.custom.find((t=>"regex"===t.rule)).errorMessage: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}render(){return i("div",{class:"email__wrapper"},i("input",{id:`${this.name}__input`,type:"email",class:"email__input",value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onBlur:t=>this.handleInput(t)}),i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px}.email__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.email__label--required::after{content:"*";margin-left:5px;color:#666666}.email__input{width:inherit;padding:15px 6px;position:relative;border:none;border-bottom:3px solid #666666;background-color:transparent;color:#666666;font-size:16px;font-family:inherit}.email__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.email__input::placeholder{color:#666666}.email__input--invalid{border-bottom:3px solid #cc0000}.email__input:placeholder-shown+.email__label{opacity:0;visibility:hidden;transform:translateY(0)}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';const $r=class{constructor(e){t(this,e),this.type="text"}render(){switch(this.type.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});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});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});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});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});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});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language});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});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});default:return i("p",null,"The ",this.type," input type is not valid")}}};$r.style=":host{display:block}";const jr=["ro","en"],Hr={en:{dateError:"The selected date should be between {min} and {max}",numberLengthError:"The number should be between ${min} and ${max}",lengthError:"The length should be between {minLength} and {maxLength}",requiredError:"This input is required.",nextButton:"Next",backButton:"Back",doneButton:"Done"},ro:{lengthError:"Cuvântul introdus este prea scurt. {minLength} and {maxLength}",requiredError:"Acest câmp este obligatoriu."}},qr=(t,e,i)=>{const s=e;let o=Hr[void 0!==s&&jr.includes(s)?s:"en"][t];if(void 0!==i)for(const[t,e]of Object.entries(i.values)){const i=new RegExp(`{${t}}`,"g");o=o.replace(i,e)}return o},Rr=class{constructor(e){t(this,e),this.data={type:"default",content:{step:"step1",fields:[{name:"firstName",displayName:"Username",defaultValue:null,validate:{mandatory:!0,minLength:3,maxLength:20},autofill:!1},{name:"lastName",displayName:"Last name",defaultValue:null,validate:{mandatory:!0,minLength:3,maxLength:20}},{name:"telephone",displayName:"Telephone",action:"GET https://demo-api.stage.norway.everymatrix.com/v1/player/phonecodes",defaultValue:null,validate:{mandatory:!0},autofill:!1,inputType:"tel"},{name:"dateOfBirth",displayName:"Date of Birth",defaultValue:null,validate:{min:"2022-05-01",max:"2022-05-29",mandatory:!0},inputType:"datetime"},{name:"email",displayName:"Email",defaultValue:"a@a.com",validate:{mandatory:!0,custom:[{rule:"regex",pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z-9.-]+\\.[a-zA-Z]{2,3}$",errorMessage:"Please enter a valid email address"}]},inputType:"email"},{name:"password",displayName:"Password",defaultValue:null,validate:{mandatory:!0,minLength:3,maxLength:20,type:"password",custom:[{rule:"regex",pattern:"(?=.*\\d+)(?=.*[A-Za-z]+).{8,20}",errorMessage:"Password must contain at least 1 letter and 1 digit, and its minimal length is 8."}]},inputType:"password"},{name:"email",displayName:"Email",defaultValue:null,validate:{mandatory:!0,type:"email",custom:[{rule:"unique-email",errorMessage:"Please check your email"},{rule:"regex",pattern:"^[a-zA-Z0-9._%+-]+@[a-zA-Z-9.-]+\\.[a-zA-Z]{2,3}$",errorMessage:"Please enter a valid email address"},{rule:"duplicate-input",displayName:"pt al doilea input gen: Confirm Email",errorMessage:"Different Email! Pls."}]}},{name:"termsAndConditions",displayName:"Terms and Conditions",validate:{mandatory:!0,type:"boolean"},inputType:"checkbox"},{name:"pepCheck",validate:{mandatory:!0},inputType:"checkbox"},{name:"gender",data:{values:[{label:"🍆",value:"m"},{label:"🍑",value:"f"}]},validate:{mandatory:!0},inputType:"radio"},{name:"dateOfBirth",validate:{mandatory:!0,custom:[{rule:"regex",pattern:"(?:19\\d{2}|20[01][0-9]|2020)[-/.](?:0[1-9]|1[012])[-/.](?:0[1-9]|[12][0-9]|3[01])",errorMessage:"Invalid date format"},{rule:"min-18-years",errorMessage:"Not old enough to ride the roller coaster"}]}},{name:"city",displayName:"Cities",action:null,data:{values:[{label:"Budapest",value:"Budapest"},{label:"Debrecen",value:"Debrecen"},{label:"Miskolc",value:"Miskolc"},{label:"Szeged",value:"Szeged"},{label:"Zuglo",value:"Zuglo"}]},validate:{mandatory:!0},inputType:"dropdown"},{name:"city",displayName:"Cities",data:null,action:"GET https://demo-api.stage.norway.everymatrix.com/v1/player/countries",validate:{mandatory:!0},inputType:"dropdown"}],actions:["get-next-step","some-async-action-before-submitting","submit-step-data"]}},this.language="en",this.emitValue=!1,this.listOfInputs=[],this.isLoading=!0,this.listOfInputValues=[],this.listOfActions=[],this.steps=[],this.registrationStepsState={regId:null}}logger(){console.log(this.registrationStep)}checkInputsValidityHandler(t){this.listOfInputs.find((e=>e.name==t.detail.name)).isValid=t.detail.valid,this.isFormValid=!this.getInvalidStatus(this.listOfInputs)}getInputsValueHandler(t){this.listOfInputValues.find((e=>e.name==t.detail.name)).value=t.detail.value,this.stepsStateMachine({event:"set",type:"values"})}componentWillLoad(){return this.getRegisterConfig().then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})}))}nextHandler(t){t.preventDefault(),this.emitValue=!0,this.setRegisterStep()}backHandler(t){t.preventDefault(),this.steps.pop(),this.registrationStep=this.steps.at(-1),this.stepsStateMachine({event:"get",type:"inputs"}),this.stepsStateMachine({event:"get",type:"values"})}stepsStateMachine(t){switch(t.event){case"set":"inputs"==t.type&&(this.registrationStepsState[this.registrationStep].fields=this.listOfInputs),"values"==t.type&&(this.registrationStepsState[this.registrationStep].registerUserData=this.listOfInputValues.reduce(((t,e)=>(null!=e.value&&(t[e.name]=e.value),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),"values"==t.type){const t=e[this.registrationStep].registerUserData;this.listOfInputValues=Object.keys(t).map((e=>({name:e,value:t[e]}))),this.listOfInputValues.forEach((t=>{const e=this.listOfInputs.find((e=>e.name===t.name));e&&(e.defaultValue=t.value)}))}}}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 s={method:"GET",headers:i};return new Promise(((t,i)=>{this.isLoading=!0,fetch(e.href,s).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)})).finally((()=>{this.isLoading=!1}))}))}setRegisterStep(){this.isLoading=!0;const t=new URL(`${this.endpoint}/v1/player/legislation/registration/step`),e={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.reduce(((t,e)=>(null!=e.value&&(t[e.name]=e.value),t)),{}),step:this.registrationStep};console.log(e);const i=new Headers;i.append("Content-Type","application/json"),i.append("Accept","application/json");const s={method:"POST",body:JSON.stringify(e),headers:i};console.log(s.body),fetch(t.href,s).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{this.registrationID=t.registrationId,this.listOfActions.some((t=>"/register"==t))?this.setRegister():this.getRegisterConfig(this.registrationID).then((t=>{this.formatConfig(t),this.stepsStateMachine({event:"set",type:"inputs"})}))})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}setRegister(){this.isLoading=!0;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={registrationId:this.registrationID,registerUserDto:this.listOfInputValues.reduce(((t,e)=>(t[e.name]=e.value,t)),{}),step:this.registrationStep},s={method:"POST",body:JSON.stringify(i),headers:e};fetch(t.href,s).then((t=>{if(t.status>=300)throw new Error("err");return t.json()})).then((t=>{t.userId&&alert(`User registered - the user ID is ${t.userId}`)})).catch((t=>{console.error(t)})).finally((()=>{this.isLoading=!1}))}formatConfig(t){this.listOfInputs=t.content.fields.map((t=>Object.assign(Object.assign({},t),{isValid:!1}))),this.listOfInputValues=t.content.fields.map((t=>({name:t.name,value:null}))),this.listOfActions=t.content.actions.map((t=>t)),this.isLastStep=this.listOfActions.some((t=>"/register"==t)),this.registrationID=t.content.registrationID,this.registrationStep=t.content.step,this.steps.push(this.registrationStep),this.registrationStepsState.regId=this.registrationID,this.registrationStepsState[this.registrationStep]||(this.registrationStepsState[this.registrationStep]={fields:[],registerUserData:{}})}getInvalidStatus(t){return t.filter((t=>0==t.isValid)).length>0}renderInputs(){return console.log(this.listOfInputs),this.listOfInputs.map((t=>i("general-input",{type:t.inputType,name:t.name,displayName:t.displayName,validation:t.validate,action:t.action||null,options:t.data?t.data.values:[],defaultValue:t.defaultValue,autofilled:t.autofill,emitValue:this.emitValue,language:this.language})))}renderButtons(){return i("div",{class:"registration__buttons-wrapper"},i("button",{class:"registration__button "+(this.isLastStep?"registration__button--done":""),type:"submit",form:"RegistrationForm",onClick:t=>this.nextHandler(t)},qr(this.isLastStep?"doneButton":"nextButton",this.language)),"Step1"!==this.registrationStep&&i("button",{class:"registration__button",onClick:t=>this.backHandler(t)},qr("backButton",this.language)))}render(){return this.isLoading?i("p",null,"Please wait, loading ..."):i("div",{class:"registration"},i("form",{action:".",id:"RegistrationForm",class:"registration__form"},this.renderInputs()),this.renderButtons())}static get watchers(){return{registrationStep:["logger"]}}};Rr.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.registration{display:flex;flex-direction:column;gap:20px;width:100%;height:100%}.registration__form{display:grid;grid-template-columns:repeat(2, minmax(min-content, 1fr));column-gap:65px;row-gap:30px;justify-items:stretch;align-content:flex-start;overflow:scroll;width:100%;height:100%}.registration__buttons-wrapper{display:flex;flex-direction:row-reverse;justify-content:space-between}.registration__button{background-color:#e69200;border-radius:30px;text-transform:uppercase;padding:10px 50px;border:none;box-shadow:0px 2px 2px rgba(0, 0, 0, 0.5)}.registration__button--disabled{background-color:grey}.registration__button--done{background-color:#176317}";const Ur=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7)}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)}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){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}render(){return i("div",{class:"number__wrapper"},i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:"number__input "+(1==this.isValid||null==this.isValid?"":"number__input--invalid"),placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onBlur:t=>this.handleInput(t)}),i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Ur.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px}.number__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.number__label--required::after{content:"*";margin-left:5px;color:#666666}.number__input{width:inherit;padding:15px 6px;position:relative;border:none;border-bottom:3px solid #666666;background-color:transparent;color:#666666;font-size:16px;font-family:inherit;-moz-appearance:textfield;}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.number__input::placeholder{color:#666666}.number__input--invalid{border-bottom:3px solid #cc0000}.number__input:placeholder-shown+.number__label{opacity:0;visibility:hidden;transform:translateY(0)}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';const Wr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.value="",this.validationPattern=""}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)}connectedCallback(){this.validationPattern=this.setPattern()}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return this.validation.custom.find((t=>"regex"===t.rule)).pattern}setErrorMessage(){return this.inputReference.validity.patternMismatch?this.validation.custom.find((t=>"regex"===t.rule)).errorMessage: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}render(){return i("div",{class:"password__wrapper"},i("input",{type:"password",id:`${this.name}__input`,class:"password__input "+(1==this.isValid||null==this.isValid?"":"password__input--invalid"),name:this.name,readOnly:this.autofilled,value:this.defaultValue,ref:t=>this.inputReference=t,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,onBlur:t=>this.handleInput(t)}),i("label",{class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"password__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Wr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px}.password__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.password__label--required::after{content:"*";margin-left:5px;color:#666666}.password__input{width:inherit;padding:15px 6px;position:relative;border:none;border-bottom:3px solid #666666;background-color:transparent;color:#666666;font-size:16px;font-family:inherit}.password__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.password__input::placeholder{color:#666666}.password__input--invalid{border-bottom:3px solid #cc0000}.password__input:placeholder-shown+.password__label{opacity:0;visibility:hidden;transform:translateY(0)}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';const Yr=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7)}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)}connectedCallback(){}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}render(){return i("fieldset",{class:"radio__fieldset"},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))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Yr.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:red}",ut("vaadin-combo-box-overlay",[Ui,Ds,m`
2819
+ [part='content'] {
2820
+ padding: 0;
2821
+ }
2822
+
2823
+ :host {
2824
+ --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
2825
+ --_vaadin-combo-box-items-container-border-style: solid;
2826
+ --_vaadin-combo-box-items-container-border-color: transparent;
2827
+ }
2828
+
2829
+ /* Loading state */
2830
+
2831
+ /* When items are empty, the spinner needs some room */
2832
+ :host(:not([closing])) [part~='content'] {
2833
+ min-height: calc(2 * var(--lumo-space-s) + var(--lumo-icon-size-s));
2834
+ }
2835
+
2836
+ [part~='overlay'] {
2837
+ position: relative;
2838
+ }
2839
+
2840
+ :host([top-aligned]) [part~='overlay'] {
2841
+ margin-top: var(--lumo-space-xs);
2842
+ }
2843
+
2844
+ :host([bottom-aligned]) [part~='overlay'] {
2845
+ margin-bottom: var(--lumo-space-xs);
2846
+ }
2847
+
2848
+ [part~='loader'] {
2849
+ position: absolute;
2850
+ z-index: 1;
2851
+ left: var(--lumo-space-s);
2852
+ right: var(--lumo-space-s);
2853
+ top: var(--lumo-space-s);
2854
+ margin-left: auto;
2855
+ margin-inline-start: auto;
2856
+ margin-inline-end: 0;
2857
+ }
2858
+
2859
+ /* RTL specific styles */
2860
+
2861
+ :host([dir='rtl']) [part~='loader'] {
2862
+ left: auto;
2863
+ margin-left: 0;
2864
+ margin-right: auto;
2865
+ margin-inline-start: 0;
2866
+ margin-inline-end: auto;
2867
+ }
2868
+ `,m`
2869
+ [part~='loader'] {
2870
+ box-sizing: border-box;
2871
+ width: var(--lumo-icon-size-s);
2872
+ height: var(--lumo-icon-size-s);
2873
+ border: 2px solid transparent;
2874
+ border-color: var(--lumo-primary-color-10pct) var(--lumo-primary-color-10pct) var(--lumo-primary-color)
2875
+ var(--lumo-primary-color);
2876
+ border-radius: calc(0.5 * var(--lumo-icon-size-s));
2877
+ opacity: 0;
2878
+ pointer-events: none;
2879
+ }
2880
+
2881
+ :host(:not([loading])) [part~='loader'] {
2882
+ display: none;
2883
+ }
2884
+
2885
+ :host([loading]) [part~='loader'] {
2886
+ animation: 1s linear infinite lumo-loader-rotate, 0.3s 0.1s lumo-loader-fade-in both;
2887
+ }
2888
+
2889
+ @keyframes lumo-loader-fade-in {
2890
+ 0% {
2891
+ opacity: 0;
2892
+ }
2893
+
2894
+ 100% {
2895
+ opacity: 1;
2896
+ }
2897
+ }
2898
+
2899
+ @keyframes lumo-loader-rotate {
2900
+ 0% {
2901
+ transform: rotate(0deg);
2902
+ }
2903
+
2904
+ 100% {
2905
+ transform: rotate(360deg);
2906
+ }
2907
+ }
2908
+ `],{moduleId:"lumo-combo-box-overlay"});const Gr=m`
2909
+ :host {
2910
+ display: flex;
2911
+ align-items: center;
2912
+ box-sizing: border-box;
2913
+ font-family: var(--lumo-font-family);
2914
+ font-size: var(--lumo-font-size-m);
2915
+ line-height: var(--lumo-line-height-xs);
2916
+ padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
2917
+ var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
2918
+ min-height: var(--lumo-size-m);
2919
+ outline: none;
2920
+ border-radius: var(--lumo-border-radius-m);
2921
+ cursor: var(--lumo-clickable-cursor);
2922
+ -webkit-font-smoothing: antialiased;
2923
+ -moz-osx-font-smoothing: grayscale;
2924
+ -webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
2925
+ }
2926
+
2927
+ /* Checkmark */
2928
+ [part='checkmark']::before {
2929
+ display: var(--_lumo-item-selected-icon-display, none);
2930
+ content: var(--lumo-icons-checkmark);
2931
+ font-family: lumo-icons;
2932
+ font-size: var(--lumo-icon-size-m);
2933
+ line-height: 1;
2934
+ font-weight: normal;
2935
+ width: 1em;
2936
+ height: 1em;
2937
+ margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
2938
+ color: var(--lumo-primary-text-color);
2939
+ flex: none;
2940
+ opacity: 0;
2941
+ transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), opacity 0.1s;
2942
+ }
2943
+
2944
+ :host([selected]) [part='checkmark']::before {
2945
+ opacity: 1;
2946
+ }
2947
+
2948
+ :host([active]:not([selected])) [part='checkmark']::before {
2949
+ transform: scale(0.8);
2950
+ opacity: 0;
2951
+ transition-duration: 0s;
2952
+ }
2953
+
2954
+ [part='content'] {
2955
+ flex: auto;
2956
+ }
2957
+
2958
+ /* Disabled */
2959
+ :host([disabled]) {
2960
+ color: var(--lumo-disabled-text-color);
2961
+ cursor: default;
2962
+ pointer-events: none;
2963
+ }
2964
+
2965
+ /* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
2966
+ @media (any-hover: hover) {
2967
+ :host(:hover:not([disabled])) {
2968
+ background-color: var(--lumo-primary-color-10pct);
2969
+ }
2970
+
2971
+ :host([focus-ring]:not([disabled])) {
2972
+ box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
2973
+ }
2974
+ }
2975
+
2976
+ /* RTL specific styles */
2977
+ :host([dir='rtl']) {
2978
+ padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
2979
+ padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
2980
+ }
2981
+
2982
+ /* Slotted icons */
2983
+ :host ::slotted(vaadin-icon),
2984
+ :host ::slotted(iron-icon) {
2985
+ width: var(--lumo-icon-size-m);
2986
+ height: var(--lumo-icon-size-m);
2987
+ }
2988
+ `;ut("vaadin-item",Gr,{moduleId:"lumo-item"}),ut("vaadin-combo-box-item",[Gr,m`
2989
+ :host {
2990
+ transition: background-color 100ms;
2991
+ overflow: hidden;
2992
+ --_lumo-item-selected-icon-display: block;
2993
+ }
2994
+
2995
+ @media (any-hover: hover) {
2996
+ :host([focused]:not([disabled])) {
2997
+ box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
2998
+ }
2999
+ }
3000
+ `],{moduleId:"lumo-combo-box-item"}),ut("vaadin-combo-box",[Wo,m`
3001
+ :host {
3002
+ outline: none;
3003
+ }
3004
+
3005
+ [part='toggle-button']::before {
3006
+ content: var(--lumo-icons-dropdown);
3007
+ }
3008
+ `],{moduleId:"lumo-combo-box"});
3009
+ /**
3010
+ * @license
3011
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3012
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3013
+ */
3014
+ class Jr extends(bt(ji(Ni))){static get template(){return Oi`
3015
+ <style>
3016
+ :host {
3017
+ display: block;
3018
+ }
3019
+
3020
+ :host([hidden]) {
3021
+ display: none;
3022
+ }
3023
+ </style>
3024
+ <span part="checkmark" aria-hidden="true"></span>
3025
+ <div part="content">
3026
+ <slot></slot>
3027
+ </div>
3028
+ `}static get is(){return"vaadin-combo-box-item"}static get properties(){return{index:Number,item:Object,label:String,selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:Function,_oldRenderer:Function}}static get observers(){return["__rendererOrItemChanged(renderer, index, item.*, selected, focused)","__updateLabel(label, renderer)"]}connectedCallback(){super.connectedCallback(),this._comboBox=this.parentNode.comboBox;const t=this._comboBox.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&this.renderer(this,this._comboBox,{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)}}let Kr;customElements.define(Jr.is,Jr),
3029
+ /**
3030
+ * @license
3031
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3032
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3033
+ */
3034
+ ut("vaadin-combo-box-overlay",m`
3035
+ #overlay {
3036
+ width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
3037
+ }
3038
+
3039
+ [part='content'] {
3040
+ display: flex;
3041
+ flex-direction: column;
3042
+ height: 100%;
3043
+ }
3044
+ `,{moduleId:"vaadin-combo-box-overlay-styles"});class Zr extends(Qo(Es)){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Kr||(Kr=super.template.cloneNode(!0),Kr.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),Kr}static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}ready(){super.ready();const t=document.createElement("div");t.setAttribute("part","loader");const e=this.shadowRoot.querySelector('[part~="content"]');e.parentNode.insertBefore(t,e),this.requiredVerticalSpace=200}_outsideClickListener(t){const e=t.composedPath();e.includes(this.positionTarget)||e.includes(this)||this.close()}_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()}}}customElements.define(Zr.is,Zr);
3045
+ /**
3046
+ * @license
3047
+ * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
3048
+ * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
3049
+ * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3050
+ * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3051
+ * Code distributed by Google as part of the polymer project is also
3052
+ * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3053
+ */
3054
+ const Xr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Qr=Xr&&Xr[1]>=8,tn={_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,s)=>{e<this._scrollBottom&&(t=s),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),Ws)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,h=this._physicalCount;let l=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-l):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=h||i<=r);)if(t){if(a+o.length+1>=this._virtualCount)break;if(l+s>=c-this._scrollOffset)break;o.push(e),l+=s,e=(e+1)%h}else{if(n-o.length<=0)break;if(l+this._physicalSize-s<=d)break;o.push(e),l-=s,e=0===e?h-1:e-1}return{indexes:o,physicalTop:l-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)),Us):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Ws))}},_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._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Rs))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_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;!Qr&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,((t=(t=t||0===this._scrollHeight)||this._scrollPosition>=this._estScrollHeight-this._physicalSize)||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${this._estScrollHeight}px`,this._scrollHeight=this._estScrollHeight)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if(Zs(),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,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),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)}),Rs)},_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]=Ys.debounce(this._debouncers[t],i,e.bind(this)),Js(this._debouncers[t])}};class en{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,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(),Zs(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){this.__getVisibleElements().forEach((i=>{i.__virtualIndex>=t&&i.__virtualIndex<=e&&this.__updateElement(i,i.__virtualIndex,!0)}))}_updateMetrics(t){Zs();let e=0,i=0;const s=this._physicalAverageCount,o=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!==s&&(this._physicalAverage=Math.round((o*s+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);const s=t.offsetHeight;if(0===s)t.style.paddingTop=`${this.__placeholderHeight}px`,requestAnimationFrame((()=>this._resizeHandler()));else{this.__elementHeightQueue.push(s),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){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),Zs(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this.__preventElementUpdates=!1,this._resizeHandler(),Zs()}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){this._iterateItems(((t,e)=>{const i=this._physicalItems[t];i.hidden=e>=this.size,i.hidden?delete i.__lastUpdatedIndex:(i.__virtualIndex=e+(this._vidxOffset||0),this.__updateElement(i,i.__virtualIndex))}),t)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){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=Ys.debounce(this.__fixInvalidItemPositioningDebouncer,qs.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Ys.debounce(this.__scrollReorderDebouncer,qs.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=Ys.debounce(this.__debouncerWheelAnimationFrame,Rs,(()=>{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=Ys.debounce(this._debouncerIgnoreNewWheel,qs.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}_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 s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(_s){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 s=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=s,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<s&&(this._vidxOffset+=Math.min(s-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(en.prototype,tn);class sn{constructor(t){this.__adapter=new en(t)}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()}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}}
3055
+ /**
3056
+ * @license
3057
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3058
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3059
+ */const on=class{toString(){return""}};
3060
+ /**
3061
+ * @license
3062
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3063
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3064
+ */class rn extends Ni{static get is(){return"vaadin-combo-box-scroller"}static get template(){return Oi`
3065
+ <style>
3066
+ :host {
3067
+ display: block;
3068
+ min-height: 1px;
3069
+ overflow: auto;
3070
+
3071
+ /* Fixes item background from getting on top of scrollbars on Safari */
3072
+ transform: translate3d(0, 0, 0);
3073
+
3074
+ /* Enable momentum scrolling on iOS */
3075
+ -webkit-overflow-scrolling: touch;
3076
+
3077
+ /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
3078
+ box-shadow: 0 0 0 white;
3079
+ }
3080
+
3081
+ #selector {
3082
+ border-width: var(--_vaadin-combo-box-items-container-border-width);
3083
+ border-style: var(--_vaadin-combo-box-items-container-border-style);
3084
+ border-color: var(--_vaadin-combo-box-items-container-border-color);
3085
+ position: relative;
3086
+ }
3087
+ </style>
3088
+ <div id="selector">
3089
+ <slot></slot>
3090
+ </div>
3091
+ `}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},comboBox:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}__openedChanged(t){t&&this.requestContentUpdate()}ready(){super.ready(),this.id=`${this.localName}-${io()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.setAttribute("role","listbox"),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new sn({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 s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}__getAriaRole(t){return void 0!==t&&"option"}__isItemFocused(t,e){return!this.loading&&t===e}_isItemSelected(t,e,i){return!(t instanceof on)&&(i&&void 0!==t&&void 0!==e?this.get(i,t)===this.get(i,e):t===e)}__itemsChanged(t){this.__virtualizer&&t&&(this.__virtualizer.size=t.length,this.__virtualizer.flush(),this.requestContentUpdate())}__loadingChanged(){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],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:this.__isItemFocused(s,e)}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",this.__getAriaRole(e)),t.setAttribute("aria-selected",o.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 on&&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()}))}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}__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}}customElements.define(rn.is,rn);
3092
+ /**
3093
+ * @license
3094
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
3095
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3096
+ */
3097
+ const nn=t=>class extends(Ir(t)){static get properties(){return{pattern:{type:String},preventInvalidInput:{type:Boolean,observer:"_preventInvalidInputChanged"}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}_checkInputValue(){if(this.preventInvalidInput){const t=this.inputElement;t&&t.value.length>0&&!this.checkValidity()&&(t.value=this.value||"",this.setAttribute("input-prevented",""),this._inputDebouncer=Ys.debounce(this._inputDebouncer,qs.after(200),(()=>{this.removeAttribute("input-prevented")})))}}_onInput(t){this._checkInputValue(),super._onInput(t)}_preventInvalidInputChanged(t){t&&console.warn('WARNING: Since Vaadin 23.2, "preventInvalidInput" is deprecated. Please use "allowedCharPattern" instead.')}}
3098
+ /**
3099
+ * @license
3100
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3101
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3102
+ */,an=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 on},__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,s=Math.floor(1.5*this.pageSize);if(!this._shouldSkipIndex(e,s,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 on:void 0===this.size}_loadPage(t){if(this._pendingRequests[t]||!this.dataProvider)return;const e={page:t,pageSize:this.pageSize,filter:this.filter},i=(s,o)=>{if(this._pendingRequests[t]!==i)return;const r=this.filteredItems?[...this.filteredItems]:[];r.splice(e.page*e.pageSize,s.length,...s),this.filteredItems=r,this.opened||this._isInputFocused()||this._commitValue(),void 0!==o&&(this.size=o),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),i=Object.keys(this._pendingRequests);for(let s=0;s<i.length;s++){const o=parseInt(i[s]);o>=e&&this._pendingRequests[o]([],t)}}}}
3103
+ /**
3104
+ * @license
3105
+ * Copyright (c) 2021 - 2022 Vaadin Ltd.
3106
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3107
+ */;
3108
+ /**
3109
+ * @license
3110
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3111
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3112
+ */
3113
+ function hn(t){return null!=t}function ln(t,e){return t.findIndex((t=>!(t instanceof on)&&e(t)))}const cn=t=>class extends(xs(No(Tr(ro(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"},_closeOnBlurIsPrevented:Boolean,_scroller:Object,_overlayOpened:{type:Boolean,observer:"_overlayOpenedChanged"}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, filteredItems, loading)","_updateScroller(_scroller, filteredItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, theme)"]}constructor(){super(),this._boundOnFocusout=this._onFocusout.bind(this),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 _inputElementValue(){return this.inputElement?this.inputElement[this._propertyForValue]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._propertyForValue]=t)}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.addEventListener("focusout",this._boundOnFocusout),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this.$.overlay.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 Nr(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}))}_initScroller(t){const e=`${this._tagNamePrefix}-scroller`,i=this.$.overlay;i.renderer=t=>{t.firstChild||t.appendChild(document.createElement(e))},i.requestContentUpdate();const s=i.querySelector(e);s.comboBox=t||this,s.getItemLabel=this._getItemLabel.bind(this),s.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged),this._scroller=s}_updateScroller(t,e,i,s,o,r,n,a,h){t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:h}))}_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.filteredItems&&this.filteredItems.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&&Ts(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()||ws||this.focus(),this.$.overlay.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}_handleClearButtonClick(t){t.preventDefault(),this._clear(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){const e=t.composedPath();this._isClearButton(t)?this._handleClearButtonClick(t):e.indexOf(this._toggleElement)>-1?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"Tab"===t.key?this.$.overlay.restoreFocusOnClose=!1:"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?this.get(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?this.get(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this.filteredItems;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.filteredItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this.filteredItems[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._clear()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._clear())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{ws&&!this._isInputFocused()&&document.activeElement.blur()})))}_clear(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){requestAnimationFrame((()=>{this._scrollIntoView(this._focusedIndex),this._updateActiveDescendant(this._focusedIndex)})),this._lastCommittedValue=this.value}_onClosed(){this.loading&&!this.allowCustomValue||this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this.filteredItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem)}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[...this.filteredItems||[],this.selectedItem],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=""}get _propertyForValue(){return"value"}_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)}this.filteredItems&&(this._focusedIndex=this.filteredItems.indexOf(t))}_valueChanged(t,e){""===t&&void 0===e||(hn(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(){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){const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));o>-1?this._focusedIndex=o:this.__setInitialFocusedIndex()}__setInitialFocusedIndex(){const t=this._inputElementValue;this._focusedIndex=void 0===t||t===this._getItemLabel(this.selectedItem)?this.__getItemIndexByLabel(this.filteredItems,this._getItemLabel(this.selectedItem)):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)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&hn(e)?ln(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?ln(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof on||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onFocusout(t){if(!t.relatedTarget||t.relatedTarget.localName!==`${this._tagNamePrefix}-item`)if(t.relatedTarget!==this.$.overlay){if(!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;this._closeOrCommit()}}else t.composedPath()[0].focus()}_onTouchend(t){this.clearElement&&t.composedPath()[0]===this.clearElement&&(t.preventDefault(),this._clear())}}
3114
+ /**
3115
+ * @license
3116
+ * Copyright (c) 2015 - 2022 Vaadin Ltd.
3117
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3118
+ */;ut("vaadin-combo-box",Mr,{moduleId:"vaadin-combo-box-styles"});class dn extends(an(cn(nn(Dr(bt(to(Ni))))))){static get is(){return"vaadin-combo-box"}static get template(){return Oi`
3119
+ <style>
3120
+ :host([opened]) {
3121
+ pointer-events: auto;
3122
+ }
3123
+ </style>
3124
+
3125
+ <div class="vaadin-combo-box-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 id="toggleButton" part="toggle-button" slot="suffix" aria-hidden="true"></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-combo-box-overlay
3154
+ id="overlay"
3155
+ opened="[[_overlayOpened]]"
3156
+ loading$="[[loading]]"
3157
+ theme$="[[_theme]]"
3158
+ position-target="[[_positionTarget]]"
3159
+ no-vertical-overlap
3160
+ restore-focus-node="[[inputElement]]"
3161
+ ></vaadin-combo-box-overlay>
3162
+
3163
+ <slot name="tooltip"></slot>
3164
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Pr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Or(this.inputElement,this._labelController)),this._tooltipController=new oo(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_setFocused(t){super._setFocused(t),t||this.validate()}_shouldRemoveFocus(t){return t.relatedTarget!==this.$.overlay||(t.composedPath()[0].focus(),!1)}_onClearButtonClick(t){t.stopPropagation(),this._handleClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}customElements.define(dn.is,dn);const un=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[]}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)}connectedCallback(){this.displayedOptions=this.options}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0])return this.getOptions().then((t=>{this.displayedOptions=t.countries.map((t=>({label:t.Name,value:t.Alpha2Code})))}))}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input")}getOptions(){const t=new URL("https://demo-api.stage.norway.everymatrix.com/v1/player/countries");return new Promise(((e,i)=>{fetch(t.href).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),i(t)}))}))}handleChange(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0),this.inputReference.previousElementSibling.classList.remove("select__label--hidden")}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return n("requiredError",this.language)}render(){return i("div",{class:"select__wrapper"},i("label",{class:"select__label select__label--hidden",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:"select__input","item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,items:this.displayedOptions,onBlur:t=>this.handleChange(t)}),i("small",{class:"select__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};un.style="*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select__wrapper{position:relative;display:flex;padding-top:10px;width:100%}.select__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.select__label--hidden{opacity:0;visibility:hidden;transform:translateY(0)}.select__input{width:inherit;padding:15px 6px;position:relative;border:none;border-bottom:3px solid #666666;background-color:transparent;color:#666666;font-size:16px;font-family:inherit}.select__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}";const pn=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.validationPattern=""}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)}connectedCallback(){this.validationPattern=this.setPattern()}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0])return this.getPhoneCodes().then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.CountryID})))}))}getPhoneCodes(){const t=new URL("https://demo-api.stage.norway.everymatrix.com/v1/player/phonecodes");return new Promise(((e,i)=>{fetch(t.href).then((t=>t.json())).then((t=>{e(t)})).catch((t=>{console.error(t),i(t)}))}))}handleInput(t){this.value=t.target.value,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return this.validation.custom.find((t=>"regex"===t.rule)).pattern}setErrorMessage(){return this.inputReference.validity.patternMismatch?this.validation.custom.find((t=>"regex"===t.rule)).errorMessage: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}render(){const t=1==this.isValid||null==this.isValid?"":"tel__input--invalid";return i("div",{class:"tel__wrapper"},i("div",{class:"tel__wrapper--flex"},i("vaadin-combo-box",{items:this.phoneCodesOptions,value:this.defaultValue,readOnly:this.autofilled}),i("input",{type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:`tel__input ${t}`,placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onBlur:t=>this.handleInput(t)})),i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};pn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px;border-bottom:3px solid #666666}.tel__wrapper--flex{display:flex}.tel__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.tel__label--required::after{content:"*";margin-left:5px;color:#666666}.tel vaadin-combo-box{flex-grow:1}.tel__input{width:inherit;padding:15px 6px;position:relative;border:none;background-color:transparent;color:#666666;font-size:16px;font-family:inherit;flex-grow:3;-moz-appearance:textfield;}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.tel__input::placeholder{color:#666666}.tel__input--invalid .tel__wrapper{border-bottom:3px solid #cc0000}.tel__input:placeholder-shown+.tel__label{opacity:0;visibility:hidden;transform:translateY(0)}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';const mn=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.errorMessage="",this.value="",this.customRules=[],this.validationPattern=""}validityChanged(){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)}connectedCallback(){this.customRules=this.setCustomRules(),this.validationPattern=this.setPattern()}handleInput(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setCustomRules(){var t;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return this.validation.custom.filter((t=>"regex"!==t.rule))}setPattern(){var t;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return this.validation.custom.find((t=>"regex"===t.rule)).pattern}setErrorMessage(){return this.inputReference.validity.patternMismatch?this.validation.custom.find((t=>"regex"===t.rule)).errorMessage: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}render(){return i("div",{class:"text__wrapper"},i("input",{id:`${this.name}__input`,value:this.defaultValue,type:"text",class:"text__input "+(1==this.isValid||null==this.isValid?"":"text__input--invalid"),placeholder:`${this.displayName} ${this.validation.mandatory?"*":""}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onBlur:t=>{this.handleInput(t)}}),i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("small",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};mn.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text__wrapper{position:relative;display:flex;flex-direction:column-reverse;padding-top:10px}.text__label{color:#474747;font-size:16px;position:absolute;bottom:15px;left:5px;transform:translateY(-25px);transition:all 0.3s cubic-bezier(0.5, 0, 0.5, 1)}.text__label--required::after{content:"*";margin-left:5px;color:#666666}.text__input{width:inherit;padding:15px 6px;position:relative;border:none;border-bottom:3px solid #666666;background-color:transparent;color:#666666;font-size:16px;font-family:inherit}.text__input:focus{outline:none;box-shadow:0 5px 5px rgba(16, 15, 15, 0.1)}.text__input::placeholder{color:#666666}.text__input--invalid{border-bottom:3px solid #cc0000}.text__input:placeholder-shown+.text__label{opacity:0;visibility:hidden;transform:translateY(0)}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000}';export{a as checkbox_input,Fr as date_input,Lr as email_input,$r as general_input,Rr as general_registration,Ur as number_input,Wr as password_input,Yr as radio_input,un as select_input,pn as tel_input,mn as text_input}