@everymatrix/general-input 1.64.8 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (14) hide show
  1. package/dist/cjs/general-input.cjs.entry.js +198 -198
  2. package/dist/esm/general-input.entry.js +198 -198
  3. package/dist/general-input/general-input.esm.js +1 -1
  4. package/dist/general-input/{p-2820ef34.entry.js → p-5bc47cf3.entry.js} +119 -119
  5. package/package.json +1 -1
  6. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  7. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.d.ts +0 -0
  8. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/stencil.config.dev.d.ts +0 -0
  9. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/main.d.ts +0 -0
  10. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/packages/stencil/general-input/storybook/preview.d.ts +0 -0
  11. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/index.d.ts +0 -0
  12. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  13. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  14. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-input/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -5,51 +5,51 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-bce82d29.js');
6
6
  const locale_utils = require('./locale.utils-ae578c17.js');
7
7
 
8
- var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnPropertyDescriptors;var Bi=Object.getOwnPropertySymbols;var gr=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable;var ft=(s,t,e)=>t in s?_r(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,me=(s,t)=>{for(var e in t||(t={}))gr.call(t,e)&&ft(s,e,t[e]);if(Bi)for(var e of Bi(t))vr.call(t,e)&&ft(s,e,t[e]);return s},mt=(s,t)=>fr(s,mr(t));var C=(s,t,e)=>(ft(s,typeof t!="symbol"?t+"":t,e),e);var Ue=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
8
+ var fr=Object.defineProperty,mr=Object.defineProperties;var gr=Object.getOwnPropertyDescriptors;var Ri=Object.getOwnPropertySymbols;var vr=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable;var ft=(s,t,e)=>t in s?fr(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,me=(s,t)=>{for(var e in t||(t={}))vr.call(t,e)&&ft(s,e,t[e]);if(Ri)for(var e of Ri(t))br.call(t,e)&&ft(s,e,t[e]);return s},mt=(s,t)=>mr(s,gr(t));var C=(s,t,e)=>(ft(s,typeof t!="symbol"?t+"":t,e),e);var Ue=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
9
9
  * @license
10
10
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
11
11
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
12
- */function y(s,t="24.5.12"){Object.defineProperty(s,"version",{get(){return t}});const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
12
+ */function y(s,t="24.5.10"){Object.defineProperty(s,"version",{get(){return t}});const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
13
13
  * @license
14
14
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
15
15
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
16
- */class br extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}y(br);/**
16
+ */class yr extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}y(yr);/**
17
17
  * @license
18
18
  * Copyright 2019 Google LLC
19
19
  * SPDX-License-Identifier: BSD-3-Clause
20
- */const Xe=globalThis,ri=Xe.ShadowRoot&&(Xe.ShadyCSS===void 0||Xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),Ri=new WeakMap;let ai=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ni)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(ri&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Ri.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Ri.set(e,t));}return t}toString(){return this.cssText}};const yr=s=>new ai(typeof s=="string"?s:s+"",void 0,ni),_=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[r+1],s[0]);return new ai(e,s,ni)},Fs=(s,t)=>{if(ri)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=Xe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i);}},Hi=ri?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return yr(e)})(s):s;/**
20
+ */const Xe=globalThis,ri=Xe.ShadowRoot&&(Xe.ShadyCSS===void 0||Xe.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ni=Symbol(),Hi=new WeakMap;let ai=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ni)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(ri&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=Hi.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&Hi.set(e,t));}return t}toString(){return this.cssText}};const xr=s=>new ai(typeof s=="string"?s:s+"",void 0,ni),_=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[r+1],s[0]);return new ai(e,s,ni)},Ls=(s,t)=>{if(ri)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=Xe.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i);}},$i=ri?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return xr(e)})(s):s;/**
21
21
  * @license
22
22
  * Copyright 2017 Google LLC
23
23
  * SPDX-License-Identifier: BSD-3-Clause
24
- */const{is:xr,defineProperty:wr,getOwnPropertyDescriptor:Cr,getOwnPropertyNames:Ar,getOwnPropertySymbols:Er,getPrototypeOf:Pr}=Object,H=globalThis,$i=H.trustedTypes,kr=$i?$i.emptyScript:"",gt=H.reactiveElementPolyfillSupport,Ee=(s,t)=>s,Ft={toAttribute(s,t){switch(t){case Boolean:s=s?kr:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s);}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s);}catch(i){e=null;}}return e}},Ls=(s,t)=>!xr(s,t),Ui={attribute:!0,type:String,converter:Ft,reflect:!1,hasChanged:Ls};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(H.litPropertyMetadata)!=null||(H.litPropertyMetadata=new WeakMap);class te extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ui){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&wr(this.prototype,t,o);}}static getPropertyDescriptor(t,e,i){var n;const{get:o,set:r}=(n=Cr(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get(){return o==null?void 0:o.call(this)},set(a){const l=o==null?void 0:o.call(this);r.call(this,a),this.requestUpdate(t,l,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return (e=this.elementProperties.get(t))!=null?e:Ui}static _$Ei(){if(this.hasOwnProperty(Ee("elementProperties")))return;const t=Pr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(Ee("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ee("properties"))){const e=this.properties,i=[...Ar(e),...Er(e)];for(const o of i)this.createProperty(o,e[o]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e);}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 o of i)e.unshift(Hi(o));}else t!==void 0&&e.push(Hi(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this));}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t));}removeController(t){var e;(e=this._$EO)==null||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 e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return Fs(t,this.constructor.elementStyles),t}connectedCallback(){var e;(this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostConnected)==null?void 0:o.call(i)});}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return (i=e.hostDisconnected)==null?void 0:i.call(e)});}attributeChangedCallback(t,e,i){this._$AK(t,i);}_$EC(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Ft).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null;}}_$AK(t,e){var r;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const n=i.getPropertyOptions(o),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((r=n.converter)==null?void 0:r.fromAttribute)!==void 0?n.converter:Ft;this._$Em=o,this[o]=a.fromAttribute(e,n.type),this._$Em=null;}}requestUpdate(t,e,i){var o;if(t!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(t)),!((o=i.hasChanged)!=null?o:Ls)(this[t],e))return;this.P(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$ET());}P(t,e,i){var o;this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&((o=this._$Ej)!=null?o:this._$Ej=new Set).add(t);}_$ET(){return Ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES;}catch(e){Promise.reject(e);}const t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0;}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],a);}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EU();}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostUpdated)==null?void 0:o.call(i)}),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(e=>this._$EC(e,this[e]))),this._$EU();}updated(t){}firstUpdated(t){}}var Os;te.elementStyles=[],te.shadowRootOptions={mode:"open"},te[Ee("elementProperties")]=new Map,te[Ee("finalized")]=new Map,gt==null||gt({ReactiveElement:te}),((Os=H.reactiveElementVersions)!=null?Os:H.reactiveElementVersions=[]).push("2.0.4");/**
24
+ */const{is:wr,defineProperty:Cr,getOwnPropertyDescriptor:Ar,getOwnPropertyNames:Er,getOwnPropertySymbols:Pr,getPrototypeOf:kr}=Object,H=globalThis,Ui=H.trustedTypes,Sr=Ui?Ui.emptyScript:"",gt=H.reactiveElementPolyfillSupport,Ee=(s,t)=>s,Ft={toAttribute(s,t){switch(t){case Boolean:s=s?Sr:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s);}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s);}catch(i){e=null;}}return e}},Vs=(s,t)=>!wr(s,t),qi={attribute:!0,type:String,converter:Ft,reflect:!1,hasChanged:Vs};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(H.litPropertyMetadata)!=null||(H.litPropertyMetadata=new WeakMap);class te extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=qi){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Cr(this.prototype,t,o);}}static getPropertyDescriptor(t,e,i){var n;const{get:o,set:r}=(n=Ar(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get(){return o==null?void 0:o.call(this)},set(a){const l=o==null?void 0:o.call(this);r.call(this,a),this.requestUpdate(t,l,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return (e=this.elementProperties.get(t))!=null?e:qi}static _$Ei(){if(this.hasOwnProperty(Ee("elementProperties")))return;const t=kr(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(Ee("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ee("properties"))){const e=this.properties,i=[...Er(e),...Pr(e)];for(const o of i)this.createProperty(o,e[o]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e);}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 o of i)e.unshift($i(o));}else t!==void 0&&e.push($i(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?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(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this));}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t));}removeController(t){var e;(e=this._$EO)==null||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 e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return Ls(t,this.constructor.elementStyles),t}connectedCallback(){var e;(this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostConnected)==null?void 0:o.call(i)});}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return (i=e.hostDisconnected)==null?void 0:i.call(e)});}attributeChangedCallback(t,e,i){this._$AK(t,i);}_$EC(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Ft).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null;}}_$AK(t,e){var r;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const n=i.getPropertyOptions(o),a=typeof n.converter=="function"?{fromAttribute:n.converter}:((r=n.converter)==null?void 0:r.fromAttribute)!==void 0?n.converter:Ft;this._$Em=o,this[o]=a.fromAttribute(e,n.type),this._$Em=null;}}requestUpdate(t,e,i){var o;if(t!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(t)),!((o=i.hasChanged)!=null?o:Vs)(this[t],e))return;this.P(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$ET());}P(t,e,i){var o;this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&((o=this._$Ej)!=null?o:this._$Ej=new Set).add(t);}_$ET(){return Ue(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES;}catch(e){Promise.reject(e);}const t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0;}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r)a.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],a);}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EU();}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostUpdated)==null?void 0:o.call(i)}),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(e=>this._$EC(e,this[e]))),this._$EU();}updated(t){}firstUpdated(t){}}var Ms;te.elementStyles=[],te.shadowRootOptions={mode:"open"},te[Ee("elementProperties")]=new Map,te[Ee("finalized")]=new Map,gt==null||gt({ReactiveElement:te}),((Ms=H.reactiveElementVersions)!=null?Ms:H.reactiveElementVersions=[]).push("2.0.4");/**
25
25
  * @license
26
26
  * Copyright 2017 Google LLC
27
27
  * SPDX-License-Identifier: BSD-3-Clause
28
- */const Pe=globalThis,Qe=Pe.trustedTypes,qi=Qe?Qe.createPolicy("lit-html",{createHTML:s=>s}):void 0,Vs="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,Bs="?"+B,Sr=`<${Bs}>`,X=document,Se=()=>X.createComment(""),Te=s=>s===null||typeof s!="object"&&typeof s!="function",li=Array.isArray,Tr=s=>li(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",vt=`[
29
- \f\r]`,ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yi=/-->/g,ji=/>/g,Y=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
30
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Wi=/'/g,Gi=/"/g,Rs=/^(?:script|style|textarea|title)$/i,ne=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Ki=new WeakMap,j=X.createTreeWalker(X,129);function Hs(s,t){if(!li(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return qi!==void 0?qi.createHTML(t):t}const Ir=(s,t)=>{const e=s.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",n=ge;for(let a=0;a<e;a++){const l=s[a];let d,h,c=-1,u=0;for(;u<l.length&&(n.lastIndex=u,h=n.exec(l),h!==null);)u=n.lastIndex,n===ge?h[1]==="!--"?n=Yi:h[1]!==void 0?n=ji:h[2]!==void 0?(Rs.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=Y):h[3]!==void 0&&(n=Y):n===Y?h[0]===">"?(n=o!=null?o:ge,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?Y:h[3]==='"'?Gi:Wi):n===Gi||n===Wi?n=Y:n===Yi||n===ji?n=ge:(n=Y,o=void 0);const p=n===Y&&s[a+1].startsWith("/>")?" ":"";r+=n===ge?l+Sr:c>=0?(i.push(d),l.slice(0,c)+Vs+l.slice(c)+B+p):l+B+(c===-2?a:p);}return [Hs(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ie{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=Ir(t,e);if(this.el=Ie.createElement(d,i),j.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(o=j.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(Vs)){const u=h[n++],p=o.getAttribute(c).split(B),f=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:f[2],strings:p,ctor:f[1]==="."?Or:f[1]==="?"?Mr:f[1]==="@"?zr:lt}),o.removeAttribute(c);}else c.startsWith(B)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(Rs.test(o.tagName)){const c=o.textContent.split(B),u=c.length-1;if(u>0){o.textContent=Qe?Qe.emptyScript:"";for(let p=0;p<u;p++)o.append(c[p],Se()),j.nextNode(),l.push({type:2,index:++r});o.append(c[u],Se());}}}else if(o.nodeType===8)if(o.data===Bs)l.push({type:2,index:r});else {let c=-1;for(;(c=o.data.indexOf(B,c+1))!==-1;)l.push({type:7,index:r}),c+=B.length-1;}r++;}}static createElement(t,e){const i=X.createElement("template");return i.innerHTML=t,i}}function ae(s,t,e=s,i){var n,a,l;if(t===ne)return t;let o=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Te(t)?void 0:t._$litDirective$;return (o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(s),o._$AT(s,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=o:e._$Cl=o),o!==void 0&&(t=ae(s,o._$AS(s,t.values),o,i)),t}class Dr{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 d;const{el:{content:e},parts:i}=this._$AD,o=((d=t==null?void 0:t.creationScope)!=null?d:X).importNode(e,!0);j.currentNode=o;let r=j.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new Be(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Nr(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=j.nextNode(),n++);}return j.currentNode=X,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++;}}class Be{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,o){var r;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(r=o==null?void 0:o.isConnected)!=null?r:!0;}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ae(this,t,e),Te(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==ne&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Tr(t)?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!==w&&Te(this._$AH)?this._$AA.nextSibling.data=t:this.T(X.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ie.createElement(Hs(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else {const n=new Dr(o,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=Ki.get(t.strings);return e===void 0&&Ki.set(t.strings,e=new Ie(t)),e}k(t){li(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new Be(this.O(Se()),this.O(Se()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o);}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class lt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=w;}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(r===void 0)t=ae(this,t,e,0),n=!Te(t)||t!==this._$AH&&t!==ne,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=ae(this,a[i+l],e,l),d===ne&&(d=this._$AH[l]),n||(n=!Te(d)||d!==this._$AH[l]),d===w?t=w:t!==w&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!o&&this.j(t);}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class Or extends lt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===w?void 0:t;}}class Mr extends lt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w);}}class zr extends lt{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=ae(this,t,e,0))!=null?n:w)===ne)return;const i=this._$AH,o=t===w&&i!==w||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==w&&(i===w||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)==null?void 0:e.host)!=null?i:this.element,t):this._$AH.handleEvent(t);}}class Nr{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){ae(this,t);}}const bt=Pe.litHtmlPolyfillSupport;var Ms;bt==null||bt(Ie,Be),((Ms=Pe.litHtmlVersions)!=null?Ms:Pe.litHtmlVersions=[]).push("3.2.1");const Fr=(s,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let o=i._$litPart$;if(o===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=o=new Be(t.insertBefore(Se(),a),a,void 0,e!=null?e:{});}return o._$AI(s),o};/**
28
+ */const Pe=globalThis,Qe=Pe.trustedTypes,Yi=Qe?Qe.createPolicy("lit-html",{createHTML:s=>s}):void 0,Bs="$lit$",B=`lit$${Math.random().toFixed(9).slice(2)}$`,Rs="?"+B,Tr=`<${Rs}>`,X=document,Se=()=>X.createComment(""),Te=s=>s===null||typeof s!="object"&&typeof s!="function",li=Array.isArray,Ir=s=>li(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",vt=`[
29
+ \f\r]`,ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ji=/-->/g,Wi=/>/g,Y=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
30
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gi=/'/g,Ki=/"/g,Hs=/^(?:script|style|textarea|title)$/i,ne=Symbol.for("lit-noChange"),w=Symbol.for("lit-nothing"),Xi=new WeakMap,j=X.createTreeWalker(X,129);function $s(s,t){if(!li(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Yi!==void 0?Yi.createHTML(t):t}const Dr=(s,t)=>{const e=s.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",n=ge;for(let a=0;a<e;a++){const l=s[a];let d,h,c=-1,u=0;for(;u<l.length&&(n.lastIndex=u,h=n.exec(l),h!==null);)u=n.lastIndex,n===ge?h[1]==="!--"?n=ji:h[1]!==void 0?n=Wi:h[2]!==void 0?(Hs.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=Y):h[3]!==void 0&&(n=Y):n===Y?h[0]===">"?(n=o!=null?o:ge,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?Y:h[3]==='"'?Ki:Gi):n===Ki||n===Gi?n=Y:n===ji||n===Wi?n=ge:(n=Y,o=void 0);const p=n===Y&&s[a+1].startsWith("/>")?" ":"";r+=n===ge?l+Tr:c>=0?(i.push(d),l.slice(0,c)+Bs+l.slice(c)+B+p):l+B+(c===-2?a:p);}return [$s(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ie{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=Dr(t,e);if(this.el=Ie.createElement(d,i),j.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(o=j.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(Bs)){const u=h[n++],p=o.getAttribute(c).split(B),f=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:f[2],strings:p,ctor:f[1]==="."?Mr:f[1]==="?"?zr:f[1]==="@"?Nr:lt}),o.removeAttribute(c);}else c.startsWith(B)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(Hs.test(o.tagName)){const c=o.textContent.split(B),u=c.length-1;if(u>0){o.textContent=Qe?Qe.emptyScript:"";for(let p=0;p<u;p++)o.append(c[p],Se()),j.nextNode(),l.push({type:2,index:++r});o.append(c[u],Se());}}}else if(o.nodeType===8)if(o.data===Rs)l.push({type:2,index:r});else {let c=-1;for(;(c=o.data.indexOf(B,c+1))!==-1;)l.push({type:7,index:r}),c+=B.length-1;}r++;}}static createElement(t,e){const i=X.createElement("template");return i.innerHTML=t,i}}function ae(s,t,e=s,i){var n,a,l;if(t===ne)return t;let o=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Te(t)?void 0:t._$litDirective$;return (o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(s),o._$AT(s,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=o:e._$Cl=o),o!==void 0&&(t=ae(s,o._$AS(s,t.values),o,i)),t}class Or{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 d;const{el:{content:e},parts:i}=this._$AD,o=((d=t==null?void 0:t.creationScope)!=null?d:X).importNode(e,!0);j.currentNode=o;let r=j.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new Be(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Fr(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=j.nextNode(),n++);}return j.currentNode=X,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++;}}class Be{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,o){var r;this.type=2,this._$AH=w,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(r=o==null?void 0:o.isConnected)!=null?r:!0;}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=ae(this,t,e),Te(t)?t===w||t==null||t===""?(this._$AH!==w&&this._$AR(),this._$AH=w):t!==this._$AH&&t!==ne&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ir(t)?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!==w&&Te(this._$AH)?this._$AA.nextSibling.data=t:this.T(X.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ie.createElement($s(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else {const n=new Or(o,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=Xi.get(t.strings);return e===void 0&&Xi.set(t.strings,e=new Ie(t)),e}k(t){li(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new Be(this.O(Se()),this.O(Se()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o);}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class lt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=w,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=w;}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(r===void 0)t=ae(this,t,e,0),n=!Te(t)||t!==this._$AH&&t!==ne,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=ae(this,a[i+l],e,l),d===ne&&(d=this._$AH[l]),n||(n=!Te(d)||d!==this._$AH[l]),d===w?t=w:t!==w&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!o&&this.j(t);}j(t){t===w?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class Mr extends lt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===w?void 0:t;}}class zr extends lt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==w);}}class Nr extends lt{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=ae(this,t,e,0))!=null?n:w)===ne)return;const i=this._$AH,o=t===w&&i!==w||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==w&&(i===w||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)==null?void 0:e.host)!=null?i:this.element,t):this._$AH.handleEvent(t);}}class Fr{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){ae(this,t);}}const bt=Pe.litHtmlPolyfillSupport;var zs;bt==null||bt(Ie,Be),((zs=Pe.litHtmlVersions)!=null?zs:Pe.litHtmlVersions=[]).push("3.2.1");const Lr=(s,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let o=i._$litPart$;if(o===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=o=new Be(t.insertBefore(Se(),a),a,void 0,e!=null?e:{});}return o._$AI(s),o};/**
31
31
  * @license
32
32
  * Copyright 2017 Google LLC
33
33
  * SPDX-License-Identifier: BSD-3-Clause
34
- */class ie extends te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;const t=super.createRenderRoot();return ((e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Fr(e,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1);}render(){return ne}}var zs;ie._$litElement$=!0,ie.finalized=!0,(zs=globalThis.litElementHydrateSupport)==null||zs.call(globalThis,{LitElement:ie});const yt=globalThis.litElementPolyfillSupport;yt==null||yt({LitElement:ie});var Ns;((Ns=globalThis.litElementVersions)!=null?Ns:globalThis.litElementVersions=[]).push("4.1.1");/**
34
+ */class ie extends te{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;const t=super.createRenderRoot();return ((e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Lr(e,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1);}render(){return ne}}var Ns;ie._$litElement$=!0,ie.finalized=!0,(Ns=globalThis.litElementHydrateSupport)==null||Ns.call(globalThis,{LitElement:ie});const yt=globalThis.litElementPolyfillSupport;yt==null||yt({LitElement:ie});var Fs;((Fs=globalThis.litElementVersions)!=null?Fs:globalThis.litElementVersions=[]).push("4.1.1");/**
35
35
  * @license
36
36
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
37
37
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
38
- */const Lr=s=>class extends s{static get properties(){return {_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return [...super.observedAttributes,"theme"]}attributeChangedCallback(e,i,o){super.attributeChangedCallback(e,i,o),e==="theme"&&this._set_theme(o);}};/**
38
+ */const Vr=s=>class extends s{static get properties(){return {_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return [...super.observedAttributes,"theme"]}attributeChangedCallback(e,i,o){super.attributeChangedCallback(e,i,o),e==="theme"&&this._set_theme(o);}};/**
39
39
  * @license
40
40
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
41
41
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
42
- */const $s=[],Lt=new Set,di=new Set;function Us(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Vr(s){return Us(customElements.get(s))}function Br(s=[]){return [s].flat(1/0).filter(t=>t instanceof ai?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function qs(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Ys(s){return s.map(t=>t.cssText).join(`
43
- `)}const Ze="vaadin-themable-mixin-style";function Rr(s,t){const e=document.createElement("style");e.id=Ze,e.textContent=Ys(s),t.content.appendChild(e);}function Hr(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ie)[...s.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),Fs(s.shadowRoot,t.elementStyles);else {const e=s.shadowRoot.getElementById(Ze),i=t.prototype._template;e.textContent=i.content.getElementById(Ze).textContent;}}function $r(s){Lt.forEach(t=>{const e=t.deref();e instanceof s?Hr(e):e||Lt.delete(t);});}function js(s){if(s.prototype instanceof ie)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(Ze).textContent=Ys(s.getStylesForThis());}di.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&js(e);});}function Ur(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function m(s,t,e={}){t=Br(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):$s.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&di.forEach(i=>{if(qs(s,i)&&Vr(i)){const o=customElements.get(i);Ur(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!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".`),js(o),$r(o);}});}function Vt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():$s}function qr(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function Ws(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=Vt().find(o=>o.moduleId===e);i?t.push(...Ws(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function Yr(s){const t=`${s}-default-theme`,e=Vt().filter(i=>i.moduleId!==t&&qs(i.themeFor,s)).map(i=>mt(me({},i),{styles:[...Ws(i),...i.styles],includePriority:qr(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:Vt().filter(i=>i.moduleId===t)}const I=s=>class extends Lr(s){constructor(){super(),Lt.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&di.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Us(this)||Rr(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...Yr(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
42
+ */const Us=[],Lt=new Set,di=new Set;function qs(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Br(s){return qs(customElements.get(s))}function Rr(s=[]){return [s].flat(1/0).filter(t=>t instanceof ai?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Ys(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function js(s){return s.map(t=>t.cssText).join(`
43
+ `)}const Ze="vaadin-themable-mixin-style";function Hr(s,t){const e=document.createElement("style");e.id=Ze,e.textContent=js(s),t.content.appendChild(e);}function $r(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ie)[...s.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),Ls(s.shadowRoot,t.elementStyles);else {const e=s.shadowRoot.getElementById(Ze),i=t.prototype._template;e.textContent=i.content.getElementById(Ze).textContent;}}function Ur(s){Lt.forEach(t=>{const e=t.deref();e instanceof s?$r(e):e||Lt.delete(t);});}function Ws(s){if(s.prototype instanceof ie)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(Ze).textContent=js(s.getStylesForThis());}di.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Ws(e);});}function qr(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function m(s,t,e={}){t=Rr(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):Us.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&di.forEach(i=>{if(Ys(s,i)&&Br(i)){const o=customElements.get(i);qr(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!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".`),Ws(o),Ur(o);}});}function Vt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Us}function Yr(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function Gs(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=Vt().find(o=>o.moduleId===e);i?t.push(...Gs(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function jr(s){const t=`${s}-default-theme`,e=Vt().filter(i=>i.moduleId!==t&&Ys(i.themeFor,s)).map(i=>mt(me({},i),{styles:[...Gs(i),...i.styles],includePriority:Yr(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:Vt().filter(i=>i.moduleId===t)}const I=s=>class extends Vr(s){constructor(){super(),Lt.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&di.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||qs(this)||Hr(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...jr(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
44
44
  * @license
45
45
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
46
46
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
47
- */const jr=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
48
- `).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},he=(s,...t)=>{jr(`lumo-${s}`,t);};/**
47
+ */const Wr=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
48
+ `).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},he=(s,...t)=>{Wr(`lumo-${s}`,t);};/**
49
49
  * @license
50
50
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
51
51
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
52
- */const Wr=_`
52
+ */const Gr=_`
53
53
  :host {
54
54
  /* Base (background) */
55
55
  --lumo-base-color: #fff;
@@ -134,7 +134,7 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
134
134
  --lumo-disabled-text-color: GrayText;
135
135
  }
136
136
  }
137
- `;he("color-props",Wr);const Gr=_`
137
+ `;he("color-props",Gr);const Kr=_`
138
138
  [theme~='dark'] {
139
139
  /* Base (background) */
140
140
  --lumo-base-color: hsl(214, 35%, 21%);
@@ -252,11 +252,11 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
252
252
  pre code {
253
253
  background: transparent;
254
254
  }
255
- `;m("",Gr,{moduleId:"lumo-color"});/**
255
+ `;m("",Kr,{moduleId:"lumo-color"});/**
256
256
  * @license
257
257
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
258
258
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
259
- */const Kr=_`
259
+ */const Xr=_`
260
260
  @font-face {
261
261
  font-family: 'lumo-icons';
262
262
  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==)
@@ -309,11 +309,11 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
309
309
  --lumo-icons-upload: '\\ea29';
310
310
  --lumo-icons-user: '\\ea2a';
311
311
  }
312
- `;he("font-icons",Kr);/**
312
+ `;he("font-icons",Xr);/**
313
313
  * @license
314
314
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
315
315
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
316
- */const Xr=_`
316
+ */const Jr=_`
317
317
  :host {
318
318
  --lumo-size-xs: 1.625rem;
319
319
  --lumo-size-s: 1.875rem;
@@ -328,11 +328,11 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
328
328
  /* For backwards compatibility */
329
329
  --lumo-icon-size: var(--lumo-icon-size-m);
330
330
  }
331
- `;he("sizing-props",Xr);/**
331
+ `;he("sizing-props",Jr);/**
332
332
  * @license
333
333
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
334
334
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
335
- */const Jr=_`
335
+ */const Qr=_`
336
336
  :host {
337
337
  /* Square */
338
338
  --lumo-space-xs: 0.25rem;
@@ -355,11 +355,11 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
355
355
  --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
356
356
  --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
357
357
  }
358
- `;he("spacing-props",Jr);/**
358
+ `;he("spacing-props",Qr);/**
359
359
  * @license
360
360
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
361
361
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
362
- */const Qr=_`
362
+ */const Zr=_`
363
363
  :host {
364
364
  /* Border radius */
365
365
  --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
@@ -459,11 +459,11 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
459
459
  --vaadin-input-field-value-font-size: var(--lumo-font-size-m);
460
460
  --vaadin-input-field-value-font-weight: 500;
461
461
  }
462
- `;he("style-props",Qr);/**
462
+ `;he("style-props",Zr);/**
463
463
  * @license
464
464
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
465
465
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
466
- */const Zr=_`
466
+ */const en=_`
467
467
  :host {
468
468
  /* prettier-ignore */
469
469
  --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
@@ -483,7 +483,7 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
483
483
  --lumo-line-height-s: 1.375;
484
484
  --lumo-line-height-m: 1.625;
485
485
  }
486
- `,en=_`
486
+ `,tn=_`
487
487
  body,
488
488
  :host {
489
489
  font-family: var(--lumo-font-family);
@@ -575,7 +575,7 @@ var _r=Object.defineProperty,fr=Object.defineProperties;var mr=Object.getOwnProp
575
575
  border-left: none;
576
576
  border-right: 2px solid var(--lumo-contrast-30pct);
577
577
  }
578
- `;m("",en,{moduleId:"lumo-typography"});he("typography-props",Zr);m("vaadin-checkbox",_`
578
+ `;m("",tn,{moduleId:"lumo-typography"});he("typography-props",en);m("vaadin-checkbox",_`
579
579
  :host {
580
580
  color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
581
581
  font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
@@ -895,7 +895,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
895
895
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
896
896
  Code distributed by Google as part of the polymer project is also
897
897
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
898
- */let tn=/(url\()([^)]*)(\))/g,sn=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,qe,D;function ke(s,t){if(s&&sn.test(s)||s==="//")return s;if(qe===void 0){qe=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",qe=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),qe)try{return new URL(s,t).href}catch(e){return s}return D||(D=document.implementation.createHTMLDocument("temp"),D.base=D.createElement("base"),D.head.appendChild(D.base),D.anchor=D.createElement("a"),D.body.appendChild(D.anchor)),D.base.href=t,D.anchor.href=s,D.anchor.href||s}function hi(s,t){return s.replace(tn,function(e,i,o,r){return i+"'"+ke(o.replace(/["']/g,""),t)+"'"+r})}function ci(s){return s.substring(0,s.lastIndexOf("/")+1)}/**
898
+ */let sn=/(url\()([^)]*)(\))/g,on=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,qe,D;function ke(s,t){if(s&&on.test(s)||s==="//")return s;if(qe===void 0){qe=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",qe=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),qe)try{return new URL(s,t).href}catch(e){return s}return D||(D=document.implementation.createHTMLDocument("temp"),D.base=D.createElement("base"),D.head.appendChild(D.base),D.anchor=D.createElement("a"),D.body.appendChild(D.anchor)),D.base.href=t,D.anchor.href=s,D.anchor.href||s}function hi(s,t){return s.replace(sn,function(e,i,o,r){return i+"'"+ke(o.replace(/["']/g,""),t)+"'"+r})}function ci(s){return s.substring(0,s.lastIndexOf("/")+1)}/**
899
899
  @license
900
900
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
901
901
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -903,7 +903,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
903
903
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
904
904
  Code distributed by Google as part of the polymer project is also
905
905
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
906
- */const Gs=!window.ShadyDOM||!window.ShadyDOM.inUse;const on=Gs&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const s=new CSSStyleSheet;s.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[s],t.shadowRoot.adoptedStyleSheets[0]===s}catch(s){return !1}})();let rn=window.Polymer&&window.Polymer.rootPath||ci(document.baseURI||window.location.href),et=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let tt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,nn=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Ks=window.Polymer&&window.Polymer.legacyOptimizations||!1,Xs=window.Polymer&&window.Polymer.legacyWarnings||!1,an=window.Polymer&&window.Polymer.syncInitialRender||!1,Bt=window.Polymer&&window.Polymer.legacyUndefined||!1,ln=window.Polymer&&window.Polymer.orderedComputed||!1,Xi=window.Polymer&&window.Polymer.removeNestedTemplates||!1,dn=window.Polymer&&window.Polymer.fastDomIf||!1,Ji=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let hn=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
906
+ */const Ks=!window.ShadyDOM||!window.ShadyDOM.inUse;const rn=Ks&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const s=new CSSStyleSheet;s.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[s],t.shadowRoot.adoptedStyleSheets[0]===s}catch(s){return !1}})();let nn=window.Polymer&&window.Polymer.rootPath||ci(document.baseURI||window.location.href),et=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let tt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,an=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Xs=window.Polymer&&window.Polymer.legacyOptimizations||!1,Js=window.Polymer&&window.Polymer.legacyWarnings||!1,ln=window.Polymer&&window.Polymer.syncInitialRender||!1,Bt=window.Polymer&&window.Polymer.legacyUndefined||!1,dn=window.Polymer&&window.Polymer.orderedComputed||!1,Ji=window.Polymer&&window.Polymer.removeNestedTemplates||!1,hn=window.Polymer&&window.Polymer.fastDomIf||!1,Qi=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let cn=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
907
907
  @license
908
908
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
909
909
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -911,7 +911,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
911
911
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
912
912
  Code distributed by Google as part of the polymer project is also
913
913
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
914
- */let cn=0;const v=function(s){let t=s.__mixinApplications;t||(t=new WeakMap,s.__mixinApplications=t);let e=cn++;function i(o){let r=o.__mixinSet;if(r&&r[e])return o;let n=t,a=n.get(o);if(!a){a=s(o),n.set(o,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
914
+ */let un=0;const v=function(s){let t=s.__mixinApplications;t||(t=new WeakMap,s.__mixinApplications=t);let e=un++;function i(o){let r=o.__mixinSet;if(r&&r[e])return o;let n=t,a=n.get(o);if(!a){a=s(o),n.set(o,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
915
915
  @license
916
916
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
917
917
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -919,7 +919,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
919
919
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
920
920
  Code distributed by Google as part of the polymer project is also
921
921
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
922
- */let ui={},Js={};function Qi(s,t){ui[s]=Js[s.toLowerCase()]=t;}function Zi(s){return ui[s]||Js[s.toLowerCase()]}function un(s){s.querySelector("style")&&console.warn("dom-module %s has style outside template",s.id);}class De extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=Zi(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=ke(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=ci(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(tt&&Zi(t)!==void 0)throw Qi(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Qi(t,this),un(this);}}}De.prototype.modules=ui;customElements.define("dom-module",De);/**
922
+ */let ui={},Qs={};function Zi(s,t){ui[s]=Qs[s.toLowerCase()]=t;}function es(s){return ui[s]||Qs[s.toLowerCase()]}function pn(s){s.querySelector("style")&&console.warn("dom-module %s has style outside template",s.id);}class De extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=es(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=ke(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=ci(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(tt&&es(t)!==void 0)throw Zi(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Zi(t,this),pn(this);}}}De.prototype.modules=ui;customElements.define("dom-module",De);/**
923
923
  @license
924
924
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
925
925
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -927,7 +927,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
927
927
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
928
928
  Code distributed by Google as part of the polymer project is also
929
929
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
930
- */const pn="link[rel=import][type~=css]",_n="include",es="shady-unscoped";function Qs(s){return De.import(s)}function ts(s){let t=s.body?s.body:s;const e=hi(t.textContent,s.baseURI),i=document.createElement("style");return i.textContent=e,i}function fn(s){const t=s.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...mn(t[i]));return e}function mn(s){const t=Qs(s);if(!t)return console.warn("Could not find style data in module named",s),[];if(t._styles===void 0){const e=[];e.push(...eo(t));const i=t.querySelector("template");i&&e.push(...Zs(i,t.assetpath)),t._styles=e;}return t._styles}function Zs(s,t){if(!s._styles){const e=[],i=s.content.querySelectorAll("style");for(let o=0;o<i.length;o++){let r=i[o],n=r.getAttribute(_n);n&&e.push(...fn(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=hi(r.textContent,t)),e.push(r);}s._styles=e;}return s._styles}function gn(s){let t=Qs(s);return t?eo(t):[]}function eo(s){const t=[],e=s.querySelectorAll(pn);for(let i=0;i<e.length;i++){let o=e[i];if(o.import){const r=o.import,n=o.hasAttribute(es);if(n&&!r._unscopedStyle){const a=ts(r);a.setAttribute(es,""),r._unscopedStyle=a;}else r._style||(r._style=ts(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
930
+ */const _n="link[rel=import][type~=css]",fn="include",ts="shady-unscoped";function Zs(s){return De.import(s)}function is(s){let t=s.body?s.body:s;const e=hi(t.textContent,s.baseURI),i=document.createElement("style");return i.textContent=e,i}function mn(s){const t=s.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...gn(t[i]));return e}function gn(s){const t=Zs(s);if(!t)return console.warn("Could not find style data in module named",s),[];if(t._styles===void 0){const e=[];e.push(...to(t));const i=t.querySelector("template");i&&e.push(...eo(i,t.assetpath)),t._styles=e;}return t._styles}function eo(s,t){if(!s._styles){const e=[],i=s.content.querySelectorAll("style");for(let o=0;o<i.length;o++){let r=i[o],n=r.getAttribute(fn);n&&e.push(...mn(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=hi(r.textContent,t)),e.push(r);}s._styles=e;}return s._styles}function vn(s){let t=Zs(s);return t?to(t):[]}function to(s){const t=[],e=s.querySelectorAll(_n);for(let i=0;i<e.length;i++){let o=e[i];if(o.import){const r=o.import,n=o.hasAttribute(ts);if(n&&!r._unscopedStyle){const a=is(r);a.setAttribute(ts,""),r._unscopedStyle=a;}else r._style||(r._style=is(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
931
931
  @license
932
932
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
933
933
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -943,7 +943,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
943
943
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
944
944
  Code distributed by Google as part of the polymer project is also
945
945
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
946
- */function Rt(s){return s.indexOf(".")>=0}function J(s){let t=s.indexOf(".");return t===-1?s:s.slice(0,t)}function to(s,t){return s.indexOf(t+".")===0}function Oe(s,t){return t.indexOf(s+".")===0}function Me(s,t,e){return t+e.slice(s.length)}function vn(s,t){return s===t||to(s,t)||Oe(s,t)}function we(s){if(Array.isArray(s)){let t=[];for(let e=0;e<s.length;e++){let i=s[e].toString().split(".");for(let o=0;o<i.length;o++)t.push(i[o]);}return t.join(".")}else return s}function io(s){return Array.isArray(s)?we(s).split("."):s.toString().split(".")}function T(s,t,e){let i=s,o=io(t);for(let r=0;r<o.length;r++){if(!i)return;let n=o[r];i=i[n];}return e&&(e.path=o.join(".")),i}function is(s,t,e){let i=s,o=io(t),r=o[o.length-1];if(o.length>1){for(let n=0;n<o.length-1;n++){let a=o[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return o.join(".")}/**
946
+ */function Rt(s){return s.indexOf(".")>=0}function J(s){let t=s.indexOf(".");return t===-1?s:s.slice(0,t)}function io(s,t){return s.indexOf(t+".")===0}function Oe(s,t){return t.indexOf(s+".")===0}function Me(s,t,e){return t+e.slice(s.length)}function bn(s,t){return s===t||io(s,t)||Oe(s,t)}function we(s){if(Array.isArray(s)){let t=[];for(let e=0;e<s.length;e++){let i=s[e].toString().split(".");for(let o=0;o<i.length;o++)t.push(i[o]);}return t.join(".")}else return s}function so(s){return Array.isArray(s)?we(s).split("."):s.toString().split(".")}function T(s,t,e){let i=s,o=so(t);for(let r=0;r<o.length;r++){if(!i)return;let n=o[r];i=i[n];}return e&&(e.path=o.join(".")),i}function ss(s,t,e){let i=s,o=so(t),r=o[o.length-1];if(o.length>1){for(let n=0;n<o.length-1;n++){let a=o[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return o.join(".")}/**
947
947
  @license
948
948
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
949
949
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -951,7 +951,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
951
951
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
952
952
  Code distributed by Google as part of the polymer project is also
953
953
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
954
- */const it={},bn=/-[a-z]/g,yn=/([A-Z])/g;function so(s){return it[s]||(it[s]=s.indexOf("-")<0?s:s.replace(bn,t=>t[1].toUpperCase()))}function dt(s){return it[s]||(it[s]=s.replace(yn,"-$1").toLowerCase())}/**
954
+ */const it={},yn=/-[a-z]/g,xn=/([A-Z])/g;function oo(s){return it[s]||(it[s]=s.indexOf("-")<0?s:s.replace(yn,t=>t[1].toUpperCase()))}function dt(s){return it[s]||(it[s]=s.replace(xn,"-$1").toLowerCase())}/**
955
955
  @license
956
956
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
957
957
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -959,7 +959,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
959
959
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
960
960
  Code distributed by Google as part of the polymer project is also
961
961
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
962
- */let xn=0,oo=0,se=[],wn=0,Ht=!1,ro=document.createTextNode("");new window.MutationObserver(Cn).observe(ro,{characterData:!0});function Cn(){Ht=!1;const s=se.length;for(let t=0;t<s;t++){let e=se[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}se.splice(0,s),oo+=s;}const An={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},no={run(s){return Ht||(Ht=!0,ro.textContent=wn++),se.push(s),xn++},cancel(s){const t=s-oo;if(t>=0){if(!se[t])throw new Error("invalid async handle: "+s);se[t]=null;}}};/**
962
+ */let wn=0,ro=0,se=[],Cn=0,Ht=!1,no=document.createTextNode("");new window.MutationObserver(An).observe(no,{characterData:!0});function An(){Ht=!1;const s=se.length;for(let t=0;t<s;t++){let e=se[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}se.splice(0,s),ro+=s;}const En={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},ao={run(s){return Ht||(Ht=!0,no.textContent=Cn++),se.push(s),wn++},cancel(s){const t=s-ro;if(t>=0){if(!se[t])throw new Error("invalid async handle: "+s);se[t]=null;}}};/**
963
963
  @license
964
964
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
965
965
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -967,7 +967,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
967
967
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
968
968
  Code distributed by Google as part of the polymer project is also
969
969
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
970
- */const En=no,ao=v(s=>{class t extends s{static createProperties(i){const o=this.prototype;for(let r in i)r in o||o._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,o){this._addPropertyToAttributeMap(i),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[i]||(this.__dataHasAccessor[i]=!0,this._definePropertyAccessor(i,o));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let o=this.__dataAttributes[i];return o||(o=this.constructor.attributeNameForProperty(i),this.__dataAttributes[o]=i),o}_definePropertyAccessor(i,o){Object.defineProperty(this,i,{get(){return this.__data[i]},set:o?function(){}:function(r){this._setPendingProperty(i,r,!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 i in this.__dataHasAccessor)this.hasOwnProperty(i)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[i]=this[i],delete this[i]);}_initializeInstanceProperties(i){Object.assign(this,i);}_setProperty(i,o){this._setPendingProperty(i,o)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,o,r){let n=this.__data[i],a=this._shouldPropertyChange(i,o,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=o,this.__dataPending[i]=o),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,En.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 i=this.__data,o=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,o,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,o,r)),this.__dataCounter--;}_shouldPropertiesChange(i,o,r){return !!o}_propertiesChanged(i,o,r){}_shouldPropertyChange(i,o,r){return r!==o&&(r===r||o===o)}attributeChangedCallback(i,o,r,n){o!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,o,r,n);}_attributeToProperty(i,o,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(o,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,o,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,o||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,o,r){const n=this._serializeValue(o);(r==="class"||r==="name"||r==="slot")&&(i=A(i)),n===void 0?i.removeAttribute(r):i.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n);}_serializeValue(i){switch(typeof i){case"boolean":return i?"":void 0;default:return i!=null?i.toString():void 0}}_deserializeValue(i,o){switch(o){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
970
+ */const Pn=ao,lo=v(s=>{class t extends s{static createProperties(i){const o=this.prototype;for(let r in i)r in o||o._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,o){this._addPropertyToAttributeMap(i),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[i]||(this.__dataHasAccessor[i]=!0,this._definePropertyAccessor(i,o));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let o=this.__dataAttributes[i];return o||(o=this.constructor.attributeNameForProperty(i),this.__dataAttributes[o]=i),o}_definePropertyAccessor(i,o){Object.defineProperty(this,i,{get(){return this.__data[i]},set:o?function(){}:function(r){this._setPendingProperty(i,r,!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 i in this.__dataHasAccessor)this.hasOwnProperty(i)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[i]=this[i],delete this[i]);}_initializeInstanceProperties(i){Object.assign(this,i);}_setProperty(i,o){this._setPendingProperty(i,o)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,o,r){let n=this.__data[i],a=this._shouldPropertyChange(i,o,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=o,this.__dataPending[i]=o),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Pn.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 i=this.__data,o=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,o,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,o,r)),this.__dataCounter--;}_shouldPropertiesChange(i,o,r){return !!o}_propertiesChanged(i,o,r){}_shouldPropertyChange(i,o,r){return r!==o&&(r===r||o===o)}attributeChangedCallback(i,o,r,n){o!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,o,r,n);}_attributeToProperty(i,o,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(o,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,o,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,o||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,o,r){const n=this._serializeValue(o);(r==="class"||r==="name"||r==="slot")&&(i=A(i)),n===void 0?i.removeAttribute(r):i.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n);}_serializeValue(i){switch(typeof i){case"boolean":return i?"":void 0;default:return i!=null?i.toString():void 0}}_deserializeValue(i,o){switch(o){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
971
971
  @license
972
972
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
973
973
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -975,7 +975,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
975
975
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
976
976
  Code distributed by Google as part of the polymer project is also
977
977
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
978
- */const lo={};let Ye=HTMLElement.prototype;for(;Ye;){let s=Object.getOwnPropertyNames(Ye);for(let t=0;t<s.length;t++)lo[s[t]]=!0;Ye=Object.getPrototypeOf(Ye);}const Pn=window.trustedTypes?s=>trustedTypes.isHTML(s)||trustedTypes.isScript(s)||trustedTypes.isScriptURL(s):()=>!1;function kn(s,t){if(!lo[t]){let e=s[t];e!==void 0&&(s.__data?s._setPendingProperty(t,e):(s.__dataProto?s.hasOwnProperty(JSCompiler_renameProperty("__dataProto",s))||(s.__dataProto=Object.create(s.__dataProto)):s.__dataProto={},s.__dataProto[t]=e));}}const Sn=v(s=>{const t=ao(s);class e extends t{static createPropertiesForAttributes(){let o=this.observedAttributes;for(let r=0;r<o.length;r++)this.prototype._createPropertyAccessor(so(o[r]));}static attributeNameForProperty(o){return dt(o)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(o){for(let r in o)this._setProperty(r,o[r]);}_ensureAttribute(o,r){const n=this;n.hasAttribute(o)||this._valueToNodeAttribute(n,r,o);}_serializeValue(o){switch(typeof o){case"object":if(o instanceof Date)return o.toString();if(o){if(Pn(o))return o;try{return JSON.stringify(o)}catch(r){return ""}}default:return super._serializeValue(o)}}_deserializeValue(o,r){let n;switch(r){case Object:try{n=JSON.parse(o);}catch(a){n=o;}break;case Array:try{n=JSON.parse(o);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${o}`);}break;case Date:n=isNaN(o)?String(o):Number(o),n=new Date(n);break;default:n=super._deserializeValue(o,r);break}return n}_definePropertyAccessor(o,r){kn(this,o),super._definePropertyAccessor(o,r);}_hasAccessor(o){return this.__dataHasAccessor&&this.__dataHasAccessor[o]}_isPropertyPending(o){return !!(this.__dataPending&&o in this.__dataPending)}}return e});/**
978
+ */const ho={};let Ye=HTMLElement.prototype;for(;Ye;){let s=Object.getOwnPropertyNames(Ye);for(let t=0;t<s.length;t++)ho[s[t]]=!0;Ye=Object.getPrototypeOf(Ye);}const kn=window.trustedTypes?s=>trustedTypes.isHTML(s)||trustedTypes.isScript(s)||trustedTypes.isScriptURL(s):()=>!1;function Sn(s,t){if(!ho[t]){let e=s[t];e!==void 0&&(s.__data?s._setPendingProperty(t,e):(s.__dataProto?s.hasOwnProperty(JSCompiler_renameProperty("__dataProto",s))||(s.__dataProto=Object.create(s.__dataProto)):s.__dataProto={},s.__dataProto[t]=e));}}const Tn=v(s=>{const t=lo(s);class e extends t{static createPropertiesForAttributes(){let o=this.observedAttributes;for(let r=0;r<o.length;r++)this.prototype._createPropertyAccessor(oo(o[r]));}static attributeNameForProperty(o){return dt(o)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(o){for(let r in o)this._setProperty(r,o[r]);}_ensureAttribute(o,r){const n=this;n.hasAttribute(o)||this._valueToNodeAttribute(n,r,o);}_serializeValue(o){switch(typeof o){case"object":if(o instanceof Date)return o.toString();if(o){if(kn(o))return o;try{return JSON.stringify(o)}catch(r){return ""}}default:return super._serializeValue(o)}}_deserializeValue(o,r){let n;switch(r){case Object:try{n=JSON.parse(o);}catch(a){n=o;}break;case Array:try{n=JSON.parse(o);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${o}`);}break;case Date:n=isNaN(o)?String(o):Number(o),n=new Date(n);break;default:n=super._deserializeValue(o,r);break}return n}_definePropertyAccessor(o,r){Sn(this,o),super._definePropertyAccessor(o,r);}_hasAccessor(o){return this.__dataHasAccessor&&this.__dataHasAccessor[o]}_isPropertyPending(o){return !!(this.__dataPending&&o in this.__dataPending)}}return e});/**
979
979
  @license
980
980
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
981
981
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -983,7 +983,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
983
983
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
984
984
  Code distributed by Google as part of the polymer project is also
985
985
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
986
- */const Tn={"dom-if":!0,"dom-repeat":!0};let ss=!1,os=!1;function In(){if(!ss){ss=!0;const s=document.createElement("textarea");s.placeholder="a",os=s.placeholder===s.textContent;}return os}function Dn(s){In()&&s.localName==="textarea"&&s.placeholder&&s.placeholder===s.textContent&&(s.textContent=null);}const On=(()=>{const s=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const o=e.getAttribute(i);if(s&&i.startsWith("on-")){t.setAttribute(i,s.createScript(o,i));return}t.setAttribute(i,o);}})();function Mn(s){let t=s.getAttribute("is");if(t&&Tn[t]){let e=s;for(e.removeAttribute("is"),s=e.ownerDocument.createElement(t),e.parentNode.replaceChild(s,e),s.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];On(s,e,i),e.removeAttribute(i);}}return s}function ho(s,t){let e=t.parentInfo&&ho(s,t.parentInfo);if(e){for(let i=e.firstChild,o=0;i;i=i.nextSibling)if(t.parentIndex===o++)return i}else return s}function zn(s,t,e,i){i.id&&(t[i.id]=e);}function Nn(s,t,e){if(e.events&&e.events.length)for(let i=0,o=e.events,r;i<o.length&&(r=o[i]);i++)s._addMethodEventListenerToNode(t,r.name,r.value,s);}function Fn(s,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function Ln(s,t,e){return s=s._methodHost||s,function(o){s[e]?s[e](o,o.detail):console.warn("listener method `"+e+"` not defined");}}const Vn=v(s=>{class t extends s{static _parseTemplate(i,o){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!o,r.stripWhiteSpace=o&&o.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,o,r){return this._parseTemplateNode(i.content,o,r)}static _parseTemplateNode(i,o,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,o,r)||n:a.localName==="slot"&&(o.hasInsertionPoint=!0),Dn(a),a.firstChild&&this._parseTemplateChildNodes(a,o,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,o,r)||n),n||r.noted}static _parseTemplateChildNodes(i,o,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=Mn(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let h=l;for(;h&&h.nodeType===Node.TEXT_NODE;)n.textContent+=h.textContent,l=h.nextSibling,i.removeChild(h),h=l;if(o.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,o,d)&&(d.infoIndex=o.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,o,r){let n=i,a=this._parseTemplate(n,o);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,o,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,o,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,o,r,n,a){return n.slice(0,3)==="on-"?(i.removeAttribute(n),r.events=r.events||[],r.events.push({name:n.slice(3),value:a}),!0):n==="id"?(r.id=a,!0):!1}static _contentForTemplate(i){let o=i._templateInfo;return o&&o.content||i.content}_stampTemplate(i,o){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),o=o||this.constructor._parseTemplate(i);let r=o.nodeInfoList,n=o.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!o.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,h=r.length,c;d<h&&(c=r[d]);d++){let u=l[d]=ho(a,c);zn(this,a.$,u,c),Fn(this,u,c,o),Nn(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,o,r,n){n=n||i;let a=Ln(n,o,r);return this._addEventListenerToNode(i,o,a),a}_addEventListenerToNode(i,o,r){i.addEventListener(o,r);}_removeEventListenerFromNode(i,o,r){i.removeEventListener(o,r);}}return t});/**
986
+ */const In={"dom-if":!0,"dom-repeat":!0};let os=!1,rs=!1;function Dn(){if(!os){os=!0;const s=document.createElement("textarea");s.placeholder="a",rs=s.placeholder===s.textContent;}return rs}function On(s){Dn()&&s.localName==="textarea"&&s.placeholder&&s.placeholder===s.textContent&&(s.textContent=null);}const Mn=(()=>{const s=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const o=e.getAttribute(i);if(s&&i.startsWith("on-")){t.setAttribute(i,s.createScript(o,i));return}t.setAttribute(i,o);}})();function zn(s){let t=s.getAttribute("is");if(t&&In[t]){let e=s;for(e.removeAttribute("is"),s=e.ownerDocument.createElement(t),e.parentNode.replaceChild(s,e),s.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];Mn(s,e,i),e.removeAttribute(i);}}return s}function co(s,t){let e=t.parentInfo&&co(s,t.parentInfo);if(e){for(let i=e.firstChild,o=0;i;i=i.nextSibling)if(t.parentIndex===o++)return i}else return s}function Nn(s,t,e,i){i.id&&(t[i.id]=e);}function Fn(s,t,e){if(e.events&&e.events.length)for(let i=0,o=e.events,r;i<o.length&&(r=o[i]);i++)s._addMethodEventListenerToNode(t,r.name,r.value,s);}function Ln(s,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function Vn(s,t,e){return s=s._methodHost||s,function(o){s[e]?s[e](o,o.detail):console.warn("listener method `"+e+"` not defined");}}const Bn=v(s=>{class t extends s{static _parseTemplate(i,o){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!o,r.stripWhiteSpace=o&&o.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,o,r){return this._parseTemplateNode(i.content,o,r)}static _parseTemplateNode(i,o,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,o,r)||n:a.localName==="slot"&&(o.hasInsertionPoint=!0),On(a),a.firstChild&&this._parseTemplateChildNodes(a,o,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,o,r)||n),n||r.noted}static _parseTemplateChildNodes(i,o,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=zn(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let h=l;for(;h&&h.nodeType===Node.TEXT_NODE;)n.textContent+=h.textContent,l=h.nextSibling,i.removeChild(h),h=l;if(o.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,o,d)&&(d.infoIndex=o.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,o,r){let n=i,a=this._parseTemplate(n,o);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,o,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,o,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,o,r,n,a){return n.slice(0,3)==="on-"?(i.removeAttribute(n),r.events=r.events||[],r.events.push({name:n.slice(3),value:a}),!0):n==="id"?(r.id=a,!0):!1}static _contentForTemplate(i){let o=i._templateInfo;return o&&o.content||i.content}_stampTemplate(i,o){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),o=o||this.constructor._parseTemplate(i);let r=o.nodeInfoList,n=o.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!o.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,h=r.length,c;d<h&&(c=r[d]);d++){let u=l[d]=co(a,c);Nn(this,a.$,u,c),Ln(this,u,c,o),Fn(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,o,r,n){n=n||i;let a=Vn(n,o,r);return this._addEventListenerToNode(i,o,a),a}_addEventListenerToNode(i,o,r){i.addEventListener(o,r);}_removeEventListenerFromNode(i,o,r){i.removeEventListener(o,r);}}return t});/**
987
987
  * @fileoverview
988
988
  * @suppress {checkPrototypalTypes}
989
989
  * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -993,7 +993,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
993
993
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
994
994
  * Google as part of the polymer project is also subject to an additional IP
995
995
  * rights grant found at http://polymer.github.io/PATENTS.txt
996
- */let ze=0;const Ne=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},co="__computeInfo",Bn=/[A-Z]/;function xt(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Ce(s,t,e,i,o,r){if(t){let n=!1;const a=ze++;for(let l in e){let d=o?J(l):l,h=t[d];if(h)for(let c=0,u=h.length,p;c<u&&(p=h[c]);c++)(!p.info||p.info.lastRun!==a)&&(!o||pi(l,p.trigger))&&(p.info&&(p.info.lastRun=a),p.fn(s,l,e,i,p.info,o,r),n=!0);}return n}return !1}function Rn(s,t,e,i,o,r,n,a){let l=!1,d=n?J(i):i,h=t[d];if(h)for(let c=0,u=h.length,p;c<u&&(p=h[c]);c++)(!p.info||p.info.lastRun!==e)&&(!n||pi(i,p.trigger))&&(p.info&&(p.info.lastRun=e),p.fn(s,i,o,r,p.info,n,a),l=!0);return l}function pi(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&to(e,s))||!!(t.wildcard&&Oe(e,s))}else return !0}function rs(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Hn(s,t,e,i,o){let r=s[g.NOTIFY],n,a=ze++;for(let d in t)t[d]&&(r&&Rn(s,r,a,d,e,i,o)||o&&$n(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function $n(s,t,e){let i=J(t);if(i!==t){let o=dt(i)+"-changed";return uo(s,o,e[t],t),!0}return !1}function uo(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),A(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Un(s,t,e,i,o,r){let a=(r?J(t):t)!=t?t:null,l=a?T(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),uo(s,o.eventName,l,a);}function qn(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Me(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function Yn(s,t,e,i,o){let r=s.__data[t];et&&(r=et(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function jn(s,t,e,i){let o=s[g.COMPUTE];if(o)if(ln){ze++;const r=Gn(s),n=[];for(let l in t)ns(l,o,n,r,i);let a;for(;a=n.shift();)po(s,"",t,e,a)&&ns(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;Ce(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const Wn=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},ns=(s,t,e,i,o)=>{const r=o?J(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==ze&&(!o||pi(s,l.trigger))&&(l.info.lastRun=ze,Wn(l.info,e,i));}};function Gn(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=Kn(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function Kn(s){const t=s[co],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function po(s,t,e,i,o){let r=$t(s,t,e,i,o);if(r===Ne)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function Xn(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Oe(r,t)?(o=Me(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Oe(n,t)&&(o=Me(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function wt(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),ta(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||dt(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,Jn(s,t,a,h,l);}}function Jn(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=fo(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:Qn,info:n,trigger:l});}}}function Qn(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Me(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==Ne&&Zn(s,a,l,d,h);}}function Zn(s,t,e,i,o){if(o=ea(t,o,e,i),et&&(o=et(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function ea(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function ta(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function ia(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];sa(n,d),oa(n,s,d);}n.__dataHost=s;}}function sa(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=A(s)),s[r]=t.literal);}}function oa(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){qn(o,t,e.target,i.source,i.negate);});}}function as(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function $t(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===Ne?Ne:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const ra=[],_o="(?:[a-zA-Z_$][\\w.:$\\-*]*)",na="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",aa="(?:'(?:[^'\\\\]|\\\\.)*')",la='(?:"(?:[^"\\\\]|\\\\.)*")',da="(?:"+aa+"|"+la+")",ls="(?:("+_o+"|"+na+"|"+da+")\\s*)",ha="(?:"+ls+"(?:,\\s*"+ls+")*)",ca="(?:\\(\\s*(?:"+ha+"?)\\)\\s*)",ua="("+_o+"\\s*"+ca+"?)",pa="(\\[\\[|{{)\\s*",_a="(?:]]|}})",fa="(?:(!)\\s*)?",ma=pa+fa+ua+_a,ds=new RegExp(ma,"g");function hs(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function Ct(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:ra};if(t[2].trim()){let o=t[2].replace(/\\,/g,"&comma;").split(",");return ga(o,i)}else return i}return null}function ga(s,t){return t.args=s.map(function(e){let i=fo(e);return i.literal||(t.static=!1),i},this),t}function fo(s){let t=s.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=J(t),e.structured=Rt(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function cs(s,t,e){let i=T(s,e);return i===void 0&&(i=t[e]),i}function mo(s,t,e,i){const o={indexSplices:i};Bt&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),Bt&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function ve(s,t,e,i,o,r){mo(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function va(s){return s[0].toUpperCase()+s.substring(1)}const _i=v(s=>{const t=Vn(Sn(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_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(be.length){let o=be[be.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=xt(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=xt(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||J(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=T(this,o);if(o=is(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return Xn(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=A(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&Rt(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;jn(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Ce(this,this[g.REFLECT],r,n,a),Ce(this,this[g.OBSERVE],r,n,a),l&&Hn(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&Ce(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{Ce(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=we(o),r=we(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=we(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=T(this,o,n);mo(this,a,n.path,r);}get(o,r){return T(r||this,o)}set(o,r,n){n?is(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=T(this,o,n),l=a.length,d=a.push(...r);return r.length&&ve(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=T(this,o,r),a=!!n.length,l=n.pop();return a&&ve(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=T(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&ve(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=T(this,o,r),a=!!n.length,l=n.shift();return a&&ve(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=T(this,o,n),l=a.unshift(...r);return r.length&&ve(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=T(this,o,a),n=a.path;}else Array.isArray(o)?n=we(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+va(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:rs,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:rs,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=Ct(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");as(this,n,g.OBSERVE,$t,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Un,info:{eventName:dt(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:Yn,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=Ct(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=as(this,a,g.COMPUTE,po,o,n);xt(this,co)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:p,value:f,literal:E}=o[d];if(!E)if(p){const S=Oe(c,r),x=cs(a,n,S?r:c);f={path:S?r:c,value:x,base:S?T(a,c):x};}else f=u?cs(a,n,c):a[c];if(Bt&&!this._overrideLegacyUndefined&&f===void 0&&o.length>1)return Ne;l[d]=f;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),be.push(this);let n=super._stampTemplate(o,r);if(be.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,ia(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];A(A(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=hs(l)||" ",wt(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Bn.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=hs(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=so(a)),wt(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Xi&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(dn&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Xi||(n.parentInfo.noted=!0));else {let p="{";for(let f in u){let E=[{mode:p,source:f,dependencies:[f],hostProp:!0}];wt(this,r,n,"property","_host_"+f,E);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=ds.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,p="",f=-1;d=="{"&&(f=c.indexOf("::"))>0&&(p=c.substring(f+2),c=c.substring(0,f),u=!0);let E=Ct(c),S=[];if(E){let{args:x,methodName:b}=E;for(let fe=0;fe<x.length;fe++){let q=x[fe];q.literal||S.push(q);}let V=r.dynamicFns;(V&&V[b]||E.static)&&(S.push(b),E.dynamicFn=!0);}else S.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:E,dependencies:S,event:p}),a=ds.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=$t(o,n,a,l,r.signature):n!=r.source?h=T(o,r.source):d&&Rt(n)?h=T(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),be=[];/**
996
+ */let ze=0;const Ne=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},uo="__computeInfo",Rn=/[A-Z]/;function xt(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Ce(s,t,e,i,o,r){if(t){let n=!1;const a=ze++;for(let l in e){let d=o?J(l):l,h=t[d];if(h)for(let c=0,u=h.length,p;c<u&&(p=h[c]);c++)(!p.info||p.info.lastRun!==a)&&(!o||pi(l,p.trigger))&&(p.info&&(p.info.lastRun=a),p.fn(s,l,e,i,p.info,o,r),n=!0);}return n}return !1}function Hn(s,t,e,i,o,r,n,a){let l=!1,d=n?J(i):i,h=t[d];if(h)for(let c=0,u=h.length,p;c<u&&(p=h[c]);c++)(!p.info||p.info.lastRun!==e)&&(!n||pi(i,p.trigger))&&(p.info&&(p.info.lastRun=e),p.fn(s,i,o,r,p.info,n,a),l=!0);return l}function pi(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&io(e,s))||!!(t.wildcard&&Oe(e,s))}else return !0}function ns(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function $n(s,t,e,i,o){let r=s[g.NOTIFY],n,a=ze++;for(let d in t)t[d]&&(r&&Hn(s,r,a,d,e,i,o)||o&&Un(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Un(s,t,e){let i=J(t);if(i!==t){let o=dt(i)+"-changed";return po(s,o,e[t],t),!0}return !1}function po(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),A(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function qn(s,t,e,i,o,r){let a=(r?J(t):t)!=t?t:null,l=a?T(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),po(s,o.eventName,l,a);}function Yn(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Me(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function jn(s,t,e,i,o){let r=s.__data[t];et&&(r=et(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function Wn(s,t,e,i){let o=s[g.COMPUTE];if(o)if(dn){ze++;const r=Kn(s),n=[];for(let l in t)as(l,o,n,r,i);let a;for(;a=n.shift();)_o(s,"",t,e,a)&&as(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;Ce(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const Gn=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},as=(s,t,e,i,o)=>{const r=o?J(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==ze&&(!o||pi(s,l.trigger))&&(l.info.lastRun=ze,Gn(l.info,e,i));}};function Kn(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=Xn(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function Xn(s){const t=s[uo],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function _o(s,t,e,i,o){let r=$t(s,t,e,i,o);if(r===Ne)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function Jn(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Oe(r,t)?(o=Me(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Oe(n,t)&&(o=Me(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function wt(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),ia(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||dt(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,Qn(s,t,a,h,l);}}function Qn(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=mo(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:Zn,info:n,trigger:l});}}}function Zn(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Me(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==Ne&&ea(s,a,l,d,h);}}function ea(s,t,e,i,o){if(o=ta(t,o,e,i),et&&(o=et(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function ta(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function ia(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function sa(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];oa(n,d),ra(n,s,d);}n.__dataHost=s;}}function oa(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=A(s)),s[r]=t.literal);}}function ra(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){Yn(o,t,e.target,i.source,i.negate);});}}function ls(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function $t(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===Ne?Ne:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const na=[],fo="(?:[a-zA-Z_$][\\w.:$\\-*]*)",aa="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",la="(?:'(?:[^'\\\\]|\\\\.)*')",da='(?:"(?:[^"\\\\]|\\\\.)*")',ha="(?:"+la+"|"+da+")",ds="(?:("+fo+"|"+aa+"|"+ha+")\\s*)",ca="(?:"+ds+"(?:,\\s*"+ds+")*)",ua="(?:\\(\\s*(?:"+ca+"?)\\)\\s*)",pa="("+fo+"\\s*"+ua+"?)",_a="(\\[\\[|{{)\\s*",fa="(?:]]|}})",ma="(?:(!)\\s*)?",ga=_a+ma+pa+fa,hs=new RegExp(ga,"g");function cs(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function Ct(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:na};if(t[2].trim()){let o=t[2].replace(/\\,/g,"&comma;").split(",");return va(o,i)}else return i}return null}function va(s,t){return t.args=s.map(function(e){let i=mo(e);return i.literal||(t.static=!1),i},this),t}function mo(s){let t=s.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=J(t),e.structured=Rt(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function us(s,t,e){let i=T(s,e);return i===void 0&&(i=t[e]),i}function go(s,t,e,i){const o={indexSplices:i};Bt&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),Bt&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function ve(s,t,e,i,o,r){go(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function ba(s){return s[0].toUpperCase()+s.substring(1)}const _i=v(s=>{const t=Bn(Tn(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_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(be.length){let o=be[be.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=xt(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=xt(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||J(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=T(this,o);if(o=ss(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return Jn(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=A(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&Rt(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;Wn(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Ce(this,this[g.REFLECT],r,n,a),Ce(this,this[g.OBSERVE],r,n,a),l&&$n(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&Ce(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{Ce(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=we(o),r=we(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=we(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=T(this,o,n);go(this,a,n.path,r);}get(o,r){return T(r||this,o)}set(o,r,n){n?ss(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=T(this,o,n),l=a.length,d=a.push(...r);return r.length&&ve(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=T(this,o,r),a=!!n.length,l=n.pop();return a&&ve(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=T(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&ve(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=T(this,o,r),a=!!n.length,l=n.shift();return a&&ve(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=T(this,o,n),l=a.unshift(...r);return r.length&&ve(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=T(this,o,a),n=a.path;}else Array.isArray(o)?n=we(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+ba(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:ns,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:ns,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=Ct(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");ls(this,n,g.OBSERVE,$t,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:qn,info:{eventName:dt(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:jn,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=Ct(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=ls(this,a,g.COMPUTE,_o,o,n);xt(this,uo)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:p,value:f,literal:E}=o[d];if(!E)if(p){const S=Oe(c,r),x=us(a,n,S?r:c);f={path:S?r:c,value:x,base:S?T(a,c):x};}else f=u?us(a,n,c):a[c];if(Bt&&!this._overrideLegacyUndefined&&f===void 0&&o.length>1)return Ne;l[d]=f;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),be.push(this);let n=super._stampTemplate(o,r);if(be.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,sa(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];A(A(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=cs(l)||" ",wt(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Rn.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=cs(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=oo(a)),wt(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ji&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(hn&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ji||(n.parentInfo.noted=!0));else {let p="{";for(let f in u){let E=[{mode:p,source:f,dependencies:[f],hostProp:!0}];wt(this,r,n,"property","_host_"+f,E);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=hs.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,p="",f=-1;d=="{"&&(f=c.indexOf("::"))>0&&(p=c.substring(f+2),c=c.substring(0,f),u=!0);let E=Ct(c),S=[];if(E){let{args:x,methodName:b}=E;for(let fe=0;fe<x.length;fe++){let q=x[fe];q.literal||S.push(q);}let V=r.dynamicFns;(V&&V[b]||E.static)&&(S.push(b),E.dynamicFn=!0);}else S.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:E,dependencies:S,event:p}),a=hs.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=$t(o,n,a,l,r.signature):n!=r.source?h=T(o,r.source):d&&Rt(n)?h=T(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),be=[];/**
997
997
  @license
998
998
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
999
999
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -1009,7 +1009,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1009
1009
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1010
1010
  Code distributed by Google as part of the polymer project is also
1011
1011
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1012
- */function ba(s){const t={};for(let e in s){const i=s[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const ya=v(s=>{const t=ao(s);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof o?n:null}function i(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=ba(a));}r.__ownProperties=n;}return r.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const n=this._properties;this.__observedAttributes=n?Object.keys(n).map(a=>this.prototype._addPropertyToAttributeMap(a)):[];}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const n=e(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass();}}static _finalizeClass(){const n=i(this);n&&this.createProperties(n);}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=e(this);this.__properties=Object.assign({},n&&n._properties,i(this));}return this.__properties}static typeForProperty(n){const a=this._properties[n];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties();}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties();}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback();}}return o});/**
1012
+ */function ya(s){const t={};for(let e in s){const i=s[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const xa=v(s=>{const t=lo(s);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof o?n:null}function i(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=ya(a));}r.__ownProperties=n;}return r.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const n=this._properties;this.__observedAttributes=n?Object.keys(n).map(a=>this.prototype._addPropertyToAttributeMap(a)):[];}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const n=e(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass();}}static _finalizeClass(){const n=i(this);n&&this.createProperties(n);}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=e(this);this.__properties=Object.assign({},n&&n._properties,i(this));}return this.__properties}static typeForProperty(n){const a=this._properties[n];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties();}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties();}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback();}}return o});/**
1013
1013
  * @fileoverview
1014
1014
  * @suppress {checkPrototypalTypes}
1015
1015
  * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1019,7 +1019,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1019
1019
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
1020
1020
  * Google as part of the polymer project is also subject to an additional IP
1021
1021
  * rights grant found at http://polymer.github.io/PATENTS.txt
1022
- */const xa="3.5.2",us=window.ShadyCSS&&window.ShadyCSS.cssBuild,wa=v(s=>{const t=ya(_i(s));function e(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let h in d){let c=d[h];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[h]=c);}}return l.__propertyDefaults}function i(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function o(l,d,h,c){h.computed&&(h.readOnly=!0),h.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,h.computed,c)),h.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!h.computed):h.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),h.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):h.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),h.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):h.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),h.observer&&l._createPropertyObserver(d,h.observer,c[h.observer]),l._addPropertyToAttributeMap(d);}function r(l,d,h,c){if(!us){const u=d.content.querySelectorAll("style"),p=Zs(d),f=gn(h),E=d.content.firstElementChild;for(let x=0;x<f.length;x++){let b=f[x];b.textContent=l._processStyleText(b.textContent,c),d.content.insertBefore(b,E);}let S=0;for(let x=0;x<p.length;x++){let b=p[x],V=u[S];V!==b?(b=b.cloneNode(!0),V.parentNode.insertBefore(b,V)):S++,b.textContent=l._processStyleText(b.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),hn&&us&&on){const u=d.content.querySelectorAll("style");if(u){let p="";Array.from(u).forEach(f=>{p+=f.textContent,f.parentNode.removeChild(f);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(p);}}}function n(l){let d=null;if(l&&(!tt||nn)&&(d=De.import(l,"template"),tt&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return xa}static _finalizeClass(){t._finalizeClass.call(this);const d=i(this);d&&this.createObservers(d,this._properties),this._prepareTemplate();}static _prepareTemplate(){let d=this.template;d&&(typeof d=="string"?(console.error("template getter must return HTMLTemplateElement"),d=null):Ks||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)o(this.prototype,h,d[h],d);}static createObservers(d,h){const c=this.prototype;for(let u=0;u<d.length;u++)c._createMethodObserver(d[u],h);}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let d=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;typeof d=="function"&&(d=d()),this._template=d!==void 0?d:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&n(this.is)||Object.getPrototypeOf(this.prototype).constructor.template;}return this._template}static set template(d){this._template=d;}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const d=this.importMeta;if(d)this._importPath=ci(d.url);else {const h=De.import(this.is);this._importPath=h&&h.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=rn,this.importPath=this.constructor.importPath;let d=e(this.constructor);if(d)for(let h in d){let c=d[h];if(this._canApplyPropertyDefault(h)){let u=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(h)?this._setPendingProperty(h,u,!0):this[h]=u;}}}_canApplyPropertyDefault(d){return !this.hasOwnProperty(d)}static _processStyleText(d,h){return hi(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?ke(c):"";r(this,h,d,u),this.prototype._bindTemplate(h);}}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(d){const h=A(this);if(h.attachShadow)return d?(h.shadowRoot||(h.attachShadow({mode:"open",shadyUpgradeFragment:d}),h.shadowRoot.appendChild(d),this.constructor._styleSheet&&(h.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),an&&window.ShadyDOM&&window.ShadyDOM.flushInitial(h.shadowRoot),h.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(d){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,d);}resolveUrl(d,h){return !h&&this.importPath&&(h=ke(this.importPath)),ke(d,h)}static _parseTemplateContent(d,h,c){return h.dynamicFns=h.dynamicFns||this._properties,t._parseTemplateContent.call(this,d,h,c)}static _addTemplatePropertyEffect(d,h,c){return Xs&&!(h in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${h}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,d,h,c)}}return a});/**
1022
+ */const wa="3.5.2",ps=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ca=v(s=>{const t=xa(_i(s));function e(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let h in d){let c=d[h];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[h]=c);}}return l.__propertyDefaults}function i(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function o(l,d,h,c){h.computed&&(h.readOnly=!0),h.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,h.computed,c)),h.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!h.computed):h.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),h.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):h.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),h.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):h.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),h.observer&&l._createPropertyObserver(d,h.observer,c[h.observer]),l._addPropertyToAttributeMap(d);}function r(l,d,h,c){if(!ps){const u=d.content.querySelectorAll("style"),p=eo(d),f=vn(h),E=d.content.firstElementChild;for(let x=0;x<f.length;x++){let b=f[x];b.textContent=l._processStyleText(b.textContent,c),d.content.insertBefore(b,E);}let S=0;for(let x=0;x<p.length;x++){let b=p[x],V=u[S];V!==b?(b=b.cloneNode(!0),V.parentNode.insertBefore(b,V)):S++,b.textContent=l._processStyleText(b.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),cn&&ps&&rn){const u=d.content.querySelectorAll("style");if(u){let p="";Array.from(u).forEach(f=>{p+=f.textContent,f.parentNode.removeChild(f);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(p);}}}function n(l){let d=null;if(l&&(!tt||an)&&(d=De.import(l,"template"),tt&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return wa}static _finalizeClass(){t._finalizeClass.call(this);const d=i(this);d&&this.createObservers(d,this._properties),this._prepareTemplate();}static _prepareTemplate(){let d=this.template;d&&(typeof d=="string"?(console.error("template getter must return HTMLTemplateElement"),d=null):Xs||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)o(this.prototype,h,d[h],d);}static createObservers(d,h){const c=this.prototype;for(let u=0;u<d.length;u++)c._createMethodObserver(d[u],h);}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let d=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;typeof d=="function"&&(d=d()),this._template=d!==void 0?d:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&n(this.is)||Object.getPrototypeOf(this.prototype).constructor.template;}return this._template}static set template(d){this._template=d;}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const d=this.importMeta;if(d)this._importPath=ci(d.url);else {const h=De.import(this.is);this._importPath=h&&h.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=nn,this.importPath=this.constructor.importPath;let d=e(this.constructor);if(d)for(let h in d){let c=d[h];if(this._canApplyPropertyDefault(h)){let u=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(h)?this._setPendingProperty(h,u,!0):this[h]=u;}}}_canApplyPropertyDefault(d){return !this.hasOwnProperty(d)}static _processStyleText(d,h){return hi(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?ke(c):"";r(this,h,d,u),this.prototype._bindTemplate(h);}}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(d){const h=A(this);if(h.attachShadow)return d?(h.shadowRoot||(h.attachShadow({mode:"open",shadyUpgradeFragment:d}),h.shadowRoot.appendChild(d),this.constructor._styleSheet&&(h.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),ln&&window.ShadyDOM&&window.ShadyDOM.flushInitial(h.shadowRoot),h.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(d){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,d);}resolveUrl(d,h){return !h&&this.importPath&&(h=ke(this.importPath)),ke(d,h)}static _parseTemplateContent(d,h,c){return h.dynamicFns=h.dynamicFns||this._properties,t._parseTemplateContent.call(this,d,h,c)}static _addTemplatePropertyEffect(d,h,c){return Js&&!(h in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${h}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,d,h,c)}}return a});/**
1023
1023
  @license
1024
1024
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1025
1025
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -1027,7 +1027,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1027
1027
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1028
1028
  Code distributed by Google as part of the polymer project is also
1029
1029
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1030
- */const ps=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class go{constructor(t,e){bo(t,e);const i=e.reduce((o,r,n)=>o+vo(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function vo(s){if(s instanceof go)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function Ca(s){if(s instanceof HTMLTemplateElement)return s.innerHTML;if(s instanceof go)return vo(s);throw new Error(`non-template value passed to Polymer's html function: ${s}`)}const P=function(t,...e){bo(t,e);const i=document.createElement("template");let o=e.reduce((r,n,a)=>r+Ca(n)+t[a+1],t[0]);return ps&&(o=ps.createHTML(o)),i.innerHTML=o,i},bo=(s,t)=>{if(!Array.isArray(s)||!Array.isArray(s.raw)||t.length!==s.length-1)throw new TypeError("Invalid call to the html template tag")};/**
1030
+ */const _s=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class vo{constructor(t,e){yo(t,e);const i=e.reduce((o,r,n)=>o+bo(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function bo(s){if(s instanceof vo)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function Aa(s){if(s instanceof HTMLTemplateElement)return s.innerHTML;if(s instanceof vo)return bo(s);throw new Error(`non-template value passed to Polymer's html function: ${s}`)}const P=function(t,...e){yo(t,e);const i=document.createElement("template");let o=e.reduce((r,n,a)=>r+Aa(n)+t[a+1],t[0]);return _s&&(o=_s.createHTML(o)),i.innerHTML=o,i},yo=(s,t)=>{if(!Array.isArray(s)||!Array.isArray(s.raw)||t.length!==s.length-1)throw new TypeError("Invalid call to the html template tag")};/**
1031
1031
  @license
1032
1032
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1033
1033
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -1035,7 +1035,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1035
1035
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1036
1036
  Code distributed by Google as part of the polymer project is also
1037
1037
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1038
- */const k=wa(HTMLElement),Aa=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Je=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Ea(){function s(){return !0}return yo(s)}function Pa(){try{return ka()?!0:Sa()?Je?!Ta():!Ea():!1}catch(s){return !1}}function ka(){return localStorage.getItem("vaadin.developmentmode.force")}function Sa(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Ta(){return !!(Je&&Object.keys(Je).map(t=>Je[t]).filter(t=>t.productionMode).length>0)}function yo(s,t){if(typeof s!="function")return;const e=Aa.exec(s.toString());if(e)try{s=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return s(t)}window.Vaadin=window.Vaadin||{};const _s=function(s,t){if(window.Vaadin.developmentMode)return yo(s,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Pa());function Ia(){/*! vaadin-dev-mode:start
1038
+ */const k=Ca(HTMLElement),Ea=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Je=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Pa(){function s(){return !0}return xo(s)}function ka(){try{return Sa()?!0:Ta()?Je?!Ia():!Pa():!1}catch(s){return !1}}function Sa(){return localStorage.getItem("vaadin.developmentmode.force")}function Ta(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Ia(){return !!(Je&&Object.keys(Je).map(t=>Je[t]).filter(t=>t.productionMode).length>0)}function xo(s,t){if(typeof s!="function")return;const e=Ea.exec(s.toString());if(e)try{s=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return s(t)}window.Vaadin=window.Vaadin||{};const fs=function(s,t){if(window.Vaadin.developmentMode)return xo(s,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=ka());function Da(){/*! vaadin-dev-mode:start
1039
1039
  (function () {
1040
1040
  'use strict';
1041
1041
 
@@ -1513,7 +1513,7 @@ try {
1513
1513
 
1514
1514
  }());
1515
1515
 
1516
- vaadin-dev-mode:end **/}const Da=function(){if(typeof _s=="function")return _s(Ia)};/**
1516
+ vaadin-dev-mode:end **/}const Oa=function(){if(typeof fs=="function")return fs(Da)};/**
1517
1517
  * @license
1518
1518
  * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1519
1519
  * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -1521,7 +1521,7 @@ try {
1521
1521
  * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1522
1522
  * Code distributed by Google as part of the polymer project is also
1523
1523
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1524
- */let fs=0,xo=0;const oe=[];let Ut=!1;function Oa(){Ut=!1;const s=oe.length;for(let t=0;t<s;t++){const e=oe[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}oe.splice(0,s),xo+=s;}const G={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},Fe={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},wo={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},st={run(s){Ut||(Ut=!0,queueMicrotask(()=>Oa())),oe.push(s);const t=fs;return fs+=1,t},cancel(s){const t=s-xo;if(t>=0){if(!oe[t])throw new Error(`invalid async handle: ${s}`);oe[t]=null;}}};/**
1524
+ */let ms=0,wo=0;const oe=[];let Ut=!1;function Ma(){Ut=!1;const s=oe.length;for(let t=0;t<s;t++){const e=oe[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}oe.splice(0,s),wo+=s;}const G={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},Fe={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},Co={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},st={run(s){Ut||(Ut=!0,queueMicrotask(()=>Ma())),oe.push(s);const t=ms;return ms+=1,t},cancel(s){const t=s-wo;if(t>=0){if(!oe[t])throw new Error(`invalid async handle: ${s}`);oe[t]=null;}}};/**
1525
1525
  @license
1526
1526
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1527
1527
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -1529,31 +1529,31 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1529
1529
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1530
1530
  Code distributed by Google as part of the polymer project is also
1531
1531
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1532
- */const Le=new Set;let O=class qt{static debounce(t,e,i){return t instanceof qt?t._cancelAsync():t=new qt,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,Le.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Le.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}};function Co(s){Le.add(s);}function Ma(){const s=!!Le.size;return Le.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const Ae=()=>{let s;do s=Ma();while(s)};/**
1532
+ */const Le=new Set;let O=class qt{static debounce(t,e,i){return t instanceof qt?t._cancelAsync():t=new qt,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null;}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run(()=>{this._timer=null,Le.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Le.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}};function Ao(s){Le.add(s);}function za(){const s=!!Le.size;return Le.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const Ae=()=>{let s;do s=za();while(s)};/**
1533
1533
  * @license
1534
1534
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1535
1535
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1536
- */const N=[];function Yt(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function jt(){return document.documentElement.getAttribute("dir")}function za(){const s=jt();N.forEach(t=>{Yt(t,s);});}const Na=new MutationObserver(za);Na.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Q=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),Yt(this,jt(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=jt(),n=o===r&&N.indexOf(this)===-1,a=!o&&i&&N.indexOf(this)===-1;n||a?(this.__subscribe(),Yt(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=N.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){N.includes(this)||N.push(this);}__unsubscribe(){N.includes(this)&&N.splice(N.indexOf(this),1);}};/**
1536
+ */const N=[];function Yt(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function jt(){return document.documentElement.getAttribute("dir")}function Na(){const s=jt();N.forEach(t=>{Yt(t,s);});}const Fa=new MutationObserver(Na);Fa.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Q=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),Yt(this,jt(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=jt(),n=o===r&&N.indexOf(this)===-1,a=!o&&i&&N.indexOf(this)===-1;n||a?(this.__subscribe(),Yt(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=N.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){N.includes(this)||N.push(this);}__unsubscribe(){N.includes(this)&&N.splice(N.indexOf(this),1);}};/**
1537
1537
  * @license
1538
1538
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1539
1539
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1540
- */window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Da();};let At;const ms=new Set,ce=s=>class extends Q(s){static finalize(){super.finalize();const{is:e}=this;e&&!ms.has(e)&&(window.Vaadin.registrations.push(this),ms.add(e),window.Vaadin.developmentModeCallback&&(At=O.debounce(At,wo,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),Co(At)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
1540
+ */window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Oa();};let At;const gs=new Set,ce=s=>class extends Q(s){static finalize(){super.finalize();const{is:e}=this;e&&!gs.has(e)&&(window.Vaadin.registrations.push(this),gs.add(e),window.Vaadin.developmentModeCallback&&(At=O.debounce(At,Co,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),Ao(At)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
1541
1541
  * @license
1542
1542
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1543
1543
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1544
- */function Fa(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function fi(s){return s?new Set(s.split(" ")):new Set}function ht(s){return s?[...s].join(" "):""}function Ao(s,t,e){const i=fi(s.getAttribute(t));i.add(e),s.setAttribute(t,ht(i));}function La(s,t,e){const i=fi(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,ht(i));}function Va(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
1544
+ */function La(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function fi(s){return s?new Set(s.split(" ")):new Set}function ht(s){return s?[...s].join(" "):""}function Eo(s,t,e){const i=fi(s.getAttribute(t));i.add(e),s.setAttribute(t,ht(i));}function Va(s,t,e){const i=fi(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,ht(i));}function Ba(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
1545
1545
  * @license
1546
1546
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
1547
1547
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1548
- */class Eo{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=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}}/**
1548
+ */class Po{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=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}}/**
1549
1549
  * @license
1550
1550
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1551
1551
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1552
- */let Ba=0;function mi(){return Ba++}/**
1552
+ */let Ra=0;function mi(){return Ra++}/**
1553
1553
  * @license
1554
1554
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1555
1555
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1556
- */class R extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${mi()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||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(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}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=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new Eo(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!Va(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}}/**
1556
+ */class R extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${mi()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||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(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}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=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new Po(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!Ba(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}}/**
1557
1557
  * @license
1558
1558
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1559
1559
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1565,7 +1565,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1565
1565
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1566
1566
  Code distributed by Google as part of the polymer project is also
1567
1567
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1568
- */const Ra=s=>s,Po=typeof document.head.style.touchAction=="string",Wt="__polymerGestures",Et="__polymerGesturesHandled",Gt="__polymerGesturesTouchAction",gs=25,vs=5,Ha=2,$a=["mousedown","mousemove","mouseup","click"],Ua=[0,1,4,2],qa=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(s){return !1}}();function gi(s){return $a.indexOf(s)>-1}(function(){try{const s=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s);}catch(s){}})();function ja(s){}const Wa=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Ga={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function K(s){const t=s.type;if(!gi(t))return !1;if(t==="mousemove"){let i=s.buttons===void 0?1:s.buttons;return s instanceof window.MouseEvent&&!qa&&(i=Ua[s.which]||0),!!(i&1)}return (s.button===void 0?0:s.button)===0}function Ka(s){if(s.type==="click"){if(s.detail===0)return !0;const t=$(s);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=s.pageX,o=s.pageY;return !(i>=e.left&&i<=e.right&&o>=e.top&&o<=e.bottom)}return !1}const F={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Xa(s){let t="auto";const e=So(s);for(let i=0,o;i<e.length;i++)if(o=e[i],o[Gt]){t=o[Gt];break}return t}function ko(s,t,e){s.movefn=t,s.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function re(s){document.removeEventListener("mousemove",s.movefn),document.removeEventListener("mouseup",s.upfn),s.movefn=null,s.upfn=null;}const So=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:s=>s.composedPath&&s.composedPath()||[],vi={},W=[];function Ja(s,t){let e=document.elementFromPoint(s,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const o=i;if(i=i.shadowRoot.elementFromPoint(s,t),o===i)break;i&&(e=i);}return e}function $(s){const t=So(s);return t.length>0?t[0]:s.target}function Qa(s){const t=s.type,i=s.currentTarget[Wt];if(!i)return;const o=i[t];if(!o)return;if(!s[Et]&&(s[Et]={},t.startsWith("touch"))){const n=s.changedTouches[0];if(t==="touchstart"&&s.touches.length===1&&(F.touch.id=n.identifier),F.touch.id!==n.identifier)return;Po||(t==="touchstart"||t==="touchmove")&&Za(s);}const r=s[Et];if(!r.skip){for(let n=0,a;n<W.length;n++)a=W[n],o[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(s.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<W.length;n++)a=W[n],o[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](s));}}function Za(s){const t=s.changedTouches[0],e=s.type;if(e==="touchstart")F.touch.x=t.clientX,F.touch.y=t.clientY,F.touch.scrollDecided=!1;else if(e==="touchmove"){if(F.touch.scrollDecided)return;F.touch.scrollDecided=!0;const i=Xa(s);let o=!1;const r=Math.abs(F.touch.x-t.clientX),n=Math.abs(F.touch.y-t.clientY);s.cancelable&&(i==="none"?o=!0:i==="pan-x"?o=n>r:i==="pan-y"&&(o=r>n)),o?s.preventDefault():ot("track");}}function z(s,t,e){return vi[t]?(el(s,t,e),!0):!1}function el(s,t,e){const i=vi[t],o=i.deps,r=i.name;let n=s[Wt];n||(s[Wt]=n={});for(let a=0,l,d;a<o.length;a++)l=o[a],!(Wa&&gi(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&s.addEventListener(l,Qa,ja()),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);s.addEventListener(t,e),i.touchAction&&To(s,i.touchAction);}function bi(s){W.push(s),s.emits.forEach(t=>{vi[t]=s;});}function tl(s){for(let t=0,e;t<W.length;t++){e=W[t];for(let i=0,o;i<e.emits.length;i++)if(o=e.emits[i],o===s)return e}return null}function To(s,t){Po&&s instanceof HTMLElement&&st.run(()=>{s.style.touchAction=t;}),s[Gt]=t;}function yi(s,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,Ra(s).dispatchEvent(i),i.defaultPrevented){const o=e.preventer||e.sourceEvent;o&&o.preventDefault&&o.preventDefault();}}function ot(s){const t=tl(s);t.info&&(t.info.prevent=!0);}bi({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){re(this.info);},mousedown(s){if(!K(s))return;const t=$(s),e=this,i=r=>{K(r)||(ye("up",t,r),re(e.info));},o=r=>{K(r)&&ye("up",t,r),re(e.info);};ko(this.info,i,o),ye("down",t,s);},touchstart(s){ye("down",$(s),s.changedTouches[0],s);},touchend(s){ye("up",$(s),s.changedTouches[0],s);}});function ye(s,t,e,i){t&&yi(t,s,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(o){return ot(o)}});}bi({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(s){this.moves.length>Ha&&this.moves.shift(),this.moves.push(s);},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,re(this.info);},mousedown(s){if(!K(s))return;const t=$(s),e=this,i=r=>{const n=r.clientX,a=r.clientY;bs(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&ot("tap"),e.info.addMove({x:n,y:a}),K(r)||(e.info.state="end",re(e.info)),t&&Pt(e.info,t,r),e.info.started=!0);},o=r=>{e.info.started&&i(r),re(e.info);};ko(this.info,i,o),this.info.x=s.clientX,this.info.y=s.clientY;},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(s){const t=$(s),e=s.changedTouches[0],i=e.clientX,o=e.clientY;bs(this.info,i,o)&&(this.info.state==="start"&&ot("tap"),this.info.addMove({x:i,y:o}),Pt(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(s){const t=$(s),e=s.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),Pt(this.info,t,e));}});function bs(s,t,e){if(s.prevent)return !1;if(s.started)return !0;const i=Math.abs(s.x-t),o=Math.abs(s.y-e);return i>=vs||o>=vs}function Pt(s,t,e){if(!t)return;const i=s.moves[s.moves.length-2],o=s.moves[s.moves.length-1],r=o.x-s.x,n=o.y-s.y;let a,l=0;i&&(a=o.x-i.x,l=o.y-i.y),yi(t,"track",{state:s.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return Ja(e.clientX,e.clientY)}});}bi({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(s){K(s)&&(this.info.x=s.clientX,this.info.y=s.clientY);},click(s){K(s)&&ys(this.info,s);},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(s){ys(this.info,s.changedTouches[0],s);}});function ys(s,t,e){const i=Math.abs(t.clientX-s.x),o=Math.abs(t.clientY-s.y),r=$(e||t);!r||Ga[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(o)||i<=gs&&o<=gs||Ka(t))&&(s.prevent||yi(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
1568
+ */const Ha=!1,$a=s=>s,gi=typeof document.head.style.touchAction=="string",Wt="__polymerGestures",Et="__polymerGesturesHandled",Gt="__polymerGesturesTouchAction",vs=25,bs=5,Ua=2,qa=["mousedown","mousemove","mouseup","click"],Ya=[0,1,4,2],ja=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(s){return !1}}();function vi(s){return qa.indexOf(s)>-1}let ko=!1;(function(){try{const s=Object.defineProperty({},"passive",{get(){ko=!0;}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s);}catch(s){}})();function Wa(s){if(!(vi(s)||s==="touchend")&&gi&&ko&&Ha)return {passive:!0}}const Ga=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Ka={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function K(s){const t=s.type;if(!vi(t))return !1;if(t==="mousemove"){let i=s.buttons===void 0?1:s.buttons;return s instanceof window.MouseEvent&&!ja&&(i=Ya[s.which]||0),!!(i&1)}return (s.button===void 0?0:s.button)===0}function Xa(s){if(s.type==="click"){if(s.detail===0)return !0;const t=$(s);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=s.pageX,o=s.pageY;return !(i>=e.left&&i<=e.right&&o>=e.top&&o<=e.bottom)}return !1}const F={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ja(s){let t="auto";const e=To(s);for(let i=0,o;i<e.length;i++)if(o=e[i],o[Gt]){t=o[Gt];break}return t}function So(s,t,e){s.movefn=t,s.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function re(s){document.removeEventListener("mousemove",s.movefn),document.removeEventListener("mouseup",s.upfn),s.movefn=null,s.upfn=null;}const To=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:s=>s.composedPath&&s.composedPath()||[],bi={},W=[];function Qa(s,t){let e=document.elementFromPoint(s,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const o=i;if(i=i.shadowRoot.elementFromPoint(s,t),o===i)break;i&&(e=i);}return e}function $(s){const t=To(s);return t.length>0?t[0]:s.target}function Za(s){const t=s.type,i=s.currentTarget[Wt];if(!i)return;const o=i[t];if(!o)return;if(!s[Et]&&(s[Et]={},t.startsWith("touch"))){const n=s.changedTouches[0];if(t==="touchstart"&&s.touches.length===1&&(F.touch.id=n.identifier),F.touch.id!==n.identifier)return;gi||(t==="touchstart"||t==="touchmove")&&el(s);}const r=s[Et];if(!r.skip){for(let n=0,a;n<W.length;n++)a=W[n],o[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(s.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<W.length;n++)a=W[n],o[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](s));}}function el(s){const t=s.changedTouches[0],e=s.type;if(e==="touchstart")F.touch.x=t.clientX,F.touch.y=t.clientY,F.touch.scrollDecided=!1;else if(e==="touchmove"){if(F.touch.scrollDecided)return;F.touch.scrollDecided=!0;const i=Ja(s);let o=!1;const r=Math.abs(F.touch.x-t.clientX),n=Math.abs(F.touch.y-t.clientY);s.cancelable&&(i==="none"?o=!0:i==="pan-x"?o=n>r:i==="pan-y"&&(o=r>n)),o?s.preventDefault():ot("track");}}function z(s,t,e){return bi[t]?(tl(s,t,e),!0):!1}function tl(s,t,e){const i=bi[t],o=i.deps,r=i.name;let n=s[Wt];n||(s[Wt]=n={});for(let a=0,l,d;a<o.length;a++)l=o[a],!(Ga&&vi(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&s.addEventListener(l,Za,Wa(l)),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);s.addEventListener(t,e),i.touchAction&&Io(s,i.touchAction);}function yi(s){W.push(s),s.emits.forEach(t=>{bi[t]=s;});}function il(s){for(let t=0,e;t<W.length;t++){e=W[t];for(let i=0,o;i<e.emits.length;i++)if(o=e.emits[i],o===s)return e}return null}function Io(s,t){gi&&s instanceof HTMLElement&&st.run(()=>{s.style.touchAction=t;}),s[Gt]=t;}function xi(s,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,$a(s).dispatchEvent(i),i.defaultPrevented){const o=e.preventer||e.sourceEvent;o&&o.preventDefault&&o.preventDefault();}}function ot(s){const t=il(s);t.info&&(t.info.prevent=!0);}yi({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){re(this.info);},mousedown(s){if(!K(s))return;const t=$(s),e=this,i=r=>{K(r)||(ye("up",t,r),re(e.info));},o=r=>{K(r)&&ye("up",t,r),re(e.info);};So(this.info,i,o),ye("down",t,s);},touchstart(s){ye("down",$(s),s.changedTouches[0],s);},touchend(s){ye("up",$(s),s.changedTouches[0],s);}});function ye(s,t,e,i){t&&xi(t,s,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(o){return ot(o)}});}yi({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(s){this.moves.length>Ua&&this.moves.shift(),this.moves.push(s);},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,re(this.info);},mousedown(s){if(!K(s))return;const t=$(s),e=this,i=r=>{const n=r.clientX,a=r.clientY;ys(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&ot("tap"),e.info.addMove({x:n,y:a}),K(r)||(e.info.state="end",re(e.info)),t&&Pt(e.info,t,r),e.info.started=!0);},o=r=>{e.info.started&&i(r),re(e.info);};So(this.info,i,o),this.info.x=s.clientX,this.info.y=s.clientY;},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(s){const t=$(s),e=s.changedTouches[0],i=e.clientX,o=e.clientY;ys(this.info,i,o)&&(this.info.state==="start"&&ot("tap"),this.info.addMove({x:i,y:o}),Pt(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(s){const t=$(s),e=s.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),Pt(this.info,t,e));}});function ys(s,t,e){if(s.prevent)return !1;if(s.started)return !0;const i=Math.abs(s.x-t),o=Math.abs(s.y-e);return i>=bs||o>=bs}function Pt(s,t,e){if(!t)return;const i=s.moves[s.moves.length-2],o=s.moves[s.moves.length-1],r=o.x-s.x,n=o.y-s.y;let a,l=0;i&&(a=o.x-i.x,l=o.y-i.y),xi(t,"track",{state:s.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return Qa(e.clientX,e.clientY)}});}yi({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(s){K(s)&&(this.info.x=s.clientX,this.info.y=s.clientY);},click(s){K(s)&&xs(this.info,s);},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(s){xs(this.info,s.changedTouches[0],s);}});function xs(s,t,e){const i=Math.abs(t.clientX-s.x),o=Math.abs(t.clientY-s.y),r=$(e||t);!r||Ka[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(o)||i<=vs&&o<=vs||Xa(t))&&(s.prevent||xi(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
1569
1569
  * @license
1570
1570
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1571
1571
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1577,11 +1577,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1577
1577
  * @license
1578
1578
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1579
1579
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1580
- */const Io=s=>class extends pe(Re(s)){get _activeKeys(){return [" "]}ready(){super.ready(),z(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),z(this,"up",()=>{this._setActive(!1);});}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1);}_shouldSetActive(e){return !this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",i=>{this._activeKeys.includes(i.key)&&this._setActive(!1);},{once:!0}));}_setActive(e){this.toggleAttribute("active",e);}};/**
1580
+ */const Do=s=>class extends pe(Re(s)){get _activeKeys(){return [" "]}ready(){super.ready(),z(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),z(this,"up",()=>{this._setActive(!1);});}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1);}_shouldSetActive(e){return !this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",i=>{this._activeKeys.includes(i.key)&&this._setActive(!1);},{once:!0}));}_setActive(e){this.toggleAttribute("active",e);}};/**
1581
1581
  * @license
1582
1582
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1583
1583
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1584
- */let xi=!1;window.addEventListener("keydown",()=>{xi=!0;},{capture:!0});window.addEventListener("mousedown",()=>{xi=!1;},{capture:!0});function Kt(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function ct(){return xi}function il(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function sl(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function ol(s,t){const e=[];for(;s.length>0&&t.length>0;)sl(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function Xt(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=Xt(s.slice(0,e)),o=Xt(s.slice(e));return ol(i,o)}function wi(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Do(s){return s.getRootNode().activeElement===s}function rl(s){if(!wi(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function Oo(s,t){if(s.nodeType!==Node.ELEMENT_NODE||il(s))return !1;const e=s,i=rl(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=Oo(n,t)||o;}),o}function nl(s){const t=[];return Oo(s,t)?Xt(t):t}/**
1584
+ */let wi=!1;window.addEventListener("keydown",()=>{wi=!0;},{capture:!0});window.addEventListener("mousedown",()=>{wi=!1;},{capture:!0});function Kt(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function ct(){return wi}function sl(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function ol(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function rl(s,t){const e=[];for(;s.length>0&&t.length>0;)ol(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function Xt(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=Xt(s.slice(0,e)),o=Xt(s.slice(e));return rl(i,o)}function Ci(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Oo(s){return s.getRootNode().activeElement===s}function nl(s){if(!Ci(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function Mo(s,t){if(s.nodeType!==Node.ELEMENT_NODE||sl(s))return !1;const e=s,i=nl(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=Mo(n,t)||o;}),o}function al(s){const t=[];return Mo(s,t)?Xt(t):t}/**
1585
1585
  * @license
1586
1586
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1587
1587
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1589,15 +1589,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1589
1589
  * @license
1590
1590
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1591
1591
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1592
- */const Mo=s=>class extends pe(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):i&&(this.tabindex=this._lastTabIndex);}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1);}};/**
1592
+ */const zo=s=>class extends pe(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):i&&(this.tabindex=this._lastTabIndex);}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1);}};/**
1593
1593
  * @license
1594
1594
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1595
1595
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1596
- */const Ci=v(s=>class extends _e(Mo(s)){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(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0);}});/**
1596
+ */const Ai=v(s=>class extends _e(zo(s)){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(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0);}});/**
1597
1597
  * @license
1598
1598
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1599
1599
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1600
- */const zo=v(s=>class extends s{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(e){e&&(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(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
1600
+ */const No=v(s=>class extends s{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(e){e&&(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(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
1601
1601
  * @license
1602
1602
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1603
1603
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1605,15 +1605,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1605
1605
  * @license
1606
1606
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1607
1607
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1608
- */const al=v(s=>class extends zo(pe(He(s))){static get properties(){return {checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return [...super.delegateProps,"checked"]}_onChange(e){const i=e.target;this._toggleChecked(i.checked);}_toggleChecked(e){this.checked=e;}});/**
1608
+ */const ll=v(s=>class extends No(pe(He(s))){static get properties(){return {checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return [...super.delegateProps,"checked"]}_onChange(e){const i=e.target;this._toggleChecked(i.checked);}_toggleChecked(e){this.checked=e;}});/**
1609
1609
  * @license
1610
1610
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
1611
1611
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1612
- */const kt=new Map;function Ai(s){return kt.has(s)||kt.set(s,new WeakMap),kt.get(s)}function No(s,t){s&&s.removeAttribute(t);}function Fo(s,t){if(!s||!t)return;const e=Ai(t);if(e.has(s))return;const i=fi(s.getAttribute(t));e.set(s,new Set(i));}function ll(s,t){if(!s)return;const e=Ai(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):Ao(s,t,ht(i)),e.delete(s);}function St(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=Ai(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):Fo(s,t),No(s,t)),La(s,t,o);const l=i||ht(a);l&&Ao(s,t,l);}function dl(s,t){Fo(s,t),No(s,t);}/**
1612
+ */const kt=new Map;function Ei(s){return kt.has(s)||kt.set(s,new WeakMap),kt.get(s)}function Fo(s,t){s&&s.removeAttribute(t);}function Lo(s,t){if(!s||!t)return;const e=Ei(t);if(e.has(s))return;const i=fi(s.getAttribute(t));e.set(s,new Set(i));}function dl(s,t){if(!s||!t)return;const e=Ei(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):Eo(s,t,ht(i)),e.delete(s);}function St(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=Ei(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):Lo(s,t),Fo(s,t)),Va(s,t,o);const l=i||ht(a);l&&Eo(s,t,l);}function hl(s,t){Lo(s,t),Fo(s,t);}/**
1613
1613
  * @license
1614
1614
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1615
1615
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1616
- */class hl{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&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){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,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?(dl(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(ll(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){St(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){St(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){St(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")));}}/**
1616
+ */class cl{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&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){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,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?(hl(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(dl(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){St(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){St(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){St(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")));}}/**
1617
1617
  * @license
1618
1618
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1619
1619
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1621,35 +1621,35 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1621
1621
  * @license
1622
1622
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1623
1623
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1624
- */const M=document.createElement("div");M.style.position="fixed";M.style.clip="rect(0px, 0px, 0px, 0px)";M.setAttribute("aria-live","polite");document.body.appendChild(M);let je;function cl(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(M.removeAttribute("aria-live"),M.removeAttribute("role"),je=O.debounce(je,Fe,()=>{M.setAttribute("role","alert");})):(je&&je.cancel(),M.removeAttribute("role"),M.setAttribute("aria-live",e)),M.textContent="",setTimeout(()=>{M.textContent=s;},i);}/**
1624
+ */const M=document.createElement("div");M.style.position="fixed";M.style.clip="rect(0px, 0px, 0px, 0px)";M.setAttribute("aria-live","polite");document.body.appendChild(M);let je;function ul(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(M.removeAttribute("aria-live"),M.removeAttribute("role"),je=O.debounce(je,Fe,()=>{M.setAttribute("role","alert");})):(je&&je.cancel(),M.removeAttribute("role"),M.setAttribute("aria-live",e)),M.textContent="",setTimeout(()=>{M.textContent=s;},i);}/**
1625
1625
  * @license
1626
1626
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1627
1627
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1628
- */class Ei extends R{constructor(t,e,i,o={}){super(t,e,i,mt(me({},o),{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(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.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()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}}/**
1628
+ */class Pi extends R{constructor(t,e,i,o={}){super(t,e,i,mt(me({},o),{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(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.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()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}}/**
1629
1629
  * @license
1630
1630
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1631
1631
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1632
- */class ul extends Ei{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,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&cl(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
1632
+ */class pl extends Pi{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,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&ul(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
1633
1633
  * @license
1634
1634
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1635
1635
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1636
- */class pl extends Ei{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 e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
1636
+ */class _l extends Pi{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 e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
1637
1637
  * @license
1638
1638
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1639
1639
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1640
- */class _l extends Ei{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 e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
1640
+ */class fl extends Pi{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 e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
1641
1641
  * @license
1642
1642
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1643
1643
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1644
- */const fl=v(s=>class extends Z(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new _l(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
1644
+ */const ml=v(s=>class extends Z(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new fl(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
1645
1645
  * @license
1646
1646
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1647
1647
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1648
- */const Pi=v(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}});/**
1648
+ */const ki=v(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}});/**
1649
1649
  * @license
1650
1650
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1651
1651
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1652
- */const ki=s=>class extends Pi(fl(Z(s))){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 hl(this),this._helperController=new pl(this),this._errorController=new ul(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}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(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
1652
+ */const Si=s=>class extends ki(ml(Z(s))){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 cl(this),this._helperController=new _l(this),this._errorController=new pl(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}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(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
1653
1653
  * @license
1654
1654
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1655
1655
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -1661,11 +1661,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1661
1661
  * @license
1662
1662
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1663
1663
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1664
- */const ml=s=>class extends ki(al(Ci(Io(s)))){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 ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new pt(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)");}_shouldSetActive(e){return this.readonly||e.target.localName==="a"||e.target===this._helperNode||e.target===this._errorNode?!1:super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick);}_onInputClick(e){this.readonly&&e.preventDefault();}__readonlyChanged(e,i){i&&(e?i.setAttribute("aria-readonly","true"):i.removeAttribute("aria-readonly"));}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e);}checkValidity(){return !this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_checkedChanged(e){(e||this.__oldChecked)&&this.validate(),this.__oldChecked=e;}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}_onRequiredIndicatorClick(){this._labelNode.click();}};/**
1664
+ */const gl=s=>class extends Si(ll(Ai(Do(s)))){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 ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new pt(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)");}_shouldSetActive(e){return this.readonly||e.target.localName==="a"||e.target===this._helperNode||e.target===this._errorNode?!1:super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick);}_onInputClick(e){this.readonly&&e.preventDefault();}__readonlyChanged(e,i){i&&(e?i.setAttribute("aria-readonly","true"):i.removeAttribute("aria-readonly"));}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e);}checkValidity(){return !this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_checkedChanged(e){(e||this.__oldChecked)&&this.validate(),this.__oldChecked=e;}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}_onRequiredIndicatorClick(){this._labelNode.click();}};/**
1665
1665
  * @license
1666
1666
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1667
1667
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1668
- */const gl=_`
1668
+ */const vl=_`
1669
1669
  :host {
1670
1670
  display: inline-block;
1671
1671
  }
@@ -1757,7 +1757,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1757
1757
  * @license
1758
1758
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1759
1759
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1760
- */m("vaadin-checkbox",gl,{moduleId:"vaadin-checkbox-styles"});class vl extends ml(ce(I(k))){static get is(){return "vaadin-checkbox"}static get template(){return P`
1760
+ */m("vaadin-checkbox",vl,{moduleId:"vaadin-checkbox-styles"});class bl extends gl(ce(I(k))){static get is(){return "vaadin-checkbox"}static get template(){return P`
1761
1761
  <div class="vaadin-checkbox-container">
1762
1762
  <div part="checkbox" aria-hidden="true"></div>
1763
1763
  <slot name="input"></slot>
@@ -1773,11 +1773,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1773
1773
  </div>
1774
1774
  </div>
1775
1775
  <slot name="tooltip"></slot>
1776
- `}ready(){super.ready(),this._tooltipController=new ue(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}y(vl);/**
1776
+ `}ready(){super.ready(),this._tooltipController=new ue(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}y(bl);/**
1777
1777
  * @license
1778
1778
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1779
1779
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1780
- */const Lo=_`
1780
+ */const Vo=_`
1781
1781
  :host {
1782
1782
  --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
1783
1783
  }
@@ -1837,7 +1837,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1837
1837
  * @license
1838
1838
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1839
1839
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1840
- */const Si=_`
1840
+ */const Ti=_`
1841
1841
  [part='label'] {
1842
1842
  align-self: flex-start;
1843
1843
  color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
@@ -1949,7 +1949,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1949
1949
  margin-left: 0;
1950
1950
  margin-right: calc(var(--lumo-border-radius-m) / 4);
1951
1951
  }
1952
- `;m("",Si,{moduleId:"lumo-required-field"});const bl=_`
1952
+ `;m("",Ti,{moduleId:"lumo-required-field"});const yl=_`
1953
1953
  :host {
1954
1954
  color: var(--lumo-body-text-color);
1955
1955
  font-size: var(--lumo-font-size-m);
@@ -1992,15 +1992,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
1992
1992
  color: var(--lumo-secondary-text-color);
1993
1993
  }
1994
1994
  }
1995
- `;m("vaadin-checkbox-group",[Si,Lo,bl],{moduleId:"lumo-checkbox-group"});/**
1995
+ `;m("vaadin-checkbox-group",[Ti,Vo,yl],{moduleId:"lumo-checkbox-group"});/**
1996
1996
  * @license
1997
1997
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1998
1998
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1999
- */const yl=s=>class extends ki(_e(pe(s))){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 ue(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const o=this.__checkboxes.map(r=>r.inputElement);this._tooltipController.setAriaTarget(o);}else this._tooltipController.setAriaTarget([]);});}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Eo(e,({addedNodes:i,removedNodes:o})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(o);r.forEach(this.__registerCheckbox),n.forEach(this.__unregisterCheckbox);const a=this.__checkboxes.map(l=>l.inputElement);this._tooltipController.setAriaTarget(a),this.__warnOfCheckboxesWithoutValue(r);}),this.addController(this._tooltipController);}checkValidity(){return !this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(i=>i.nodeType===Node.ELEMENT_NODE&&i.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(o=>{const{value:r}=o;return !o.hasAttribute("value")&&(!r||r==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.");}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0);}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value);}_disabledChanged(e,i){super._disabledChanged(e,i),!(!e&&i===void 0)&&i!==e&&this.__checkboxes.forEach(o=>{o.disabled=e;});}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e];}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(i=>i!==e));}__onCheckboxCheckedChanged(e){const i=e.target;i.checked?this.__addCheckboxToValue(i.value):this.__removeCheckboxFromValue(i.value);}__valueChanged(e,i){e&&e.length===0&&i===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(o=>{o.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
1999
+ */const xl=s=>class extends Si(_e(pe(s))){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 ue(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const o=this.__checkboxes.map(r=>r.inputElement);this._tooltipController.setAriaTarget(o);}else this._tooltipController.setAriaTarget([]);});}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Po(e,({addedNodes:i,removedNodes:o})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(o);r.forEach(this.__registerCheckbox),n.forEach(this.__unregisterCheckbox);const a=this.__checkboxes.map(l=>l.inputElement);this._tooltipController.setAriaTarget(a),this.__warnOfCheckboxesWithoutValue(r);}),this.addController(this._tooltipController);}checkValidity(){return !this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(i=>i.nodeType===Node.ELEMENT_NODE&&i.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(o=>{const{value:r}=o;return !o.hasAttribute("value")&&(!r||r==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.");}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0);}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value);}_disabledChanged(e,i){super._disabledChanged(e,i),!(!e&&i===void 0)&&i!==e&&this.__checkboxes.forEach(o=>{o.disabled=e;});}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e];}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(i=>i!==e));}__onCheckboxCheckedChanged(e){const i=e.target;i.checked?this.__addCheckboxToValue(i.value):this.__removeCheckboxFromValue(i.value);}__valueChanged(e,i){e&&e.length===0&&i===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(o=>{o.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
2000
2000
  * @license
2001
2001
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
2002
2002
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2003
- */const xl=_`
2003
+ */const wl=_`
2004
2004
  :host {
2005
2005
  display: inline-flex;
2006
2006
  }
@@ -2033,7 +2033,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2033
2033
  * @license
2034
2034
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
2035
2035
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2036
- */m("vaadin-checkbox-group",xl,{moduleId:"vaadin-checkbox-group-styles"});class wl extends yl(ce(I(k))){static get is(){return "vaadin-checkbox-group"}static get template(){return P`
2036
+ */m("vaadin-checkbox-group",wl,{moduleId:"vaadin-checkbox-group-styles"});class Cl extends xl(ce(I(k))){static get is(){return "vaadin-checkbox-group"}static get template(){return P`
2037
2037
  <div class="vaadin-group-field-container">
2038
2038
  <div part="label">
2039
2039
  <slot name="label"></slot>
@@ -2054,11 +2054,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2054
2054
  </div>
2055
2055
 
2056
2056
  <slot name="tooltip"></slot>
2057
- `}}y(wl);/**
2057
+ `}}y(Cl);/**
2058
2058
  * @license
2059
2059
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2060
2060
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2061
- */const Ti=_`
2061
+ */const Ii=_`
2062
2062
  :host {
2063
2063
  top: var(--lumo-space-m);
2064
2064
  right: var(--lumo-space-m);
@@ -2123,11 +2123,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2123
2123
  opacity: 1;
2124
2124
  }
2125
2125
  }
2126
- `;m("",Ti,{moduleId:"lumo-overlay"});/**
2126
+ `;m("",Ii,{moduleId:"lumo-overlay"});/**
2127
2127
  * @license
2128
2128
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
2129
2129
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2130
- */const Ii=_`
2130
+ */const Di=_`
2131
2131
  :host([opening]),
2132
2132
  :host([closing]) {
2133
2133
  animation: 0.14s lumo-overlay-dummy-animation;
@@ -2157,7 +2157,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2157
2157
  opacity: 0;
2158
2158
  }
2159
2159
  }
2160
- `;m("",Ii,{moduleId:"lumo-menu-overlay-core"});const Cl=_`
2160
+ `;m("",Di,{moduleId:"lumo-menu-overlay-core"});const Al=_`
2161
2161
  /* Small viewport (bottom sheet) styles */
2162
2162
  /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
2163
2163
  @media (max-width: 450px), (max-height: 450px) {
@@ -2219,7 +2219,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2219
2219
  transform: translateY(150%);
2220
2220
  }
2221
2221
  }
2222
- `,Vo=[Ti,Ii,Cl];m("",Vo,{moduleId:"lumo-menu-overlay"});const Al=_`
2222
+ `,Bo=[Ii,Di,Al];m("",Bo,{moduleId:"lumo-menu-overlay"});const El=_`
2223
2223
  [part='overlay'] {
2224
2224
  /*
2225
2225
  Width:
@@ -2264,7 +2264,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2264
2264
  max-height: 70vh;
2265
2265
  }
2266
2266
  }
2267
- `;m("vaadin-date-picker-overlay",[Vo,Al],{moduleId:"lumo-date-picker-overlay"});const Bo=_`
2267
+ `;m("vaadin-date-picker-overlay",[Bo,El],{moduleId:"lumo-date-picker-overlay"});const Ro=_`
2268
2268
  :host {
2269
2269
  /* Sizing */
2270
2270
  --lumo-button-size: var(--lumo-size-m);
@@ -2540,7 +2540,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
2540
2540
  margin-left: 0;
2541
2541
  margin-right: 0;
2542
2542
  }
2543
- `;m("vaadin-button",Bo,{moduleId:"lumo-button"});m("vaadin-date-picker-year",_`
2543
+ `;m("vaadin-button",Ro,{moduleId:"lumo-button"});m("vaadin-date-picker-year",_`
2544
2544
  :host([current]) [part='year-number'] {
2545
2545
  color: var(--lumo-primary-text-color);
2546
2546
  }
@@ -3043,7 +3043,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3043
3043
  * @license
3044
3044
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3045
3045
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3046
- */const Ro=_`
3046
+ */const Ho=_`
3047
3047
  [part$='button'] {
3048
3048
  flex: none;
3049
3049
  width: 1em;
@@ -3070,11 +3070,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3070
3070
  font-family: 'lumo-icons';
3071
3071
  display: block;
3072
3072
  }
3073
- `;m("",Ro,{moduleId:"lumo-field-button"});/**
3073
+ `;m("",Ho,{moduleId:"lumo-field-button"});/**
3074
3074
  * @license
3075
3075
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3076
3076
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3077
- */const El=_`
3077
+ */const Pl=_`
3078
3078
  :host {
3079
3079
  --lumo-text-field-size: var(--lumo-size-m);
3080
3080
  color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
@@ -3205,7 +3205,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3205
3205
  [part='clear-button']::before {
3206
3206
  content: var(--lumo-icons-cross);
3207
3207
  }
3208
- `,$e=[Si,Ro,Lo,El];m("",$e,{moduleId:"lumo-input-field-shared-styles"});const Pl=_`
3208
+ `,$e=[Ti,Ho,Vo,Pl];m("",$e,{moduleId:"lumo-input-field-shared-styles"});const kl=_`
3209
3209
  [part='toggle-button']::before {
3210
3210
  content: var(--lumo-icons-calendar);
3211
3211
  }
@@ -3227,15 +3227,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3227
3227
  :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
3228
3228
  --_lumo-text-field-overflow-mask-image: none;
3229
3229
  }
3230
- `;m("vaadin-date-picker",[$e,Pl],{moduleId:"lumo-date-picker"});/**
3230
+ `;m("vaadin-date-picker",[$e,kl],{moduleId:"lumo-date-picker"});/**
3231
3231
  * @license
3232
3232
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3233
3233
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3234
- */const kl=s=>class extends s{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",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
3234
+ */const Sl=s=>class extends s{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",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
3235
3235
  * @license
3236
3236
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3237
3237
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3238
- */const Sl=_`
3238
+ */const Tl=_`
3239
3239
  :host {
3240
3240
  display: flex;
3241
3241
  align-items: center;
@@ -3304,15 +3304,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3304
3304
  * @license
3305
3305
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3306
3306
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3307
- */m("vaadin-input-container",Sl,{moduleId:"vaadin-input-container-styles"});class Tl extends kl(I(Q(k))){static get is(){return "vaadin-input-container"}static get template(){return P`
3307
+ */m("vaadin-input-container",Tl,{moduleId:"vaadin-input-container-styles"});class Il extends Sl(I(Q(k))){static get is(){return "vaadin-input-container"}static get template(){return P`
3308
3308
  <slot name="prefix"></slot>
3309
3309
  <slot></slot>
3310
3310
  <slot name="suffix"></slot>
3311
- `}}y(Tl);/**
3311
+ `}}y(Il);/**
3312
3312
  * @license
3313
3313
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3314
3314
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3315
- */const Ho=_`
3315
+ */const $o=_`
3316
3316
  :host {
3317
3317
  z-index: 200;
3318
3318
  position: fixed;
@@ -3379,55 +3379,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3379
3379
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3380
3380
  Code distributed by Google as part of the polymer project is also
3381
3381
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3382
- */let Jt=!1,Il=[],$o=[];function Dl(){Jt=!0,requestAnimationFrame(function(){Jt=!1,Ol(Il),setTimeout(function(){Ml($o);});});}function Ol(s){for(;s.length;)Uo(s.shift());}function Ml(s){for(let t=0,e=s.length;t<e;t++)Uo(s.shift());}function Uo(s){const t=s[0],e=s[1],i=s[2];try{e.apply(t,i);}catch(o){setTimeout(()=>{throw o});}}function qo(s,t,e){Jt||Dl(),$o.push([s,t,e]);}/**
3382
+ */let Jt=!1,Dl=[],Uo=[];function Ol(){Jt=!0,requestAnimationFrame(function(){Jt=!1,Ml(Dl),setTimeout(function(){zl(Uo);});});}function Ml(s){for(;s.length;)qo(s.shift());}function zl(s){for(let t=0,e=s.length;t<e;t++)qo(s.shift());}function qo(s){const t=s[0],e=s[1],i=s[2];try{e.apply(t,i);}catch(o){setTimeout(()=>{throw o});}}function Yo(s,t,e){Jt||Ol(),Uo.push([s,t,e]);}/**
3383
3383
  * @license
3384
3384
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3385
3385
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3386
- */const _t=s=>s.test(navigator.userAgent),Qt=s=>s.test(navigator.platform),zl=s=>s.test(navigator.vendor);_t(/Android/u);_t(/Chrome/u)&&zl(/Google Inc/u);_t(/Firefox/u);const Nl=Qt(/^iPad/u)||Qt(/^Mac/u)&&navigator.maxTouchPoints>1,Fl=Qt(/^iPhone/u),Yo=Fl||Nl,Ll=_t(/^((?!chrome|android).)*safari/iu),Zt=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
3386
+ */const _t=s=>s.test(navigator.userAgent),Qt=s=>s.test(navigator.platform),Nl=s=>s.test(navigator.vendor);_t(/Android/u);_t(/Chrome/u)&&Nl(/Google Inc/u);_t(/Firefox/u);const Fl=Qt(/^iPad/u)||Qt(/^Mac/u)&&navigator.maxTouchPoints>1,Ll=Qt(/^iPhone/u),jo=Ll||Fl,Vl=_t(/^((?!chrome|android).)*safari/iu),Zt=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
3387
3387
  * @license
3388
3388
  * Copyright (c) 2017 Anton Korzunov
3389
3389
  * SPDX-License-Identifier: MIT
3390
- */let ee=new WeakMap,We=new WeakMap,Ge={},Tt=0;const xs=s=>s&&s.nodeType===Node.ELEMENT_NODE,It=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},Vl=(s,t)=>xs(s)?t.map(e=>{if(!xs(e))return It(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return It(e,"is not contained inside",s),null}).filter(e=>!!e):(It(s,"is not a valid element"),[]),Bl=(s,t,e,i)=>{const o=Vl(t,Array.isArray(s)?s:[s]);Ge[e]||(Ge[e]=new WeakMap);const r=Ge[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(f=>{if(!["template","script","style"].includes(f.localName))if(a.has(f))h(f);else {const E=f.getAttribute(i),S=E!==null&&E!=="false",x=(ee.get(f)||0)+1,b=(r.get(f)||0)+1;ee.set(f,x),r.set(f,b),n.push(f),x===1&&S&&We.set(f,!0),b===1&&f.setAttribute(e,"true"),S||f.setAttribute(i,"true");}});};return h(t),a.clear(),Tt+=1,()=>{n.forEach(c=>{const u=ee.get(c)-1,p=r.get(c)-1;ee.set(c,u),r.set(c,p),u||(We.has(c)?We.delete(c):c.removeAttribute(i)),p||c.removeAttribute(e);}),Tt-=1,Tt||(ee=new WeakMap,ee=new WeakMap,We=new WeakMap,Ge={});}},jo=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),Bl(i,t,e,"aria-hidden")};/**
3390
+ */let ee=new WeakMap,We=new WeakMap,Ge={},Tt=0;const ws=s=>s&&s.nodeType===Node.ELEMENT_NODE,It=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},Bl=(s,t)=>ws(s)?t.map(e=>{if(!ws(e))return It(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return It(e,"is not contained inside",s),null}).filter(e=>!!e):(It(s,"is not a valid element"),[]),Rl=(s,t,e,i)=>{const o=Bl(t,Array.isArray(s)?s:[s]);Ge[e]||(Ge[e]=new WeakMap);const r=Ge[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(f=>{if(!["template","script","style"].includes(f.localName))if(a.has(f))h(f);else {const E=f.getAttribute(i),S=E!==null&&E!=="false",x=(ee.get(f)||0)+1,b=(r.get(f)||0)+1;ee.set(f,x),r.set(f,b),n.push(f),x===1&&S&&We.set(f,!0),b===1&&f.setAttribute(e,"true"),S||f.setAttribute(i,"true");}});};return h(t),a.clear(),Tt+=1,()=>{n.forEach(c=>{const u=ee.get(c)-1,p=r.get(c)-1;ee.set(c,u),r.set(c,p),u||(We.has(c)?We.delete(c):c.removeAttribute(i)),p||c.removeAttribute(e);}),Tt-=1,Tt||(ee=new WeakMap,ee=new WeakMap,We=new WeakMap,Ge={});}},Wo=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),Rl(i,t,e,"aria-hidden")};/**
3391
3391
  * @license
3392
3392
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3393
3393
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3394
- */class Rl{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=jo(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
3394
+ */class Hl{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=Wo(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
3395
3395
  * @license
3396
3396
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3397
3397
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3398
- */class Hl{saveFocus(t){this.focusNode=t||Kt();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;Kt()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
3398
+ */class $l{saveFocus(t){this.focusNode=t||Kt();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;Kt()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
3399
3399
  * @license
3400
3400
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3401
3401
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3402
- */const Dt=[];class $l{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return nl(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Do).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Dt.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Dt.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Dt).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}/**
3402
+ */const Dt=[];class Ul{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return al(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Oo).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Dt.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Dt.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Dt).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}/**
3403
3403
  * @license
3404
3404
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3405
3405
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3406
- */const Ul=s=>class extends Z(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Rl(this),this.__focusTrapController=new $l(this),this.__focusRestorationController=new Hl;}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 e=!ct();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=Kt();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
3406
+ */const ql=s=>class extends Z(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Hl(this),this.__focusTrapController=new Ul(this),this.__focusRestorationController=new $l;}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 e=!ct();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=Kt();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
3407
3407
  * @license
3408
3408
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3409
3409
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3410
- */const Wo=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),ei=()=>Wo().filter(s=>s.$.overlay),ql=s=>s===ei().pop(),Yl=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return ql(this)}bringToFront(){let e="";const i=Wo().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex);}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ei().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=ei();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
3410
+ */const Go=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),ei=()=>Go().filter(s=>s.$.overlay),Yl=s=>s===ei().pop(),jl=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Yl(this)}bringToFront(){let e="";const i=Go().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex);}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ei().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=ei();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
3411
3411
  * @license
3412
3412
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3413
3413
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3414
- */const Go=s=>class extends Ul(Yl(s)){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),Yo&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&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(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","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(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),qo(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o);}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_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(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
3414
+ */const Ko=s=>class extends ql(jl(s)){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),jo&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&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(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","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(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),Yo(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o);}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_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(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
3415
3415
  * @license
3416
3416
  * Copyright (c) 2024 Vaadin Ltd.
3417
3417
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3418
- */function jl(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),p=Math.floor(i.clientWidth-(l+h)),f=Math.floor(i.clientHeight-(d+c)),E=Math.floor(l),x={rootMargin:`${-u}px ${-p}px ${-f}px ${-E}px`,threshold:Math.max(0,Math.min(1,a))||1};let b=!0;function V(fe){let q=fe[0].intersectionRatio;if(q!==a){if(!b)return r();q===0&&(q=1e-7),r(!1,q);}b=!1;}e=new IntersectionObserver(V,x),e.observe(s);}return r(!0),o}/**
3418
+ */function Wl(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),p=Math.floor(i.clientWidth-(l+h)),f=Math.floor(i.clientHeight-(d+c)),E=Math.floor(l),x={rootMargin:`${-u}px ${-p}px ${-f}px ${-E}px`,threshold:Math.max(0,Math.min(1,a))||1};let b=!0;function V(fe){let q=fe[0].intersectionRatio;if(q!==a){if(!b)return r();q===0&&(q=1e-7),r(!1,q);}b=!1;}e=new IntersectionObserver(V,x),e.observe(s);}return r(!0),o}/**
3419
3419
  * @license
3420
3420
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3421
3421
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3422
- */const Ot={start:"top",end:"bottom"},Mt={start:"left",end:"right"},ws=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),Ko=s=>class extends s{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=Fa(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=jl(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,ws.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,ws.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,Ot,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,Mt,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,Mt)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,Ot)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,p=c>(n?h:d)||c>i;return n===p}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===Ot.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===Mt.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],p=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:p,[d]:""}}};/**
3422
+ */const Ot={start:"top",end:"bottom"},Mt={start:"left",end:"right"},Cs=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),Xo=s=>class extends s{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=La(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=Wl(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,Cs.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,Cs.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,Ot,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,Mt,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,Mt)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,Ot)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,p=c>(n?h:d)||c>i;return n===p}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===Ot.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===Mt.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],p=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:p,[d]:""}}};/**
3423
3423
  * @license
3424
3424
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
3425
3425
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3426
- */const Wl=s=>class extends Ko(Go(s)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!wi(e.composedPath()[0])&&e.preventDefault();}};/**
3426
+ */const Gl=s=>class extends Xo(Ko(s)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ci(e.composedPath()[0])&&e.preventDefault();}};/**
3427
3427
  * @license
3428
3428
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3429
3429
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3430
- */const Gl=_`
3430
+ */const Kl=_`
3431
3431
  [part='overlay'] {
3432
3432
  display: flex;
3433
3433
  flex: auto;
@@ -3446,18 +3446,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3446
3446
  * @license
3447
3447
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3448
3448
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3449
- */m("vaadin-date-picker-overlay",[Ho,Gl],{moduleId:"vaadin-date-picker-overlay-styles"});class Kl extends Wl(Q(I(k))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return P`
3449
+ */m("vaadin-date-picker-overlay",[$o,Kl],{moduleId:"vaadin-date-picker-overlay-styles"});class Xl extends Gl(Q(I(k))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return P`
3450
3450
  <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
3451
3451
  <div part="overlay" id="overlay">
3452
3452
  <div part="content" id="content">
3453
3453
  <slot></slot>
3454
3454
  </div>
3455
3455
  </div>
3456
- `}}y(Kl);/**
3456
+ `}}y(Xl);/**
3457
3457
  * @license
3458
3458
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3459
3459
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3460
- */const Xo=_`
3460
+ */const Jo=_`
3461
3461
  :host {
3462
3462
  display: inline-block;
3463
3463
  position: relative;
@@ -3517,7 +3517,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3517
3517
  outline-color: GrayText;
3518
3518
  }
3519
3519
  }
3520
- `,Xl=s=>s`
3520
+ `,Jl=s=>s`
3521
3521
  <div class="vaadin-button-container">
3522
3522
  <span part="prefix" aria-hidden="true">
3523
3523
  <slot name="prefix"></slot>
@@ -3534,15 +3534,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3534
3534
  * @license
3535
3535
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3536
3536
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3537
- */const Jo=s=>class extends Io(Mo(_e(s))){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(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click());}};/**
3537
+ */const Qo=s=>class extends Do(zo(_e(s))){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(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click());}};/**
3538
3538
  * @license
3539
3539
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3540
3540
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3541
- */m("vaadin-button",Xo,{moduleId:"vaadin-button-styles"});class Jl extends Jo(ce(I(Z(k)))){static get is(){return "vaadin-button"}static get template(){return Xl(P)}ready(){super.ready(),this._tooltipController=new ue(this),this.addController(this._tooltipController);}}y(Jl);/**
3541
+ */m("vaadin-button",Jo,{moduleId:"vaadin-button-styles"});class Ql extends Qo(ce(I(Z(k)))){static get is(){return "vaadin-button"}static get template(){return Jl(P)}ready(){super.ready(),this._tooltipController=new ue(this),this.addController(this._tooltipController);}}y(Ql);/**
3542
3542
  * @license
3543
3543
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3544
3544
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3545
- */function Ql(s){let t=s.getDay();t===0&&(t=7);const e=4-t,i=new Date(s.getTime()+e*24*3600*1e3),o=new Date(0,0);o.setFullYear(i.getFullYear());const r=i.getTime()-o.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function ti(s){const t=new Date(s);return t.setHours(0,0,0,0),t}function L(s,t,e=ti){return s instanceof Date&&t instanceof Date&&e(s).getTime()===e(t).getTime()}function Di(s){return {day:s.getDate(),month:s.getMonth(),year:s.getFullYear()}}function le(s,t,e,i){let o=!1;if(typeof i=="function"&&s){const r=Di(s);o=i(r);}return (!t||s>=t)&&(!e||s<=e)&&!o}function Qo(s,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const o=Math.abs(s.getTime()-i.getTime()),r=Math.abs(e.getTime()-s.getTime());return o<r?i:e})}function Zo(s){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(s)+t.getMonth()),e}function Zl(s,t,e=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let o=t+Math.floor(s.getFullYear()/100)*100;return s<new Date(o-50,e,i)?o-=100:s>new Date(o+50,e,i)&&(o+=100),o}function xe(s){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(s);if(!t)return;const e=new Date(0,0);return e.setFullYear(parseInt(t[1],10)),e.setMonth(parseInt(t[2],10)-1),e.setDate(parseInt(t[3],10)),e}function ed(s){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",o=s.year;o<0?(o=-o,e="-",i="000000"):s.year>=1e4&&(e="+",i="000000");const r=e+t(o,i),n=t(s.month+1),a=t(s.day);return [r,n,a].join("-")}function td(s){return s instanceof Date?ed({year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}):""}/**
3545
+ */function Zl(s){let t=s.getDay();t===0&&(t=7);const e=4-t,i=new Date(s.getTime()+e*24*3600*1e3),o=new Date(0,0);o.setFullYear(i.getFullYear());const r=i.getTime()-o.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function ti(s){const t=new Date(s);return t.setHours(0,0,0,0),t}function L(s,t,e=ti){return s instanceof Date&&t instanceof Date&&e(s).getTime()===e(t).getTime()}function Oi(s){return {day:s.getDate(),month:s.getMonth(),year:s.getFullYear()}}function le(s,t,e,i){let o=!1;if(typeof i=="function"&&s){const r=Oi(s);o=i(r);}return (!t||s>=t)&&(!e||s<=e)&&!o}function Zo(s,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const o=Math.abs(s.getTime()-i.getTime()),r=Math.abs(e.getTime()-s.getTime());return o<r?i:e})}function er(s){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(s)+t.getMonth()),e}function ed(s,t,e=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let o=t+Math.floor(s.getFullYear()/100)*100;return s<new Date(o-50,e,i)?o-=100:s>new Date(o+50,e,i)&&(o+=100),o}function xe(s){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(s);if(!t)return;const e=new Date(0,0);return e.setFullYear(parseInt(t[1],10)),e.setMonth(parseInt(t[2],10)-1),e.setDate(parseInt(t[3],10)),e}function td(s){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",o=s.year;o<0?(o=-o,e="-",i="000000"):s.year>=1e4&&(e="+",i="000000");const r=e+t(o,i),n=t(s.month+1),a=t(s.day);return [r,n,a].join("-")}function id(s){return s instanceof Date?td({year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}):""}/**
3546
3546
  @license
3547
3547
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3548
3548
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3550,7 +3550,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3550
3550
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3551
3551
  Code distributed by Google as part of the polymer project is also
3552
3552
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3553
- */class rt{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,Ve.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Ve.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}static debounce(t,e,i){return t instanceof rt?t._cancelAsync():t=new rt,t.setConfig(e,i),t}}let Ve=new Set;const id=function(s){Ve.add(s);},sd=function(){const s=!!Ve.size;return Ve.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s};/**
3553
+ */class rt{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,Ve.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),Ve.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}static debounce(t,e,i){return t instanceof rt?t._cancelAsync():t=new rt,t.setConfig(e,i),t}}let Ve=new Set;const sd=function(s){Ve.add(s);},od=function(){const s=!!Ve.size;return Ve.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s};/**
3554
3554
  @license
3555
3555
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3556
3556
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3558,11 +3558,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3558
3558
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3559
3559
  Code distributed by Google as part of the polymer project is also
3560
3560
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3561
- */const Oi=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=sd();while(s||t)};/**
3561
+ */const Mi=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=od();while(s||t)};/**
3562
3562
  * @license
3563
3563
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3564
3564
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3565
- */const er=document.createElement("template");er.innerHTML=`
3565
+ */const tr=document.createElement("template");tr.innerHTML=`
3566
3566
  <style>
3567
3567
  :host {
3568
3568
  display: block;
@@ -3612,11 +3612,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3612
3612
  <div class="buffer"></div>
3613
3613
  <div id="fullHeight"></div>
3614
3614
  </div>
3615
- `;class tr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(er.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+this.bufferSize*2?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=`${this._initialScroll*2}px`);}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Oi();}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach(t=>{[...t.children].forEach(e=>{this._ensureStampedInstance(e._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>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t>this._buffers[1].translateY+e,o=t<this._buffers[0].translateY+e;(i||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=O.debounce(this._debouncerScrollFinish,G.after(200),()=>{const r=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],r)&&!this._isVisible(this._buffers[1],r)&&(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=O.debounce(this._debouncerUpdateClones,G.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 o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const r=`vaadin-infinite-scroller-item-content-${mi()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=o,e.appendChild(n),o.setAttribute("slot",r),this.appendChild(o),this._isVisible(o,t)&&this._ensureStampedInstance(o);}}),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,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach((n,a)=>{const l=n._itemWrapper;(!t||this._isVisible(l,e))&&this._updateElement(l.instance,r+a);}),i.updated=!0;}});}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}/**
3615
+ `;class ir extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(tr.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+this.bufferSize*2?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=`${this._initialScroll*2}px`);}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),Mi();}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach(t=>{[...t.children].forEach(e=>{this._ensureStampedInstance(e._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>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t>this._buffers[1].translateY+e,o=t<this._buffers[0].translateY+e;(i||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=O.debounce(this._debouncerScrollFinish,G.after(200),()=>{const r=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],r)&&!this._isVisible(this._buffers[1],r)&&(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=O.debounce(this._debouncerUpdateClones,G.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 o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const r=`vaadin-infinite-scroller-item-content-${mi()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=o,e.appendChild(n),o.setAttribute("slot",r),this.appendChild(o),this._isVisible(o,t)&&this._ensureStampedInstance(o);}}),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,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach((n,a)=>{const l=n._itemWrapper;(!t||this._isVisible(l,e))&&this._updateElement(l.instance,r+a);}),i.updated=!0;}});}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}/**
3616
3616
  * @license
3617
3617
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3618
3618
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3619
- */const ir=document.createElement("template");ir.innerHTML=`
3619
+ */const sr=document.createElement("template");sr.innerHTML=`
3620
3620
  <style>
3621
3621
  :host {
3622
3622
  --vaadin-infinite-scroller-item-height: 270px;
@@ -3628,11 +3628,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3628
3628
  height: 100%;
3629
3629
  }
3630
3630
  </style>
3631
- `;class od extends tr{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(ir.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Zo(e);}}y(od);/**
3631
+ `;class rd extends ir{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(sr.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=er(e);}}y(rd);/**
3632
3632
  * @license
3633
3633
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3634
3634
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3635
- */const sr=document.createElement("template");sr.innerHTML=`
3635
+ */const or=document.createElement("template");or.innerHTML=`
3636
3636
  <style>
3637
3637
  :host {
3638
3638
  --vaadin-infinite-scroller-item-height: 80px;
@@ -3666,15 +3666,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3666
3666
  border-left-color: #000;
3667
3667
  }
3668
3668
  </style>
3669
- `;class rd extends tr{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(sr.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()}}y(rd);/**
3669
+ `;class nd extends ir{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(or.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()}}y(nd);/**
3670
3670
  * @license
3671
3671
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3672
3672
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3673
- */const nd=s=>class extends s{static get properties(){return {year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return ["__updateSelected(year, selectedDate)"]}__updateSelected(e,i){this.toggleAttribute("selected",i&&i.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear());}};/**
3673
+ */const ad=s=>class extends s{static get properties(){return {year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return ["__updateSelected(year, selectedDate)"]}__updateSelected(e,i){this.toggleAttribute("selected",i&&i.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear());}};/**
3674
3674
  * @license
3675
3675
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3676
3676
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3677
- */class ad extends I(nd(k)){static get is(){return "vaadin-date-picker-year"}static get template(){return P`
3677
+ */class ld extends I(ad(k)){static get is(){return "vaadin-date-picker-year"}static get template(){return P`
3678
3678
  <style>
3679
3679
  :host {
3680
3680
  display: block;
@@ -3683,7 +3683,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3683
3683
  </style>
3684
3684
  <div part="year-number">[[year]]</div>
3685
3685
  <div part="year-separator" aria-hidden="true"></div>
3686
- `}}y(ad);/**
3686
+ `}}y(ld);/**
3687
3687
  @license
3688
3688
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3689
3689
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3691,7 +3691,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3691
3691
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3692
3692
  Code distributed by Google as part of the polymer project is also
3693
3693
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3694
- */function Mi(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const zi=v(s=>{class t extends s{_shouldPropertyChange(i,o,r){return Mi(this,i,o,r,!0)}}return t}),ld=v(s=>{class t extends s{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,o,r){return Mi(this,i,o,r,this.mutableData)}}return t});zi._mutablePropertyChange=Mi;/**
3694
+ */function zi(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Ni=v(s=>{class t extends s{_shouldPropertyChange(i,o,r){return zi(this,i,o,r,!0)}}return t}),dd=v(s=>{class t extends s{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,o,r){return zi(this,i,o,r,this.mutableData)}}return t});Ni._mutablePropertyChange=zi;/**
3695
3695
  @license
3696
3696
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3697
3697
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3699,7 +3699,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3699
3699
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3700
3700
  Code distributed by Google as part of the polymer project is also
3701
3701
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3702
- */let ii=null;function si(){return ii}si.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:si,writable:!0}});const or=_i(si),dd=zi(or);function hd(s,t){ii=s,Object.setPrototypeOf(s,t.prototype),new t,ii=null;}const cd=_i(class{});function ud(s,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!s!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)s?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(s)i.__polymerReplaced__=document.createComment("hidden-slot"),A(A(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const o=i.__polymerReplaced__;o&&A(A(o).parentNode).replaceChild(i,o);}else i.style&&(s?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=s,i._showHideChildren&&i._showHideChildren(s);}}class U extends cd{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let o=this.root.firstChild;o;o=o.nextSibling)e.push(o),o.__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 i in this.__hostProps)this._setPendingProperty(i,this.__dataHost["_host_"+i]);for(let i in t)this._setPendingProperty(i,t[i]);}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,o=>{o.model=this,i(o);});else {let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i);}}_showHideChildren(t){ud(t,this.children);}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"?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 pd=zi(U);function Cs(s){let t=s.__dataHost;return t&&t._methodHost||t}function _d(s,t,e){let i=e.mutableData?pd:U;oi.mixin&&(i=oi.mixin(i));let o=class extends i{};return o.prototype.__templatizeOptions=e,o.prototype._bindTemplate(s),gd(o,s,t,e),o}function fd(s,t,e,i){let o=e.forwardHostProp;if(o&&t.hasHostProps){const r=s.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?dd:or;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=s.constructor;class d extends l{}n=t.templatizeTemplateClass=d;}let a=t.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:md(l,o)}),n.prototype._createNotifyingProperty("_host_"+l);Xs&&i&&yd(t,e,i);}if(s.__dataProto&&Object.assign(s.__data,s.__dataProto),r)hd(s,n),s.__dataTemp={},s.__dataPending=null,s.__dataOld=null,s._enableProperties();else {Object.setPrototypeOf(s,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in s){const d=s[l];delete s[l],s.__data[l]=d;}}}}function md(s,t){return function(i,o,r){t.call(i.__templatizeOwner,o.substring(6),r[o]);}}function gd(s,t,e,i){let o=e.hostProps||{};for(let r in i.instanceProps){delete o[r];let n=i.notifyInstanceProp;n&&s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:vd(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in o)e.hasHostProps||(e.hasHostProps=!0),s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:bd()});}function vd(s,t){return function(i,o,r){t.call(i.__templatizeOwner,i,o,r[o]);}}function bd(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function oi(s,t,e){if(tt&&!Cs(s))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},s.__templatizeOwner)throw new Error("A <template> can only be templatized once");s.__templatizeOwner=t;let o=(t?t.constructor:U)._parseTemplate(s),r=o.templatizeInstanceClass;r||(r=_d(s,o,e),o.templatizeInstanceClass=r);const n=Cs(s);fd(s,o,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=s,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=o.hostProps,a=a,a}function yd(s,t,e){const i=e.constructor._properties,{propertyEffects:o}=s,{instanceProps:r}=t;for(let n in o)if(!i[n]&&!(r&&r[n])){const a=o[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function xd(s,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=s)t=e.__dataHost;else return e;else t=A(t).parentNode;return null}/**
3702
+ */let ii=null;function si(){return ii}si.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:si,writable:!0}});const rr=_i(si),hd=Ni(rr);function cd(s,t){ii=s,Object.setPrototypeOf(s,t.prototype),new t,ii=null;}const ud=_i(class{});function pd(s,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!s!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)s?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(s)i.__polymerReplaced__=document.createComment("hidden-slot"),A(A(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const o=i.__polymerReplaced__;o&&A(A(o).parentNode).replaceChild(i,o);}else i.style&&(s?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=s,i._showHideChildren&&i._showHideChildren(s);}}class U extends ud{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let o=this.root.firstChild;o;o=o.nextSibling)e.push(o),o.__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 i in this.__hostProps)this._setPendingProperty(i,this.__dataHost["_host_"+i]);for(let i in t)this._setPendingProperty(i,t[i]);}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,o=>{o.model=this,i(o);});else {let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i);}}_showHideChildren(t){pd(t,this.children);}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"?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 _d=Ni(U);function As(s){let t=s.__dataHost;return t&&t._methodHost||t}function fd(s,t,e){let i=e.mutableData?_d:U;oi.mixin&&(i=oi.mixin(i));let o=class extends i{};return o.prototype.__templatizeOptions=e,o.prototype._bindTemplate(s),vd(o,s,t,e),o}function md(s,t,e,i){let o=e.forwardHostProp;if(o&&t.hasHostProps){const r=s.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?hd:rr;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=s.constructor;class d extends l{}n=t.templatizeTemplateClass=d;}let a=t.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:gd(l,o)}),n.prototype._createNotifyingProperty("_host_"+l);Js&&i&&xd(t,e,i);}if(s.__dataProto&&Object.assign(s.__data,s.__dataProto),r)cd(s,n),s.__dataTemp={},s.__dataPending=null,s.__dataOld=null,s._enableProperties();else {Object.setPrototypeOf(s,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in s){const d=s[l];delete s[l],s.__data[l]=d;}}}}function gd(s,t){return function(i,o,r){t.call(i.__templatizeOwner,o.substring(6),r[o]);}}function vd(s,t,e,i){let o=e.hostProps||{};for(let r in i.instanceProps){delete o[r];let n=i.notifyInstanceProp;n&&s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:bd(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in o)e.hasHostProps||(e.hasHostProps=!0),s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:yd()});}function bd(s,t){return function(i,o,r){t.call(i.__templatizeOwner,i,o,r[o]);}}function yd(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function oi(s,t,e){if(tt&&!As(s))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},s.__templatizeOwner)throw new Error("A <template> can only be templatized once");s.__templatizeOwner=t;let o=(t?t.constructor:U)._parseTemplate(s),r=o.templatizeInstanceClass;r||(r=fd(s,o,e),o.templatizeInstanceClass=r);const n=As(s);md(s,o,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=s,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=o.hostProps,a=a,a}function xd(s,t,e){const i=e.constructor._properties,{propertyEffects:o}=s,{instanceProps:r}=t;for(let n in o)if(!i[n]&&!(r&&r[n])){const a=o[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function wd(s,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=s)t=e.__dataHost;else return e;else t=A(t).parentNode;return null}/**
3703
3703
  @license
3704
3704
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3705
3705
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3707,7 +3707,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3707
3707
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3708
3708
  Code distributed by Google as part of the polymer project is also
3709
3709
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3710
- */let As=!1;function wd(){if(Ks&&!Gs){if(!As){As=!0;const s=document.createElement("style");s.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(s);}return !0}return !1}/**
3710
+ */let Es=!1;function Cd(){if(Xs&&!Ks){if(!Es){Es=!0;const s=document.createElement("style");s.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(s);}return !0}return !1}/**
3711
3711
  @license
3712
3712
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
3713
3713
  This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
@@ -3715,15 +3715,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3715
3715
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3716
3716
  Code distributed by Google as part of the polymer project is also
3717
3717
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3718
- */const Cd=ld(k);class Es extends Cd{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:!Ji,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(),wd()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=A(A(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 o=new MutationObserver(()=>{if(this.querySelector("template"))o.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return o.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=oi(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(o,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(o,r);},notifyInstanceProp:function(o,r,n){if(vn(this.as,r)){let a=o[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Me(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n);}}});}return !0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){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)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)t.indexOf(e[i])===0&&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)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render));}__debounceRender(t,e=0){this.__renderDebouncer=rt.debounce(this.__renderDebouncer,e>0?An.after(e):no,t.bind(this)),id(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),Oi();}__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),(!Ji||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((i,o,r)=>this.__filterFn(t[i],o,r))),this.__sortFn&&e.sort((i,o)=>this.__sortFn(t[i],t[o])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now();}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1;}this.__shouldContinueChunking&&this.__debounceRender(this.__render);}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];o[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a);}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n);}__detachInstance(t){let e=this.__instances[t];const i=A(e.root);for(let o=0;o<e.children.length;o++){let r=e.children[o];i.appendChild(r);}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this);}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1);}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return A(A(this).parentNode).insertBefore(o.root,n),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let n=o<0?"":i.substring(o+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,e,!1,!0),l._flushProperties();}return !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 xd(this.template,t)}}customElements.define(Es.is,Es);/**
3718
+ */const Ad=dd(k);class Ps extends Ad{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:!Qi,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(),Cd()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=A(A(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 o=new MutationObserver(()=>{if(this.querySelector("template"))o.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return o.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=oi(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(o,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(o,r);},notifyInstanceProp:function(o,r,n){if(bn(this.as,r)){let a=o[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Me(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n);}}});}return !0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){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)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)t.indexOf(e[i])===0&&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)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render));}__debounceRender(t,e=0){this.__renderDebouncer=rt.debounce(this.__renderDebouncer,e>0?En.after(e):ao,t.bind(this)),sd(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),Mi();}__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),(!Qi||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((i,o,r)=>this.__filterFn(t[i],o,r))),this.__sortFn&&e.sort((i,o)=>this.__sortFn(t[i],t[o])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now();}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1;}this.__shouldContinueChunking&&this.__debounceRender(this.__render);}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];o[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a);}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n);}__detachInstance(t){let e=this.__instances[t];const i=A(e.root);for(let o=0;o<e.children.length;o++){let r=e.children[o];i.appendChild(r);}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this);}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1);}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return A(A(this).parentNode).insertBefore(o.root,n),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let n=o<0?"":i.substring(o+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,e,!1,!0),l._flushProperties();}return !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 wd(this.template,t)}}customElements.define(Ps.is,Ps);/**
3719
3719
  * @license
3720
3720
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3721
3721
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3722
- */const Ad=s=>class extends _e(s){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(e=>L(e.date,this.focusedDate))}ready(){super.ready(),z(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,o){const r=new Date(0,0);r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);const n=new Date(0,0);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()+1),n.setDate(0),i&&o&&i.getMonth()===o.getMonth()&&i.getMonth()===e.getMonth()&&o.getDate()-i.getDate()>=0?!1:!le(r,i,o)&&!le(n,i,o)}_getTitle(e,i){if(!(e===void 0||i===void 0))return i.formatTitle(i.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300);}_dateAdd(e,i){e.setDate(e.getDate()+i);}_applyFirstDayOfWeek(e,i){if(!(e===void 0||i===void 0))return e.slice(i).concat(e.slice(0,i))}_getWeekDayNames(e,i){if(e===void 0||i===void 0)return [];const{weekdays:o,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(o,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(o=>L(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,i){return e&&i&&i.firstDayOfWeek===1}_isToday(e){return L(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==i.firstDayOfWeek;)this._dateAdd(o,-1);const r=[],n=o.getMonth(),a=e.getMonth();for(;o.getMonth()===a||o.getMonth()===n;)r.push(o.getMonth()===a?new Date(o.getTime()):null),this._dateAdd(o,1);return r}_getWeeks(e){return e.reduce((i,o,r)=>(r%7===0&&i.push([]),i[i.length-1].push(o),i),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})));}_preventDefault(e){e.preventDefault();}__getWeekNumber(e){const i=e.reduce((o,r)=>!o&&r?r:o);return Ql(i)}__getDayAriaLabel(e){if(!e)return "";let i=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(i+=`, ${this.i18n.today}`),i}};/**
3722
+ */const Ed=s=>class extends _e(s){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(e=>L(e.date,this.focusedDate))}ready(){super.ready(),z(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,o){const r=new Date(0,0);r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);const n=new Date(0,0);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()+1),n.setDate(0),i&&o&&i.getMonth()===o.getMonth()&&i.getMonth()===e.getMonth()&&o.getDate()-i.getDate()>=0?!1:!le(r,i,o)&&!le(n,i,o)}_getTitle(e,i){if(!(e===void 0||i===void 0))return i.formatTitle(i.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300);}_dateAdd(e,i){e.setDate(e.getDate()+i);}_applyFirstDayOfWeek(e,i){if(!(e===void 0||i===void 0))return e.slice(i).concat(e.slice(0,i))}_getWeekDayNames(e,i){if(e===void 0||i===void 0)return [];const{weekdays:o,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(o,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(o=>L(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,i){return e&&i&&i.firstDayOfWeek===1}_isToday(e){return L(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==i.firstDayOfWeek;)this._dateAdd(o,-1);const r=[],n=o.getMonth(),a=e.getMonth();for(;o.getMonth()===a||o.getMonth()===n;)r.push(o.getMonth()===a?new Date(o.getTime()):null),this._dateAdd(o,1);return r}_getWeeks(e){return e.reduce((i,o,r)=>(r%7===0&&i.push([]),i[i.length-1].push(o),i),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})));}_preventDefault(e){e.preventDefault();}__getWeekNumber(e){const i=e.reduce((o,r)=>!o&&r?r:o);return Zl(i)}__getDayAriaLabel(e){if(!e)return "";let i=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(i+=`, ${this.i18n.today}`),i}};/**
3723
3723
  * @license
3724
3724
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3725
3725
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3726
- */const Ed=_`
3726
+ */const Pd=_`
3727
3727
  :host {
3728
3728
  display: block;
3729
3729
  }
@@ -3783,7 +3783,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3783
3783
  * @license
3784
3784
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3785
3785
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3786
- */m("vaadin-month-calendar",Ed,{moduleId:"vaadin-month-calendar-styles"});class Pd extends Ad(I(k)){static get template(){return P`
3786
+ */m("vaadin-month-calendar",Pd,{moduleId:"vaadin-month-calendar-styles"});class kd extends Ed(I(k)){static get template(){return P`
3787
3787
  <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3788
3788
  <table
3789
3789
  id="monthGrid"
@@ -3825,19 +3825,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3825
3825
  </template>
3826
3826
  </tbody>
3827
3827
  </table>
3828
- `}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&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>ti(new Date),d=t<ti(new Date);return this.__isDayDisabled(t,o,r,n)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return L(t,e)}__isDaySelected(t,e){return L(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,o){return !le(t,e,i,o)}__getDayAriaDisabled(t,e,i,o){if(!(t===void 0||e===void 0&&i===void 0&&o===void 0)&&this.__isDayDisabled(t,e,i,o))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}y(Pd);/**
3828
+ `}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&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>ti(new Date),d=t<ti(new Date);return this.__isDayDisabled(t,o,r,n)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return L(t,e)}__isDaySelected(t,e){return L(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,o){return !le(t,e,i,o)}__getDayAriaDisabled(t,e,i,o){if(!(t===void 0||e===void 0&&i===void 0&&o===void 0)&&this.__isDayDisabled(t,e,i,o))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}y(kd);/**
3829
3829
  * @license
3830
3830
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3831
3831
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3832
- */class rr{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){typeof this.callback=="function"&&this.callback(t.matches);}}/**
3832
+ */class nr{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){typeof this.callback=="function"&&this.callback(t.matches);}}/**
3833
3833
  * @license
3834
3834
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3835
3835
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3836
- */const kd=s=>class extends s{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(e=>e.focusableDateElement).find(Boolean)}_addListeners(){To(this.$.scrollers,"pan-y"),z(this.$.scrollers,"track",this._track.bind(this)),z(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),z(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),z(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new rr(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new R(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),z(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new R(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),z(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new R(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new R(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),z(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-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=O.debounce(this._debouncer,G.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Di(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return Zo(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){L(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&L(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Ue(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Ue(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{qo(this,()=>{Oi(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(Qo(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return le(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
3836
+ */const Sd=s=>class extends s{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(e=>e.focusableDateElement).find(Boolean)}_addListeners(){Io(this.$.scrollers,"pan-y"),z(this.$.scrollers,"track",this._track.bind(this)),z(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),z(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),z(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new nr(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new R(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),z(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new R(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),z(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new R(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new R(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),z(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-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=O.debounce(this._debouncer,G.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Oi(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?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(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return er(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){L(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&L(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Ue(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Ue(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{Yo(this,()=>{Mi(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(Zo(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return le(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
3837
3837
  * @license
3838
3838
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3839
3839
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3840
- */const Sd=_`
3840
+ */const Td=_`
3841
3841
  :host {
3842
3842
  display: flex;
3843
3843
  flex-direction: column;
@@ -3901,7 +3901,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3901
3901
  * @license
3902
3902
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3903
3903
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3904
- */m("vaadin-date-picker-overlay-content",Sd,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Td extends kd(Z(I(Q(k)))){static get template(){return P`
3904
+ */m("vaadin-date-picker-overlay-content",Td,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Id extends Sd(Z(I(Q(k)))){static get template(){return P`
3905
3905
  <div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
3906
3906
  <div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
3907
3907
  <div part="clear-button" hidden$="[[!selectedDate]]"></div>
@@ -3921,23 +3921,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3921
3921
  <slot name="today-button"></slot>
3922
3922
  <slot name="cancel-button"></slot>
3923
3923
  </div>
3924
- `}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}y(Td);/**
3924
+ `}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}y(Id);/**
3925
3925
  * @license
3926
3926
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3927
3927
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3928
- */const zt=new WeakMap;function Id(s){return zt.has(s)||zt.set(s,new Set),zt.get(s)}function Dd(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const nr=v(s=>class extends s{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Id(e);this.slotStyles.forEach(o=>{i.has(o)||(Dd(o,e),i.add(o));});}});/**
3928
+ */const zt=new WeakMap;function Dd(s){return zt.has(s)||zt.set(s,new Set),zt.get(s)}function Od(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const ar=v(s=>class extends s{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Dd(e);this.slotStyles.forEach(o=>{i.has(o)||(Od(o,e),i.add(o));});}});/**
3929
3929
  * @license
3930
3930
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3931
3931
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3932
- */const Od=s=>class extends He(Re(s)){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",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),Zt||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
3932
+ */const Md=s=>class extends He(Re(s)){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",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),Zt||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
3933
3933
  * @license
3934
3934
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3935
3935
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3936
- */const Ni=v(s=>class extends zo(Pi(He(s))){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(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
3936
+ */const Fi=v(s=>class extends No(ki(He(s))){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(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
3937
3937
  * @license
3938
3938
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3939
3939
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3940
- */const Fi=s=>class extends nr(Ci(Ni(ki(Od(Re(s)))))){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 [`
3940
+ */const Li=s=>class extends ar(Ai(Fi(Si(Md(Re(s)))))){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 [`
3941
3941
  :is(input[slot='input'], textarea[slot='textarea'])::placeholder {
3942
3942
  font: inherit;
3943
3943
  color: inherit;
@@ -3946,7 +3946,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3946
3946
  * @license
3947
3947
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3948
3948
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3949
- */const Md=_`
3949
+ */const zd=_`
3950
3950
  [part='clear-button'] {
3951
3951
  display: none;
3952
3952
  cursor: default;
@@ -3963,7 +3963,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3963
3963
  * @license
3964
3964
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
3965
3965
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3966
- */const zd=_`
3966
+ */const Nd=_`
3967
3967
  :host {
3968
3968
  display: inline-flex;
3969
3969
  outline: none;
@@ -4001,7 +4001,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4001
4001
  * @license
4002
4002
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
4003
4003
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4004
- */const Nd=_`
4004
+ */const Fd=_`
4005
4005
  [class$='container'] {
4006
4006
  display: flex;
4007
4007
  flex-direction: column;
@@ -4013,23 +4013,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4013
4013
  * @license
4014
4014
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
4015
4015
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4016
- */const Li=[zd,Nd,Md];/**
4016
+ */const Vi=[Nd,Fd,zd];/**
4017
4017
  * @license
4018
4018
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
4019
4019
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4020
- */const ar=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
4020
+ */const lr=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
4021
4021
  * @license
4022
4022
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4023
4023
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4024
- */class lr{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");}}/**
4024
+ */class dr{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");}}/**
4025
4025
  * @license
4026
4026
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
4027
4027
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4028
- */const Fd=s=>class extends ar(Z(Ci(Ni(Re(s))))){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(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?xe(this.referenceDate):new Date;a=Zl(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},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:Yo},_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(e){super._inputElementValue=e,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(e){super._onFocus(e),this._noInput&&!ct()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new rr(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new lr(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=xe(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Di(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||le(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return td(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=xe(e);if(e&&!o){this.value=i;return}e?L(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=jo(n);}_getInitialPosition(){const e=xe(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||le(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?Qo(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(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(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,L(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return xe(e)}};/**
4028
+ */const Ld=s=>class extends lr(Z(Ai(Fi(Re(s))))){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(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?xe(this.referenceDate):new Date;a=ed(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},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:jo},_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(e){super._inputElementValue=e,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(e){super._onFocus(e),this._noInput&&!ct()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new nr(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new dr(this));const e=this.$.overlay;this._overlayElement=e,e.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(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=xe(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Oi(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||le(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return id(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=xe(e);if(e&&!o){this.value=i;return}e?L(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=Wo(n);}_getInitialPosition(){const e=xe(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||le(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?Zo(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(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(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,L(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return xe(e)}};/**
4029
4029
  * @license
4030
4030
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
4031
4031
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4032
- */const Ld=_`
4032
+ */const Vd=_`
4033
4033
  :host([opened]) {
4034
4034
  pointer-events: auto;
4035
4035
  }
@@ -4046,7 +4046,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4046
4046
  * @license
4047
4047
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
4048
4048
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4049
- */m("vaadin-date-picker",[Li,Ld],{moduleId:"vaadin-date-picker-styles"});class Vd extends Fd(Fi(I(ce(k)))){static get is(){return "vaadin-date-picker"}static get template(){return P`
4049
+ */m("vaadin-date-picker",[Vi,Vd],{moduleId:"vaadin-date-picker-styles"});class Bd extends Ld(Li(I(ce(k)))){static get is(){return "vaadin-date-picker"}static get template(){return P`
4050
4050
  <div class="vaadin-date-picker-container">
4051
4051
  <div part="label">
4052
4052
  <slot name="label"></slot>
@@ -4088,7 +4088,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4088
4088
  ></vaadin-date-picker-overlay>
4089
4089
 
4090
4090
  <slot name="tooltip"></slot>
4091
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new pt(this.inputElement,this._labelController)),this._tooltipController=new ue(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.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;}}y(Vd);/**
4091
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new pt(this.inputElement,this._labelController)),this._tooltipController=new ue(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.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;}}y(Bd);/**
4092
4092
  * @license
4093
4093
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4094
4094
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -4096,15 +4096,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4096
4096
  * @license
4097
4097
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4098
4098
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4099
- */const Bd=s=>class extends Fi(s){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(e){this.__dataValue=e;}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value));}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_onInput(e){super._onInput(e),this.invalid&&this.validate();}_valueChanged(e,i){super._valueChanged(e,i),i!==void 0&&this.invalid&&this.validate();}};/**
4099
+ */const Rd=s=>class extends Li(s){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(e){this.__dataValue=e;}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value));}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_onInput(e){super._onInput(e),this.invalid&&this.validate();}_valueChanged(e,i){super._valueChanged(e,i),i!==void 0&&this.invalid&&this.validate();}};/**
4100
4100
  * @license
4101
4101
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4102
4102
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4103
- */const Rd=s=>class extends Bd(s){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 ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new pt(this.inputElement,this._labelController));}};/**
4103
+ */const Hd=s=>class extends Rd(s){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 ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new pt(this.inputElement,this._labelController));}};/**
4104
4104
  * @license
4105
4105
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4106
4106
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4107
- */m("vaadin-text-field",Li,{moduleId:"vaadin-text-field-styles"});class dr extends Rd(I(ce(k))){static get is(){return "vaadin-text-field"}static get template(){return P`
4107
+ */m("vaadin-text-field",Vi,{moduleId:"vaadin-text-field-styles"});class hr extends Hd(I(ce(k))){static get is(){return "vaadin-text-field"}static get template(){return P`
4108
4108
  <div class="vaadin-field-container">
4109
4109
  <div part="label">
4110
4110
  <slot name="label"></slot>
@@ -4133,11 +4133,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4133
4133
  </div>
4134
4134
  </div>
4135
4135
  <slot name="tooltip"></slot>
4136
- `}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new ue(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}y(dr);/**
4136
+ `}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new ue(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}y(hr);/**
4137
4137
  * @license
4138
4138
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4139
4139
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4140
- */const Hd=_`
4140
+ */const $d=_`
4141
4141
  :host {
4142
4142
  position: absolute;
4143
4143
  right: 0;
@@ -4150,11 +4150,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4150
4150
  background: transparent;
4151
4151
  outline: none;
4152
4152
  }
4153
- `;m("vaadin-password-field-button",[Bo,Hd],{moduleId:"lumo-password-field-button"});/**
4153
+ `;m("vaadin-password-field-button",[Ro,$d],{moduleId:"lumo-password-field-button"});/**
4154
4154
  * @license
4155
4155
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4156
4156
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4157
- */const $d=_`
4157
+ */const Ud=_`
4158
4158
  [part='reveal-button']::before {
4159
4159
  content: var(--lumo-icons-eye);
4160
4160
  }
@@ -4172,15 +4172,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4172
4172
  [part='reveal-button'][hidden] {
4173
4173
  display: none !important;
4174
4174
  }
4175
- `;m("vaadin-password-field",[$e,$d],{moduleId:"lumo-password-field"});/**
4175
+ `;m("vaadin-password-field",[$e,Ud],{moduleId:"lumo-password-field"});/**
4176
4176
  * @license
4177
4177
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4178
4178
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4179
- */m("vaadin-password-field-button",Xo,{moduleId:"vaadin-password-field-button-styles"});class Ud extends Jo(Q(I(k))){static get is(){return "vaadin-password-field-button"}static get template(){return P``}}y(Ud);/**
4179
+ */m("vaadin-password-field-button",Jo,{moduleId:"vaadin-password-field-button-styles"});class qd extends Qo(Q(I(k))){static get is(){return "vaadin-password-field-button"}static get template(){return P``}}y(qd);/**
4180
4180
  * @license
4181
4181
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4182
4182
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4183
- */const qd=s=>class extends nr(pe(_e(He(s)))){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(){const e=this.localName;return [...super.slotStyles,`
4183
+ */const Yd=s=>class extends ar(pe(_e(He(s)))){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(){const e=this.localName;return [...super.slotStyles,`
4184
4184
  ${e} [slot="input"]::-ms-reveal {
4185
4185
  display: none;
4186
4186
  }
@@ -4188,11 +4188,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4188
4188
  * @license
4189
4189
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4190
4190
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4191
- */const Yd=P`
4191
+ */const jd=P`
4192
4192
  <div part="reveal-button" slot="suffix">
4193
4193
  <slot name="reveal"></slot>
4194
4194
  </div>
4195
- `;let Ke;class jd extends qd(dr){static get is(){return "vaadin-password-field"}static get template(){if(!Ke){Ke=super.template.cloneNode(!0);const t=Yd.content.querySelector('[part="reveal-button"]');Ke.content.querySelector('[part="input-field"]').appendChild(t);}return Ke}}y(jd);const hr=_`
4195
+ `;let Ke;class Wd extends Yd(hr){static get is(){return "vaadin-password-field"}static get template(){if(!Ke){Ke=super.template.cloneNode(!0);const t=jd.content.querySelector('[part="reveal-button"]');Ke.content.querySelector('[part="input-field"]').appendChild(t);}return Ke}}y(Wd);const cr=_`
4196
4196
  :host {
4197
4197
  display: flex;
4198
4198
  align-items: center;
@@ -4276,7 +4276,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4276
4276
  width: var(--lumo-icon-size-m);
4277
4277
  height: var(--lumo-icon-size-m);
4278
4278
  }
4279
- `;m("vaadin-item",hr,{moduleId:"lumo-item"});const Wd=_`
4279
+ `;m("vaadin-item",cr,{moduleId:"lumo-item"});const Gd=_`
4280
4280
  :host {
4281
4281
  transition: background-color 100ms;
4282
4282
  overflow: hidden;
@@ -4288,11 +4288,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4288
4288
  :host([focused]:not([disabled])) {
4289
4289
  box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
4290
4290
  }
4291
- `;m("vaadin-combo-box-item",[hr,Wd],{moduleId:"lumo-combo-box-item"});/**
4291
+ `;m("vaadin-combo-box-item",[cr,Gd],{moduleId:"lumo-combo-box-item"});/**
4292
4292
  * @license
4293
4293
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
4294
4294
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4295
- */const Gd=_`
4295
+ */const Kd=_`
4296
4296
  [part~='loader'] {
4297
4297
  box-sizing: border-box;
4298
4298
  width: var(--lumo-icon-size-s);
@@ -4334,7 +4334,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4334
4334
  transform: rotate(360deg);
4335
4335
  }
4336
4336
  }
4337
- `,Kd=_`
4337
+ `,Xd=_`
4338
4338
  [part='content'] {
4339
4339
  padding: 0;
4340
4340
  }
@@ -4355,7 +4355,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4355
4355
  :host([bottom-aligned]) [part~='overlay'] {
4356
4356
  margin-bottom: var(--lumo-space-xs);
4357
4357
  }
4358
- `,Xd=_`
4358
+ `,Jd=_`
4359
4359
  [part~='loader'] {
4360
4360
  position: absolute;
4361
4361
  z-index: 1;
@@ -4363,24 +4363,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4363
4363
  top: var(--lumo-space-s);
4364
4364
  margin-inline: auto 0;
4365
4365
  }
4366
- `;m("vaadin-combo-box-overlay",[Ti,Ii,Kd,Gd,Xd,_`
4366
+ `;m("vaadin-combo-box-overlay",[Ii,Di,Xd,Kd,Jd,_`
4367
4367
  :host {
4368
4368
  --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
4369
4369
  --_vaadin-combo-box-items-container-border-style: solid;
4370
4370
  }
4371
- `],{moduleId:"lumo-combo-box-overlay"});const Jd=_`
4371
+ `],{moduleId:"lumo-combo-box-overlay"});const Qd=_`
4372
4372
  [part='toggle-button']::before {
4373
4373
  content: var(--lumo-icons-dropdown);
4374
4374
  }
4375
- `;m("vaadin-combo-box",[$e,Jd],{moduleId:"lumo-combo-box"});/**
4375
+ `;m("vaadin-combo-box",[$e,Qd],{moduleId:"lumo-combo-box"});/**
4376
4376
  * @license
4377
4377
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4378
4378
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4379
- */const Qd=s=>class extends s{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(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
4379
+ */const Zd=s=>class extends s{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(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
4380
4380
  * @license
4381
4381
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4382
4382
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4383
- */class Zd extends Qd(I(Q(k))){static get template(){return P`
4383
+ */class eh extends Zd(I(Q(k))){static get template(){return P`
4384
4384
  <style>
4385
4385
  :host {
4386
4386
  display: block;
@@ -4394,15 +4394,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4394
4394
  <div part="content">
4395
4395
  <slot></slot>
4396
4396
  </div>
4397
- `}static get is(){return "vaadin-combo-box-item"}}y(Zd);/**
4397
+ `}static get is(){return "vaadin-combo-box-item"}}y(eh);/**
4398
4398
  * @license
4399
4399
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4400
4400
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4401
- */const eh=s=>class extends Ko(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!wi(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
4401
+ */const th=s=>class extends Xo(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ci(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
4402
4402
  * @license
4403
4403
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4404
4404
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4405
- */const th=_`
4405
+ */const ih=_`
4406
4406
  #overlay {
4407
4407
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
4408
4408
  }
@@ -4412,13 +4412,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4412
4412
  flex-direction: column;
4413
4413
  height: 100%;
4414
4414
  }
4415
- `;m("vaadin-combo-box-overlay",[Ho,th],{moduleId:"vaadin-combo-box-overlay-styles"});class ih extends eh(Go(Q(I(k)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return P`
4415
+ `;m("vaadin-combo-box-overlay",[$o,ih],{moduleId:"vaadin-combo-box-overlay-styles"});class sh extends th(Ko(Q(I(k)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return P`
4416
4416
  <div id="backdrop" part="backdrop" hidden></div>
4417
4417
  <div part="overlay" id="overlay">
4418
4418
  <div part="loader"></div>
4419
4419
  <div part="content" id="content"><slot></slot></div>
4420
4420
  </div>
4421
- `}}y(ih);/**
4421
+ `}}y(sh);/**
4422
4422
  * @license
4423
4423
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
4424
4424
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -4430,11 +4430,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4430
4430
  * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
4431
4431
  * Code distributed by Google as part of the polymer project is also
4432
4432
  * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
4433
- */const Ps=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),sh=Ps&&Ps[1]>=8,ks=3,oh={_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(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),st);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,ks,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)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()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),wo):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),st));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(ks));},_itemsChanged(s){s.path==="items"&&(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,Fe));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!sh&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(Ae(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),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);},Fe);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=O.debounce(this._debouncers[s],e,t.bind(this)),Co(this._debouncers[s]);}};/**
4433
+ */const ks=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),oh=ks&&ks[1]>=8,Ss=3,rh={_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(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),st);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,Ss,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)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()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),Co):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),st));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(Ss));},_itemsChanged(s){s.path==="items"&&(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,Fe));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!oh&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(Ae(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),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);},Fe);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=O.debounce(this._debouncers[s],e,t.bind(this)),Ao(this._debouncers[s]);}};/**
4434
4434
  * @license
4435
4435
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4436
4436
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4437
- */const rh=1e5,Nt=1e3;class cr{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,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()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),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(typeof t!="number"||isNaN(t)||this.size===0||!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<Nt?(i=t,this._vidxOffset=0):(i=Nt,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(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),Ae(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){Ae();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__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(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=O.debounce(this.__placeholderClearDebouncer,Fe,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__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;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),Ae(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),Ae(),this._debounce("_update",this._update,st);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,rh)}}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=t.direction==="rtl",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(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&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 o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){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=O.debounce(this.__fixInvalidItemPositioningDebouncer,G.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=O.debounce(this.__scrollReorderDebouncer,G.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__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){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=O.debounce(this.__debouncerWheelAnimationFrame,Fe,()=>{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=O.debounce(this._debouncerIgnoreNewWheel,G.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){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_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 i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)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){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Ll){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_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){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Nt,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(cr.prototype,oh);class nh{constructor(t){this.__adapter=new cr(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();}}/**
4437
+ */const nh=1e5,Nt=1e3;class ur{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,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()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),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(typeof t!="number"||isNaN(t)||this.size===0||!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<Nt?(i=t,this._vidxOffset=0):(i=Nt,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(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),Ae(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){Ae();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__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(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=O.debounce(this.__placeholderClearDebouncer,Fe,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__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;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),Ae(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),Ae(),this._debounce("_update",this._update,st);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,nh)}}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=t.direction==="rtl",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(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&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 o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){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=O.debounce(this.__fixInvalidItemPositioningDebouncer,G.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=O.debounce(this.__scrollReorderDebouncer,G.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__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){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=O.debounce(this.__debouncerWheelAnimationFrame,Fe,()=>{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=O.debounce(this._debouncerIgnoreNewWheel,G.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){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_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 i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)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){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Vl){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_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){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Nt,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(ur.prototype,rh);class ah{constructor(t){this.__adapter=new ur(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();}}/**
4438
4438
  * @license
4439
4439
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4440
4440
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
@@ -4442,11 +4442,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4442
4442
  * @license
4443
4443
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4444
4444
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4445
- */const ah=s=>class extends s{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(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${mi()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof de?!1:o&&e!==void 0&&i!==void 0?nt(o,e)===nt(o,i):e===i}__initVirtualizer(){this.__virtualizer=new nh({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof de&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
4445
+ */const lh=s=>class extends s{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(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${mi()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof de?!1:o&&e!==void 0&&i!==void 0?nt(o,e)===nt(o,i):e===i}__initVirtualizer(){this.__virtualizer=new ah({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof de&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
4446
4446
  * @license
4447
4447
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4448
4448
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4449
- */class lh extends ah(k){static get is(){return "vaadin-combo-box-scroller"}static get template(){return P`
4449
+ */class dh extends lh(k){static get is(){return "vaadin-combo-box-scroller"}static get template(){return P`
4450
4450
  <style>
4451
4451
  :host {
4452
4452
  display: block;
@@ -4473,39 +4473,39 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4473
4473
  <div id="selector">
4474
4474
  <slot></slot>
4475
4475
  </div>
4476
- `}}y(lh);/**
4476
+ `}}y(dh);/**
4477
4477
  * @license
4478
4478
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4479
4479
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4480
- */const dh=s=>class extends Ni(s){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
4480
+ */const hh=s=>class extends Fi(s){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
4481
4481
  * @license
4482
4482
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4483
4483
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4484
- */function at(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return at(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function ur({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=ur({getItemId:s},r,e,i+1,n+1);if(a)return a}}function pr(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?pr(r,e,i+o+1):i+o}/**
4484
+ */function at(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return at(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function pr({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=pr({getItemId:s},r,e,i+1,n+1);if(a)return a}}function _r(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?_r(r,e,i+o+1):i+o}/**
4485
4485
  * @license
4486
4486
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4487
4487
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4488
- */class Vi{constructor(t,e,i,o,r){C(this,"context");C(this,"pageSize");C(this,"items",[]);C(this,"pendingRequests",{});C(this,"__subCacheByIndex",{});C(this,"__size",0);C(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,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?!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 i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}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((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new Vi(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((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=at(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}=at(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}}/**
4488
+ */class Bi{constructor(t,e,i,o,r){C(this,"context");C(this,"pageSize");C(this,"items",[]);C(this,"pendingRequests",{});C(this,"__subCacheByIndex",{});C(this,"__size",0);C(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,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?!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 i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}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((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new Bi(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((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=at(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}=at(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}}/**
4489
4489
  * @license
4490
4490
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4491
4491
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4492
- */class hh extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();C(this,"host");C(this,"dataProvider");C(this,"dataProviderParams");C(this,"pageSize");C(this,"isExpanded");C(this,"getItemId");C(this,"rootCache");C(this,"placeholder");C(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return at(this.rootCache,e)}getItemContext(e){return ur({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return pr(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new Vi(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=me(me({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
4492
+ */class ch extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();C(this,"host");C(this,"dataProvider");C(this,"dataProviderParams");C(this,"pageSize");C(this,"isExpanded");C(this,"getItemId");C(this,"rootCache");C(this,"placeholder");C(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return at(this.rootCache,e)}getItemContext(e){return pr({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return _r(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new Bi(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=me(me({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
4493
4493
  * @license
4494
4494
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4495
4495
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4496
- */const ch=s=>class extends s{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 hh(this,{placeholder:new de,isPlaceholder:e=>e instanceof de,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",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.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(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&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`");}}};/**
4496
+ */const uh=s=>class extends s{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 ch(this,{placeholder:new de,isPlaceholder:e=>e instanceof de,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",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.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(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&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`");}}};/**
4497
4497
  * @license
4498
4498
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4499
4499
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4500
- */function uh(s){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(s);return}s.querySelector("template")&&console.warn(`WARNING: <template> inside <${s.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`);}/**
4500
+ */function ph(s){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(s);return}s.querySelector("template")&&console.warn(`WARNING: <template> inside <${s.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`);}/**
4501
4501
  * @license
4502
4502
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4503
4503
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4504
- */function Ss(s){return s!=null}function Ts(s,t){return s.findIndex(e=>e instanceof de?!1:t(e))}const ph=s=>class extends ar(Z(Pi(_e(Re(He(pe(s))))))){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(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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 e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),uh(this),this.addController(new lr(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Do(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Zt&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?nt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?nt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.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 e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Zt&&!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 e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(Ss(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),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(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!Ss(i)?-1:Ts(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:Ts(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof de)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ct()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
4504
+ */function Ts(s){return s!=null}function Is(s,t){return s.findIndex(e=>e instanceof de?!1:t(e))}const _h=s=>class extends lr(Z(ki(_e(Re(He(pe(s))))))){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(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.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 e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),ph(this),this.addController(new dr(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Oo(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Zt&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?nt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?nt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.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 e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Zt&&!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 e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(Ts(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),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(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!Ts(i)?-1:Is(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:Is(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof de)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ct()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
4505
4505
  * @license
4506
4506
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4507
4507
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4508
- */m("vaadin-combo-box",Li,{moduleId:"vaadin-combo-box-styles"});class _h extends ch(ph(dh(Fi(I(ce(k)))))){static get is(){return "vaadin-combo-box"}static get template(){return P`
4508
+ */m("vaadin-combo-box",Vi,{moduleId:"vaadin-combo-box-styles"});class fh extends uh(_h(hh(Li(I(ce(k)))))){static get is(){return "vaadin-combo-box"}static get template(){return P`
4509
4509
  <style>
4510
4510
  :host([opened]) {
4511
4511
  pointer-events: auto;
@@ -4550,7 +4550,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
4550
4550
  ></vaadin-combo-box-overlay>
4551
4551
 
4552
4552
  <slot name="tooltip"></slot>
4553
- `}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new pt(this.inputElement,this._labelController)),this._tooltipController=new ue(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);}}y(_h);
4553
+ `}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new pt(this.inputElement,this._labelController)),this._tooltipController=new ue(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);}}y(fh);
4554
4554
 
4555
4555
  const generalInputCss = ":host{display:block;height:100%}";
4556
4556
  const GeneralInputStyle0 = generalInputCss;