@everymatrix/general-input 1.19.2 → 1.19.4

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.
@@ -3,7 +3,7 @@ import{r as t,c as e,h as i,g as s}from"./p-b408093e.js";import{t as r}from"./p-
3
3
  * @license
4
4
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
5
5
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
- */class n extends HTMLElement{static get version(){return"23.3.19"}}customElements.define("vaadin-lumo-styles",n);
6
+ */class n extends HTMLElement{static get version(){return"23.3.25"}}customElements.define("vaadin-lumo-styles",n);
7
7
  /**
8
8
  * @license
9
9
  * Copyright 2019 Google LLC
@@ -14,35 +14,35 @@ const a=window,h=a.ShadowRoot&&(void 0===a.ShadyCSS||a.ShadyCSS.nativeShadow)&&"
14
14
  * @license
15
15
  * Copyright 2017 Google LLC
16
16
  * SPDX-License-Identifier: BSD-3-Clause
17
- */;var m;const f=window,v=f.trustedTypes,b=v?v.emptyScript:"",g=f.reactiveElementPolyfillSupport,y={toAttribute(t,e){switch(e){case Boolean:t=t?b: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}},w=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:w},x="finalized";class k 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=_){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 r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty(x))return!1;this[x]=!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(p(t))}else void 0!==t&&e.push(p(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)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=a.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=_){var s;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:y).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,r=s._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=s.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:y;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(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){}}
17
+ */;var m;const f=window,v=f.trustedTypes,b=v?v.emptyScript:"",g=f.reactiveElementPolyfillSupport,y={toAttribute(t,e){switch(e){case Boolean:t=t?b: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}},w=(t,e)=>e!==t&&(e==e||t==t),_={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:w},x="finalized";class k extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,i)=>{const s=this._$Ep(i,e);void 0!==s&&(this._$Ev.set(s,i),t.push(s))})),t}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const i="symbol"==typeof t?Symbol():"__"+t,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 r=this[t];this[e]=s,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||_}static finalize(){if(this.hasOwnProperty(x))return!1;this[x]=!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(p(t))}else void 0!==t&&e.push(p(t));return e}static _$Ep(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,i;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(i=t.hostConnected)||void 0===i||i.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{h?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),s=a.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=_){var s;const r=this.constructor._$Ep(t,i);if(void 0!==r&&!0===i.reflect){const o=(void 0!==(null===(s=i.converter)||void 0===s?void 0:s.toAttribute)?i.converter:y).toAttribute(e,i.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var i;const s=this.constructor,r=s._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=s.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(i=t.converter)||void 0===i?void 0:i.fromAttribute)?t.converter:y;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,i){let s=!0;void 0!==t&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||w)(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){}}
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
22
  */
23
- var C;k[x]=!0,k.elementProperties=new Map,k.elementStyles=[],k.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:k}),(null!==(m=f.reactiveElementVersions)&&void 0!==m?m:f.reactiveElementVersions=[]).push("1.6.2");const A=window,E=A.trustedTypes,T=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,D=`lit$${(Math.random()+"").slice(9)}$`,S="?"+D,M=`<${S}>`,z=document,I=()=>z.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,B="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,L=/>/g,$=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,V=/"/g,q=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),W=new WeakMap,Y=z.createTreeWalker(z,129,null,!1),G=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":"",n=F;for(let e=0;e<i;e++){const i=t[e];let a,h,l=-1,u=0;for(;u<i.length&&(n.lastIndex=u,h=n.exec(i),null!==h);)u=n.lastIndex,n===F?"!--"===h[1]?n=N:void 0!==h[1]?n=L:void 0!==h[2]?(q.test(h[2])&&(r=RegExp("</"+h[2],"g")),n=$):void 0!==h[3]&&(n=$):n===$?">"===h[0]?(n=null!=r?r:F,l=-1):void 0===h[1]?l=-2:(l=n.lastIndex-h[2].length,a=h[1],n=void 0===h[3]?$:'"'===h[3]?V:j):n===V||n===j?n=$:n===N||n===L?n=F:(n=$,r=void 0);const c=n===$&&t[e+1].startsWith("/>")?" ":"";o+=n===F?i+M:l>=0?(s.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+D+c):i+D+(-2===l?(s.push(void 0),e):c)}const a=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==T?T.createHTML(a):a,s]};class U{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[h,l]=G(t,e);if(this.el=U.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(D)){const i=l[o++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(D),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Z:"?"===e[1]?et:"@"===e[1]?it:K})}else a.push({type:6,index:r})}for(const e of t)s.removeAttribute(e)}if(q.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],I()),Y.nextNode(),a.push({type:2,index:++r});s.append(t[e],I())}}}else if(8===s.nodeType)if(s.data===S)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:r}),t+=D.length-1}r++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,s){var r,o,n,a;if(e===R)return e;let h=void 0!==s?null===(r=i._$Co)||void 0===r?void 0:r[s]:i._$Cl;const l=P(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==l&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.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=Q(t,h._$AS(t,e.values),h,s)),e}class X{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,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:z).importNode(i,!0);Y.currentNode=r;let o=Y.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new J(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new st(o,this,t)),this._$AV.push(e),h=s[++a]}n!==(null==h?void 0:h.index)&&(o=Y.nextNode(),n++)}return Y.currentNode=z,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class J{constructor(t,e,i,s){var r;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),P(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(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!==H&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=U.createElement(s.h,this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new X(r,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 U(t)),e}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new J(this.k(I()),this.k(I()),this,this.options)):i=e[s],i._$AI(r),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 K{constructor(t,e,i,s,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=Q(this,t,e,0),o=!P(t)||t!==this._$AH&&t!==R,o&&(this._$AH=t);else{const s=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=Q(this,s[i+n],e,n),a===R&&(a=this._$AH[n]),o||(o=!P(a)||a!==this._$AH[n]),a===H?t=H:t!==H&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!s&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Z extends K{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}const tt=E?E.emptyScript:"";class et extends K{constructor(){super(...arguments),this.type=4}j(t){t&&t!==H?this.element.setAttribute(this.name,tt):this.element.removeAttribute(this.name)}}class it extends K{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:H)===R)return;const s=this._$AH,r=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==H&&(s===H||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class st{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){Q(this,t)}}const rt=A.litHtmlPolyfillSupport;
23
+ var C;k[x]=!0,k.elementProperties=new Map,k.elementStyles=[],k.shadowRootOptions={mode:"open"},null==g||g({ReactiveElement:k}),(null!==(m=f.reactiveElementVersions)&&void 0!==m?m:f.reactiveElementVersions=[]).push("1.6.3");const A=window,E=A.trustedTypes,T=E?E.createPolicy("lit-html",{createHTML:t=>t}):void 0,D=`lit$${(Math.random()+"").slice(9)}$`,S="?"+D,M=`<${S}>`,z=document,I=()=>z.createComment(""),P=t=>null===t||"object"!=typeof t&&"function"!=typeof t,O=Array.isArray,B="[ \t\n\f\r]",F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,N=/-->/g,L=/>/g,$=RegExp(`>|${B}(?:([^\\s"'>=/]+)(${B}*=${B}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),j=/'/g,V=/"/g,q=/^(?:script|style|textarea|title)$/i,R=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),W=new WeakMap,Y=z.createTreeWalker(z,129,null,!1);function G(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==T?T.createHTML(e):e}const U=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":"",n=F;for(let e=0;e<i;e++){const i=t[e];let a,h,l=-1,u=0;for(;u<i.length&&(n.lastIndex=u,h=n.exec(i),null!==h);)u=n.lastIndex,n===F?"!--"===h[1]?n=N:void 0!==h[1]?n=L:void 0!==h[2]?(q.test(h[2])&&(r=RegExp("</"+h[2],"g")),n=$):void 0!==h[3]&&(n=$):n===$?">"===h[0]?(n=null!=r?r:F,l=-1):void 0===h[1]?l=-2:(l=n.lastIndex-h[2].length,a=h[1],n=void 0===h[3]?$:'"'===h[3]?V:j):n===V||n===j?n=$:n===N||n===L?n=F:(n=$,r=void 0);const c=n===$&&t[e+1].startsWith("/>")?" ":"";o+=n===F?i+M:l>=0?(s.push(a),i.slice(0,l)+"$lit$"+i.slice(l)+D+c):i+D+(-2===l?(s.push(void 0),e):c)}return[G(t,o+(t[i]||"<?>")+(2===e?"</svg>":"")),s]};class Q{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const n=t.length-1,a=this.parts,[h,l]=U(t,e);if(this.el=Q.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(D)){const i=l[o++];if(t.push(e),void 0!==i){const t=s.getAttribute(i.toLowerCase()+"$lit$").split(D),e=/([.?@])?(.*)/.exec(i);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?tt:"?"===e[1]?it:"@"===e[1]?st:Z})}else a.push({type:6,index:r})}for(const e of t)s.removeAttribute(e)}if(q.test(s.tagName)){const t=s.textContent.split(D),e=t.length-1;if(e>0){s.textContent=E?E.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],I()),Y.nextNode(),a.push({type:2,index:++r});s.append(t[e],I())}}}else if(8===s.nodeType)if(s.data===S)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(D,t+1));)a.push({type:7,index:r}),t+=D.length-1}r++}}static createElement(t,e){const i=z.createElement("template");return i.innerHTML=t,i}}function X(t,e,i=t,s){var r,o,n,a;if(e===R)return e;let h=void 0!==s?null===(r=i._$Co)||void 0===r?void 0:r[s]:i._$Cl;const l=P(e)?void 0:e._$litDirective$;return(null==h?void 0:h.constructor)!==l&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.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=X(t,h._$AS(t,e.values),h,s)),e}class J{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,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:z).importNode(i,!0);Y.currentNode=r;let o=Y.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new K(o,o.nextSibling,this,t):1===h.type?e=new h.ctor(o,h.name,h.strings,this,t):6===h.type&&(e=new rt(o,this,t)),this._$AV.push(e),h=s[++a]}n!==(null==h?void 0:h.index)&&(o=Y.nextNode(),n++)}return Y.currentNode=z,r}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class K{constructor(t,e,i,s){var r;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cp=null===(r=null==s?void 0:s.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=X(this,t,e),P(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==R&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>O(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!==H&&P(this._$AH)?this._$AA.nextSibling.data=t:this.$(z.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:s}=t,r="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=Q.createElement(G(s.h,s.h[0]),this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(i);else{const t=new J(r,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 Q(t)),e}T(t){O(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new K(this.k(I()),this.k(I()),this,this.options)):i=e[s],i._$AI(r),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 Z{constructor(t,e,i,s,r){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=X(this,t,e,0),o=!P(t)||t!==this._$AH&&t!==R,o&&(this._$AH=t);else{const s=t;let n,a;for(t=r[0],n=0;n<r.length-1;n++)a=X(this,s[i+n],e,n),a===R&&(a=this._$AH[n]),o||(o=!P(a)||a!==this._$AH[n]),a===H?t=H:t!==H&&(t+=(null!=a?a:"")+r[n+1]),this._$AH[n]=a}o&&!s&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class tt extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}const et=E?E.emptyScript:"";class it extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==H?this.element.setAttribute(this.name,et):this.element.removeAttribute(this.name)}}class st extends Z{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=X(this,t,e,0))&&void 0!==i?i:H)===R)return;const s=this._$AH,r=t===H&&s!==H||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==H&&(s===H||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class rt{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){X(this,t)}}const ot=A.litHtmlPolyfillSupport;
24
24
  /**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
28
  */
29
- var ot,nt;null==rt||rt(U,J),(null!==(C=A.litHtmlVersions)&&void 0!==C?C:A.litHtmlVersions=[]).push("2.7.4");class at extends k{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,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new J(e.insertBefore(I(),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}}at.finalized=!0,at._$litElement$=!0,null===(ot=globalThis.litElementHydrateSupport)||void 0===ot||ot.call(globalThis,{LitElement:at});const ht=globalThis.litElementPolyfillSupport;null==ht||ht({LitElement:at}),(null!==(nt=globalThis.litElementVersions)&&void 0!==nt?nt:globalThis.litElementVersions=[]).push("3.3.2");
29
+ var nt,at;null==ot||ot(Q,K),(null!==(C=A.litHtmlVersions)&&void 0!==C?C:A.litHtmlVersions=[]).push("2.8.0");class ht extends k{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,r;const o=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:e;let n=o._$litPart$;if(void 0===n){const t=null!==(r=null==i?void 0:i.renderBefore)&&void 0!==r?r:null;o._$litPart$=n=new K(e.insertBefore(I(),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.3");
30
30
  /**
31
31
  * @license
32
32
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
33
33
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
34
34
  */
35
- const lt=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)}}
35
+ const ut=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)}}
36
36
  /**
37
37
  * @license
38
38
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
39
39
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
40
- */,ut=[];function ct(t,e,i={}){t&&vt(customElements.get(t))&&console.warn(`The custom element definition for "${t}"\n was finalized before a style module was registered.\n Make sure to add component specific style modules before\n importing the corresponding custom element.`),e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof c||(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):ut.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function dt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ut}function pt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function mt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=dt().find((e=>e.moduleId===t));i?e.push(...mt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function ft(t){const e=`${t}-default-theme`,i=dt().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:[...mt(t),...t.styles],includePriority:pt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:dt().filter((t=>t.moduleId===e))}function vt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const bt=t=>class extends(lt(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!vt(this)&&function(t,e){const i=document.createElement("style");i.innerHTML=t.map((t=>t.cssText)).join("\n"),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...super.finalizeStyles(t),...e]:e}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype);this.__themes=[...(t?t.constructor.__themes:[])||[],...ft(this.is)];const e=this.__themes.flatMap((t=>t.styles));return e.filter(((t,i)=>i===e.lastIndexOf(t)))}}
40
+ */,ct=[];function dt(t,e,i={}){t&&bt(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 c||(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):ct.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId})}function pt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ct}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 bt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}const gt=t=>class extends(ut(t)){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;t&&!bt(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)))}}
41
41
  /**
42
42
  * @license
43
43
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
44
44
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
45
- */,gt=d`
45
+ */,yt=d`
46
46
  :host {
47
47
  /* Base (background) */
48
48
  --lumo-base-color: #fff;
@@ -114,7 +114,7 @@ const lt=t=>class extends t{static get properties(){return{theme:{type:String,re
114
114
  --lumo-success-text-color: hsl(145, 85%, 25%);
115
115
  --lumo-success-contrast-color: #fff;
116
116
  }
117
- `,yt=document.createElement("template");yt.innerHTML=`<style>${gt.toString().replace(":host","html")}</style>`,document.head.appendChild(yt.content);const wt=d`
117
+ `,wt=document.createElement("template");wt.innerHTML=`<style>${yt.toString().replace(":host","html")}</style>`,document.head.appendChild(wt.content);const _t=d`
118
118
  [theme~='dark'] {
119
119
  /* Base (background) */
120
120
  --lumo-base-color: hsl(214, 35%, 21%);
@@ -223,7 +223,7 @@ const lt=t=>class extends t{static get properties(){return{theme:{type:String,re
223
223
  background-color: var(--lumo-contrast-10pct);
224
224
  border-radius: var(--lumo-border-radius-m);
225
225
  }
226
- `;ct("",wt,{moduleId:"lumo-color"}),ct("",[wt,d`
226
+ `;dt("",_t,{moduleId:"lumo-color"}),dt("",[_t,d`
227
227
  :host {
228
228
  color: var(--lumo-body-text-color) !important;
229
229
  background-color: var(--lumo-base-color) !important;
@@ -234,13 +234,13 @@ const lt=t=>class extends t{static get properties(){return{theme:{type:String,re
234
234
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
235
235
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
236
236
  */
237
- const _t=document.createElement("template");_t.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(_t.content);
237
+ const xt=document.createElement("template");xt.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(xt.content);
238
238
  /**
239
239
  * @license
240
240
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
241
241
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
242
242
  */
243
- const xt=d`
243
+ const kt=d`
244
244
  :host {
245
245
  --lumo-size-xs: 1.625rem;
246
246
  --lumo-size-s: 1.875rem;
@@ -255,13 +255,13 @@ const xt=d`
255
255
  /* For backwards compatibility */
256
256
  --lumo-icon-size: var(--lumo-icon-size-m);
257
257
  }
258
- `,kt=document.createElement("template");kt.innerHTML=`<style>${xt.toString().replace(":host","html")}</style>`,document.head.appendChild(kt.content);
258
+ `,Ct=document.createElement("template");Ct.innerHTML=`<style>${kt.toString().replace(":host","html")}</style>`,document.head.appendChild(Ct.content);
259
259
  /**
260
260
  * @license
261
261
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
262
262
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
263
263
  */
264
- const Ct=d`
264
+ const At=d`
265
265
  :host {
266
266
  /* Square */
267
267
  --lumo-space-xs: 0.25rem;
@@ -284,13 +284,13 @@ const Ct=d`
284
284
  --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
285
285
  --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
286
286
  }
287
- `,At=document.createElement("template");At.innerHTML=`<style>${Ct.toString().replace(":host","html")}</style>`,document.head.appendChild(At.content);
287
+ `,Et=document.createElement("template");Et.innerHTML=`<style>${At.toString().replace(":host","html")}</style>`,document.head.appendChild(Et.content);
288
288
  /**
289
289
  * @license
290
290
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
291
291
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
292
292
  */
293
- const Et=d`
293
+ const Tt=d`
294
294
  :host {
295
295
  /* Border radius */
296
296
  --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
@@ -313,13 +313,13 @@ const Et=d`
313
313
  --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
314
314
  --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
315
315
  }
316
- `;const Tt=document.createElement("template");Tt.innerHTML=`<style>${Et.toString().replace(":host","html")}$</style>`,document.head.appendChild(Tt.content);
316
+ `;const Dt=document.createElement("template");Dt.innerHTML=`<style>${Tt.toString().replace(":host","html")}$</style>`,document.head.appendChild(Dt.content);
317
317
  /**
318
318
  * @license
319
319
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
320
320
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
321
321
  */
322
- const Dt=d`
322
+ const St=d`
323
323
  :host {
324
324
  /* prettier-ignore */
325
325
  --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@@ -339,7 +339,7 @@ const Dt=d`
339
339
  --lumo-line-height-s: 1.375;
340
340
  --lumo-line-height-m: 1.625;
341
341
  }
342
- `;ct("",d`
342
+ `;dt("",d`
343
343
  html,
344
344
  :host {
345
345
  font-family: var(--lumo-font-family);
@@ -442,7 +442,7 @@ const Dt=d`
442
442
  border-left: none;
443
443
  border-right: 2px solid var(--lumo-contrast-30pct);
444
444
  }
445
- `,{moduleId:"lumo-typography"});const St=document.createElement("template");St.innerHTML=`<style>${Dt.toString().replace(":host","html")}</style>`,document.head.appendChild(St.content),ct("vaadin-checkbox",d`
445
+ `,{moduleId:"lumo-typography"});const Mt=document.createElement("template");Mt.innerHTML=`<style>${St.toString().replace(":host","html")}</style>`,document.head.appendChild(Mt.content),dt("vaadin-checkbox",d`
446
446
  :host {
447
447
  color: var(--lumo-body-text-color);
448
448
  font-size: var(--lumo-font-size-m);
@@ -605,7 +605,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
605
605
  Code distributed by Google as part of the polymer project is also
606
606
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
607
607
  */
608
- let Mt,zt,It=/(url\()([^)]*)(\))/g,Pt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ot(t,e){if(t&&Pt.test(t))return t;if("//"===t)return t;if(void 0===Mt){Mt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Mt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Mt)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 Bt(t,e){return t.replace(It,(function(t,i,s,r){return i+"'"+Ot(s.replace(/["']/g,""),e)+"'"+r}))}function Ft(t){return t.substring(0,t.lastIndexOf("/")+1)}
608
+ let zt,It,Pt=/(url\()([^)]*)(\))/g,Ot=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Bt(t,e){if(t&&Ot.test(t))return t;if("//"===t)return t;if(void 0===zt){zt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",zt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),zt)try{return new URL(t,e).href}catch(e){return t}return It||(It=document.implementation.createHTMLDocument("temp"),It.base=It.createElement("base"),It.head.appendChild(It.base),It.anchor=It.createElement("a"),It.body.appendChild(It.anchor)),It.base.href=e,It.anchor.href=t,It.anchor.href||t}function Ft(t,e){return t.replace(Pt,(function(t,i,s,r){return i+"'"+Bt(s.replace(/["']/g,""),e)+"'"+r}))}function Nt(t){return t.substring(0,t.lastIndexOf("/")+1)}
609
609
  /**
610
610
  @license
611
611
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -614,7 +614,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
614
614
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
615
615
  Code distributed by Google as part of the polymer project is also
616
616
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
617
- */const Nt=!window.ShadyDOM||!window.ShadyDOM.inUse,Lt=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 $t=window.Polymer&&window.Polymer.rootPath||Ft(document.baseURI||window.location.href),jt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Vt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,qt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Rt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Ht=window.Polymer&&window.Polymer.legacyWarnings||!1,Wt=window.Polymer&&window.Polymer.syncInitialRender||!1,Yt=window.Polymer&&window.Polymer.legacyUndefined||!1,Gt=window.Polymer&&window.Polymer.orderedComputed||!1,Ut=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Qt=window.Polymer&&window.Polymer.fastDomIf||!1,Xt=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 r=s.__mixinSet;if(r&&r[i])return s;let o=e,n=o.get(s);if(!n){n=t(s),o.set(s,n);let e=Object.create(n.__mixinSet||r||null);e[i]=!0,n.__mixinSet=e}return n}};
617
+ */const Lt=!window.ShadyDOM||!window.ShadyDOM.inUse,$t=Lt&&"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 jt=window.Polymer&&window.Polymer.rootPath||Nt(document.baseURI||window.location.href),Vt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,qt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Rt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Ht=window.Polymer&&window.Polymer.legacyOptimizations||!1,Wt=window.Polymer&&window.Polymer.legacyWarnings||!1,Yt=window.Polymer&&window.Polymer.syncInitialRender||!1,Gt=window.Polymer&&window.Polymer.legacyUndefined||!1,Ut=window.Polymer&&window.Polymer.orderedComputed||!1,Qt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,Xt=window.Polymer&&window.Polymer.fastDomIf||!1,Jt=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Kt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Zt=0;const te=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=Zt++;return function(s){let r=s.__mixinSet;if(r&&r[i])return s;let o=e,n=o.get(s);if(!n){n=t(s),o.set(s,n);let e=Object.create(n.__mixinSet||r||null);e[i]=!0,n.__mixinSet=e}return n}};
618
618
  /**
619
619
  @license
620
620
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -623,7 +623,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
623
623
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
624
624
  Code distributed by Google as part of the polymer project is also
625
625
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
626
- */let te={},ee={};function ie(t,e){te[t]=ee[t.toLowerCase()]=e}function se(t){return te[t]||ee[t.toLowerCase()]}class re extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=se(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=Ot(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Ft(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Vt&&void 0!==se(t))throw ie(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,ie(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function oe(t){return re.import(t)}function ne(t){const e=Bt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ae(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...he(e[t]));return i}function he(t){const e=oe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...ue(e));const i=e.querySelector("template");i&&t.push(...le(i,e.assetpath)),e._styles=t}return e._styles}function le(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t],o=r.getAttribute("include");o&&i.push(...ae(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=Bt(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function ue(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=ne(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=ne(t));e.push(i?t._unscopedStyle:t._style)}}return e}
626
+ */let ee={},ie={};function se(t,e){ee[t]=ie[t.toLowerCase()]=e}function re(t){return ee[t]||ie[t.toLowerCase()]}class oe extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=re(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=Bt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Nt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(qt&&void 0!==re(t))throw se(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,se(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}function ne(t){return oe.import(t)}function ae(t){const e=Ft((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function he(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...le(e[t]));return i}function le(t){const e=ne(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...ce(e));const i=e.querySelector("template");i&&t.push(...ue(i,e.assetpath)),e._styles=t}return e._styles}function ue(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t],o=r.getAttribute("include");o&&i.push(...he(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=Ft(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function ce(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=ae(t);e.setAttribute("shady-unscoped",""),t._unscopedStyle=e}else t._style||(t._style=ae(t));e.push(i?t._unscopedStyle:t._style)}}return e}
627
627
  /**
628
628
  @license
629
629
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -632,7 +632,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
632
632
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
633
633
  Code distributed by Google as part of the polymer project is also
634
634
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
635
- */re.prototype.modules=te,customElements.define("dom-module",re);const ce=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
635
+ */oe.prototype.modules=ee,customElements.define("dom-module",oe);const de=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
636
636
  /**
637
637
  @license
638
638
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -641,7 +641,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
641
641
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
642
642
  Code distributed by Google as part of the polymer project is also
643
643
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
644
- */function de(t){return t.indexOf(".")>=0}function pe(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function me(t,e){return 0===t.indexOf(e+".")}function fe(t,e){return 0===e.indexOf(t+".")}function ve(t,e,i){return e+i.slice(t.length)}function be(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 ge(t){return Array.isArray(t)?be(t).split("."):t.toString().split(".")}function ye(t,e,i){let s=t,r=ge(e);for(let t=0;t<r.length;t++){if(!s)return;s=s[r[t]]}return i&&(i.path=r.join(".")),s}function we(t,e,i){let s=t,r=ge(e),o=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(s=s[r[t]],!s)return;s[o]=i}else s[e]=i;return r.join(".")}
644
+ */function pe(t){return t.indexOf(".")>=0}function me(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function fe(t,e){return 0===t.indexOf(e+".")}function ve(t,e){return 0===e.indexOf(t+".")}function be(t,e,i){return e+i.slice(t.length)}function ge(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 ye(t){return Array.isArray(t)?ge(t).split("."):t.toString().split(".")}function we(t,e,i){let s=t,r=ye(e);for(let t=0;t<r.length;t++){if(!s)return;s=s[r[t]]}return i&&(i.path=r.join(".")),s}function _e(t,e,i){let s=t,r=ye(e),o=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(s=s[r[t]],!s)return;s[o]=i}else s[e]=i;return r.join(".")}
645
645
  /**
646
646
  @license
647
647
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -650,7 +650,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
650
650
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
651
651
  Code distributed by Google as part of the polymer project is also
652
652
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
653
- */const _e={},xe=/-[a-z]/g,ke=/([A-Z])/g;function Ce(t){return _e[t]||(_e[t]=t.indexOf("-")<0?t:t.replace(xe,(t=>t[1].toUpperCase())))}function Ae(t){return _e[t]||(_e[t]=t.replace(ke,"-$1").toLowerCase())}
653
+ */const xe={},ke=/-[a-z]/g,Ce=/([A-Z])/g;function Ae(t){return xe[t]||(xe[t]=t.indexOf("-")<0?t:t.replace(ke,(t=>t[1].toUpperCase())))}function Ee(t){return xe[t]||(xe[t]=t.replace(Ce,"-$1").toLowerCase())}
654
654
  /**
655
655
  @license
656
656
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -659,7 +659,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
659
659
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
660
660
  Code distributed by Google as part of the polymer project is also
661
661
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
662
- */let Ee=0,Te=0,De=[],Se=0,Me=!1,ze=document.createTextNode("");new window.MutationObserver((function(){Me=!1;const t=De.length;for(let e=0;e<t;e++){let t=De[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}De.splice(0,t),Te+=t})).observe(ze,{characterData:!0});const Ie={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)}},Pe={run:t=>(Me||(Me=!0,ze.textContent=Se++),De.push(t),Ee++),cancel(t){const e=t-Te;if(e>=0){if(!De[e])throw new Error("invalid async handle: "+t);De[e]=null}}},Oe=Pe,Be=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],r=this._shouldPropertyChange(t,e,s);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),r}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Oe.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,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,r=s&&s[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=ce(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}}})),Fe={};let Ne=HTMLElement.prototype;for(;Ne;){let t=Object.getOwnPropertyNames(Ne);for(let e=0;e<t.length;e++)Fe[t[e]]=!0;Ne=Object.getPrototypeOf(Ne)}const Le=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,$e=Zt((t=>{const e=Be(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ce(t[e]))}static attributeNameForProperty(t){return Ae(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(Le(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(!Fe[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)}}})),je={"dom-if":!0,"dom-repeat":!0};let Ve=!1,qe=!1;const Re=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function He(t){let e=t.getAttribute("is");if(e&&je[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];Re(t,i,e),i.removeAttribute(e)}}return t}function We(t,e){let i=e.parentInfo&&We(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 Ye(t,e,i,s){s.id&&(e[s.id]=i)}function Ge(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Ue(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const Qe=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,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,e,i)||s,function(t){(function(){if(!Ve){Ve=!0;const t=document.createElement("textarea");t.placeholder="a",qe=t.placeholder===t.textContent}return qe})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,r=t.firstChild,o=0;r;r=s){if("template"==r.localName&&(r=He(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let n={parentIndex:o,parentInfo:i};this._parseTemplateNode(r,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),r.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,r=this._parseTemplate(s,e);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,r=Array.from(t.attributes);for(let o,n=r.length-1;o=r[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,r){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let r=s.nodeList=new Array(i.length);s.$={};for(let t,o=0,n=i.length;o<n&&(t=i[o]);o++){let i=r[o]=We(s,t);Ye(0,s.$,i,t),Ue(0,i,t,e),Ge(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
662
+ */let Te=0,De=0,Se=[],Me=0,ze=!1,Ie=document.createTextNode("");new window.MutationObserver((function(){ze=!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),De+=t})).observe(Ie,{characterData:!0});const Pe={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)}},Oe={run:t=>(ze||(ze=!0,Ie.textContent=Me++),Se.push(t),Te++),cancel(t){const e=t-De;if(e>=0){if(!Se[e])throw new Error("invalid async handle: "+t);Se[e]=null}}},Be=Oe,Fe=te((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],r=this._shouldPropertyChange(t,e,s);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),r}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Be.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,r=s&&s[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=de(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}}})),Ne={};let Le=HTMLElement.prototype;for(;Le;){let t=Object.getOwnPropertyNames(Le);for(let e=0;e<t.length;e++)Ne[t[e]]=!0;Le=Object.getPrototypeOf(Le)}const $e=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,je=te((t=>{const e=Fe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ae(t[e]))}static attributeNameForProperty(t){return Ee(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){switch(typeof t){case"object":if(t instanceof Date)return t.toString();if(t){if($e(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(!Ne[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)}}})),Ve={"dom-if":!0,"dom-repeat":!0};let qe=!1,Re=!1;const He=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function We(t){let e=t.getAttribute("is");if(e&&Ve[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];He(t,i,e),i.removeAttribute(e)}}return t}function Ye(t,e){let i=e.parentInfo&&Ye(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 Ge(t,e,i,s){s.id&&(e[s.id]=i)}function Ue(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function Qe(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const Xe=te((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,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,e,i)||s,function(t){(function(){if(!qe){qe=!0;const t=document.createElement("textarea");t.placeholder="a",Re=t.placeholder===t.textContent}return Re})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,r=t.firstChild,o=0;r;r=s){if("template"==r.localName&&(r=We(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let n={parentIndex:o,parentInfo:i};this._parseTemplateNode(r,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),r.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,r=this._parseTemplate(s,e);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,r=Array.from(t.attributes);for(let o,n=r.length-1;o=r[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,r){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let r=s.nodeList=new Array(i.length);s.$={};for(let t,o=0,n=i.length;o<n&&(t=i[o]);o++){let i=r[o]=Ye(s,t);Ge(0,s.$,i,t),Qe(0,i,t,e),Ue(this,i,t)}return s=s,s}_addMethodEventListenerToNode(t,e,i,s){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
663
663
  /**
664
664
  * @fileoverview
665
665
  * @suppress {checkPrototypalTypes}
@@ -670,7 +670,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
670
670
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
671
671
  * Google as part of the polymer project is also subject to an additional IP
672
672
  * rights grant found at http://polymer.github.io/PATENTS.txt
673
- */let Xe=0;const Je=[],Ke={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ze=/[A-Z]/;function ti(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 ei(t,e,i,s,r,o){if(e){let n=!1;const a=Xe++;for(let h in i){let l=e[r?pe(h):h];if(l)for(let e,u=0,c=l.length;u<c&&(e=l[u]);u++)e.info&&e.info.lastRun===a||r&&!si(h,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,r,o),n=!0)}return n}return!1}function ii(t,e,i,s,r,o,n,a){let h=!1,l=e[n?pe(s):s];if(l)for(let e,u=0,c=l.length;u<c&&(e=l[u]);u++)e.info&&e.info.lastRun===i||n&&!si(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,n,a),h=!0);return h}function si(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!me(i,t))||!(!e.wildcard||!fe(i,t))}return!0}function ri(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,n=r.property;o?o.call(t,t.__data[n],s[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function oi(t,e,i){let s=pe(e);return s!==e&&(ni(t,Ae(s)+"-changed",i[e],e),!0)}function ni(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),ce(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function ai(t,e,i,s,r,o){let n=(o?pe(e):e)!=e?e:null,a=n?ye(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ni(t,r.eventName,a,n)}function hi(t,e,i,s,r){let o=t.__data[e];jt&&(o=jt(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const li=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const n=s+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){o=n;break}r=n-1}}o<0&&(o=r+1),e.splice(o,0,t)},ui=(t,e,i,s,r)=>{const o=e[r?pe(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun===Xe||r&&!si(t,n.trigger)||(n.info.lastRun=Xe,li(n.info,i,s))}};function ci(t,e,i,s,r){let o=gi(t,e,i,0,r);if(o===Je)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function di(t,e,i,s,r,o,n){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Ae(r)+"-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,pi(t,e,a,s,h)}}function pi(t,e,i,s,r){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 o=s.dependencies,n={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=ki(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:mi,info:n,trigger:s})}}}function mi(t,e,i,s,r,o,n){let a=n[r.index],h=r.binding,l=r.part;if(o&&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=ve(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,l,e,i,s,o);n!==Je&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),jt&&(r=jt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,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,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,h,l,n)}}function fi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=ce(t)),t[o]=e.literal)}}function vi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,n=t.detail,a=n&&n.path;a?(s=ve(i,s,a),o=n&&n.value):o=t.currentTarget[i],o=r?!o:o,e[Ke.READ_ONLY]&&e[Ke.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,o,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function bi(t,e,i,s,r,o){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:n,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function gi(t,e,i,s,r){let o=t._methodHost||t,n=o[r.methodName];if(n){let s=t._marshalArgs(r.args,e,i);return s===Je?Je:n.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const yi=[],wi=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 _i(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function xi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:yi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=ki(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function ki(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=pe(e),i.structured=de(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ci(t,e,i){let s=ye(t,i);return void 0===s&&(s=e[i]),s}function Ai(t,e,i,s){const r={indexSplices:s};Yt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Yt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ei(t,e,i,s,r,o){Ai(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const Ti=Zt((t=>{const e=Qe($e(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(Di.length){let t=Di[Di.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[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=ti(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ti(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,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||pe(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=ye(this,t);if(!(t=we(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 r;for(let o in s){let n=s[o];fe(o,e)?(r=ve(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):fe(n,e)&&(r=ve(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=ce(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&de(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,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[Ke.COMPUTE];if(r)if(Gt){Xe++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ke.COMPUTE];let s,{counts:r,ready:o,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ke.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&o.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)ui(t,r,n,o,s);let a;for(;a=n.shift();)ci(t,"",e,0,a)&&ui(a.methodInfo,r,n,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;ei(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),ei(this,this[Ke.REFLECT],e,i,r),ei(this,this[Ke.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,n,a=t[Ke.NOTIFY],h=Xe++;for(let n in e)e[n]&&(a&&ii(t,a,h,n,i,s,r)||r&&oi(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ke.PROPAGATE]&&ei(this,this[Ke.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{ei(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=be(t),e=be(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=be(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ai(this,ye(this,t,i),i.path,e)}get(t,e){return ye(e||this,t)}set(t,e,i){i?we(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=ye(this,t,i),r=s.length,o=s.push(...e);return e.length&&Ei(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=ye(this,t,e),s=Boolean(i.length),r=i.pop();return s&&Ei(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},n=ye(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||r.length)&&Ei(this,n,o.path,e,s.length,r),r}shift(t){let e={path:""},i=ye(this,t,e),s=Boolean(i.length),r=i.shift();return s&&Ei(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=ye(this,t,i),r=s.unshift(...e);return e.length&&Ei(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=ye(this,t,s),i=s.path}else i=Array.isArray(t)?be(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:ri,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ke.OBSERVE,{fn:ri,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=xi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");bi(this,i,Ke.OBSERVE,gi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ke.NOTIFY,{fn:ai,info:{eventName:Ae(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:hi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=xi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=bi(this,s,Ke.COMPUTE,ci,t,i);ti(this,"__computeInfo")[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:h,value:l,literal:u}=t[o];if(!u)if(h){const t=fe(n,e),r=Ci(s,i,t?e:n);l={path:t?e:n,value:r,base:t?ye(s,n):r}}else l=a?Ci(s,i,n):s[n];if(Yt&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Je;r[o]=l}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),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),Di.push(this);let i=super._stampTemplate(t,e);if(Di.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];fi(r,i),vi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];ce(ce(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=_i(e)||" ",di(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let n=this._parseBindings(o,i);if(n){let e=r,o="property";Ze.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let a=_i(n);return a&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=Ce(r)),di(this,i,s,o,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,n=s.templateInfo,a="dom-if"===o.localName;Ut&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,r=!1);let h=n.hostProps;if(Qt&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),Ut||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)di(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=wi.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],n=Boolean(i[2]),a=i[3].trim(),h=!1,l="",u=-1;"{"==o&&(u=a.indexOf("::"))>0&&(l=a.substring(u+2),a=a.substring(0,u),h=!0);let c=xi(a),d=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(d.push(i),c.dynamicFn=!0)}else d.push(a);s.push({source:a,mode:o,negate:n,customEvent:h,signature:c,dependencies:d,event:l}),r=wi.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let n;return n=e.signature?gi(t,i,s,0,e.signature):i!=e.source?ye(t,e.source):o&&de(i)?ye(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Di=[],Si=Zt((t=>{const e=Be(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?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=
673
+ */let Je=0;const Ke=[],Ze={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},ti=/[A-Z]/;function ei(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 ii(t,e,i,s,r,o){if(e){let n=!1;const a=Je++;for(let h in i){let l=e[r?me(h):h];if(l)for(let e,u=0,c=l.length;u<c&&(e=l[u]);u++)e.info&&e.info.lastRun===a||r&&!ri(h,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,r,o),n=!0)}return n}return!1}function si(t,e,i,s,r,o,n,a){let h=!1,l=e[n?me(s):s];if(l)for(let e,u=0,c=l.length;u<c&&(e=l[u]);u++)e.info&&e.info.lastRun===i||n&&!ri(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,n,a),h=!0);return h}function ri(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!fe(i,t))||!(!e.wildcard||!ve(i,t))}return!0}function oi(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,n=r.property;o?o.call(t,t.__data[n],s[n]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function ni(t,e,i){let s=me(e);return s!==e&&(ai(t,Ee(s)+"-changed",i[e],e),!0)}function ai(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),de(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function hi(t,e,i,s,r,o){let n=(o?me(e):e)!=e?e:null,a=n?we(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ai(t,r.eventName,a,n)}function li(t,e,i,s,r){let o=t.__data[e];Vt&&(o=Vt(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const ui=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const n=s+r>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){o=n;break}r=n-1}}o<0&&(o=r+1),e.splice(o,0,t)},ci=(t,e,i,s,r)=>{const o=e[r?me(t):t];if(o)for(let e=0;e<o.length;e++){const n=o[e];n.info.lastRun===Je||r&&!ri(t,n.trigger)||(n.info.lastRun=Je,ui(n.info,i,s))}};function di(t,e,i,s,r){let o=yi(t,e,i,0,r);if(o===Ke)return!1;let n=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,o,!0):(t[n]=o,!1)}function pi(t,e,i,s,r,o,n){i.bindings=i.bindings||[];let a={kind:s,target:r,parts:o,literal:n,isCompound:1!==o.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Ee(r)+"-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,mi(t,e,a,s,h)}}function mi(t,e,i,s,r){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 o=s.dependencies,n={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=Ci(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:fi,info:n,trigger:s})}}}function fi(t,e,i,s,r,o,n){let a=n[r.index],h=r.binding,l=r.part;if(o&&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=be(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=r.evaluator._evaluateBinding(t,l,e,i,s,o);n!==Ke&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),Vt&&(r=Vt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[Ze.READ_ONLY]&&e[Ze.READ_ONLY][s]||e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,a,h,l,n)}}function vi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=de(t)),t[o]=e.literal)}}function bi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,n=t.detail,a=n&&n.path;a?(s=be(i,s,a),o=n&&n.value):o=t.currentTarget[i],o=r?!o:o,e[Ze.READ_ONLY]&&e[Ze.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,o,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function gi(t,e,i,s,r,o){let n={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:n,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function yi(t,e,i,s,r){let o=t._methodHost||t,n=o[r.methodName];if(n){let s=t._marshalArgs(r.args,e,i);return s===Ke?Ke:n.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const wi=[],_i=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 xi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function ki(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:wi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ci(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Ci(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=me(e),i.structured=pe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Ai(t,e,i){let s=we(t,i);return void 0===s&&(s=e[i]),s}function Ei(t,e,i,s){const r={indexSplices:s};Gt&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),Gt&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function Ti(t,e,i,s,r,o){Ei(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const Di=te((t=>{const e=Xe(je(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ze}_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[Ze.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==Ze.READ_ONLY);let s=ei(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=ei(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ze.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ze.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ze.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ze.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||me(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=we(this,t);if(!(t=_e(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let n=s[o];ve(o,e)?(r=be(o,n,e),t._setPendingPropertyOrPath(r,i,!0,!0)):ve(n,e)&&(r=be(n,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=de(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&pe(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[Ze.NOTIFY]&&this[Ze.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[Ze.READ_ONLY]&&this[Ze.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,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[Ze.COMPUTE];if(r)if(Ut){Je++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ze.COMPUTE];let s,{counts:r,ready:o,total:n}=function(t){const e=t.__computeInfo,i={},s=t[Ze.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--r[e]&&o.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)ci(t,r,n,o,s);let a;for(;a=n.shift();)di(t,"",e,0,a)&&ci(a.methodInfo,r,n,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;ii(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),ii(this,this[Ze.REFLECT],e,i,r),ii(this,this[Ze.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,n,a=t[Ze.NOTIFY],h=Je++;for(let n in e)e[n]&&(a&&si(t,a,h,n,i,s,r)||r&&ni(t,n,i))&&(o=!0);o&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ze.PROPAGATE]&&ii(this,this[Ze.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{ii(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=ge(t),e=ge(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=ge(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ei(this,we(this,t,i),i.path,e)}get(t,e){return we(e||this,t)}set(t,e,i){i?_e(i,t,e):this[Ze.READ_ONLY]&&this[Ze.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=we(this,t,i),r=s.length,o=s.push(...e);return e.length&&Ti(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=we(this,t,e),s=Boolean(i.length),r=i.pop();return s&&Ti(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},n=we(this,t,o);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||r.length)&&Ti(this,n,o.path,e,s.length,r),r}shift(t){let e={path:""},i=we(this,t,e),s=Boolean(i.length),r=i.shift();return s&&Ti(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=we(this,t,i),r=s.unshift(...e);return e.length&&Ti(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=we(this,t,s),i=s.path}else i=Array.isArray(t)?ge(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,Ze.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,Ze.OBSERVE,{fn:oi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ze.OBSERVE,{fn:oi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=ki(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");gi(this,i,Ze.OBSERVE,yi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ze.NOTIFY,{fn:hi,info:{eventName:Ee(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ze.REFLECT,{fn:li,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=ki(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=gi(this,s,Ze.COMPUTE,di,t,i);ei(this,"__computeInfo")[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,n=t.length;o<n;o++){let{name:n,structured:a,wildcard:h,value:l,literal:u}=t[o];if(!u)if(h){const t=ve(n,e),r=Ai(s,i,t?e:n);l={path:t?e:n,value:r,base:t?we(s,n):r}}else l=a?Ai(s,i,n):s[n];if(Gt&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Ke;r[o]=l}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),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 r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];vi(r,i),bi(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];de(de(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=xi(e)||" ",pi(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let n=this._parseBindings(o,i);if(n){let e=r,o="property";ti.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let a=xi(n);return a&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(r)),t.setAttribute(r,a)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=Ae(r)),pi(this,i,s,o,r,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,n=s.templateInfo,a="dom-if"===o.localName;Qt&&(a||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,r=!1);let h=n.hostProps;if(Xt&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),Qt||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)pi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=_i.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],n=Boolean(i[2]),a=i[3].trim(),h=!1,l="",u=-1;"{"==o&&(u=a.indexOf("::"))>0&&(l=a.substring(u+2),a=a.substring(0,u),h=!0);let c=ki(a),d=[];if(c){let{args:t,methodName:i}=c;for(let e=0;e<t.length;e++){let i=t[e];i.literal||d.push(i)}let s=e.dynamicFns;(s&&s[i]||c.static)&&(d.push(i),c.dynamicFn=!0)}else d.push(a);s.push({source:a,mode:o,negate:n,customEvent:h,signature:c,dependencies:d,event:l}),r=_i.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let n;return n=e.signature?yi(t,i,s,0,e.signature):i!=e.source?we(t,e.source):o&&pe(i)?we(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Si=[],Mi=te((t=>{const e=Fe(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?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=
674
674
  /**
675
675
  @license
676
676
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -680,7 +680,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
680
680
  Code distributed by Google as part of the polymer project is also
681
681
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
682
682
  */
683
- 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 r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=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 r})),Mi=window.ShadyCSS&&window.ShadyCSS.cssBuild,zi=Zt((t=>{const e=Si(Ti(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):Rt||(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&&(!Vt||qt)&&(e=re.import(t,"template"),Vt&&!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=Ft(t.url);else{const t=re.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=$t,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 Bt(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(!Mi){const r=e.content.querySelectorAll("style"),o=le(e),n=function(t){let e=oe(t);return e?ue(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let r=n[i];r.textContent=t._processStyleText(r.textContent,s),e.content.insertBefore(r,a)}let h=0;for(let e=0;e<o.length;e++){let i=o[e],n=r[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&&Mi&&Lt){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?Ot(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=ce(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Wt&&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=Ot(this.importPath)),Ot(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)}}})),Ii=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Pi{constructor(t,e){Fi(t,e);const i=e.reduce(((e,i,s)=>e+Oi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Oi(t){if(t instanceof Pi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Bi=function(t,...e){Fi(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 Pi)return Oi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ii&&(s=Ii.createHTML(s)),i.innerHTML=s,i},Fi=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Ni=zi(HTMLElement),Li=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()}}));
683
+ 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 r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=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 r})),zi=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ii=te((t=>{const e=Mi(Di(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):Ht||(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&&(!qt||Rt)&&(e=oe.import(t,"template"),qt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Nt(t.url);else{const t=oe.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=jt,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 Ft(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(!zi){const r=e.content.querySelectorAll("style"),o=ue(e),n=function(t){let e=ne(t);return e?ce(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let r=n[i];r.textContent=t._processStyleText(r.textContent,s),e.content.insertBefore(r,a)}let h=0;for(let e=0;e<o.length;e++){let i=o[e],n=r[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),Kt&&zi&&$t){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?Bt(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=de(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])),Yt&&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=Bt(this.importPath)),Bt(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!Wt||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)}}})),Pi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Oi{constructor(t,e){Ni(t,e);const i=e.reduce(((e,i,s)=>e+Bi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Bi(t){if(t instanceof Oi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Fi=function(t,...e){Ni(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 Oi)return Bi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Pi&&(s=Pi.createHTML(s)),i.innerHTML=s,i},Ni=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},Li=Ii(HTMLElement),$i=te((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()}}));
684
684
  /**
685
685
  * @license
686
686
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -690,22 +690,22 @@ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{t
690
690
  * Code distributed by Google as part of the polymer project is also
691
691
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
692
692
  */
693
- let $i=0,ji=0;const Vi=[];let qi=0,Ri=!1;const Hi=document.createTextNode("");new window.MutationObserver((function(){Ri=!1;const t=Vi.length;for(let e=0;e<t;e++){const t=Vi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Vi.splice(0,t),ji+=t})).observe(Hi,{characterData:!0});const Wi={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)}},Yi={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Gi={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Ui={run(t){Ri||(Ri=!0,Hi.textContent=qi,qi+=1),Vi.push(t);const e=$i;return $i+=1,e},cancel(t){const e=t-ji;if(e>=0){if(!Vi[e])throw new Error(`invalid async handle: ${t}`);Vi[e]=null}}},Qi="string"==typeof document.head.style.touchAction,Xi="__polymerGesturesHandled",Ji="__polymerGesturesTouchAction",Ki=["mousedown","mousemove","mouseup","click"],Zi=[0,1,4,2],ts=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function es(t){return Ki.indexOf(t)>-1}let is=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){is=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const ss=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),rs={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function os(t){const e=t.type;if(!es(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!ts&&(e=Zi[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const ns={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function as(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function hs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const ls=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],us={},cs=[];function ds(t){const e=ls(t);return e.length>0?e[0]:t.target}function ps(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Xi]&&(t[Xi]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(ns.touch.id=i.identifier),ns.touch.id!==i.identifier)return;Qi||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)ns.touch.x=e.clientX,ns.touch.y=e.clientY,ns.touch.scrollDecided=!1;else if("touchmove"===i){if(ns.touch.scrollDecided)return;ns.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=ls(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Ji]){e=t[Ji];break}return e}(t);let s=!1;const r=Math.abs(ns.touch.x-e.clientX),o=Math.abs(ns.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():gs("track")}}(t)}const r=t[Xi];if(!r.skip){for(let e,i=0;i<cs.length;i++)e=cs[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<cs.length;o++)i=cs[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function ms(t,e,i){return!!us[e]&&(function(t,e,i){const s=us[e],r=s.deps,o=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<r.length;s++)e=r[s],ss&&es(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,ps,void es(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&vs(t,s.touchAction)}(t,e,i),!0)}function fs(t){cs.push(t);for(let e=0;e<t.emits.length;e++)us[t.emits[e]]=t}function vs(t,e){Qi&&t instanceof HTMLElement&&Ui.run((()=>{t.style.touchAction=e})),t[Ji]=e}function bs(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 gs(t){const e=function(t){for(let e,i=0;i<cs.length;i++){e=cs[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 ys(t,e,i,s){e&&bs(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>gs(t)})}function ws(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function _s(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,n=0;s&&(o=r.x-s.x,n=r.y-s.y),bs(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function xs(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),o=ds(i||e);!o||rs[o.localName]&&o.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=ds(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||bs(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
693
+ let ji=0,Vi=0;const qi=[];let Ri=0,Hi=!1;const Wi=document.createTextNode("");new window.MutationObserver((function(){Hi=!1;const t=qi.length;for(let e=0;e<t;e++){const t=qi[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}qi.splice(0,t),Vi+=t})).observe(Wi,{characterData:!0});const Yi={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)}},Gi={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},Ui={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},Qi={run(t){Hi||(Hi=!0,Wi.textContent=Ri,Ri+=1),qi.push(t);const e=ji;return ji+=1,e},cancel(t){const e=t-Vi;if(e>=0){if(!qi[e])throw new Error(`invalid async handle: ${t}`);qi[e]=null}}},Xi="string"==typeof document.head.style.touchAction,Ji="__polymerGesturesHandled",Ki="__polymerGesturesTouchAction",Zi=["mousedown","mousemove","mouseup","click"],ts=[0,1,4,2],es=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function is(t){return Zi.indexOf(t)>-1}let ss=!1;!function(){try{const t=Object.defineProperty({},"passive",{get(){ss=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const rs=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),os={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ns(t){const e=t.type;if(!is(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!es&&(e=ts[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const as={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function hs(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function ls(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const us=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],cs={},ds=[];function ps(t){const e=us(t);return e.length>0?e[0]:t.target}function ms(t){const e=t.type,i=t.currentTarget.__polymerGestures;if(!i)return;const s=i[e];if(!s)return;if(!t[Ji]&&(t[Ji]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(as.touch.id=i.identifier),as.touch.id!==i.identifier)return;Xi||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)as.touch.x=e.clientX,as.touch.y=e.clientY,as.touch.scrollDecided=!1;else if("touchmove"===i){if(as.touch.scrollDecided)return;as.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=us(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Ki]){e=t[Ki];break}return e}(t);let s=!1;const r=Math.abs(as.touch.x-e.clientX),o=Math.abs(as.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():ys("track")}}(t)}const r=t[Ji];if(!r.skip){for(let e,i=0;i<ds.length;i++)e=ds[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<ds.length;o++)i=ds[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function fs(t,e,i){return!!cs[e]&&(function(t,e,i){const s=cs[e],r=s.deps,o=s.name;let n=t.__polymerGestures;n||(t.__polymerGestures=n={});for(let e,i,s=0;s<r.length;s++)e=r[s],rs&&is(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,ms,void is(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&bs(t,s.touchAction)}(t,e,i),!0)}function vs(t){ds.push(t);for(let e=0;e<t.emits.length;e++)cs[t.emits[e]]=t}function bs(t,e){Xi&&t instanceof HTMLElement&&Qi.run((()=>{t.style.touchAction=e})),t[Ki]=e}function gs(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 ys(t){const e=function(t){for(let e,i=0;i<ds.length;i++){e=ds[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 ws(t,e,i,s){e&&gs(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>ys(t)})}function _s(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function xs(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,n=0;s&&(o=r.x-s.x,n=r.y-s.y),gs(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function ks(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),o=ps(i||e);!o||os[o.localName]&&o.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=ps(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||gs(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
694
694
  /**
695
695
  * @license
696
696
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
697
697
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
698
- */fs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){hs(this.info)},mousedown(t){if(!os(t))return;const e=ds(t),i=this;as(this.info,(t=>{os(t)||(ys("up",e,t),hs(i.info))}),(t=>{os(t)&&ys("up",e,t),hs(i.info)})),ys("down",e,t)},touchstart(t){ys("down",ds(t),t.changedTouches[0],t)},touchend(t){ys("up",ds(t),t.changedTouches[0],t)}}),fs({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,hs(this.info)},mousedown(t){if(!os(t))return;const e=ds(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;ws(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&gs("tap"),i.info.addMove({x:s,y:r}),os(t)||(i.info.state="end",hs(i.info)),e&&_s(i.info,e,t),i.info.started=!0)};as(this.info,s,(t=>{i.info.started&&s(t),hs(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=ds(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;ws(this.info,s,r)&&("start"===this.info.state&&gs("tap"),this.info.addMove({x:s,y:r}),_s(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=ds(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),_s(this.info,e,i))}}),fs({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){os(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){os(t)&&xs(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){xs(this.info,t.changedTouches[0],t)}});const ks=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){}})),Cs=t=>class extends(Li(ks(t))){get _activeKeys(){return[" "]}ready(){super.ready(),ms(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),ms(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)}}
698
+ */vs({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){ls(this.info)},mousedown(t){if(!ns(t))return;const e=ps(t),i=this;hs(this.info,(t=>{ns(t)||(ws("up",e,t),ls(i.info))}),(t=>{ns(t)&&ws("up",e,t),ls(i.info)})),ws("down",e,t)},touchstart(t){ws("down",ps(t),t.changedTouches[0],t)},touchend(t){ws("up",ps(t),t.changedTouches[0],t)}}),vs({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,ls(this.info)},mousedown(t){if(!ns(t))return;const e=ps(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;_s(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&ys("tap"),i.info.addMove({x:s,y:r}),ns(t)||(i.info.state="end",ls(i.info)),e&&xs(i.info,e,t),i.info.started=!0)};hs(this.info,s,(t=>{i.info.started&&s(t),ls(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=ps(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;_s(this.info,s,r)&&("start"===this.info.state&&ys("tap"),this.info.addMove({x:s,y:r}),xs(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=ps(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),xs(this.info,e,i))}}),vs({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){ns(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){ns(t)&&ks(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){ks(this.info,t.changedTouches[0],t)}});const Cs=te((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){}})),As=t=>class extends($i(Cs(t))){get _activeKeys(){return[" "]}ready(){super.ready(),fs(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),fs(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)}}
699
699
  /**
700
700
  * @license
701
701
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
702
702
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
703
- */,As=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)}})),Es=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ts=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
703
+ */,Es=te((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)}})),Ts=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Ds=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
704
704
  /**
705
705
  * @license
706
706
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
707
707
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
708
- */function Ds(t,e){if("function"!=typeof t)return;const i=Es.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 Ss(){}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&&(Ts?!(Ts&&Object.keys(Ts).map((t=>Ts[t])).filter((t=>t.productionMode)).length>0):!Ds((function(){return!0})))}catch(t){return!1}}());
708
+ */function Ss(t,e){if("function"!=typeof t)return;const i=Ts.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 Ms(){}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&&(Ds?!(Ds&&Object.keys(Ds).map((t=>Ds[t])).filter((t=>t.productionMode)).length>0):!Ss((function(){return!0})))}catch(t){return!1}}());
709
709
  /**
710
710
  @license
711
711
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -715,22 +715,22 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
715
715
  Code distributed by Google as part of the polymer project is also
716
716
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
717
717
  */
718
- class Ms{static debounce(t,e,i){return t instanceof Ms?t._cancelAsync():t=new Ms,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,zs.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),zs.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 zs=new Set;function Is(t){zs.add(t)}function Ps(){const t=Boolean(zs.size);return zs.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const Os=()=>{let t;do{t=Ps()}while(t)};
718
+ class zs{static debounce(t,e,i){return t instanceof zs?t._cancelAsync():t=new zs,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,Is.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Is.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 Is=new Set;function Ps(t){Is.add(t)}function Os(){const t=Boolean(Is.size);return Is.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const Bs=()=>{let t;do{t=Os()}while(t)};
719
719
  /**
720
720
  * @license
721
721
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
722
722
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
723
- */class Bs{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}}
723
+ */class Fs{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}}
724
724
  /**
725
725
  * @license
726
726
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
727
727
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
728
- */const Fs=[];let Ns;function Ls(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function $s(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=$s();Fs.forEach((e=>{Ls(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const js=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(),Ns||(Ns=Bs.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),Ls(this,$s(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=$s(),r=i===s&&-1===Fs.indexOf(this),o=!i&&e&&-1===Fs.indexOf(this),n=i!==s&&e===s;r||o?(this.__subscribe(),Ls(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Fs.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(){Fs.includes(this)||Fs.push(this)}__unsubscribe(){Fs.includes(this)&&Fs.splice(Fs.indexOf(this),1)}__getNormalizedScrollLeft(t){return Bs.getNormalizedScrollLeft(Ns,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Bs.setNormalizedScrollLeft(Ns,this.getAttribute("dir")||"ltr",t,e)}}
728
+ */const Ns=[];let Ls;function $s(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function js(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=js();Ns.forEach((e=>{$s(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Vs=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(),Ls||(Ls=Fs.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),$s(this,js(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=js(),r=i===s&&-1===Ns.indexOf(this),o=!i&&e&&-1===Ns.indexOf(this),n=i!==s&&e===s;r||o?(this.__subscribe(),$s(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Ns.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(){Ns.includes(this)||Ns.push(this)}__unsubscribe(){Ns.includes(this)&&Ns.splice(Ns.indexOf(this),1)}__getNormalizedScrollLeft(t){return Fs.getNormalizedScrollLeft(Ls,this.getAttribute("dir")||"ltr",t)}__setNormalizedScrollLeft(t,e){return Fs.setNormalizedScrollLeft(Ls,this.getAttribute("dir")||"ltr",t,e)}}
729
729
  /**
730
730
  * @license
731
731
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
732
732
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
733
- */;let Vs;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)Ds(t,e)}(Ss)};const qs=new Set,Rs=t=>class extends(js(t)){static get version(){return"23.3.19"}static finalize(){super.finalize();const{is:t}=this;t&&!qs.has(t)&&(window.Vaadin.registrations.push(this),qs.add(t),window.Vaadin.developmentModeCallback&&(Vs=Ms.debounce(Vs,Gi,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Is(Vs)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
733
+ */;let qs;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)Ss(t,e)}(Ms)};const Rs=new Set,Hs=t=>class extends(Vs(t)){static get version(){return"23.3.25"}static finalize(){super.finalize();const{is:t}=this;t&&!Rs.has(t)&&(window.Vaadin.registrations.push(this),Rs.add(t),window.Vaadin.developmentModeCallback&&(qs=zs.debounce(qs,Ui,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),Ps(qs)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
734
734
  /**
735
735
  @license
736
736
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -739,7 +739,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
739
739
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
740
740
  Code distributed by Google as part of the polymer project is also
741
741
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
742
- */;function Hs(t,e,i){return{index:t,removed:e,addedCount:i}}function Ws(t,e){return t===e}
742
+ */;function Ws(t,e,i){return{index:t,removed:e,addedCount:i}}function Ys(t,e){return t===e}
743
743
  /**
744
744
  @license
745
745
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -748,38 +748,38 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
748
748
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
749
749
  Code distributed by Google as part of the polymer project is also
750
750
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
751
- */function Ys(t){return"slot"===t.localName}let Gs=class{static getFlattenedNodes(t){const e=ce(t);return Ys(t)?(t=t,e.assignedNodes({flatten:!0})):Array.from(e.childNodes).map((t=>Ys(t)?ce(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(){Ys(this._target)?this._listenSlots([this._target]):ce(this._target).children&&(this._listenSlots(ce(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(){Ys(this._target)?this._unlistenSlots([this._target]):ce(this._target).children&&(this._unlistenSlots(ce(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,Pe.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,r,o){let n,a=0,h=0,l=Math.min(i-e,o-r);if(0==e&&0==r&&(a=function(t,e,i){for(let s=0;s<i;s++)if(!Ws(t[s],e[s]))return s;return i}(t,s,l)),i==t.length&&o==s.length&&(h=function(t,e,i){let s=t.length,r=e.length,o=0;for(;o<i&&Ws(t[--s],e[--r]);)o++;return o}(t,s,l-a)),r+=a,o-=h,(i-=h)-(e+=a)==0&&o-r==0)return[];if(e==i){for(n=Hs(e,[],0);r<o;)n.removed.push(s[r++]);return[n]}if(r==o)return[Hs(e,[],i-e)];let u=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i],r=[];for(;e>0||i>0;){if(0==e){r.push(2),i--;continue}if(0==i){r.push(3),e--;continue}let o,n=t[e-1][i-1],a=t[e-1][i],h=t[e][i-1];o=a<h?a<n?a:n:h<n?h:n,o==n?(n==s?r.push(0):(r.push(1),s=n),e--,i--):o==a?(r.push(3),e--,s=a):(r.push(2),i--,s=h)}return r.reverse(),r}(function(t,e,i,s,r,o){let n=o-r+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 o=1;o<a;o++)if(Ws(t[e+o-1],s[r+i-1]))h[i][o]=h[i-1][o-1];else{let t=h[i-1][o]+1,e=h[i][o-1]+1;h[i][o]=t<e?t:e}return h}(t,e,i,s,r,o));n=void 0;let c=[],d=e,p=r;for(let t=0;t<u.length;t++)switch(u[t]){case 0:n&&(c.push(n),n=void 0),d++,p++;break;case 1:n||(n=Hs(d,[],0)),n.addedCount++,d++,n.removed.push(s[p]),p++;break;case 2:n||(n=Hs(d,[],0)),n.addedCount++,d++;break;case 3:n||(n=Hs(d,[],0)),n.removed.push(s[p]),p++}return n&&c.push(n),c}(s=e,0,s.length,r=this._effectiveNodes,0,r.length);var s,r;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,r=0;r<i.length&&(s=i[r]);r++)for(let i=s.index;i<s.index+s.addedCount;i++)t.addedNodes.push(e[i]);this._effectiveNodes=e;let o=!1;return(t.addedNodes.length||t.removedNodes.length)&&(o=!0,this.callback.call(this._target,t)),o}_listenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Ys(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Ys(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}},Us=0;
751
+ */function Gs(t){return"slot"===t.localName}let Us=class{static getFlattenedNodes(t){const e=de(t);return Gs(t)?(t=t,e.assignedNodes({flatten:!0})):Array.from(e.childNodes).map((t=>Gs(t)?de(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(){Gs(this._target)?this._listenSlots([this._target]):de(this._target).children&&(this._listenSlots(de(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(){Gs(this._target)?this._unlistenSlots([this._target]):de(this._target).children&&(this._unlistenSlots(de(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,Oe.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,r,o){let n,a=0,h=0,l=Math.min(i-e,o-r);if(0==e&&0==r&&(a=function(t,e,i){for(let s=0;s<i;s++)if(!Ys(t[s],e[s]))return s;return i}(t,s,l)),i==t.length&&o==s.length&&(h=function(t,e,i){let s=t.length,r=e.length,o=0;for(;o<i&&Ys(t[--s],e[--r]);)o++;return o}(t,s,l-a)),r+=a,o-=h,(i-=h)-(e+=a)==0&&o-r==0)return[];if(e==i){for(n=Ws(e,[],0);r<o;)n.removed.push(s[r++]);return[n]}if(r==o)return[Ws(e,[],i-e)];let u=function(t){let e=t.length-1,i=t[0].length-1,s=t[e][i],r=[];for(;e>0||i>0;){if(0==e){r.push(2),i--;continue}if(0==i){r.push(3),e--;continue}let o,n=t[e-1][i-1],a=t[e-1][i],h=t[e][i-1];o=a<h?a<n?a:n:h<n?h:n,o==n?(n==s?r.push(0):(r.push(1),s=n),e--,i--):o==a?(r.push(3),e--,s=a):(r.push(2),i--,s=h)}return r.reverse(),r}(function(t,e,i,s,r,o){let n=o-r+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 o=1;o<a;o++)if(Ys(t[e+o-1],s[r+i-1]))h[i][o]=h[i-1][o-1];else{let t=h[i-1][o]+1,e=h[i][o-1]+1;h[i][o]=t<e?t:e}return h}(t,e,i,s,r,o));n=void 0;let c=[],d=e,p=r;for(let t=0;t<u.length;t++)switch(u[t]){case 0:n&&(c.push(n),n=void 0),d++,p++;break;case 1:n||(n=Ws(d,[],0)),n.addedCount++,d++,n.removed.push(s[p]),p++;break;case 2:n||(n=Ws(d,[],0)),n.addedCount++,d++;break;case 3:n||(n=Ws(d,[],0)),n.removed.push(s[p]),p++}return n&&c.push(n),c}(s=e,0,s.length,r=this._effectiveNodes,0,r.length);var s,r;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,r=0;r<i.length&&(s=i[r]);r++)for(let i=s.index;i<s.index+s.addedCount;i++)t.addedNodes.push(e[i]);this._effectiveNodes=e;let o=!1;return(t.addedNodes.length||t.removedNodes.length)&&(o=!0,this.callback.call(this._target,t)),o}_listenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Gs(i)&&i.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let i=t[e];Gs(i)&&i.removeEventListener("slotchange",this._boundSchedule)}}},Qs=0;
752
752
  /**
753
753
  * @license
754
754
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
755
755
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
756
- */function Qs(){return Us++}
756
+ */function Xs(){return Qs++}
757
757
  /**
758
758
  * @license
759
759
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
760
760
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
761
- */class Xs extends EventTarget{static generateId(t,e){return`${t||"default"}-${e.localName}-${Qs()}`}constructor(t,e,i,s,r){super(),this.host=t,this.slotName=e,this.slotFactory=i,this.slotInitializer=s,r&&(this.defaultId=Xs.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 Gs(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)))}))}}
761
+ */class Js extends EventTarget{static generateId(t,e){return`${t||"default"}-${e.localName}-${Xs()}`}constructor(t,e,i,s,r){super(),this.host=t,this.slotName=e,this.slotFactory=i,this.slotInitializer=s,r&&(this.defaultId=Js.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 Us(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)))}))}}
762
762
  /**
763
763
  * @license
764
764
  * Copyright (c) 2022 Vaadin Ltd.
765
765
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
766
- */class Js extends Xs{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)}}
766
+ */class Ks extends Js{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)}}
767
767
  /**
768
768
  * @license
769
769
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
770
770
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
771
- */let Ks=!1;function Zs(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 tr(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;)Zs(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(tr(t.slice(0,i)),tr(t.slice(i)))}function er(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 r=s>0;s>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{r=er(t,e)||r})),r}function ir(t){return t.getRootNode().activeElement===t}window.addEventListener("keydown",(()=>{Ks=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Ks=!1}),{capture:!0});
771
+ */let Zs=!1;function tr(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 er(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;)tr(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(er(t.slice(0,i)),er(t.slice(i)))}function ir(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 r=s>0;s>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{r=ir(t,e)||r})),r}function sr(t){return t.getRootNode().activeElement===t}window.addEventListener("keydown",(()=>{Zs=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{Zs=!1}),{capture:!0});
772
772
  /**
773
773
  * @license
774
774
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
775
775
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
776
776
  */
777
- const 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)}})),rr=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}})),or=Zt((t=>class extends(sr(Li(rr(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){const e=t.target;this._toggleChecked(e.checked),ir(e)||e.focus()}_toggleChecked(t){this.checked=t}})),nr=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}})),ar=t=>class extends(Li(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)}}
777
+ const rr=te((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)}})),or=te((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}})),nr=te((t=>class extends(rr($i(or(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){const e=t.target;this._toggleChecked(e.checked),sr(e)||e.focus()}_toggleChecked(t){this.checked=t}})),ar=te((t=>class extends t{get _keyboardActive(){return Zs}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}})),hr=t=>class extends($i(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)}}
778
778
  /**
779
779
  * @license
780
780
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
781
781
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
782
- */,hr=Zt((t=>class extends(nr(ar(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)}}));
782
+ */,lr=te((t=>class extends(ar(hr(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)}}));
783
783
  /**
784
784
  * @license
785
785
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
@@ -790,32 +790,32 @@ const sr=Zt((t=>class extends t{static get properties(){return{stateTarget:{type
790
790
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
791
791
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
792
792
  */
793
- class lr extends Xs{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)}}
793
+ class ur extends Js{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)}}
794
794
  /**
795
795
  * @license
796
796
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
797
797
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
798
- */class ur extends Xs{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)}}
798
+ */class cr extends Js{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)}}
799
799
  /**
800
800
  * @license
801
801
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
802
802
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
803
- */const cr=Zt((t=>class extends(As(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 ur(this)}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
803
+ */const dr=te((t=>class extends(Es(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 cr(this)}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}}));
804
804
  /**
805
805
  * @license
806
806
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
807
807
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
808
- */class dr{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)}}
808
+ */class pr{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)}}
809
809
  /**
810
810
  * @license
811
811
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
812
812
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
813
- */class pr{constructor(t,e,i){this.sourceSlot=t,this.targetFactory=e,this.copyCallback=i,t&&t.addEventListener("slotchange",(()=>{this.__copying?this.__copying=!1:this.__checkAndCopyNodesToSlotTarget()}))}hostConnected(){this.__sourceSlotObserver=new MutationObserver((()=>this.__checkAndCopyNodesToSlotTarget())),this.__copying||this.__checkAndCopyNodesToSlotTarget()}__checkAndCopyNodesToSlotTarget(){this.__sourceSlotObserver.disconnect();const t=this.targetFactory();if(!t)return;this.__slotTargetClones&&(this.__slotTargetClones.forEach((e=>{e.parentElement===t&&t.removeChild(e)})),delete this.__slotTargetClones);const e=this.sourceSlot.assignedNodes({flatten:!0}).filter((t=>!(t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim())));e.length>0&&(t.innerHTML="",this.__copying=!0,this.__copyNodesToSlotTarget(e,t))}__copyNodesToSlotTarget(t,e){this.__slotTargetClones=this.__slotTargetClones||[],t.forEach((t=>{const i=t.cloneNode(!0);this.__slotTargetClones.push(i),e.appendChild(i),this.__sourceSlotObserver.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0})})),"function"==typeof this.copyCallback&&this.copyCallback(t)}}
813
+ */class mr{constructor(t,e,i){this.sourceSlot=t,this.targetFactory=e,this.copyCallback=i,t&&t.addEventListener("slotchange",(()=>{this.__copying?this.__copying=!1:this.__checkAndCopyNodesToSlotTarget()}))}hostConnected(){this.__sourceSlotObserver=new MutationObserver((()=>this.__checkAndCopyNodesToSlotTarget())),this.__copying||this.__checkAndCopyNodesToSlotTarget()}__checkAndCopyNodesToSlotTarget(){this.__sourceSlotObserver.disconnect();const t=this.targetFactory();if(!t)return;this.__slotTargetClones&&(this.__slotTargetClones.forEach((e=>{e.parentElement===t&&t.removeChild(e)})),delete this.__slotTargetClones);const e=this.sourceSlot.assignedNodes({flatten:!0}).filter((t=>!(t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim())));e.length>0&&(t.innerHTML="",this.__copying=!0,this.__copyNodesToSlotTarget(e,t))}__copyNodesToSlotTarget(t,e){this.__slotTargetClones=this.__slotTargetClones||[],t.forEach((t=>{const i=t.cloneNode(!0);this.__slotTargetClones.push(i),e.appendChild(i),this.__sourceSlotObserver.observe(t,{attributes:!0,childList:!0,subtree:!0,characterData:!0})})),"function"==typeof this.copyCallback&&this.copyCallback(t)}}
814
814
  /**
815
815
  * @license
816
816
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
817
817
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
818
- */class mr extends(cr(or(hr(Cs(Rs(bt(As(Ni)))))))){static get is(){return"vaadin-checkbox"}static get template(){return Bi`
818
+ */class fr extends(dr(nr(lr(As(Hs(gt(Es(Li)))))))){static get is(){return"vaadin-checkbox"}static get template(){return Fi`
819
819
  <style>
820
820
  :host {
821
821
  display: inline-block;
@@ -865,6 +865,8 @@ class lr extends Xs{constructor(t,e){super(t,"input",(()=>document.createElement
865
865
  margin: 0;
866
866
  align-self: stretch;
867
867
  -webkit-appearance: none;
868
+ width: initial;
869
+ height: initial;
868
870
  }
869
871
  </style>
870
872
  <div class="vaadin-checkbox-container">
@@ -877,13 +879,13 @@ class lr extends Xs{constructor(t,e){super(t,"input",(()=>document.createElement
877
879
  </div>
878
880
  </div>
879
881
  <slot name="tooltip"></slot>
880
- `}static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""}}}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("checkbox"),this.value="on"}ready(){super.ready(),this.addController(new lr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new dr(this.inputElement,this._labelController)),this.addController(new pr(this.$.noop,(()=>this._labelController.node),(()=>this.__warnDeprecated()))),this._tooltipController=new Js(this),this.addController(this._tooltipController)}__warnDeprecated(){console.warn('WARNING: Since Vaadin 22, placing the label as a direct child of a <vaadin-checkbox> is deprecated.\nPlease use <label slot="label"> wrapper or the label property instead.')}_shouldSetActive(t){return"a"!==t.target.localName&&super._shouldSetActive(t)}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}}customElements.define(mr.is,mr);
882
+ `}static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""}}}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("checkbox"),this.value="on"}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new pr(this.inputElement,this._labelController)),this.addController(new mr(this.$.noop,(()=>this._labelController.node),(()=>this.__warnDeprecated()))),this._tooltipController=new Ks(this),this.addController(this._tooltipController)}__warnDeprecated(){console.warn('WARNING: Since Vaadin 22, placing the label as a direct child of a <vaadin-checkbox> is deprecated.\nPlease use <label slot="label"> wrapper or the label property instead.')}_shouldSetActive(t){return"a"!==t.target.localName&&super._shouldSetActive(t)}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}}customElements.define(fr.is,fr);
881
883
  /**
882
884
  * @license
883
885
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
884
886
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
885
887
  */
886
- const fr=d`
888
+ const vr=d`
887
889
  :host([has-helper]) [part='helper-text']::before {
888
890
  content: '';
889
891
  display: block;
@@ -939,7 +941,7 @@ const fr=d`
939
941
  * @license
940
942
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
941
943
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
942
- */,vr=d`
944
+ */,br=d`
943
945
  [part='label'] {
944
946
  align-self: flex-start;
945
947
  color: var(--lumo-secondary-text-color);
@@ -1035,7 +1037,7 @@ const fr=d`
1035
1037
  margin-left: 0;
1036
1038
  margin-right: calc(var(--lumo-border-radius-m) / 4);
1037
1039
  }
1038
- `;ct("",vr,{moduleId:"lumo-required-field"}),ct("vaadin-checkbox-group",[vr,fr,d`
1040
+ `;dt("",br,{moduleId:"lumo-required-field"}),dt("vaadin-checkbox-group",[br,vr,d`
1039
1041
  :host {
1040
1042
  color: var(--lumo-body-text-color);
1041
1043
  font-size: var(--lumo-font-size-m);
@@ -1085,28 +1087,28 @@ const fr=d`
1085
1087
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1086
1088
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1087
1089
  */
1088
- class br extends Xs{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)}}
1090
+ class gr extends Js{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)}}
1089
1091
  /**
1090
1092
  * @license
1091
1093
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1092
1094
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1093
- */function gr(t){return t?new Set(t.split(" ")):new Set}function yr(t){return[...t].join(" ")}
1095
+ */function yr(t){return t?new Set(t.split(" ")):new Set}function wr(t){return[...t].join(" ")}
1094
1096
  /**
1095
1097
  * @license
1096
1098
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1097
1099
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1098
1100
  */
1099
- class wr{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=gr(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,yr(s)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const s=gr(t.getAttribute(e));s.add(i),t.setAttribute(e,yr(s))}(this.__target,t,e))}}
1101
+ 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=yr(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,wr(s)):t.removeAttribute(e)}(this.__target,t,i),e&&function(t,e,i){const s=yr(t.getAttribute(e));s.add(i),t.setAttribute(e,wr(s))}(this.__target,t,e))}}
1100
1102
  /**
1101
1103
  * @license
1102
1104
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1103
1105
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1104
- */class _r extends Xs{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)}}
1106
+ */class xr extends Js{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)}}
1105
1107
  /**
1106
1108
  * @license
1107
1109
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1108
1110
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1109
- */const xr=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}})),kr=t=>class extends(xr(cr(As(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 wr(this),this._helperController=new _r(this),this._errorController=new br(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)}))}}
1111
+ */const kr=te((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}})),Cr=t=>class extends(kr(dr(Es(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 xr(this),this._errorController=new gr(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)}))}}
1110
1112
  /**
1111
1113
  * @license
1112
1114
  * Copyright (c) 2018 - 2022 Vaadin Ltd.
@@ -1116,7 +1118,7 @@ class wr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1116
1118
  * @license
1117
1119
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1118
1120
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1119
- */class Cr extends(kr(nr(Li(Rs(bt(Ni)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return Bi`
1121
+ */class Ar extends(Cr(ar($i(Hs(gt(Li)))))){static get is(){return"vaadin-checkbox-group"}static get template(){return Fi`
1120
1122
  <style>
1121
1123
  :host {
1122
1124
  display: inline-flex;
@@ -1163,7 +1165,7 @@ class wr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1163
1165
  </div>
1164
1166
 
1165
1167
  <slot name="tooltip"></slot>
1166
- `}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this)}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group"),this._observer=new Gs(this,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox),this.__warnOfCheckboxesWithoutValue(i)})),this._tooltipController=new Js(this),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof mr))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),t||this.validate()}}customElements.define(Cr.is,Cr);const Ar=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{class:"checkboxgroup__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Ar.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}';const Er=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{class:"checkbox__error-message"},this.errorMessage),i("div",{class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{class:"checkbox__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Er.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--flex{display:flex;gap:5px}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__label-text{font-size:16px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}',ct("vaadin-input-container",d`
1168
+ `}static get properties(){return{value:{type:Array,value:()=>[],notify:!0,observer:"__valueChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this)}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group"),this._observer=new Us(this,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox),this.__warnOfCheckboxesWithoutValue(i)})),this._tooltipController=new Ks(this),this.addController(this._tooltipController)}checkValidity(){return!this.required||this.value.length>0}__filterCheckboxes(t){return t.filter((t=>t instanceof fr))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),t.checked?this.__addCheckboxToValue(t.value):this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value.includes(t)||(this.value=[...this.value,t])}__removeCheckboxFromValue(t){this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){0===t.length&&void 0===e||(this.toggleAttribute("has-value",t.length>0),this.__checkboxes.forEach((e=>{e.checked=t.includes(e.value)})),void 0!==e&&this.validate())}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),t||this.validate()}}customElements.define(Ar.is,Ar);const Er=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.selectedValues=[],this.value=null,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}setValue(){this.value=this.options.reduce(((t,e)=>(t[e.name]=this.selectedValues.includes(e.name),t)),{}),this.emitValueHandler(!0)}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"checkboxgroup"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.selectedValues=this.options.map((t=>t.name)),this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"checkboxgroup__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}handleParentCheckbox(t){this.selectedValues=t.target.checked?this.options.map((t=>t.name)):[]}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`,slot:"label"},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}render(){return i("div",{class:`checkboxgroup__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"checkboxgroup__wrapper--flex"},i("vaadin-checkbox",{class:"checkbox__input",checked:this.selectedValues.length===this.options.length||"true"===this.defaultValue,indeterminate:this.selectedValues.length>0&&this.selectedValues.length<this.options.length,onChange:t=>this.handleParentCheckbox(t)},this.renderLabel()),this.tooltip&&i("img",{class:"checkboxgroup__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("small",{class:"checkboxgroup__error-message"},this.errorMessage),i("vaadin-checkbox-group",{theme:"vertical",value:this.selectedValues,"on-value-changed":t=>{this.selectedValues=t.detail.value}},this.options.map((t=>i("vaadin-checkbox",{class:"checkbox__input",name:t.name,value:t.name,label:t.displayName})))))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],selectedValues:["setValue"],emitValue:["emitValueHandler"]}}};Er.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkboxgroup{font-family:"Roboto";font-style:normal;font-size:15px}.checkboxgroup__wrapper{position:relative}.checkboxgroup__wrapper--flex{display:flex;gap:5px;align-content:flex-start}.checkboxgroup__wrapper--relative{position:relative;display:inline}.checkboxgroup__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkboxgroup__label-text{font-size:16px}.checkboxgroup__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkboxgroup__tooltip-icon{width:16px;height:auto}.checkboxgroup__tooltip{position:absolute;top:0;right:0;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkboxgroup__tooltip.visible{opacity:1}';const Tr=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleClick(){this.value=this.inputReference.checked.toString(),this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderLabel(){return i("label",{class:"checkbox__label",htmlFor:`${this.name}__input`},i("div",{class:"checkbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"checkbox__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("div",{class:`checkbox__wrapper ${this.name}__input`,ref:t=>this.stylingContainer=t},i("input",{class:"checkbox__input",type:"checkbox",id:`${this.name}__input`,ref:t=>this.inputReference=t,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel(),i("small",{class:"checkbox__error-message"},this.errorMessage),i("div",{class:"checkbox__wrapper--relative"},this.tooltip&&i("img",{class:"checkbox__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Tr.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.checkbox{font-family:"Roboto";font-style:normal}.checkbox__wrapper{display:flex;gap:10px;position:relative;align-items:baseline}.checkbox__wrapper--flex{display:flex;gap:5px}.checkbox__wrapper--relative{position:relative}.checkbox__input{transform:scale(1.307, 1.307);margin-left:2px}.checkbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:#2B2D3F;line-height:14px}.checkbox__label-text{font-size:16px}.checkbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.checkbox__tooltip-icon{width:16px;height:auto}.checkbox__tooltip{position:absolute;top:0;right:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.checkbox__tooltip.visible{opacity:1}',dt("vaadin-input-container",d`
1167
1169
  :host {
1168
1170
  border-radius: var(--lumo-border-radius-m);
1169
1171
  background-color: var(--lumo-contrast-10pct);
@@ -1323,7 +1325,7 @@ class wr{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1323
1325
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1324
1326
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1325
1327
  */
1326
- class Tr extends(bt(js(Ni))){static get is(){return"vaadin-input-container"}static get template(){return Bi`
1328
+ class Dr extends(gt(Vs(Li))){static get is(){return"vaadin-input-container"}static get template(){return Fi`
1327
1329
  <style>
1328
1330
  :host {
1329
1331
  display: flex;
@@ -1374,13 +1376,13 @@ class Tr extends(bt(js(Ni))){static get is(){return"vaadin-input-container"}stat
1374
1376
  <slot name="prefix"></slot>
1375
1377
  <slot></slot>
1376
1378
  <slot name="suffix"></slot>
1377
- `}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(Tr.is,Tr);
1379
+ `}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(Dr.is,Dr);
1378
1380
  /**
1379
1381
  * @license
1380
1382
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
1381
1383
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1382
1384
  */
1383
- const Dr=d`
1385
+ const Sr=d`
1384
1386
  :host {
1385
1387
  top: var(--lumo-space-m);
1386
1388
  right: var(--lumo-space-m);
@@ -1443,7 +1445,7 @@ const Dr=d`
1443
1445
  opacity: 1;
1444
1446
  }
1445
1447
  }
1446
- `;ct("",Dr,{moduleId:"lumo-overlay"}),ct("vaadin-overlay",Dr,{moduleId:"lumo-vaadin-overlay"});
1448
+ `;dt("",Sr,{moduleId:"lumo-overlay"}),dt("vaadin-overlay",Sr,{moduleId:"lumo-vaadin-overlay"});
1447
1449
  /**
1448
1450
  @license
1449
1451
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1453,7 +1455,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
1453
1455
  Code distributed by Google as part of the polymer project is also
1454
1456
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1455
1457
  */
1456
- let Sr=!1,Mr=[],zr=[];function Ir(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function Pr(t,e,i){Sr||(Sr=!0,requestAnimationFrame((function(){Sr=!1,function(t){for(;t.length;)Ir(t.shift())}(Mr),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Ir(t.shift())}(zr)}))}))),zr.push([t,e,i])}
1458
+ let Mr=!1,zr=[],Ir=[];function Pr(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function Or(t,e,i){Mr||(Mr=!0,requestAnimationFrame((function(){Mr=!1,function(t){for(;t.length;)Pr(t.shift())}(zr),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)Pr(t.shift())}(Ir)}))}))),Ir.push([t,e,i])}
1457
1459
  /**
1458
1460
  @license
1459
1461
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1462,7 +1464,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1462
1464
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1463
1465
  Code distributed by Google as part of the polymer project is also
1464
1466
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1465
- */function Or(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return o&&n&&(t.__dataTemp[e]=i),n}const Br=Zt((t=>class extends t{_shouldPropertyChange(t,e,i){return Or(this,t,e,i,!0)}})),Fr=Zt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return Or(this,t,e,i,this.mutableData)}}));Br._mutablePropertyChange=Or;
1467
+ */function Br(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return o&&n&&(t.__dataTemp[e]=i),n}const Fr=te((t=>class extends t{_shouldPropertyChange(t,e,i){return Br(this,t,e,i,!0)}})),Nr=te((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return Br(this,t,e,i,this.mutableData)}}));Fr._mutablePropertyChange=Br;
1466
1468
  /**
1467
1469
  @license
1468
1470
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1472,18 +1474,18 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
1472
1474
  Code distributed by Google as part of the polymer project is also
1473
1475
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1474
1476
  */
1475
- let Nr=null;function Lr(){return Nr}Lr.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Lr,writable:!0}});const $r=Ti(Lr),jr=Br($r),Vr=Ti(class{});class qr extends Vr{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"),ce(ce(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&ce(ce(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 Rr=Br(qr);function Hr(t){let e=t.__dataHost;return e&&e._methodHost||e}function Wr(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function Yr(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Gr(t,e,i){if(Vt&&!Hr(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:qr)._parseTemplate(t),r=s.templatizeInstanceClass;r||(r=function(t,e,i){let s=i.mutableData?Rr:qr;Gr.mixin&&(s=Gr.mixin(s));let r=class extends s{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Yr(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,s,i),s.templatizeInstanceClass=r);const o=Hr(t);!function(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?jr:$r;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:Wr(0,r)}),n.prototype._createNotifyingProperty("_host_"+t);Ht&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:o}=e;for(let t in r)if(!(s[t]||o&&o[t])){const e=r[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),o)!function(t,e){Nr=t,Object.setPrototypeOf(t,e.prototype),new e,Nr=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,o);let n=class extends r{};return n.prototype._methodHost=o,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n=n,n}
1477
+ let Lr=null;function $r(){return Lr}$r.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:$r,writable:!0}});const jr=Di($r),Vr=Fr(jr),qr=Di(class{});class Rr extends qr{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"),de(de(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&de(de(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 Hr=Fr(Rr);function Wr(t){let e=t.__dataHost;return e&&e._methodHost||e}function Yr(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring("_host_".length),s[i])}}function Gr(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Ur(t,e,i){if(qt&&!Wr(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:Rr)._parseTemplate(t),r=s.templatizeInstanceClass;r||(r=function(t,e,i){let s=i.mutableData?Hr:Rr;Ur.mixin&&(s=Ur.mixin(s));let r=class extends s{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Gr(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,s,i),s.templatizeInstanceClass=r);const o=Wr(t);!function(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(o){let t=i.mutableData?Vr:jr;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:Yr(0,r)}),n.prototype._createNotifyingProperty("_host_"+t);Wt&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:o}=e;for(let t in r)if(!(s[t]||o&&o[t])){const e=r[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),o)!function(t,e){Lr=t,Object.setPrototypeOf(t,e.prototype),new e,Lr=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,o);let n=class extends r{};return n.prototype._methodHost=o,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n=n,n}
1476
1478
  /**
1477
1479
  * @license
1478
1480
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
1479
1481
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1480
1482
  */
1481
- const Ur=t=>t.test(navigator.userAgent),Qr=t=>t.test(navigator.platform);Ur(/Android/),Ur(/Chrome/)&&/Google Inc/.test(navigator.vendor);const Xr=Ur(/Firefox/),Jr=Qr(/^iPad/)||Qr(/^Mac/)&&navigator.maxTouchPoints>1,Kr=Qr(/^iPhone/)||Jr,Zr=Ur(/^((?!chrome|android).)*safari/i),to=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})(),eo=[];class io{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.");eo.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,eo.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(eo).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 er(t,e)?tr(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(ir).pop())}}
1483
+ const Qr=t=>t.test(navigator.userAgent),Xr=t=>t.test(navigator.platform);Qr(/Android/),Qr(/Chrome/)&&/Google Inc/.test(navigator.vendor);const Jr=Qr(/Firefox/),Kr=Xr(/^iPad/)||Xr(/^Mac/)&&navigator.maxTouchPoints>1,Zr=Xr(/^iPhone/)||Kr,to=Qr(/^((?!chrome|android).)*safari/i),eo=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})(),io=[];class so{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.");io.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,io.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(io).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 ir(t,e)?er(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(sr).pop())}}
1482
1484
  /**
1483
1485
  * @license
1484
1486
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
1485
1487
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1486
- */class so extends(bt(js(As(Ni)))){static get template(){return Bi`
1488
+ */class ro extends(gt(Vs(Es(Li)))){static get template(){return Fi`
1487
1489
  <style>
1488
1490
  :host {
1489
1491
  z-index: 200;
@@ -1555,13 +1557,13 @@ const Ur=t=>t.test(navigator.userAgent),Qr=t=>t.test(navigator.platform);Ur(/And
1555
1557
  <slot></slot>
1556
1558
  </div>
1557
1559
  </div>
1558
- `}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 Gs(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),Kr&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new io(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(),Pr(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 so&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===so.__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"),so.__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=so.__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=Gr(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,r){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 o=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!==r;this._oldOpened=r,a&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&n?this._stampOverlayTemplate(t):e&&(a||h||o)&&r&&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=so.__attachedInstances.filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(so.is,so);
1560
+ `}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 Us(this,(t=>{this._setTemplateFromNodes(t.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),Zr&&(this._boundIosResizeListener=()=>this._detectIosNavbar()),this.__focusTrapController=new so(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(),Or(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 ro&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0))}get _last(){return this===ro.__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"),ro.__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=ro.__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=Ur(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,r){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 o=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!==r;this._oldOpened=r,a&&(this.content=this,this.content.innerHTML="",delete this.content._$litPart$),t&&n?this._stampOverlayTemplate(t):e&&(a||h||o)&&r&&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=ro.__attachedInstances.filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(ro.is,ro);
1559
1561
  /**
1560
1562
  * @license
1561
1563
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
1562
1564
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1563
1565
  */
1564
- const ro=d`
1566
+ const oo=d`
1565
1567
  :host([opening]),
1566
1568
  :host([closing]) {
1567
1569
  animation: 0.14s lumo-overlay-dummy-animation;
@@ -1591,7 +1593,7 @@ const ro=d`
1591
1593
  opacity: 0;
1592
1594
  }
1593
1595
  }
1594
- `;ct("",ro,{moduleId:"lumo-menu-overlay-core"});const oo=[Dr,ro,d`
1596
+ `;dt("",oo,{moduleId:"lumo-menu-overlay-core"});const no=[Sr,oo,d`
1595
1597
  /* Small viewport (bottom sheet) styles */
1596
1598
  /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
1597
1599
  @media (max-width: 420px), (max-height: 420px) {
@@ -1653,7 +1655,7 @@ const ro=d`
1653
1655
  transform: translateY(150%);
1654
1656
  }
1655
1657
  }
1656
- `];ct("",oo,{moduleId:"lumo-menu-overlay"}),ct("vaadin-date-picker-overlay",[oo,d`
1658
+ `];dt("",no,{moduleId:"lumo-menu-overlay"}),dt("vaadin-date-picker-overlay",[no,d`
1657
1659
  [part='overlay'] {
1658
1660
  /*
1659
1661
  Width:
@@ -1701,7 +1703,7 @@ const ro=d`
1701
1703
  max-height: 70vh;
1702
1704
  }
1703
1705
  }
1704
- `],{moduleId:"lumo-date-picker-overlay"});const no=d`
1706
+ `],{moduleId:"lumo-date-picker-overlay"});const ao=d`
1705
1707
  :host {
1706
1708
  /* Sizing */
1707
1709
  --lumo-button-size: var(--lumo-size-m);
@@ -1954,18 +1956,18 @@ const ro=d`
1954
1956
  margin-left: 0;
1955
1957
  margin-right: 0;
1956
1958
  }
1957
- `;ct("vaadin-button",no,{moduleId:"lumo-button"});
1959
+ `;dt("vaadin-button",ao,{moduleId:"lumo-button"});
1958
1960
  /**
1959
1961
  * @license
1960
1962
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
1961
1963
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1962
1964
  */
1963
- const ao=t=>class extends(Cs(ar(nr(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())}}
1965
+ const ho=t=>class extends(As(hr(ar(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())}}
1964
1966
  /**
1965
1967
  * @license
1966
1968
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
1967
1969
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1968
- */;class ho extends(ao(Rs(bt(As(Ni))))){static get is(){return"vaadin-button"}static get template(){return Bi`
1970
+ */;class lo extends(ho(Hs(gt(Es(Li))))){static get is(){return"vaadin-button"}static get template(){return Fi`
1969
1971
  <style>
1970
1972
  :host {
1971
1973
  display: inline-block;
@@ -2024,7 +2026,7 @@ const ao=t=>class extends(Cs(ar(nr(t)))){static get properties(){return{tabindex
2024
2026
  </span>
2025
2027
  </div>
2026
2028
  <slot name="tooltip"></slot>
2027
- `}ready(){super.ready(),this._tooltipController=new Js(this),this.addController(this._tooltipController)}}customElements.define(ho.is,ho),ct("vaadin-date-picker-overlay-content",d`
2029
+ `}ready(){super.ready(),this._tooltipController=new Ks(this),this.addController(this._tooltipController)}}customElements.define(lo.is,lo),dt("vaadin-date-picker-overlay-content",d`
2028
2030
  :host {
2029
2031
  position: relative;
2030
2032
  /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
@@ -2212,7 +2214,7 @@ const ao=t=>class extends(Cs(ar(nr(t)))){static get properties(){return{tabindex
2212
2214
  padding-left: 50px;
2213
2215
  }
2214
2216
  }
2215
- `,{moduleId:"lumo-date-picker-overlay-content"}),ct("vaadin-month-calendar",d`
2217
+ `,{moduleId:"lumo-date-picker-overlay-content"}),dt("vaadin-month-calendar",d`
2216
2218
  :host {
2217
2219
  -moz-user-select: none;
2218
2220
  -webkit-user-select: none;
@@ -2352,13 +2354,13 @@ const ao=t=>class extends(Cs(ar(nr(t)))){static get properties(){return{tabindex
2352
2354
  :host([disabled]) * {
2353
2355
  color: var(--lumo-disabled-text-color) !important;
2354
2356
  }
2355
- `,{moduleId:"lumo-month-calendar"});const lo=document.createElement("template");lo.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(lo.content);
2357
+ `,{moduleId:"lumo-month-calendar"});const uo=document.createElement("template");uo.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(uo.content);
2356
2358
  /**
2357
2359
  * @license
2358
2360
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
2359
2361
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2360
2362
  */
2361
- const uo=d`
2363
+ const co=d`
2362
2364
  [part$='button'] {
2363
2365
  flex: none;
2364
2366
  width: 1em;
@@ -2385,13 +2387,13 @@ const uo=d`
2385
2387
  font-family: 'lumo-icons';
2386
2388
  display: block;
2387
2389
  }
2388
- `;ct("",uo,{moduleId:"lumo-field-button"});
2390
+ `;dt("",co,{moduleId:"lumo-field-button"});
2389
2391
  /**
2390
2392
  * @license
2391
2393
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
2392
2394
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2393
2395
  */
2394
- const co=[vr,uo,fr,d`
2396
+ const po=[br,co,vr,d`
2395
2397
  :host {
2396
2398
  --lumo-text-field-size: var(--lumo-size-m);
2397
2399
  color: var(--lumo-body-text-color);
@@ -2515,7 +2517,7 @@ const co=[vr,uo,fr,d`
2515
2517
  [part='clear-button']::before {
2516
2518
  content: var(--lumo-icons-cross);
2517
2519
  }
2518
- `];ct("",co,{moduleId:"lumo-input-field-shared-styles"}),ct("vaadin-date-picker",[co,d`
2520
+ `];dt("",po,{moduleId:"lumo-input-field-shared-styles"}),dt("vaadin-date-picker",[po,d`
2519
2521
  :host {
2520
2522
  outline: none;
2521
2523
  }
@@ -2553,12 +2555,12 @@ const co=[vr,uo,fr,d`
2553
2555
  * Google as part of the polymer project is also subject to an additional IP
2554
2556
  * rights grant found at http://polymer.github.io/PATENTS.txt
2555
2557
  */
2556
- const po=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,ce(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}})),mo={start:"top",end:"bottom"},fo={start:"left",end:"right"},vo=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),bo=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,vo.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,vo.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 r=this.getBoundingClientRect(),o=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,mo,this,e),n=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,fo,this,i);Object.assign(this.style,o,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,fo)}__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,mo)}__shouldAlignStart(t,e,i,s,r,o,n){const a=i-t[o?n.end:n.start]-s[n.end],h=t[o?n.start:n.end]-s[n.start],l=r?a:h;return r===(l>(r?h:a)||l>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===mo.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===fo.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,r,o){const n=o?s.start:s.end,a=o?s.end:s.start,h=parseFloat(r.style[n]||getComputedStyle(r)[n]),l=this.__adjustBottomProperty(n,s,h);return{[n]:l?`${l}px`:`${h+(e[o?s.start:s.end]-t[i===o?s.end:s.start])*(o?-1:1)}px`,[a]:""}}}
2558
+ const mo=te((t=>{const e=Ii(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,de(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,i,s)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}})),fo={start:"top",end:"bottom"},vo={start:"left",end:"right"},bo=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),go=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,bo.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,bo.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 r=this.getBoundingClientRect(),o=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,fo,this,e),n=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,vo,this,i);Object.assign(this.style,o,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,vo)}__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,fo)}__shouldAlignStart(t,e,i,s,r,o,n){const a=i-t[o?n.end:n.start]-s[n.end],h=t[o?n.start:n.end]-s[n.start],l=r?a:h;return r===(l>(r?h:a)||l>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===fo.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===vo.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,r,o){const n=o?s.start:s.end,a=o?s.end:s.start,h=parseFloat(r.style[n]||getComputedStyle(r)[n]),l=this.__adjustBottomProperty(n,s,h);return{[n]:l?`${l}px`:`${h+(e[o?s.start:s.end]-t[i===o?s.end:s.start])*(o?-1:1)}px`,[a]:""}}}
2557
2559
  /**
2558
2560
  * @license
2559
2561
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2560
2562
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2561
- */,go=d`
2563
+ */,yo=d`
2562
2564
  :host([dir='rtl']) [part='input-field'] {
2563
2565
  direction: ltr;
2564
2566
  }
@@ -2567,13 +2569,13 @@ const po=Zt((t=>{const e=zi(t);let i=(t=>{for(;t;){const e=Object.getOwnProperty
2567
2569
  direction: rtl;
2568
2570
  text-align: left;
2569
2571
  }
2570
- `;let yo;
2572
+ `;let wo;
2571
2573
  /**
2572
2574
  * @license
2573
2575
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2574
2576
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2575
2577
  */
2576
- ct("vaadin-date-picker-overlay",d`
2578
+ dt("vaadin-date-picker-overlay",d`
2577
2579
  [part='overlay'] {
2578
2580
  display: flex;
2579
2581
  flex: auto;
@@ -2582,7 +2584,7 @@ ct("vaadin-date-picker-overlay",d`
2582
2584
  [part~='content'] {
2583
2585
  flex: auto;
2584
2586
  }
2585
- `,{moduleId:"vaadin-date-picker-overlay-styles"});class wo extends(po(bo(so))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return yo||(yo=super.template.cloneNode(!0),yo.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),yo}}customElements.define(wo.is,wo);
2587
+ `,{moduleId:"vaadin-date-picker-overlay-styles"});class _o extends(mo(go(ro))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return wo||(wo=super.template.cloneNode(!0),wo.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),wo}}customElements.define(_o.is,_o);
2586
2588
  /**
2587
2589
  @license
2588
2590
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -2592,7 +2594,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
2592
2594
  Code distributed by Google as part of the polymer project is also
2593
2595
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2594
2596
  */
2595
- class _o{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,xo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),xo.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 _o?t._cancelAsync():t=new _o,t.setConfig(e,i),t}}let xo=new Set;const ko=function(){const t=Boolean(xo.size);return xo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
2597
+ class xo{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,ko.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ko.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 xo?t._cancelAsync():t=new xo,t.setConfig(e,i),t}}let ko=new Set;const Co=function(){const t=Boolean(ko.size);return ko.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};
2596
2598
  /**
2597
2599
  @license
2598
2600
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -2602,7 +2604,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
2602
2604
  Code distributed by Google as part of the polymer project is also
2603
2605
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2604
2606
  */
2605
- let Co=!1;
2607
+ let Ao=!1;
2606
2608
  /**
2607
2609
  @license
2608
2610
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -2612,12 +2614,12 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
2612
2614
  Code distributed by Google as part of the polymer project is also
2613
2615
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2614
2616
  */
2615
- const Ao=Fr(Ni);class Eo extends Ao{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:!Xt,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(Rt&&!Nt){if(!Co){Co=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=ce(ce(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Gr(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,r=0;r<i.length&&(s=i[r]);r++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(r=e)||me(s,r)||fe(s,r)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let r=ve(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}var s,r}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=_o.debounce(this.__renderDebouncer,e>0?Ie.after(e):Pe,t.bind(this)),xo.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=ko()}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),Xt&&!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 r;for(r=0;r<e;r++){let e=this.__instances[r],o=i[r],n=t[o];s[o]=r,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(n,r,o)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=ce(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let 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 r=this.__instances[e+1],o=r?r.children[0]:this;return ce(ce(this).parentNode).insertBefore(s.root,o),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("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[r]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=ce(e).parentNode;return null}(this.template,t)}}function To(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function Do(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function So(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 Mo(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function zo(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}
2617
+ const Eo=Nr(Li);class To extends Eo{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:!Jt,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(Ht&&!Lt){if(!Ao){Ao=!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=de(de(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=Ur(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,r=0;r<i.length&&(s=i[r]);r++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(r=e)||fe(s,r)||ve(s,r)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let r=be(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}var s,r}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=xo.debounce(this.__renderDebouncer,e>0?Pe.after(e):Oe,t.bind(this)),ko.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=Co()}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),Jt&&!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 r;for(r=0;r<e;r++){let e=this.__instances[r],o=i[r],n=t[o];s[o]=r,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(n,r,o)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=de(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 r=this.__instances[e+1],o=r?r.children[0]:this;return de(de(this).parentNode).insertBefore(s.root,o),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("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[r]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=de(e).parentNode;return null}(this.template,t)}}function Do(t,e){return t instanceof Date&&e instanceof Date&&t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}function So(t,e,i){return(!e||t>=e)&&(!i||t<=i)}function Mo(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 zo(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function Io(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}
2616
2618
  /**
2617
2619
  * @license
2618
2620
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2619
2621
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2620
- */customElements.define(Eo.is,Eo);class Io extends(nr(bt(Ni))){static get template(){return Bi`
2622
+ */customElements.define(To.is,To);class Po extends(ar(gt(Li))){static get template(){return Fi`
2621
2623
  <style>
2622
2624
  :host {
2623
2625
  display: block;
@@ -2717,19 +2719,19 @@ const Ao=Fr(Ni);class Eo extends Ao{static get is(){return"dom-repeat"}static ge
2717
2719
  </template>
2718
2720
  </tbody>
2719
2721
  </table>
2720
- `}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(),ms(this.$.monthGrid,"tap",this._handleTap.bind(this))}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part=date]")].find((t=>To(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 r=new Date(0,0);return r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()+1),r.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Do(s,e,i)||Do(r,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=>To(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 To(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=[],r=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===r;)s.push(i.getMonth()===o?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){
2722
+ `}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(),fs(this.$.monthGrid,"tap",this._handleTap.bind(this))}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part=date]")].find((t=>Do(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 r=new Date(0,0);return r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()+1),r.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||So(s,e,i)||So(r,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=>Do(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 Do(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=[],r=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===r;)s.push(i.getMonth()===o?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){
2721
2723
  /**
2722
2724
  * @license
2723
2725
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2724
2726
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2725
2727
  */
2726
- return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),r=new Date(0,0);r.setFullYear(s.getFullYear());const o=s.getTime()-r.getTime(),n=Math.round(o/864e5);return Math.floor(n/7+1)}(t.reduce(((t,e)=>!t&&e?e:t)))}__isDayFocused(t,e){return To(t,e)}__isDaySelected(t,e){return To(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i){return!Do(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(Io.is,Io);
2728
+ return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),r=new Date(0,0);r.setFullYear(s.getFullYear());const o=s.getTime()-r.getTime(),n=Math.round(o/864e5);return Math.floor(n/7+1)}(t.reduce(((t,e)=>!t&&e?e:t)))}__isDayFocused(t,e){return Do(t,e)}__isDaySelected(t,e){return Do(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i){return!So(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(Po.is,Po);
2727
2729
  /**
2728
2730
  * @license
2729
2731
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2730
2732
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2731
2733
  */
2732
- class Po extends Ni{static get template(){return Bi`
2734
+ class Oo extends Li{static get template(){return Fi`
2733
2735
  <style>
2734
2736
  :host {
2735
2737
  display: block;
@@ -2779,18 +2781,18 @@ class Po extends Ni{static get template(){return Bi`
2779
2781
  <div class="buffer"></div>
2780
2782
  <div id="fullHeight"></div>
2781
2783
  </div>
2782
- `}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=Gr(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[...i.children].forEach((i=>{i._itemWrapper.instance[t]=e}))}))}}),Xr&&(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=Ms.debounce(this._debouncerScrollFinish,Wi.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=Ms.debounce(this._debouncerUpdateClones,Wi.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-${Po._contentIndex=Po._contentIndex+1||0}`,r=document.createElement("slot");r.setAttribute("name",s),r._itemWrapper=i,e.appendChild(r),i.setAttribute("slot",s),this.appendChild(i),setTimeout((()=>{this._isVisible(i,t)&&this._ensureStampedInstance(i)}),1)}})),setTimeout((()=>{Pr(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 r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||(o.instance.index=r+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(Po.is,Po);
2784
+ `}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=Ur(t,this,{forwardHostProp(t,e){"index"!==t&&this._buffers.forEach((i=>{[...i.children].forEach((i=>{i._itemWrapper.instance[t]=e}))}))}}),Jr&&(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=zs.debounce(this._debouncerScrollFinish,Yi.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=zs.debounce(this._debouncerUpdateClones,Yi.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-${Oo._contentIndex=Oo._contentIndex+1||0}`,r=document.createElement("slot");r.setAttribute("name",s),r._itemWrapper=i,e.appendChild(r),i.setAttribute("slot",s),this.appendChild(i),setTimeout((()=>{this._isVisible(i,t)&&this._ensureStampedInstance(i)}),1)}})),setTimeout((()=>{Or(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 r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||(o.instance.index=r+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}customElements.define(Oo.is,Oo);
2783
2785
  /**
2784
2786
  * @license
2785
2787
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
2786
2788
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2787
2789
  */
2788
- class Oo{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)}}
2790
+ class Bo{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)}}
2789
2791
  /**
2790
2792
  * @license
2791
2793
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
2792
2794
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2793
- */class Bo extends(As(bt(js(Ni)))){static get template(){return Bi`
2795
+ */class Fo extends(Es(gt(Vs(Li)))){static get template(){return Fi`
2794
2796
  <style>
2795
2797
  :host {
2796
2798
  display: flex;
@@ -2970,18 +2972,18 @@ class Oo{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
2970
2972
  [[i18n.cancel]]
2971
2973
  </vaadin-button>
2972
2974
  </div>
2973
- `}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"),ms(this.$.scrollers,"track",this._track.bind(this)),ms(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),ms(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),ms(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),ms(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),ms(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),ms(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new Oo(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),vs(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,r=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,o=this.$.monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+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=Ms.debounce(this._debouncer,Wi.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t?e(Mo(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 r=this.$.monthScroller.position,o=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,r,this._targetPosition-r);this.$.monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this.$.yearScroller.style.transform=`translateX(${t}px)`)}_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){To(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&&To(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(So(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(Bo.is,Bo);
2975
+ `}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"),fs(this.$.scrollers,"track",this._track.bind(this)),fs(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),fs(this.shadowRoot.querySelector('[part="today-button"]'),"tap",this._onTodayTap.bind(this)),fs(this.shadowRoot.querySelector('[part="cancel-button"]'),"tap",this._cancel.bind(this)),fs(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),fs(this.shadowRoot.querySelector('[part="years"]'),"tap",this._onYearTap.bind(this)),fs(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this)),this.addController(new Bo(this._desktopMediaQuery,(t=>{this._desktopMode=t})))}connectedCallback(){super.connectedCallback(),this._closeYearScroller(),this._toggleAnimateClass(!0),bs(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,r=Math.max(this.$.monthScroller.itemHeight,this.$.monthScroller.clientHeight-2*this.$.monthScroller.bufferOffset)/this.$.monthScroller.itemHeight,o=this.$.monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+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=zs.debounce(this._debouncer,Yi.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t?e(zo(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 r=this.$.monthScroller.position,o=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,r,this._targetPosition-r);this.$.monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),this.$.monthScroller.position=this._targetPosition,this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this.$.monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this.$.yearScroller.style.transform=`translateX(${t}px)`)}_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){Do(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&&Do(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(Mo(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(Fo.is,Fo);
2974
2976
  /**
2975
2977
  * @license
2976
2978
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
2977
2979
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2978
2980
  */
2979
- const Fo=Zt((t=>class extends(sr(xr(rr(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}})),No=new WeakMap,Lo=Zt((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return No.has(t)||No.set(t,new Set),No.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))}))}})),$o=t=>class extends(Lo(hr(Fo(kr(ks(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))),this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))))}_onClearButtonClick(t){t.preventDefault(),this.__clear()}_onClearButtonMouseDown(t){t.preventDefault(),to||this.inputElement.focus()}_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=Ms.debounce(this._preventInputDebouncer,Wi.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)}}}
2981
+ const No=te((t=>class extends(rr(kr(or(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}})),Lo=new WeakMap,$o=te((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Lo.has(t)||Lo.set(t,new Set),Lo.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),jo=t=>class extends($o(lr(No(Cr(Cs(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))),this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))))}_onClearButtonClick(t){t.preventDefault(),this.__clear()}_onClearButtonMouseDown(t){t.preventDefault(),eo||this.inputElement.focus()}_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=zs.debounce(this._preventInputDebouncer,Yi.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)}}}
2980
2982
  /**
2981
2983
  * @license
2982
2984
  * Copyright (c) 2021 - 2022 Vaadin Ltd..
2983
2985
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2984
- */,jo=[d`
2986
+ */,Vo=[d`
2985
2987
  :host {
2986
2988
  display: inline-flex;
2987
2989
  outline: none;
@@ -3049,17 +3051,17 @@ const Fo=Zt((t=>class extends(sr(xr(rr(t)))){static get constraints(){return["re
3049
3051
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
3050
3052
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3051
3053
  */
3052
- class Vo{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")}}
3054
+ class qo{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")}}
3053
3055
  /**
3054
3056
  * @license
3055
3057
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
3056
3058
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3057
- */const qo=t=>class extends(As(hr(Fo(ks(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,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=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 r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?zo(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},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:Kr},_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 Oo(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Vo(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||Do(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,r,o){return!t||e&&(!o||r)||i&&r||!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",r=t.getFullYear();return r<0?(r=-r,i="-",s="000000"):t.getFullYear()>=1e4&&(i="+",s="000000"),[i+e(r,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=zo(t);!t||i?(t?To(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}_onOverlayOpened(){const t=zo(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;this._overlayContent.initialPosition=t||Do(e,this._minDate,this._maxDate)?e:So(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(Mo(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&&zo(`${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,To(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}__computeMinOrMaxDate(t){return zo(t)}}
3059
+ */const Ro=t=>class extends(Es(lr(No(Cs(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,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=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 r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?Io(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},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:Zr},_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 Bo(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new qo(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||So(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,r,o){return!t||e&&(!o||r)||i&&r||!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",r=t.getFullYear();return r<0?(r=-r,i="-",s="000000"):t.getFullYear()>=1e4&&(i="+",s="000000"),[i+e(r,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=Io(t);!t||i?(t?Do(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=e}_onOverlayOpened(){const t=Io(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;this._overlayContent.initialPosition=t||So(e,this._minDate,this._maxDate)?e:Mo(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(zo(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&&Io(`${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,Do(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}get _overlayContent(){return this.$.overlay.content.querySelector("#overlay-content")}__computeMinOrMaxDate(t){return Io(t)}}
3058
3060
  /**
3059
3061
  * @license
3060
3062
  * Copyright (c) 2016 - 2022 Vaadin Ltd.
3061
3063
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3062
- */;ct("vaadin-date-picker",[jo,go],{moduleId:"vaadin-date-picker-styles"});class Ro extends(qo($o(bt(Rs(Ni))))){static get is(){return"vaadin-date-picker"}static get template(){return Bi`
3064
+ */;dt("vaadin-date-picker",[Vo,yo],{moduleId:"vaadin-date-picker-styles"});class Ho extends(Ro(jo(gt(Hs(Li))))){static get is(){return"vaadin-date-picker"}static get template(){return Fi`
3063
3065
  <style>
3064
3066
  :host([opened]) {
3065
3067
  pointer-events: auto;
@@ -3122,29 +3124,29 @@ class Vo{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.
3122
3124
  </vaadin-date-picker-overlay>
3123
3125
 
3124
3126
  <slot name="tooltip"></slot>
3125
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new lr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new dr(this.inputElement,this._labelController)),this._tooltipController=new Js(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}}function Ho(t){return(Ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wo(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Yo(t){return Wo(1,arguments),t instanceof Date||"object"===Ho(t)&&"[object Date]"===Object.prototype.toString.call(t)}function Go(t){Wo(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Ho(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Uo(t){if(Wo(1,arguments),!Yo(t)&&"number"!=typeof t)return!1;var e=Go(t);return!isNaN(Number(e))}function Qo(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Xo(t,e){Wo(2,arguments);var i=Go(t).getTime(),s=Qo(e);return new Date(i+s)}function Jo(t,e){Wo(2,arguments);var i=Qo(e);return Xo(t,-i)}function Ko(t){Wo(1,arguments);var e=1,i=Go(t),s=i.getUTCDay(),r=(s<e?7:0)+s-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function Zo(t){Wo(1,arguments);var e=Go(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=Ko(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Ko(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function tn(t){Wo(1,arguments);var e=Zo(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=Ko(i);return s}function en(t){Wo(1,arguments);var e=Go(t),i=Ko(e).getTime()-tn(e).getTime();return Math.round(i/6048e5)+1}customElements.define(Ro.is,Ro);var sn={};function rn(){return sn}function on(t,e){var i,s,r,o,n,a,h,l;Wo(1,arguments);var u=rn(),c=Qo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Go(t),p=d.getUTCDay(),m=(p<c?7:0)+p-c;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function nn(t,e){var i,s,r,o,n,a,h,l;Wo(1,arguments);var u=Go(t),c=u.getUTCFullYear(),d=rn(),p=Qo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var f=on(m,e),v=new Date(0);v.setUTCFullYear(c,0,p),v.setUTCHours(0,0,0,0);var b=on(v,e);return u.getTime()>=f.getTime()?c+1:u.getTime()>=b.getTime()?c:c-1}function an(t,e){var i,s,r,o,n,a,h,l;Wo(1,arguments);var u=rn(),c=Qo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),d=nn(t,e),p=new Date(0);p.setUTCFullYear(d,0,c),p.setUTCHours(0,0,0,0);var m=on(p,e);return m}function hn(t,e){Wo(1,arguments);var i=Go(t),s=on(i,e).getTime()-an(i,e).getTime();return Math.round(s/6048e5)+1}function ln(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var un={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return ln("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=nn(t,s),o=r>0?r:1-r;return"YY"===e?ln(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):ln(o,e.length)},R:function(t,e){return ln(Zo(t),e.length)},u:function(t,e){return ln(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return ln(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return ln(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):ln(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return ln(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=hn(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):ln(r,e.length)},I:function(t,e,i){var s=en(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):ln(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return ln(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){Wo(1,arguments);var e=Go(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):ln(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return ln(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return ln(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return ln(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return function(t,e){return ln(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return ln(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):ln(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):ln(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return ln(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return ln(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return ln(Math.floor(s*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return dn(r);case"XXXX":case"XX":return pn(r);case"XXXXX":case"XXX":default:return pn(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return dn(r);case"xxxx":case"xx":return pn(r);case"xxxxx":case"xxx":default:return pn(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+cn(r,":");case"OOOO":default:return"GMT"+pn(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+cn(r,":");case"zzzz":default:return"GMT"+pn(r,":")}},t:function(t,e,i,s){return ln(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return ln((s._originalDate||t).getTime(),e.length)}};function cn(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+ln(o,2)}function dn(t,e){return t%60==0?(t>0?"-":"+")+ln(Math.abs(t)/60,2):pn(t,e)}function pn(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+ln(Math.floor(r/60),2)+i+ln(r%60,2)}var mn=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},fn=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},vn={p:fn,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return mn(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",mn(r,e)).replace("{{time}}",fn(o,e))}};function bn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var gn=["D","DD"],yn=["YY","YYYY"];function wn(t){return-1!==gn.indexOf(t)}function _n(t){return-1!==yn.indexOf(t)}function xn(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var kn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function Cn(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,s=t.formats[i]||t.formats[t.defaultWidth];return s}}var An={date:Cn({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Cn({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:Cn({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},En={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Tn(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Dn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var n,a=o[0],h=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(h)?Mn(h,(function(t){return t.test(a)})):Sn(h,(function(t){return t.test(a)}));n=t.valueCallback?t.valueCallback(l):l,n=i.valueCallback?i.valueCallback(n):n;var u=e.slice(a.length);return{value:n,rest:u}}}function Sn(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function Mn(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var zn,In={code:"en-US",formatDistance:function(t,e,i){var s,r=kn[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:An,formatRelative:function(t){return En[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Tn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Tn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Tn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Tn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Tn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(zn={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(zn.matchPattern);if(!i)return null;var s=i[0],r=t.match(zn.parsePattern);if(!r)return null;var o=zn.valueCallback?zn.valueCallback(r[0]):r[0];o=e.valueCallback?e.valueCallback(o):o;var n=t.slice(s.length);return{value:o,rest:n}}),era:Dn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Dn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Dn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Dn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Dn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},Pn=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,On=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bn=/^'([^]*?)'?$/,Fn=/''/g,Nn=/[a-zA-Z]/;function Ln(t){var e=t.match(Bn);return e?e[1].replace(Fn,"'"):t}function $n(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function jn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return $n(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?$n(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function Vn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function qn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Rn(t,e){return(Rn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Hn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rn(t,e)}function Wn(t){return(Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Yn(t,e){if(e&&("object"===Ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return qn(t)}function Gn(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,s=Wn(t);if(e){var r=Wn(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return Yn(this,i)}}function Un(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Qn(t){var e=function(t,e){if("object"!==Ho(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==Ho(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Ho(e)?e:String(e)}function Xn(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Qn(s.key),s)}}function Jn(t,e,i){return e&&Xn(t.prototype,e),i&&Xn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Kn(t,e,i){return(e=Qn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var Zn=function(){function t(){Un(this,t),Kn(this,"priority",void 0),Kn(this,"subPriority",0)}return Jn(t,[{key:"validate",value:function(){return!0}}]),t}(),ta=function(){Hn(e,Zn);var t=Gn(e);function e(i,s,r,o,n){var a;return Un(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return Jn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),ea=function(){Hn(e,Zn);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",10),Kn(qn(i),"subPriority",-1),i}return Jn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),ia=function(){function t(){Un(this,t),Kn(this,"incompatibleTokens",void 0),Kn(this,"priority",void 0),Kn(this,"subPriority",void 0)}return Jn(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new ta(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),sa=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",140),Kn(qn(i),"incompatibleTokens",["R","u","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),ra=/^(1[0-2]|0?\d)/,oa=/^(3[0-1]|[0-2]?\d)/,na=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,aa=/^(5[0-3]|[0-4]?\d)/,ha=/^(2[0-3]|[0-1]?\d)/,la=/^(2[0-4]|[0-1]?\d)/,ua=/^(1[0-1]|0?\d)/,ca=/^(1[0-2]|0?\d)/,da=/^[0-5]?\d/,pa=/^[0-5]?\d/,ma=/^\d/,fa=/^\d{1,2}/,va=/^\d{1,3}/,ba=/^\d{1,4}/,ga=/^-?\d+/,ya=/^-?\d/,wa=/^-?\d{1,2}/,_a=/^-?\d{1,3}/,xa=/^-?\d{1,4}/,ka=/^([+-])(\d{2})(\d{2})?|Z/,Ca=/^([+-])(\d{2})(\d{2})|Z/,Aa=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ea=/^([+-])(\d{2}):(\d{2})|Z/,Ta=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Da(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Sa(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function Ma(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function za(t){return Sa(ga,t)}function Ia(t,e){switch(t){case 1:return Sa(ma,e);case 2:return Sa(fa,e);case 3:return Sa(va,e);case 4:return Sa(ba,e);default:return Sa(new RegExp("^\\d{1,"+t+"}"),e)}}function Pa(t,e){switch(t){case 1:return Sa(ya,e);case 2:return Sa(wa,e);case 3:return Sa(_a,e);case 4:return Sa(xa,e);default:return Sa(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Oa(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Ba(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Fa(t){return t%400==0||t%4==0&&t%100!=0}var Na=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",130),Kn(qn(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Da(Ia(4,t),s);case"yo":return Da(i.ordinalNumber(t,{unit:"year"}),s);default:return Da(Ia(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Ba(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),La=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",130),Kn(qn(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Da(Ia(4,t),s);case"Yo":return Da(i.ordinalNumber(t,{unit:"year"}),s);default:return Da(Ia(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=nn(t,s);if(i.isTwoDigitYear){var o=Ba(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),on(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),on(t,s)}}]),e}(),$a=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",130),Kn(qn(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e){return Pa("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Ko(s)}}]),e}(),ja=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",130),Kn(qn(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e){return Pa("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Va=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",120),Kn(qn(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Ia(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),qa=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",120),Kn(qn(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Ia(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ra=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Kn(qn(i),"priority",110),i}return Jn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Da(Sa(ra,t),s);case"MM":return Da(Ia(2,t),s);case"Mo":return Da(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ha=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",110),Kn(qn(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Da(Sa(ra,t),s);case"LL":return Da(Ia(2,t),s);case"Lo":return Da(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Wa=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",100),Kn(qn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Sa(aa,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return on(function(t,e,i){Wo(2,arguments);var s=Go(t),r=Qo(e),o=hn(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),Ya=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",100),Kn(qn(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Sa(aa,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Ko(function(t,e){Wo(2,arguments);var i=Go(t),s=Qo(e),r=en(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Ga=[31,28,31,30,31,30,31,31,30,31,30,31],Ua=[31,29,31,30,31,30,31,31,30,31,30,31],Qa=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"subPriority",1),Kn(qn(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Sa(oa,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){var i=Fa(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Ua[s]:e>=1&&e<=Ga[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Xa=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"subpriority",1),Kn(qn(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Sa(na,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return Fa(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ja(t,e,i){var s,r,o,n,a,h,l,u;Wo(2,arguments);var c=rn(),d=Qo(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(h=a.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==s?s:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Go(t),m=Qo(e),f=p.getUTCDay(),v=m%7,b=(v+7)%7,g=(b<d?7:0)+m-f;return p.setUTCDate(p.getUTCDate()+g),p}var Ka=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ja(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),Za=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Da(Ia(e.length,t),r);case"eo":return Da(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ja(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),th=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Da(Ia(e.length,t),r);case"co":return Da(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ja(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),eh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",90),Kn(qn(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Ia(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Da(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Da(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Da(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Da(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return(t=function(t,e){Wo(2,arguments);var i=Qo(e);i%7==0&&(i-=7);var s=1,r=Go(t),o=r.getUTCDay(),n=((i%7+7)%7<s?7:0)+i-o;return r.setUTCDate(r.getUTCDate()+n),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),ih=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",80),Kn(qn(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Oa(i),0,0,0),t}}]),e}(),sh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",80),Kn(qn(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Oa(i),0,0,0),t}}]),e}(),rh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",80),Kn(qn(i),"incompatibleTokens",["a","b","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Oa(i),0,0,0),t}}]),e}(),oh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",70),Kn(qn(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Sa(ca,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),nh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",70),Kn(qn(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Sa(ha,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),ah=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",70),Kn(qn(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Sa(ua,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),hh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",70),Kn(qn(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Sa(la,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),lh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",60),Kn(qn(i),"incompatibleTokens",["t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Sa(da,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),uh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",50),Kn(qn(i),"incompatibleTokens",["t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Sa(pa,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Ia(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),ch=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",30),Kn(qn(i),"incompatibleTokens",["t","T"]),i}return Jn(e,[{key:"parse",value:function(t,e){return Da(Ia(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),dh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",10),Kn(qn(i),"incompatibleTokens",["t","T","x"]),i}return Jn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return Ma(ka,t);case"XX":return Ma(Ca,t);case"XXXX":return Ma(Aa,t);case"XXXXX":return Ma(Ta,t);case"XXX":default:return Ma(Ea,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),ph=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",10),Kn(qn(i),"incompatibleTokens",["t","T","X"]),i}return Jn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return Ma(ka,t);case"xx":return Ma(Ca,t);case"xxxx":return Ma(Aa,t);case"xxxxx":return Ma(Ta,t);case"xxx":default:return Ma(Ea,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),mh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",40),Kn(qn(i),"incompatibleTokens","*"),i}return Jn(e,[{key:"parse",value:function(t){return za(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),fh=function(){Hn(e,ia);var t=Gn(e);function e(){var i;Un(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Kn(qn(i=t.call.apply(t,[this].concat(r))),"priority",20),Kn(qn(i),"incompatibleTokens","*"),i}return Jn(e,[{key:"parse",value:function(t){return za(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),vh={G:new sa,y:new Na,Y:new La,R:new $a,u:new ja,Q:new Va,q:new qa,M:new Ra,L:new Ha,w:new Wa,I:new Ya,d:new Qa,D:new Xa,E:new Ka,e:new Za,c:new th,i:new eh,a:new ih,b:new sh,B:new rh,h:new oh,H:new nh,K:new ah,k:new hh,m:new lh,s:new uh,S:new ch,X:new dh,x:new ph,t:new mh,T:new fh},bh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,gh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yh=/^'([^]*?)'?$/,wh=/''/g,_h=/\S/,xh=/[a-zA-Z]/;function kh(t,e,i,s){var r,o,n,a,h,l,u,c,d,p,m,f,v,b,g,y,w,_;Wo(3,arguments);var x=String(t),k=String(e),C=rn(),A=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:In;if(!A.match)throw new RangeError("locale must contain match property");var E=Qo(null!==(n=null!==(a=null!==(h=null!==(l=null==s?void 0:s.firstWeekContainsDate)&&void 0!==l?l:null==s||null===(u=s.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==a?a:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Qo(null!==(m=null!==(f=null!==(v=null!==(b=null==s?void 0:s.weekStartsOn)&&void 0!==b?b:null==s||null===(g=s.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(w=C.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Go(i):new Date(NaN);var D,S={firstWeekContainsDate:E,weekStartsOn:T,locale:A},M=[new ea],z=k.match(gh).map((function(t){var e=t[0];return e in vn?(0,vn[e])(t,A.formatLong):t})).join("").match(bh),I=[],P=jn(z);try{var O=function(){var e=D.value;null!=s&&s.useAdditionalWeekYearTokens||!_n(e)||xn(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!wn(e)||xn(e,k,t);var i=e[0],r=vh[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=I.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var a=r.run(x,e,A.match,S);if(!a)return{v:new Date(NaN)};M.push(a.setter),x=a.rest}else{if(i.match(xh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Ch(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(D=P.n()).done;){var B=O();if("object"===Ho(B))return B.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&_h.test(x))return new Date(NaN);var F=M.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Go(i);if(isNaN(N.getTime()))return new Date(NaN);var L,$=Jo(N,bn(N)),j={},V=jn(F);try{for(V.s();!(L=V.n()).done;){var q=L.value;if(!q.validate($,S))return new Date(NaN);var R=q.set($,j,S);Array.isArray(R)?($=R[0],Vn(j,R[1])):$=R}}catch(t){V.e(t)}finally{V.f()}return $}function Ch(t){return t.match(yh)[1].replace(wh,"'")}function Ah(t,e){Wo(2,arguments);var i=Go(t),s=Go(e);return i.getTime()>s.getTime()}function Eh(t,e){Wo(2,arguments);var i=Go(t),s=Go(e);return i.getTime()<s.getTime()}const Th=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return function(t,e,i){var s,r,o,n,a,h,l,u,c,d,p,m,f,v,b,g,y,w;Wo(2,arguments);var _=String(e),x=rn(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:In,C=Qo(null!==(o=null!==(n=null!==(a=null!==(h=null==i?void 0:i.firstWeekContainsDate)&&void 0!==h?h:null==i||null===(l=i.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(c=x.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Qo(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Go(t);if(!Uo(E))throw new RangeError("Invalid time value");var T=bn(E),D=Jo(E,T),S={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return _.match(On).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,vn[e])(t,k.formatLong):t})).join("").match(Pn).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return Ln(s);var o=un[r];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!_n(s)||xn(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!wn(s)||xn(s,e,String(t)),o(D,s,k.localize,S);if(r.match(Nn))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return s})).join("")}(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=kh(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=kh((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=kh((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=kh(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!Eh(this.valueAsDate,this.minDate)&&!Ah(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return Eh(this.valueAsDate,this.minDate)||Ah(this.valueAsDate,this.maxDate)?r("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?r("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"date__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Th.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Dh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"email__wrapper--flex"},i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"email__wrapper--relative"},this.tooltip&&i("img",{class:"email__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Dh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Sh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?r("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"number__wrapper--flex"},i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"number__wrapper--relative"},this.tooltip&&i("img",{class:"number__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Sh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
3127
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new pr(this.inputElement,this._labelController)),this._tooltipController=new Ks(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}}function Wo(t){return(Wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yo(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Go(t){return Yo(1,arguments),t instanceof Date||"object"===Wo(t)&&"[object Date]"===Object.prototype.toString.call(t)}function Uo(t){Yo(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Wo(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Qo(t){if(Yo(1,arguments),!Go(t)&&"number"!=typeof t)return!1;var e=Uo(t);return!isNaN(Number(e))}function Xo(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Jo(t,e){Yo(2,arguments);var i=Uo(t).getTime(),s=Xo(e);return new Date(i+s)}function Ko(t,e){Yo(2,arguments);var i=Xo(e);return Jo(t,-i)}function Zo(t){Yo(1,arguments);var e=1,i=Uo(t),s=i.getUTCDay(),r=(s<e?7:0)+s-e;return i.setUTCDate(i.getUTCDate()-r),i.setUTCHours(0,0,0,0),i}function tn(t){Yo(1,arguments);var e=Uo(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var r=Zo(s),o=new Date(0);o.setUTCFullYear(i,0,4),o.setUTCHours(0,0,0,0);var n=Zo(o);return e.getTime()>=r.getTime()?i+1:e.getTime()>=n.getTime()?i:i-1}function en(t){Yo(1,arguments);var e=tn(t),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=Zo(i);return s}function sn(t){Yo(1,arguments);var e=Uo(t),i=Zo(e).getTime()-en(e).getTime();return Math.round(i/6048e5)+1}customElements.define(Ho.is,Ho);var rn={};function on(){return rn}function nn(t,e){var i,s,r,o,n,a,h,l;Yo(1,arguments);var u=on(),c=Xo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.weekStartsOn)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==r?r:u.weekStartsOn)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==i?i:0);if(!(c>=0&&c<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=Uo(t),p=d.getUTCDay(),m=(p<c?7:0)+p-c;return d.setUTCDate(d.getUTCDate()-m),d.setUTCHours(0,0,0,0),d}function an(t,e){var i,s,r,o,n,a,h,l;Yo(1,arguments);var u=Uo(t),c=u.getUTCFullYear(),d=on(),p=Xo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:d.firstWeekContainsDate)&&void 0!==s?s:null===(h=d.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(c+1,0,p),m.setUTCHours(0,0,0,0);var f=nn(m,e),v=new Date(0);v.setUTCFullYear(c,0,p),v.setUTCHours(0,0,0,0);var b=nn(v,e);return u.getTime()>=f.getTime()?c+1:u.getTime()>=b.getTime()?c:c-1}function hn(t,e){var i,s,r,o,n,a,h,l;Yo(1,arguments);var u=on(),c=Xo(null!==(i=null!==(s=null!==(r=null!==(o=null==e?void 0:e.firstWeekContainsDate)&&void 0!==o?o:null==e||null===(n=e.locale)||void 0===n||null===(a=n.options)||void 0===a?void 0:a.firstWeekContainsDate)&&void 0!==r?r:u.firstWeekContainsDate)&&void 0!==s?s:null===(h=u.locale)||void 0===h||null===(l=h.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==i?i:1),d=an(t,e),p=new Date(0);p.setUTCFullYear(d,0,c),p.setUTCHours(0,0,0,0);var m=nn(p,e);return m}function ln(t,e){Yo(1,arguments);var i=Uo(t),s=nn(i,e).getTime()-hn(i,e).getTime();return Math.round(s/6048e5)+1}function un(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}var cn={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});case"GGGG":default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return un("yy"===e?s%100:s,e.length)}(t,e)},Y:function(t,e,i,s){var r=an(t,s),o=r>0?r:1-r;return"YY"===e?un(o%100,2):"Yo"===e?i.ordinalNumber(o,{unit:"year"}):un(o,e.length)},R:function(t,e){return un(tn(t),e.length)},u:function(t,e){return un(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return un(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return un(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):un(i+1,2)}(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return un(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var r=ln(t,s);return"wo"===e?i.ordinalNumber(r,{unit:"week"}):un(r,e.length)},I:function(t,e,i){var s=sn(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):un(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,e){return un(t.getUTCDate(),e.length)}(t,e)},D:function(t,e,i){var s=function(t){Yo(1,arguments);var e=Uo(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):un(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});case"EEEE":default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return un(o,2);case"eo":return i.ordinalNumber(o,{unit:"day"});case"eee":return i.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(r,{width:"short",context:"formatting"});case"eeee":default:return i.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var r=t.getUTCDay(),o=(r-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return un(o,e.length);case"co":return i.ordinalNumber(o,{unit:"day"});case"ccc":return i.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(r,{width:"narrow",context:"standalone"});case"cccccc":return i.day(r,{width:"short",context:"standalone"});case"cccc":default:return i.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),r=0===s?7:s;switch(e){case"i":return String(r);case"ii":return un(r,e.length);case"io":return i.ordinalNumber(r,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});case"iiii":default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,r=t.getUTCHours();switch(s=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,r=t.getUTCHours();switch(s=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return function(t,e){return un(t.getUTCHours()%12||12,e.length)}(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,e){return un(t.getUTCHours(),e.length)}(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):un(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):un(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,e){return un(t.getUTCMinutes(),e.length)}(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,e){return un(t.getUTCSeconds(),e.length)}(t,e)},S:function(t,e){return function(t,e){var i=e.length,s=t.getUTCMilliseconds();return un(Math.floor(s*Math.pow(10,i-3)),e.length)}(t,e)},X:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();if(0===r)return"Z";switch(e){case"X":return pn(r);case"XXXX":case"XX":return mn(r);case"XXXXX":case"XXX":default:return mn(r,":")}},x:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return pn(r);case"xxxx":case"xx":return mn(r);case"xxxxx":case"xxx":default:return mn(r,":")}},O:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+dn(r,":");case"OOOO":default:return"GMT"+mn(r,":")}},z:function(t,e,i,s){var r=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+dn(r,":");case"zzzz":default:return"GMT"+mn(r,":")}},t:function(t,e,i,s){return un(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return un((s._originalDate||t).getTime(),e.length)}};function dn(t,e){var i=t>0?"-":"+",s=Math.abs(t),r=Math.floor(s/60),o=s%60;if(0===o)return i+String(r);var n=e||"";return i+String(r)+n+un(o,2)}function pn(t,e){return t%60==0?(t>0?"-":"+")+un(Math.abs(t)/60,2):mn(t,e)}function mn(t,e){var i=e||"",s=t>0?"-":"+",r=Math.abs(t);return s+un(Math.floor(r/60),2)+i+un(r%60,2)}var fn=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},vn=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},bn={p:vn,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],r=s[1],o=s[2];if(!o)return fn(t,e);switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",fn(r,e)).replace("{{time}}",vn(o,e))}};function gn(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}var yn=["D","DD"],wn=["YY","YYYY"];function _n(t){return-1!==yn.indexOf(t)}function xn(t){return-1!==wn.indexOf(t)}function kn(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Cn={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function An(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth,s=t.formats[i]||t.formats[t.defaultWidth];return s}}var En={date:An({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:An({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:An({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},Tn={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Dn(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var r=t.defaultFormattingWidth||t.defaultWidth,o=null!=i&&i.width?String(i.width):r;s=t.formattingValues[o]||t.formattingValues[r]}else{var n=t.defaultWidth,a=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[a]||t.values[n]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function Sn(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,r=s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth],o=e.match(r);if(!o)return null;var n,a=o[0],h=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(h)?zn(h,(function(t){return t.test(a)})):Mn(h,(function(t){return t.test(a)}));n=t.valueCallback?t.valueCallback(l):l,n=i.valueCallback?i.valueCallback(n):n;var u=e.slice(a.length);return{value:n,rest:u}}}function Mn(t,e){for(var i in t)if(t.hasOwnProperty(i)&&e(t[i]))return i}function zn(t,e){for(var i=0;i<t.length;i++)if(e(t[i]))return i}var In,Pn={code:"en-US",formatDistance:function(t,e,i){var s,r=Cn[t];return s="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:En,formatRelative:function(t){return Tn[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Dn({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Dn({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:Dn({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:Dn({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:Dn({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(In={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(In.matchPattern);if(!i)return null;var s=i[0],r=t.match(In.parsePattern);if(!r)return null;var o=In.valueCallback?In.valueCallback(r[0]):r[0];o=e.valueCallback?e.valueCallback(o):o;var n=t.slice(s.length);return{value:o,rest:n}}),era:Sn({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:Sn({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:Sn({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:Sn({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:Sn({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},On=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bn=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fn=/^'([^]*?)'?$/,Nn=/''/g,Ln=/[a-zA-Z]/;function $n(t){var e=t.match(Fn);return e?e[1].replace(Nn,"'"):t}function jn(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,s=new Array(e);i<e;i++)s[i]=t[i];return s}function Vn(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return jn(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?jn(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var s=0,r=function(){};return{s:r,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,n=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){a=!0,o=t},f:function(){try{n||null==i.return||i.return()}finally{if(a)throw o}}}}function qn(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}function Rn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hn(t,e){return(Hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Wn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hn(t,e)}function Yn(t){return(Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Gn(t,e){if(e&&("object"===Wo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Rn(t)}function Un(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var i,s=Yn(t);if(e){var r=Yn(this).constructor;i=Reflect.construct(s,arguments,r)}else i=s.apply(this,arguments);return Gn(this,i)}}function Qn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Xn(t){var e=function(t,e){if("object"!==Wo(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e);if("object"!==Wo(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===Wo(e)?e:String(e)}function Jn(t,e){for(var i=0;i<e.length;i++){var s=e[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,Xn(s.key),s)}}function Kn(t,e,i){return e&&Jn(t.prototype,e),i&&Jn(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zn(t,e,i){return(e=Xn(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ta=function(){function t(){Qn(this,t),Zn(this,"priority",void 0),Zn(this,"subPriority",0)}return Kn(t,[{key:"validate",value:function(){return!0}}]),t}(),ea=function(){Wn(e,ta);var t=Un(e);function e(i,s,r,o,n){var a;return Qn(this,e),(a=t.call(this)).value=i,a.validateValue=s,a.setValue=r,a.priority=o,n&&(a.subPriority=n),a}return Kn(e,[{key:"validate",value:function(t,e){return this.validateValue(t,this.value,e)}},{key:"set",value:function(t,e,i){return this.setValue(t,e,this.value,i)}}]),e}(),ia=function(){Wn(e,ta);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",10),Zn(Rn(i),"subPriority",-1),i}return Kn(e,[{key:"set",value:function(t,e){if(e.timestampIsSet)return t;var i=new Date(0);return i.setFullYear(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()),i.setHours(t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds(),t.getUTCMilliseconds()),i}}]),e}(),sa=function(){function t(){Qn(this,t),Zn(this,"incompatibleTokens",void 0),Zn(this,"priority",void 0),Zn(this,"subPriority",void 0)}return Kn(t,[{key:"run",value:function(t,e,i,s){var r=this.parse(t,e,i,s);return r?{setter:new ea(r.value,this.validate,this.set,this.priority,this.subPriority),rest:r.rest}:null}},{key:"validate",value:function(){return!0}}]),t}(),ra=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",140),Zn(Rn(i),"incompatibleTokens",["R","u","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"G":case"GG":case"GGG":return i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"});case"GGGGG":return i.era(t,{width:"narrow"});case"GGGG":default:return i.era(t,{width:"wide"})||i.era(t,{width:"abbreviated"})||i.era(t,{width:"narrow"})}}},{key:"set",value:function(t,e,i){return e.era=i,t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),oa=/^(1[0-2]|0?\d)/,na=/^(3[0-1]|[0-2]?\d)/,aa=/^(36[0-6]|3[0-5]\d|[0-2]?\d?\d)/,ha=/^(5[0-3]|[0-4]?\d)/,la=/^(2[0-3]|[0-1]?\d)/,ua=/^(2[0-4]|[0-1]?\d)/,ca=/^(1[0-1]|0?\d)/,da=/^(1[0-2]|0?\d)/,pa=/^[0-5]?\d/,ma=/^[0-5]?\d/,fa=/^\d/,va=/^\d{1,2}/,ba=/^\d{1,3}/,ga=/^\d{1,4}/,ya=/^-?\d+/,wa=/^-?\d/,_a=/^-?\d{1,2}/,xa=/^-?\d{1,3}/,ka=/^-?\d{1,4}/,Ca=/^([+-])(\d{2})(\d{2})?|Z/,Aa=/^([+-])(\d{2})(\d{2})|Z/,Ea=/^([+-])(\d{2})(\d{2})((\d{2}))?|Z/,Ta=/^([+-])(\d{2}):(\d{2})|Z/,Da=/^([+-])(\d{2}):(\d{2})(:(\d{2}))?|Z/;function Sa(t,e){return t?{value:e(t.value),rest:t.rest}:t}function Ma(t,e){var i=e.match(t);return i?{value:parseInt(i[0],10),rest:e.slice(i[0].length)}:null}function za(t,e){var i=e.match(t);return i?"Z"===i[0]?{value:0,rest:e.slice(1)}:{value:("+"===i[1]?1:-1)*(36e5*(i[2]?parseInt(i[2],10):0)+6e4*(i[3]?parseInt(i[3],10):0)+1e3*(i[5]?parseInt(i[5],10):0)),rest:e.slice(i[0].length)}:null}function Ia(t){return Ma(ya,t)}function Pa(t,e){switch(t){case 1:return Ma(fa,e);case 2:return Ma(va,e);case 3:return Ma(ba,e);case 4:return Ma(ga,e);default:return Ma(new RegExp("^\\d{1,"+t+"}"),e)}}function Oa(t,e){switch(t){case 1:return Ma(wa,e);case 2:return Ma(_a,e);case 3:return Ma(xa,e);case 4:return Ma(ka,e);default:return Ma(new RegExp("^-?\\d{1,"+t+"}"),e)}}function Ba(t){switch(t){case"morning":return 4;case"evening":return 17;case"pm":case"noon":case"afternoon":return 12;case"am":case"midnight":case"night":default:return 0}}function Fa(t,e){var i,s=e>0,r=s?e:1-e;if(r<=50)i=t||100;else{var o=r+50;i=t+100*Math.floor(o/100)-(t>=o%100?100:0)}return s?i:1-i}function Na(t){return t%400==0||t%4==0&&t%100!=0}var La=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",130),Zn(Rn(i),"incompatibleTokens",["Y","R","u","w","I","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"yy"===e}};switch(e){case"y":return Sa(Pa(4,t),s);case"yo":return Sa(i.ordinalNumber(t,{unit:"year"}),s);default:return Sa(Pa(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i){var s=t.getUTCFullYear();if(i.isTwoDigitYear){var r=Fa(i.year,s);return t.setUTCFullYear(r,0,1),t.setUTCHours(0,0,0,0),t}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),$a=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",130),Zn(Rn(i),"incompatibleTokens",["y","R","u","Q","q","M","L","I","d","D","i","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return{year:t,isTwoDigitYear:"YY"===e}};switch(e){case"Y":return Sa(Pa(4,t),s);case"Yo":return Sa(i.ordinalNumber(t,{unit:"year"}),s);default:return Sa(Pa(e.length,t),s)}}},{key:"validate",value:function(t,e){return e.isTwoDigitYear||e.year>0}},{key:"set",value:function(t,e,i,s){var r=an(t,s);if(i.isTwoDigitYear){var o=Fa(i.year,r);return t.setUTCFullYear(o,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),nn(t,s)}return t.setUTCFullYear("era"in e&&1!==e.era?1-i.year:i.year,0,s.firstWeekContainsDate),t.setUTCHours(0,0,0,0),nn(t,s)}}]),e}(),ja=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",130),Zn(Rn(i),"incompatibleTokens",["G","y","Y","u","Q","q","M","L","w","d","D","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e){return Oa("R"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){var s=new Date(0);return s.setUTCFullYear(i,0,4),s.setUTCHours(0,0,0,0),Zo(s)}}]),e}(),Va=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",130),Zn(Rn(i),"incompatibleTokens",["G","y","Y","R","w","I","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e){return Oa("u"===e?4:e.length,t)}},{key:"set",value:function(t,e,i){return t.setUTCFullYear(i,0,1),t.setUTCHours(0,0,0,0),t}}]),e}(),qa=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",120),Zn(Rn(i),"incompatibleTokens",["Y","R","q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"Q":case"QQ":return Pa(e.length,t);case"Qo":return i.ordinalNumber(t,{unit:"quarter"});case"QQQ":return i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQQ":return i.quarter(t,{width:"narrow",context:"formatting"});case"QQQQ":default:return i.quarter(t,{width:"wide",context:"formatting"})||i.quarter(t,{width:"abbreviated",context:"formatting"})||i.quarter(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ra=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",120),Zn(Rn(i),"incompatibleTokens",["Y","R","Q","M","L","w","I","d","D","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"q":case"qq":return Pa(e.length,t);case"qo":return i.ordinalNumber(t,{unit:"quarter"});case"qqq":return i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"});case"qqqqq":return i.quarter(t,{width:"narrow",context:"standalone"});case"qqqq":default:return i.quarter(t,{width:"wide",context:"standalone"})||i.quarter(t,{width:"abbreviated",context:"standalone"})||i.quarter(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=1&&e<=4}},{key:"set",value:function(t,e,i){return t.setUTCMonth(3*(i-1),1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ha=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"incompatibleTokens",["Y","R","q","Q","L","w","I","D","i","e","c","t","T"]),Zn(Rn(i),"priority",110),i}return Kn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"M":return Sa(Ma(oa,t),s);case"MM":return Sa(Pa(2,t),s);case"Mo":return Sa(i.ordinalNumber(t,{unit:"month"}),s);case"MMM":return i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"});case"MMMMM":return i.month(t,{width:"narrow",context:"formatting"});case"MMMM":default:return i.month(t,{width:"wide",context:"formatting"})||i.month(t,{width:"abbreviated",context:"formatting"})||i.month(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Wa=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",110),Zn(Rn(i),"incompatibleTokens",["Y","R","q","Q","M","w","I","D","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return t-1};switch(e){case"L":return Sa(Ma(oa,t),s);case"LL":return Sa(Pa(2,t),s);case"Lo":return Sa(i.ordinalNumber(t,{unit:"month"}),s);case"LLL":return i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"});case"LLLLL":return i.month(t,{width:"narrow",context:"standalone"});case"LLLL":default:return i.month(t,{width:"wide",context:"standalone"})||i.month(t,{width:"abbreviated",context:"standalone"})||i.month(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){return t.setUTCMonth(i,1),t.setUTCHours(0,0,0,0),t}}]),e}(),Ya=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",100),Zn(Rn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","i","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"w":return Ma(ha,t);case"wo":return i.ordinalNumber(t,{unit:"week"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i,s){return nn(function(t,e,i){Yo(2,arguments);var s=Uo(t),r=Xo(e),o=ln(s,i)-r;return s.setUTCDate(s.getUTCDate()-7*o),s}(t,i,s),s)}}]),e}(),Ga=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",100),Zn(Rn(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"I":return Ma(ha,t);case"Io":return i.ordinalNumber(t,{unit:"week"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=53}},{key:"set",value:function(t,e,i){return Zo(function(t,e){Yo(2,arguments);var i=Uo(t),s=Xo(e),r=sn(i)-s;return i.setUTCDate(i.getUTCDate()-7*r),i}(t,i))}}]),e}(),Ua=[31,28,31,30,31,30,31,31,30,31,30,31],Qa=[31,29,31,30,31,30,31,31,30,31,30,31],Xa=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"subPriority",1),Zn(Rn(i),"incompatibleTokens",["Y","R","q","Q","w","I","D","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"d":return Ma(na,t);case"do":return i.ordinalNumber(t,{unit:"date"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){var i=Na(t.getUTCFullYear()),s=t.getUTCMonth();return i?e>=1&&e<=Qa[s]:e>=1&&e<=Ua[s]}},{key:"set",value:function(t,e,i){return t.setUTCDate(i),t.setUTCHours(0,0,0,0),t}}]),e}(),Ja=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"subpriority",1),Zn(Rn(i),"incompatibleTokens",["Y","R","q","Q","M","L","w","I","d","E","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"D":case"DD":return Ma(aa,t);case"Do":return i.ordinalNumber(t,{unit:"date"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return Na(t.getUTCFullYear())?e>=1&&e<=366:e>=1&&e<=365}},{key:"set",value:function(t,e,i){return t.setUTCMonth(0,i),t.setUTCHours(0,0,0,0),t}}]),e}();function Ka(t,e,i){var s,r,o,n,a,h,l,u;Yo(2,arguments);var c=on(),d=Xo(null!==(s=null!==(r=null!==(o=null!==(n=null==i?void 0:i.weekStartsOn)&&void 0!==n?n:null==i||null===(a=i.locale)||void 0===a||null===(h=a.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==s?s:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Uo(t),m=Xo(e),f=p.getUTCDay(),v=m%7,b=(v+7)%7,g=(b<d?7:0)+m-f;return p.setUTCDate(p.getUTCDate()+g),p}var Za=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"incompatibleTokens",["D","i","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"E":case"EE":case"EEE":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEEE":return i.day(t,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"EEEE":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ka(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),th=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"e":case"ee":return Sa(Pa(e.length,t),r);case"eo":return Sa(i.ordinalNumber(t,{unit:"day"}),r);case"eee":return i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeeee":return i.day(t,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"});case"eeee":default:return i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ka(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),eh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"incompatibleTokens",["y","R","u","q","Q","M","L","I","d","D","E","i","e","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i,s){var r=function(t){var e=7*Math.floor((t-1)/7);return(t+s.weekStartsOn+6)%7+e};switch(e){case"c":case"cc":return Sa(Pa(e.length,t),r);case"co":return Sa(i.ordinalNumber(t,{unit:"day"}),r);case"ccc":return i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"ccccc":return i.day(t,{width:"narrow",context:"standalone"});case"cccccc":return i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"});case"cccc":default:return i.day(t,{width:"wide",context:"standalone"})||i.day(t,{width:"abbreviated",context:"standalone"})||i.day(t,{width:"short",context:"standalone"})||i.day(t,{width:"narrow",context:"standalone"})}}},{key:"validate",value:function(t,e){return e>=0&&e<=6}},{key:"set",value:function(t,e,i,s){return(t=Ka(t,i,s)).setUTCHours(0,0,0,0),t}}]),e}(),ih=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",90),Zn(Rn(i),"incompatibleTokens",["y","Y","u","q","Q","M","L","w","d","D","E","e","c","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){var s=function(t){return 0===t?7:t};switch(e){case"i":case"ii":return Pa(e.length,t);case"io":return i.ordinalNumber(t,{unit:"day"});case"iii":return Sa(i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiii":return Sa(i.day(t,{width:"narrow",context:"formatting"}),s);case"iiiiii":return Sa(i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s);case"iiii":default:return Sa(i.day(t,{width:"wide",context:"formatting"})||i.day(t,{width:"abbreviated",context:"formatting"})||i.day(t,{width:"short",context:"formatting"})||i.day(t,{width:"narrow",context:"formatting"}),s)}}},{key:"validate",value:function(t,e){return e>=1&&e<=7}},{key:"set",value:function(t,e,i){return(t=function(t,e){Yo(2,arguments);var i=Xo(e);i%7==0&&(i-=7);var s=1,r=Uo(t),o=r.getUTCDay(),n=((i%7+7)%7<s?7:0)+i-o;return r.setUTCDate(r.getUTCDate()+n),r}(t,i)).setUTCHours(0,0,0,0),t}}]),e}(),sh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",80),Zn(Rn(i),"incompatibleTokens",["b","B","H","k","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"a":case"aa":case"aaa":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaaa":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"aaaa":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ba(i),0,0,0),t}}]),e}(),rh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",80),Zn(Rn(i),"incompatibleTokens",["a","B","H","k","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"b":case"bb":case"bbb":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbbb":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"bbbb":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ba(i),0,0,0),t}}]),e}(),oh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",80),Zn(Rn(i),"incompatibleTokens",["a","b","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"B":case"BB":case"BBB":return i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBBB":return i.dayPeriod(t,{width:"narrow",context:"formatting"});case"BBBB":default:return i.dayPeriod(t,{width:"wide",context:"formatting"})||i.dayPeriod(t,{width:"abbreviated",context:"formatting"})||i.dayPeriod(t,{width:"narrow",context:"formatting"})}}},{key:"set",value:function(t,e,i){return t.setUTCHours(Ba(i),0,0,0),t}}]),e}(),nh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",70),Zn(Rn(i),"incompatibleTokens",["H","K","k","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"h":return Ma(da,t);case"ho":return i.ordinalNumber(t,{unit:"hour"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=12}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:s||12!==i?i:0,0,0,0),t}}]),e}(),ah=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",70),Zn(Rn(i),"incompatibleTokens",["a","b","h","K","k","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"H":return Ma(la,t);case"Ho":return i.ordinalNumber(t,{unit:"hour"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=23}},{key:"set",value:function(t,e,i){return t.setUTCHours(i,0,0,0),t}}]),e}(),hh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",70),Zn(Rn(i),"incompatibleTokens",["h","H","k","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"K":return Ma(ca,t);case"Ko":return i.ordinalNumber(t,{unit:"hour"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=11}},{key:"set",value:function(t,e,i){var s=t.getUTCHours()>=12;return t.setUTCHours(s&&i<12?i+12:i,0,0,0),t}}]),e}(),lh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",70),Zn(Rn(i),"incompatibleTokens",["a","b","h","H","K","t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"k":return Ma(ua,t);case"ko":return i.ordinalNumber(t,{unit:"hour"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=1&&e<=24}},{key:"set",value:function(t,e,i){return t.setUTCHours(i<=24?i%24:i,0,0,0),t}}]),e}(),uh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",60),Zn(Rn(i),"incompatibleTokens",["t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"m":return Ma(pa,t);case"mo":return i.ordinalNumber(t,{unit:"minute"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCMinutes(i,0,0),t}}]),e}(),ch=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",50),Zn(Rn(i),"incompatibleTokens",["t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e,i){switch(e){case"s":return Ma(ma,t);case"so":return i.ordinalNumber(t,{unit:"second"});default:return Pa(e.length,t)}}},{key:"validate",value:function(t,e){return e>=0&&e<=59}},{key:"set",value:function(t,e,i){return t.setUTCSeconds(i,0),t}}]),e}(),dh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",30),Zn(Rn(i),"incompatibleTokens",["t","T"]),i}return Kn(e,[{key:"parse",value:function(t,e){return Sa(Pa(e.length,t),(function(t){return Math.floor(t*Math.pow(10,3-e.length))}))}},{key:"set",value:function(t,e,i){return t.setUTCMilliseconds(i),t}}]),e}(),ph=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",10),Zn(Rn(i),"incompatibleTokens",["t","T","x"]),i}return Kn(e,[{key:"parse",value:function(t,e){switch(e){case"X":return za(Ca,t);case"XX":return za(Aa,t);case"XXXX":return za(Ea,t);case"XXXXX":return za(Da,t);case"XXX":default:return za(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),mh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",10),Zn(Rn(i),"incompatibleTokens",["t","T","X"]),i}return Kn(e,[{key:"parse",value:function(t,e){switch(e){case"x":return za(Ca,t);case"xx":return za(Aa,t);case"xxxx":return za(Ea,t);case"xxxxx":return za(Da,t);case"xxx":default:return za(Ta,t)}}},{key:"set",value:function(t,e,i){return e.timestampIsSet?t:new Date(t.getTime()-i)}}]),e}(),fh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",40),Zn(Rn(i),"incompatibleTokens","*"),i}return Kn(e,[{key:"parse",value:function(t){return Ia(t)}},{key:"set",value:function(t,e,i){return[new Date(1e3*i),{timestampIsSet:!0}]}}]),e}(),vh=function(){Wn(e,sa);var t=Un(e);function e(){var i;Qn(this,e);for(var s=arguments.length,r=new Array(s),o=0;o<s;o++)r[o]=arguments[o];return Zn(Rn(i=t.call.apply(t,[this].concat(r))),"priority",20),Zn(Rn(i),"incompatibleTokens","*"),i}return Kn(e,[{key:"parse",value:function(t){return Ia(t)}},{key:"set",value:function(t,e,i){return[new Date(i),{timestampIsSet:!0}]}}]),e}(),bh={G:new ra,y:new La,Y:new $a,R:new ja,u:new Va,Q:new qa,q:new Ra,M:new Ha,L:new Wa,w:new Ya,I:new Ga,d:new Xa,D:new Ja,E:new Za,e:new th,c:new eh,i:new ih,a:new sh,b:new rh,B:new oh,h:new nh,H:new ah,K:new hh,k:new lh,m:new uh,s:new ch,S:new dh,X:new ph,x:new mh,t:new fh,T:new vh},gh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,yh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,wh=/^'([^]*?)'?$/,_h=/''/g,xh=/\S/,kh=/[a-zA-Z]/;function Ch(t,e,i,s){var r,o,n,a,h,l,u,c,d,p,m,f,v,b,g,y,w,_;Yo(3,arguments);var x=String(t),k=String(e),C=on(),A=null!==(r=null!==(o=null==s?void 0:s.locale)&&void 0!==o?o:C.locale)&&void 0!==r?r:Pn;if(!A.match)throw new RangeError("locale must contain match property");var E=Xo(null!==(n=null!==(a=null!==(h=null!==(l=null==s?void 0:s.firstWeekContainsDate)&&void 0!==l?l:null==s||null===(u=s.locale)||void 0===u||null===(c=u.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==h?h:C.firstWeekContainsDate)&&void 0!==a?a:null===(d=C.locale)||void 0===d||null===(p=d.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==n?n:1);if(!(E>=1&&E<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var T=Xo(null!==(m=null!==(f=null!==(v=null!==(b=null==s?void 0:s.weekStartsOn)&&void 0!==b?b:null==s||null===(g=s.locale)||void 0===g||null===(y=g.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==v?v:C.weekStartsOn)&&void 0!==f?f:null===(w=C.locale)||void 0===w||null===(_=w.options)||void 0===_?void 0:_.weekStartsOn)&&void 0!==m?m:0);if(!(T>=0&&T<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(""===k)return""===x?Uo(i):new Date(NaN);var D,S={firstWeekContainsDate:E,weekStartsOn:T,locale:A},M=[new ia],z=k.match(yh).map((function(t){var e=t[0];return e in bn?(0,bn[e])(t,A.formatLong):t})).join("").match(gh),I=[],P=Vn(z);try{var O=function(){var e=D.value;null!=s&&s.useAdditionalWeekYearTokens||!xn(e)||kn(e,k,t),null!=s&&s.useAdditionalDayOfYearTokens||!_n(e)||kn(e,k,t);var i=e[0],r=bh[i];if(r){var o=r.incompatibleTokens;if(Array.isArray(o)){var n=I.find((function(t){return o.includes(t.token)||t.token===i}));if(n)throw new RangeError("The format string mustn't contain `".concat(n.fullToken,"` and `").concat(e,"` at the same time"))}else if("*"===r.incompatibleTokens&&I.length>0)throw new RangeError("The format string mustn't contain `".concat(e,"` and any other token at the same time"));I.push({token:i,fullToken:e});var a=r.run(x,e,A.match,S);if(!a)return{v:new Date(NaN)};M.push(a.setter),x=a.rest}else{if(i.match(kh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+i+"`");if("''"===e?e="'":"'"===i&&(e=Ah(e)),0!==x.indexOf(e))return{v:new Date(NaN)};x=x.slice(e.length)}};for(P.s();!(D=P.n()).done;){var B=O();if("object"===Wo(B))return B.v}}catch(t){P.e(t)}finally{P.f()}if(x.length>0&&xh.test(x))return new Date(NaN);var F=M.map((function(t){return t.priority})).sort((function(t,e){return e-t})).filter((function(t,e,i){return i.indexOf(t)===e})).map((function(t){return M.filter((function(e){return e.priority===t})).sort((function(t,e){return e.subPriority-t.subPriority}))})).map((function(t){return t[0]})),N=Uo(i);if(isNaN(N.getTime()))return new Date(NaN);var L,$=Ko(N,gn(N)),j={},V=Vn(F);try{for(V.s();!(L=V.n()).done;){var q=L.value;if(!q.validate($,S))return new Date(NaN);var R=q.set($,j,S);Array.isArray(R)?($=R[0],qn(j,R[1])):$=R}}catch(t){V.e(t)}finally{V.f()}return $}function Ah(t){return t.match(wh)[1].replace(_h,"'")}function Eh(t,e){Yo(2,arguments);var i=Uo(t),s=Uo(e);return i.getTime()>s.getTime()}function Th(t,e){Yo(2,arguments);var i=Uo(t),s=Uo(e);return i.getTime()<s.getTime()}const Dh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.formatDate=t=>{const{year:e,month:i,day:s}=t;return function(t,e,i){var s,r,o,n,a,h,l,u,c,d,p,m,f,v,b,g,y,w;Yo(2,arguments);var _=String(e),x=on(),k=null!==(s=null!==(r=null==i?void 0:i.locale)&&void 0!==r?r:x.locale)&&void 0!==s?s:Pn,C=Xo(null!==(o=null!==(n=null!==(a=null!==(h=null==i?void 0:i.firstWeekContainsDate)&&void 0!==h?h:null==i||null===(l=i.locale)||void 0===l||null===(u=l.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:x.firstWeekContainsDate)&&void 0!==n?n:null===(c=x.locale)||void 0===c||null===(d=c.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==o?o:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var A=Xo(null!==(p=null!==(m=null!==(f=null!==(v=null==i?void 0:i.weekStartsOn)&&void 0!==v?v:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==f?f:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(A>=0&&A<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!k.localize)throw new RangeError("locale must contain localize property");if(!k.formatLong)throw new RangeError("locale must contain formatLong property");var E=Uo(t);if(!Qo(E))throw new RangeError("Invalid time value");var T=gn(E),D=Ko(E,T),S={firstWeekContainsDate:C,weekStartsOn:A,locale:k,_originalDate:E};return _.match(Bn).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,bn[e])(t,k.formatLong):t})).join("").match(On).map((function(s){if("''"===s)return"'";var r=s[0];if("'"===r)return $n(s);var o=cn[r];if(o)return null!=i&&i.useAdditionalWeekYearTokens||!xn(s)||kn(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!_n(s)||kn(s,e,String(t)),o(D,s,k.localize,S);if(r.match(Ln))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return s})).join("")}(new Date(e,i,s),this.dateFormat||"yyyy-MM-dd")},this.parseDate=t=>{const e=Ch(t,this.dateFormat||"yyyy-MM-dd",new Date);return{year:e.getFullYear(),month:e.getMonth(),day:e.getDate()}},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){var t,e;this.minDate=Ch((null===(t=this.validation.min)||void 0===t?void 0:t.toString())||"","yyyy-MM-dd",new Date),this.maxDate=Ch((null===(e=this.validation.max)||void 0===e?void 0:e.toString())||"","yyyy-MM-dd",new Date)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.datePicker=this.element.shadowRoot.querySelector("vaadin-date-picker"),this.inputReference=this.element.shadowRoot.querySelector("input"),this.datePicker.i18n=Object.assign(Object.assign({},this.datePicker.i18n),{formatDate:this.formatDate,parseDate:this.parseDate}),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}handleInput(t){this.value=t.target.value,this.touched=!0,this.valueAsDate=Ch(this.value||"","yyyy-MM-dd",new Date),this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return!Th(this.valueAsDate,this.minDate)&&!Eh(this.valueAsDate,this.maxDate)&&this.inputReference.validity.valid}setErrorMessage(){return Th(this.valueAsDate,this.minDate)||Eh(this.valueAsDate,this.maxDate)?r("dateError2",this.language):this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?r("dateError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"date__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`date__wrapper ${this.autofilled?"date__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("label",{class:`date__label ${this.validation.mandatory?"date__label--required":""}}`,htmlFor:`${this.name}__input`},this.displayName," ",this.validation.mandatory?"*":""),i("vaadin-date-picker",{id:`${this.name}__input`,type:"date",class:`date__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onChange:t=>this.handleInput(t),onBlur:this.handleBlur}),i("small",{class:"date__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"date__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Dh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.date{font-family:"Roboto";font-style:normal}.date__wrapper{position:relative;width:100%;padding-top:26px}.date__wrapper--autofilled{pointer-events:none}.date__wrapper--autofilled .date__label{color:#979797}.date__wrapper--autofilled .date__input::part(input-field){color:#979797}.date__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841;position:absolute;top:0;left:0}.date__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.date__input{border:none;width:inherit;position:relative}.date__input[focused]::part(input-field){border-color:#3E3E3E}.date__input[invalid]::part(input-field){border-color:#cc0000b3}.date__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.date__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.date__tooltip-icon{position:absolute;right:0;bottom:10px}.date__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.date__tooltip.visible{opacity:1}';const Sh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"email__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`email__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"email__wrapper--flex"},i("label",{class:"email__label "+(this.validation.mandatory?"email__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"email__wrapper--relative"},this.tooltip&&i("img",{class:"email__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{id:`${this.name}__input`,type:"email",class:`email__input ${t}`,value:this.defaultValue,readOnly:this.autofilled,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"email__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Sh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.email{font-family:"Roboto";font-style:normal}.email__wrapper{position:relative;width:100%}.email__wrapper--autofilled{pointer-events:none}.email__wrapper--autofilled .email__label{color:#979797}.email__wrapper--autofilled .email__input{color:#979797}.email__wrapper--flex{display:flex;gap:5px}.email__wrapper--relative{position:relative}.email__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.email__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.email__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.email__input:focus{outline-color:#3E3E3E}.email__input--invalid{border:2px solid #cc0000b3}.email__input::placeholder{color:#979797}.email__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.email__tooltip-icon{width:16px;height:auto}.email__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.email__tooltip.visible{opacity:1}';const Mh=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.touched=!0},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}))}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}return this.inputReference.validity.rangeUnderflow||this.inputReference.validity.rangeOverflow?r("numberLengthError",this.language,{values:{min:this.validation.min,max:this.validation.max}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"number__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`number__wrapper ${this.autofilled?"number__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"number__wrapper--flex"},i("label",{class:"number__label "+(this.validation.mandatory?"number__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"number__wrapper--relative"},this.tooltip&&i("img",{class:"number__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{ref:t=>this.inputReference=t,type:"number",value:this.defaultValue,readOnly:this.autofilled,id:`${this.name}__input`,class:`number__input ${t}`,pattern:this.validationPattern,placeholder:`${this.placeholder}`,required:this.validation.mandatory,max:this.validation.max,min:this.validation.min,onInput:this.handleInput,onBlur:this.handleBlur}),i("small",{class:"number__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Mh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.number{font-family:"Roboto";font-style:normal}.number__wrapper{position:relative;width:100%}.number__wrapper--autofilled{pointer-events:none}.number__wrapper--autofilled .number__label{color:#979797}.number__wrapper--autofilled .number__input{color:#979797}.number__wrapper--flex{display:flex;gap:5px}.number__wrapper--relative{position:relative}.number__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.number__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.number__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE;-moz-appearance:textfield;}.number__input:focus{outline-color:#3E3E3E}.number__input::-webkit-outer-spin-button,.number__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number__input--invalid{border:2px solid #cc0000b3}.number__input::placeholder{color:#979797}.number__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.number__tooltip-icon{width:16px;height:auto}.number__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.number__tooltip.visible{opacity:1}',
3126
3128
  /**
3127
3129
  * @license
3128
3130
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
3129
3131
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3130
3132
  */
3131
- ct("vaadin-text-field",co,{moduleId:"lumo-text-field-styles"});
3133
+ dt("vaadin-text-field",po,{moduleId:"lumo-text-field-styles"});
3132
3134
  /**
3133
3135
  * @license
3134
3136
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
3135
3137
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3136
3138
  */
3137
- const Mh=t=>class extends($o(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_setFocused(t){super._setFocused(t),t||this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
3139
+ const zh=t=>class extends(jo(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_setFocused(t){super._setFocused(t),t||this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
3138
3140
  /**
3139
3141
  * @license
3140
3142
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
3141
3143
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3142
- */,zh=t=>class extends(Fo(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=Ms.debounce(this._inputDebouncer,Wi.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.')}}
3144
+ */,Ih=t=>class extends(No(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=zs.debounce(this._inputDebouncer,Yi.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.')}}
3143
3145
  /**
3144
3146
  * @license
3145
3147
  * Copyright (c) 2017 - 2022 Vaadin Ltd.
3146
3148
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3147
- */;ct("vaadin-text-field",jo,{moduleId:"vaadin-text-field-styles"});class Ih extends(zh(Mh(bt(Rs(Ni))))){static get is(){return"vaadin-text-field"}static get template(){return Bi`
3149
+ */;dt("vaadin-text-field",Vo,{moduleId:"vaadin-text-field-styles"});class Ph extends(Ih(zh(gt(Hs(Li))))){static get is(){return"vaadin-text-field"}static get template(){return Fi`
3148
3150
  <style>
3149
3151
  [part='input-field'] {
3150
3152
  flex-grow: 0;
@@ -3179,7 +3181,7 @@ const Mh=t=>class extends($o(t)){static get properties(){return{autocomplete:{ty
3179
3181
  </div>
3180
3182
  </div>
3181
3183
  <slot name="tooltip"></slot>
3182
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength"]}static get constraints(){return[...super.constraints,"maxlength","minlength"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new lr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new dr(this.inputElement,this._labelController)),this._tooltipController=new Js(this),this._tooltipController.setPosition("top"),this.addController(this._tooltipController)}}customElements.define(Ih.is,Ih),ct("vaadin-password-field-button",[no,d`
3184
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength"]}static get constraints(){return[...super.constraints,"maxlength","minlength"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new pr(this.inputElement,this._labelController)),this._tooltipController=new Ks(this),this._tooltipController.setPosition("top"),this.addController(this._tooltipController)}}customElements.define(Ph.is,Ph),dt("vaadin-password-field-button",[ao,d`
3183
3185
  :host {
3184
3186
  position: absolute;
3185
3187
  right: 0;
@@ -3192,7 +3194,7 @@ const Mh=t=>class extends($o(t)){static get properties(){return{autocomplete:{ty
3192
3194
  background: transparent;
3193
3195
  outline: none;
3194
3196
  }
3195
- `],{moduleId:"lumo-password-field-button"}),ct("vaadin-password-field",[co,d`
3197
+ `],{moduleId:"lumo-password-field-button"}),dt("vaadin-password-field",[po,d`
3196
3198
  [part='reveal-button']::before {
3197
3199
  content: var(--lumo-icons-eye);
3198
3200
  }
@@ -3216,7 +3218,7 @@ const Mh=t=>class extends($o(t)){static get properties(){return{autocomplete:{ty
3216
3218
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
3217
3219
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3218
3220
  */
3219
- class Ph extends ho{static get is(){return"vaadin-password-field-button"}static get template(){return Bi`
3221
+ class Oh extends lo{static get is(){return"vaadin-password-field-button"}static get template(){return Fi`
3220
3222
  <style>
3221
3223
  :host {
3222
3224
  display: block;
@@ -3227,17 +3229,17 @@ class Ph extends ho{static get is(){return"vaadin-password-field-button"}static
3227
3229
  }
3228
3230
  </style>
3229
3231
  <slot name="tooltip"></slot>
3230
- `}}customElements.define(Ph.is,Ph);
3232
+ `}}customElements.define(Oh.is,Oh);
3231
3233
  /**
3232
3234
  * @license
3233
3235
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
3234
3236
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3235
3237
  */
3236
- const Oh=Bi`
3238
+ const Bh=Fi`
3237
3239
  <div part="reveal-button" slot="suffix">
3238
3240
  <slot name="reveal"></slot>
3239
3241
  </div>
3240
- `;let Bh;class Fh extends Ih{static get is(){return"vaadin-password-field"}static get template(){if(!Bh){Bh=super.template.cloneNode(!0);const t=Oh.content.querySelector('[part="reveal-button"]');Bh.content.querySelector('[part="input-field"]').appendChild(t)}return Bh}static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n.*)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Xs(this,"reveal",(()=>document.createElement("vaadin-password-field-button")),((t,e)=>{e.disabled=t.disabled,e.addEventListener("click",t.__boundRevealButtonClick),e.addEventListener("mousedown",t.__boundRevealButtonMouseDown)})),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}customElements.define(Fh.is,Fh);const Nh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.isDuplicateInput&&!this.originalValid)return r("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},r("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},r(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,r(`${t.ruleKey}`,this.language)?r(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"password__wrapper--flex"},i("label",{class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"password__wrapper--relative"},this.tooltip&&i("img",{class:"password__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Nh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:#979797}.password__wrapper--autofilled .password__input::part(input-field){color:#979797}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.password__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.password__input{width:inherit;border:none;margin-bottom:5px}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__input>input:placeholder-shown{color:#979797}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:#FFFFFF;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;height:150px;border:1px solid #B0B0B0}.password__complexity--strength{display:flex;justify-content:space-evenly}.password__complexity--strength meter::-webkit-meter-optimum-value{background:#1F1F1F}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid #B0B0B0;border-right:0 solid #B0B0B0;border-left:1px solid #B0B0B0;border-bottom:0 solid #B0B0B0;bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:#FFFFFF}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const Lh=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"radio__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};Lh.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:#cc0000b3}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}",ct("vaadin-combo-box-overlay",[Dr,ro,d`
3242
+ `;let Fh;class Nh extends Ph{static get is(){return"vaadin-password-field"}static get template(){if(!Fh){Fh=super.template.cloneNode(!0);const t=Bh.content.querySelector('[part="reveal-button"]');Fh.content.querySelector('[part="input-field"]').appendChild(t)}return Fh}static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n.*)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Js(this,"reveal",(()=>document.createElement("vaadin-password-field-button")),((t,e)=>{e.disabled=t.disabled,e.addEventListener("click",t.__boundRevealButtonClick),e.addEventListener("mousedown",t.__boundRevealButtonMouseDown)})),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t.base)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}customElements.define(Nh.is,Nh);const Lh=class{constructor(i){t(this,i),this.sendOriginalValidityState=e(this,"sendOriginalValidityState",7),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.touched=!1,this.originalValid=!1,this.validationPattern="",this.duplicateInputValue=null,this.handleInput=t=>{this.value=t.target.value,this.calculateComplexity(this.value),this.showPopup=!0,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.showPopup=!1,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage()},this.handleFocus=()=>{this.showPopup=!0,this.calculateComplexity(this.value)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}valueChanged(){this.isDuplicateInput||(this.calculateComplexity(this.value),this.sendOriginalValidityState.emit({name:this.name,valid:this.setValidity()}))}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"duplicate"})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}originalValidityChangedHandler(t){this.isDuplicateInput&&(t.detail.valid?(this.originalValid=!0,this.isValid=this.setValidity()):(this.originalValid=!1,this.isValid=!1,""!==this.value&&(this.errorMessage=this.setErrorMessage())))}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.passwordButton=this.element.shadowRoot.querySelector("vaadin-password-field-button"),this.passwordButton.tabIndex=-1,this.defaultValue&&(this.value=this.defaultValue,this.calculateComplexity(this.value),this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.duplicateInputValue=this.defaultValue,this.touched=!0)),this.isValid=this.setValidity()}calculateComplexity(t){this.passwordComplexity=this.validation.custom.filter((t=>"regex"===t.rule)).map((e=>{const i=new RegExp(e.pattern).test(t);return{rule:e.displayName,ruleKey:e.errorKey,passed:i}}))}setValidity(){var t,e;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&!!(null===(t=this.passwordComplexity)||void 0===t?void 0:t.every((t=>t.passed)))&&(null===(e=this.inputReference)||void 0===e?void 0:e.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.isDuplicateInput&&!this.originalValid)return r("invalidOriginalPasswordError",this.language);if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"password__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}renderComplexityPopup(){const t=this.passwordComplexity.length,e=this.passwordComplexity.filter((t=>t.passed)).length/t,s=this.passwordComplexity.every((t=>t.passed));return i("div",{class:"password__complexity "+(this.showPopup?"":"password__complexity--hidden")},i("div",{class:"password__complexity--strength"},i("p",{class:"password__complexity--text"},r("passwordStrength",this.language)," ",i("span",{class:"password__complexity--text-bold"},r(s?"passwordStrengthStrong":"passwordStrengthWeak",this.language))),i("meter",{value:e,min:"0",max:"1"})),i("div",null,this.passwordComplexity.map(((t,e)=>i("div",{key:e},i("input",{class:"password__complexity--checkbox",type:"checkbox",checked:t.passed,disabled:!0}),i("span",null,r(`${t.ruleKey}`,this.language)?r(`${t.ruleKey}`,this.language):t.rule))))))}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`password__wrapper ${this.autofilled?"password__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"password__wrapper--flex"},i("label",{class:"password__label "+(this.validation.mandatory?"password__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"password__wrapper--relative"},this.tooltip&&i("img",{class:"password__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-password-field",{type:"password",id:`${this.name}__input`,class:`password__input ${t}`,name:this.name,readOnly:this.autofilled,value:this.defaultValue,required:this.validation.mandatory,maxlength:this.validation.maxLength,minlength:this.validation.minLength,pattern:this.validationPattern,placeholder:`${this.placeholder}`,onInput:this.handleInput,onBlur:this.handleBlur,onFocus:this.handleFocus}),i("small",{class:"password__error-message"},this.errorMessage),this.passwordComplexity&&this.showPopup&&!this.isDuplicateInput&&this.renderComplexityPopup())}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],value:["valueChanged"],emitValue:["emitValueHandler"]}}};Lh.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.password{font-family:"Roboto";font-style:normal}.password__wrapper{position:relative;width:100%}.password__wrapper--autofilled{pointer-events:none}.password__wrapper--autofilled .password__label{color:#979797}.password__wrapper--autofilled .password__input::part(input-field){color:#979797}.password__wrapper--flex{display:flex;gap:5px}.password__wrapper--relative{position:relative}.password__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.password__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.password__input{width:inherit;border:none;margin-bottom:5px}.password__input[focused]::part(input-field){border-color:#3E3E3E}.password__input[invalid]::part(input-field){border-color:#cc0000b3}.password__input::part(input-field){border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;width:100%;position:relative;border:2px solid #DEE1EE}.password__input>input:placeholder-shown{color:#979797}.password__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.password__complexity{position:relative;padding:10px;display:flex;flex-direction:column;gap:20px;justify-content:center;margin-top:20px;font-weight:300;background:#FFFFFF;-webkit-border-radius:10px;-moz-border-radius:10px;border-radius:10px;height:150px;border:1px solid #B0B0B0}.password__complexity--strength{display:flex;justify-content:space-evenly}.password__complexity--strength meter::-webkit-meter-optimum-value{background:#1F1F1F}.password__complexity--strength meter::-moz-meter-bar{background:#B0B0B0}.password__complexity--hidden{display:none}.password__complexity--text-bold{font-weight:500}.password__complexity--checkbox{margin-right:5px}.password__complexity:after{content:"";position:absolute;width:25px;height:25px;border-top:1px solid #B0B0B0;border-right:0 solid #B0B0B0;border-left:1px solid #B0B0B0;border-bottom:0 solid #B0B0B0;bottom:92%;left:50%;margin-left:-25px;transform:rotate(45deg);margin-top:-25px;background-color:#FFFFFF}.password__tooltip-icon{width:16px;height:auto}.password__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.password__tooltip.visible{opacity:1}';const $h=class{constructor(i){t(this,i),this.sendInputValue=e(this,"sendInputValue",7),this.sendValidityState=e(this,"sendValidityState",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}validityStateHandler(t){this.sendValidityState.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(t){this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"radio__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){return i("fieldset",{class:`radio__fieldset ${this.name}__input`,ref:t=>this.stylingContainer=t},i("legend",{class:"radio__legend"},this.displayName,":"),this.optionsGroup.map((t=>i("div",{class:"radio__wrapper"},i("input",{type:"radio",class:"radio__input",id:`${t.label}__input`,ref:t=>this.inputReference=t,value:t.value,name:this.name,required:this.validation.mandatory,onClick:t=>this.handleClick(t)}),i("label",{htmlFor:`${t.label}__input`},t.label)))),i("small",{class:"radio__error-message"},this.errorMessage),this.tooltip&&i("img",{class:"radio__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};$h.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:#cc0000b3}.radio__tooltip-icon{position:absolute;right:0;bottom:10px}.radio__tooltip{position:absolute;bottom:35px;right:10px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.radio__tooltip.visible{opacity:1}",dt("vaadin-combo-box-overlay",[Sr,oo,d`
3241
3243
  [part='content'] {
3242
3244
  padding: 0;
3243
3245
  }
@@ -3327,7 +3329,7 @@ const Oh=Bi`
3327
3329
  transform: rotate(360deg);
3328
3330
  }
3329
3331
  }
3330
- `],{moduleId:"lumo-combo-box-overlay"});const $h=d`
3332
+ `],{moduleId:"lumo-combo-box-overlay"});const jh=d`
3331
3333
  :host {
3332
3334
  display: flex;
3333
3335
  align-items: center;
@@ -3407,7 +3409,7 @@ const Oh=Bi`
3407
3409
  width: var(--lumo-icon-size-m);
3408
3410
  height: var(--lumo-icon-size-m);
3409
3411
  }
3410
- `;ct("vaadin-item",$h,{moduleId:"lumo-item"}),ct("vaadin-combo-box-item",[$h,d`
3412
+ `;dt("vaadin-item",jh,{moduleId:"lumo-item"}),dt("vaadin-combo-box-item",[jh,d`
3411
3413
  :host {
3412
3414
  transition: background-color 100ms;
3413
3415
  overflow: hidden;
@@ -3419,7 +3421,7 @@ const Oh=Bi`
3419
3421
  box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
3420
3422
  }
3421
3423
  }
3422
- `],{moduleId:"lumo-combo-box-item"}),ct("vaadin-combo-box",[co,d`
3424
+ `],{moduleId:"lumo-combo-box-item"}),dt("vaadin-combo-box",[po,d`
3423
3425
  :host {
3424
3426
  outline: none;
3425
3427
  }
@@ -3433,7 +3435,7 @@ const Oh=Bi`
3433
3435
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3434
3436
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3435
3437
  */
3436
- class jh extends(bt(js(Ni))){static get template(){return Bi`
3438
+ class Vh extends(gt(Vs(Li))){static get template(){return Fi`
3437
3439
  <style>
3438
3440
  :host {
3439
3441
  display: block;
@@ -3447,13 +3449,13 @@ class jh extends(bt(js(Ni))){static get template(){return Bi`
3447
3449
  <div part="content">
3448
3450
  <slot></slot>
3449
3451
  </div>
3450
- `}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 Vh;customElements.define(jh.is,jh),
3452
+ `}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 qh;customElements.define(Vh.is,Vh),
3451
3453
  /**
3452
3454
  * @license
3453
3455
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3454
3456
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3455
3457
  */
3456
- ct("vaadin-combo-box-overlay",d`
3458
+ dt("vaadin-combo-box-overlay",d`
3457
3459
  #overlay {
3458
3460
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
3459
3461
  }
@@ -3463,7 +3465,7 @@ ct("vaadin-combo-box-overlay",d`
3463
3465
  flex-direction: column;
3464
3466
  height: 100%;
3465
3467
  }
3466
- `,{moduleId:"vaadin-combo-box-overlay-styles"});class qh extends(bo(so)){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Vh||(Vh=super.template.cloneNode(!0),Vh.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),Vh}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(qh.is,qh);
3468
+ `,{moduleId:"vaadin-combo-box-overlay-styles"});class Rh extends(go(ro)){static get is(){return"vaadin-combo-box-overlay"}static get template(){return qh||(qh=super.template.cloneNode(!0),qh.content.querySelector('[part~="overlay"]').removeAttribute("tabindex")),qh}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(Rh.is,Rh);
3467
3469
  /**
3468
3470
  * @license
3469
3471
  * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
@@ -3473,17 +3475,17 @@ ct("vaadin-combo-box-overlay",d`
3473
3475
  * Code distributed by Google as part of the polymer project is also
3474
3476
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3475
3477
  */
3476
- const Rh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Hh=Rh&&Rh[1]>=8,Wh={_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),Ui)}},_getReusables(t){let e,i,s;const r=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,h=this._physicalCount;let l=this._physicalTop+this._scrollOffset;const u=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=u-l):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(r.length>=h||i<=o);)if(t){if(a+r.length+1>=this._virtualCount)break;if(l+s>=u-this._scrollOffset)break;r.push(e),l+=s,e=(e+1)%h}else{if(n-r.length<=0)break;if(l+this._physicalSize-s<=c)break;r.push(e),l-=s,e=0===e?h-1:e-1}return{indexes:r,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)),Gi):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Ui))}},_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,Yi))},_iterateItems(t,e){let i,s,r,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],s=this._computeVidx(i),null!=(r=t.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=t.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=t.call(this,i,s)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Hh&&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(Os(),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 r=this._hiddenContentSize;for(;i<t&&s<=r;)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)}),Yi)},_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]=Ms.debounce(this._debouncers[t],i,e.bind(this)),Is(this._debouncers[t])}};class Yh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<1e3?(i=t,this._vidxOffset=0):(i=1e3,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),Os(),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){Os();let e=0,i=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*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"}),Os(),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(),Os()}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(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=Ms.debounce(this.__fixInvalidItemPositioningDebouncer,Wi.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=Ms.debounce(this.__scrollReorderDebouncer,Wi.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=Ms.debounce(this.__debouncerWheelAnimationFrame,Yi,(()=>{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=Ms.debounce(this._debouncerIgnoreNewWheel,Wi.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,r=e.indexOf(i)-s;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(Zr){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(Yh.prototype,Wh);class Gh{constructor(t){this.__adapter=new Yh(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}}
3478
+ const Hh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Wh=Hh&&Hh[1]>=8,Yh={_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),Qi)}},_getReusables(t){let e,i,s;const r=[],o=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,h=this._physicalCount;let l=this._physicalTop+this._scrollOffset;const u=this._scrollPosition,c=this._scrollBottom;for(t?(e=this._physicalStart,i=u-l):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-c);s=this._getPhysicalSizeIncrement(e),i-=s,!(r.length>=h||i<=o);)if(t){if(a+r.length+1>=this._virtualCount)break;if(l+s>=u-this._scrollOffset)break;r.push(e),l+=s,e=(e+1)%h}else{if(n-r.length<=0)break;if(l+this._physicalSize-s<=c)break;r.push(e),l-=s,e=0===e?h-1:e-1}return{indexes:r,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)),Ui):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Qi))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._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,Gi))},_iterateItems(t,e){let i,s,r,o;if(2===arguments.length&&e){for(o=0;o<e.length;o++)if(i=e[o],s=this._computeVidx(i),null!=(r=t.call(this,i,s)))return r}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(r=t.call(this,i,s)))return r;for(i=0;i<this._physicalStart;i++,s++)if(null!=(r=t.call(this,i,s)))return r}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Wh&&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(Bs(),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 r=this._hiddenContentSize;for(;i<t&&s<=r;)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)}),Gi)},_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]=zs.debounce(this._debouncers[t],i,e.bind(this)),Ps(this._debouncers[t])}};class Gh{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:r,reorderElements:o}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=r||s,this.reorderElements=o,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<1e3?(i=t,this._vidxOffset=0):(i=1e3,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),Bs(),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){Bs();let e=0,i=0;const s=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((r*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"}),Bs(),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(),Bs()}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(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=zs.debounce(this.__fixInvalidItemPositioningDebouncer,Yi.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=zs.debounce(this.__scrollReorderDebouncer,Yi.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=zs.debounce(this.__debouncerWheelAnimationFrame,Gi,(()=>{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=zs.debounce(this._debouncerIgnoreNewWheel,Yi.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,r=e.indexOf(i)-s;if(r>0)for(let t=0;t<r;t++)this.elementsContainer.appendChild(e[t]);else if(r<0)for(let t=e.length+r;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(to){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(Gh.prototype,Yh);class Uh{constructor(t){this.__adapter=new Gh(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}}
3477
3479
  /**
3478
3480
  * @license
3479
3481
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3480
3482
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3481
- */const Uh=class{toString(){return""}};
3483
+ */const Qh=class{toString(){return""}};
3482
3484
  /**
3483
3485
  * @license
3484
3486
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3485
3487
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3486
- */class Qh extends Ni{static get is(){return"vaadin-combo-box-scroller"}static get template(){return Bi`
3488
+ */class Xh extends Li{static get is(){return"vaadin-combo-box-scroller"}static get template(){return Fi`
3487
3489
  <style>
3488
3490
  :host {
3489
3491
  display: block;
@@ -3510,13 +3512,13 @@ const Rh=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Hh=Rh&
3510
3512
  <div id="selector">
3511
3513
  <slot></slot>
3512
3514
  </div>
3513
- `}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}-${Qs()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.setAttribute("role","listbox"),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new Gh({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 r=s.getBoundingClientRect(),o=this.getBoundingClientRect(),n=r.bottom-o.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 Uh)&&(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,r=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:r,renderer:this.renderer,focused:this.__isItemFocused(s,e)}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",this.__getAriaRole(e)),t.setAttribute("aria-selected",r.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 Uh&&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(Qh.is,Qh);
3515
+ `}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}-${Xs()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.setAttribute("role","listbox"),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling(),this.__virtualizer=new Uh({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 r=s.getBoundingClientRect(),o=this.getBoundingClientRect(),n=r.bottom-o.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 Qh)&&(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,r=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:r,renderer:this.renderer,focused:this.__isItemFocused(s,e)}),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",this.__getAriaRole(e)),t.setAttribute("aria-selected",r.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 Qh&&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(Xh.is,Xh);
3514
3516
  /**
3515
3517
  * @license
3516
3518
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3517
3519
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3518
3520
  */
3519
- const Xh=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 Uh},__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 Uh: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,r)=>{if(this._pendingRequests[t]!==i)return;const o=this.filteredItems?[...this.filteredItems]:[];o.splice(e.page*e.pageSize,s.length,...s),this.filteredItems=o,this.opened||this._isInputFocused()||this._commitValue(),void 0!==r&&(this.size=r),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 r=parseInt(i[s]);r>=e&&this._pendingRequests[r]([],t)}}}}
3521
+ const Jh=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 Qh},__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 Qh: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,r)=>{if(this._pendingRequests[t]!==i)return;const o=this.filteredItems?[...this.filteredItems]:[];o.splice(e.page*e.pageSize,s.length,...s),this.filteredItems=o,this.opened||this._isInputFocused()||this._commitValue(),void 0!==r&&(this.size=r),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 r=parseInt(i[s]);r>=e&&this._pendingRequests[r]([],t)}}}}
3520
3522
  /**
3521
3523
  * @license
3522
3524
  * Copyright (c) 2021 - 2022 Vaadin Ltd.
@@ -3527,12 +3529,12 @@ const Xh=t=>class extends t{static get properties(){return{pageSize:{type:Number
3527
3529
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3528
3530
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3529
3531
  */
3530
- function Jh(t){return null!=t}function Kh(t,e){return t.findIndex((t=>!(t instanceof Uh)&&e(t)))}const Zh=t=>class extends(As(ks(rr(Li(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 Vo(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,r,o,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:r,itemIdPath:o,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&&ir(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()||to||this.inputElement&&this.inputElement.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",(()=>{to&&!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(){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),this._focusedIndex=-1}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)}}_valueChanged(t,e){""===t&&void 0===e||(Jh(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 r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r: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&&Jh(e)?Kh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Kh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Uh||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())}}
3532
+ function Kh(t){return null!=t}function Zh(t,e){return t.findIndex((t=>!(t instanceof Qh)&&e(t)))}const tl=t=>class extends(Es(Cs(or($i(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 qo(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,r,o,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:r,itemIdPath:o,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&&sr(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()||eo||this.inputElement&&this.inputElement.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",(()=>{eo&&!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(){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),this._focusedIndex=-1}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)}}_valueChanged(t,e){""===t&&void 0===e||(Kh(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 r=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=r>-1?r: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&&Kh(e)?Zh(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Zh(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),t.detail.item instanceof Qh||this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}__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())}}
3531
3533
  /**
3532
3534
  * @license
3533
3535
  * Copyright (c) 2015 - 2022 Vaadin Ltd.
3534
3536
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3535
- */;ct("vaadin-combo-box",jo,{moduleId:"vaadin-combo-box-styles"});class tl extends(Xh(Zh(zh($o(bt(Rs(Ni))))))){static get is(){return"vaadin-combo-box"}static get template(){return Bi`
3537
+ */;dt("vaadin-combo-box",Vo,{moduleId:"vaadin-combo-box-styles"});class el extends(Jh(tl(Ih(jo(gt(Hs(Li))))))){static get is(){return"vaadin-combo-box"}static get template(){return Fi`
3536
3538
  <style>
3537
3539
  :host([opened]) {
3538
3540
  pointer-events: auto;
@@ -3578,4 +3580,4 @@ function Jh(t){return null!=t}function Kh(t,e){return t.findIndex((t=>!(t instan
3578
3580
  ></vaadin-combo-box-overlay>
3579
3581
 
3580
3582
  <slot name="tooltip"></slot>
3581
- `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new lr(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new dr(this.inputElement,this._labelController)),this._tooltipController=new Js(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(tl.is,tl);const el=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.handleChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"select__wrapper--flex"},i("label",{class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{class:"select__wrapper--relative"},this.tooltip&&i("img",{class:"select__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{class:"select__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};el.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:#979797}.select__wrapper--autofilled .select__input::part(input-field){color:#979797}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const il=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"tel__wrapper--flex-label"},i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"tel__wrapper--relative"},this.tooltip&&i("img",{class:"tel__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};il.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:#979797}.tel__wrapper--autofilled .tel__input::part(input-field){color:#979797}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const sl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}handleClick(){"username"===this.name.toLowerCase()&&window.postMessage({type:"registrationUsernameClicked"},window.location.href)}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{class:"text__wrapper--flex"},i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"text__wrapper--relative"},this.tooltip&&i("img",{class:"text__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur,onClick:this.handleClick}),i("small",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};sl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:#979797}.text__wrapper--autofilled .text__input::part(input-field){color:#979797}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{Ar as checkbox_group_input,Er as checkbox_input,Th as date_input,Dh as email_input,Sh as number_input,Nh as password_input,Lh as radio_input,el as select_input,il as tel_input,sl as text_input}
3583
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ur(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new pr(this.inputElement,this._labelController)),this._tooltipController=new Ks(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(el.is,el);const il=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.options=[],this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.touched=!1,this.handleChange=t=>{this.touched=!0,this.value=t.target.value,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.displayedOptions=this.options.map((t=>({label:t.label,value:t.value.toUpperCase()})))}componentWillLoad(){if(this.action&&!this.options.length&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getOptions(t).then((t=>{const e=Object.keys(t)[0];this.displayedOptions=t[e].map((t=>({label:t.Name,value:t.Alpha2Code})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.inputReference=this.element.shadowRoot.querySelector("input"),this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue.toUpperCase(),this.valueHandler({name:this.name,value:this.value}))}getOptions(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}setValidity(){return this.inputReference.validity.valid}setErrorMessage(){if(this.inputReference.validity.valueMissing)return r("requiredError",this.language)}renderTooltip(){return this.showTooltip?i("div",{class:"select__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`select__wrapper ${this.autofilled?"select__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"select__wrapper--flex"},i("label",{class:"select__label",htmlFor:`${this.name}__input`},`${this.displayName} ${this.validation.mandatory?"*":""}`),i("div",{class:"select__wrapper--relative"},this.tooltip&&i("img",{class:"select__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("vaadin-combo-box",{name:this.name,id:`${this.name}__input`,class:`select__input ${t} ${this.autofilled?"select__input--autofilled":""}`,"item-label-path":"label","item-value-path":"value",readOnly:this.autofilled,required:this.validation.mandatory,value:this.defaultValue,placeholder:`${this.placeholder}`,items:this.displayedOptions,onChange:this.handleChange}),i("small",{class:"select__error-message"},this.errorMessage))}get element(){return s(this)}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};il.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.select{font-family:"Roboto";font-style:normal}.select__wrapper{position:relative;width:100%}.select__wrapper--autofilled{pointer-events:none}.select__wrapper--autofilled .select__label{color:#979797}.select__wrapper--autofilled .select__input::part(input-field){color:#979797}.select__wrapper--flex{display:flex;gap:5px}.select__wrapper--relative{position:relative}.select__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.select__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.select__input{border:none;width:inherit;position:relative}.select__input[focused]::part(input-field){border-color:#3E3E3E}.select__input[invalid]::part(input-field){border-color:#cc0000b3}.select__input vaadin-date-picker-overlay-content>vaadin-button{color:#1F1F1F}.select__input vaadin-month-calendar::part(selected date){background-color:red}.select__input::part(input-field){border-radius:4px;background-color:#FFFFFF;border:2px solid #DEE1EE;color:#2A2E3F;border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.select__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.select__tooltip-icon{width:16px;height:auto}.select__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.select__tooltip.visible{opacity:1}';const sl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.clientStyling="",this.limitStylingAppends=!1,this.showTooltip=!1,this.validationPattern="",this.touched=!1,this.handleInput=t=>{this.phoneValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.emitValueHandler(!0)}),500)},this.handleBlur=()=>{this.isValid=this.setValidity(),this.touched=!0,this.errorMessage=this.setErrorMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}validityStateHandler(t){this.sendValidityState.emit(t)}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value,type:"tel"})}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}connectedCallback(){this.validationPattern=this.setPattern(),this.defaultValue&&(this.prefixValue=this.defaultValue.prefix?this.defaultValue.prefix:this.defaultValue,this.phoneValue=this.defaultValue.phone||null)}componentWillLoad(){if(this.action&&"GET"==this.action.split(" ")[0]){const t=this.action.split(" ")[1];return this.getPhoneCodes(t).then((t=>{this.phoneCodesOptions=t.phoneCodes.map((t=>({label:t.Prefix,value:t.Prefix})))}))}}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.isValid=this.setValidity(),this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value,type:"tel"}))}getPhoneCodes(t){const e=new URL(t);return new Promise(((t,i)=>{fetch(e.href).then((t=>t.json())).then((e=>{t(e)})).catch((t=>{console.error(t),i(t)}))}))}handlePrefixInput(t){this.prefixValue=t.target.value,this.value={prefix:this.prefixValue,phone:this.phoneValue},this.emitValueHandler(!0)}setValidity(){return this.inputReference.validity.valid}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}return this.inputReference.validity.tooShort||this.inputReference.validity.tooLong?r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}}):this.inputReference.validity.valueMissing?r("requiredError",this.language):void 0}renderTooltip(){return this.showTooltip?i("div",{class:"tel__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`tel__wrapper ${this.autofilled?"tel__wrapper--autofilled":""} ${this.name}__input`,ref:t=>this.stylingContainer=t},i("div",{class:"tel__wrapper--flex-label"},i("label",{class:"tel__label "+(this.validation.mandatory?"tel__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"tel__wrapper--relative"},this.tooltip&&i("img",{class:"tel__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("div",{class:`tel__wrapper--flex ${t}`},i("vaadin-combo-box",{class:"tel__prefix",items:this.phoneCodesOptions,value:this.prefixValue,readOnly:this.autofilled,onChange:t=>this.handlePrefixInput(t)}),i("input",{type:"tel",ref:t=>this.inputReference=t,id:`${this.name}__input`,readOnly:this.autofilled,class:"tel__input",value:this.phoneValue,placeholder:`${this.placeholder}`,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,pattern:this.validationPattern,onInput:this.handleInput,onBlur:this.handleBlur})),i("small",{class:"tel__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};sl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.tel{font-family:"Roboto";font-style:normal}.tel__wrapper{position:relative;width:100%}.tel__wrapper--autofilled{pointer-events:none}.tel__wrapper--autofilled .tel__label{color:#979797}.tel__wrapper--autofilled .tel__input::part(input-field){color:#979797}.tel__wrapper--flex{width:inherit;display:flex;align-items:stretch;border-radius:4px;border:2px solid #DEE1EE}.tel__wrapper--flex:focus-within{border:2px solid #3E3E3E}.tel__wrapper--flex--invalid{border:2px solid #cc0000b3}.tel__wrapper--flex-label{display:flex;gap:5px}.tel__wrapper--flex--relative{position:relative}.tel__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.tel__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.tel__prefix{width:120px}.tel__prefix[focus]{outline:none}.tel__prefix::part(input-field){border-radius:0 4px 4px 0;background-color:#DEE1EE;color:#1F1F1F;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px}.tel__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;border:none;padding:10px 20px;width:inherit;position:relative;-moz-appearance:textfield;}.tel__input:focus{outline:none}.tel__input::-webkit-outer-spin-button,.tel__input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.tel__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.tel__tooltip-icon{width:16px;height:auto}.tel__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.tel__tooltip.visible{opacity:1}';const rl=class{constructor(i){t(this,i),this.sendValidityState=e(this,"sendValidityState",7),this.sendInputValue=e(this,"sendInputValue",7),this.defaultValue="",this.clientStyling="",this.errorMessage="",this.limitStylingAppends=!1,this.showTooltip=!1,this.value="",this.validationPattern="",this.duplicateInputValue=null,this.touched=!1,this.handleInput=t=>{this.value=t.target.value,this.touched=!0,this.debounceTime&&clearTimeout(this.debounceTime),this.debounceTime=setTimeout((()=>{this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name}),this.emitValueHandler(!0)}),500)},this.handleBlur=t=>{this.value=t.target.value,this.touched=!0,this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage(),this.validityStateHandler({valid:this.isValid,name:this.name})},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)}}validityChanged(){this.validityStateHandler({valid:this.isValid,name:this.name}),1==this.emitValue&&this.valueHandler({name:this.name,value:this.value})}emitValueHandler(t){1==t&&this.isValid&&this.valueHandler({name:this.name,value:this.value})}validityStateHandler(t){this.sendValidityState.emit(t)}valueHandler(t){this.sendInputValue.emit(t)}handleClickOutside(t){t.composedPath()[0]!==this.tooltipIconReference&&t.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}valueChangedHandler(t){this.isDuplicateInput&&this.name===t.detail.name+"Duplicate"&&(this.duplicateInputValue=t.detail.value,this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())),this.name===t.detail.name+"Duplicate"&&this.name.replace("Duplicate","")===t.detail.name&&!0===this.touched&&(this.isValid=this.setValidity(),this.errorMessage=this.setErrorMessage())}connectedCallback(){this.validationPattern=this.setPattern()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}componentDidLoad(){this.defaultValue&&(this.value=this.defaultValue,this.valueHandler({name:this.name,value:this.value}),this.isDuplicateInput&&(this.touched=!0)),this.isValid=this.setValidity()}handleClick(){"username"===this.name.toLowerCase()&&window.postMessage({type:"registrationUsernameClicked"},window.location.href)}setValidity(){var t;return(!this.isDuplicateInput||this.duplicateInputValue===this.value)&&(null===(t=this.inputReference)||void 0===t?void 0:t.validity.valid)}setPattern(){var t,e;if((null===(t=this.validation.custom)||void 0===t?void 0:t.length)>0)return null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.pattern}setErrorMessage(){var t,e,i,s;if(this.inputReference.validity.patternMismatch){const i=null===(t=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===t?void 0:t.errorKey,s=null===(e=this.validation.custom.find((t=>"regex"===t.rule)))||void 0===e?void 0:e.errorMessage;return r(`${i}`,this.language)?r(`${i}`,this.language):s}if(this.inputReference.validity.tooShort||this.inputReference.validity.tooLong)return r("lengthError",this.language,{values:{minLength:this.validation.minLength,maxLength:this.validation.maxLength}});if(this.inputReference.validity.valueMissing)return r("requiredError",this.language);if(this.isDuplicateInput&&this.duplicateInputValue!==this.value){const t=null===(i=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===i?void 0:i.errorKey,e=null===(s=this.validation.custom.find((t=>"duplicate-input"===t.rule)))||void 0===s?void 0:s.errorMessage;return r(`${t}`,this.language)?r(`${t}`,this.language):e}}renderTooltip(){return this.showTooltip?i("div",{class:"text__tooltip "+(this.showTooltip?"visible":""),ref:t=>this.tooltipReference=t,innerHTML:this.tooltip}):null}render(){let t="";return this.touched&&(t=1==this.isValid||null==this.isValid?"":"text__input--invalid"),i("div",{class:`text__wrapper ${this.name}__input ${this.autofilled?"text__wrapper--autofilled":""}`,ref:t=>this.stylingContainer=t},i("div",{class:"text__wrapper--flex"},i("label",{class:"text__label "+(this.validation.mandatory?"text__label--required":""),htmlFor:`${this.name}__input`},this.displayName),i("div",{class:"text__wrapper--relative"},this.tooltip&&i("img",{class:"text__tooltip-icon",src:o,alt:"",ref:t=>this.tooltipIconReference=t,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip())),i("input",{name:this.name,id:`${this.name}__input`,value:this.defaultValue,type:"text",class:`text__input ${t}`,placeholder:`${this.placeholder}`,ref:t=>this.inputReference=t,readOnly:this.autofilled,pattern:this.validationPattern,required:this.validation.mandatory,minlength:this.validation.minLength,maxlength:this.validation.maxLength,onInput:this.handleInput,onBlur:this.handleBlur,onClick:this.handleClick}),i("small",{class:"text__error-message"},this.errorMessage))}static get watchers(){return{isValid:["validityChanged"],emitValue:["emitValueHandler"]}}};rl.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.text{font-family:"Roboto";font-style:normal}.text__wrapper{position:relative;width:100%}.text__wrapper--autofilled{pointer-events:none}.text__wrapper--autofilled .text__label{color:#979797}.text__wrapper--autofilled .text__input::part(input-field){color:#979797}.text__wrapper--flex{display:flex;gap:5px}.text__wrapper--relative{position:relative}.text__label{font-family:inherit;font-style:normal;font-weight:500;font-size:16px;line-height:20px;color:#2A3841}.text__label--required::after{content:"*";font-family:inherit;color:#2A3841;margin-left:2px}.text__input{border-radius:4px;background-color:transparent;font-family:inherit;font-style:normal;font-weight:300;font-size:16px;line-height:19px;color:#2A2E3F;padding:10px 20px;width:inherit;position:relative;border:2px solid #DEE1EE}.text__input:focus{outline-color:#3E3E3E}.text__input--invalid{border:2px solid #cc0000b3}.text__input::placeholder{color:#979797}.text__error-message{position:absolute;top:calc(100% + 5px);left:0;color:#cc0000b3}.text__tooltip-icon{width:16px;height:auto}.text__tooltip{position:absolute;top:0;left:20px;background-color:#FFFFFF;border:1px solid #B0B0B0;color:#2B2D3F;padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.text__tooltip.visible{opacity:1}';export{Er as checkbox_group_input,Tr as checkbox_input,Dh as date_input,Sh as email_input,Mh as number_input,Lh as password_input,$h as radio_input,il as select_input,sl as tel_input,rl as text_input}