@everymatrix/general-input 1.65.1 → 1.65.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +7 -4
  2. package/dist/cjs/general-input.cjs.entry.js +1308 -218
  3. package/dist/cjs/{locale.utils-ae578c17.js → locale.utils-f0ae0a97.js} +6 -0
  4. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +1 -1
  5. package/dist/collection/components/password-input/password-input.js +6 -3
  6. package/dist/collection/utils/locale.utils.js +6 -0
  7. package/dist/esm/checkbox-group-input_10.entry.js +7 -4
  8. package/dist/esm/general-input.entry.js +1308 -218
  9. package/dist/esm/{locale.utils-fc81f22a.js → locale.utils-14c3dac3.js} +6 -0
  10. package/dist/esm/toggle-checkbox-input.entry.js +1 -1
  11. package/dist/general-input/general-input.esm.js +1 -1
  12. package/dist/general-input/p-aa258411.js +1 -0
  13. package/dist/general-input/{p-2820ef34.entry.js → p-d60ab9f7.entry.js} +1298 -194
  14. package/dist/general-input/{p-5dc3b631.entry.js → p-e6ce8179.entry.js} +1 -1
  15. package/dist/general-input/{p-0a442cba.entry.js → p-eab6dd39.entry.js} +1 -1
  16. package/package.json +1 -1
  17. package/dist/general-input/p-80314011.js +0 -1
  18. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  19. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -0
  20. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -0
  21. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
  22. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
  23. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
  24. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  25. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  26. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,9 +1,9 @@
1
- import{r as t,h as e,H as i}from"./p-8b2b0da7.js";import{g as s}from"./p-80314011.js";var o=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,h=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,c=(t,e,i)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,d=(t,e)=>{for(var i in e||(e={}))h.call(e,i)&&c(t,i,e[i]);if(a)for(var i of a(e))l.call(e,i)&&c(t,i,e[i]);return t},u=(t,e)=>r(t,n(e)),p=(t,e,i)=>(c(t,"symbol"!=typeof e?e+"":e,i),i),m=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
1
+ import{r as t,h as e,H as i}from"./p-8b2b0da7.js";import{g as s}from"./p-aa258411.js";var o=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,c=(t,e,i)=>e in t?o(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,d=(t,e)=>{for(var i in e||(e={}))l.call(e,i)&&c(t,i,e[i]);if(a)for(var i of a(e))h.call(e,i)&&c(t,i,e[i]);return t},u=(t,e)=>r(t,n(e)),p=(t,e,i)=>(c(t,"symbol"!=typeof e?e+"":e,i),i),m=(t,e,i)=>new Promise(((s,o)=>{var r=t=>{try{a(i.next(t))}catch(t){o(t)}},n=t=>{try{a(i.throw(t))}catch(t){o(t)}},a=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);a((i=i.apply(t,e)).next())}))
2
2
  /**
3
3
  * @license
4
4
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
5
5
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
- */;function v(t,e="24.5.12"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
6
+ */;function v(t,e="24.5.11"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
7
7
  /**
8
8
  * @license
9
9
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -14,40 +14,39 @@ import{r as t,h as e,H as i}from"./p-8b2b0da7.js";import{g as s}from"./p-8031401
14
14
  * Copyright 2019 Google LLC
15
15
  * SPDX-License-Identifier: BSD-3-Clause
16
16
  */
17
- const b=globalThis,g=b.ShadowRoot&&(void 0===b.ShadyCSS||b.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y=Symbol(),_=new WeakMap;let w=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(g&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=_.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&_.set(e,t))}return t}toString(){return this.cssText}};const x=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new w(i,t,y)},k=(t,e)=>{if(g)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=b.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},C=g?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new w("string"==typeof t?t:t+"",void 0,y))(e)})(t):t
17
+ const b=globalThis,g=b.ShadowRoot&&(void 0===b.ShadyCSS||b.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,y=Symbol(),_=new WeakMap;let x=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==y)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(g&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=_.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&_.set(e,t))}return t}toString(){return this.cssText}};const w=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new x(i,t,y)},k=(t,e)=>{if(g)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=b.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},C=g?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new x("string"==typeof t?t:t+"",void 0,y))(e)})(t):t
18
18
  /**
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */,{is:A,defineProperty:S,getOwnPropertyDescriptor:z,getOwnPropertyNames:I,getOwnPropertySymbols:D,getPrototypeOf:T}=Object,P=globalThis,E=P.trustedTypes,O=E?E.emptyScript:"",M=P.reactiveElementPolyfillSupport,N={toAttribute(t,e){switch(e){case Boolean:t=t?O: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}},B=(t,e)=>!A(t,e),F={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:B};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=P.litPropertyMetadata||(P.litPropertyMetadata=new WeakMap);class j extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=F){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&S(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=z(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==o?void 0:o.call(this)},set(e){const s=null==o?void 0:o.call(this);r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:F}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=T(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...I(t),...D(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}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(C(t))}else void 0!==t&&e.push(C(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return k(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:N).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:N;this._$Em=o,this[o]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){if(null!=i||(i=this.constructor.getPropertyOptions(t)),!(null!=(s=i.hasChanged)?s:B)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(null!=(s=this._$Ej)?s:this._$Ej=new Set).add(t)}_$ET(){return m(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EC(t,this[t])))),this._$EU()}updated(t){}firstUpdated(t){}}var V;j.elementStyles=[],j.shadowRootOptions={mode:"open"},j.elementProperties=new Map,j.finalized=new Map,null==M||M({ReactiveElement:j}),(null!=(V=P.reactiveElementVersions)?V:P.reactiveElementVersions=[]).push("2.0.4");
22
+ */,{is:A,defineProperty:I,getOwnPropertyDescriptor:S,getOwnPropertyNames:z,getOwnPropertySymbols:T,getPrototypeOf:D}=Object,E=globalThis,P=E.trustedTypes,O=P?P.emptyScript:"",N=E.reactiveElementPolyfillSupport,M={toAttribute(t,e){switch(e){case Boolean:t=t?O: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}},B=(t,e)=>!A(t,e),F={attribute:!0,type:String,converter:M,reflect:!1,hasChanged:B};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=E.litPropertyMetadata||(E.litPropertyMetadata=new WeakMap);class j extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=F){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&I(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=S(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get(){return null==o?void 0:o.call(this)},set(e){const s=null==o?void 0:o.call(this);r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:F}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=D(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...z(t),...T(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}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(C(t))}else void 0!==t&&e.push(C(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return k(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:M).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i;const s=this.constructor,o=s._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:M;this._$Em=o,this[o]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){var s;if(void 0!==t){if(null!=i||(i=this.constructor.getPropertyOptions(t)),!(null!=(s=i.hasChanged)?s:B)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){var s;this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(null!=(s=this._$Ej)?s:this._$Ej=new Set).add(t)}_$ET(){return m(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EU()}catch(t){throw e=!1,this._$EU(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach((t=>this._$EC(t,this[t])))),this._$EU()}updated(t){}firstUpdated(t){}}var V;j.elementStyles=[],j.shadowRootOptions={mode:"open"},j.elementProperties=new Map,j.finalized=new Map,null==N||N({ReactiveElement:j}),(null!=(V=E.reactiveElementVersions)?V:E.reactiveElementVersions=[]).push("2.0.4");
23
23
  /**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
26
26
  * SPDX-License-Identifier: BSD-3-Clause
27
27
  */
28
- const L=globalThis,R=L.trustedTypes,q=R?R.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,W="?"+U,H=`<${W}>`,Y=document,G=()=>Y.createComment(""),J=t=>null===t||"object"!=typeof t&&"function"!=typeof t,K=Array.isArray,Z="[ \t\n\f\r]",X=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Q=/-->/g,tt=/>/g,et=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,ot=/^(?:script|style|textarea|title)$/i,rt=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),at=new WeakMap,ht=Y.createTreeWalker(Y,129);function lt(t,e){if(!K(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==q?q.createHTML(e):e}class ct{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[h,l]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=X;for(let e=0;e<i;e++){const i=t[e];let a,h,l=-1,c=0;for(;c<i.length&&(n.lastIndex=c,h=n.exec(i),null!==h);)c=n.lastIndex,n===X?"!--"===h[1]?n=Q:void 0!==h[1]?n=tt:void 0!==h[2]?(ot.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=et):void 0!==h[3]&&(n=et):n===et?">"===h[0]?(n=null!=o?o:X,l=-1):void 0===h[1]?l=-2:(l=n.lastIndex-h[2].length,a=h[1],n=void 0===h[3]?et:'"'===h[3]?st:it):n===st||n===it?n=et:n===Q||n===tt?n=X:(n=et,o=void 0);const d=n===et&&t[e+1].startsWith("/>")?" ":"";r+=n===X?i+H:l>=0?(s.push(a),i.slice(0,l)+$+i.slice(l)+U+d):i+U+(-2===l?e:d)}return[lt(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=ct.createElement(h,i),ht.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=ht.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith($)){const e=l[r++],i=s.getAttribute(t).split(U),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?vt:"?"===n[1]?ft:"@"===n[1]?bt:mt}),s.removeAttribute(t)}else t.startsWith(U)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(ot.test(s.tagName)){const t=s.textContent.split(U),e=t.length-1;if(e>0){s.textContent=R?R.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],G()),ht.nextNode(),a.push({type:2,index:++o});s.append(t[e],G())}}}else if(8===s.nodeType)if(s.data===W)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(U,t+1));)a.push({type:7,index:o}),t+=U.length-1}o++}}static createElement(t,e){const i=Y.createElement("template");return i.innerHTML=t,i}}function dt(t,e,i=t,s){var o,r,n;if(e===rt)return e;let a=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const h=J(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null==(r=null==a?void 0:a._$AO)||r.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=dt(t,a._$AS(t,e.values),a,s)),e}class ut{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:Y).importNode(i,!0);ht.currentNode=o;let r=ht.nextNode(),n=0,a=0,h=s[0];for(;void 0!==h;){if(n===h.index){let e;2===h.type?e=new pt(r,r.nextSibling,this,t):1===h.type?e=new h.ctor(r,h.name,h.strings,this,t):6===h.type&&(e=new gt(r,this,t)),this._$AV.push(e),h=s[++a]}n!==(null==h?void 0:h.index)&&(r=ht.nextNode(),n++)}return ht.currentNode=Y,o}p(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 pt{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}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){var i;t=dt(this,t,e),J(t)?t===nt||null==t||""===t?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==rt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):K(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==nt&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(Y.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=ct.createElement(lt(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new ut(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=at.get(t.strings);return void 0===e&&at.set(t.strings,e=new ct(t)),e}k(t){K(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new pt(this.O(G()),this.O(G()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||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._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class mt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=nt}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=dt(this,t,e,0),r=!J(t)||t!==this._$AH&&t!==rt,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=dt(this,s[i+n],e,n),a===rt&&(a=this._$AH[n]),r||(r=!J(a)||a!==this._$AH[n]),a===nt?t=nt:t!==nt&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class vt extends mt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class ft extends mt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class bt extends mt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=dt(this,t,e,0))?i:nt)===rt)return;const s=this._$AH,o=t===nt&&s!==nt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==nt&&(s===nt||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class gt{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){dt(this,t)}}const yt=L.litHtmlPolyfillSupport;var _t,wt;null==yt||yt(ct,pt),(null!=(_t=L.litHtmlVersions)?_t:L.litHtmlVersions=[]).push("3.2.1");
28
+ const $=globalThis,L=$.trustedTypes,R=L?L.createPolicy("lit-html",{createHTML:t=>t}):void 0,q="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,W="?"+U,H=`<${W}>`,G=document,Y=()=>G.createComment(""),K=t=>null===t||"object"!=typeof t&&"function"!=typeof t,J=Array.isArray,Z="[ \t\n\f\r]",Q=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,X=/-->/g,tt=/>/g,et=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),it=/'/g,st=/"/g,ot=/^(?:script|style|textarea|title)$/i,rt=Symbol.for("lit-noChange"),nt=Symbol.for("lit-nothing"),at=new WeakMap,lt=G.createTreeWalker(G,129);function ht(t,e){if(!J(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==R?R.createHTML(e):e}class ct{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=((t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=Q;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===Q?"!--"===l[1]?n=X:void 0!==l[1]?n=tt:void 0!==l[2]?(ot.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=et):void 0!==l[3]&&(n=et):n===et?">"===l[0]?(n=null!=o?o:Q,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?et:'"'===l[3]?st:it):n===st||n===it?n=et:n===X||n===tt?n=Q:(n=et,o=void 0);const d=n===et&&t[e+1].startsWith("/>")?" ":"";r+=n===Q?i+H:h>=0?(s.push(a),i.slice(0,h)+q+i.slice(h)+U+d):i+U+(-2===h?e:d)}return[ht(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]})(t,e);if(this.el=ct.createElement(l,i),lt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=lt.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(q)){const e=h[r++],i=s.getAttribute(t).split(U),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?vt:"?"===n[1]?ft:"@"===n[1]?bt:mt}),s.removeAttribute(t)}else t.startsWith(U)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(ot.test(s.tagName)){const t=s.textContent.split(U),e=t.length-1;if(e>0){s.textContent=L?L.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],Y()),lt.nextNode(),a.push({type:2,index:++o});s.append(t[e],Y())}}}else if(8===s.nodeType)if(s.data===W)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(U,t+1));)a.push({type:7,index:o}),t+=U.length-1}o++}}static createElement(t,e){const i=G.createElement("template");return i.innerHTML=t,i}}function dt(t,e,i=t,s){var o,r,n;if(e===rt)return e;let a=void 0!==s?null==(o=i._$Co)?void 0:o[s]:i._$Cl;const l=K(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null==(r=null==a?void 0:a._$AO)||r.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,i,s)),void 0!==s?(null!=(n=i._$Co)?n:i._$Co=[])[s]=a:i._$Cl=a),void 0!==a&&(e=dt(t,a._$AS(t,e.values),a,s)),e}class ut{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:s}=this._$AD,o=(null!=(e=null==t?void 0:t.creationScope)?e:G).importNode(i,!0);lt.currentNode=o;let r=lt.nextNode(),n=0,a=0,l=s[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new pt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new gt(r,this,t)),this._$AV.push(e),l=s[++a]}n!==(null==l?void 0:l.index)&&(r=lt.nextNode(),n++)}return lt.currentNode=G,o}p(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 pt{get _$AU(){var t,e;return null!=(e=null==(t=this._$AM)?void 0:t._$AU)?e:this._$Cv}constructor(t,e,i,s){var o;this.type=2,this._$AH=nt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=null==(o=null==s?void 0:s.isConnected)||o}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){var i;t=dt(this,t,e),K(t)?t===nt||null==t||""===t?(this._$AH!==nt&&this._$AR(),this._$AH=nt):t!==this._$AH&&t!==rt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):J(i=t)||"function"==typeof(null==i?void 0:i[Symbol.iterator])?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==nt&&K(this._$AH)?this._$AA.nextSibling.data=t:this.T(G.createTextNode(t)),this._$AH=t}$(t){var e;const{values:i,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=ct.createElement(ht(s.h,s.h[0]),this.options)),s);if((null==(e=this._$AH)?void 0:e._$AD)===o)this._$AH.p(i);else{const t=new ut(o,this),e=t.u(this.options);t.p(i),this.T(e),this._$AH=t}}_$AC(t){let e=at.get(t.strings);return void 0===e&&at.set(t.strings,e=new ct(t)),e}k(t){J(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new pt(this.O(Y()),this.O(Y()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var i;for(null==(i=this._$AP)||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._$Cv=t,null==(e=this._$AP)||e.call(this,t))}}class mt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=nt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=nt}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=dt(this,t,e,0),r=!K(t)||t!==this._$AH&&t!==rt,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=dt(this,s[i+n],e,n),a===rt&&(a=this._$AH[n]),r||(r=!K(a)||a!==this._$AH[n]),a===nt?t=nt:t!==nt&&(t+=(null!=a?a:"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===nt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class vt extends mt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===nt?void 0:t}}class ft extends mt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==nt)}}class bt extends mt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){var i;if((t=null!=(i=dt(this,t,e,0))?i:nt)===rt)return;const s=this._$AH,o=t===nt&&s!==nt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==nt&&(s===nt||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!=(i=null==(e=this.options)?void 0:e.host)?i:this.element,t):this._$AH.handleEvent(t)}}class gt{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){dt(this,t)}}const yt=$.litHtmlPolyfillSupport;var _t;null==yt||yt(ct,pt),(null!=(_t=$.litHtmlVersions)?_t:$.litHtmlVersions=[]).push("3.2.1");const xt=(t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=r._$litPart$;if(void 0===n){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=n=new pt(e.insertBefore(Y(),t),t,void 0,null!=i?i:{})}return n._$AI(t),n
29
29
  /**
30
30
  * @license
31
31
  * Copyright 2017 Google LLC
32
32
  * SPDX-License-Identifier: BSD-3-Clause
33
- */
34
- class xt extends j{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var s,o;const r=null!=(s=null==i?void 0:i.renderBefore)?s:e;let n=r._$litPart$;if(void 0===n){const t=null!=(o=null==i?void 0:i.renderBefore)?o:null;r._$litPart$=n=new pt(e.insertBefore(G(),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)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return rt}}xt._$litElement$=!0,xt.finalized=!0,null==(wt=globalThis.litElementHydrateSupport)||wt.call(globalThis,{LitElement:xt});const kt=globalThis.litElementPolyfillSupport;var Ct;null==kt||kt({LitElement:xt}),(null!=(Ct=globalThis.litElementVersions)?Ct:globalThis.litElementVersions=[]).push("4.1.1");
33
+ */};class wt extends j{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t;const e=super.createRenderRoot();return null!=(t=this.renderOptions).renderBefore||(t.renderBefore=e.firstChild),e}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=xt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null==(t=this._$Do)||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null==(t=this._$Do)||t.setConnected(!1)}render(){return rt}}var kt;wt._$litElement$=!0,wt.finalized=!0,null==(kt=globalThis.litElementHydrateSupport)||kt.call(globalThis,{LitElement:wt});const Ct=globalThis.litElementPolyfillSupport;var At;null==Ct||Ct({LitElement:wt}),(null!=(At=globalThis.litElementVersions)?At:globalThis.litElementVersions=[]).push("4.1.1");
35
34
  /**
36
35
  * @license
37
36
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
38
37
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
39
38
  */
40
- const At=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
39
+ const It=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
41
40
  /**
42
41
  * @license
43
42
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
44
43
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
45
- */,St=[],zt=new Set,It=new Set;function Dt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Tt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Pt(t){return t.map((t=>t.cssText)).join("\n")}const Et="vaadin-themable-mixin-style";function Ot(t){t.prototype instanceof xt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Et).textContent=Pt(t.getStylesForThis()),It.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Ot(i)}))}function Mt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof w||(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):St.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&It.forEach((i=>{if(Tt(t,i)&&function(t){return Dt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Ot(t),function(t){zt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof xt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),k(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Et).textContent=e.prototype._template.content.getElementById(Et).textContent}(i):i||zt.delete(e)}))}(t)}}))}function Nt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():St}function Bt(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=Nt().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 jt(t){const e=`${t}-default-theme`,i=Nt().filter((i=>i.moduleId!==e&&Tt(i.themeFor,t))).map((t=>u(d({},t),{styles:[...Ft(t),...t.styles],includePriority:Bt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Nt().filter((t=>t.moduleId===e))}const Vt=t=>class extends(At(t)){constructor(){super(),zt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&It.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Dt(this)||function(t,e){const i=document.createElement("style");i.id=Et,i.textContent=Pt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...jt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
44
+ */,St=[],zt=new Set,Tt=new Set;function Dt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Et(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Pt(t){return t.map((t=>t.cssText)).join("\n")}const Ot="vaadin-themable-mixin-style";function Nt(t){t.prototype instanceof wt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Ot).textContent=Pt(t.getStylesForThis()),Tt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Nt(i)}))}function Mt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof x||(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):St.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&Tt.forEach((i=>{if(Et(t,i)&&function(t){return Dt(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Nt(t),function(t){zt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof wt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),k(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Ot).textContent=e.prototype._template.content.getElementById(Ot).textContent}(i):i||zt.delete(e)}))}(t)}}))}function Bt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():St}function Ft(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function jt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Bt().find((e=>e.moduleId===t));i?e.push(...jt(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=Bt().filter((i=>i.moduleId!==e&&Et(i.themeFor,t))).map((t=>u(d({},t),{styles:[...jt(t),...t.styles],includePriority:Ft(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Bt().filter((t=>t.moduleId===e))}const $t=t=>class extends(It(t)){constructor(){super(),zt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&Tt.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||Dt(this)||function(t,e){const i=document.createElement("style");i.id=Ot,i.textContent=Pt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Vt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
46
45
  /**
47
46
  * @license
48
47
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
49
48
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
50
- */,Lt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Lt("color-props",x`
49
+ */,Lt=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};Lt("color-props",w`
51
50
  :host {
52
51
  /* Base (background) */
53
52
  --lumo-base-color: #fff;
@@ -132,7 +131,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
132
131
  --lumo-disabled-text-color: GrayText;
133
132
  }
134
133
  }
135
- `),Mt("",x`
134
+ `),Mt("",w`
136
135
  [theme~='dark'] {
137
136
  /* Base (background) */
138
137
  --lumo-base-color: hsl(214, 35%, 21%);
@@ -250,7 +249,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
250
249
  pre code {
251
250
  background: transparent;
252
251
  }
253
- `,{moduleId:"lumo-color"}),Lt("font-icons",x`
252
+ `,{moduleId:"lumo-color"}),Lt("font-icons",w`
254
253
  @font-face {
255
254
  font-family: 'lumo-icons';
256
255
  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==)
@@ -303,7 +302,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
303
302
  --lumo-icons-upload: '\\ea29';
304
303
  --lumo-icons-user: '\\ea2a';
305
304
  }
306
- `),Lt("sizing-props",x`
305
+ `),Lt("sizing-props",w`
307
306
  :host {
308
307
  --lumo-size-xs: 1.625rem;
309
308
  --lumo-size-s: 1.875rem;
@@ -318,7 +317,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
318
317
  /* For backwards compatibility */
319
318
  --lumo-icon-size: var(--lumo-icon-size-m);
320
319
  }
321
- `),Lt("spacing-props",x`
320
+ `),Lt("spacing-props",w`
322
321
  :host {
323
322
  /* Square */
324
323
  --lumo-space-xs: 0.25rem;
@@ -341,7 +340,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
341
340
  --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
342
341
  --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
343
342
  }
344
- `),x`
343
+ `),w`
345
344
  html {
346
345
  /* Button */
347
346
  --vaadin-button-background: var(--lumo-contrast-5pct);
@@ -424,7 +423,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
424
423
  --vaadin-input-field-value-font-size: var(--lumo-font-size-m);
425
424
  --vaadin-input-field-value-font-weight: 500;
426
425
  }
427
- `,Lt("style-props",x`
426
+ `,Lt("style-props",w`
428
427
  :host {
429
428
  /* Border radius */
430
429
  --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
@@ -447,7 +446,7 @@ const At=t=>class extends t{static get properties(){return{_theme:{type:String,r
447
446
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
448
447
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
449
448
  */
450
- const Rt=x`
449
+ const Rt=w`
451
450
  :host {
452
451
  /* prettier-ignore */
453
452
  --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@@ -467,7 +466,7 @@ const Rt=x`
467
466
  --lumo-line-height-s: 1.375;
468
467
  --lumo-line-height-m: 1.625;
469
468
  }
470
- `;Mt("",x`
469
+ `;Mt("",w`
471
470
  body,
472
471
  :host {
473
472
  font-family: var(--lumo-font-family);
@@ -559,7 +558,7 @@ const Rt=x`
559
558
  border-left: none;
560
559
  border-right: 2px solid var(--lumo-contrast-30pct);
561
560
  }
562
- `,{moduleId:"lumo-typography"}),Lt("typography-props",Rt),Mt("vaadin-checkbox",x`
561
+ `,{moduleId:"lumo-typography"}),Lt("typography-props",Rt),Mt("vaadin-checkbox",w`
563
562
  :host {
564
563
  color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
565
564
  font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
@@ -883,7 +882,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
883
882
  Code distributed by Google as part of the polymer project is also
884
883
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
885
884
  */
886
- let qt,$t,Ut=/(url\()([^)]*)(\))/g,Wt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ht(t,e){if(t&&Wt.test(t)||"//"===t)return t;if(void 0===qt){qt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",qt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),qt)try{return new URL(t,e).href}catch(e){return t}return $t||($t=document.implementation.createHTMLDocument("temp"),$t.base=$t.createElement("base"),$t.head.appendChild($t.base),$t.anchor=$t.createElement("a"),$t.body.appendChild($t.anchor)),$t.base.href=e,$t.anchor.href=t,$t.anchor.href||t}function Yt(t,e){return t.replace(Ut,(function(t,i,s,o){return i+"'"+Ht(s.replace(/["']/g,""),e)+"'"+o}))}function Gt(t){return t.substring(0,t.lastIndexOf("/")+1)}
885
+ let qt,Ut,Wt=/(url\()([^)]*)(\))/g,Ht=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Gt(t,e){if(t&&Ht.test(t)||"//"===t)return t;if(void 0===qt){qt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",qt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),qt)try{return new URL(t,e).href}catch(e){return t}return Ut||(Ut=document.implementation.createHTMLDocument("temp"),Ut.base=Ut.createElement("base"),Ut.head.appendChild(Ut.base),Ut.anchor=Ut.createElement("a"),Ut.body.appendChild(Ut.anchor)),Ut.base.href=e,Ut.anchor.href=t,Ut.anchor.href||t}function Yt(t,e){return t.replace(Wt,(function(t,i,s,o){return i+"'"+Gt(s.replace(/["']/g,""),e)+"'"+o}))}function Kt(t){return t.substring(0,t.lastIndexOf("/")+1)}
887
886
  /**
888
887
  @license
889
888
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -892,7 +891,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
892
891
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
893
892
  Code distributed by Google as part of the polymer project is also
894
893
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
895
- */const Jt=!window.ShadyDOM||!window.ShadyDOM.inUse,Kt=Jt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Zt=window.Polymer&&window.Polymer.rootPath||Gt(document.baseURI||window.location.href),Xt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Qt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,te=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ee=window.Polymer&&window.Polymer.legacyOptimizations||!1,ie=window.Polymer&&window.Polymer.legacyWarnings||!1,se=window.Polymer&&window.Polymer.syncInitialRender||!1,oe=window.Polymer&&window.Polymer.legacyUndefined||!1,re=window.Polymer&&window.Polymer.orderedComputed||!1,ne=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ae=window.Polymer&&window.Polymer.fastDomIf||!1,he=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,le=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,ce=0;const de=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=ce++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
894
+ */const Jt=!window.ShadyDOM||!window.ShadyDOM.inUse,Zt=Jt&&"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 Qt=window.Polymer&&window.Polymer.rootPath||Kt(document.baseURI||window.location.href),Xt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,te=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,ee=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ie=window.Polymer&&window.Polymer.legacyOptimizations||!1,se=window.Polymer&&window.Polymer.legacyWarnings||!1,oe=window.Polymer&&window.Polymer.syncInitialRender||!1,re=window.Polymer&&window.Polymer.legacyUndefined||!1,ne=window.Polymer&&window.Polymer.orderedComputed||!1,ae=window.Polymer&&window.Polymer.removeNestedTemplates||!1,le=window.Polymer&&window.Polymer.fastDomIf||!1,he=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,ce=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,de=0;const ue=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=de++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
896
895
  /**
897
896
  @license
898
897
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -901,7 +900,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
901
900
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
902
901
  Code distributed by Google as part of the polymer project is also
903
902
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
904
- */let ue={},pe={};function me(t,e){ue[t]=pe[t.toLowerCase()]=e}function ve(t){return ue[t]||pe[t.toLowerCase()]}class fe extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ve(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=Ht(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Gt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Qt&&void 0!==ve(t))throw me(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,me(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}fe.prototype.modules=ue,customElements.define("dom-module",fe);
903
+ */let pe={},me={};function ve(t,e){pe[t]=me[t.toLowerCase()]=e}function fe(t){return pe[t]||me[t.toLowerCase()]}class be extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=fe(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=Gt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Kt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(te&&void 0!==fe(t))throw ve(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,ve(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}be.prototype.modules=pe,customElements.define("dom-module",be);
905
904
  /**
906
905
  @license
907
906
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -911,7 +910,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
911
910
  Code distributed by Google as part of the polymer project is also
912
911
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
913
912
  */
914
- const be="link[rel=import][type~=css]",ge="include",ye="shady-unscoped";function _e(t){return fe.import(t)}function we(t){const e=Yt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function xe(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...ke(e[t]));return i}function ke(t){const e=_e(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Ae(e));const i=e.querySelector("template");i&&t.push(...Ce(i,e.assetpath)),e._styles=t}return e._styles}function Ce(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(ge);r&&i.push(...xe(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Yt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function Ae(t){const e=[],i=t.querySelectorAll(be);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(ye);if(i&&!t._unscopedStyle){const e=we(t);e.setAttribute(ye,""),t._unscopedStyle=e}else t._style||(t._style=we(t));e.push(i?t._unscopedStyle:t._style)}}return e}
913
+ const ge="link[rel=import][type~=css]",ye="include",_e="shady-unscoped";function xe(t){return be.import(t)}function we(t){const e=Yt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ke(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...Ce(e[t]));return i}function Ce(t){const e=xe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Ie(e));const i=e.querySelector("template");i&&t.push(...Ae(i,e.assetpath)),e._styles=t}return e._styles}function Ae(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(ye);r&&i.push(...ke(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Yt(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function Ie(t){const e=[],i=t.querySelectorAll(ge);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(_e);if(i&&!t._unscopedStyle){const e=we(t);e.setAttribute(_e,""),t._unscopedStyle=e}else t._style||(t._style=we(t));e.push(i?t._unscopedStyle:t._style)}}return e}
915
914
  /**
916
915
  @license
917
916
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -929,7 +928,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
929
928
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
930
929
  Code distributed by Google as part of the polymer project is also
931
930
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
932
- */;function ze(t){return t.indexOf(".")>=0}function Ie(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function De(t,e){return 0===t.indexOf(e+".")}function Te(t,e){return 0===e.indexOf(t+".")}function Pe(t,e,i){return e+i.slice(t.length)}function Ee(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 Oe(t){return Array.isArray(t)?Ee(t).split("."):t.toString().split(".")}function Me(t,e,i){let s=t,o=Oe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Ne(t,e,i){let s=t,o=Oe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
931
+ */;function ze(t){return t.indexOf(".")>=0}function Te(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function De(t,e){return 0===t.indexOf(e+".")}function Ee(t,e){return 0===e.indexOf(t+".")}function Pe(t,e,i){return e+i.slice(t.length)}function Oe(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 Ne(t){return Array.isArray(t)?Oe(t).split("."):t.toString().split(".")}function Me(t,e,i){let s=t,o=Ne(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Be(t,e,i){let s=t,o=Ne(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
933
932
  /**
934
933
  @license
935
934
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -938,7 +937,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
938
937
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
939
938
  Code distributed by Google as part of the polymer project is also
940
939
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
941
- */const Be={},Fe=/-[a-z]/g,je=/([A-Z])/g;function Ve(t){return Be[t]||(Be[t]=t.indexOf("-")<0?t:t.replace(Fe,(t=>t[1].toUpperCase())))}function Le(t){return Be[t]||(Be[t]=t.replace(je,"-$1").toLowerCase())}
940
+ */const Fe={},je=/-[a-z]/g,Ve=/([A-Z])/g;function $e(t){return Fe[t]||(Fe[t]=t.indexOf("-")<0?t:t.replace(je,(t=>t[1].toUpperCase())))}function Le(t){return Fe[t]||(Fe[t]=t.replace(Ve,"-$1").toLowerCase())}
942
941
  /**
943
942
  @license
944
943
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -947,7 +946,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
947
946
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
948
947
  Code distributed by Google as part of the polymer project is also
949
948
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
950
- */let Re=0,qe=0,$e=[],Ue=0,We=!1,He=document.createTextNode("");new window.MutationObserver((function(){We=!1;const t=$e.length;for(let e=0;e<t;e++){let t=$e[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}$e.splice(0,t),qe+=t})).observe(He,{characterData:!0});const Ye={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)}},Ge={run:t=>(We||(We=!0,He.textContent=Ue++),$e.push(t),Re++),cancel(t){const e=t-qe;if(e>=0){if(!$e[e])throw new Error("invalid async handle: "+t);$e[e]=null}}},Je=Ge,Ke=de((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Je.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!!e}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);("class"===i||"name"===i||"slot"===i)&&(t=Se(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Ze={};
949
+ */let Re=0,qe=0,Ue=[],We=0,He=!1,Ge=document.createTextNode("");new window.MutationObserver((function(){He=!1;const t=Ue.length;for(let e=0;e<t;e++){let t=Ue[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ue.splice(0,t),qe+=t})).observe(Ge,{characterData:!0});const Ye={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)}},Ke={run:t=>(He||(He=!0,Ge.textContent=We++),Ue.push(t),Re++),cancel(t){const e=t-qe;if(e>=0){if(!Ue[e])throw new Error("invalid async handle: "+t);Ue[e]=null}}},Je=Ke,Ze=ue((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Je.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!!e}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);("class"===i||"name"===i||"slot"===i)&&(t=Se(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Qe={};
951
950
  /**
952
951
  @license
953
952
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -956,7 +955,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
956
955
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
957
956
  Code distributed by Google as part of the polymer project is also
958
957
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
959
- */let Xe=HTMLElement.prototype;for(;Xe;){let t=Object.getOwnPropertyNames(Xe);for(let e=0;e<t.length;e++)Ze[t[e]]=!0;Xe=Object.getPrototypeOf(Xe)}const Qe=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ti=de((t=>{const e=Ke(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Ve(t[e]))}static attributeNameForProperty(t){return Le(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Qe(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){(function(t,e){if(!Ze[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!(!this.__dataPending||!(t in this.__dataPending))}}})),ei={"dom-if":!0,"dom-repeat":!0};let ii=!1,si=!1;const oi=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function ri(t){let e=t.getAttribute("is");if(e&&ei[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];oi(t,i,e),i.removeAttribute(e)}}return t}function ni(t,e){let i=e.parentInfo&&ni(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 ai(t,e,i,s){s.id&&(e[s.id]=i)}function hi(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function li(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const ci=de((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=!!e,i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!ii){ii=!0;const t=document.createElement("textarea");t.placeholder="a",si=t.placeholder===t.textContent}return si})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=ri(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=ni(s,t);ai(0,s.$,i,t),li(0,i,t,e),hi(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
958
+ */let Xe=HTMLElement.prototype;for(;Xe;){let t=Object.getOwnPropertyNames(Xe);for(let e=0;e<t.length;e++)Qe[t[e]]=!0;Xe=Object.getPrototypeOf(Xe)}const ti=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ei=ue((t=>{const e=Ze(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor($e(t[e]))}static attributeNameForProperty(t){return Le(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(ti(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){(function(t,e){if(!Qe[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!(!this.__dataPending||!(t in this.__dataPending))}}})),ii={"dom-if":!0,"dom-repeat":!0};let si=!1,oi=!1;const ri=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function ni(t){let e=t.getAttribute("is");if(e&&ii[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];ri(t,i,e),i.removeAttribute(e)}}return t}function ai(t,e){let i=e.parentInfo&&ai(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 li(t,e,i,s){s.id&&(e[s.id]=i)}function hi(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function ci(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const di=ue((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=!!e,i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!si){si=!0;const t=document.createElement("textarea");t.placeholder="a",oi=t.placeholder===t.textContent}return oi})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=ni(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=ai(s,t);li(0,s.$,i,t),ci(0,i,t,e),hi(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
960
959
  /**
961
960
  * @fileoverview
962
961
  * @suppress {checkPrototypalTypes}
@@ -967,7 +966,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
967
966
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
968
967
  * Google as part of the polymer project is also subject to an additional IP
969
968
  * rights grant found at http://polymer.github.io/PATENTS.txt
970
- */let di=0;const ui=[],pi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},mi="__computeInfo",vi=/[A-Z]/;function fi(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 bi(t,e,i,s,o,r){if(e){let n=!1;const a=di++;for(let h in i){let l=e[o?Ie(h):h];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)(!e.info||e.info.lastRun!==a)&&(!o||yi(h,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,h,i,s,e.info,o,r),n=!0)}return n}return!1}function gi(t,e,i,s,o,r,n,a){let h=!1,l=e[n?Ie(s):s];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)(!e.info||e.info.lastRun!==i)&&(!n||yi(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),h=!0);return h}function yi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!De(i,t))||!(!e.wildcard||!Te(i,t))}return!0}function _i(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function wi(t,e,i){let s=Ie(e);return s!==e&&(xi(t,Le(s)+"-changed",i[e],e),!0)}function xi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Se(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function ki(t,e,i,s,o,r){let n=(r?Ie(e):e)!=e?e:null,a=n?Me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),xi(t,o.eventName,a,n)}function Ci(t,e,i,s,o){let r=t.__data[e];Xt&&(r=Xt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const Ai=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},Si=(t,e,i,s,o)=>{const r=e[o?Ie(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==di&&(!o||yi(t,n.trigger))&&(n.info.lastRun=di,Ai(n.info,i,s))}};function zi(t,e,i,s,o){let r=Mi(t,e,i,0,o);if(r===ui)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Ii(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!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||Le(o)+"-changed",a.listenerNegate=e}let h=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Di(t,e,a,s,h)}}function Di(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Ri(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ti,info:n,trigger:s})}}}function Ti(t,e,i,s,o,r,n){let a=n[o.index],h=o.binding,l=o.part;if(r&&l.source&&e.length>l.source.length&&"property"==h.kind&&!h.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[h.target]){let s=i[e];e=Pe(l.source,h.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,l,e,i,s,r);n!==ui&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Xt&&(o=Xt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[pi.READ_ONLY]||!e[pi.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,h,l,n)}}function Pi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Se(t)),t[r]=e.literal)}}function Ei(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Pe(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[pi.READ_ONLY]||!e[pi.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Oi(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Mi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ui?ui:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Ni=[],Bi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Fi="(?:("+Bi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",ji=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Bi+"\\s*(?:\\(\\s*(?:(?:"+Fi+"(?:,\\s*"+Fi+")*)?)\\)\\s*)?)(?:]]|}})","g");function Vi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Li(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Ni};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ri(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Ri(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=Ie(e),i.structured=ze(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function qi(t,e,i){let s=Me(t,i);return void 0===s&&(s=e[i]),s}function $i(t,e,i,s){const o={indexSplices:s};oe&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),oe&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Ui(t,e,i,s,o,r){$i(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Wi=de((t=>{const e=ci(ti(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return pi}_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(Hi.length){let t=Hi[Hi.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[pi.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==pi.READ_ONLY);let s=fi(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=fi(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,pi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,pi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,pi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,pi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Ie(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Me(this,t);if(!(t=Ne(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Te(r,e)?(o=Pe(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Te(n,e)&&(o=Pe(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Se(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ze(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[pi.NOTIFY]&&this[pi.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[pi.READ_ONLY]||!this[pi.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[pi.COMPUTE];if(o)if(re){di++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[pi.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[mi],i={},s=t[pi.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)Si(t,o,n,r,s);let a;for(;a=n.shift();)zi(t,"",e,0,a)&&Si(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;bi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),bi(this,this[pi.REFLECT],e,i,o),bi(this,this[pi.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[pi.NOTIFY],h=di++;for(let n in e)e[n]&&(a&&gi(t,a,h,n,i,s,o)||o&&wi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[pi.PROPAGATE]&&bi(this,this[pi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{bi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ee(t),e=Ee(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ee(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};$i(this,Me(this,t,i),i.path,e)}get(t,e){return Me(e||this,t)}set(t,e,i){i?Ne(i,t,e):(!this[pi.READ_ONLY]||!this[pi.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Me(this,t,i),o=s.length,r=s.push(...e);return e.length&&Ui(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Me(this,t,e),s=!!i.length,o=i.pop();return s&&Ui(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Ui(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Me(this,t,e),s=!!i.length,o=i.shift();return s&&Ui(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Me(this,t,i),o=s.unshift(...e);return e.length&&Ui(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Me(this,t,s),i=s.path}else i=Array.isArray(t)?Ee(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,pi.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,pi.OBSERVE,{fn:_i,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,pi.OBSERVE,{fn:_i,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Li(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Oi(this,i,pi.OBSERVE,Mi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,pi.NOTIFY,{fn:ki,info:{eventName:Le(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,pi.REFLECT,{fn:Ci,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Li(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Oi(this,s,pi.COMPUTE,zi,t,i);fi(this,mi)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:h,value:l,literal:c}=t[r];if(!c)if(h){const t=Te(n,e),o=qi(s,i,t?e:n);l={path:t?e:n,value:o,base:t?Me(s,n):o}}else l=a?qi(s,i,n):s[n];if(oe&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return ui;o[r]=l}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Hi.push(this);let i=super._stampTemplate(t,e);if(Hi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Pi(o,i),Ei(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Se(Se(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Vi(e)||" ",Ii(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";vi.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Vi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Ve(o)),Ii(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ne&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let h=n.hostProps;if(ae&&a)h&&(i.hostProps=Object.assign(i.hostProps||{},h),ne||(s.parentInfo.noted=!0));else{let t="{";for(let e in h)Ii(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=ji.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),h=!1,l="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(l=a.substring(c+2),a=a.substring(0,c),h=!0);let d=Li(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:h,signature:d,dependencies:u,event:l}),o=ji.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Mi(t,i,s,0,e.signature):i!=e.source?Me(t,e.source):r&&ze(i)?Me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Hi=[],Yi=de((t=>{const e=Ke(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
969
+ */let ui=0;const pi=[],mi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},vi="__computeInfo",fi=/[A-Z]/;function bi(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 gi(t,e,i,s,o,r){if(e){let n=!1;const a=ui++;for(let l in i){let h=e[o?Te(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==a)&&(!o||_i(l,e.trigger))&&(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function yi(t,e,i,s,o,r,n,a){let l=!1,h=e[n?Te(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==i)&&(!n||_i(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function _i(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!De(i,t))||!(!e.wildcard||!Ee(i,t))}return!0}function xi(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function wi(t,e,i){let s=Te(e);return s!==e&&(ki(t,Le(s)+"-changed",i[e],e),!0)}function ki(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Se(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function Ci(t,e,i,s,o,r){let n=(r?Te(e):e)!=e?e:null,a=n?Me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),ki(t,o.eventName,a,n)}function Ai(t,e,i,s,o){let r=t.__data[e];Xt&&(r=Xt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const Ii=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},Si=(t,e,i,s,o)=>{const r=e[o?Te(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun!==ui&&(!o||_i(t,n.trigger))&&(n.info.lastRun=ui,Ii(n.info,i,s))}};function zi(t,e,i,s,o){let r=Mi(t,e,i,0,o);if(r===pi)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function Ti(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return!!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||Le(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Di(t,e,a,s,l)}}function Di(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Ri(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ei,info:n,trigger:s})}}}function Ei(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=Pe(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==pi&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),Xt&&(o=Xt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[mi.READ_ONLY]||!e[mi.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Pi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Se(t)),t[r]=e.literal)}}function Oi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=Pe(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,(!e[mi.READ_ONLY]||!e[mi.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!a)&&(!n||!n.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Ni(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Mi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===pi?pi:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Bi=[],Fi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",ji="(?:("+Fi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Vi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Fi+"\\s*(?:\\(\\s*(?:(?:"+ji+"(?:,\\s*"+ji+")*)?)\\)\\s*)?)(?:]]|}})","g");function $i(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Li(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Bi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ri(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Ri(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=Te(e),i.structured=ze(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function qi(t,e,i){let s=Me(t,i);return void 0===s&&(s=e[i]),s}function Ui(t,e,i,s){const o={indexSplices:s};re&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),re&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Wi(t,e,i,s,o,r){Ui(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Hi=ue((t=>{const e=di(ei(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return mi}_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(Gi.length){let t=Gi[Gi.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[mi.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==mi.READ_ONLY);let s=bi(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=bi(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,mi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,mi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,mi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,mi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Te(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Me(this,t);if(!(t=Be(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ee(r,e)?(o=Pe(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ee(n,e)&&(o=Pe(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Se(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&ze(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[mi.NOTIFY]&&this[mi.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[mi.READ_ONLY]||!this[mi.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[mi.COMPUTE];if(o)if(ne){ui++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[mi.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[vi],i={},s=t[mi.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)Si(t,o,n,r,s);let a;for(;a=n.shift();)zi(t,"",e,0,a)&&Si(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;gi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),gi(this,this[mi.REFLECT],e,i,o),gi(this,this[mi.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[mi.NOTIFY],l=ui++;for(let n in e)e[n]&&(a&&yi(t,a,l,n,i,s,o)||o&&wi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[mi.PROPAGATE]&&gi(this,this[mi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{gi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Oe(t),e=Oe(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Oe(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Ui(this,Me(this,t,i),i.path,e)}get(t,e){return Me(e||this,t)}set(t,e,i){i?Be(i,t,e):(!this[mi.READ_ONLY]||!this[mi.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Me(this,t,i),o=s.length,r=s.push(...e);return e.length&&Wi(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Me(this,t,e),s=!!i.length,o=i.pop();return s&&Wi(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Wi(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Me(this,t,e),s=!!i.length,o=i.shift();return s&&Wi(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Me(this,t,i),o=s.unshift(...e);return e.length&&Wi(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Me(this,t,s),i=s.path}else i=Array.isArray(t)?Oe(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,mi.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,mi.OBSERVE,{fn:xi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,mi.OBSERVE,{fn:xi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Li(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ni(this,i,mi.OBSERVE,Mi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,mi.NOTIFY,{fn:Ci,info:{eventName:Le(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,mi.REFLECT,{fn:Ai,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Li(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Ni(this,s,mi.COMPUTE,zi,t,i);bi(this,vi)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ee(n,e),o=qi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Me(s,n):o}}else h=a?qi(s,i,n):s[n];if(re&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return pi;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Gi.push(this);let i=super._stampTemplate(t,e);if(Gi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Pi(o,i),Oi(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Se(Se(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=$i(e)||" ",Ti(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";fi.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=$i(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=$e(o)),Ti(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ae&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(le&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ae||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Ti(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Vi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=!!i[2],a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Li(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=Vi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Mi(t,i,s,0,e.signature):i!=e.source?Me(t,e.source):r&&ze(i)?Me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Gi=[],Yi=ue((t=>{const e=Ze(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
971
970
  /**
972
971
  @license
973
972
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -986,7 +985,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
986
985
  Code distributed by Google as part of the polymer project is also
987
986
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
988
987
  */
989
- function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Gi=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ji=de((t=>{const e=Yi(Wi(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.2"}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):ee||(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||te)&&(e=fe.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=Gt(t.url);else{const t=fe.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Zt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let 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 Yt(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(!Gi){const o=e.content.querySelectorAll("style"),r=Ce(e),n=function(t){let e=_e(t);return e?Ae(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let h=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[h];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):h++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),le&&Gi&&Kt){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?Ht(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=Se(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])),se&&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=Ht(this.importPath)),Ht(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 ie&&!(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)}}})),Ki=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Zi{constructor(t,e){ts(t,e);const i=e.reduce(((e,i,s)=>e+Xi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Xi(t){if(t instanceof Zi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Qi=function(t,...e){ts(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 Zi)return Xi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ki&&(s=Ki.createHTML(s)),i.innerHTML=s,i},ts=(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")},es=Ji(HTMLElement),is=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,ss=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
988
+ function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Ki=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ji=ue((t=>{const e=Yi(Hi(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.2"}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):ie||(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&&(!te||ee)&&(e=be.import(t,"template"),te&&!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=Kt(t.url);else{const t=be.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=Qt,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 Yt(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(!Ki){const o=e.content.querySelectorAll("style"),r=Ae(e),n=function(t){let e=xe(t);return e?Ie(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),ce&&Ki&&Zt){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?Gt(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=Se(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])),oe&&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=Gt(this.importPath)),Gt(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 se&&!(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)}}})),Zi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Qi{constructor(t,e){es(t,e);const i=e.reduce(((e,i,s)=>e+Xi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Xi(t){if(t instanceof Qi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const ts=function(t,...e){es(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 Qi)return Xi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Zi&&(s=Zi.createHTML(s)),i.innerHTML=s,i},es=(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")},is=Ji(HTMLElement),ss=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,os=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;
990
989
  /**
991
990
  @license
992
991
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -995,7 +994,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
995
994
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
996
995
  Code distributed by Google as part of the polymer project is also
997
996
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
998
- */function os(t,e){if("function"!=typeof t)return;const i=is.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 rs(){
997
+ */function rs(t,e){if("function"!=typeof t)return;const i=ss.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 ns(){
999
998
  /*! vaadin-dev-mode:start
1000
999
  (function () {
1001
1000
  'use strict';
@@ -1474,7 +1473,7 @@ try {
1474
1473
 
1475
1474
  }());
1476
1475
 
1477
- vaadin-dev-mode:end **/}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&&(ss?!(ss&&Object.keys(ss).map((t=>ss[t])).filter((t=>t.productionMode)).length>0):!os((function(){return!0})))}catch(t){return!1}}());
1476
+ vaadin-dev-mode:end **/}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&&(os?!(os&&Object.keys(os).map((t=>os[t])).filter((t=>t.productionMode)).length>0):!rs((function(){return!0})))}catch(t){return!1}}());
1478
1477
  /**
1479
1478
  * @license
1480
1479
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1484,7 +1483,7 @@ try {
1484
1483
  * Code distributed by Google as part of the polymer project is also
1485
1484
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1486
1485
  */
1487
- let ns=0,as=0;const hs=[];let ls=!1;const cs={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)}},ds={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},us={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ps={run(t){ls||(ls=!0,queueMicrotask((()=>function(){ls=!1;const t=hs.length;for(let e=0;e<t;e++){const t=hs[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}hs.splice(0,t),as+=t}()))),hs.push(t);const e=ns;return ns+=1,e},cancel(t){const e=t-as;if(e>=0){if(!hs[e])throw new Error(`invalid async handle: ${t}`);hs[e]=null}}},ms=new Set;
1486
+ let as=0,ls=0;const hs=[];let cs=!1;const ds={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)}},us={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},ps={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ms={run(t){cs||(cs=!0,queueMicrotask((()=>function(){cs=!1;const t=hs.length;for(let e=0;e<t;e++){const t=hs[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}hs.splice(0,t),ls+=t}()))),hs.push(t);const e=as;return as+=1,e},cancel(t){const e=t-ls;if(e>=0){if(!hs[e])throw new Error(`invalid async handle: ${t}`);hs[e]=null}}},vs=new Set;
1488
1487
  /**
1489
1488
  @license
1490
1489
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1493,43 +1492,43 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1493
1492
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1494
1493
  Code distributed by Google as part of the polymer project is also
1495
1494
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1496
- */let vs=class t{static debounce(e,i,s){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,s),e}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,ms.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),ms.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}};function fs(t){ms.add(t)}function bs(){const t=!!ms.size;return ms.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const gs=()=>{let t;do{t=bs()}while(t)},ys=[];
1495
+ */let fs=class t{static debounce(e,i,s){return e instanceof t?e._cancelAsync():e=new t,e.setConfig(i,s),e}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,vs.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),vs.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}};function bs(t){vs.add(t)}function gs(){const t=!!vs.size;return vs.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t}const ys=()=>{let t;do{t=gs()}while(t)},_s=[];
1497
1496
  /**
1498
1497
  * @license
1499
1498
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1500
1499
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1501
- */function _s(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function ws(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=ws();ys.forEach((e=>{_s(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const xs=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),_s(this,ws(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=ws(),o=i===s&&-1===ys.indexOf(this),r=!i&&e&&-1===ys.indexOf(this);o||r?(this.__subscribe(),_s(this,s,i)):i!==s&&e===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=ys.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(){ys.includes(this)||ys.push(this)}__unsubscribe(){ys.includes(this)&&ys.splice(ys.indexOf(this),1)}}
1500
+ */function xs(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function ws(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=ws();_s.forEach((e=>{xs(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ks=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),xs(this,ws(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=ws(),o=i===s&&-1===_s.indexOf(this),r=!i&&e&&-1===_s.indexOf(this);o||r?(this.__subscribe(),xs(this,s,i)):i!==s&&e===s&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=_s.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(){_s.includes(this)||_s.push(this)}__unsubscribe(){_s.includes(this)&&_s.splice(_s.indexOf(this),1)}}
1502
1501
  /**
1503
1502
  * @license
1504
1503
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1505
1504
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1506
- */;let ks;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)os(t,e)}(rs)};const Cs=new Set,As=t=>class extends(xs(t)){static finalize(){super.finalize();const{is:t}=this;t&&!Cs.has(t)&&(window.Vaadin.registrations.push(this),Cs.add(t),window.Vaadin.developmentModeCallback&&(ks=vs.debounce(ks,us,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),fs(ks)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1505
+ */;let Cs;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)rs(t,e)}(ns)};const As=new Set,Is=t=>class extends(ks(t)){static finalize(){super.finalize();const{is:t}=this;t&&!As.has(t)&&(window.Vaadin.registrations.push(this),As.add(t),window.Vaadin.developmentModeCallback&&(Cs=fs.debounce(Cs,ps,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),bs(Cs)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
1507
1506
  /**
1508
1507
  * @license
1509
1508
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1510
1509
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1511
- */;function Ss(t){return t?new Set(t.split(" ")):new Set}function zs(t){return t?[...t].join(" "):""}function Is(t,e,i){const s=Ss(t.getAttribute(e));s.add(i),t.setAttribute(e,zs(s))}
1510
+ */;function Ss(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...Ss(t)))),e}function zs(t){return t?new Set(t.split(" ")):new Set}function Ts(t){return t?[...t].join(" "):""}function Ds(t,e,i){const s=zs(t.getAttribute(e));s.add(i),t.setAttribute(e,Ts(s))}
1512
1511
  /**
1513
1512
  * @license
1514
1513
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
1515
1514
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1516
1515
  */
1517
- class Ds{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
1516
+ class Es{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
1518
1517
  /**
1519
1518
  * @license
1520
1519
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1521
1520
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1522
- */let Ts=0;function Ps(){return Ts++}
1521
+ */let Ps=0;function Os(){return Ps++}
1523
1522
  /**
1524
1523
  * @license
1525
1524
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1526
1525
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1527
- */class Es extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Ps()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:h}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,h||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Ds(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1526
+ */class Ns extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Os()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Es(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1528
1527
  /**
1529
1528
  * @license
1530
1529
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1531
1530
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1532
- */class Os extends Es{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1531
+ */class Ms extends Ns{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1533
1532
  /**
1534
1533
  @license
1535
1534
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1538,12 +1537,12 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1538
1537
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1539
1538
  Code distributed by Google as part of the polymer project is also
1540
1539
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1541
- */const Ms=t=>t,Ns="string"==typeof document.head.style.touchAction,Bs="__polymerGestures",Fs="__polymerGesturesHandled",js="__polymerGesturesTouchAction",Vs=["mousedown","mousemove","mouseup","click"],Ls=[0,1,4,2],Rs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function qs(t){return Vs.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const $s=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Us={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Ws(t){const e=t.type;if(!qs(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Rs&&(e=Ls[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const Hs={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ys(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Gs(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Js=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Ks={},Zs=[];function Xs(t){const e=Js(t);return e.length>0?e[0]:t.target}function Qs(t){const e=t.type,i=t.currentTarget[Bs];if(!i)return;const s=i[e];if(!s)return;if(!t[Fs]&&(t[Fs]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Hs.touch.id=i.identifier),Hs.touch.id!==i.identifier)return;Ns||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Hs.touch.x=e.clientX,Hs.touch.y=e.clientY,Hs.touch.scrollDecided=!1;else if("touchmove"===i){if(Hs.touch.scrollDecided)return;Hs.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Js(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[js]){e=t[js];break}return e}(t);let s=!1;const o=Math.abs(Hs.touch.x-e.clientX),r=Math.abs(Hs.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():oo("track")}}(t)}const o=t[Fs];if(!o.skip){for(let e,i=0;i<Zs.length;i++)e=Zs[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Zs.length;r++)i=Zs[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function to(t,e,i){return!!Ks[e]&&(function(t,e,i){const s=Ks[e],o=s.deps,r=s.name;let n=t[Bs];n||(t[Bs]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],(!$s||!qs(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Qs,void 0),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&io(t,s.touchAction)}(t,e,i),!0)}function eo(t){Zs.push(t),t.emits.forEach((e=>{Ks[e]=t}))}function io(t,e){Ns&&t instanceof HTMLElement&&ps.run((()=>{t.style.touchAction=e})),t[js]=e}function so(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Ms(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function oo(t){const e=function(t){for(let e,i=0;i<Zs.length;i++){e=Zs[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 ro(t,e,i,s){e&&so(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>oo(t)})}function no(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function ao(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),so(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function ho(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Xs(i||e);!r||Us[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Xs(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||so(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
1540
+ */const Bs=t=>t,Fs="string"==typeof document.head.style.touchAction,js="__polymerGestures",Vs="__polymerGesturesHandled",$s="__polymerGesturesTouchAction",Ls=["mousedown","mousemove","mouseup","click"],Rs=[0,1,4,2],qs=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Us(t){return Ls.indexOf(t)>-1}!function(){try{const t=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Ws=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Hs={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Gs(t){const e=t.type;if(!Us(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!qs&&(e=Rs[t.which]||0),!!(1&e)}return 0===(void 0===t.button?0:t.button)}const Ys={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ks(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Js(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Zs=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Qs={},Xs=[];function to(t){const e=Zs(t);return e.length>0?e[0]:t.target}function eo(t){const e=t.type,i=t.currentTarget[js];if(!i)return;const s=i[e];if(!s)return;if(!t[Vs]&&(t[Vs]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Ys.touch.id=i.identifier),Ys.touch.id!==i.identifier)return;Fs||("touchstart"===e||"touchmove"===e)&&function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Ys.touch.x=e.clientX,Ys.touch.y=e.clientY,Ys.touch.scrollDecided=!1;else if("touchmove"===i){if(Ys.touch.scrollDecided)return;Ys.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Zs(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[$s]){e=t[$s];break}return e}(t);let s=!1;const o=Math.abs(Ys.touch.x-e.clientX),r=Math.abs(Ys.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():no("track")}}(t)}const o=t[Vs];if(!o.skip){for(let e,i=0;i<Xs.length;i++)e=Xs[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<Xs.length;r++)i=Xs[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function io(t,e,i){return!!Qs[e]&&(function(t,e,i){const s=Qs[e],o=s.deps,r=s.name;let n=t[js];n||(t[js]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],(!Ws||!Us(e)||"click"===e)&&(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,eo,void 0),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&oo(t,s.touchAction)}(t,e,i),!0)}function so(t){Xs.push(t),t.emits.forEach((e=>{Qs[e]=t}))}function oo(t,e){Fs&&t instanceof HTMLElement&&ms.run((()=>{t.style.touchAction=e})),t[$s]=e}function ro(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Bs(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function no(t){const e=function(t){for(let e,i=0;i<Xs.length;i++){e=Xs[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 ao(t,e,i,s){e&&ro(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>no(t)})}function lo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function ho(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),ro(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function co(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=to(i||e);!r||Hs[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=to(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||ro(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
1542
1541
  /**
1543
1542
  * @license
1544
1543
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1545
1544
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1546
- */eo({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Gs(this.info)},mousedown(t){if(!Ws(t))return;const e=Xs(t),i=this;Ys(this.info,(t=>{Ws(t)||(ro("up",e,t),Gs(i.info))}),(t=>{Ws(t)&&ro("up",e,t),Gs(i.info)})),ro("down",e,t)},touchstart(t){ro("down",Xs(t),t.changedTouches[0],t)},touchend(t){ro("up",Xs(t),t.changedTouches[0],t)}}),eo({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,Gs(this.info)},mousedown(t){if(!Ws(t))return;const e=Xs(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;no(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&oo("tap"),i.info.addMove({x:s,y:o}),Ws(t)||(i.info.state="end",Gs(i.info)),e&&ao(i.info,e,t),i.info.started=!0)};Ys(this.info,s,(t=>{i.info.started&&s(t),Gs(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=Xs(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;no(this.info,s,o)&&("start"===this.info.state&&oo("tap"),this.info.addMove({x:s,y:o}),ao(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Xs(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),ao(this.info,e,i))}}),eo({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){Ws(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Ws(t)&&ho(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){ho(this.info,t.changedTouches[0],t)}});const lo=de((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()}})),co=de((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){}})),uo=t=>class extends(lo(co(t))){get _activeKeys(){return[" "]}ready(){super.ready(),to(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),to(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)}}
1545
+ */so({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Js(this.info)},mousedown(t){if(!Gs(t))return;const e=to(t),i=this;Ks(this.info,(t=>{Gs(t)||(ao("up",e,t),Js(i.info))}),(t=>{Gs(t)&&ao("up",e,t),Js(i.info)})),ao("down",e,t)},touchstart(t){ao("down",to(t),t.changedTouches[0],t)},touchend(t){ao("up",to(t),t.changedTouches[0],t)}}),so({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,Js(this.info)},mousedown(t){if(!Gs(t))return;const e=to(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;lo(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&no("tap"),i.info.addMove({x:s,y:o}),Gs(t)||(i.info.state="end",Js(i.info)),e&&ho(i.info,e,t),i.info.started=!0)};Ks(this.info,s,(t=>{i.info.started&&s(t),Js(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=to(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;lo(this.info,s,o)&&("start"===this.info.state&&no("tap"),this.info.addMove({x:s,y:o}),ho(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=to(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),ho(this.info,e,i))}}),so({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){Gs(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Gs(t)&&co(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){co(this.info,t.changedTouches[0],t)}});const uo=ue((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()}})),po=ue((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){}})),mo=t=>class extends(uo(po(t))){get _activeKeys(){return[" "]}ready(){super.ready(),io(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),io(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)}}
1547
1546
  /**
1548
1547
  * @license
1549
1548
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1553,65 +1552,64 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1553
1552
  * @license
1554
1553
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1555
1554
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1556
- */let po=!1;function mo(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function vo(){return po}function fo(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 bo(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;)fo(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(bo(t.slice(0,i)),bo(t.slice(i)))}function go(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]"))}function yo(t){return t.getRootNode().activeElement===t}function _o(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(!go(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=_o(t,e)||o})),o}window.addEventListener("keydown",(()=>{po=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{po=!1}),{capture:!0});
1555
+ */let vo=!1;function fo(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function bo(){return vo}function go(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}function yo(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 _o(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;)yo(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(_o(t.slice(0,i)),_o(t.slice(i)))}function xo(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||go(t)}function wo(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]"))}function ko(t){return t.getRootNode().activeElement===t}function Co(t,e){if(t.nodeType!==Node.ELEMENT_NODE||go(t))return!1;const i=t,s=function(t){if(!wo(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=Co(t,e)||o})),o}window.addEventListener("keydown",(()=>{vo=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{vo=!1}),{capture:!0});
1557
1556
  /**
1558
1557
  * @license
1559
1558
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1560
1559
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1561
1560
  */
1562
- const wo=de((t=>class extends t{get _keyboardActive(){return vo()}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}})),xo=t=>class extends(lo(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)}}
1561
+ const Ao=ue((t=>class extends t{get _keyboardActive(){return bo()}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}})),Io=t=>class extends(uo(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)}}
1563
1562
  /**
1564
1563
  * @license
1565
1564
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1566
1565
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1567
- */,ko=de((t=>class extends(wo(xo(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Co=de((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)}})),Ao=de((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),So=de((t=>class extends(Co(lo(Ao(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),zo=new Map;
1566
+ */,So=ue((t=>class extends(Ao(Io(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),zo=ue((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)}})),To=ue((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),(""!==t||void 0!==e)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),Do=ue((t=>class extends(zo(uo(To(t)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(t){this._toggleChecked(t.target.checked)}_toggleChecked(t){this.checked=t}})),Eo=new Map;
1568
1567
  /**
1569
1568
  * @license
1570
1569
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1571
1570
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1572
- */function Io(t){return zo.has(t)||zo.set(t,new WeakMap),zo.get(t)}function Do(t,e){t&&t.removeAttribute(e)}function To(t,e){if(!t||!e)return;const i=Io(e);if(i.has(t))return;const s=Ss(t.getAttribute(e));i.set(t,new Set(s))}function Po(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=Io(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):To(t,e),Do(t,e)),function(t,e,i){const s=Ss(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,zs(s)):t.removeAttribute(e)}(t,e,o);const h=s||zs(a);h&&Is(t,e,h)}
1571
+ */function Po(t){return Eo.has(t)||Eo.set(t,new WeakMap),Eo.get(t)}function Oo(t,e){t&&t.removeAttribute(e)}function No(t,e){if(!t||!e)return;const i=Po(e);if(i.has(t))return;const s=zs(t.getAttribute(e));i.set(t,new Set(s))}function Mo(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=Po(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):No(t,e),Oo(t,e)),function(t,e,i){const s=zs(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Ts(s)):t.removeAttribute(e)}(t,e,o);const l=s||Ts(a);l&&Ds(t,e,l)}
1573
1572
  /**
1574
1573
  * @license
1575
1574
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1576
1575
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1577
1576
  */
1578
- class Eo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){To(t,e),Do(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Io(e),s=i.get(t);s&&0!==s.size?Is(t,e,zs(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Po(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Po(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Po(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
1577
+ class Bo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){No(t,e),Oo(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Po(e),s=i.get(t);s&&0!==s.size?Ds(t,e,Ts(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Mo(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Mo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Mo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
1579
1578
  /**
1580
1579
  * @license
1581
1580
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1582
1581
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1583
- */const Oo=de((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Mo=document.createElement("div");
1582
+ */const Fo=ue((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),jo=document.createElement("div");
1584
1583
  /**
1585
1584
  * @license
1586
1585
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1587
1586
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1588
- */let No;Mo.style.position="fixed",Mo.style.clip="rect(0px, 0px, 0px, 0px)",Mo.setAttribute("aria-live","polite"),document.body.appendChild(Mo);
1587
+ */let Vo;function $o(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(jo.removeAttribute("aria-live"),jo.removeAttribute("role"),Vo=fs.debounce(Vo,us,(()=>{jo.setAttribute("role","alert")}))):(Vo&&Vo.cancel(),jo.removeAttribute("role"),jo.setAttribute("aria-live",i)),jo.textContent="",setTimeout((()=>{jo.textContent=t}),s)}
1589
1588
  /**
1590
1589
  * @license
1591
1590
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1592
1591
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1593
- */
1594
- class Bo extends Es{constructor(t,e,i,s={}){super(t,e,i,u(d({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1592
+ */jo.style.position="fixed",jo.style.clip="rect(0px, 0px, 0px, 0px)",jo.setAttribute("aria-live","polite"),document.body.appendChild(jo);class Lo extends Ns{constructor(t,e,i,s={}){super(t,e,i,u(d({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1595
1593
  /**
1596
1594
  * @license
1597
1595
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1598
1596
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1599
- */class Fo extends Bo{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=!(!i||!e||""===e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(Mo.removeAttribute("aria-live"),Mo.removeAttribute("role"),No=vs.debounce(No,ds,(()=>{Mo.setAttribute("role","alert")}))):(No&&No.cancel(),Mo.removeAttribute("role"),Mo.setAttribute("aria-live",i)),Mo.textContent="",setTimeout((()=>{Mo.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
1597
+ */class Ro extends Lo{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=!(!i||!e||""===e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&$o(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
1600
1598
  /**
1601
1599
  * @license
1602
1600
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1603
1601
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1604
- */class jo extends Bo{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1602
+ */class qo extends Lo{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1605
1603
  /**
1606
1604
  * @license
1607
1605
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1608
1606
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1609
- */class Vo extends Bo{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1607
+ */class Uo extends Lo{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
1610
1608
  /**
1611
1609
  * @license
1612
1610
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1613
1611
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1614
- */const Lo=de((t=>class extends(Oo(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Vo(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Ro=de((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}})),qo=t=>class extends(Ro(Lo(Oo(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Eo(this),this._helperController=new jo(this),this._errorController=new Fo(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1612
+ */const Wo=ue((t=>class extends(Fo(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Uo(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),Ho=ue((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}})),Go=t=>class extends(Ho(Wo(Fo(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new Bo(this),this._helperController=new qo(this),this._errorController=new Ro(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
1615
1613
  /**
1616
1614
  * @license
1617
1615
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1621,17 +1619,17 @@ class Bo extends Es{constructor(t,e,i,s={}){super(t,e,i,u(d({},s),{useUniqueId:!
1621
1619
  * @license
1622
1620
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1623
1621
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1624
- */class $o extends Es{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1622
+ */class Yo extends Ns{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1625
1623
  /**
1626
1624
  * @license
1627
1625
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1628
1626
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1629
- */class Uo{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
1627
+ */class Ko{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
1630
1628
  /**
1631
1629
  * @license
1632
1630
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1633
1631
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1634
- */const Wo=t=>class extends(qo(So(ko(uo(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new $o(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Uo(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1632
+ */const Jo=t=>class extends(Go(Do(So(mo(t))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on"}ready(){super.ready(),this.addController(new Yo(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ko(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)")}_shouldSetActive(t){return!this.readonly&&"a"!==t.target.localName&&t.target!==this._helperNode&&t.target!==this._errorNode&&super._shouldSetActive(t)}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("click",this._boundOnInputClick)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("click",this._boundOnInputClick)}_onInputClick(t){this.readonly&&t.preventDefault()}__readonlyChanged(t,e){e&&(t?e.setAttribute("aria-readonly","true"):e.removeAttribute("aria-readonly"))}_toggleChecked(t){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(t)}checkValidity(){return!this.required||!!this.checked}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_checkedChanged(t){(t||this.__oldChecked)&&this.validate(),this.__oldChecked=t}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}_onRequiredIndicatorClick(){this._labelNode.click()}}
1635
1633
  /**
1636
1634
  * @license
1637
1635
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -1642,7 +1640,7 @@ class Bo extends Es{constructor(t,e,i,s={}){super(t,e,i,u(d({},s),{useUniqueId:!
1642
1640
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1643
1641
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1644
1642
  */
1645
- Mt("vaadin-checkbox",x`
1643
+ Mt("vaadin-checkbox",w`
1646
1644
  :host {
1647
1645
  display: inline-block;
1648
1646
  }
@@ -1730,7 +1728,7 @@ Mt("vaadin-checkbox",x`
1730
1728
  outline-width: 2px;
1731
1729
  }
1732
1730
  }
1733
- `,{moduleId:"vaadin-checkbox-styles"});class Ho extends(Wo(As(Vt(es)))){static get is(){return"vaadin-checkbox"}static get template(){return Qi`
1731
+ `,{moduleId:"vaadin-checkbox-styles"});class Zo extends(Jo(Is($t(is)))){static get is(){return"vaadin-checkbox"}static get template(){return ts`
1734
1732
  <div class="vaadin-checkbox-container">
1735
1733
  <div part="checkbox" aria-hidden="true"></div>
1736
1734
  <slot name="input"></slot>
@@ -1746,13 +1744,13 @@ Mt("vaadin-checkbox",x`
1746
1744
  </div>
1747
1745
  </div>
1748
1746
  <slot name="tooltip"></slot>
1749
- `}ready(){super.ready(),this._tooltipController=new Os(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}v(Ho);
1747
+ `}ready(){super.ready(),this._tooltipController=new Ms(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}v(Zo);
1750
1748
  /**
1751
1749
  * @license
1752
1750
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1753
1751
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1754
1752
  */
1755
- const Yo=x`
1753
+ const Qo=w`
1756
1754
  :host {
1757
1755
  --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
1758
1756
  }
@@ -1813,7 +1811,7 @@ const Yo=x`
1813
1811
  * @license
1814
1812
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1815
1813
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1816
- */,Go=x`
1814
+ */,Xo=w`
1817
1815
  [part='label'] {
1818
1816
  align-self: flex-start;
1819
1817
  color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
@@ -1925,7 +1923,7 @@ const Yo=x`
1925
1923
  margin-left: 0;
1926
1924
  margin-right: calc(var(--lumo-border-radius-m) / 4);
1927
1925
  }
1928
- `;Mt("",Go,{moduleId:"lumo-required-field"}),Mt("vaadin-checkbox-group",[Go,Yo,x`
1926
+ `;Mt("",Xo,{moduleId:"lumo-required-field"}),Mt("vaadin-checkbox-group",[Xo,Qo,w`
1929
1927
  :host {
1930
1928
  color: var(--lumo-body-text-color);
1931
1929
  font-size: var(--lumo-font-size-m);
@@ -1974,7 +1972,7 @@ const Yo=x`
1974
1972
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1975
1973
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1976
1974
  */
1977
- const Jo=t=>class extends(qo(wo(lo(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Os(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Ds(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__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),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.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?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&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){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1975
+ const tr=t=>class extends(Go(Ao(uo(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Ms(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Es(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__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),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.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?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&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){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1978
1976
  /**
1979
1977
  * @license
1980
1978
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
@@ -1985,7 +1983,7 @@ const Jo=t=>class extends(qo(wo(lo(t)))){static get properties(){return{value:{t
1985
1983
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1986
1984
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1987
1985
  */
1988
- Mt("vaadin-checkbox-group",x`
1986
+ Mt("vaadin-checkbox-group",w`
1989
1987
  :host {
1990
1988
  display: inline-flex;
1991
1989
  }
@@ -2014,7 +2012,7 @@ Mt("vaadin-checkbox-group",x`
2014
2012
  :host(:not([has-label])) [part='label'] {
2015
2013
  display: none;
2016
2014
  }
2017
- `,{moduleId:"vaadin-checkbox-group-styles"});class Ko extends(Jo(As(Vt(es)))){static get is(){return"vaadin-checkbox-group"}static get template(){return Qi`
2015
+ `,{moduleId:"vaadin-checkbox-group-styles"});class er extends(tr(Is($t(is)))){static get is(){return"vaadin-checkbox-group"}static get template(){return ts`
2018
2016
  <div class="vaadin-group-field-container">
2019
2017
  <div part="label">
2020
2018
  <slot name="label"></slot>
@@ -2035,13 +2033,13 @@ Mt("vaadin-checkbox-group",x`
2035
2033
  </div>
2036
2034
 
2037
2035
  <slot name="tooltip"></slot>
2038
- `}}v(Ko);
2036
+ `}}v(er);
2039
2037
  /**
2040
2038
  * @license
2041
2039
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2042
2040
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2043
2041
  */
2044
- const Zo=x`
2042
+ const ir=w`
2045
2043
  :host {
2046
2044
  top: var(--lumo-space-m);
2047
2045
  right: var(--lumo-space-m);
@@ -2106,13 +2104,13 @@ const Zo=x`
2106
2104
  opacity: 1;
2107
2105
  }
2108
2106
  }
2109
- `;Mt("",Zo,{moduleId:"lumo-overlay"});
2107
+ `;Mt("",ir,{moduleId:"lumo-overlay"});
2110
2108
  /**
2111
2109
  * @license
2112
2110
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2113
2111
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2114
2112
  */
2115
- const Xo=x`
2113
+ const sr=w`
2116
2114
  :host([opening]),
2117
2115
  :host([closing]) {
2118
2116
  animation: 0.14s lumo-overlay-dummy-animation;
@@ -2142,7 +2140,7 @@ const Xo=x`
2142
2140
  opacity: 0;
2143
2141
  }
2144
2142
  }
2145
- `;Mt("",Xo,{moduleId:"lumo-menu-overlay-core"});const Qo=[Zo,Xo,x`
2143
+ `;Mt("",sr,{moduleId:"lumo-menu-overlay-core"});const or=[ir,sr,w`
2146
2144
  /* Small viewport (bottom sheet) styles */
2147
2145
  /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
2148
2146
  @media (max-width: 450px), (max-height: 450px) {
@@ -2204,7 +2202,7 @@ const Xo=x`
2204
2202
  transform: translateY(150%);
2205
2203
  }
2206
2204
  }
2207
- `];Mt("",Qo,{moduleId:"lumo-menu-overlay"}),Mt("vaadin-date-picker-overlay",[Qo,x`
2205
+ `];Mt("",or,{moduleId:"lumo-menu-overlay"}),Mt("vaadin-date-picker-overlay",[or,w`
2208
2206
  [part='overlay'] {
2209
2207
  /*
2210
2208
  Width:
@@ -2249,7 +2247,7 @@ const Xo=x`
2249
2247
  max-height: 70vh;
2250
2248
  }
2251
2249
  }
2252
- `],{moduleId:"lumo-date-picker-overlay"});const tr=x`
2250
+ `],{moduleId:"lumo-date-picker-overlay"});const rr=w`
2253
2251
  :host {
2254
2252
  /* Sizing */
2255
2253
  --lumo-button-size: var(--lumo-size-m);
@@ -2525,7 +2523,7 @@ const Xo=x`
2525
2523
  margin-left: 0;
2526
2524
  margin-right: 0;
2527
2525
  }
2528
- `;Mt("vaadin-button",tr,{moduleId:"lumo-button"}),Mt("vaadin-date-picker-year",x`
2526
+ `;Mt("vaadin-button",rr,{moduleId:"lumo-button"}),Mt("vaadin-date-picker-year",w`
2529
2527
  :host([current]) [part='year-number'] {
2530
2528
  color: var(--lumo-primary-text-color);
2531
2529
  }
@@ -2549,7 +2547,7 @@ const Xo=x`
2549
2547
  color: var(--lumo-disabled-text-color);
2550
2548
  content: '\\2022';
2551
2549
  }
2552
- `,{moduleId:"lumo-date-picker-year"}),Mt("vaadin-date-picker-overlay-content",x`
2550
+ `,{moduleId:"lumo-date-picker-year"}),Mt("vaadin-date-picker-overlay-content",w`
2553
2551
  :host {
2554
2552
  position: relative;
2555
2553
  /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
@@ -2699,7 +2697,7 @@ const Xo=x`
2699
2697
  padding-left: 50px;
2700
2698
  }
2701
2699
  }
2702
- `,{moduleId:"lumo-date-picker-overlay-content"}),Mt("vaadin-month-calendar",x`
2700
+ `,{moduleId:"lumo-date-picker-overlay-content"}),Mt("vaadin-month-calendar",w`
2703
2701
  :host {
2704
2702
  -moz-user-select: none;
2705
2703
  -webkit-user-select: none;
@@ -2846,7 +2844,7 @@ const Xo=x`
2846
2844
  :host([disabled]) * {
2847
2845
  color: var(--lumo-disabled-text-color) !important;
2848
2846
  }
2849
- `,{moduleId:"lumo-month-calendar"}),Mt("vaadin-input-container",x`
2847
+ `,{moduleId:"lumo-month-calendar"}),Mt("vaadin-input-container",w`
2850
2848
  :host {
2851
2849
  background: var(--_background);
2852
2850
  padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
@@ -3030,7 +3028,7 @@ const Xo=x`
3030
3028
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3031
3029
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3032
3030
  */
3033
- const er=x`
3031
+ const nr=w`
3034
3032
  [part$='button'] {
3035
3033
  flex: none;
3036
3034
  width: 1em;
@@ -3057,13 +3055,13 @@ const er=x`
3057
3055
  font-family: 'lumo-icons';
3058
3056
  display: block;
3059
3057
  }
3060
- `;Mt("",er,{moduleId:"lumo-field-button"});
3058
+ `;Mt("",nr,{moduleId:"lumo-field-button"});
3061
3059
  /**
3062
3060
  * @license
3063
3061
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3064
3062
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3065
3063
  */
3066
- const ir=[Go,er,Yo,x`
3064
+ const ar=[Xo,nr,Qo,w`
3067
3065
  :host {
3068
3066
  --lumo-text-field-size: var(--lumo-size-m);
3069
3067
  color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
@@ -3194,7 +3192,7 @@ const ir=[Go,er,Yo,x`
3194
3192
  [part='clear-button']::before {
3195
3193
  content: var(--lumo-icons-cross);
3196
3194
  }
3197
- `];Mt("",ir,{moduleId:"lumo-input-field-shared-styles"}),Mt("vaadin-date-picker",[ir,x`
3195
+ `];Mt("",ar,{moduleId:"lumo-input-field-shared-styles"}),Mt("vaadin-date-picker",[ar,w`
3198
3196
  [part='toggle-button']::before {
3199
3197
  content: var(--lumo-icons-calendar);
3200
3198
  }
@@ -3222,7 +3220,7 @@ const ir=[Go,er,Yo,x`
3222
3220
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3223
3221
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3224
3222
  */
3225
- const sr=t=>class extends t{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()))}))}}
3223
+ const lr=t=>class extends t{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()))}))}}
3226
3224
  /**
3227
3225
  * @license
3228
3226
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -3233,7 +3231,7 @@ const sr=t=>class extends t{static get properties(){return{disabled:{type:Boolea
3233
3231
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3234
3232
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3235
3233
  */
3236
- Mt("vaadin-input-container",x`
3234
+ Mt("vaadin-input-container",w`
3237
3235
  :host {
3238
3236
  display: flex;
3239
3237
  align-items: center;
@@ -3298,17 +3296,17 @@ Mt("vaadin-input-container",x`
3298
3296
  /* Override default opacity in Firefox */
3299
3297
  opacity: 1;
3300
3298
  }
3301
- `,{moduleId:"vaadin-input-container-styles"});class or extends(sr(Vt(xs(es)))){static get is(){return"vaadin-input-container"}static get template(){return Qi`
3299
+ `,{moduleId:"vaadin-input-container-styles"});class hr extends(lr($t(ks(is)))){static get is(){return"vaadin-input-container"}static get template(){return ts`
3302
3300
  <slot name="prefix"></slot>
3303
3301
  <slot></slot>
3304
3302
  <slot name="suffix"></slot>
3305
- `}}v(or);
3303
+ `}}v(hr);
3306
3304
  /**
3307
3305
  * @license
3308
3306
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3309
3307
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3310
3308
  */
3311
- const rr=x`
3309
+ const cr=w`
3312
3310
  :host {
3313
3311
  z-index: 200;
3314
3312
  position: fixed;
@@ -3376,62 +3374,62 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3376
3374
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3377
3375
  Code distributed by Google as part of the polymer project is also
3378
3376
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3379
- */;let nr=!1,ar=[],hr=[];function lr(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function cr(t,e,i){nr||(nr=!0,requestAnimationFrame((function(){nr=!1,function(t){for(;t.length;)lr(t.shift())}(ar),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)lr(t.shift())}(hr)}))}))),hr.push([t,e,i])
3377
+ */;let dr=!1,ur=[],pr=[];function mr(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function vr(t,e,i){dr||(dr=!0,requestAnimationFrame((function(){dr=!1,function(t){for(;t.length;)mr(t.shift())}(ur),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)mr(t.shift())}(pr)}))}))),pr.push([t,e,i])
3380
3378
  /**
3381
3379
  * @license
3382
3380
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3383
3381
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3384
- */}const dr=t=>t.test(navigator.userAgent),ur=t=>t.test(navigator.platform);dr(/Android/u),dr(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),dr(/Firefox/u);const pr=ur(/^iPad/u)||ur(/^Mac/u)&&navigator.maxTouchPoints>1,mr=ur(/^iPhone/u)||pr,vr=dr(/^((?!chrome|android).)*safari/iu),fr=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
3382
+ */}const fr=t=>t.test(navigator.userAgent),br=t=>t.test(navigator.platform);fr(/Android/u),fr(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),fr(/Firefox/u);const gr=br(/^iPad/u)||br(/^Mac/u)&&navigator.maxTouchPoints>1,yr=br(/^iPhone/u)||gr,_r=fr(/^((?!chrome|android).)*safari/iu),xr=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
3385
3383
  /**
3386
3384
  * @license
3387
3385
  * Copyright (c) 2017 Anton Korzunov
3388
3386
  * SPDX-License-Identifier: MIT
3389
- */let br=new WeakMap,gr=new WeakMap,yr={},_r=0;const wr=t=>t&&t.nodeType===Node.ELEMENT_NODE,xr=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},kr=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>wr(t)?e.map((e=>{if(!wr(e))return xr(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return xr(e,"is not contained inside",t),null})).filter((t=>!!t)):(xr(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);yr[i]||(yr[i]=new WeakMap);const r=yr[i],n=[],a=new Set,h=new Set(o),l=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&l(e),l(t.parentNode||t.host)};o.forEach(l);const c=t=>{if(!t||h.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(br.get(t)||0)+1,h=(r.get(t)||0)+1;br.set(t,a),r.set(t,h),n.push(t),1===a&&o&&gr.set(t,!0),1===h&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),a.clear(),_r+=1,()=>{n.forEach((t=>{const e=br.get(t)-1,o=r.get(t)-1;br.set(t,e),r.set(t,o),e||(gr.has(t)?gr.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),_r-=1,_r||(br=new WeakMap,br=new WeakMap,gr=new WeakMap,yr={})}})(s,e,i,"aria-hidden")
3387
+ */let wr=new WeakMap,kr=new WeakMap,Cr={},Ar=0;const Ir=t=>t&&t.nodeType===Node.ELEMENT_NODE,Sr=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},zr=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>Ir(t)?e.map((e=>{if(!Ir(e))return Sr(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Sr(e,"is not contained inside",t),null})).filter((t=>!!t)):(Sr(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Cr[i]||(Cr[i]=new WeakMap);const r=Cr[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(wr.get(t)||0)+1,l=(r.get(t)||0)+1;wr.set(t,a),r.set(t,l),n.push(t),1===a&&o&&kr.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),a.clear(),Ar+=1,()=>{n.forEach((t=>{const e=wr.get(t)-1,o=r.get(t)-1;wr.set(t,e),r.set(t,o),e||(kr.has(t)?kr.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),Ar-=1,Ar||(wr=new WeakMap,wr=new WeakMap,kr=new WeakMap,Cr={})}})(s,e,i,"aria-hidden")
3390
3388
  /**
3391
3389
  * @license
3392
3390
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3393
3391
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3394
- */};class Cr{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=kr(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
3392
+ */};class Tr{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=zr(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
3395
3393
  /**
3396
3394
  * @license
3397
3395
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3398
3396
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3399
- */class Ar{saveFocus(t){this.focusNode=t||mo()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;mo()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
3397
+ */class Dr{saveFocus(t){this.focusNode=t||fo()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;fo()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
3400
3398
  /**
3401
3399
  * @license
3402
3400
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3403
3401
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3404
- */const Sr=[];class zr{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return _o(t,e)?bo(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(yo).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Sr.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Sr.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Sr).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()}}
3402
+ */const Er=[];class Pr{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return Co(t,e)?_o(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(ko).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown)}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown)}trapFocus(t){if(this.__trapNode=t,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Er.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Er.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Er).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()}}
3405
3403
  /**
3406
3404
  * @license
3407
3405
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3408
3406
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3409
- */const Ir=t=>class extends(Oo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Cr(this),this.__focusTrapController=new zr(this),this.__focusRestorationController=new Ar}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!vo();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=mo();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3407
+ */const Or=t=>class extends(Fo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Tr(this),this.__focusTrapController=new Pr(this),this.__focusRestorationController=new Dr}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!bo();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=fo();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3410
3408
  /**
3411
3409
  * @license
3412
3410
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3413
3411
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3414
- */,Dr=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Tr=()=>Dr().filter((t=>t.$.overlay)),Pr=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Tr().pop())()}bringToFront(){let t="";const e=Dr().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Tr().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Tr();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3412
+ */,Nr=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Mr=()=>Nr().filter((t=>t.$.overlay)),Br=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Mr().pop())()}bringToFront(){let t="";const e=Nr().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Mr().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Mr();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3415
3413
  /**
3416
3414
  * @license
3417
3415
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3418
3416
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3419
- */,Er=t=>class extends(Ir(Pr(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),mr&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),cr(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,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(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3417
+ */,Fr=t=>class extends(Or(Br(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),yr&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),vr(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,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(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3420
3418
  /**
3421
3419
  * @license
3422
3420
  * Copyright (c) 2024 Vaadin Ltd.
3423
3421
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3424
- */,Or={start:"top",end:"bottom"},Mr={start:"left",end:"right"},Nr=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Br=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!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.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),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)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:h,top:l,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(l)}px ${-Math.floor(s.clientWidth-(h+c))}px ${-Math.floor(s.clientHeight-(l+d))}px ${-Math.floor(h)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}
3422
+ */,jr={start:"top",end:"bottom"},Vr={start:"left",end:"right"},$r=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Lr=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!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.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),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)})),this.positionTarget&&(this.__observePositionTargetMove=function(t,e){let i=null;const s=document.documentElement;function o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}
3425
3423
  /**
3426
3424
  * @license
3427
3425
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3428
3426
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3429
- */(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Nr.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Nr.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._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Or,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Mr,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__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,Mr)}__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,Or)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],h=t[r?n.start:n.end]-s[n.start],l=o?a:h;return o===(l>(o?h:a)||l>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Or.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===Mr.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,h=parseFloat(o.style[n]||getComputedStyle(o)[n]),l=this.__adjustBottomProperty(n,s,h),c=l?`${l}px`:`${h+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
3427
+ */(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,$r.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,$r.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._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,jr,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Vr,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__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,Vr)}__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,jr)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===jr.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===Vr.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),c=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
3430
3428
  /**
3431
3429
  * @license
3432
3430
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
3433
3431
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3434
- */,Fr=t=>class extends(Br(Er(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!go(t.composedPath()[0])&&t.preventDefault()}}
3432
+ */,Rr=t=>class extends(Lr(Fr(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!wo(t.composedPath()[0])&&t.preventDefault()}}
3435
3433
  /**
3436
3434
  * @license
3437
3435
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3442,7 +3440,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3442
3440
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3443
3441
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3444
3442
  */
3445
- Mt("vaadin-date-picker-overlay",[rr,x`
3443
+ Mt("vaadin-date-picker-overlay",[cr,w`
3446
3444
  [part='overlay'] {
3447
3445
  display: flex;
3448
3446
  flex: auto;
@@ -3457,20 +3455,20 @@ Mt("vaadin-date-picker-overlay",[rr,x`
3457
3455
  outline: 3px solid;
3458
3456
  }
3459
3457
  }
3460
- `],{moduleId:"vaadin-date-picker-overlay-styles"});class jr extends(Fr(xs(Vt(es)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Qi`
3458
+ `],{moduleId:"vaadin-date-picker-overlay-styles"});class qr extends(Rr(ks($t(is)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return ts`
3461
3459
  <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
3462
3460
  <div part="overlay" id="overlay">
3463
3461
  <div part="content" id="content">
3464
3462
  <slot></slot>
3465
3463
  </div>
3466
3464
  </div>
3467
- `}}v(jr);
3465
+ `}}v(qr);
3468
3466
  /**
3469
3467
  * @license
3470
3468
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3471
3469
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3472
3470
  */
3473
- const Vr=x`
3471
+ const Ur=w`
3474
3472
  :host {
3475
3473
  display: inline-block;
3476
3474
  position: relative;
@@ -3530,7 +3528,7 @@ const Vr=x`
3530
3528
  outline-color: GrayText;
3531
3529
  }
3532
3530
  }
3533
- `,Lr=t=>class extends(uo(xo(wo(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),!(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)&&this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
3531
+ `,Wr=t=>class extends(mo(Io(Ao(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),!(t.altKey||t.shiftKey||t.ctrlKey||t.metaKey)&&this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
3534
3532
  /**
3535
3533
  * @license
3536
3534
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -3540,7 +3538,7 @@ const Vr=x`
3540
3538
  * @license
3541
3539
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3542
3540
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3543
- */Mt("vaadin-button",Vr,{moduleId:"vaadin-button-styles"});class Rr extends(Lr(As(Vt(Oo(es))))){static get is(){return"vaadin-button"}static get template(){return Qi`
3541
+ */Mt("vaadin-button",Ur,{moduleId:"vaadin-button-styles"});class Hr extends(Wr(Is($t(Fo(is))))){static get is(){return"vaadin-button"}static get template(){return ts`
3544
3542
  <div class="vaadin-button-container">
3545
3543
  <span part="prefix" aria-hidden="true">
3546
3544
  <slot name="prefix"></slot>
@@ -3553,7 +3551,7 @@ const Vr=x`
3553
3551
  </span>
3554
3552
  </div>
3555
3553
  <slot name="tooltip"></slot>
3556
- `}ready(){super.ready(),this._tooltipController=new Os(this),this.addController(this._tooltipController)}}function qr(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function $r(t,e,i=qr){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Ur(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function Wr(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(Ur(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function Hr(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 Yr(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function Gr(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}v(Rr);
3554
+ `}ready(){super.ready(),this._tooltipController=new Ms(this),this.addController(this._tooltipController)}}function Gr(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function Yr(t,e,i=Gr){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function Kr(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function Jr(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(Kr(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function Zr(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 Qr(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function Xr(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}v(Hr);
3557
3555
  /**
3558
3556
  @license
3559
3557
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3563,7 +3561,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3563
3561
  Code distributed by Google as part of the polymer project is also
3564
3562
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3565
3563
  */
3566
- class Jr{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,Kr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),Kr.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 Jr?t._cancelAsync():t=new Jr,t.setConfig(e,i),t}}let Kr=new Set;const Zr=function(){const t=!!Kr.size;return Kr.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t
3564
+ class tn{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,en.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),en.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 tn?t._cancelAsync():t=new tn,t.setConfig(e,i),t}}let en=new Set;const sn=function(){const t=!!en.size;return en.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t
3567
3565
  /**
3568
3566
  @license
3569
3567
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3572,29 +3570,29 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3572
3570
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3573
3571
  Code distributed by Google as part of the polymer project is also
3574
3572
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3575
- */},Xr=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=Zr()}while(t||e)},Qr=document.createElement("template");Qr.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class tn extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Qr.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Xr()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=vs.debounce(this._debouncerScrollFinish,cs.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=vs.debounce(this._debouncerUpdateClones,cs.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-${Ps()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3573
+ */},on=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=sn()}while(t||e)},rn=document.createElement("template");rn.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class nn extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(rn.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),on()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=fs.debounce(this._debouncerScrollFinish,ds.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=fs.debounce(this._debouncerUpdateClones,ds.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-${Os()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3576
3574
  /**
3577
3575
  * @license
3578
3576
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3579
3577
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3580
- */const en=document.createElement("template");en.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",v(class extends tn{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(en.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Yr(e)}});
3578
+ */const an=document.createElement("template");an.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",v(class extends nn{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(an.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Qr(e)}});
3581
3579
  /**
3582
3580
  * @license
3583
3581
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3584
3582
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3585
3583
  */
3586
- const sn=document.createElement("template");sn.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",v(class extends tn{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(sn.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
3584
+ const ln=document.createElement("template");ln.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",v(class extends nn{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(ln.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
3587
3585
  /**
3588
3586
  * @license
3589
3587
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3590
3588
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3591
3589
  */
3592
- const on=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
3590
+ const hn=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
3593
3591
  /**
3594
3592
  * @license
3595
3593
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3596
3594
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3597
- */;class rn extends(Vt(on(es))){static get is(){return"vaadin-date-picker-year"}static get template(){return Qi`
3595
+ */;class cn extends($t(hn(is))){static get is(){return"vaadin-date-picker-year"}static get template(){return ts`
3598
3596
  <style>
3599
3597
  :host {
3600
3598
  display: block;
@@ -3613,7 +3611,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3613
3611
  Code distributed by Google as part of the polymer project is also
3614
3612
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3615
3613
  */
3616
- function nn(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}v(rn);const an=de((t=>class extends t{_shouldPropertyChange(t,e,i){return nn(this,t,e,i,!0)}})),hn=de((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return nn(this,t,e,i,this.mutableData)}}));an._mutablePropertyChange=nn;
3614
+ function dn(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}v(cn);const un=ue((t=>class extends t{_shouldPropertyChange(t,e,i){return dn(this,t,e,i,!0)}})),pn=ue((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return dn(this,t,e,i,this.mutableData)}}));un._mutablePropertyChange=dn;
3617
3615
  /**
3618
3616
  @license
3619
3617
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3623,7 +3621,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3623
3621
  Code distributed by Google as part of the polymer project is also
3624
3622
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3625
3623
  */
3626
- let ln=null;function cn(){return ln}cn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:cn,writable:!0}});const dn=Wi(cn),un=an(dn),pn=Wi(class{});class mn extends pn{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(!!t!=!!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"),Se(Se(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Se(Se(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 vn=an(mn);function fn(t){let e=t.__dataHost;return e&&e._methodHost||e}function bn(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function gn(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function yn(t,e,i){if(Qt&&!fn(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:mn)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?vn:mn;yn.mixin&&(s=yn.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:gn(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=fn(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?un:dn;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:bn(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);ie&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)(function(t,e){ln=t,Object.setPrototypeOf(t,e.prototype),new e,ln=null})(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
3624
+ let mn=null;function vn(){return mn}vn.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:vn,writable:!0}});const fn=Hi(vn),bn=un(fn),gn=Hi(class{});class yn extends gn{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(!!t!=!!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"),Se(Se(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Se(Se(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 _n=un(yn);function xn(t){let e=t.__dataHost;return e&&e._methodHost||e}function wn(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function kn(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Cn(t,e,i){if(te&&!xn(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:yn)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?_n:yn;Cn.mixin&&(s=Cn.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:kn(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=xn(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?bn:fn;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:wn(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);se&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)(function(t,e){mn=t,Object.setPrototypeOf(t,e.prototype),new e,mn=null})(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
3627
3625
  /**
3628
3626
  @license
3629
3627
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3633,7 +3631,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3633
3631
  Code distributed by Google as part of the polymer project is also
3634
3632
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3635
3633
  */
3636
- let _n=!1;
3634
+ let An=!1;
3637
3635
  /**
3638
3636
  @license
3639
3637
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3643,13 +3641,13 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3643
3641
  Code distributed by Google as part of the polymer project is also
3644
3642
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3645
3643
  */
3646
- const wn=hn(es);class xn extends wn{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:!he,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(ee&&!Jt){if(!_n){_n=!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=Se(Se(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=yn(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||De(t,e)||Te(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Pe(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}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=Jr.debounce(this.__renderDebouncer,e>0?Ye.after(e):Ge,t.bind(this)),Kr.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),Xr()}__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),(!he||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Se(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return Se(Se(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Se(e).parentNode;return null}(this.template,t)}}customElements.define(xn.is,xn);
3644
+ const In=pn(is);class Sn extends In{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:!he,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(ie&&!Jt){if(!An){An=!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=Se(Se(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=Cn(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||De(t,e)||Ee(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Pe(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}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=tn.debounce(this.__renderDebouncer,e>0?Ye.after(e):Ke,t.bind(this)),en.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),on()}__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),(!he||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Se(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return Se(Se(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Se(e).parentNode;return null}(this.template,t)}}customElements.define(Sn.is,Sn);
3647
3645
  /**
3648
3646
  * @license
3649
3647
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3650
3648
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3651
3649
  */
3652
- const kn=t=>class extends(wo(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>$r(t.date,this.focusedDate)))}ready(){super.ready(),to(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Wr(s,e,i)||Wr(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>$r(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return $r(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
3650
+ const zn=t=>class extends(Ao(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>Yr(t.date,this.focusedDate)))}ready(){super.ready(),io(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||Jr(s,e,i)||Jr(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>Yr(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return Yr(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){!this.ignoreTaps&&!this._notTapping&&t.target.date&&!t.target.hasAttribute("disabled")&&(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){
3653
3651
  /**
3654
3652
  * @license
3655
3653
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3665,7 +3663,7 @@ const kn=t=>class extends(wo(t)){static get properties(){return{month:{type:Obje
3665
3663
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3666
3664
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3667
3665
  */
3668
- Mt("vaadin-month-calendar",x`
3666
+ Mt("vaadin-month-calendar",w`
3669
3667
  :host {
3670
3668
  display: block;
3671
3669
  }
@@ -3721,7 +3719,7 @@ Mt("vaadin-month-calendar",x`
3721
3719
  outline: 3px solid;
3722
3720
  }
3723
3721
  }
3724
- `,{moduleId:"vaadin-month-calendar-styles"});class Cn extends(kn(Vt(es))){static get template(){return Qi`
3722
+ `,{moduleId:"vaadin-month-calendar-styles"});class Tn extends(zn($t(is))){static get template(){return ts`
3725
3723
  <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3726
3724
  <table
3727
3725
  id="monthGrid"
@@ -3763,18 +3761,18 @@ Mt("vaadin-month-calendar",x`
3763
3761
  </template>
3764
3762
  </tbody>
3765
3763
  </table>
3766
- `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>qr(new Date),h=t<qr(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),h&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return $r(t,e)}__isDaySelected(t,e){return $r(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!Wr(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s)&&this.__isDayDisabled(t,e,i,s))return"true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}v(Cn);
3764
+ `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,o,r){const n=["date"],a=t>Gr(new Date),l=t<Gr(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return Yr(t,e)}__isDaySelected(t,e){return Yr(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!Jr(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s)&&this.__isDayDisabled(t,e,i,s))return"true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}v(Tn);
3767
3765
  /**
3768
3766
  * @license
3769
3767
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3770
3768
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3771
3769
  */
3772
- class An{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)}}
3770
+ class Dn{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)}}
3773
3771
  /**
3774
3772
  * @license
3775
3773
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3776
3774
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3777
- */const Sn=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){io(this.$.scrollers,"pan-y"),to(this.$.scrollers,"track",this._track.bind(this)),to(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),to(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),to(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new An(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Es(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),to(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Es(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),to(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Es(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Es(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),to(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,h,l){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=l,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,h?t.setAttribute("theme",h):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=vs.debounce(this._debouncer,cs.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Ur(t)):i}_onTodayTap(){const t=this._getTodayMidnight();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._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return Yr(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){$r(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&$r(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return m(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return m(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{cr(this,(()=>{Xr(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Hr(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return Wr(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3775
+ */const En=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){oo(this.$.scrollers,"pan-y"),io(this.$.scrollers,"track",this._track.bind(this)),io(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),io(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),io(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Dn(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Ns(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),io(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Ns(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),io(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Ns(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Ns(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),io(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=fs.debounce(this._debouncer,ds.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(Kr(t)):i}_onTodayTap(){const t=this._getTodayMidnight();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._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return Qr(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){Yr(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&Yr(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return m(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return m(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{vr(this,(()=>{on(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(Zr(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return Jr(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3778
3776
  /**
3779
3777
  * @license
3780
3778
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3785,7 +3783,7 @@ class An{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
3785
3783
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3786
3784
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3787
3785
  */
3788
- Mt("vaadin-date-picker-overlay-content",x`
3786
+ Mt("vaadin-date-picker-overlay-content",w`
3789
3787
  :host {
3790
3788
  display: flex;
3791
3789
  flex-direction: column;
@@ -3845,7 +3843,7 @@ Mt("vaadin-date-picker-overlay-content",x`
3845
3843
  z-index: 2;
3846
3844
  flex-shrink: 0;
3847
3845
  }
3848
- `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class zn extends(Sn(Oo(Vt(xs(es))))){static get template(){return Qi`
3846
+ `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Pn extends(En(Fo($t(ks(is))))){static get template(){return ts`
3849
3847
  <div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
3850
3848
  <div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
3851
3849
  <div part="clear-button" hidden$="[[!selectedDate]]"></div>
@@ -3865,23 +3863,23 @@ Mt("vaadin-date-picker-overlay-content",x`
3865
3863
  <slot name="today-button"></slot>
3866
3864
  <slot name="cancel-button"></slot>
3867
3865
  </div>
3868
- `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}v(zn);
3866
+ `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}v(Pn);
3869
3867
  /**
3870
3868
  * @license
3871
3869
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3872
3870
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3873
3871
  */
3874
- const In=new WeakMap,Dn=de((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return In.has(t)||In.set(t,new Set),In.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))}))}})),Tn=t=>class extends(Ao(co(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),fr||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3872
+ const On=new WeakMap,Nn=ue((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return On.has(t)||On.set(t,new Set),On.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))}))}})),Mn=t=>class extends(To(po(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),xr||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3875
3873
  /**
3876
3874
  * @license
3877
3875
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3878
3876
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3879
- */,Pn=de((t=>class extends(Co(Ro(Ao(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!!t||0===t}})),En=t=>class extends(Dn(ko(Pn(qo(Tn(co(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=vs.debounce(this._preventInputDebouncer,cs.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3877
+ */,Bn=ue((t=>class extends(zo(Ho(To(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!!t||0===t}})),Fn=t=>class extends(Nn(So(Bn(Go(Mn(po(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=fs.debounce(this._preventInputDebouncer,ds.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3880
3878
  /**
3881
3879
  * @license
3882
3880
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3883
3881
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3884
- */,On=[x`
3882
+ */,jn=w`
3885
3883
  :host {
3886
3884
  display: inline-flex;
3887
3885
  outline: none;
@@ -3920,7 +3918,7 @@ const In=new WeakMap,Dn=de((t=>class extends t{get slotStyles(){return{}}connect
3920
3918
  * @license
3921
3919
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3922
3920
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3923
- */,x`
3921
+ */,Vn=w`
3924
3922
  [class$='container'] {
3925
3923
  display: flex;
3926
3924
  flex-direction: column;
@@ -3933,7 +3931,7 @@ const In=new WeakMap,Dn=de((t=>class extends t{get slotStyles(){return{}}connect
3933
3931
  * @license
3934
3932
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3935
3933
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3936
- */,x`
3934
+ */,$n=[jn,Vn,w`
3937
3935
  [part='clear-button'] {
3938
3936
  display: none;
3939
3937
  cursor: default;
@@ -3951,17 +3949,17 @@ const In=new WeakMap,Dn=de((t=>class extends t{get slotStyles(){return{}}connect
3951
3949
  * @license
3952
3950
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3953
3951
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3954
- */],Mn=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e||void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3952
+ */],Ln=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e||void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3955
3953
  /**
3956
3954
  * @license
3957
3955
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3958
3956
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3959
- */;class Nn{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")}}
3957
+ */;class Rn{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")}}
3960
3958
  /**
3961
3959
  * @license
3962
3960
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3963
3961
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3964
- */const Bn=t=>class extends(Mn(Oo(ko(Pn(co(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Gr(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:mr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!vo()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new An(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Nn(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Gr(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Ur(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Wr(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Gr(t);!t||i?(t?$r(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,h){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=h)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=kr(this._noInput?t:[s,t])}_getInitialPosition(){const t=Gr(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Wr(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Hr(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_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){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,$r(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Gr(t)}}
3962
+ */const qn=t=>class extends(Ln(Fo(So(Bn(po(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?Xr(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:yr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!bo()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Dn(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Rn(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=Xr(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(Kr(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||Jr(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=Xr(t);!t||i?(t?Yr(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=zr(this._noInput?t:[s,t])}_getInitialPosition(){const t=Xr(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||Jr(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?Zr(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_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){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,Yr(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return Xr(t)}}
3965
3963
  /**
3966
3964
  * @license
3967
3965
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3972,7 +3970,7 @@ const In=new WeakMap,Dn=de((t=>class extends t{get slotStyles(){return{}}connect
3972
3970
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3973
3971
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3974
3972
  */
3975
- Mt("vaadin-date-picker",[On,x`
3973
+ Mt("vaadin-date-picker",[$n,w`
3976
3974
  :host([opened]) {
3977
3975
  pointer-events: auto;
3978
3976
  }
@@ -3985,7 +3983,7 @@ Mt("vaadin-date-picker",[On,x`
3985
3983
  direction: rtl;
3986
3984
  text-align: left;
3987
3985
  }
3988
- `],{moduleId:"vaadin-date-picker-styles"});class Fn extends(Bn(En(Vt(As(es))))){static get is(){return"vaadin-date-picker"}static get template(){return Qi`
3986
+ `],{moduleId:"vaadin-date-picker-styles"});class Un extends(qn(Fn($t(Is(is))))){static get is(){return"vaadin-date-picker"}static get template(){return ts`
3989
3987
  <div class="vaadin-date-picker-container">
3990
3988
  <div part="label">
3991
3989
  <slot name="label"></slot>
@@ -4027,29 +4025,29 @@ Mt("vaadin-date-picker",[On,x`
4027
4025
  ></vaadin-date-picker-overlay>
4028
4026
 
4029
4027
  <slot name="tooltip"></slot>
4030
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new $o(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Uo(this.inputElement,this._labelController)),this._tooltipController=new Os(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}v(Fn),
4028
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Yo(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new Ko(this.inputElement,this._labelController)),this._tooltipController=new Ms(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}v(Un),
4031
4029
  /**
4032
4030
  * @license
4033
4031
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4034
4032
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4035
4033
  */
4036
- Mt("vaadin-text-field",ir,{moduleId:"lumo-text-field-styles"});
4034
+ Mt("vaadin-text-field",ar,{moduleId:"lumo-text-field-styles"});
4037
4035
  /**
4038
4036
  * @license
4039
4037
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4040
4038
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4041
4039
  */
4042
- const jn=t=>class extends(En(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
4040
+ const Wn=t=>class extends(Fn(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}
4043
4041
  /**
4044
4042
  * @license
4045
4043
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4046
4044
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4047
- */,Vn=t=>class extends(jn(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new $o(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Uo(this.inputElement,this._labelController))}}
4045
+ */,Hn=t=>class extends(Wn(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Yo(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ko(this.inputElement,this._labelController))}}
4048
4046
  /**
4049
4047
  * @license
4050
4048
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4051
4049
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4052
- */;Mt("vaadin-text-field",On,{moduleId:"vaadin-text-field-styles"});class Ln extends(Vn(Vt(As(es)))){static get is(){return"vaadin-text-field"}static get template(){return Qi`
4050
+ */;Mt("vaadin-text-field",$n,{moduleId:"vaadin-text-field-styles"});class Gn extends(Hn($t(Is(is)))){static get is(){return"vaadin-text-field"}static get template(){return ts`
4053
4051
  <div class="vaadin-field-container">
4054
4052
  <div part="label">
4055
4053
  <slot name="label"></slot>
@@ -4078,7 +4076,7 @@ const jn=t=>class extends(En(t)){static get properties(){return{autocomplete:{ty
4078
4076
  </div>
4079
4077
  </div>
4080
4078
  <slot name="tooltip"></slot>
4081
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Os(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}v(Ln),Mt("vaadin-password-field-button",[tr,x`
4079
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Ms(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}v(Gn),Mt("vaadin-password-field-button",[rr,w`
4082
4080
  :host {
4083
4081
  position: absolute;
4084
4082
  right: 0;
@@ -4091,7 +4089,7 @@ const jn=t=>class extends(En(t)){static get properties(){return{autocomplete:{ty
4091
4089
  background: transparent;
4092
4090
  outline: none;
4093
4091
  }
4094
- `],{moduleId:"lumo-password-field-button"}),Mt("vaadin-password-field",[ir,x`
4092
+ `],{moduleId:"lumo-password-field-button"}),Mt("vaadin-password-field",[ar,w`
4095
4093
  [part='reveal-button']::before {
4096
4094
  content: var(--lumo-icons-eye);
4097
4095
  }
@@ -4115,22 +4113,22 @@ const jn=t=>class extends(En(t)){static get properties(){return{autocomplete:{ty
4115
4113
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4116
4114
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4117
4115
  */
4118
- Mt("vaadin-password-field-button",Vr,{moduleId:"vaadin-password-field-button-styles"});class Rn extends(Lr(xs(Vt(es)))){static get is(){return"vaadin-password-field-button"}static get template(){return Qi``}}v(Rn);
4116
+ Mt("vaadin-password-field-button",Ur,{moduleId:"vaadin-password-field-button-styles"});class Yn extends(Wr(ks($t(is)))){static get is(){return"vaadin-password-field-button"}static get template(){return ts``}}v(Yn);
4119
4117
  /**
4120
4118
  * @license
4121
4119
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4122
4120
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4123
4121
  */
4124
- const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Es(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_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)}}
4122
+ const Kn=t=>class extends(Nn(uo(Ao(To(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Ns(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_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)}}
4125
4123
  /**
4126
4124
  * @license
4127
4125
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4128
4126
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4129
- */,$n=Qi`
4127
+ */,Jn=ts`
4130
4128
  <div part="reveal-button" slot="suffix">
4131
4129
  <slot name="reveal"></slot>
4132
4130
  </div>
4133
- `;let Un;class Wn extends(qn(Ln)){static get is(){return"vaadin-password-field"}static get template(){if(!Un){Un=super.template.cloneNode(!0);const t=$n.content.querySelector('[part="reveal-button"]');Un.content.querySelector('[part="input-field"]').appendChild(t)}return Un}}v(Wn);const Hn=x`
4131
+ `;let Zn;class Qn extends(Kn(Gn)){static get is(){return"vaadin-password-field"}static get template(){if(!Zn){Zn=super.template.cloneNode(!0);const t=Jn.content.querySelector('[part="reveal-button"]');Zn.content.querySelector('[part="input-field"]').appendChild(t)}return Zn}}v(Qn);const Xn=w`
4134
4132
  :host {
4135
4133
  display: flex;
4136
4134
  align-items: center;
@@ -4214,7 +4212,7 @@ const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{reve
4214
4212
  width: var(--lumo-icon-size-m);
4215
4213
  height: var(--lumo-icon-size-m);
4216
4214
  }
4217
- `;Mt("vaadin-item",Hn,{moduleId:"lumo-item"}),Mt("vaadin-combo-box-item",[Hn,x`
4215
+ `;Mt("vaadin-item",Xn,{moduleId:"lumo-item"});const ta=w`
4218
4216
  :host {
4219
4217
  transition: background-color 100ms;
4220
4218
  overflow: hidden;
@@ -4226,28 +4224,13 @@ const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{reve
4226
4224
  :host([focused]:not([disabled])) {
4227
4225
  box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
4228
4226
  }
4229
- `],{moduleId:"lumo-combo-box-item"}),Mt("vaadin-combo-box-overlay",[Zo,Xo,x`
4230
- [part='content'] {
4231
- padding: 0;
4232
- }
4233
-
4234
- /* When items are empty, the spinner needs some room */
4235
- :host(:not([closing])) [part~='content'] {
4236
- min-height: calc(2 * var(--lumo-space-s) + var(--lumo-icon-size-s));
4237
- }
4238
-
4239
- [part~='overlay'] {
4240
- position: relative;
4241
- }
4242
-
4243
- :host([top-aligned]) [part~='overlay'] {
4244
- margin-top: var(--lumo-space-xs);
4245
- }
4246
-
4247
- :host([bottom-aligned]) [part~='overlay'] {
4248
- margin-bottom: var(--lumo-space-xs);
4249
- }
4250
- `,x`
4227
+ `;Mt("vaadin-combo-box-item",[Xn,ta],{moduleId:"lumo-combo-box-item"});
4228
+ /**
4229
+ * @license
4230
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
4231
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4232
+ */
4233
+ const ea=w`
4251
4234
  [part~='loader'] {
4252
4235
  box-sizing: border-box;
4253
4236
  width: var(--lumo-icon-size-s);
@@ -4289,7 +4272,28 @@ const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{reve
4289
4272
  transform: rotate(360deg);
4290
4273
  }
4291
4274
  }
4292
- `,x`
4275
+ `,ia=w`
4276
+ [part='content'] {
4277
+ padding: 0;
4278
+ }
4279
+
4280
+ /* When items are empty, the spinner needs some room */
4281
+ :host(:not([closing])) [part~='content'] {
4282
+ min-height: calc(2 * var(--lumo-space-s) + var(--lumo-icon-size-s));
4283
+ }
4284
+
4285
+ [part~='overlay'] {
4286
+ position: relative;
4287
+ }
4288
+
4289
+ :host([top-aligned]) [part~='overlay'] {
4290
+ margin-top: var(--lumo-space-xs);
4291
+ }
4292
+
4293
+ :host([bottom-aligned]) [part~='overlay'] {
4294
+ margin-bottom: var(--lumo-space-xs);
4295
+ }
4296
+ `,sa=w`
4293
4297
  [part~='loader'] {
4294
4298
  position: absolute;
4295
4299
  z-index: 1;
@@ -4297,12 +4301,12 @@ const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{reve
4297
4301
  top: var(--lumo-space-s);
4298
4302
  margin-inline: auto 0;
4299
4303
  }
4300
- `,x`
4304
+ `;Mt("vaadin-combo-box-overlay",[ir,sr,ia,ea,sa,w`
4301
4305
  :host {
4302
4306
  --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
4303
4307
  --_vaadin-combo-box-items-container-border-style: solid;
4304
4308
  }
4305
- `],{moduleId:"lumo-combo-box-overlay"}),Mt("vaadin-combo-box",[ir,x`
4309
+ `],{moduleId:"lumo-combo-box-overlay"}),Mt("vaadin-combo-box",[ar,w`
4306
4310
  [part='toggle-button']::before {
4307
4311
  content: var(--lumo-icons-dropdown);
4308
4312
  }
@@ -4312,12 +4316,12 @@ const qn=t=>class extends(Dn(lo(wo(Ao(t))))){static get properties(){return{reve
4312
4316
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4313
4317
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4314
4318
  */
4315
- const Yn=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0===i||void 0===e||(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
4319
+ const oa=t=>class extends t{static get properties(){return{index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return[...super.observedAttributes,"hidden"]}attributeChangedCallback(t,e,i){"hidden"===t&&null!==i?this.index=void 0:super.attributeChangedCallback(t,e,i)}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const t=this._owner.getAttribute("dir");t&&this.setAttribute("dir",t)}requestContentUpdate(){this.renderer&&!this.hidden&&this.renderer(this,this._owner,{index:this.index,item:this.item,focused:this.focused,selected:this.selected})}__rendererOrItemChanged(t,e,i){void 0===i||void 0===e||(this._oldRenderer!==t&&(this.innerHTML="",delete this._$litPart$),t&&(this._oldRenderer=t,this.requestContentUpdate()))}__updateLabel(t,e){e||(this.textContent=t)}}
4316
4320
  /**
4317
4321
  * @license
4318
4322
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4319
4323
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4320
- */;class Gn extends(Yn(Vt(xs(es)))){static get template(){return Qi`
4324
+ */;class ra extends(oa($t(ks(is)))){static get template(){return ts`
4321
4325
  <style>
4322
4326
  :host {
4323
4327
  display: block;
@@ -4331,18 +4335,18 @@ const Yn=t=>class extends t{static get properties(){return{index:{type:Number},i
4331
4335
  <div part="content">
4332
4336
  <slot></slot>
4333
4337
  </div>
4334
- `}static get is(){return"vaadin-combo-box-item"}}v(Gn);
4338
+ `}static get is(){return"vaadin-combo-box-item"}}v(ra);
4335
4339
  /**
4336
4340
  * @license
4337
4341
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4338
4342
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4339
4343
  */
4340
- const Jn=t=>class extends(Br(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!go(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
4344
+ const na=t=>class extends(Lr(t)){static get observers(){return["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200}connectedCallback(){super.connectedCallback();const t=this._comboBox,e=t&&t.getAttribute("dir");e&&this.setAttribute("dir",e)}_shouldCloseOnOutsideClick(t){const e=t.composedPath();return!e.includes(this.positionTarget)&&!e.includes(this)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!wo(t.composedPath()[0])&&t.preventDefault()}_updateOverlayWidth(){const t=this.localName;this.style.setProperty(`--_${t}-default-width`,`${this.positionTarget.clientWidth}px`);const e=getComputedStyle(this._comboBox).getPropertyValue(`--${t}-width`);""===e?this.style.removeProperty(`--${t}-width`):this.style.setProperty(`--${t}-width`,e)}_setOverlayWidth(t,e){t&&e&&(this._updateOverlayWidth(),this._updatePosition())}}
4341
4345
  /**
4342
4346
  * @license
4343
4347
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4344
4348
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4345
- */;Mt("vaadin-combo-box-overlay",[rr,x`
4349
+ */;Mt("vaadin-combo-box-overlay",[cr,w`
4346
4350
  #overlay {
4347
4351
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
4348
4352
  }
@@ -4352,7 +4356,7 @@ const Jn=t=>class extends(Br(t)){static get observers(){return["_setOverlayWidth
4352
4356
  flex-direction: column;
4353
4357
  height: 100%;
4354
4358
  }
4355
- `],{moduleId:"vaadin-combo-box-overlay-styles"});class Kn extends(Jn(Er(xs(Vt(es))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return Qi`
4359
+ `],{moduleId:"vaadin-combo-box-overlay-styles"});class aa extends(na(Fr(ks($t(is))))){static get is(){return"vaadin-combo-box-overlay"}static get template(){return ts`
4356
4360
  <div id="backdrop" part="backdrop" hidden></div>
4357
4361
  <div part="overlay" id="overlay">
4358
4362
  <div part="loader"></div>
@@ -4364,7 +4368,7 @@ const Jn=t=>class extends(Br(t)){static get observers(){return["_setOverlayWidth
4364
4368
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
4365
4369
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4366
4370
  */
4367
- function Zn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4371
+ function la(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4368
4372
  /**
4369
4373
  * @license
4370
4374
  * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
@@ -4373,17 +4377,17 @@ function Zn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4373
4377
  * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
4374
4378
  * Code distributed by Google as part of the polymer project is also
4375
4379
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
4376
- */v(Kn);const Xn=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Qn=Xn&&Xn[1]>=8,ta={_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!(!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),ps)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,h=this._physicalCount;let l=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-l):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=h||i<=r);)if(t){if(a+o.length+1>=this._virtualCount||l+s>=c-this._scrollOffset)break;o.push(e),l+=s,e=(e+1)%h}else{if(n-o.length<=0||l+this._physicalSize-s<=d)break;o.push(e),l-=s,e=0===e?h-1:e-1}return{indexes:o,physicalTop:l-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),us):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),ps))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,ds))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!Qn&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(gs(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),ds)},_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]=vs.debounce(this._debouncers[t],i,e.bind(this)),fs(this._debouncers[t])}},ea=1e3;
4380
+ */v(aa);const ha=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),ca=ha&&ha[1]>=8,da={_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!(!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),ms)}},_getReusables(t){let e,i,s;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let h=this._physicalTop+this._scrollOffset;const c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-h):(e=this._physicalEnd,i=this._physicalBottom+this._scrollOffset-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(o.length>=l||i<=r);)if(t){if(a+o.length+1>=this._virtualCount||h+s>=c-this._scrollOffset)break;o.push(e),h+=s,e=(e+1)%l}else{if(n-o.length<=0||h+this._physicalSize-s<=d)break;o.push(e),h-=s,e=0===e?l-1:e-1}return{indexes:o,physicalTop:h-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),ps):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),ms))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,us))},_iterateItems(t,e){let i,s,o,r;if(2===arguments.length&&e){for(r=0;r<e.length;r++)if(i=e[r],s=this._computeVidx(i),null!=(o=t.call(this,i,s)))return o}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(o=t.call(this,i,s)))return o;for(i=0;i<this._physicalStart;i++,s++)if(null!=(o=t.call(this,i,s)))return o}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!ca&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1||(ys(),0===this._physicalCount))return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const o=this._hiddenContentSize;for(;i<t&&s<=o;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),us)},_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]=fs.debounce(this._debouncers[t],i,e.bind(this)),bs(this._debouncers[t])}},ua=1e3;
4377
4381
  /**
4378
4382
  * @license
4379
4383
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4380
4384
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4381
- */class ia{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),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}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),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._maxVirtualIndexOffset):i<e?t<ea?(i=t,this._vidxOffset=0):(i=ea,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(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),gs(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){gs();let e=0,i=0;const s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=vs.debounce(this.__placeholderClearDebouncer,ds,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__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"}),gs(),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.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),gs(),this._debounce("_update",this._update,ps)}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="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_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=vs.debounce(this.__fixInvalidItemPositioningDebouncer,cs.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=vs.debounce(this.__scrollReorderDebouncer,cs.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=vs.debounce(this.__debouncerWheelAnimationFrame,ds,(()=>{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=vs.debounce(this._debouncerIgnoreNewWheel,cs.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):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=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(vr){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=ea,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(ia.prototype,ta);class sa{constructor(t){this.__adapter=new ia(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
4385
+ */class pa{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:o,reorderElements:r}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=o||s,this.reorderElements=r,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),new ResizeObserver((([{contentRect:t}])=>{const e=0===t.width&&0===t.height;!e&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=e})).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.scrollTarget.addEventListener("virtualizer-element-focused",(t=>this.__onElementFocused(t))),this.elementsContainer.addEventListener("focusin",(()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}))})),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}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),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._maxVirtualIndexOffset):i<e?t<ua?(i=t,this._vidxOffset=0):(i=ua,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(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),ys(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){ys();let e=0,i=0;const s=this._physicalAverageCount,o=this._physicalAverage;this._iterateItems((t=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((o*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.style.opacity="0",t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=fs.debounce(this.__placeholderClearDebouncer,us,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0!==this.__pendingScrollToIndex&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex)}__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"}),ys(),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.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),ys(),this._debounce("_update",this._update,ms)}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="rtl"===t.direction,this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return 0===e.indexOf(t)&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const s=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,s)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,s)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush())}_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=fs.debounce(this.__fixInvalidItemPositioningDebouncer,ds.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=fs.debounce(this.__scrollReorderDebouncer,ds.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=fs.debounce(this.__debouncerWheelAnimationFrame,us,(()=>{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=fs.debounce(this._debouncerIgnoreNewWheel,ds.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(0===this._physicalCount)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):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=this.__getFocusedElement(e)||e[0];if(!i)return;const s=i.__virtualIndex-t,o=e.indexOf(i)-s;if(o>0)for(let t=0;t<o;t++)this.elementsContainer.appendChild(e[t]);else if(o<0)for(let t=e.length+o;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(_r){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4)this._vidxOffset=Math.round(this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight)*e);else{const t=this._vidxOffset,i=ua,s=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<i&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-i&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,s),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(pa.prototype,da);class ma{constructor(t){this.__adapter=new pa(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}
4382
4386
  /**
4383
4387
  * @license
4384
4388
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4385
4389
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4386
- */const oa=class{toString(){return""}},ra=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Ps()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof oa)&&(i&&void 0!==t&&void 0!==e?Zn(i,t)===Zn(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new sa({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof oa&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4390
+ */const va=class{toString(){return""}},fa=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Os()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),n=o.bottom-r.bottom+this._viewportTotalPaddingBottom;n>0&&(this.scrollTop+=n)}_isItemSelected(t,e,i){return!(t instanceof va)&&(i&&void 0!==t&&void 0!==e?la(i,t)===la(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new ma({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof va&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4387
4391
  /**
4388
4392
  * @license
4389
4393
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
@@ -4393,7 +4397,7 @@ function Zn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4393
4397
  * @license
4394
4398
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4395
4399
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4396
- */class na extends(ra(es)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return Qi`
4400
+ */class ba extends(fa(is)){static get is(){return"vaadin-combo-box-scroller"}static get template(){return ts`
4397
4401
  <style>
4398
4402
  :host {
4399
4403
  display: block;
@@ -4420,49 +4424,48 @@ function Zn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4420
4424
  <div id="selector">
4421
4425
  <slot></slot>
4422
4426
  </div>
4423
- `}}v(na);
4427
+ `}}v(ba);
4424
4428
  /**
4425
4429
  * @license
4426
4430
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4427
4431
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4428
4432
  */
4429
- const aa=t=>class extends(Pn(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4433
+ const ga=t=>class extends(Bn(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4430
4434
  /**
4431
4435
  * @license
4432
4436
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4433
4437
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4434
- */;function ha(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return ha(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function la({getItemId:t},e,i,s=0,o=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:o+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=la({getItemId:t},r,i,s+1,o+e.getFlatIndex(r.parentCacheIndex)+1);if(n)return n}}function ca(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const o=t.getFlatIndex(e),r=t.getSubCache(e);return r&&r.flatSize>0&&i.length?ca(r,i,s+o+1):s+o}
4438
+ */;function ya(t,e,i=0){let s=e;for(const e of t.subCaches){const t=e.parentCacheIndex;if(s<=t)break;if(s<=t+e.flatSize)return ya(e,s-t-1,i+1);s-=e.flatSize}return{cache:t,item:t.items[s],index:s,page:Math.floor(s/t.pageSize),level:i}}function _a({getItemId:t},e,i,s=0,o=0){for(let r=0;r<e.items.length;r++){const n=e.items[r];if(n&&t(n)===t(i))return{cache:e,level:s,item:n,index:r,page:Math.floor(r/e.pageSize),subCache:e.getSubCache(r),flatIndex:o+e.getFlatIndex(r)}}for(const r of e.subCaches){const n=_a({getItemId:t},r,i,s+1,o+e.getFlatIndex(r.parentCacheIndex)+1);if(n)return n}}function xa(t,[e,...i],s=0){e===1/0&&(e=t.size-1);const o=t.getFlatIndex(e),r=t.getSubCache(e);return r&&r.flatSize>0&&i.length?xa(r,i,s+o+1):s+o}
4435
4439
  /**
4436
4440
  * @license
4437
4441
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4438
4442
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4439
- */class da{constructor(t,e,i,s,o){p(this,"context"),p(this,"pageSize"),p(this,"items",[]),p(this,"pendingRequests",{}),p(this,"__subCacheByIndex",{}),p(this,"__size",0),p(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=o,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new da(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=ha(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=ha(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex
4443
+ */class wa{constructor(t,e,i,s,o){p(this,"context"),p(this,"pageSize"),p(this,"items",[]),p(this,"pendingRequests",{}),p(this,"__subCacheByIndex",{}),p(this,"__size",0),p(this,"__flatSize",0),this.context=t,this.pageSize=e,this.size=i,this.parentCache=s,this.parentCacheIndex=o,this.__flatSize=i||0}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0||this.subCaches.some((t=>t.isLoading))}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var e;if(this.__size!==t){if(this.__size=t,void 0!==this.context.placeholder){this.items.length=t||0;for(let i=0;i<t;i++)(e=this.items)[i]||(e[i]=this.context.placeholder)}Object.keys(this.pendingRequests).forEach((t=>{parseInt(t)*this.pageSize>=this.size&&delete this.pendingRequests[t]}))}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce(((t,e)=>(e.recalculateFlatSize(),t+e.flatSize)),0):0}setPage(t,e){const i=t*this.pageSize;e.forEach(((t,e)=>{const s=i+e;(void 0===this.size||s<this.size)&&(this.items[s]=t)}))}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t]}removeSubCaches(){this.__subCacheByIndex={}}createSubCache(t){const e=new wa(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce(((t,i)=>e>i.parentCacheIndex?t+i.flatSize:t),e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=ya(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=ya(this,t);return{cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize()}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0)}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex
4440
4444
  /**
4441
4445
  * @license
4442
4446
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4443
4447
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4444
- */}}class ua extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:o,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:h}){super(),p(this,"host"),p(this,"dataProvider"),p(this,"dataProviderParams"),p(this,"pageSize"),p(this,"isExpanded"),p(this,"getItemId"),p(this,"rootCache"),p(this,"placeholder"),p(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=o,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=h,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return ha(this.rootCache,t)}getItemContext(t){return la({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return ca(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new da(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i=d(d({},i),this.dataProviderParams()));const s=(o,r)=>{t.pendingRequests[e]===s&&(void 0!==r?t.size=r:i.parentItem&&(t.size=o.length),t.setPage(e,o),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
4448
+ */}}class ka extends EventTarget{constructor(t,{size:e,pageSize:i,isExpanded:s,getItemId:o,isPlaceholder:r,placeholder:n,dataProvider:a,dataProviderParams:l}){super(),p(this,"host"),p(this,"dataProvider"),p(this,"dataProviderParams"),p(this,"pageSize"),p(this,"isExpanded"),p(this,"getItemId"),p(this,"rootCache"),p(this,"placeholder"),p(this,"isPlaceholder"),this.host=t,this.pageSize=i,this.getItemId=o,this.isExpanded=s,this.placeholder=n,this.isPlaceholder=r,this.dataProvider=a,this.dataProviderParams=l,this.rootCache=this.__createRootCache(e)}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return{isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(t){this.pageSize=t,this.clearCache()}setDataProvider(t){this.dataProvider=t,this.clearCache()}recalculateFlatSize(){this.rootCache.recalculateFlatSize()}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size)}getFlatIndexContext(t){return ya(this.rootCache,t)}getItemContext(t){return _a({getItemId:this.getItemId},this.rootCache,t)}getFlatIndexByPath(t){return xa(this.rootCache,t)}ensureFlatIndexLoaded(t){const{cache:e,page:i,item:s}=this.getFlatIndexContext(t);this.__isItemLoaded(s)||this.__loadCachePage(e,i)}ensureFlatIndexHierarchy(t){const{cache:e,item:i,index:s}=this.getFlatIndexContext(t);if(this.__isItemLoaded(i)&&this.isExpanded(i)&&!e.getSubCache(s)){const t=e.createSubCache(s);this.__loadCachePage(t,0)}}loadFirstPage(){this.__loadCachePage(this.rootCache,0)}__createRootCache(t){return new wa(this.__cacheContext,this.pageSize,t)}__loadCachePage(t,e){if(!this.dataProvider||t.pendingRequests[e])return;let i={page:e,pageSize:this.pageSize,parentItem:t.parentItem};this.dataProviderParams&&(i=d(d({},i),this.dataProviderParams()));const s=(o,r)=>{t.pendingRequests[e]===s&&(void 0!==r?t.size=r:i.parentItem&&(t.size=o.length),t.setPage(e,o),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete t.pendingRequests[e],this.dispatchEvent(new CustomEvent("page-loaded")))};t.pendingRequests[e]=s,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(i,s)}__isItemLoaded(t){return this.isPlaceholder?!this.isPlaceholder(t):this.placeholder?t!==this.placeholder:!!t}}
4445
4449
  /**
4446
4450
  * @license
4447
4451
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4448
4452
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4449
- */const pa=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new ua(this,{placeholder:new oa,isPlaceholder:t=>t instanceof oa,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){!this._shouldFetchData()||!t||(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),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")}_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`")}}}
4453
+ */const Ca=t=>class extends t{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new ka(this,{placeholder:new va,isPlaceholder:t=>t instanceof va,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this))}ready(){super.ready(),this._scroller.addEventListener("index-requested",(t=>{if(!this._shouldFetchData())return;const e=t.detail.index;void 0!==e&&this.__dataProviderController.ensureFlatIndexLoaded(e)})),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState()}_dataProviderFilterChanged(t){void 0!==this.__previousDataProviderFilter||""!==t?this.__previousDataProviderFilter!==t&&(this.__previousDataProviderFilter=t,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1):this.__previousDataProviderFilter=t}_shouldFetchData(){return!!this.dataProvider&&(this.opened||this.filter&&this.filter.length)}_ensureFirstPage(t){!this._shouldFetchData()||!t||(this._forceNextRequest||void 0===this.size?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0))}__onDataProviderPageRequested(){this.loading=!0}__onDataProviderPageLoaded(){const{rootCache:t}=this.__dataProviderController;t.items=[...t.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue()}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0)}_sizeChanged(t){const{rootCache:e}=this.__dataProviderController;e.size!==t&&(e.size=t,e.items=[...e.items],this.__synchronizeControllerState())}_filteredItemsChanged(t){if(super._filteredItemsChanged(t),this.dataProvider&&t){const{rootCache:e}=this.__dataProviderController;e.items!==t&&(e.items=t,this.__synchronizeControllerState())}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:t}=this.__dataProviderController;this.size=t.size,this.filteredItems=t.items,this.loading=this.__dataProviderController.isLoading()}}_pageSizeChanged(t,e){if(Math.floor(t)!==t||t<1)throw this.pageSize=e,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(t),this.clearCache()}_dataProviderChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.dataProvider=e})),this.__dataProviderController.setDataProvider(t),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")}_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`")}}}
4450
4454
  /**
4451
4455
  * @license
4452
4456
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4453
4457
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4454
- */;
4458
+ */;function Aa(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}
4455
4459
  /**
4456
4460
  * @license
4457
4461
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4458
4462
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4459
- */
4460
- function ma(t){return null!=t}function va(t,e){return t.findIndex((t=>!(t instanceof oa)&&e(t)))}const fa=t=>class extends(Mn(Oo(Ro(wo(co(Ao(lo(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),function(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}(this),this.addController(new Nn(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)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,h,l){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:h,itemClassNameGenerator:l}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&yo(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._isInputFocused()&&!fr&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?Zn(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?Zn(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{fr&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_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||(ma(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&ma(e)?va(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?va(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof oa)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(vo())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4463
+ */function Ia(t){return null!=t}function Sa(t,e){return t.findIndex((t=>!(t instanceof va)&&e(t)))}const za=t=>class extends(Ln(Fo(Ho(Ao(po(To(uo(t)))))))){static get properties(){return{opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this)}get _tagNamePrefix(){return"vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(t){super._inputElementChanged(t);const e=this._nativeInput;e&&(e.autocomplete="off",e.autocapitalize="off",e.setAttribute("role","combobox"),e.setAttribute("aria-autocomplete","list"),e.setAttribute("aria-expanded",!!this.opened),e.setAttribute("spellcheck","false"),e.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown))}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const t=()=>{requestAnimationFrame((()=>{this._overlayElement.bringToFront()}))};this.addEventListener("mousedown",t),this.addEventListener("touchstart",t),Aa(this),this.addController(new Rn(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)}updated(t){super.updated(t),t.has("filter")&&this._filterChanged(this.filter)}_initOverlay(){const t=this.$.overlay;t._comboBox=this,t.addEventListener("touchend",this._boundOnOverlayTouchAction),t.addEventListener("touchmove",this._boundOnOverlayTouchAction),t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("opened-changed",(t=>{this._overlayOpened=t.detail.value})),this._overlayElement=t}_initScroller(t){const e=document.createElement(`${this._tagNamePrefix}-scroller`);e.owner=t||this,e.getItemLabel=this._getItemLabel.bind(this),e.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const i=this._overlayElement;i.renderer=t=>{t.innerHTML||t.appendChild(e)},i.requestContentUpdate(),this._scroller=e}_updateScroller(t,e,i,s,o,r,n,a,l,h){if(t&&(i&&(t.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),t.setProperties({items:i?e:[],opened:i,loading:s,selectedItem:o,itemIdPath:r,focusedIndex:n,renderer:a,theme:l,itemClassNameGenerator:h}),t.performUpdate&&!t.hasUpdated))try{t.performUpdate()}catch(t){}}_openedOrItemsChanged(t,e,i,s){this._overlayOpened=t&&(s||i||!(!e||!e.length))}_overlayOpenedChanged(t,e){t?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):e&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})))}_focusedIndexChanged(t,e){void 0!==e&&this._updateActiveDescendant(t)}_isInputFocused(){return this.inputElement&&ko(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._isInputFocused()&&!xr&&this.inputElement&&this.inputElement.focus():this._onClosed();const i=this._nativeInput;i&&(i.setAttribute("aria-expanded",!!t),t?i.setAttribute("aria-controls",this._scroller.id):i.removeAttribute("aria-controls"))}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1}_isClearButton(t){return t.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_onClearButtonClick(t){t.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate()}_onToggleButtonClick(t){t.preventDefault(),this.opened?this.close():this.open()}_onHostClick(t){this.autoOpenDisabled||(t.preventDefault(),this.open())}_onClick(t){this._isClearButton(t)?this._onClearButtonClick(t):t.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(t):this._onHostClick(t)}_onKeyDown(t){super._onKeyDown(t),"ArrowDown"===t.key?(this._onArrowDown(),t.preventDefault()):"ArrowUp"===t.key&&(this._onArrowUp(),t.preventDefault())}_getItemLabel(t){let e=t&&this.itemLabelPath?la(this.itemLabelPath,t):void 0;return null==e&&(e=t?t.toString():""),e}_getItemValue(t){let e=t&&this.itemValuePath?la(this.itemValuePath,t):void 0;return void 0===e&&(e=t?t.toString():""),e}_onArrowDown(){if(this.opened){const t=this._dropdownItems;t&&(this._focusedIndex=Math.min(t.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel())}else this.open()}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else{const t=this._dropdownItems;t&&(this._focusedIndex=t.length-1)}this._prefillFocusedItemLabel()}else this.open()}_prefillFocusedItemLabel(){this._focusedIndex>-1&&(this._inputElementValue=this._getItemLabel(this._dropdownItems[this._focusedIndex]),this._markAllSelectionRange())}_setSelectionRange(t,e){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(t,e)}_markAllSelectionRange(){void 0!==this._inputElementValue&&this._setSelectionRange(0,this._inputElementValue.length)}_clearSelectionRange(){if(void 0!==this._inputElementValue){const t=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(t,t)}}_closeOrCommit(){this.opened||this.loading?this.close():this._commitValue()}_onEnter(t){if(!this._hasValidInputValue())return t.preventDefault(),void t.stopPropagation();this.opened&&(t.preventDefault(),t.stopPropagation()),this._closeOrCommit()}_hasValidInputValue(){const t=this._focusedIndex<0&&""!==this._inputElementValue&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!t}_onEscape(t){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(t.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(t.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_toggleElementChanged(t){t&&(t.addEventListener("mousedown",(t=>t.preventDefault())),t.addEventListener("click",(()=>{xr&&!this._isInputFocused()&&document.activeElement.blur()})))}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange()}_clearFilter(){this.filter=""}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit()}_onOpened(){this._lastCommittedValue=this.value}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue()}_commitValue(){if(this._focusedIndex>-1){const t=this._dropdownItems[this._focusedIndex];this.selectedItem!==t&&(this.selectedItem=t),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1}else if(""===this._inputElementValue||void 0===this._inputElementValue)this.selectedItem=null,this.allowCustomValue&&(this.value="");else{const t=[this.selectedItem,...this._dropdownItems||[]],e=t[this.__getItemIndexByLabel(t,this._inputElementValue)];if(this.allowCustomValue&&!e){const t=this._inputElementValue;this._lastCustomValue=t;const e=new CustomEvent("custom-value-set",{detail:t,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(e),e.defaultPrevented||(this.value=t)}else this.allowCustomValue||this.opened||!e?this._revertInputValueToValue():this.value=this._getItemValue(e)}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter()}_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||(Ia(t)?(this._getItemValue(this.selectedItem)!==t&&this._selectItemForValue(t),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=t),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0)}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value)}_itemsChanged(t,e){this._ensureItemsOrDataProvider((()=>{this.items=e})),t?this.filteredItems=t.slice(0):e&&(this.filteredItems=null)}_filteredItemsChanged(t){this._setDropdownItems(t)}_filterItems(t,e){return t&&t.filter((t=>(e=e?e.toString().toLowerCase():"",this._getItemLabel(t).toString().toLowerCase().indexOf(e)>-1)))}_selectItemForValue(t){const e=this.__getItemIndexByValue(this.filteredItems,t),i=this.selectedItem;this.selectedItem=e>=0?this.filteredItems[e]:this.dataProvider&&void 0===this.selectedItem?void 0:null,null===this.selectedItem&&null===i&&this._selectedItemChanged(this.selectedItem)}_setDropdownItems(t){const e=this._dropdownItems;this._dropdownItems=t;const i=e?e[this._focusedIndex]:null,s=this.__getItemIndexByValue(t,this.value);null==this.selectedItem&&s>=0&&(this.selectedItem=t[s]);const o=this.__getItemIndexByValue(t,this._getItemValue(i));this._focusedIndex=o>-1?o:this.__getItemIndexByLabel(t,this.filter)}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(t){this._scroller&&this._scroller.scrollIntoView(t)}__getItemIndexByValue(t,e){return t&&Ia(e)?Sa(t,(t=>this._getItemValue(t)===e)):-1}__getItemIndexByLabel(t,e){return t&&e?Sa(t,(t=>this._getItemLabel(t).toString().toLowerCase()===e.toString().toLowerCase())):-1}_overlaySelectedItemChanged(t){t.stopPropagation(),!(t.detail.item instanceof va)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(t.detail.item),this.close())}_setFocused(t){if(super._setFocused(t),!t&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue)return void delete this._lastCustomValue;if(bo())return void this._closeOrCommit();this.opened?this._overlayOpened||this.close():this._commitValue()}}_shouldRemoveFocus(t){return!(t.relatedTarget&&t.relatedTarget.localName===`${this._tagNamePrefix}-item`||t.relatedTarget===this._overlayElement&&(t.composedPath()[0].focus(),1))}_onTouchend(t){!this.clearElement||t.composedPath()[0]!==this.clearElement||(t.preventDefault(),this._onClearAction())}}
4461
4464
  /**
4462
4465
  * @license
4463
4466
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4464
4467
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4465
- */;Mt("vaadin-combo-box",On,{moduleId:"vaadin-combo-box-styles"});class ba extends(pa(fa(aa(En(Vt(As(es))))))){static get is(){return"vaadin-combo-box"}static get template(){return Qi`
4468
+ */;Mt("vaadin-combo-box",$n,{moduleId:"vaadin-combo-box-styles"});class Ta extends(Ca(za(ga(Fn($t(Is(is))))))){static get is(){return"vaadin-combo-box"}static get template(){return ts`
4466
4469
  <style>
4467
4470
  :host([opened]) {
4468
4471
  pointer-events: auto;
@@ -4507,4 +4510,1105 @@ function ma(t){return null!=t}function va(t,e){return t.findIndex((t=>!(t instan
4507
4510
  ></vaadin-combo-box-overlay>
4508
4511
 
4509
4512
  <slot name="tooltip"></slot>
4510
- `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new $o(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Uo(this.inputElement,this._labelController)),this._tooltipController=new Os(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}v(ba);const ga=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){this.translationUrl&&s(this.translationUrl)}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return e("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return e("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return e("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return e("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return e("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return e("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return e("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return e("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return e("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return e("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return e("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return e("p",null,"The ",this.type," input type is not valid")}}render(){return e(i,{key:"e89747da2e458906e8f634c285044e95d5e92f73",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};ga.style=":host{display:block;height:100%}";export{ga as general_input}
4513
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Yo(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ko(this.inputElement,this._labelController)),this._tooltipController=new Ms(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t)}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t)}}v(Ta),Mt("vaadin-multi-select-combo-box-chip",[nr,w`
4514
+ :host {
4515
+ font-size: var(--lumo-font-size-xxs);
4516
+ line-height: 1;
4517
+ color: var(--lumo-body-text-color);
4518
+ border-radius: var(--lumo-border-radius-s);
4519
+ background-color: var(--lumo-contrast-20pct);
4520
+ cursor: var(--lumo-clickable-cursor);
4521
+ -webkit-font-smoothing: antialiased;
4522
+ -moz-osx-font-smoothing: grayscale;
4523
+ }
4524
+
4525
+ :host([disabled]) {
4526
+ background-color: var(--lumo-contrast-10pct);
4527
+ }
4528
+
4529
+ :host([focused]) [part='remove-button'] {
4530
+ color: inherit;
4531
+ }
4532
+
4533
+ :host([slot='overflow']) {
4534
+ position: relative;
4535
+ min-width: var(--lumo-size-xxs);
4536
+ margin-inline-start: var(--lumo-space-s);
4537
+ }
4538
+
4539
+ :host([slot='overflow'])::before,
4540
+ :host([slot='overflow'])::after {
4541
+ position: absolute;
4542
+ content: '';
4543
+ width: 100%;
4544
+ height: 100%;
4545
+ border-left: calc(var(--lumo-space-s) / 4) solid;
4546
+ border-radius: var(--lumo-border-radius-s);
4547
+ border-color: var(--lumo-contrast-30pct);
4548
+ }
4549
+
4550
+ :host([slot='overflow'])::before {
4551
+ left: calc(-1 * var(--lumo-space-s) / 2);
4552
+ }
4553
+
4554
+ :host([slot='overflow'])::after {
4555
+ left: calc(-1 * var(--lumo-space-s));
4556
+ }
4557
+
4558
+ :host([count='2']) {
4559
+ margin-inline-start: calc(var(--lumo-space-s) / 2);
4560
+ }
4561
+
4562
+ :host([count='2'])::after {
4563
+ display: none;
4564
+ }
4565
+
4566
+ :host([count='1']) {
4567
+ margin-inline-start: 0;
4568
+ }
4569
+
4570
+ :host([count='1'])::before,
4571
+ :host([count='1'])::after {
4572
+ display: none;
4573
+ }
4574
+
4575
+ [part='label'] {
4576
+ font-weight: 500;
4577
+ line-height: 1.25;
4578
+ }
4579
+
4580
+ [part='remove-button'] {
4581
+ display: flex;
4582
+ align-items: center;
4583
+ justify-content: center;
4584
+ margin-top: -0.3125em;
4585
+ margin-bottom: -0.3125em;
4586
+ margin-inline-start: auto;
4587
+ width: 1.25em;
4588
+ height: 1.25em;
4589
+ font-size: 1.5em;
4590
+ transition: none;
4591
+ }
4592
+
4593
+ [part='remove-button']::before {
4594
+ content: var(--lumo-icons-cross);
4595
+ }
4596
+
4597
+ :host([disabled]) [part='label'] {
4598
+ color: var(--lumo-disabled-text-color);
4599
+ -webkit-text-fill-color: var(--lumo-disabled-text-color);
4600
+ pointer-events: none;
4601
+ }
4602
+ `],{moduleId:"lumo-multi-select-combo-box-chip"}),Mt("vaadin-multi-select-combo-box-item",[Xn,ta,w`
4603
+ @media (any-hover: hover) {
4604
+ :host(:hover[readonly]) {
4605
+ background-color: transparent;
4606
+ cursor: default;
4607
+ }
4608
+ }
4609
+ `],{moduleId:"lumo-multi-select-combo-box-item"}),Mt("vaadin-multi-select-combo-box-overlay",[ir,sr,ia,ea,sa,w`
4610
+ :host {
4611
+ --_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
4612
+ --_vaadin-multi-select-combo-box-items-container-border-style: solid;
4613
+ }
4614
+ `],{moduleId:"lumo-multi-select-combo-box-overlay"}),Mt("vaadin-multi-select-combo-box-container",w`
4615
+ :host([auto-expand-vertically]) {
4616
+ padding-block: var(--lumo-space-xs);
4617
+ }
4618
+ `,{moduleId:"lumo-multi-select-combo-box-container"}),Mt("vaadin-multi-select-combo-box",[ar,w`
4619
+ :host([has-value]) {
4620
+ padding-inline-start: 0;
4621
+ }
4622
+
4623
+ :host([has-value]) ::slotted(input:placeholder-shown) {
4624
+ caret-color: var(--lumo-body-text-color) !important;
4625
+ }
4626
+
4627
+ [part='label'] {
4628
+ flex-shrink: 0;
4629
+ }
4630
+
4631
+ /* Override input-container styles */
4632
+ [part='input-field'] ::slotted([slot='chip']),
4633
+ [part='input-field'] ::slotted([slot='overflow']) {
4634
+ min-height: auto;
4635
+ padding: 0.3125em calc(0.5em + var(--lumo-border-radius-s) / 4);
4636
+ color: var(--lumo-body-text-color);
4637
+ -webkit-mask-image: none;
4638
+ mask-image: none;
4639
+ }
4640
+
4641
+ :host([auto-expand-vertically]) ::slotted([slot='chip']) {
4642
+ margin-block: calc(var(--lumo-space-xs) / 2);
4643
+ }
4644
+
4645
+ ::slotted([slot='chip']:not([readonly]):not([disabled])) {
4646
+ padding-inline-end: 0;
4647
+ }
4648
+
4649
+ :host([auto-expand-vertically]) ::slotted([slot='input']) {
4650
+ min-height: calc(var(--lumo-text-field-size, var(--lumo-size-m)) - 2 * var(--lumo-space-xs));
4651
+ }
4652
+
4653
+ ::slotted([slot='chip']:not(:last-of-type)),
4654
+ ::slotted([slot='overflow']:not(:last-of-type)) {
4655
+ margin-inline-end: var(--lumo-space-xs);
4656
+ }
4657
+
4658
+ ::slotted([slot='chip'][focused]) {
4659
+ background-color: var(--vaadin-selection-color, var(--lumo-primary-color));
4660
+ color: var(--lumo-primary-contrast-color);
4661
+ }
4662
+
4663
+ [part='toggle-button']::before {
4664
+ content: var(--lumo-icons-dropdown);
4665
+ }
4666
+
4667
+ :host([readonly][has-value]) [part='toggle-button'] {
4668
+ color: var(--lumo-contrast-60pct);
4669
+ cursor: var(--lumo-clickable-cursor);
4670
+ }
4671
+ `],{moduleId:"lumo-multi-select-combo-box"});
4672
+ /**
4673
+ * @license
4674
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4675
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4676
+ */
4677
+ class Da extends($t(is)){static get is(){return"vaadin-multi-select-combo-box-chip"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return ts`
4678
+ <style>
4679
+ :host {
4680
+ display: inline-flex;
4681
+ align-items: center;
4682
+ align-self: center;
4683
+ white-space: nowrap;
4684
+ box-sizing: border-box;
4685
+ }
4686
+
4687
+ [part='label'] {
4688
+ overflow: hidden;
4689
+ text-overflow: ellipsis;
4690
+ }
4691
+
4692
+ :host([hidden]),
4693
+ :host(:is([readonly], [disabled], [slot='overflow'])) [part='remove-button'] {
4694
+ display: none !important;
4695
+ }
4696
+
4697
+ @media (forced-colors: active) {
4698
+ :host {
4699
+ outline: 1px solid;
4700
+ outline-offset: -1px;
4701
+ }
4702
+ }
4703
+ </style>
4704
+ <div part="label">[[label]]</div>
4705
+ <div part="remove-button" on-click="_onRemoveClick"></div>
4706
+ `}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}))}}let Ea;v(Da),
4707
+ /**
4708
+ * @license
4709
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4710
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4711
+ */
4712
+ Mt("vaadin-multi-select-combo-box-container",w`
4713
+ #wrapper {
4714
+ display: flex;
4715
+ width: 100%;
4716
+ min-width: 0;
4717
+ }
4718
+
4719
+ :host([auto-expand-vertically]) #wrapper {
4720
+ flex-wrap: wrap;
4721
+ }
4722
+ `,{moduleId:"vaadin-multi-select-combo-box-container-styles"}),v(class extends hr{static get is(){return"vaadin-multi-select-combo-box-container"}static get template(){if(!Ea){Ea=super.template.cloneNode(!0);const t=Ea.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1])}return Ea}static get properties(){return{autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}});
4723
+ /**
4724
+ * @license
4725
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4726
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4727
+ */
4728
+ class Pa extends(oa($t(ks(is)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return ts`
4729
+ <style>
4730
+ :host {
4731
+ display: block;
4732
+ }
4733
+
4734
+ :host([hidden]) {
4735
+ display: none !important;
4736
+ }
4737
+ </style>
4738
+ <span part="checkmark" aria-hidden="true"></span>
4739
+ <div part="content">
4740
+ <slot></slot>
4741
+ </div>
4742
+ `}}v(Pa),Mt("vaadin-multi-select-combo-box-overlay",[cr,w`
4743
+ #overlay {
4744
+ width: var(
4745
+ --vaadin-multi-select-combo-box-overlay-width,
4746
+ var(--_vaadin-multi-select-combo-box-overlay-default-width, auto)
4747
+ );
4748
+ }
4749
+
4750
+ [part='content'] {
4751
+ display: flex;
4752
+ flex-direction: column;
4753
+ height: 100%;
4754
+ }
4755
+ `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Oa extends(na(Fr(ks($t(is))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return ts`
4756
+ <div id="backdrop" part="backdrop" hidden></div>
4757
+ <div part="overlay" id="overlay">
4758
+ <div part="loader"></div>
4759
+ <div part="content" id="content"><slot></slot></div>
4760
+ </div>
4761
+ `}}v(Oa);
4762
+ /**
4763
+ * @license
4764
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4765
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4766
+ */
4767
+ class Na extends(fa(is)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return ts`
4768
+ <style>
4769
+ :host {
4770
+ display: block;
4771
+ min-height: 1px;
4772
+ overflow: auto;
4773
+
4774
+ /* Fixes item background from getting on top of scrollbars on Safari */
4775
+ transform: translate3d(0, 0, 0);
4776
+
4777
+ /* Enable momentum scrolling on iOS */
4778
+ -webkit-overflow-scrolling: touch;
4779
+
4780
+ /* Fixes scrollbar disappearing when 'Show scroll bars: Always' enabled in Safari */
4781
+ box-shadow: 0 0 0 white;
4782
+ }
4783
+
4784
+ #selector {
4785
+ border-width: var(--_vaadin-multi-select-combo-box-items-container-border-width);
4786
+ border-style: var(--_vaadin-multi-select-combo-box-items-container-border-style);
4787
+ border-color: var(--_vaadin-multi-select-combo-box-items-container-border-color, transparent);
4788
+ position: relative;
4789
+ }
4790
+ </style>
4791
+ <div id="selector">
4792
+ <slot></slot>
4793
+ </div>
4794
+ `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(t,e,i){return!(t instanceof va||this.owner.readonly)&&this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly)}}v(Na);
4795
+ /**
4796
+ * @license
4797
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4798
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4799
+ */
4800
+ class Ma extends(Ca(za($t(is)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return ts`
4801
+ <style>
4802
+ :host([opened]) {
4803
+ pointer-events: auto;
4804
+ }
4805
+ </style>
4806
+
4807
+ <slot></slot>
4808
+
4809
+ <vaadin-multi-select-combo-box-overlay
4810
+ id="overlay"
4811
+ opened="[[_overlayOpened]]"
4812
+ loading$="[[loading]]"
4813
+ theme$="[[_theme]]"
4814
+ position-target="[[_target]]"
4815
+ no-vertical-overlap
4816
+ restore-focus-node="[[inputElement]]"
4817
+ ></vaadin-multi-select-combo-box-overlay>
4818
+ `}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&(!this.readonly||0!==this.selectedItems.length)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(t){if(this.readonly)super._setDropdownItems(this.selectedItems);else if(!this.filter&&this.selectedItemsOnTop)if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter((t=>-1===this._comboBox._findIndex(t,this.topGroup,this.itemIdPath)));super._setDropdownItems(this.topGroup.concat(e))}else super._setDropdownItems(t);else super._setDropdownItems(t)}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems)}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t)}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}}else super._onEnter(t)}_onEscape(t){if(this.readonly)return t.stopPropagation(),void(this.opened&&this.close());super._onEscape(t)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.clear(),void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof va||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))))}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation()}}v(Ma);
4819
+ /**
4820
+ * @license
4821
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4822
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4823
+ */
4824
+ const Ba=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resizables?t.target.resizables.forEach((e=>{e._onResize(t.contentRect)})):t.target._onResize(t.contentRect)}))}))})),Fa=ue((t=>class extends t{get _observeParent(){return!1}connectedCallback(){if(super.connectedCallback(),Ba.observe(this),this._observeParent){const t=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;t.resizables||(t.resizables=new Set,Ba.observe(t)),t.resizables.add(this),this.__parent=t}}disconnectedCallback(){super.disconnectedCallback(),Ba.unobserve(this);const t=this.__parent;if(this._observeParent&&t){const e=t.resizables;e&&(e.delete(this),0===e.size&&Ba.unobserve(t)),this.__parent=null}}_onResize(t){}}));
4825
+ /**
4826
+ * @license
4827
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
4828
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4829
+ */Mt("vaadin-multi-select-combo-box",[$n,w`
4830
+ :host {
4831
+ --input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
4832
+ --_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
4833
+ }
4834
+
4835
+ #chips {
4836
+ display: flex;
4837
+ align-items: center;
4838
+ }
4839
+
4840
+ ::slotted(input) {
4841
+ box-sizing: border-box;
4842
+ flex: 1 0 var(--input-min-width);
4843
+ }
4844
+
4845
+ ::slotted([slot='chip']),
4846
+ ::slotted([slot='overflow']) {
4847
+ flex: 0 1 auto;
4848
+ }
4849
+
4850
+ ::slotted([slot='chip']) {
4851
+ overflow: hidden;
4852
+ }
4853
+
4854
+ :host(:is([readonly], [disabled])) ::slotted(input) {
4855
+ flex-grow: 0;
4856
+ flex-basis: 0;
4857
+ padding: 0;
4858
+ }
4859
+
4860
+ :host([auto-expand-vertically]) #chips {
4861
+ display: contents;
4862
+ }
4863
+
4864
+ :host([auto-expand-horizontally]) [class$='container'] {
4865
+ width: auto;
4866
+ }
4867
+ `],{moduleId:"vaadin-multi-select-combo-box-styles"});class ja extends(Fa(Fn($t(Is(is))))){static get is(){return"vaadin-multi-select-combo-box"}static get template(){return ts`
4868
+ <div class="vaadin-multi-select-combo-box-container">
4869
+ <div part="label">
4870
+ <slot name="label"></slot>
4871
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
4872
+ </div>
4873
+
4874
+ <vaadin-multi-select-combo-box-internal
4875
+ id="comboBox"
4876
+ items="[[items]]"
4877
+ item-id-path="[[itemIdPath]]"
4878
+ item-label-path="[[itemLabelPath]]"
4879
+ item-value-path="[[itemValuePath]]"
4880
+ disabled="[[disabled]]"
4881
+ readonly="[[readonly]]"
4882
+ auto-open-disabled="[[autoOpenDisabled]]"
4883
+ allow-custom-value="[[allowCustomValue]]"
4884
+ overlay-class="[[overlayClass]]"
4885
+ data-provider="[[dataProvider]]"
4886
+ filter="{{filter}}"
4887
+ last-filter="{{_lastFilter}}"
4888
+ loading="{{loading}}"
4889
+ size="{{size}}"
4890
+ filtered-items="[[filteredItems]]"
4891
+ selected-items="[[selectedItems]]"
4892
+ selected-items-on-top="[[selectedItemsOnTop]]"
4893
+ item-class-name-generator="[[itemClassNameGenerator]]"
4894
+ top-group="[[_topGroup]]"
4895
+ opened="{{opened}}"
4896
+ renderer="[[renderer]]"
4897
+ keep-filter="[[keepFilter]]"
4898
+ theme$="[[_theme]]"
4899
+ on-combo-box-item-selected="_onComboBoxItemSelected"
4900
+ on-change="_onComboBoxChange"
4901
+ on-custom-value-set="_onCustomValueSet"
4902
+ on-filtered-items-changed="_onFilteredItemsChanged"
4903
+ >
4904
+ <vaadin-multi-select-combo-box-container
4905
+ part="input-field"
4906
+ auto-expand-vertically="[[autoExpandVertically]]"
4907
+ readonly="[[readonly]]"
4908
+ disabled="[[disabled]]"
4909
+ invalid="[[invalid]]"
4910
+ theme$="[[_theme]]"
4911
+ >
4912
+ <slot name="overflow" slot="prefix"></slot>
4913
+ <div id="chips" part="chips" slot="prefix">
4914
+ <slot name="chip"></slot>
4915
+ </div>
4916
+ <slot name="input"></slot>
4917
+ <div
4918
+ id="clearButton"
4919
+ part="clear-button"
4920
+ slot="suffix"
4921
+ on-touchend="_onClearButtonTouchend"
4922
+ aria-hidden="true"
4923
+ ></div>
4924
+ <div id="toggleButton" class="toggle-button" part="toggle-button" slot="suffix" aria-hidden="true"></div>
4925
+ </vaadin-multi-select-combo-box-container>
4926
+ </vaadin-multi-select-combo-box-internal>
4927
+
4928
+ <div part="helper-text">
4929
+ <slot name="helper"></slot>
4930
+ </div>
4931
+
4932
+ <div part="error-message">
4933
+ <slot name="error-message"></slot>
4934
+ </div>
4935
+ </div>
4936
+
4937
+ <slot name="tooltip"></slot>
4938
+ `}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new Yo(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new Ko(this.inputElement,this._labelController)),this._tooltipController=new Ms(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new Ns(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),Aa(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),$o(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",o=this.i18n.total.replace("{count}",i||0);$o(`${t} ${this.i18n[s]} ${o}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let o=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),o=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,o,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const o=this.__createChip(t[i]);this.insertBefore(o,s),s=o,e.unshift(o)}const r=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),r.unshift(t.pop());const s=r.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(o,s)}px`)}this._overflowItems=r}else{for(let e=t.length-1,i=null;e>=0;e--){const r=this.__createChip(t[e]);if(this.insertBefore(r,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){r.remove();break}r.style.maxWidth=`${Math.max(o,s)}px`}t.pop(),i=r}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const o=e.length;t.label=`${o}`,t.setAttribute("count",`${o}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===o),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&$o(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}v(ja),Mt("vaadin-notification-card",w`
4939
+ :host {
4940
+ position: relative;
4941
+ margin: var(--lumo-space-s);
4942
+ }
4943
+
4944
+ [part='overlay'] {
4945
+ background: var(--lumo-base-color) linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
4946
+ border-radius: var(--lumo-border-radius-l);
4947
+ box-shadow:
4948
+ 0 0 0 1px var(--lumo-contrast-10pct),
4949
+ var(--lumo-box-shadow-l);
4950
+ font-family: var(--lumo-font-family);
4951
+ font-size: var(--lumo-font-size-m);
4952
+ font-weight: 400;
4953
+ line-height: var(--lumo-line-height-s);
4954
+ letter-spacing: 0;
4955
+ text-transform: none;
4956
+ -webkit-text-size-adjust: 100%;
4957
+ -webkit-font-smoothing: antialiased;
4958
+ -moz-osx-font-smoothing: grayscale;
4959
+ }
4960
+
4961
+ [part='content'] {
4962
+ padding: var(--lumo-space-wide-l);
4963
+ display: flex;
4964
+ align-items: center;
4965
+ justify-content: space-between;
4966
+ }
4967
+
4968
+ [part='content'] ::slotted(vaadin-button) {
4969
+ flex: none;
4970
+ margin: 0 calc(var(--lumo-space-s) * -1) 0 var(--lumo-space-m);
4971
+ }
4972
+
4973
+ :host([slot^='middle']) {
4974
+ max-width: 80vw;
4975
+ margin: var(--lumo-space-s) auto;
4976
+ }
4977
+
4978
+ :host([slot$='stretch']) {
4979
+ margin: 0;
4980
+ }
4981
+
4982
+ :host([slot$='stretch']) [part='overlay'] {
4983
+ border-radius: 0;
4984
+ }
4985
+
4986
+ @media (min-width: 421px) {
4987
+ :host(:not([slot$='stretch'])) {
4988
+ display: flex;
4989
+ }
4990
+
4991
+ :host([slot$='end']) {
4992
+ justify-content: flex-end;
4993
+ }
4994
+
4995
+ :host([slot^='middle']),
4996
+ :host([slot$='center']) {
4997
+ display: flex;
4998
+ justify-content: center;
4999
+ }
5000
+ }
5001
+
5002
+ @keyframes lumo-notification-exit-fade-out {
5003
+ 100% {
5004
+ opacity: 0;
5005
+ }
5006
+ }
5007
+
5008
+ @keyframes lumo-notification-enter-fade-in {
5009
+ 0% {
5010
+ opacity: 0;
5011
+ }
5012
+ }
5013
+
5014
+ @keyframes lumo-notification-enter-slide-down {
5015
+ 0% {
5016
+ transform: translateY(-200%);
5017
+ opacity: 0;
5018
+ }
5019
+ }
5020
+
5021
+ @keyframes lumo-notification-exit-slide-up {
5022
+ 100% {
5023
+ transform: translateY(-200%);
5024
+ opacity: 0;
5025
+ }
5026
+ }
5027
+
5028
+ @keyframes lumo-notification-enter-slide-up {
5029
+ 0% {
5030
+ transform: translateY(200%);
5031
+ opacity: 0;
5032
+ }
5033
+ }
5034
+
5035
+ @keyframes lumo-notification-exit-slide-down {
5036
+ 100% {
5037
+ transform: translateY(200%);
5038
+ opacity: 0;
5039
+ }
5040
+ }
5041
+
5042
+ :host([slot='middle'][opening]) {
5043
+ animation: lumo-notification-enter-fade-in 300ms;
5044
+ }
5045
+
5046
+ :host([slot='middle'][closing]) {
5047
+ animation: lumo-notification-exit-fade-out 300ms;
5048
+ }
5049
+
5050
+ :host([slot^='top'][opening]) {
5051
+ animation: lumo-notification-enter-slide-down 300ms;
5052
+ }
5053
+
5054
+ :host([slot^='top'][closing]) {
5055
+ animation: lumo-notification-exit-slide-up 300ms;
5056
+ }
5057
+
5058
+ :host([slot^='bottom'][opening]) {
5059
+ animation: lumo-notification-enter-slide-up 300ms;
5060
+ }
5061
+
5062
+ :host([slot^='bottom'][closing]) {
5063
+ animation: lumo-notification-exit-slide-down 300ms;
5064
+ }
5065
+
5066
+ :host([theme='success']) {
5067
+ --_focus-ring-gap-color: var(--lumo-success-color);
5068
+ --vaadin-focus-ring-color: var(--lumo-success-contrast-color);
5069
+ }
5070
+
5071
+ :host([theme='warning']) {
5072
+ --_focus-ring-gap-color: var(--lumo-warning-color);
5073
+ --vaadin-focus-ring-color: var(--lumo-warning-contrast-color);
5074
+ }
5075
+
5076
+ :host([theme='error']) {
5077
+ --_focus-ring-gap-color: var(--lumo-error-color);
5078
+ --vaadin-focus-ring-color: var(--lumo-error-contrast-color);
5079
+ }
5080
+
5081
+ :host([theme='primary']) {
5082
+ --_focus-ring-gap-color: var(--lumo-primary-color);
5083
+ --vaadin-focus-ring-color: var(--lumo-primary-contrast-color);
5084
+ }
5085
+
5086
+ :host([theme~='primary']) [part='overlay'] {
5087
+ background: var(--lumo-primary-color);
5088
+ color: var(--lumo-primary-contrast-color);
5089
+ box-shadow: var(--lumo-box-shadow-l);
5090
+ }
5091
+
5092
+ :host([theme~='primary']) {
5093
+ --vaadin-button-background: var(--lumo-shade-20pct);
5094
+ --vaadin-button-text-color: var(--lumo-primary-contrast-color);
5095
+ --vaadin-button-primary-background: var(--lumo-primary-contrast-color);
5096
+ --vaadin-button-primary-text-color: var(--lumo-primary-text-color);
5097
+ }
5098
+
5099
+ :host([theme~='contrast']) [part='overlay'] {
5100
+ background: var(--lumo-contrast);
5101
+ color: var(--lumo-base-color);
5102
+ box-shadow: var(--lumo-box-shadow-l);
5103
+ }
5104
+
5105
+ :host([theme~='contrast']) {
5106
+ --vaadin-button-background: var(--lumo-contrast-20pct);
5107
+ --vaadin-button-text-color: var(--lumo-base-color);
5108
+ --vaadin-button-primary-background: var(--lumo-base-color);
5109
+ --vaadin-button-primary-text-color: var(--lumo-contrast);
5110
+ }
5111
+
5112
+ :host([theme~='success']) [part='overlay'] {
5113
+ background: var(--lumo-success-color);
5114
+ color: var(--lumo-success-contrast-color);
5115
+ box-shadow: var(--lumo-box-shadow-l);
5116
+ }
5117
+
5118
+ :host([theme~='success']) {
5119
+ --vaadin-button-background: var(--lumo-shade-20pct);
5120
+ --vaadin-button-text-color: var(--lumo-success-contrast-color);
5121
+ --vaadin-button-primary-background: var(--lumo-success-contrast-color);
5122
+ --vaadin-button-primary-text-color: var(--lumo-success-text-color);
5123
+ }
5124
+
5125
+ :host([theme~='error']) [part='overlay'] {
5126
+ background: var(--lumo-error-color);
5127
+ color: var(--lumo-error-contrast-color);
5128
+ box-shadow: var(--lumo-box-shadow-l);
5129
+ }
5130
+
5131
+ :host([theme~='error']) {
5132
+ --vaadin-button-background: var(--lumo-shade-20pct);
5133
+ --vaadin-button-text-color: var(--lumo-error-contrast-color);
5134
+ --vaadin-button-primary-background: var(--lumo-error-contrast-color);
5135
+ --vaadin-button-primary-text-color: var(--lumo-error-text-color);
5136
+ }
5137
+
5138
+ :host([theme~='warning']) [part='overlay'] {
5139
+ background: var(--lumo-warning-color);
5140
+ color: var(--lumo-warning-contrast-color);
5141
+ box-shadow:
5142
+ inset 0 0 0 1px var(--lumo-contrast-20pct),
5143
+ var(--lumo-box-shadow-l);
5144
+ }
5145
+
5146
+ :host([theme~='warning']) {
5147
+ --vaadin-button-background: var(--lumo-shade-20pct);
5148
+ --vaadin-button-text-color: var(--lumo-warning-contrast-color);
5149
+ --vaadin-button-primary-background: var(--lumo-shade-50pct);
5150
+ --vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
5151
+ }
5152
+ `,{moduleId:"lumo-notification-card"});
5153
+ /**
5154
+ * @license
5155
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5156
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5157
+ */
5158
+ class Va extends(Br($t(Is(is)))){static get template(){return ts`
5159
+ <style>
5160
+ :host {
5161
+ position: fixed;
5162
+ z-index: 1000;
5163
+ top: 0;
5164
+ left: 0;
5165
+ bottom: 0;
5166
+ right: 0;
5167
+ box-sizing: border-box;
5168
+
5169
+ display: flex;
5170
+ flex-direction: column;
5171
+ align-items: stretch;
5172
+ pointer-events: none;
5173
+ }
5174
+
5175
+ [region-group] {
5176
+ flex: 1 1 0%;
5177
+ display: flex;
5178
+ }
5179
+
5180
+ [region-group='top'] {
5181
+ align-items: flex-start;
5182
+ }
5183
+
5184
+ [region-group='bottom'] {
5185
+ align-items: flex-end;
5186
+ }
5187
+
5188
+ [region-group] > [region] {
5189
+ flex: 1 1 0%;
5190
+ }
5191
+
5192
+ @media (max-width: 420px) {
5193
+ [region-group] {
5194
+ flex-direction: column;
5195
+ align-items: stretch;
5196
+ }
5197
+
5198
+ [region-group='top'] {
5199
+ justify-content: flex-start;
5200
+ }
5201
+
5202
+ [region-group='bottom'] {
5203
+ justify-content: flex-end;
5204
+ }
5205
+
5206
+ [region-group] > [region] {
5207
+ flex: initial;
5208
+ }
5209
+ }
5210
+ </style>
5211
+
5212
+ <div region="top-stretch"><slot name="top-stretch"></slot></div>
5213
+ <div region-group="top">
5214
+ <div region="top-start"><slot name="top-start"></slot></div>
5215
+ <div region="top-center"><slot name="top-center"></slot></div>
5216
+ <div region="top-end"><slot name="top-end"></slot></div>
5217
+ </div>
5218
+ <div region="middle"><slot name="middle"></slot></div>
5219
+ <div region-group="bottom">
5220
+ <div region="bottom-start"><slot name="bottom-start"></slot></div>
5221
+ <div region="bottom-center"><slot name="bottom-center"></slot></div>
5222
+ <div region="bottom-end"><slot name="bottom-end"></slot></div>
5223
+ </div>
5224
+ <div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
5225
+ `}static get is(){return"vaadin-notification-container"}static get properties(){return{opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),yr&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener))}_detectIosNavbar(){const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.bottom=e&&i>t?i-t+"px":"0"}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault()}}class $a extends($t(is)){static get template(){return ts`
5226
+ <style>
5227
+ :host {
5228
+ display: block;
5229
+ }
5230
+
5231
+ [part='overlay'] {
5232
+ pointer-events: auto;
5233
+ }
5234
+
5235
+ @media (forced-colors: active) {
5236
+ [part='overlay'] {
5237
+ outline: 3px solid;
5238
+ }
5239
+ }
5240
+ </style>
5241
+
5242
+ <div part="overlay">
5243
+ <div part="content">
5244
+ <slot></slot>
5245
+ </div>
5246
+ </div>
5247
+ `}static get is(){return"vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite")}}class La extends(Ln(It(Is(is)))){static get template(){return ts`
5248
+ <style>
5249
+ :host {
5250
+ display: none !important;
5251
+ }
5252
+ </style>
5253
+ <vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
5254
+ `}static get is(){return"vaadin-notification"}static get properties(){return{duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return La._createAndShowNotification(void 0!==(null==(i=t)?void 0:i._$litType$)?e=>{xt(t,e)}:e=>{e.innerText=t},e);var i}static _createAndShowNotification(t,e){const i=document.createElement(La.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",(t=>{t.detail.value||i.remove()})),i}get _container(){return La._container||(La._container=document.createElement("vaadin-notification-container"),document.body.appendChild(La._container)),La._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),Aa(this)}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask((()=>{this.isConnected||(this.opened=!1)}))}requestContentUpdate(){this.renderer&&this.renderer(this._card,this)}_rendererChanged(t,e,i){if(!i)return;const s=this._oldRenderer!==t;this._oldRenderer=t,s&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate())}open(){this.opened=!0}close(){this.opened=!1}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard()}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener)}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`))return void console.warn(`Invalid alignment parameter provided: position=${this.position}`);this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card)}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"))}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard()}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&"none"!==t?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState()},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard()}_positionChanged(){this.opened&&this._animatedAppendNotificationCard()}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout((()=>this.close()),t)))}}v(Va),v($a),v(La);const Ra=w`
5255
+ :host {
5256
+ -webkit-tap-highlight-color: transparent;
5257
+ --_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
5258
+ }
5259
+
5260
+ /* Dividers */
5261
+ [part='items'] ::slotted(hr) {
5262
+ height: 1px;
5263
+ border: 0;
5264
+ padding: 0;
5265
+ margin: var(--lumo-space-s) var(--lumo-border-radius-m);
5266
+ background-color: var(--lumo-contrast-10pct);
5267
+ }
5268
+ `;Mt("vaadin-list-box",Ra,{moduleId:"lumo-list-box"}),
5269
+ /**
5270
+ * @license
5271
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5272
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5273
+ */
5274
+ Mt("vaadin-select-item",Xn,{moduleId:"lumo-select-item"}),Mt("vaadin-select-list-box",Ra,{moduleId:"lumo-select-list-box"}),Mt("vaadin-select",[ar,w`
5275
+ :host(:not([theme*='align'])) ::slotted([slot='value']) {
5276
+ text-align: start;
5277
+ }
5278
+
5279
+ [part='input-field'] {
5280
+ cursor: var(--lumo-clickable-cursor);
5281
+ }
5282
+
5283
+ [part='input-field'] ::slotted([slot='value']) {
5284
+ font-weight: var(--vaadin-input-field-value-font-weight, 500);
5285
+ }
5286
+
5287
+ [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
5288
+ color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
5289
+ }
5290
+
5291
+ :host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
5292
+ color: var(--lumo-secondary-text-color);
5293
+ }
5294
+
5295
+ /* placeholder styles */
5296
+ [part='input-field'] ::slotted([slot='value'][placeholder]) {
5297
+ color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
5298
+ }
5299
+
5300
+ :host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
5301
+ opacity: 0;
5302
+ }
5303
+
5304
+ [part='toggle-button']::before {
5305
+ content: var(--lumo-icons-dropdown);
5306
+ }
5307
+
5308
+ /* Highlight the toggle button when hovering over the entire component */
5309
+ :host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
5310
+ color: var(--lumo-contrast-80pct);
5311
+ }
5312
+
5313
+ :host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
5314
+ --_lumo-selected-item-height: var(--lumo-size-s);
5315
+ --_lumo-selected-item-padding: 0;
5316
+ }
5317
+ `],{moduleId:"lumo-select"}),Mt("vaadin-select-value-button",w`
5318
+ :host {
5319
+ font-family: var(--lumo-font-family);
5320
+ font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
5321
+ padding: 0 0.25em;
5322
+ --_lumo-selected-item-height: var(--lumo-size-m);
5323
+ --_lumo-selected-item-padding: 0.5em;
5324
+ }
5325
+
5326
+ ::slotted(*) {
5327
+ min-height: var(--_lumo-selected-item-height);
5328
+ padding-top: var(--_lumo-selected-item-padding);
5329
+ padding-bottom: var(--_lumo-selected-item-padding);
5330
+ font-size: inherit;
5331
+ }
5332
+
5333
+ ::slotted(*:hover) {
5334
+ background-color: transparent;
5335
+ }
5336
+ `,{moduleId:"lumo-select-value-button"}),Mt("vaadin-select-overlay",[or,w`
5337
+ :host {
5338
+ --_lumo-item-selected-icon-display: block;
5339
+ }
5340
+
5341
+ /* Small viewport adjustment */
5342
+ :host([phone]) {
5343
+ /* stylelint-disable declaration-block-no-redundant-longhand-properties */
5344
+ top: 0 !important;
5345
+ right: 0 !important;
5346
+ bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
5347
+ left: 0 !important;
5348
+ /* stylelint-enable declaration-block-no-redundant-longhand-properties */
5349
+ align-items: stretch;
5350
+ justify-content: flex-end;
5351
+ }
5352
+
5353
+ :host([no-vertical-overlap][top-aligned]) [part='overlay'] {
5354
+ margin-block-start: var(--lumo-space-xs);
5355
+ }
5356
+
5357
+ :host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
5358
+ margin-block-end: var(--lumo-space-xs);
5359
+ }
5360
+
5361
+ :host([theme~='align-left']) {
5362
+ text-align: left;
5363
+ }
5364
+
5365
+ :host([theme~='align-right']) {
5366
+ text-align: right;
5367
+ }
5368
+
5369
+ :host([theme~='align-center']) {
5370
+ text-align: center;
5371
+ }
5372
+ `],{moduleId:"lumo-select-overlay"});
5373
+ /**
5374
+ * @license
5375
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5376
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5377
+ */
5378
+ const qa=t=>class extends(mo(Ao(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
5379
+ /**
5380
+ * @license
5381
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5382
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5383
+ */;class Ua extends(qa($t(ks(is)))){static get is(){return"vaadin-select-item"}static get template(){return ts`
5384
+ <style>
5385
+ :host {
5386
+ display: inline-block;
5387
+ }
5388
+
5389
+ :host([hidden]) {
5390
+ display: none !important;
5391
+ }
5392
+ </style>
5393
+ <span part="checkmark" aria-hidden="true"></span>
5394
+ <div part="content">
5395
+ <slot></slot>
5396
+ </div>
5397
+ `}ready(){super.ready(),this.setAttribute("role","option")}}v(Ua);
5398
+ /**
5399
+ * @license
5400
+ * Copyright (c) 2022 - 2024 Vaadin Ltd.
5401
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5402
+ */
5403
+ const Wa=t=>class extends(po(t)){get focused(){return(this._getItems()||[]).find(ko)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!xo(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let o,r;const n=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(r=-n,o=s-n):this.__isNextKey(e)?(r=n,o=s+n):"Home"===e?(r=1,o=0):"End"===e&&(r=-1,o=i.length-1),o=this._getAvailableIndex(i,o,r,(t=>!xo(t))),o>=0&&(t.preventDefault(),this._focus(o,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const o=t.length;let r=e;for(let e=0;"number"==typeof r&&e<o;e+=1,r+=i||1){r<0?r=o-1:r>=o&&(r=0);const e=t[r];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return r}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
5404
+ /**
5405
+ * @license
5406
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5407
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5408
+ */,Ha=t=>class extends(Wa(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!xo(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Es(t,(()=>{this._setItems(this._filterItems(Ss(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=fs.debounce(this._searchReset,ds.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),o=(this.items[t+1]||e).getBoundingClientRect(),r=(this.items[t-1]||e).getBoundingClientRect();let n=0;!this._isRTL&&o[i[1]]>=s[i[1]]||this._isRTL&&o[i[1]]<=s[i[1]]?n=o[i[1]]-s[i[1]]:(!this._isRTL&&r[i[0]]<=s[i[0]]||this._isRTL&&r[i[0]]>=s[i[0]])&&(n=r[i[0]]-s[i[0]]),this._scroll(n)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=
5409
+ /**
5410
+ * @license
5411
+ * Copyright (c) 2021 - 2024 Vaadin Ltd.
5412
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5413
+ */
5414
+ function(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
5415
+ /**
5416
+ * @license
5417
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5418
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5419
+ */;class Ga extends(Ha($t(ks(Fo(is))))){static get is(){return"vaadin-select-list-box"}static get template(){return ts`
5420
+ <style>
5421
+ :host {
5422
+ display: flex;
5423
+ }
5424
+
5425
+ :host([hidden]) {
5426
+ display: none !important;
5427
+ }
5428
+
5429
+ [part='items'] {
5430
+ height: 100%;
5431
+ width: 100%;
5432
+ overflow-y: auto;
5433
+ -webkit-overflow-scrolling: touch;
5434
+ }
5435
+ </style>
5436
+ <div part="items">
5437
+ <slot></slot>
5438
+ </div>
5439
+ `}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}v(Ga);
5440
+ /**
5441
+ * @license
5442
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5443
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5444
+ */
5445
+ const Ya=t=>class extends(Lr(Fr(ks(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
5446
+ /**
5447
+ * @license
5448
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5449
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5450
+ */;Mt("vaadin-select-overlay",[cr,w`
5451
+ :host {
5452
+ align-items: flex-start;
5453
+ justify-content: flex-start;
5454
+ }
5455
+
5456
+ :host(:not([phone])) [part='overlay'] {
5457
+ min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
5458
+ }
5459
+
5460
+ @media (forced-colors: active) {
5461
+ [part='overlay'] {
5462
+ outline: 3px solid;
5463
+ }
5464
+ }
5465
+ `],{moduleId:"vaadin-select-overlay-styles"});class Ka extends(Ya($t(is))){static get is(){return"vaadin-select-overlay"}static get template(){return ts`
5466
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
5467
+ <div part="overlay" id="overlay" tabindex="0">
5468
+ <div part="content" id="content">
5469
+ <slot></slot>
5470
+ </div>
5471
+ </div>
5472
+ `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}v(Ka),
5473
+ /**
5474
+ * @license
5475
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5476
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5477
+ */
5478
+ Mt("vaadin-select-value-button",w`
5479
+ :host {
5480
+ display: inline-block;
5481
+ position: relative;
5482
+ outline: none;
5483
+ white-space: nowrap;
5484
+ -webkit-user-select: none;
5485
+ -moz-user-select: none;
5486
+ user-select: none;
5487
+ min-width: 0;
5488
+ width: 0;
5489
+ }
5490
+
5491
+ ::slotted(*) {
5492
+ padding-left: 0;
5493
+ padding-right: 0;
5494
+ flex: auto;
5495
+ }
5496
+
5497
+ /* placeholder styles */
5498
+ ::slotted(*:not([selected])) {
5499
+ line-height: 1;
5500
+ }
5501
+
5502
+ .vaadin-button-container {
5503
+ display: inline-flex;
5504
+ align-items: center;
5505
+ justify-content: center;
5506
+ text-align: inherit;
5507
+ width: 100%;
5508
+ height: 100%;
5509
+ min-height: inherit;
5510
+ text-shadow: inherit;
5511
+ }
5512
+
5513
+ [part='label'] {
5514
+ white-space: nowrap;
5515
+ overflow: hidden;
5516
+ text-overflow: ellipsis;
5517
+ width: 100%;
5518
+ line-height: inherit;
5519
+ }
5520
+ `,{moduleId:"vaadin-select-value-button-styles"});class Ja extends(Wr($t(is))){static get is(){return"vaadin-select-value-button"}static get template(){return ts`
5521
+ <div class="vaadin-button-container">
5522
+ <span part="label">
5523
+ <slot></slot>
5524
+ </span>
5525
+ </div>
5526
+ `}}v(Ja);
5527
+ /**
5528
+ * @license
5529
+ * Copyright (c) 2021 - 2024 Vaadin Ltd..
5530
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5531
+ */
5532
+ const Za=w`
5533
+ .sr-only {
5534
+ border: 0 !important;
5535
+ clip: rect(1px, 1px, 1px, 1px) !important;
5536
+ -webkit-clip-path: inset(50%) !important;
5537
+ clip-path: inset(50%) !important;
5538
+ height: 1px !important;
5539
+ margin: -1px !important;
5540
+ overflow: hidden !important;
5541
+ padding: 0 !important;
5542
+ position: absolute !important;
5543
+ width: 1px !important;
5544
+ white-space: nowrap !important;
5545
+ }
5546
+ `
5547
+ /**
5548
+ * @license
5549
+ * Copyright (c) 2023 - 2024 Vaadin Ltd.
5550
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5551
+ */;class Qa extends Ns{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
5552
+ /**
5553
+ * @license
5554
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5555
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5556
+ */const Xa=t=>class extends(Ln(So(zo(po(Go(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${Os()}`,this._srLabelController=new Uo(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new Qa(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Dn(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Ms(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),Mo(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return m(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5557
+ /**
5558
+ * @license
5559
+ * Copyright (c) 2017 - 2024 Vaadin Ltd.
5560
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5561
+ */;Mt("vaadin-select",[jn,Vn,Za],{moduleId:"vaadin-select-styles"});class tl extends(Xa(Is($t(is)))){static get is(){return"vaadin-select"}static get template(){return ts`
5562
+ <style>
5563
+ :host {
5564
+ position: relative;
5565
+ }
5566
+
5567
+ ::slotted([slot='value']) {
5568
+ flex-grow: 1;
5569
+ }
5570
+ </style>
5571
+
5572
+ <div class="vaadin-select-container">
5573
+ <div part="label" on-click="_onClick">
5574
+ <slot name="label"></slot>
5575
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
5576
+ </div>
5577
+
5578
+ <vaadin-input-container
5579
+ part="input-field"
5580
+ readonly="[[readonly]]"
5581
+ disabled="[[disabled]]"
5582
+ invalid="[[invalid]]"
5583
+ theme$="[[_theme]]"
5584
+ on-click="_onClick"
5585
+ >
5586
+ <slot name="prefix" slot="prefix"></slot>
5587
+ <slot name="value"></slot>
5588
+ <div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
5589
+ </vaadin-input-container>
5590
+
5591
+ <div part="helper-text">
5592
+ <slot name="helper"></slot>
5593
+ </div>
5594
+
5595
+ <div part="error-message">
5596
+ <slot name="error-message"></slot>
5597
+ </div>
5598
+ </div>
5599
+
5600
+ <vaadin-select-overlay
5601
+ position-target="[[_inputContainer]]"
5602
+ opened="{{opened}}"
5603
+ with-backdrop="[[_phone]]"
5604
+ phone$="[[_phone]]"
5605
+ theme$="[[_theme]]"
5606
+ no-vertical-overlap$="[[noVerticalOverlap]]"
5607
+ on-vaadin-overlay-open="_onOverlayOpen"
5608
+ ></vaadin-select-overlay>
5609
+
5610
+ <slot name="tooltip"></slot>
5611
+ <div class="sr-only">
5612
+ <slot name="sr-label"></slot>
5613
+ </div>
5614
+ `}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),Aa(this)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}v(tl);const el=class{constructor(e){t(this,e),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){this.translationUrl&&s(this.translationUrl)}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return e("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return e("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return e("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return e("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return e("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return e("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return e("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return e("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return e("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return e("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return e("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return e("p",null,"The ",this.type," input type is not valid")}}render(){return e(i,{key:"e89747da2e458906e8f634c285044e95d5e92f73",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};el.style=":host{display:block;height:100%}";export{el as general_input}