@everymatrix/lottery-game-page 1.76.12 → 1.76.13

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.
@@ -19,7 +19,7 @@ const A=globalThis,I=A.ShadowRoot&&(void 0===A.ShadyCSS||A.ShadyCSS.nativeShadow
19
19
  * @license
20
20
  * Copyright 2017 Google LLC
21
21
  * SPDX-License-Identifier: BSD-3-Clause
22
- */,{is:E,defineProperty:F,getOwnPropertyDescriptor:j,getOwnPropertyNames:R,getOwnPropertySymbols:L,getPrototypeOf:W}=Object,$=globalThis,H=$.trustedTypes,G=H?H.emptyScript:"",V=$.reactiveElementPolyfillSupport,q={toAttribute(t,e){switch(e){case Boolean:t=t?G:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},U=(t,e)=>!E(t,e),Y={attribute:!0,type:String,converter:q,reflect:!1,useDefault:!1,hasChanged:U};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=$.litPropertyMetadata||($.litPropertyMetadata=new WeakMap);class J extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&F(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=j(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=W(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...R(t),...L(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(O(t))}else void 0!==t&&e.push(O(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return N(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:q).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:q;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,a=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:U)(a,e)||i.useDefault&&i.reflect&&a===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return S(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var K;J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,null==V||V({ReactiveElement:J}),(null!=(K=$.reactiveElementVersions)?K:$.reactiveElementVersions=[]).push("2.1.1");
22
+ */,{is:E,defineProperty:F,getOwnPropertyDescriptor:j,getOwnPropertyNames:R,getOwnPropertySymbols:L,getPrototypeOf:W}=Object,$=globalThis,H=$.trustedTypes,U=H?H.emptyScript:"",G=$.reactiveElementPolyfillSupport,V={toAttribute(t,e){switch(e){case Boolean:t=t?U:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let i=t;switch(e){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},q=(t,e)=>!E(t,e),Y={attribute:!0,type:String,converter:V,reflect:!1,useDefault:!1,hasChanged:q};null!=Symbol.metadata||(Symbol.metadata=Symbol("metadata")),null!=$.litPropertyMetadata||($.litPropertyMetadata=new WeakMap);class J extends HTMLElement{static addInitializer(t){var e;this._$Ei(),(null!=(e=this.l)?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Y){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&F(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){var s;const{get:o,set:r}=null!=(s=j(this.prototype,t))?s:{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const s=null==o?void 0:o.call(this);null==r||r.call(this,e),this.requestUpdate(t,s,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return null!=(e=this.elementProperties.get(t))?e:Y}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=W(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...R(t),...L(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(O(t))}else void 0!==t&&e.push(O(t));return e}static _$Eu(t,e){const i=e.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),null==(t=this.constructor.l)||t.forEach((t=>t(this)))}addController(t){var e,i;(null!=(e=this._$EO)?e:this._$EO=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&(null==(i=t.hostConnected)||i.call(t))}removeController(t){var e;null==(e=this._$EO)||e.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var t;const e=null!=(t=this.shadowRoot)?t:this.attachShadow(this.constructor.shadowRootOptions);return N(e,this.constructor.elementStyles),e}connectedCallback(){var t;null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostConnected)?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostDisconnected)?void 0:e.call(t)}))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$ET(t,e){var i;const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==(null==(i=s.converter)?void 0:i.toAttribute)?s.converter:V).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){var i,s,o;const r=this.constructor,a=r._$Eh.get(t);if(void 0!==a&&this._$Em!==a){const t=r.getPropertyOptions(a),n="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null==(i=t.converter)?void 0:i.fromAttribute)?t.converter:V;this._$Em=a;const l=n.fromAttribute(e,t.type);this[a]=null!=(o=null!=l?l:null==(s=this._$Ej)?void 0:s.get(a))?o:l,this._$Em=null}}requestUpdate(t,e,i){var s,o;if(void 0!==t){const r=this.constructor,a=this[t];if(null!=i||(i=r.getPropertyOptions(t)),!((null!=(s=i.hasChanged)?s:q)(a,e)||i.useDefault&&i.reflect&&a===(null==(o=this._$Ej)?void 0:o.get(t))&&!this.hasAttribute(r._$Eu(t,i))))return;this.C(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:i,reflect:s,wrapped:o},r){var a,n,l;i&&!(null!=(a=this._$Ej)?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,null!=(n=null!=r?r:e)?n:this[t]),!0!==o||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),!0===s&&this._$Em!==t&&(null!=(l=this._$Eq)?l:this._$Eq=new Set).add(t))}_$EP(){return S(this,null,(function*(){this.isUpdatePending=!0;try{yield this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&(yield t),!this.isUpdatePending}))}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;if(!this.hasUpdated){if(null!=this.renderRoot||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t){const{wrapped:t}=i,s=this[e];!0!==t||this._$AL.has(e)||void 0===s||this.C(e,void 0,i,s)}}let e=!1;const i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),null==(t=this._$EO)||t.forEach((t=>{var e;return null==(e=t.hostUpdate)?void 0:e.call(t)})),this.update(i)):this._$EM()}catch(t){throw e=!1,this._$EM(),t}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;null==(e=this._$EO)||e.forEach((t=>{var e;return null==(e=t.hostUpdated)?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach((t=>this._$ET(t,this[t])))),this._$EM()}updated(t){}firstUpdated(t){}}var K;J.elementStyles=[],J.shadowRootOptions={mode:"open"},J.elementProperties=new Map,J.finalized=new Map,null==G||G({ReactiveElement:J}),(null!=(K=$.reactiveElementVersions)?K:$.reactiveElementVersions=[]).push("2.1.1");
23
23
  /**
24
24
  * @license
25
25
  * Copyright 2017 Google LLC
@@ -41,7 +41,7 @@ const jt=t=>class extends t{static get properties(){return{_theme:{type:String,r
41
41
  * @license
42
42
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
43
43
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
44
- */,Rt=[],Lt=new Set,Wt=new Set;function $t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Ht(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Gt(t){return t.map((t=>t.cssText)).join("\n")}const Vt="vaadin-themable-mixin-style";function qt(t){t.prototype instanceof Nt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Vt).textContent=Gt(t.getStylesForThis()),Wt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&qt(i)}))}function Ut(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof P||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):Rt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&Wt.forEach((i=>{if(Ht(t,i)&&function(t){return $t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),qt(t),function(t){Lt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Nt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),N(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Vt).textContent=e.prototype._template.content.getElementById(Vt).textContent}(i):i||Lt.delete(e)}))}(t)}}))}function Yt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Rt}function Jt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Yt().find((e=>e.moduleId===t));i?e.push(...Kt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Zt(t){const e=`${t}-default-theme`,i=Yt().filter((i=>i.moduleId!==e&&Ht(i.themeFor,t))).map((t=>_(k({},t),{styles:[...Kt(t),...t.styles],includePriority:Jt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Yt().filter((t=>t.moduleId===e))}const Xt=t=>class extends(jt(t)){constructor(){super(),Lt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&Wt.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||$t(this)||function(t,e){const i=document.createElement("style");i.id=Vt,i.textContent=Gt(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Zt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
44
+ */,Rt=[],Lt=new Set,Wt=new Set;function $t(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function Ht(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Ut(t){return t.map((t=>t.cssText)).join("\n")}const Gt="vaadin-themable-mixin-style";function Vt(t){t.prototype instanceof Nt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Gt).textContent=Ut(t.getStylesForThis()),Wt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&Vt(i)}))}function qt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof P||(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1)))}(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(t,e,i):Rt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&Wt.forEach((i=>{if(Ht(t,i)&&function(t){return $t(customElements.get(t))}(i)){const t=customElements.get(i);!function(t,e){const i=t.__themes;return!(!i||!e)&&i.some((t=>t.styles.some((t=>e.some((e=>e.cssText===t.cssText))))))}(t,e)?(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`):console.warn(`Registering styles that already exist for ${i}`),Vt(t),function(t){Lt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof Nt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),N(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Gt).textContent=e.prototype._template.content.getElementById(Gt).textContent}(i):i||Lt.delete(e)}))}(t)}}))}function Yt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Rt}function Jt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Kt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=Yt().find((e=>e.moduleId===t));i?e.push(...Kt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Zt(t){const e=`${t}-default-theme`,i=Yt().filter((i=>i.moduleId!==e&&Ht(i.themeFor,t))).map((t=>_(k({},t),{styles:[...Kt(t),...t.styles],includePriority:Jt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:Yt().filter((t=>t.moduleId===e))}const Xt=t=>class extends(jt(t)){constructor(){super(),Lt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&Wt.add(this.is),this.elementStyles)return;const t=this.prototype._template;!t||$t(this)||function(t,e){const i=document.createElement("style");i.id=Gt,i.textContent=Ut(t),e.content.appendChild(i)}(this.getStylesForThis(),t)}static finalizeStyles(t){const e=this.getStylesForThis();return t?[...[t].flat(1/0),...e]:e}static getStylesForThis(){const e=t.__themes||[],i=Object.getPrototypeOf(this.prototype);this.__themes=[...e,...(i?i.constructor.__themes:[])||[],...Zt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
45
45
  /**
46
46
  * @license
47
47
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -131,7 +131,7 @@ const jt=t=>class extends t{static get properties(){return{_theme:{type:String,r
131
131
  --lumo-disabled-text-color: GrayText;
132
132
  }
133
133
  }
134
- `),Ut("",B`
134
+ `),qt("",B`
135
135
  [theme~='dark'] {
136
136
  /* Base (background) */
137
137
  --lumo-base-color: hsl(214, 35%, 21%);
@@ -466,7 +466,7 @@ const te=B`
466
466
  --lumo-line-height-s: 1.375;
467
467
  --lumo-line-height-m: 1.625;
468
468
  }
469
- `;Ut("",B`
469
+ `;qt("",B`
470
470
  body,
471
471
  :host {
472
472
  font-family: var(--lumo-font-family);
@@ -558,7 +558,7 @@ const te=B`
558
558
  border-left: none;
559
559
  border-right: 2px solid var(--lumo-contrast-30pct);
560
560
  }
561
- `,{moduleId:"lumo-typography"}),Qt("typography-props",te),Ut("vaadin-checkbox",B`
561
+ `,{moduleId:"lumo-typography"}),Qt("typography-props",te),qt("vaadin-checkbox",B`
562
562
  :host {
563
563
  color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
564
564
  font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
@@ -928,7 +928,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
928
928
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
929
929
  Code distributed by Google as part of the polymer project is also
930
930
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
931
- */;function Le(t){return t.indexOf(".")>=0}function We(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function $e(t,e){return 0===t.indexOf(e+".")}function He(t,e){return 0===e.indexOf(t+".")}function Ge(t,e,i){return e+i.slice(t.length)}function Ve(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function qe(t){return Array.isArray(t)?Ve(t).split("."):t.toString().split(".")}function Ue(t,e,i){let s=t,o=qe(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Ye(t,e,i){let s=t,o=qe(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
931
+ */;function Le(t){return t.indexOf(".")>=0}function We(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function $e(t,e){return 0===t.indexOf(e+".")}function He(t,e){return 0===e.indexOf(t+".")}function Ue(t,e,i){return e+i.slice(t.length)}function Ge(t){if(Array.isArray(t)){let e=[];for(let i=0;i<t.length;i++){let s=t[i].toString().split(".");for(let t=0;t<s.length;t++)e.push(s[t])}return e.join(".")}return t}function Ve(t){return Array.isArray(t)?Ge(t).split("."):t.toString().split(".")}function qe(t,e,i){let s=t,o=Ve(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function Ye(t,e,i){let s=t,o=Ve(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
932
932
  /**
933
933
  @license
934
934
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -966,7 +966,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
966
966
  * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
967
967
  * Google as part of the polymer project is also subject to an additional IP
968
968
  * rights grant found at http://polymer.github.io/PATENTS.txt
969
- */let Ci=0;const Si=[],Ti={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Di="__computeInfo",Ai=/[A-Z]/;function Ii(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function zi(t,e,i,s,o,r){if(e){let a=!1;const n=Ci++;for(let l in i){let h=e[o?We(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==n)&&(!o||Pi(l,e.trigger))&&(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,o,r),a=!0)}return a}return!1}function Mi(t,e,i,s,o,r,a,n){let l=!1,h=e[a?We(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==i)&&(!a||Pi(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,a,n),l=!0);return l}function Pi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!$e(i,t))||!(!e.wildcard||!He(i,t))}return!0}function Bi(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,a=o.property;r?r.call(t,t.__data[a],s[a]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function Ni(t,e,i){let s=We(e);return s!==e&&(Oi(t,Qe(s)+"-changed",i[e],e),!0)}function Oi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Re(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function Ei(t,e,i,s,o,r){let a=(r?We(e):e)!=e?e:null,n=a?Ue(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Oi(t,o.eventName,n,a)}function Fi(t,e,i,s,o){let r=t.__data[e];de&&(r=de(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const ji=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const a=s+o>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){r=a;break}o=a-1}}r<0&&(r=o+1),e.splice(r,0,t)},Ri=(t,e,i,s,o)=>{const r=e[o?We(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun!==Ci&&(!o||Pi(t,a.trigger))&&(a.info.lastRun=Ci,ji(a.info,i,s))}};function Li(t,e,i,s,o){let r=Ui(t,e,i,0,o);if(r===Si)return!1;let a=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function Wi(t,e,i,s,o,r,a){i.bindings=i.bindings||[];let n={kind:s,target:o,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||Qe(o)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let s=n.parts[i];s.compoundIndex=i,$i(t,e,n,s,l)}}function $i(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,a={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=ts(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Hi,info:a,trigger:s})}}}function Hi(t,e,i,s,o,r,a){let n=a[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let s=i[e];e=Ge(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=o.evaluator._evaluateBinding(t,h,e,i,s,r);a!==Si&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),de&&(o=de(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Ti.READ_ONLY]||!e[Ti.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,n,l,h,a)}}function Gi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Re(t)),t[r]=e.literal)}}function Vi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,a=t.detail,n=a&&a.path;n?(s=Ge(i,s,n),r=a&&a.value):r=t.currentTarget[i],r=o?!r:r,(!e[Ti.READ_ONLY]||!e[Ti.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!n)&&(!a||!a.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function qi(t,e,i,s,o,r){let a={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:a,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function Ui(t,e,i,s,o){let r=t._methodHost||t,a=r[o.methodName];if(a){let s=t._marshalArgs(o.args,e,i);return s===Si?Si:a.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Yi=[],Ji="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ki="(?:("+Ji+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Zi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ji+"\\s*(?:\\(\\s*(?:(?:"+Ki+"(?:,\\s*"+Ki+")*)?)\\)\\s*)?)(?:]]|}})","g");function Xi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Qi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Yi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=ts(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function ts(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=We(e),i.structured=Le(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function es(t,e,i){let s=Ue(t,i);return void 0===s&&(s=e[i]),s}function is(t,e,i,s){const o={indexSplices:s};be&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),be&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function ss(t,e,i,s,o,r){is(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const os=Ce((t=>{const e=_i(pi(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ti}_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(rs.length){let t=rs[rs.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ti.READ_ONLY];for(let i in t)(!e||!e[i])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ti.READ_ONLY);let s=Ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Ii(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ti.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ti.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ti.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ti.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||We(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Ue(this,t);if(!(t=Ye(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let a=s[r];He(r,e)?(o=Ge(r,a,e),t._setPendingPropertyOrPath(o,i,!0,!0)):He(a,e)&&(o=Ge(a,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Re(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Le(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ti.NOTIFY]&&this[Ti.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)(e||!this[Ti.READ_ONLY]||!this[Ti.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ti.COMPUTE];if(o)if(ge){Ci++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ti.COMPUTE];let s,{counts:o,ready:r,total:a}=function(t){const e=t[Di],i={},s=t[Ti.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--o[e]&&r.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)Ri(t,o,a,r,s);let n;for(;n=a.shift();)Li(t,"",e,0,n)&&Ri(n.methodInfo,o,a,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;zi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),zi(this,this[Ti.REFLECT],e,i,o),zi(this,this[Ti.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,a,n=t[Ti.NOTIFY],l=Ci++;for(let a in e)e[a]&&(n&&Mi(t,n,l,a,i,s,o)||o&&Ni(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ti.PROPAGATE]&&zi(this,this[Ti.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{zi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ve(t),e=Ve(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ve(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};is(this,Ue(this,t,i),i.path,e)}get(t,e){return Ue(e||this,t)}set(t,e,i){i?Ye(i,t,e):(!this[Ti.READ_ONLY]||!this[Ti.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Ue(this,t,i),o=s.length,r=s.push(...e);return e.length&&ss(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Ue(this,t,e),s=!!i.length,o=i.pop();return s&&ss(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},a=Ue(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||o.length)&&ss(this,a,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Ue(this,t,e),s=!!i.length,o=i.shift();return s&&ss(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Ue(this,t,i),o=s.unshift(...e);return e.length&&ss(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Ue(this,t,s),i=s.path}else i=Array.isArray(t)?Ve(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Ti.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Ti.OBSERVE,{fn:Bi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ti.OBSERVE,{fn:Bi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Qi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");qi(this,i,Ti.OBSERVE,Ui,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ti.NOTIFY,{fn:Ei,info:{eventName:Qe(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ti.REFLECT,{fn:Fi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Qi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=qi(this,s,Ti.COMPUTE,Li,t,i);Ii(this,Di)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,a=t.length;r<a;r++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=He(a,e),o=es(s,i,t?e:a);h={path:t?e:a,value:o,base:t?Ue(s,a):o}}else h=n?es(s,i,a):s[a];if(be&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Si;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),rs.push(this);let i=super._stampTemplate(t,e);if(rs.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Gi(o,i),Vi(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Re(Re(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Xi(e)||" ",Wi(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let a=this._parseBindings(r,i);if(a){let e=o,r="property";Ai.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let n=Xi(a);return n&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(o)),t.setAttribute(o,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Xe(o)),Wi(this,i,s,r,o,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,a=s.templateInfo,n="dom-if"===r.localName;ye&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,o=!1);let l=a.hostProps;if(we&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ye||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Wi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Zi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],a=!!i[2],n=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Qi(n),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(n);s.push({source:n,mode:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),o=Zi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let a;return a=e.signature?Ui(t,i,s,0,e.signature):i!=e.source?Ue(t,e.source):r&&Le(i)?Ue(t,i):t.__data[i],e.negate&&(a=!a),a}}})),rs=[],as=Ce((t=>{const e=hi(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
969
+ */let Ci=0;const Si=[],Ti={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Di="__computeInfo",Ai=/[A-Z]/;function Ii(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function zi(t,e,i,s,o,r){if(e){let a=!1;const n=Ci++;for(let l in i){let h=e[o?We(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==n)&&(!o||Pi(l,e.trigger))&&(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,o,r),a=!0)}return a}return!1}function Mi(t,e,i,s,o,r,a,n){let l=!1,h=e[a?We(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)(!e.info||e.info.lastRun!==i)&&(!a||Pi(s,e.trigger))&&(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,a,n),l=!0);return l}function Pi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!$e(i,t))||!(!e.wildcard||!He(i,t))}return!0}function Bi(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,a=o.property;r?r.call(t,t.__data[a],s[a]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function Ni(t,e,i){let s=We(e);return s!==e&&(Oi(t,Qe(s)+"-changed",i[e],e),!0)}function Oi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),Re(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function Ei(t,e,i,s,o,r){let a=(r?We(e):e)!=e?e:null,n=a?qe(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),Oi(t,o.eventName,n,a)}function Fi(t,e,i,s,o){let r=t.__data[e];de&&(r=de(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const ji=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const a=s+o>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){r=a;break}o=a-1}}r<0&&(r=o+1),e.splice(r,0,t)},Ri=(t,e,i,s,o)=>{const r=e[o?We(t):t];if(r)for(let e=0;e<r.length;e++){const a=r[e];a.info.lastRun!==Ci&&(!o||Pi(t,a.trigger))&&(a.info.lastRun=Ci,ji(a.info,i,s))}};function Li(t,e,i,s,o){let r=qi(t,e,i,0,o);if(r===Si)return!1;let a=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,r,!0):(t[a]=r,!1)}function Wi(t,e,i,s,o,r,a){i.bindings=i.bindings||[];let n={kind:s,target:o,parts:r,literal:a,isCompound:1!==r.length};if(i.bindings.push(n),function(t){return!!t.target&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(n)){let{event:t,negate:e}=n.parts[0];n.listenerEvent=t||Qe(o)+"-changed",n.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<n.parts.length;i++){let s=n.parts[i];s.compoundIndex=i,$i(t,e,n,s,l)}}function $i(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,a={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=ts(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Hi,info:a,trigger:s})}}}function Hi(t,e,i,s,o,r,a){let n=a[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&n.__isPropertyEffectsClient&&n.__dataHasAccessor&&n.__dataHasAccessor[l.target]){let s=i[e];e=Ue(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=o.evaluator._evaluateBinding(t,h,e,i,s,r);a!==Si&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"===i.target||"value"===i.target&&("input"===t.localName||"textarea"===t.localName))&&(e=null==e?"":e),e}(e,o,i,s),de&&(o=de(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?(!e[Ti.READ_ONLY]||!e[Ti.READ_ONLY][s])&&e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,n,l,h,a)}}function Ui(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=Re(t)),t[r]=e.literal)}}function Gi(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,a=t.detail,n=a&&a.path;n?(s=Ue(i,s,n),r=a&&a.value):r=t.currentTarget[i],r=o?!r:r,(!e[Ti.READ_ONLY]||!e[Ti.READ_ONLY][s])&&e._setPendingPropertyOrPath(s,r,!0,!!n)&&(!a||!a.queueProperty)&&e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Vi(t,e,i,s,o,r){let a={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:a,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function qi(t,e,i,s,o){let r=t._methodHost||t,a=r[o.methodName];if(a){let s=t._marshalArgs(o.args,e,i);return s===Si?Si:a.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const Yi=[],Ji="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ki="(?:("+Ji+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Zi=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Ji+"\\s*(?:\\(\\s*(?:(?:"+Ki+"(?:,\\s*"+Ki+")*)?)\\)\\s*)?)(?:]]|}})","g");function Xi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Qi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Yi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=ts(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function ts(t){let e=t.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),i={name:e,value:"",literal:!1},s=e[0];switch("-"===s&&(s=e[1]),s>="0"&&s<="9"&&(s="#"),s){case"'":case'"':i.value=e.slice(1,-1),i.literal=!0;break;case"#":i.value=Number(e),i.literal=!0}return i.literal||(i.rootProperty=We(e),i.structured=Le(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function es(t,e,i){let s=qe(t,i);return void 0===s&&(s=e[i]),s}function is(t,e,i,s){const o={indexSplices:s};be&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),be&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function ss(t,e,i,s,o,r){is(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const os=Ce((t=>{const e=_i(pi(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return Ti}_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(rs.length){let t=rs[rs.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Ti.READ_ONLY];for(let i in t)(!e||!e[i])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==Ti.READ_ONLY);let s=Ii(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=Ii(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return!(!i||!i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Ti.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Ti.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Ti.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Ti.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||We(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=qe(this,t);if(!(t=Ye(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let a=s[r];He(r,e)?(o=Ue(r,a,e),t._setPendingPropertyOrPath(o,i,!0,!0)):He(a,e)&&(o=Ue(a,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){(i!==t[e]||"object"==typeof i)&&("className"===e&&(t=Re(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Le(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[Ti.NOTIFY]&&this[Ti.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)(e||!this[Ti.READ_ONLY]||!this[Ti.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[Ti.COMPUTE];if(o)if(ge){Ci++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[Ti.COMPUTE];let s,{counts:o,ready:r,total:a}=function(t){const e=t[Di],i={},s=t[Ti.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--o[e]&&r.push(e)}))}0!==a&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),a=[];for(let t in e)Ri(t,o,a,r,s);let n;for(;n=a.shift();)Li(t,"",e,0,n)&&Ri(n.methodInfo,o,a,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;zi(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),zi(this,this[Ti.REFLECT],e,i,o),zi(this,this[Ti.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,a,n=t[Ti.NOTIFY],l=Ci++;for(let a in e)e[a]&&(n&&Mi(t,n,l,a,i,s,o)||o&&Ni(t,a,i))&&(r=!0);r&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[Ti.PROPAGATE]&&zi(this,this[Ti.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{zi(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Ge(t),e=Ge(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ge(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};is(this,qe(this,t,i),i.path,e)}get(t,e){return qe(e||this,t)}set(t,e,i){i?Ye(i,t,e):(!this[Ti.READ_ONLY]||!this[Ti.READ_ONLY][t])&&this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=qe(this,t,i),o=s.length,r=s.push(...e);return e.length&&ss(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=qe(this,t,e),s=!!i.length,o=i.pop();return s&&ss(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},a=qe(this,t,r);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||o.length)&&ss(this,a,r.path,e,s.length,o),o}shift(t){let e={path:""},i=qe(this,t,e),s=!!i.length,o=i.shift();return s&&ss(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=qe(this,t,i),o=s.unshift(...e);return e.length&&ss(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=qe(this,t,s),i=s.path}else i=Array.isArray(t)?Ge(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){this._addPropertyEffect(t,Ti.READ_ONLY),e&&(this["_set"+function(t){return t[0].toUpperCase()+t.substring(1)}(t)]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:!!i};this._addPropertyEffect(t,Ti.OBSERVE,{fn:Bi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,Ti.OBSERVE,{fn:Bi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Qi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Vi(this,i,Ti.OBSERVE,qi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Ti.NOTIFY,{fn:Ei,info:{eventName:Qe(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Ti.REFLECT,{fn:Fi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Qi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Vi(this,s,Ti.COMPUTE,Li,t,i);Ii(this,Di)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,a=t.length;r<a;r++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=He(a,e),o=es(s,i,t?e:a);h={path:t?e:a,value:o,base:t?qe(s,a):o}}else h=n?es(s,i,a):s[a];if(be&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return Si;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),rs.push(this);let i=super._stampTemplate(t,e);if(rs.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Ui(o,i),Gi(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];Re(Re(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Xi(e)||" ",Wi(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let a=this._parseBindings(r,i);if(a){let e=o,r="property";Ai.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let n=Xi(a);return n&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(o)),t.setAttribute(o,n)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Xe(o)),Wi(this,i,s,r,o,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,a=s.templateInfo,n="dom-if"===r.localName;ye&&(n||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,o=!1);let l=a.hostProps;if(we&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ye||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Wi(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Zi.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],a=!!i[2],n=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Qi(n),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(n);s.push({source:n,mode:r,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),o=Zi.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let a;return a=e.signature?qi(t,i,s,0,e.signature):i!=e.source?qe(t,e.source):r&&Le(i)?qe(t,i):t.__data[i],e.negate&&(a=!a),a}}})),rs=[],as=Ce((t=>{const e=hi(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
970
970
  /**
971
971
  @license
972
972
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1518,17 +1518,17 @@ class Hs{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this.
1518
1518
  * @license
1519
1519
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1520
1520
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1521
- */let Gs=0;function Vs(){return Gs++}
1521
+ */let Us=0;function Gs(){return Us++}
1522
1522
  /**
1523
1523
  * @license
1524
1524
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1525
1525
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1526
- */class qs extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Vs()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:a,useUniqueId:n,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),n&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Hs(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1526
+ */class Vs extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${Gs()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:a,useUniqueId:n,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof a||a,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),n&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new Hs(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>{return!((e=t).nodeType===Node.TEXT_NODE&&""===e.textContent.trim()||i.includes(t));var e}));e.length&&(this.nodes=i.filter((t=>!e.includes(t))),e.forEach((t=>{this.teardownNode(t)}))),s&&s.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...i,...s].filter((t=>t!==this.defaultNode)),s.forEach((t=>{this.initAddedNode(t)}))):(this.node&&this.node.remove(),this.node=s[0],this.initAddedNode(this.node)))}))}}
1527
1527
  /**
1528
1528
  * @license
1529
1529
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1530
1530
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1531
- */class Us extends qs{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1531
+ */class qs extends Vs{constructor(t){super(t,"tooltip"),this.setTarget(t)}initCustomNode(t){t.target=this.target,void 0!==this.ariaTarget&&(t.ariaTarget=this.ariaTarget),void 0!==this.context&&(t.context=this.context),void 0!==this.manual&&(t.manual=this.manual),void 0!==this.opened&&(t.opened=this.opened),void 0!==this.position&&(t._position=this.position),void 0!==this.shouldShow&&(t.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(t){this.ariaTarget=t;const e=this.node;e&&(e.ariaTarget=t)}setContext(t){this.context=t;const e=this.node;e&&(e.context=t)}setManual(t){this.manual=t;const e=this.node;e&&(e.manual=t)}setOpened(t){this.opened=t;const e=this.node;e&&(e.opened=t)}setPosition(t){this.position=t;const e=this.node;e&&(e._position=t)}setShouldShow(t){this.shouldShow=t;const e=this.node;e&&(e.shouldShow=t)}setTarget(t){this.target=t;const e=this.node;e&&(e.target=t)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}
1532
1532
  /**
1533
1533
  @license
1534
1534
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -1568,13 +1568,13 @@ const Fo=Ce((t=>class extends t{get _keyboardActive(){return Io()}ready(){this.a
1568
1568
  * @license
1569
1569
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1570
1570
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1571
- */function Go(t){return Ho.has(t)||Ho.set(t,new WeakMap),Ho.get(t)}function Vo(t,e){t&&t.removeAttribute(e)}function qo(t,e){if(!t||!e)return;const i=Go(e);if(i.has(t))return;const s=Ls(t.getAttribute(e));i.set(t,new Set(s))}function Uo(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,a=Go(e),n=a.get(t);if(!r&&n)return o&&n.delete(o),void(s&&n.add(s));r&&(n?s||a.delete(t):qo(t,e),Vo(t,e)),function(t,e,i){const s=Ls(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Ws(s)):t.removeAttribute(e)}(t,e,o);const l=s||Ws(n);l&&$s(t,e,l)}
1571
+ */function Uo(t){return Ho.has(t)||Ho.set(t,new WeakMap),Ho.get(t)}function Go(t,e){t&&t.removeAttribute(e)}function Vo(t,e){if(!t||!e)return;const i=Uo(e);if(i.has(t))return;const s=Ls(t.getAttribute(e));i.set(t,new Set(s))}function qo(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,a=Uo(e),n=a.get(t);if(!r&&n)return o&&n.delete(o),void(s&&n.add(s));r&&(n?s||a.delete(t):Vo(t,e),Go(t,e)),function(t,e,i){const s=Ls(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Ws(s)):t.removeAttribute(e)}(t,e,o);const l=s||Ws(n);l&&$s(t,e,l)}
1572
1572
  /**
1573
1573
  * @license
1574
1574
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1575
1575
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1576
1576
  */
1577
- class Yo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){qo(t,e),Vo(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Go(e),s=i.get(t);s&&0!==s.size?$s(t,e,Ws(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Uo(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Uo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Uo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setAriaRequiredAttribute(t){this.__target&&(["input","textarea"].includes(this.__target.localName)||(t?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}
1577
+ class Yo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),null!=this.__labelIdFromUser&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label)}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t}setLabelId(t,e=!1){this.__setLabelIdToAriaAttribute(t,e?this.__labelIdFromUser:this.__labelId,e),e?this.__labelIdFromUser=t:this.__labelId=t}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t}__setAriaLabelToAttribute(t){this.__target&&(t?(function(t,e){Vo(t,e),Go(t,e)}(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Uo(e),s=i.get(t);s&&0!==s.size?$s(t,e,Ws(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){qo(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){qo(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){qo(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")))}}
1578
1578
  /**
1579
1579
  * @license
1580
1580
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1589,7 +1589,7 @@ class Yo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1589
1589
  * @license
1590
1590
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
1591
1591
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1592
- */Ko.style.position="fixed",Ko.style.clip="rect(0px, 0px, 0px, 0px)",Ko.setAttribute("aria-live","polite"),document.body.appendChild(Ko);class Qo extends qs{constructor(t,e,i,s={}){super(t,e,i,_(k({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1592
+ */Ko.style.position="fixed",Ko.style.clip="rect(0px, 0px, 0px, 0px)",Ko.setAttribute("aria-live","polite"),document.body.appendChild(Ko);class Qo extends Vs{constructor(t,e,i,s={}){super(t,e,i,_(k({},s),{useUniqueId:!0}))}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t)}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t)}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver((t=>{t.forEach((t=>{const e=t.target,i=e===this.node;"attributes"===t.type?i&&this.__updateNodeId(e):(i||e.parentElement===this.node)&&this.__notifyChange(this.node)}))})),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(t){return!!t&&(t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&""!==t.textContent.trim())}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}))}__updateNodeId(t){t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||!this.nodes||t===this.nodes[0])&&!t.id&&(t.id=this.defaultId)}}
1593
1593
  /**
1594
1594
  * @license
1595
1595
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1619,7 +1619,7 @@ class Yo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1619
1619
  * @license
1620
1620
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
1621
1621
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1622
- */class ar extends qs{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1622
+ */class ar extends Vs{constructor(t,e,i={}){const{uniqueIdPrefix:s}=i;super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0,uniqueIdPrefix:s})}}
1623
1623
  /**
1624
1624
  * @license
1625
1625
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -1640,7 +1640,7 @@ class Yo{constructor(t){this.host=t,this.__required=!1}setTarget(t){this.__targe
1640
1640
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
1641
1641
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1642
1642
  */
1643
- Ut("vaadin-checkbox",B`
1643
+ qt("vaadin-checkbox",B`
1644
1644
  :host {
1645
1645
  display: inline-block;
1646
1646
  }
@@ -1744,7 +1744,7 @@ Ut("vaadin-checkbox",B`
1744
1744
  </div>
1745
1745
  </div>
1746
1746
  <slot name="tooltip"></slot>
1747
- `}ready(){super.ready(),this._tooltipController=new Us(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}T(hr);
1747
+ `}ready(){super.ready(),this._tooltipController=new qs(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}T(hr);
1748
1748
  /**
1749
1749
  * @license
1750
1750
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -1923,7 +1923,7 @@ const cr=B`
1923
1923
  margin-left: 0;
1924
1924
  margin-right: calc(var(--lumo-border-radius-m) / 4);
1925
1925
  }
1926
- `;Ut("",dr,{moduleId:"lumo-required-field"}),Ut("vaadin-checkbox-group",[dr,cr,B`
1926
+ `;qt("",dr,{moduleId:"lumo-required-field"}),qt("vaadin-checkbox-group",[dr,cr,B`
1927
1927
  :host {
1928
1928
  color: var(--lumo-body-text-color);
1929
1929
  font-size: var(--lumo-font-size-m);
@@ -1972,7 +1972,7 @@ const cr=B`
1972
1972
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1973
1973
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1974
1974
  */
1975
- const ur=t=>class extends(rr(Fo(Co(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new Us(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Hs(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1975
+ const ur=t=>class extends(rr(Fo(Co(t)))){static get properties(){return{value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new qs(this),this._tooltipController.addEventListener("tooltip-changed",(t=>{const e=t.detail.node;if(e&&e.isConnected){const t=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(t)}else this._tooltipController.setAriaTarget([])}))}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new Hs(t,(({addedNodes:t,removedNodes:e})=>{const i=this.__filterCheckboxes(t),s=this.__filterCheckboxes(e);i.forEach(this.__registerCheckbox),s.forEach(this.__unregisterCheckbox);const o=this.__checkboxes.map((t=>t.inputElement));this._tooltipController.setAriaTarget(o),this.__warnOfCheckboxesWithoutValue(i)})),this.addController(this._tooltipController)}checkValidity(){return!this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(t){return t.filter((t=>t.nodeType===Node.ELEMENT_NODE&&"vaadin-checkbox"===t.localName))}__warnOfCheckboxesWithoutValue(t){t.some((t=>{const{value:e}=t;return!(t.hasAttribute("value")||e&&"on"!==e)}))&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.")}__registerCheckbox(t){t.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(t.disabled=!0),this.readonly&&(t.readonly=!0),t.checked?this.__addCheckboxToValue(t.value):this.value&&this.value.includes(t.value)&&(t.checked=!0)}__unregisterCheckbox(t){t.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),t.checked&&this.__removeCheckboxFromValue(t.value)}_disabledChanged(t,e){super._disabledChanged(t,e),(t||void 0!==e)&&e!==t&&this.__checkboxes.forEach((e=>{e.disabled=t}))}__addCheckboxToValue(t){this.value?this.value.includes(t)||(this.value=[...this.value,t]):this.value=[t]}__removeCheckboxFromValue(t){this.value&&this.value.includes(t)&&(this.value=this.value.filter((e=>e!==t)))}__onCheckboxCheckedChanged(t){const e=t.target;e.checked?this.__addCheckboxToValue(e.value):this.__removeCheckboxFromValue(e.value)}__valueChanged(t,e){t&&0===t.length&&void 0===e||(this.toggleAttribute("has-value",t&&t.length>0),this.__checkboxes.forEach((e=>{e.checked=t&&t.includes(e.value)})),void 0!==e&&this.validate())}__readonlyChanged(t,e){(t||e)&&this.__checkboxes.forEach((e=>{e.readonly=t}))}_shouldRemoveFocus(t){return!this.contains(t.relatedTarget)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}}
1976
1976
  /**
1977
1977
  * @license
1978
1978
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
@@ -1983,7 +1983,7 @@ const ur=t=>class extends(rr(Fo(Co(t)))){static get properties(){return{value:{t
1983
1983
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
1984
1984
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1985
1985
  */
1986
- Ut("vaadin-checkbox-group",B`
1986
+ qt("vaadin-checkbox-group",B`
1987
1987
  :host {
1988
1988
  display: inline-flex;
1989
1989
  }
@@ -2104,7 +2104,7 @@ const mr=B`
2104
2104
  opacity: 1;
2105
2105
  }
2106
2106
  }
2107
- `;Ut("",mr,{moduleId:"lumo-overlay"});
2107
+ `;qt("",mr,{moduleId:"lumo-overlay"});
2108
2108
  /**
2109
2109
  * @license
2110
2110
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -2140,7 +2140,7 @@ const vr=B`
2140
2140
  opacity: 0;
2141
2141
  }
2142
2142
  }
2143
- `;Ut("",vr,{moduleId:"lumo-menu-overlay-core"});const fr=[mr,vr,B`
2143
+ `;qt("",vr,{moduleId:"lumo-menu-overlay-core"});const fr=[mr,vr,B`
2144
2144
  /* Small viewport (bottom sheet) styles */
2145
2145
  /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
2146
2146
  @media (max-width: 450px), (max-height: 450px) {
@@ -2202,7 +2202,7 @@ const vr=B`
2202
2202
  transform: translateY(150%);
2203
2203
  }
2204
2204
  }
2205
- `];Ut("",fr,{moduleId:"lumo-menu-overlay"}),Ut("vaadin-date-picker-overlay",[fr,B`
2205
+ `];qt("",fr,{moduleId:"lumo-menu-overlay"}),qt("vaadin-date-picker-overlay",[fr,B`
2206
2206
  [part='overlay'] {
2207
2207
  /*
2208
2208
  Width:
@@ -2523,7 +2523,7 @@ const vr=B`
2523
2523
  margin-left: 0;
2524
2524
  margin-right: 0;
2525
2525
  }
2526
- `;Ut("vaadin-button",br,{moduleId:"lumo-button"}),Ut("vaadin-date-picker-year",B`
2526
+ `;qt("vaadin-button",br,{moduleId:"lumo-button"}),qt("vaadin-date-picker-year",B`
2527
2527
  :host([current]) [part='year-number'] {
2528
2528
  color: var(--lumo-primary-text-color);
2529
2529
  }
@@ -2547,7 +2547,7 @@ const vr=B`
2547
2547
  color: var(--lumo-disabled-text-color);
2548
2548
  content: '\\2022';
2549
2549
  }
2550
- `,{moduleId:"lumo-date-picker-year"}),Ut("vaadin-date-picker-overlay-content",B`
2550
+ `,{moduleId:"lumo-date-picker-year"}),qt("vaadin-date-picker-overlay-content",B`
2551
2551
  :host {
2552
2552
  position: relative;
2553
2553
  /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
@@ -2697,7 +2697,7 @@ const vr=B`
2697
2697
  padding-left: 50px;
2698
2698
  }
2699
2699
  }
2700
- `,{moduleId:"lumo-date-picker-overlay-content"}),Ut("vaadin-month-calendar",B`
2700
+ `,{moduleId:"lumo-date-picker-overlay-content"}),qt("vaadin-month-calendar",B`
2701
2701
  :host {
2702
2702
  -moz-user-select: none;
2703
2703
  -webkit-user-select: none;
@@ -2844,7 +2844,7 @@ const vr=B`
2844
2844
  :host([disabled]) * {
2845
2845
  color: var(--lumo-disabled-text-color) !important;
2846
2846
  }
2847
- `,{moduleId:"lumo-month-calendar"}),Ut("vaadin-input-container",B`
2847
+ `,{moduleId:"lumo-month-calendar"}),qt("vaadin-input-container",B`
2848
2848
  :host {
2849
2849
  background: var(--_background);
2850
2850
  padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
@@ -3055,7 +3055,7 @@ const gr=B`
3055
3055
  font-family: 'lumo-icons';
3056
3056
  display: block;
3057
3057
  }
3058
- `;Ut("",gr,{moduleId:"lumo-field-button"});
3058
+ `;qt("",gr,{moduleId:"lumo-field-button"});
3059
3059
  /**
3060
3060
  * @license
3061
3061
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
@@ -3192,7 +3192,7 @@ const yr=[dr,gr,cr,B`
3192
3192
  [part='clear-button']::before {
3193
3193
  content: var(--lumo-icons-cross);
3194
3194
  }
3195
- `];Ut("",yr,{moduleId:"lumo-input-field-shared-styles"}),Ut("vaadin-date-picker",[yr,B`
3195
+ `];qt("",yr,{moduleId:"lumo-input-field-shared-styles"}),qt("vaadin-date-picker",[yr,B`
3196
3196
  [part='toggle-button']::before {
3197
3197
  content: var(--lumo-icons-calendar);
3198
3198
  }
@@ -3231,7 +3231,7 @@ const wr=t=>class extends t{static get properties(){return{disabled:{type:Boolea
3231
3231
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3232
3232
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3233
3233
  */
3234
- Ut("vaadin-input-container",B`
3234
+ qt("vaadin-input-container",B`
3235
3235
  :host {
3236
3236
  display: flex;
3237
3237
  align-items: center;
@@ -3399,22 +3399,22 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
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 Hr=[];class Gr{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return Eo(t,e)?Po(e):e}(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,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Hr.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Hr.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Hr).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
3402
+ */const Hr=[];class Ur{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return Eo(t,e)?Po(e):e}(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,0===this.__focusableElements.length)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Hr.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Hr.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Hr).pop()&&"Tab"===t.key&&(t.preventDefault(),this.__focusNextElement(t.shiftKey))}__focusNextElement(t=!1){const e=this.__focusableElements,i=e[(e.length+this.__focusedElementIndex+(t?-1:1))%e.length];i.focus(),"input"===i.localName&&i.select()}}
3403
3403
  /**
3404
3404
  * @license
3405
3405
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3406
3406
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3407
- */const Vr=t=>class extends(Jo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Wr(this),this.__focusTrapController=new Gr(this),this.__focusRestorationController=new $r}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!Io();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=Ao();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3407
+ */const Gr=t=>class extends(Jo(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Wr(this),this.__focusTrapController=new Ur(this),this.__focusRestorationController=new $r}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController)}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const t=!Io();this.__focusRestorationController.restoreFocus({preventScroll:t})}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode)}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay))}_shouldRestoreFocus(){const t=Ao();return t===document.body||this._deepContains(t)}_deepContains(t){if(this.contains(t))return!0;let e=t;const i=t.ownerDocument;for(;e&&e!==i&&e!==this;)e=e.parentNode||e.host;return e===this}}
3408
3408
  /**
3409
3409
  * @license
3410
3410
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3411
3411
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3412
- */,qr=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Ur=()=>qr().filter((t=>t.$.overlay)),Yr=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Ur().pop())()}bringToFront(){let t="";const e=qr().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ur().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=Ur();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3412
+ */,Vr=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),qr=()=>Vr().filter((t=>t.$.overlay)),Yr=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===qr().pop())()}bringToFront(){let t="";const e=Vr().filter((t=>t!==this)).pop();e&&(t=e.__zIndex+1),this.style.zIndex=t,this.__zIndex=t||parseFloat(getComputedStyle(this).zIndex)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),qr().forEach((t=>{t!==this&&(t.$.overlay.style.pointerEvents="none")}))}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const t=qr();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
3413
3413
  /**
3414
3414
  * @license
3415
3415
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
3416
3416
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3417
- */,Jr=t=>class extends(Vr(Yr(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Mr&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,r&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||n||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Dr(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3417
+ */,Jr=t=>class extends(Gr(Yr(t))){static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),Mr&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{})),this.addEventListener("mouseup",(()=>{document.activeElement===document.body&&"0"===this.$.overlay.getAttribute("tabindex")&&this.$.overlay.focus()}))}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model)}close(t){const e=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),e.defaultPrevented||(this.opened=!1)}_detectIosNavbar(){if(!this.opened)return;const t=window.innerHeight,e=window.innerWidth>t,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e&&i>t?i-t+"px":"0")}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0)}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0)}_rendererOrDataChanged(t,e,i,s){const o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,r&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||n||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),Dr(this,(()=>{this._trapFocus();const t=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(t)})),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):e&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners())}_hiddenChanged(t){t&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const t=getComputedStyle(this),e=t.getPropertyValue("animation-name");return!("none"===t.getPropertyValue("display"))&&e&&"none"!==e}_enqueueAnimation(t,e){const i=`__${t}Handler`,s=t=>{t&&t.target!==this||(e(),this.removeEventListener("animationend",s),delete this[i])};this[i]=s,this.addEventListener("animationend",s)}_flushAnimation(t){const e=`__${t}Handler`;"function"==typeof this[e]&&this[e]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",(()=>{this._finishOpening()})):this._finishOpening()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_finishOpening(){this.removeAttribute("opening")}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"))}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",(()=>{this._finishClosing()})):this._finishClosing())}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}_mouseDownListener(t){this._mouseDownInside=t.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(t){this._mouseUpInside=t.composedPath().indexOf(this.$.overlay)>=0}_shouldCloseOnOutsideClick(t){return this._last}_outsideClickListener(t){if(t.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._shouldCloseOnOutsideClick(t))return;const e=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}_keydownListener(t){if(this._last&&(!this.modeless||t.composedPath().includes(this.$.overlay))&&"Escape"===t.key){const e=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:t}});this.dispatchEvent(e),this.opened&&!e.defaultPrevented&&this.close(t)}}}
3418
3418
  /**
3419
3419
  * @license
3420
3420
  * Copyright (c) 2024 Vaadin Ltd.
@@ -3440,7 +3440,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
3440
3440
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3441
3441
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3442
3442
  */
3443
- Ut("vaadin-date-picker-overlay",[kr,B`
3443
+ qt("vaadin-date-picker-overlay",[kr,B`
3444
3444
  [part='overlay'] {
3445
3445
  display: flex;
3446
3446
  flex: auto;
@@ -3538,7 +3538,7 @@ const ia=B`
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
- */Ut("vaadin-button",ia,{moduleId:"vaadin-button-styles"});class oa extends(sa(js(Xt(Jo(ms))))){static get is(){return"vaadin-button"}static get template(){return us`
3541
+ */qt("vaadin-button",ia,{moduleId:"vaadin-button-styles"});class oa extends(sa(js(Xt(Jo(ms))))){static get is(){return"vaadin-button"}static get template(){return us`
3542
3542
  <div class="vaadin-button-container">
3543
3543
  <span part="prefix" aria-hidden="true">
3544
3544
  <slot name="prefix"></slot>
@@ -3551,7 +3551,7 @@ const ia=B`
3551
3551
  </span>
3552
3552
  </div>
3553
3553
  <slot name="tooltip"></slot>
3554
- `}ready(){super.ready(),this._tooltipController=new Us(this),this.addController(this._tooltipController)}}function ra(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function aa(t,e,i=ra){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function na(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function la(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(na(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function ha(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function ca(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function da(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}T(oa);
3554
+ `}ready(){super.ready(),this._tooltipController=new qs(this),this.addController(this._tooltipController)}}function ra(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function aa(t,e,i=ra){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function na(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function la(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(na(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function ha(t,e){return e.filter((t=>void 0!==t)).reduce(((e,i)=>i?e?Math.abs(t.getTime()-i.getTime())<Math.abs(e.getTime()-t.getTime())?i:e:i:e))}function ca(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function da(t){const e=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(t);if(!e)return;const i=new Date(0,0);return i.setFullYear(parseInt(e[1],10)),i.setMonth(parseInt(e[2],10)-1),i.setDate(parseInt(e[3],10)),i}T(oa);
3555
3555
  /**
3556
3556
  @license
3557
3557
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -3570,7 +3570,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
3570
3570
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
3571
3571
  Code distributed by Google as part of the polymer project is also
3572
3572
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3573
- */},va=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=ma()}while(t||e)},fa=document.createElement("template");fa.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class ba extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(fa.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),va()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=As.debounce(this._debouncerScrollFinish,_s.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=As.debounce(this._debouncerUpdateClones,_s.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${Vs()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3573
+ */},va=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=ma()}while(t||e)},fa=document.createElement("template");fa.innerHTML='\n <style>\n :host {\n display: block;\n overflow: hidden;\n height: 500px;\n }\n\n #scroller {\n position: relative;\n height: 100%;\n overflow: auto;\n outline: none;\n margin-right: -40px;\n -webkit-overflow-scrolling: touch;\n overflow-x: hidden;\n }\n\n #scroller.notouchscroll {\n -webkit-overflow-scrolling: auto;\n }\n\n #scroller::-webkit-scrollbar {\n display: none;\n }\n\n .buffer {\n position: absolute;\n width: var(--vaadin-infinite-scroller-buffer-width, 100%);\n box-sizing: border-box;\n padding-right: 40px;\n top: var(--vaadin-infinite-scroller-buffer-offset, 0);\n animation: fadein 0.2s;\n }\n\n @keyframes fadein {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n </style>\n\n <div id="scroller" tabindex="-1">\n <div class="buffer"></div>\n <div class="buffer"></div>\n <div id="fullHeight"></div>\n </div>\n';class ba extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(fa.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0)}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i)}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return(this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+2*this.bufferSize?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout((()=>{this.$.scroller.classList.remove("notouchscroll")}),10))}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach((t=>{this.$[t.id]=t})),this.$.scroller.addEventListener("scroll",(()=>this._scroll())),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=2*this._initialScroll+"px")}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),va()}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach((t=>{[...t.children].forEach((t=>{this._ensureStampedInstance(t._itemWrapper)}))})),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")))}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse()}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>2*this._initialScroll-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t<this._buffers[0].translateY+e;(t>this._buffers[1].translateY+e||i)&&(this._translateBuffer(i),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=As.debounce(this._debouncerScrollFinish,_s.after(200),(()=>{const t=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],t)&&!this._isVisible(this._buffers[1],t)&&(this.position=this.position)}))}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach((t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`})),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=As.debounce(this._debouncerUpdateClones,_s.after(200),(()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones()})),this._scrollDisabled=!1}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach((e=>{for(let i=0;i<this.bufferSize;i++){const i=document.createElement("div");i.style.height=`${this.itemHeight}px`,i.instance={};const s=`vaadin-infinite-scroller-item-content-${Gs()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;(!t||this._isVisible(r,e))&&this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
3574
3574
  /**
3575
3575
  * @license
3576
3576
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3641,7 +3641,7 @@ The complete set of contributors may be found at http://polymer.github.io/CONTRI
3641
3641
  Code distributed by Google as part of the polymer project is also
3642
3642
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3643
3643
  */
3644
- const Fa=Ca(ms);class ja extends Fa{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:!xe,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(me&&!le){if(!Ea){Ea=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=Re(Re(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Oa(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||$e(t,e)||He(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Ge(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=ua.debounce(this.__renderDebouncer,e>0?ai.after(e):ni,t.bind(this)),pa.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),va()}__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),(!xe||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],a=t[r];s[r]=o,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(a,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Re(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return Re(Re(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Re(e).parentNode;return null}(this.template,t)}}customElements.define(ja.is,ja);
3644
+ const Fa=Ca(ms);class ja extends Fa{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:!xe,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(me&&!le){if(!Ea){Ea=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=Re(Re(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render()}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=Oa(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if(function(t,e){return t===e||$e(t,e)||He(t,e)}(this.as,e)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=Ue(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=ua.debounce(this.__renderDebouncer,e>0?ai.after(e):ni,t.bind(this)),pa.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),va()}__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),(!xe||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],a=t[r];s[r]=o,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(a,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Re(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return Re(Re(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Re(e).parentNode;return null}(this.template,t)}}customElements.define(ja.is,ja);
3645
3645
  /**
3646
3646
  * @license
3647
3647
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3663,7 +3663,7 @@ const Ra=t=>class extends(Fo(t)){static get properties(){return{month:{type:Obje
3663
3663
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3664
3664
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3665
3665
  */
3666
- Ut("vaadin-month-calendar",B`
3666
+ qt("vaadin-month-calendar",B`
3667
3667
  :host {
3668
3668
  display: block;
3669
3669
  }
@@ -3772,7 +3772,7 @@ class Wa{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
3772
3772
  * @license
3773
3773
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3774
3774
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3775
- */const $a=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){bo(this.$.scrollers,"pan-y"),vo(this.$.scrollers,"track",this._track.bind(this)),vo(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),vo(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),vo(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Wa(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new qs(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),vo(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new qs(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),vo(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new qs(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new qs(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),vo(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,a,n,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=a,t.ignoreTaps=n,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=As.debounce(this._debouncer,_s.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(na(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return ca(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){aa(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&aa(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return S(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return S(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{Dr(this,(()=>{va(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(ha(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return la(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3775
+ */const $a=t=>class extends t{static get properties(){return{scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map((t=>t.focusableDateElement)).find(Boolean)}_addListeners(){bo(this.$.scrollers,"pan-y"),vo(this.$.scrollers,"track",this._track.bind(this)),vo(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),vo(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),vo(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Wa(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new Vs(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),vo(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new Vs(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),vo(t,"tap",this._cancel.bind(this)),this._cancelButton=t}})),this.__initMonthScroller(),this.__initYearScroller()}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0)}focusCancel(){this._cancelButton.focus()}scrollToDate(t,e){const i=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(t):0;this._scrollToPosition(this._differenceInMonths(t,this._originDate)+i,e),this._monthScroller.forceUpdate()}__initMonthScroller(){this.addController(new Vs(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:t=>{t.addEventListener("custom-scroll",(()=>{this._onMonthScroll()})),t.addEventListener("touchstart",(()=>{this._onMonthScrollTouchStart()})),t.addEventListener("keydown",(t=>{this.__onMonthCalendarKeyDown(t)})),t.addEventListener("init-done",(()=>{const t=[...this.querySelectorAll("vaadin-month-calendar")];t.forEach((t=>{t.addEventListener("selected-date-changed",(t=>{this.selectedDate=t.detail.value}))})),this.calendars=t})),this._monthScroller=t}}))}__initYearScroller(){this.addController(new Vs(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),vo(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,a,n,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=a,t.ignoreTaps=n,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=As.debounce(this._debouncer,_s.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(na(t)):i}_onTodayTap(){const t=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(t,this._originDate))<.001?(this._selectDate(t),this._close()):this._scrollToCurrentMonth()}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0)}_onYearTap(t){if(!this._ignoreTaps&&!this._notTapping){const e=(t.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+12*e,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),void this.__tryFocusDate();let i;this._targetPosition=t,this._revealPromise=new Promise((t=>{i=t}));let s=0;const o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return ca(t).getFullYear()}_differenceInMonths(t,e){return 12*(t.getFullYear()-e.getFullYear())-e.getMonth()+t.getMonth()}_clear(){this._selectDate("")}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}))}_cancel(){this.focusedDate=this.selectedDate,this._close()}_preventDefault(t){t.preventDefault()}__toggleDate(t){aa(t,this.selectedDate)?(this._clear(),this.focusedDate=t):this._selectDate(t)}__onMonthCalendarKeyDown(t){let e=!1;switch(t.key){case"ArrowDown":this._moveFocusByDays(7),e=!0;break;case"ArrowUp":this._moveFocusByDays(-7),e=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),e=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),e=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),e=!0);break;case" ":this.__toggleDate(this.focusedDate),e=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),e=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),e=!0;break;case"PageDown":this._moveFocusByMonths(t.shiftKey?12:1),e=!0;break;case"PageUp":this._moveFocusByMonths(t.shiftKey?-12:-1),e=!0;break;case"Tab":this._onTabKeyDown(t,"calendar")}e&&(t.preventDefault(),t.stopPropagation())}_onTabKeyDown(t,e){switch(t.stopPropagation(),e){case"calendar":t.shiftKey&&(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":t.shiftKey&&(t.preventDefault(),this.focusDateElement());break;case"cancel":t.shiftKey||(t.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput())}}__onTodayButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"today")}__onCancelButtonKeyDown(t){"Tab"===t.key&&this._onTabKeyDown(t,"cancel")}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}))}__tryFocusDate(){if(this.__pendingDateFocus){const t=this.focusableDateElement;t&&aa(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}focusDate(t,e){return S(this,null,(function*(){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),yield this.focusDateElement(!1)}))}focusDateElement(t=!0){return S(this,null,(function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise((t=>{Dr(this,(()=>{va(),t()}))}))),t&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate()}))}_focusClosestDate(t){this.focusDate(ha(t,[this.minDate,this.maxDate]))}_focusAllowedDate(t,e,i){this._dateAllowed(t,void 0,void 0,(()=>!1))?this.focusDate(t,i):this._dateAllowed(this.focusedDate)?this.focusDate(e>0?this.maxDate:this.minDate):this._focusClosestDate(this.focusedDate)}_getDateDiff(t,e){const i=new Date(0,0);return i.setFullYear(this.focusedDate.getFullYear()),i.setMonth(this.focusedDate.getMonth()+t),e&&i.setDate(this.focusedDate.getDate()+e),i}_moveFocusByDays(t){const e=this._getDateDiff(0,t);this._focusAllowedDate(e,t,!1)}_moveFocusByMonths(t){const e=this._getDateDiff(t),i=e.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),e.setDate(this._focusedMonthDate),e.getMonth()!==i&&e.setDate(0),this._focusAllowedDate(e,t,!0)}_moveFocusInsideMonth(t,e){const i=new Date(0,0);i.setFullYear(t.getFullYear()),"minDate"===e?(i.setMonth(t.getMonth()),i.setDate(1)):(i.setMonth(t.getMonth()+1),i.setDate(0)),this._dateAllowed(i)?this.focusDate(i):this._dateAllowed(t)?this.focusDate(this[e]):this._focusClosestDate(t)}_dateAllowed(t,e=this.minDate,i=this.maxDate,s=this.isDateDisabled){return la(t,e,i,s)}_isTodayAllowed(t,e,i){return this._dateAllowed(this._getTodayMidnight(),t,e,i)}_getTodayMidnight(){const t=new Date,e=new Date(0,0);return e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(t.getDate()),e}}
3776
3776
  /**
3777
3777
  * @license
3778
3778
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3783,7 +3783,7 @@ class Wa{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=t
3783
3783
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3784
3784
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3785
3785
  */
3786
- Ut("vaadin-date-picker-overlay-content",B`
3786
+ qt("vaadin-date-picker-overlay-content",B`
3787
3787
  :host {
3788
3788
  display: flex;
3789
3789
  flex-direction: column;
@@ -3869,12 +3869,12 @@ Ut("vaadin-date-picker-overlay-content",B`
3869
3869
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3870
3870
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3871
3871
  */
3872
- const Ga=new WeakMap,Va=Ce((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ga.has(t)||Ga.set(t,new Set),Ga.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),qa=t=>class extends(Wo(So(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),Br||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3872
+ const Ua=new WeakMap,Ga=Ce((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Ua.has(t)||Ua.set(t,new Set),Ua.get(t)}(t);this.slotStyles.forEach((i=>{e.has(i)||(function(t,e){const i=document.createElement("style");i.textContent=t,e===document?document.head.appendChild(i):e.insertBefore(i,e.firstChild)}(i,t),e.add(i))}))}})),Va=t=>class extends(Wo(So(t))){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",(t=>this._onClearButtonMouseDown(t))),this.clearElement.addEventListener("click",(t=>this._onClearButtonClick(t))))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),Br||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&!this.readonly&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}}
3873
3873
  /**
3874
3874
  * @license
3875
3875
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
3876
3876
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3877
- */,Ua=Ce((t=>class extends(Lo(or(Wo(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Ya=t=>class extends(Va(Ro(Ua(rr(qa(So(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=As.debounce(this._preventInputDebouncer,_s.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3877
+ */,qa=Ce((t=>class extends(Lo(or(Wo(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||0===t}})),Ya=t=>class extends(Ga(Ro(qa(rr(Va(So(t))))))){static get properties(){return{allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this)}get slotStyles(){return["\n :is(input[slot='input'], textarea[slot='textarea'])::placeholder {\n font: inherit;\n color: inherit;\n }\n "]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&t.target===this.inputElement&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=As.debounce(this._preventInputDebouncer,_s.after(200),(()=>{this.removeAttribute("input-prevented")}))}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||1!==t.key.length||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const e=t.clipboardData.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const e=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(e)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(t){console.error(t)}}}
3878
3878
  /**
3879
3879
  * @license
3880
3880
  * Copyright (c) 2021 - 2024 Vaadin Ltd..
@@ -3959,7 +3959,7 @@ const Ga=new WeakMap,Va=Ce((t=>class extends t{get slotStyles(){return{}}connect
3959
3959
  * @license
3960
3960
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3961
3961
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3962
- */const tn=t=>class extends(Xa(Jo(Ro(Ua(So(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?da(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Mr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Io()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Wa(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Qa(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=da(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(na(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||la(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=da(t);!t||i?(t?aa(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,a,n,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=a,t.showWeekNumbers=n,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Lr(this._noInput?t:[s,t])}_getInitialPosition(){const t=da(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||la(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?ha(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,aa(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return da(t)}}
3962
+ */const tn=t=>class extends(Xa(Jo(Ro(qa(So(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?da(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:Mr},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(t){super._inputElementValue=t,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return!this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(t){super._onFocus(t),this._noInput&&!Io()&&t.target.blur()}_onBlur(t){super._onBlur(t),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Wa(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Qa(this));const t=this.$.overlay;this._overlayElement=t,t.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){!this.disabled&&!this.readonly&&(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(t){if(t.firstChild)return;const e=document.createElement("vaadin-date-picker-overlay-content");t.appendChild(e),this._overlayContent=e,e.addEventListener("close",(()=>{this._close()})),e.addEventListener("focus-input",this._focusAndSelect.bind(this)),e.addEventListener("date-tap",(t=>{this.__commitDate(t.detail.date),this._close()})),e.addEventListener("date-selected",(t=>{this.__commitDate(t.detail.date)})),e.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),e.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),e.addEventListener("focused-date-changed",(t=>{this._focusedDate=t.detail.value})),e.addEventListener("click",(t=>t.stopPropagation()))}__parseDate(t){if(!this.i18n.parseDate)return;let e=this.i18n.parseDate(t);return e&&(e=da(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(na(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||la(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0===t||void 0===e||(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0===t||void 0===e||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(t)}_valueChanged(t,e){const i=da(t);!t||i?(t?aa(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,a,n,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=a,t.showWeekNumbers=n,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Lr(this._noInput?t:[s,t])}_getInitialPosition(){const t=da(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||la(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?ha(e,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const t=this.__parseDate(this._inputElementValue||"");t?this.__commitDate(t):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1)}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate()}_onScroll(t){(t.target===window||!this._overlayContent.contains(t.target))&&this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(t){this._inputElementValue=t?this.__formatDate(t):""}_setSelectionRange(t,e){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(t,e)}_onChange(t){t.stopPropagation()}_onClick(t){this._isClearButton(t)||this._onHostClick(t)}_onHostClick(t){(!this.autoOpenDisabled||this._noInput)&&(t.preventDefault(),this.open())}_onClearButtonClick(t){t.preventDefault(),this.__commitDate(null)}_onKeyDown(t){switch(super._onKeyDown(t),this._noInput&&-1===[9].indexOf(t.keyCode)&&t.preventDefault(),t.key){case"ArrowDown":case"ArrowUp":t.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(t.preventDefault(),t.stopPropagation(),this._setSelectionRange(0,0),t.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(t){this.opened?this.close():this.__commitParsedOrFocusedDate()}_onEscape(t){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly)return t.stopPropagation(),void this._onClearButtonClick(t);""===this.inputElement.value?this.__commitDate(null):this._applyInputValue(this._selectedDate)}}_isClearButton(t){return t.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const t=this.__parseDate(this._inputElementValue);t&&(this._ignoreFocusedDateChange=!0,aa(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return da(t)}}
3963
3963
  /**
3964
3964
  * @license
3965
3965
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
@@ -3970,7 +3970,7 @@ const Ga=new WeakMap,Va=Ce((t=>class extends t{get slotStyles(){return{}}connect
3970
3970
  * Copyright (c) 2016 - 2024 Vaadin Ltd.
3971
3971
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3972
3972
  */
3973
- Ut("vaadin-date-picker",[Za,B`
3973
+ qt("vaadin-date-picker",[Za,B`
3974
3974
  :host([opened]) {
3975
3975
  pointer-events: auto;
3976
3976
  }
@@ -4025,13 +4025,13 @@ Ut("vaadin-date-picker",[Za,B`
4025
4025
  ></vaadin-date-picker-overlay>
4026
4026
 
4027
4027
  <slot name="tooltip"></slot>
4028
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new Us(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}T(en),
4028
+ `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new qs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",(t=>t.preventDefault())),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this))}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault()}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open()}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0}}T(en),
4029
4029
  /**
4030
4030
  * @license
4031
4031
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4032
4032
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4033
4033
  */
4034
- Ut("vaadin-text-field",yr,{moduleId:"lumo-text-field-styles"});
4034
+ qt("vaadin-text-field",yr,{moduleId:"lumo-text-field-styles"});
4035
4035
  /**
4036
4036
  * @license
4037
4037
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4047,7 +4047,7 @@ const sn=t=>class extends(Ya(t)){static get properties(){return{autocomplete:{ty
4047
4047
  * @license
4048
4048
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
4049
4049
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4050
- */;Ut("vaadin-text-field",Za,{moduleId:"vaadin-text-field-styles"});class rn extends(on(Xt(js(ms)))){static get is(){return"vaadin-text-field"}static get template(){return us`
4050
+ */;qt("vaadin-text-field",Za,{moduleId:"vaadin-text-field-styles"});class rn extends(on(Xt(js(ms)))){static get is(){return"vaadin-text-field"}static get template(){return us`
4051
4051
  <div class="vaadin-field-container">
4052
4052
  <div part="label">
4053
4053
  <slot name="label"></slot>
@@ -4076,7 +4076,7 @@ const sn=t=>class extends(Ya(t)){static get properties(){return{autocomplete:{ty
4076
4076
  </div>
4077
4077
  </div>
4078
4078
  <slot name="tooltip"></slot>
4079
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new Us(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}T(rn),Ut("vaadin-password-field-button",[br,B`
4079
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new qs(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}T(rn),qt("vaadin-password-field-button",[br,B`
4080
4080
  :host {
4081
4081
  position: absolute;
4082
4082
  right: 0;
@@ -4089,7 +4089,7 @@ const sn=t=>class extends(Ya(t)){static get properties(){return{autocomplete:{ty
4089
4089
  background: transparent;
4090
4090
  outline: none;
4091
4091
  }
4092
- `],{moduleId:"lumo-password-field-button"}),Ut("vaadin-password-field",[yr,B`
4092
+ `],{moduleId:"lumo-password-field-button"}),qt("vaadin-password-field",[yr,B`
4093
4093
  [part='reveal-button']::before {
4094
4094
  content: var(--lumo-icons-eye);
4095
4095
  }
@@ -4113,13 +4113,13 @@ const sn=t=>class extends(Ya(t)){static get properties(){return{autocomplete:{ty
4113
4113
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4114
4114
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4115
4115
  */
4116
- Ut("vaadin-password-field-button",ia,{moduleId:"vaadin-password-field-button-styles"});class an extends(sa(Os(Xt(ms)))){static get is(){return"vaadin-password-field-button"}static get template(){return us``}}T(an);
4116
+ qt("vaadin-password-field-button",ia,{moduleId:"vaadin-password-field-button-styles"});class an extends(sa(Os(Xt(ms)))){static get is(){return"vaadin-password-field-button"}static get template(){return us``}}T(an);
4117
4117
  /**
4118
4118
  * @license
4119
4119
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4120
4120
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4121
4121
  */
4122
- const nn=t=>class extends(Va(Co(Fo(Wo(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new qs(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4122
+ const nn=t=>class extends(Ga(Co(Fo(Wo(t))))){static get properties(){return{revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange=""}get slotStyles(){return[...super.slotStyles,`\n ${this.localName} [slot="input"]::-ms-reveal {\n display: none;\n }\n `]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new Vs(this,"reveal","vaadin-password-field-button",{initializer:t=>{t.disabled=this.disabled,t.addEventListener("click",this.__boundRevealButtonClick),t.addEventListener("mousedown",this.__boundRevealButtonMouseDown)}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off")}_onChange(t){super._onChange(t),this.__lastChange=this.inputElement.value}_shouldSetFocus(t){return t.target===this.inputElement||t.target===this._revealNode}_shouldRemoveFocus(t){return!(t.relatedTarget===this._revealNode||t.relatedTarget===this.inputElement&&t.target===this._revealNode)}_setFocused(t){if(super._setFocused(t),t){const t=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!t)}else this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})))}__updateAriaLabel(t){t&&t.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",t.reveal)}__i18nChanged(t){this.__updateAriaLabel(t)}_revealButtonHiddenChanged(t){this._toggleRevealHidden(t)}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible)}_onRevealButtonClick(){this._togglePasswordVisibility()}_onRevealButtonMouseDown(t){t.preventDefault(),this.inputElement.focus()}_toggleRevealHidden(t){this._revealNode&&(t?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")))}_updateToggleState(t){this._revealNode&&this._revealNode.setAttribute("aria-pressed",t?"true":"false")}_passwordVisibleChanged(t){this._setType(t?"text":"password"),this._updateToggleState(t)}_disabledChanged(t,e){super._disabledChanged(t,e),this._revealNode&&(this._revealNode.disabled=t)}}
4123
4123
  /**
4124
4124
  * @license
4125
4125
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4212,7 +4212,7 @@ const nn=t=>class extends(Va(Co(Fo(Wo(t))))){static get properties(){return{reve
4212
4212
  width: var(--lumo-icon-size-m);
4213
4213
  height: var(--lumo-icon-size-m);
4214
4214
  }
4215
- `;Ut("vaadin-item",dn,{moduleId:"lumo-item"});const un=B`
4215
+ `;qt("vaadin-item",dn,{moduleId:"lumo-item"});const un=B`
4216
4216
  :host {
4217
4217
  transition: background-color 100ms;
4218
4218
  overflow: hidden;
@@ -4224,7 +4224,7 @@ const nn=t=>class extends(Va(Co(Fo(Wo(t))))){static get properties(){return{reve
4224
4224
  :host([focused]:not([disabled])) {
4225
4225
  box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
4226
4226
  }
4227
- `;Ut("vaadin-combo-box-item",[dn,un],{moduleId:"lumo-combo-box-item"});
4227
+ `;qt("vaadin-combo-box-item",[dn,un],{moduleId:"lumo-combo-box-item"});
4228
4228
  /**
4229
4229
  * @license
4230
4230
  * Copyright (c) 2022 - 2024 Vaadin Ltd.
@@ -4301,12 +4301,12 @@ const pn=B`
4301
4301
  top: var(--lumo-space-s);
4302
4302
  margin-inline: auto 0;
4303
4303
  }
4304
- `;Ut("vaadin-combo-box-overlay",[mr,vr,mn,pn,vn,B`
4304
+ `;qt("vaadin-combo-box-overlay",[mr,vr,mn,pn,vn,B`
4305
4305
  :host {
4306
4306
  --_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
4307
4307
  --_vaadin-combo-box-items-container-border-style: solid;
4308
4308
  }
4309
- `],{moduleId:"lumo-combo-box-overlay"}),Ut("vaadin-combo-box",[yr,B`
4309
+ `],{moduleId:"lumo-combo-box-overlay"}),qt("vaadin-combo-box",[yr,B`
4310
4310
  [part='toggle-button']::before {
4311
4311
  content: var(--lumo-icons-dropdown);
4312
4312
  }
@@ -4346,7 +4346,7 @@ const gn=t=>class extends(Qr(t)){static get observers(){return["_setOverlayWidth
4346
4346
  * @license
4347
4347
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4348
4348
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4349
- */;Ut("vaadin-combo-box-overlay",[kr,B`
4349
+ */;qt("vaadin-combo-box-overlay",[kr,B`
4350
4350
  #overlay {
4351
4351
  width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
4352
4352
  }
@@ -4387,7 +4387,7 @@ function wn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4387
4387
  * @license
4388
4388
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4389
4389
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4390
- */const Dn=class{toString(){return""}},An=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Vs()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),a=o.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof Dn)&&(i&&void 0!==t&&void 0!==e?wn(i,t)===wn(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new Tn({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof Dn&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4390
+ */const Dn=class{toString(){return""}},An=t=>class extends t{static get properties(){return{items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this)}get _viewportTotalPaddingBottom(){if(void 0===this._cachedViewportTotalPaddingBottom){const t=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[t.paddingBottom,t.borderBottomWidth].map((t=>parseInt(t,10))).reduce(((t,e)=>t+e))}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Gs()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",(t=>t.stopPropagation())),this.__patchWheelOverScrolling()}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update())}scrollIntoView(t){if(!this.__virtualizer||!(this.opened&&t>=0))return;const e=this._visibleItemsCount();let i=t;t>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(t),i=t-e+1):t>this.__virtualizer.firstVisibleIndex&&(i=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,i));const s=[...this.children].find((t=>!t.hidden&&t.index===this.__virtualizer.lastVisibleIndex));if(!s||t!==s.index)return;const o=s.getBoundingClientRect(),r=this.getBoundingClientRect(),a=o.bottom-r.bottom+this._viewportTotalPaddingBottom;a>0&&(this.scrollTop+=a)}_isItemSelected(t,e,i){return!(t instanceof Dn)&&(i&&void 0!==t&&void 0!==e?wn(i,t)===wn(i,e):t===e)}__initVirtualizer(){this.__virtualizer=new Tn({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0})}__itemsChanged(t){t&&this.__virtualizer&&this.requestContentUpdate()}__loadingChanged(){this.requestContentUpdate()}__openedChanged(t){t&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate())}__selectedItemChanged(){this.requestContentUpdate()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.requestContentUpdate()}__focusedIndexChanged(t,e){t!==e&&this.requestContentUpdate(),t>=0&&!this.loading&&this.scrollIntoView(t)}__rendererChanged(t,e){(t||e)&&this.requestContentUpdate()}__createElements(t){return[...Array(t)].map((()=>{const t=document.createElement(`${this.__hostTagName}-item`);return t.addEventListener("click",this.__boundOnItemClick),t.tabIndex="-1",t.style.width="100%",t}))}_updateElement(t,e){const i=this.items[e],s=this.focusedIndex,o=this._isItemSelected(i,this.selectedItem,this.itemIdPath);t.setProperties({item:i,index:e,label:this.getItemLabel(i),selected:o,renderer:this.renderer,focused:!this.loading&&s===e}),"function"==typeof this.itemClassNameGenerator?t.className=this.itemClassNameGenerator(i):""!==t.className&&(t.className=""),t.performUpdate&&!t.hasUpdated&&t.performUpdate(),t.id=`${this.__hostTagName}-item-${e}`,t.setAttribute("role",void 0!==e&&"option"),t.setAttribute("aria-selected",o.toString()),t.setAttribute("aria-posinset",e+1),t.setAttribute("aria-setsize",this.items.length),this.theme?t.setAttribute("theme",this.theme):t.removeAttribute("theme"),i instanceof Dn&&this.__requestItemByIndex(e)}__onItemClick(t){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:t.currentTarget.item}}))}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",(t=>{(0===this.scrollTop&&t.deltaY<0||this.scrollHeight-this.scrollTop-this.clientHeight<=1&&t.deltaY>0)&&t.preventDefault()}))}__requestItemByIndex(t){requestAnimationFrame((()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:t}}))}))}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}}
4391
4391
  /**
4392
4392
  * @license
4393
4393
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
@@ -4430,7 +4430,7 @@ function wn(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}
4430
4430
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4431
4431
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4432
4432
  */
4433
- const zn=t=>class extends(Ua(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4433
+ const zn=t=>class extends(qa(t)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}}
4434
4434
  /**
4435
4435
  * @license
4436
4436
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4465,7 +4465,7 @@ const zn=t=>class extends(Ua(t)){static get properties(){return{pattern:{type:St
4465
4465
  * @license
4466
4466
  * Copyright (c) 2015 - 2024 Vaadin Ltd.
4467
4467
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4468
- */;Ut("vaadin-combo-box",Za,{moduleId:"vaadin-combo-box-styles"});class Wn extends(En(Ln(zn(Ya(Xt(js(ms))))))){static get is(){return"vaadin-combo-box"}static get template(){return us`
4468
+ */;qt("vaadin-combo-box",Za,{moduleId:"vaadin-combo-box-styles"});class Wn extends(En(Ln(zn(Ya(Xt(js(ms))))))){static get is(){return"vaadin-combo-box"}static get template(){return us`
4469
4469
  <style>
4470
4470
  :host([opened]) {
4471
4471
  pointer-events: auto;
@@ -4510,7 +4510,7 @@ const zn=t=>class extends(Ua(t)){static get properties(){return{pattern:{type:St
4510
4510
  ></vaadin-combo-box-overlay>
4511
4511
 
4512
4512
  <slot name="tooltip"></slot>
4513
- `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new Us(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)}}T(Wn),Ut("vaadin-multi-select-combo-box-chip",[gr,B`
4513
+ `}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new qs(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)}}T(Wn),qt("vaadin-multi-select-combo-box-chip",[gr,B`
4514
4514
  :host {
4515
4515
  font-size: var(--lumo-font-size-xxs);
4516
4516
  line-height: 1;
@@ -4599,23 +4599,23 @@ const zn=t=>class extends(Ua(t)){static get properties(){return{pattern:{type:St
4599
4599
  -webkit-text-fill-color: var(--lumo-disabled-text-color);
4600
4600
  pointer-events: none;
4601
4601
  }
4602
- `],{moduleId:"lumo-multi-select-combo-box-chip"}),Ut("vaadin-multi-select-combo-box-item",[dn,un,B`
4602
+ `],{moduleId:"lumo-multi-select-combo-box-chip"}),qt("vaadin-multi-select-combo-box-item",[dn,un,B`
4603
4603
  @media (any-hover: hover) {
4604
4604
  :host(:hover[readonly]) {
4605
4605
  background-color: transparent;
4606
4606
  cursor: default;
4607
4607
  }
4608
4608
  }
4609
- `],{moduleId:"lumo-multi-select-combo-box-item"}),Ut("vaadin-multi-select-combo-box-overlay",[mr,vr,mn,pn,vn,B`
4609
+ `],{moduleId:"lumo-multi-select-combo-box-item"}),qt("vaadin-multi-select-combo-box-overlay",[mr,vr,mn,pn,vn,B`
4610
4610
  :host {
4611
4611
  --_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
4612
4612
  --_vaadin-multi-select-combo-box-items-container-border-style: solid;
4613
4613
  }
4614
- `],{moduleId:"lumo-multi-select-combo-box-overlay"}),Ut("vaadin-multi-select-combo-box-container",B`
4614
+ `],{moduleId:"lumo-multi-select-combo-box-overlay"}),qt("vaadin-multi-select-combo-box-container",B`
4615
4615
  :host([auto-expand-vertically]) {
4616
4616
  padding-block: var(--lumo-space-xs);
4617
4617
  }
4618
- `,{moduleId:"lumo-multi-select-combo-box-container"}),Ut("vaadin-multi-select-combo-box",[yr,B`
4618
+ `,{moduleId:"lumo-multi-select-combo-box-container"}),qt("vaadin-multi-select-combo-box",[yr,B`
4619
4619
  :host([has-value]) {
4620
4620
  padding-inline-start: 0;
4621
4621
  }
@@ -4709,7 +4709,7 @@ class $n extends(Xt(ms)){static get is(){return"vaadin-multi-select-combo-box-ch
4709
4709
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4710
4710
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4711
4711
  */
4712
- Ut("vaadin-multi-select-combo-box-container",B`
4712
+ qt("vaadin-multi-select-combo-box-container",B`
4713
4713
  #wrapper {
4714
4714
  display: flex;
4715
4715
  width: 100%;
@@ -4725,7 +4725,7 @@ Ut("vaadin-multi-select-combo-box-container",B`
4725
4725
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4726
4726
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4727
4727
  */
4728
- class Gn extends(fn(Xt(Os(ms)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return us`
4728
+ class Un extends(fn(Xt(Os(ms)))){static get is(){return"vaadin-multi-select-combo-box-item"}static get template(){return us`
4729
4729
  <style>
4730
4730
  :host {
4731
4731
  display: block;
@@ -4739,7 +4739,7 @@ class Gn extends(fn(Xt(Os(ms)))){static get is(){return"vaadin-multi-select-comb
4739
4739
  <div part="content">
4740
4740
  <slot></slot>
4741
4741
  </div>
4742
- `}}T(Gn),Ut("vaadin-multi-select-combo-box-overlay",[kr,B`
4742
+ `}}T(Un),qt("vaadin-multi-select-combo-box-overlay",[kr,B`
4743
4743
  #overlay {
4744
4744
  width: var(
4745
4745
  --vaadin-multi-select-combo-box-overlay-width,
@@ -4752,19 +4752,19 @@ class Gn extends(fn(Xt(Os(ms)))){static get is(){return"vaadin-multi-select-comb
4752
4752
  flex-direction: column;
4753
4753
  height: 100%;
4754
4754
  }
4755
- `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Vn extends(gn(Jr(Os(Xt(ms))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return us`
4755
+ `],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Gn extends(gn(Jr(Os(Xt(ms))))){static get is(){return"vaadin-multi-select-combo-box-overlay"}static get template(){return us`
4756
4756
  <div id="backdrop" part="backdrop" hidden></div>
4757
4757
  <div part="overlay" id="overlay">
4758
4758
  <div part="loader"></div>
4759
4759
  <div part="content" id="content"><slot></slot></div>
4760
4760
  </div>
4761
- `}}T(Vn);
4761
+ `}}T(Gn);
4762
4762
  /**
4763
4763
  * @license
4764
4764
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4765
4765
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4766
4766
  */
4767
- class qn extends(An(ms)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return us`
4767
+ class Vn extends(An(ms)){static get is(){return"vaadin-multi-select-combo-box-scroller"}static get template(){return us`
4768
4768
  <style>
4769
4769
  :host {
4770
4770
  display: block;
@@ -4791,13 +4791,13 @@ class qn extends(An(ms)){static get is(){return"vaadin-multi-select-combo-box-sc
4791
4791
  <div id="selector">
4792
4792
  <slot></slot>
4793
4793
  </div>
4794
- `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(t,e,i){return!(t instanceof Dn||this.owner.readonly)&&this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly)}}T(qn);
4794
+ `}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(t,e,i){return!(t instanceof Dn||this.owner.readonly)&&this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly)}}T(Vn);
4795
4795
  /**
4796
4796
  * @license
4797
4797
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4798
4798
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4799
4799
  */
4800
- class Un extends(En(Ln(Xt(ms)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return us`
4800
+ class qn extends(En(Ln(Xt(ms)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return us`
4801
4801
  <style>
4802
4802
  :host([opened]) {
4803
4803
  pointer-events: auto;
@@ -4815,7 +4815,7 @@ class Un extends(En(Ln(Xt(ms)))){static get is(){return"vaadin-multi-select-comb
4815
4815
  no-vertical-overlap
4816
4816
  restore-focus-node="[[inputElement]]"
4817
4817
  ></vaadin-multi-select-combo-box-overlay>
4818
- `}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&(!this.readonly||0!==this.selectedItems.length)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(t){if(this.readonly)super._setDropdownItems(this.selectedItems);else if(!this.filter&&this.selectedItemsOnTop)if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter((t=>-1===this._comboBox._findIndex(t,this.topGroup,this.itemIdPath)));super._setDropdownItems(this.topGroup.concat(e))}else super._setDropdownItems(t);else super._setDropdownItems(t)}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems)}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t)}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}}else super._onEnter(t)}_onEscape(t){if(this.readonly)return t.stopPropagation(),void(this.opened&&this.close());super._onEscape(t)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.clear(),void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof Dn||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))))}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation()}}T(Un);
4818
+ `}static get properties(){return{filteredItems:{type:Array,notify:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0},size:{type:Number,notify:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1},lastFilter:{type:String,notify:!0},topGroup:{type:Array,observer:"_topGroupChanged"},_target:{type:Object}}}static get observers(){return["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return"vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this))}open(){!this.disabled&&(!this.readonly||0!==this.selectedItems.length)&&(this.opened=!0)}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button")}_readonlyChanged(){this._setDropdownItems(this.filteredItems)}_setDropdownItems(t){if(this.readonly)super._setDropdownItems(this.selectedItems);else if(!this.filter&&this.selectedItemsOnTop)if(t&&t.length&&this.topGroup&&this.topGroup.length){const e=t.filter((t=>-1===this._comboBox._findIndex(t,this.topGroup,this.itemIdPath)));super._setDropdownItems(this.topGroup.concat(e))}else super._setDropdownItems(t);else super._setDropdownItems(t)}_topGroupChanged(t){t&&this._setDropdownItems(this.filteredItems)}_initScroller(){const t=this.getRootNode().host;this._comboBox=t,super._initScroller(t)}_onEnter(t){if(this.opened){if(t.preventDefault(),t.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const t=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(t)}}else super._onEnter(t)}_onEscape(t){if(this.readonly)return t.stopPropagation(),void(this.opened&&this.close());super._onEscape(t)}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter()}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter=""}_commitValue(){this.lastFilter=this.filter,super._commitValue()}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown()}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp()}_setFocused(t){t||(this._ignoreCommitValue=!0),super._setFocused(t),!t&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close()}_onClosed(){this._ignoreCommitValue=!0,super._onClosed()}_detectAndDispatchChange(){if(this._ignoreCommitValue)return this._ignoreCommitValue=!1,this.clear(),void(this._inputElementValue="");super._detectAndDispatchChange()}_overlaySelectedItemChanged(t){t.stopPropagation(),!this.readonly&&(t.detail.item instanceof Dn||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:t.detail.item}}))))}_shouldFetchData(){return!this.readonly&&super._shouldFetchData()}clearCache(){this.readonly||super.clearCache()}__onCustomValueSet(t){this._ignoreCommitValue&&t.stopImmediatePropagation()}}T(qn);
4819
4819
  /**
4820
4820
  * @license
4821
4821
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
@@ -4826,7 +4826,7 @@ const Yn=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
4826
4826
  * @license
4827
4827
  * Copyright (c) 2021 - 2024 Vaadin Ltd.
4828
4828
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
4829
- */Ut("vaadin-multi-select-combo-box",[Za,B`
4829
+ */qt("vaadin-multi-select-combo-box",[Za,B`
4830
4830
  :host {
4831
4831
  --input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
4832
4832
  --_chip-min-width: var(--vaadin-multi-select-combo-box-chip-min-width, 50px);
@@ -4935,7 +4935,7 @@ const Yn=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.resiza
4935
4935
  </div>
4936
4936
 
4937
4937
  <slot name="tooltip"></slot>
4938
- `}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new Us(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new qs(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),Fn(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Xo(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",o=this.i18n.total.replace("{count}",i||0);Xo(`${t} ${this.i18n[s]} ${o}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let o=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),o=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,o,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const o=this.__createChip(t[i]);this.insertBefore(o,s),s=o,e.unshift(o)}const r=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),r.unshift(t.pop());const s=r.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(o,s)}px`)}this._overflowItems=r}else{for(let e=t.length-1,i=null;e>=0;e--){const r=this.__createChip(t[e]);if(this.insertBefore(r,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){r.remove();break}r.style.maxWidth=`${Math.max(o,s)}px`}t.pop(),i=r}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const o=e.length;t.label=`${o}`,t.setAttribute("count",`${o}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===o),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&Xo(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}T(Kn),Ut("vaadin-notification-card",B`
4938
+ `}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){return[...super.slotStyles,`\n ${this.localName}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new ar(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new nr(this.inputElement,this._labelController)),this._tooltipController=new qs(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((t=>!t.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new Vs(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:t=>{t.addEventListener("mousedown",(t=>this._preventBlur(t))),this._overflow=t}}),this.addController(this._overflowController),this.__updateChips(),Fn(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),Xo(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(t,e){super._disabledChanged(t,e),(t||e)&&this.__updateChips()}_inputElementChanged(t){super._inputElementChanged(t),t&&this.$.comboBox._setInputElement(t)}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(t,e){if(this.stateTarget){if("required"===t)return void this._delegateAttribute("aria-required",!!e&&"true");super._delegateAttribute(t,e)}}_autoExpandHorizontallyChanged(t,e){(t||e)&&this.__updateChips()}_autoExpandVerticallyChanged(t,e){(t||e)&&this.__updateChips()}_clearButtonVisibleChanged(t,e){(t||e)&&this.__updateChips()}_onFilteredItemsChanged(t){const{value:e}=t.detail;(Array.isArray(e)||null==e)&&(this.filteredItems=e)}_readonlyChanged(t,e){(t||e)&&this.__updateChips(),this.dataProvider&&this.clearCache()}__itemClassNameGeneratorChanged(t,e){(t||e)&&this.__updateChips()}_pageSizeChanged(t,e){(Math.floor(t)!==t||t<=0)&&(this.pageSize=e,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(t){const e=this.__tmpA11yPlaceholder;e!==t&&(this.__savedPlaceholder=t,e&&(this.placeholder=e))}_selectedItemsChanged(t){if(this._toggleHasValue(this._hasValue),this._hasValue){const e=this._mergeItemLabels(t);void 0===this.__tmpA11yPlaceholder&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=e,this.placeholder=e}else void 0!==this.__tmpA11yPlaceholder&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(t){return this.$.comboBox._getItemLabel(t)}_mergeItemLabels(t){return t.map((t=>this._getItemLabel(t))).join(", ")}_findIndex(t,e,i){if(i&&t){for(let s=0;s<e.length;s++)if(e[s]&&e[s][i]===t[i])return s;return-1}return e.indexOf(t)}__clearInternalValue(t=!1){!this.keepFilter||t?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter)}__announceItem(t,e,i){const s=e?"selected":"deselected",o=this.i18n.total.replace("{count}",i||0);Xo(`${t} ${this.i18n[s]} ${o}`)}__removeItem(t){const e=[...this.selectedItems];e.splice(e.indexOf(t),1),this.__updateSelection(e);const i=this._getItemLabel(t);this.__announceItem(i,!1,e.length)}__selectItem(t){const e=[...this.selectedItems],i=this._findIndex(t,e,this.itemIdPath),s=this._getItemLabel(t);let o=!1;if(-1!==i){const t=this._lastFilter;if(t&&t.toLowerCase()===s.toLowerCase())return void this.__clearInternalValue();e.splice(i,1)}else e.push(t),o=!0;this.__updateSelection(e),this.__clearInternalValue(),this.__announceItem(s,o,e.length)}__updateSelection(t){this.selectedItems=t,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(t,e,i){t?i||(this._topGroup=[...e]):this._topGroup=[]}__createChip(t){const e=document.createElement("vaadin-multi-select-combo-box-chip");e.setAttribute("slot","chip"),e.item=t,e.disabled=this.disabled,e.readonly=this.readonly;const i=this._getItemLabel(t);return e.label=i,e.setAttribute("title",i),"function"==typeof this.itemClassNameGenerator&&(e.className=this.itemClassNameGenerator(t)),e.addEventListener("item-removed",(t=>this._onItemRemoved(t))),e.addEventListener("mousedown",(t=>this._preventBlur(t))),e}__getOverflowWidth(){const t=this._overflow;t.style.visibility="hidden",t.removeAttribute("hidden");const e=t.getAttribute("count");t.setAttribute("count","99");const i=getComputedStyle(t),s=t.clientWidth+parseInt(i.marginInlineStart);return t.setAttribute("count",e),t.setAttribute("hidden",""),t.style.visibility="",s}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((t=>{t.remove()}));const t=[...this.selectedItems],e=this._inputField.$.wrapper.clientWidth,i=parseInt(getComputedStyle(this.inputElement).flexBasis);let s=e-i;t.length>1&&(s-=this.__getOverflowWidth());const o=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const e=[];for(let i=t.length-1,s=null;i>=0;i--){const o=this.__createChip(t[i]);this.insertBefore(o,s),s=o,e.unshift(o)}const r=[];if(!this.autoExpandVertically&&this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth<i){for(;e.length>1;){e.pop().remove(),r.unshift(t.pop());const s=r.length>0?i+this.__getOverflowWidth():i;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=s)break}1===e.length&&(e[0].style.maxWidth=`${Math.max(o,s)}px`)}this._overflowItems=r}else{for(let e=t.length-1,i=null;e>=0;e--){const r=this.__createChip(t[e]);if(this.insertBefore(r,i),!this.autoExpandVertically&&this.$.chips.clientWidth>s){if(null!==i){r.remove();break}r.style.maxWidth=`${Math.max(o,s)}px`}t.pop(),i=r}this._overflowItems=t}}__updateOverflowChip(t,e,i,s){if(t){const o=e.length;t.label=`${o}`,t.setAttribute("count",`${o}`),t.setAttribute("title",this._mergeItemLabels(e)),t.toggleAttribute("hidden",0===o),t.disabled=i,t.readonly=s}}_onClearButtonTouchend(t){t.preventDefault(),t.stopPropagation(),this.clear()}_onClearButtonClick(t){t.stopPropagation(),this.clear()}_onChange(t){t.stopPropagation()}_onEscape(t){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(t.stopPropagation(),this.selectedItems=[])}_onKeyDown(t){super._onKeyDown(t);const e=this._chips;if(!this.readonly&&e.length>0)switch(t.key){case"Backspace":this._onBackSpace(e);break;case"ArrowLeft":this._onArrowLeft(e,t);break;case"ArrowRight":this._onArrowRight(e,t);break;default:this._focusedChipIndex=-1}}_onArrowLeft(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?i===t.length-1?s=-1:i>-1&&(s=i+1):-1===i?s=t.length-1:i>0&&(s=i-1),void 0!==s&&(this._focusedChipIndex=s)}_onArrowRight(t,e){if(0!==this.inputElement.selectionStart)return;const i=this._focusedChipIndex;let s;-1!==i&&e.preventDefault(),this.__isRTL?-1===i?s=t.length-1:i>0&&(s=i-1):i===t.length-1?s=-1:i>-1&&(s=i+1),void 0!==s&&(this._focusedChipIndex=s)}_onBackSpace(t){if(0!==this.inputElement.selectionStart)return;const e=this._focusedChipIndex;-1===e?this._focusedChipIndex=t.length-1:(this.__removeItem(t[e].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(t,e){if(t>-1||e>-1){const e=this._chips;e.forEach(((e,i)=>{e.toggleAttribute("focused",i===t)})),t>-1&&Xo(`${this._getItemLabel(e[t].item)} ${this.i18n.focused}`)}}_onComboBoxChange(){const t=this.$.comboBox.selectedItem;t&&this.__selectItem(t)}_onComboBoxItemSelected(t){this.__selectItem(t.detail.item)}_onCustomValueSet(t){t.preventDefault(),t.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:t.detail,composed:!0,bubbles:!0}))}_onItemRemoved(t){this.__removeItem(t.detail.item)}_preventBlur(t){t.preventDefault()}}T(Kn),qt("vaadin-notification-card",B`
4939
4939
  :host {
4940
4940
  position: relative;
4941
4941
  margin: var(--lumo-space-s);
@@ -5265,13 +5265,13 @@ class Zn extends(Yr(Xt(js(ms)))){static get template(){return us`
5265
5265
  margin: var(--lumo-space-s) var(--lumo-border-radius-m);
5266
5266
  background-color: var(--lumo-contrast-10pct);
5267
5267
  }
5268
- `;Ut("vaadin-list-box",tl,{moduleId:"lumo-list-box"}),
5268
+ `;qt("vaadin-list-box",tl,{moduleId:"lumo-list-box"}),
5269
5269
  /**
5270
5270
  * @license
5271
5271
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5272
5272
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5273
5273
  */
5274
- Ut("vaadin-select-item",dn,{moduleId:"lumo-select-item"}),Ut("vaadin-select-list-box",tl,{moduleId:"lumo-select-list-box"}),Ut("vaadin-select",[yr,B`
5274
+ qt("vaadin-select-item",dn,{moduleId:"lumo-select-item"}),qt("vaadin-select-list-box",tl,{moduleId:"lumo-select-list-box"}),qt("vaadin-select",[yr,B`
5275
5275
  :host(:not([theme*='align'])) ::slotted([slot='value']) {
5276
5276
  text-align: start;
5277
5277
  }
@@ -5314,7 +5314,7 @@ Ut("vaadin-select-item",dn,{moduleId:"lumo-select-item"}),Ut("vaadin-select-list
5314
5314
  --_lumo-selected-item-height: var(--lumo-size-s);
5315
5315
  --_lumo-selected-item-padding: 0;
5316
5316
  }
5317
- `],{moduleId:"lumo-select"}),Ut("vaadin-select-value-button",B`
5317
+ `],{moduleId:"lumo-select"}),qt("vaadin-select-value-button",B`
5318
5318
  :host {
5319
5319
  font-family: var(--lumo-font-family);
5320
5320
  font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
@@ -5333,7 +5333,7 @@ Ut("vaadin-select-item",dn,{moduleId:"lumo-select-item"}),Ut("vaadin-select-list
5333
5333
  ::slotted(*:hover) {
5334
5334
  background-color: transparent;
5335
5335
  }
5336
- `,{moduleId:"lumo-select-value-button"}),Ut("vaadin-select-overlay",[fr,B`
5336
+ `,{moduleId:"lumo-select-value-button"}),qt("vaadin-select-overlay",[fr,B`
5337
5337
  :host {
5338
5338
  --_lumo-item-selected-icon-display: block;
5339
5339
  }
@@ -5447,7 +5447,7 @@ const nl=t=>class extends(Qr(Jr(Os(t)))){static get observers(){return["_updateO
5447
5447
  * @license
5448
5448
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5449
5449
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5450
- */;Ut("vaadin-select-overlay",[kr,B`
5450
+ */;qt("vaadin-select-overlay",[kr,B`
5451
5451
  :host {
5452
5452
  align-items: flex-start;
5453
5453
  justify-content: flex-start;
@@ -5475,7 +5475,7 @@ const nl=t=>class extends(Qr(Jr(Os(t)))){static get observers(){return["_updateO
5475
5475
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5476
5476
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5477
5477
  */
5478
- Ut("vaadin-select-value-button",B`
5478
+ qt("vaadin-select-value-button",B`
5479
5479
  :host {
5480
5480
  display: inline-block;
5481
5481
  position: relative;
@@ -5548,17 +5548,17 @@ const cl=B`
5548
5548
  * @license
5549
5549
  * Copyright (c) 2023 - 2024 Vaadin Ltd.
5550
5550
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5551
- */;class dl extends qs{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
5551
+ */;class dl extends Vs{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(t,e)=>{e._setFocusElement(t),e.ariaTarget=t,e.stateTarget=t,t.setAttribute("aria-haspopup","listbox")}})}}
5552
5552
  /**
5553
5553
  * @license
5554
5554
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5555
5555
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5556
- */const ul=t=>class extends(Xa(Ro(Lo(So(rr(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${Vs()}`,this._srLabelController=new ir(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new dl(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Wa(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new Us(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),Uo(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return S(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5556
+ */const ul=t=>class extends(Xa(Ro(Lo(So(rr(t)))))){static get properties(){return{items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return[...super.delegateAttrs,"invalid"]}static get observers(){return["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${Gs()}`,this._srLabelController=new ir(this),this._srLabelController.slotName="sr-label"}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new dl(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Wa(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new qs(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController)}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items))}_requiredChanged(t){super._requiredChanged(t),!1===t&&this.validate()}__itemsChanged(t,e){(t||e)&&this.requestContentUpdate()}_assignMenuElement(t){t&&t!==this.__lastMenuElement&&(this._menuElement=t,this.__initMenuItems(t),t.addEventListener("items-changed",(()=>{this.__initMenuItems(t)})),t.addEventListener("selected-changed",(()=>this.__updateValueButton())),t.addEventListener("keydown",(t=>this._onKeyDownInside(t)),!0),t.addEventListener("click",(t=>{const e=t.composedPath().find((t=>t._hasVaadinItemMixin));this.__dispatchChangePending=!(!e||void 0===e.value||e.value===this.value),this.opened=!1}),!0),this.__lastMenuElement=t)}__initMenuItems(t){t.items&&(this._items=t.items)}_valueChanged(t,e){this.toggleAttribute("has-value",!!t),void 0!==e&&!this.__dispatchChangePending&&this.validate()}_onClick(t){this.disabled||(t.preventDefault(),this.opened=!this.readonly)}_onToggleMouseDown(t){t.preventDefault()}_onKeyDown(t){if(t.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened)if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(t.key))t.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(t.key)&&1===t.key.length){const e=this._menuElement.selected,i=this._menuElement._searchKey(void 0!==e?e:-1,t.key);i>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=i)}}_onKeyDownInside(t){/^(Tab)$/u.test(t.key)&&(this.opened=!1)}_openedChanged(t,e,i){if(e&&i){if(t){if(this.disabled||this.readonly)return void(this.opened=!1);this._updateAriaLive(!1),e.style.setProperty("--vaadin-select-text-field-width",`${i.offsetWidth}px`);const t=this.hasAttribute("focus-ring");this._openedWithFocusRing=t,t&&this.removeAttribute("focus-ring")}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=t}}_updateAriaExpanded(t,e){e&&e.setAttribute("aria-expanded",t?"true":"false")}_updateAriaLive(t){this.focusElement&&(t?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"))}__attachSelectedItem(t){let e;const i=t.getAttribute("label");e=i?this.__createItemElement({label:i}):t.cloneNode(!0),e._sourceItem=t,this.__appendValueItemElement(e,this.focusElement),e.selected=!0}__createItemElement(t){const e=document.createElement(t.component||"vaadin-select-item");return t.label&&(e.textContent=t.label),t.value&&(e.value=t.value),t.disabled&&(e.disabled=t.disabled),t.className&&(e.className=t.className),e}__appendValueItemElement(t,e){e.appendChild(t),t.removeAttribute("tabindex"),t.removeAttribute("aria-selected"),t.removeAttribute("role"),t.removeAttribute("focused"),t.removeAttribute("focus-ring"),t.removeAttribute("active"),t.setAttribute("id",this._itemId)}_accessibleNameChanged(t){this._srLabelController.setLabel(t),this._setCustomAriaLabelledBy(t?this._srLabelController.defaultId:null)}_accessibleNameRefChanged(t){this._setCustomAriaLabelledBy(t)}_setCustomAriaLabelledBy(t){const e=this._getLabelIdWithItemId(t);this._fieldAriaController.setLabelId(e,!0)}_getLabelIdWithItemId(t){return t?`${t} ${this._items&&this._items[this._menuElement.selected]||this.placeholder?this._itemId:""}`.trim():null}__updateValueButton(){const t=this.focusElement;if(!t)return;t.innerHTML="";const e=this._items[this._menuElement.selected];if(t.removeAttribute("placeholder"),this._hasContent(e))this.__attachSelectedItem(e);else if(this.placeholder){const e=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(e,t),t.setAttribute("placeholder","")}!this._valueChanging&&e&&(this._selectedChanging=!0,this.value=e.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging),qo(t,"aria-labelledby",e||this.placeholder?{newId:this._itemId}:{oldId:this._itemId}),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId)}_hasContent(t){return!!t&&(!!(t.hasAttribute("label")?t.getAttribute("label"):t.textContent.trim())||t.childElementCount>0)}_updateSelectedItem(t,e){if(e){const i=null==t?t:t.toString();this._menuElement.selected=e.reduce(((t,e,s)=>void 0===t&&e.value===i?s:t),void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging)}}_shouldRemoveFocus(){return!this.opened}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}checkValidity(){return!this.required||this.readonly||!!this.value}__defaultRenderer(t,e){if(!this.items||0===this.items.length)return void(t.textContent="");let i=t.firstElementChild;i||(i=document.createElement("vaadin-select-list-box"),t.appendChild(i)),i.textContent="",this.items.forEach((t=>{i.appendChild(this.__createItemElement(t))}))}__dispatchChange(){return S(this,null,(function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}))}}
5557
5557
  /**
5558
5558
  * @license
5559
5559
  * Copyright (c) 2017 - 2024 Vaadin Ltd.
5560
5560
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5561
- */;Ut("vaadin-select",[Ja,Ka,cl],{moduleId:"vaadin-select-styles"});class pl extends(ul(js(Xt(ms)))){static get is(){return"vaadin-select"}static get template(){return us`
5561
+ */;qt("vaadin-select",[Ja,Ka,cl],{moduleId:"vaadin-select-styles"});class pl extends(ul(js(Xt(ms)))){static get is(){return"vaadin-select"}static get template(){return us`
5562
5562
  <style>
5563
5563
  :host {
5564
5564
  position: relative;
@@ -5711,7 +5711,7 @@ const cl=B`
5711
5711
  transform: scale(1.02);
5712
5712
  }
5713
5713
  }
5714
- `;Ut("vaadin-dialog-overlay",[mr,ml],{moduleId:"lumo-dialog"}),Ut("vaadin-confirm-dialog-overlay",[mr,ml,B`
5714
+ `;qt("vaadin-dialog-overlay",[mr,ml],{moduleId:"lumo-dialog"}),qt("vaadin-confirm-dialog-overlay",[mr,ml,B`
5715
5715
  [part='header'] ::slotted(h3) {
5716
5716
  margin-top: 0 !important;
5717
5717
  margin-bottom: 0 !important;
@@ -5944,7 +5944,7 @@ const vl=t=>class extends t{static get properties(){return{opened:{type:Boolean,
5944
5944
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
5945
5945
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5946
5946
  */
5947
- Ut("vaadin-confirm-dialog-overlay",[kr,fl,B`
5947
+ qt("vaadin-confirm-dialog-overlay",[kr,fl,B`
5948
5948
  :host {
5949
5949
  --_vaadin-confirm-dialog-content-width: auto;
5950
5950
  --_vaadin-confirm-dialog-content-height: auto;
@@ -6011,7 +6011,7 @@ Ut("vaadin-confirm-dialog-overlay",[kr,fl,B`
6011
6011
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
6012
6012
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6013
6013
  */
6014
- const wl=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new qs(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new qs(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${Vs()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new qs(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new qs(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new qs(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?Uo(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{Uo(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6014
+ const wl=t=>class extends t{static get properties(){return{accessibleDescriptionRef:{type:String},opened:{type:Boolean,value:!1,notify:!0},header:{type:String,value:""},message:{type:String,value:""},confirmText:{type:String,value:"Confirm"},confirmTheme:{type:String,value:"primary"},noCloseOnEsc:{type:Boolean,value:!1},rejectButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},rejectText:{type:String,value:"Reject"},rejectTheme:{type:String,value:"error tertiary"},cancelButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1},cancelText:{type:String,value:"Cancel"},cancelTheme:{type:String,value:"tertiary"},overlayClass:{type:String},_cancelButton:{type:Object},_confirmButton:{type:Object},_headerNode:{type:Object},_messageNodes:{type:Array,value:()=>[]},_overlayElement:{type:Object,sync:!0},_rejectButton:{type:Object},_contentHeight:{type:String},_contentWidth:{type:String}}}static get observers(){return["__updateConfirmButton(_confirmButton, confirmText, confirmTheme)","__updateCancelButton(_cancelButton, cancelText, cancelTheme, cancelButtonVisible)","__updateHeaderNode(_headerNode, header)","__updateMessageNodes(_messageNodes, message)","__updateRejectButton(_rejectButton, rejectText, rejectTheme, rejectButtonVisible)","__accessibleDescriptionRefChanged(_overlayElement, _messageNodes, accessibleDescriptionRef)"]}constructor(){super(),this.__cancel=this.__cancel.bind(this),this.__confirm=this.__confirm.bind(this),this.__reject=this.__reject.bind(this)}get __slottedNodes(){return[this._headerNode,...this._messageNodes,this._cancelButton,this._confirmButton,this._rejectButton]}ready(){super.ready(),this._headerController=new Vs(this,"header","h3",{initializer:t=>{this._headerNode=t}}),this.addController(this._headerController),this._messageController=new Vs(this,"","div",{multiple:!0,observe:!1,initializer:t=>{const e=document.createElement("div");e.style.display="contents";const i=`confirm-dialog-message-${Gs()}`;e.id=i,this.appendChild(e),e.appendChild(t),this._messageNodes=[...this._messageNodes,e]}}),this.addController(this._messageController),this._cancelController=new Vs(this,"cancel-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("cancel",t)}}),this.addController(this._cancelController),this._rejectController=new Vs(this,"reject-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("reject",t)}}),this.addController(this._rejectController),this._confirmController=new Vs(this,"confirm-button","vaadin-button",{initializer:t=>{this.__setupSlottedButton("confirm",t)}}),this.addController(this._confirmController)}_initOverlay(t){t.addEventListener("vaadin-overlay-escape-press",this._escPressed.bind(this)),t.addEventListener("vaadin-overlay-open",(()=>this.__onDialogOpened())),t.addEventListener("vaadin-overlay-closed",(()=>this.__onDialogClosed())),t.setAttribute("role","alertdialog")}__onDialogOpened(){const t=this._overlayElement;this.__slottedNodes.forEach((e=>{t.appendChild(e)}));const e=t.querySelector('[slot="confirm-button"]');e&&e.focus()}__onDialogClosed(){this.__slottedNodes.forEach((t=>{this.appendChild(t)})),this.dispatchEvent(new CustomEvent("closed"))}__accessibleDescriptionRefChanged(t,e,i){!t||!e||(void 0!==i?qo(t,"aria-describedby",{newId:i,oldId:this.__oldAccessibleDescriptionRef,fromUser:!0}):e.forEach((e=>{qo(t,"aria-describedby",{newId:e.id})})),this.__oldAccessibleDescriptionRef=i)}__setupSlottedButton(t,e){const i=`_${t}Button`,s=`__${t}`;this[i]&&this[i]!==e&&this[i].remove(),e.addEventListener("click",this[s]),this[i]=e}__updateCancelButton(t,e,i,s){t&&(t===this._cancelController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}__updateConfirmButton(t,e,i){t&&t===this._confirmController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i))}__updateHeaderNode(t,e){t&&t===this._headerController.defaultNode&&(t.textContent=e)}__updateMessageNodes(t,e){if(t&&t.length>0){const i=t.find((t=>this._messageController.defaultNode&&t===this._messageController.defaultNode.parentElement));i&&(i.firstChild.textContent=e)}}__updateRejectButton(t,e,i,s){t&&(t===this._rejectController.defaultNode&&(t.textContent=e,t.setAttribute("theme",i)),t.toggleAttribute("hidden",!s))}_escPressed(t){t.defaultPrevented||this.__cancel()}__confirm(){this.dispatchEvent(new CustomEvent("confirm")),this.opened=!1}__cancel(){this.dispatchEvent(new CustomEvent("cancel")),this.opened=!1}__reject(){this.dispatchEvent(new CustomEvent("reject")),this.opened=!1}_getAriaLabel(t){return t||"confirmation"}}
6015
6015
  /**
6016
6016
  * @license
6017
6017
  * Copyright (c) 2018 - 2024 Vaadin Ltd.
@@ -6043,7 +6043,7 @@ const wl=t=>class extends t{static get properties(){return{accessibleDescription
6043
6043
  <slot name="reject-button"></slot>
6044
6044
  <slot name="confirm-button"></slot>
6045
6045
  </div>
6046
- `}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}T(xl),Ut("vaadin-tab",B`
6046
+ `}static get is(){return"vaadin-confirm-dialog"}ready(){super.ready(),this._overlayElement=this.$.dialog.$.overlay,this._initOverlay(this._overlayElement)}}T(xl),qt("vaadin-tab",B`
6047
6047
  :host {
6048
6048
  box-sizing: border-box;
6049
6049
  padding: 0.5rem 0.75rem;
@@ -6292,7 +6292,7 @@ const kl=t=>class extends(el(t)){ready(){super.ready(),this.setAttribute("role",
6292
6292
  * Copyright (c) 2017 - 2025 Vaadin Ltd.
6293
6293
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6294
6294
  */
6295
- Ut("vaadin-tab",B`
6295
+ qt("vaadin-tab",B`
6296
6296
  :host {
6297
6297
  display: block;
6298
6298
  }
@@ -6314,7 +6314,7 @@ Ut("vaadin-tab",B`
6314
6314
  `,{moduleId:"vaadin-tab-styles"});class _l extends(js(Xt(kl(Jo(ms))))){static get template(){return us`
6315
6315
  <slot></slot>
6316
6316
  <slot name="tooltip"></slot>
6317
- `}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new Us(this),this.addController(this._tooltipController)}}T(_l),Ut("vaadin-tabs",B`
6317
+ `}static get is(){return"vaadin-tab"}ready(){super.ready(),this._tooltipController=new qs(this),this.addController(this._tooltipController)}}T(_l),qt("vaadin-tabs",B`
6318
6318
  :host {
6319
6319
  -webkit-tap-highlight-color: transparent;
6320
6320
  }
@@ -6569,7 +6569,7 @@ const Cl=t=>class extends(Jn(rl(t))){static get properties(){return{orientation:
6569
6569
  * Copyright (c) 2017 - 2025 Vaadin Ltd.
6570
6570
  * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6571
6571
  */
6572
- Ut("vaadin-tabs",B`
6572
+ qt("vaadin-tabs",B`
6573
6573
  :host {
6574
6574
  display: flex;
6575
6575
  align-items: center;
@@ -6653,4 +6653,4 @@ Ut("vaadin-tabs",B`
6653
6653
  </div>
6654
6654
 
6655
6655
  <div on-click="_scrollForward" part="forward-button" aria-hidden="true"></div>
6656
- `}static get is(){return"vaadin-tabs"}}function Tl(t){return Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(t)}function Dl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Al(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Il(t){Al(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Tl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}T(Sl);var zl={};function Ml(){return zl}function Pl(t){Al(1,arguments);var e=Il(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function Bl(t){Al(1,arguments);var e=Il(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=Pl(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Pl(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function Nl(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Il(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Il(t),d=c.getUTCFullYear(),u=Ml(),p=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var v=Nl(m,e),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var b=Nl(f,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function El(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const Fl=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return El("yy"===e?s%100:s,e.length)},jl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):El(i+1,2)},Rl=function(t,e){return El(t.getUTCDate(),e.length)},Ll=function(t,e){return El(t.getUTCHours()%12||12,e.length)},Wl=function(t,e){return El(t.getUTCHours(),e.length)},$l=function(t,e){return El(t.getUTCMinutes(),e.length)},Hl=function(t,e){return El(t.getUTCSeconds(),e.length)},Gl=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return El(Math.floor(s*Math.pow(10,i-3)),e.length)};var Vl={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return Fl(t,e)},Y:function(t,e,i,s){var o=Ol(t,s),r=o>0?o:1-o;return"YY"===e?El(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):El(r,e.length)},R:function(t,e){return El(Bl(t),e.length)},u:function(t,e){return El(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return El(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return El(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return jl(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return El(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){Al(1,arguments);var i=Il(t),s=Nl(i,e).getTime()-function(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Nl(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):El(o,e.length)},I:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=Pl(e).getTime()-function(t){Al(1,arguments);var e=Bl(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Pl(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):El(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Rl(t,e)},D:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):El(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return El(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return El(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return El(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return Ll(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Wl(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hl(t,e)},S:function(t,e){return Gl(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return Ul(o);case"XXXX":case"XX":return Yl(o);default:return Yl(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return Ul(o);case"xxxx":case"xx":return Yl(o);default:return Yl(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+ql(o,":");default:return"GMT"+Yl(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+ql(o,":");default:return"GMT"+Yl(o,":")}},t:function(t,e,i,s){return El(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return El((s._originalDate||t).getTime(),e.length)}};function ql(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var a=e||"";return i+String(o)+a+El(r,2)}function Ul(t,e){return t%60==0?(t>0?"-":"+")+El(Math.abs(t)/60,2):Yl(t,e)}function Yl(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+El(Math.floor(o/60),2)+i+El(o%60,2)}const Jl=Vl;var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Zl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Xl={p:Zl,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return Kl(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(o,e)).replace("{{time}}",Zl(r,e))}};const Ql=Xl;var th=["D","DD"],eh=["YY","YYYY"];function ih(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var sh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var rh,ah={date:oh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function lh(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[n]||t.values[a]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function hh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,a=o[0],n=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const ch={code:"en-US",formatDistance:function(t,e,i){var s,o=sh[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:ah,formatRelative:function(t){return nh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:lh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:lh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:lh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:lh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:lh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(rh.matchPattern);if(!i)return null;var s=i[0],o=t.match(rh.parsePattern);if(!o)return null;var r=rh.valueCallback?rh.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:hh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:hh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var dh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ph=/^'([^]*?)'?$/,mh=/''/g,vh=/[a-zA-Z]/;function fh(t,e,i){var s,o,r,a,n,l,h,c,d,u,p,m,v,f,b,g,y,w;Al(2,arguments);var x=String(e),k=Ml(),_=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:k.locale)&&void 0!==s?s:ch,C=Dl(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Dl(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==v?v:k.weekStartsOn)&&void 0!==m?m:null===(y=k.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var T=Il(t);if(!function(t){if(Al(1,arguments),!function(t){return Al(1,arguments),t instanceof Date||"object"===Tl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Il(t);return!isNaN(Number(e))}(T))throw new RangeError("Invalid time value");var D=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(T),A=function(t,e){return Al(2,arguments),function(t,e){Al(2,arguments);var i=Il(t).getTime(),s=Dl(e);return new Date(i+s)}(t,-Dl(e))}(T,D),I={firstWeekContainsDate:C,weekStartsOn:S,locale:_,_originalDate:T};return x.match(uh).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ql[e])(t,_.formatLong):t})).join("").match(dh).map((function(s){if("''"===s)return"'";var o,r,a=s[0];if("'"===a)return(r=(o=s).match(ph))?r[1].replace(mh,"'"):o;var n=Jl[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||-1===eh.indexOf(s)||ih(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==th.indexOf(s))||ih(s,e,String(t)),n(A,s,_.localize,I);if(a.match(vh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s})).join("")}const bh=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.handleTicketId=t=>{t.target.value&&(this.filterData.ticketId=t.target.value)},this.handleTicketType=t=>{t.target.selectedItems&&t.target.selectedItems.length&&(this.filterData.ticketType=t.target.selectedItems.map((t=>t.value)))},this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.ticketTypeList=[{label:"Normal",value:"NORMAL"},{label:"Syndicate",value:"SYNDICATE"},{label:"Subscription",value:"SUBSCRIPTION"}]}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])p[e][i]=t[e][i]})))}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.filterFromCalendar||this.filterData.filterToCalendar||this.filterData.ticketId||this.filterData.ticketType.length)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){if(this.modalCloseEvent(),this.showClearButton=!0,this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterSelectionHandler(this.filterData)}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.clearSelection(),this.filterData={}}formateDate(t){const{year:e,month:i,day:s}=t;return fh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}render(){return s("div",{key:"38024b55a7afaa317f11fe7dc3832e6e3ebcf7ac",class:"HelperFilters",ref:t=>this.stylingContainer=t},s("div",{key:"30f033084f8b40ceb660a92d6769fd1dfb1f7d98",class:"FilterButtonsWrapper"},s("button",{key:"3c347b67791547808207fd72c57c10a0c62c9e25",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},m("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?s("button",{class:"FilterClear",onClick:()=>this.resetSearch()},m("filterClear",this.language)):null),s("helper-modal",{key:"71eed9aa7b4c9aa16d218ad7103181498c81975a","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"a97c9b4a1cbc1fb0afc0a128e626ead51c7f8047",class:"FilterModalHeader"},s("h3",{key:"10f4051b2e02ccd372c3e0dbe757983ba43a16e6",class:"FilterModalTitle"},m(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),s("div",{key:"50f4af101f28a436b0a275010c89eae94833d449",class:"FilterModalBody"},this.activateTicketSearch&&s("div",{key:"1426e94093e76ec65f53a9b6a50aca564f572aab",class:"ticketFilterContainer"},s("div",{key:"4aa30387fb87aa411a21ea4452316f139c3301fd",class:"ticketFilterItem"},s("div",{key:"66136fc7c3588b834f02d1efeb2e622e1bd0b52d",class:"filterKey"},m("filterTicketIdPlaceholder",this.language)),s("vaadin-text-field",{key:"522a8fdc8ad41b033f4126bf27cb449d9db6606e",placeholder:m("filterTicketIdPlaceholder",this.language),value:this.filterData.ticketId,onInput:t=>this.handleTicketId(t)})),s("div",{key:"d2cde3e11ba86f6443fca85cde2c7383a87585b8",class:"ticketFilterItem"},s("div",{key:"6b98a9e702f484c19754a04cb4f1a009c9add01a",class:"filterKey"},m("searchByTicketType",this.language)),s("div",{key:"b52029c39d340ec3e5aa7f9b6844d3cf05bdaadc",class:"general-multi-select-container"},s("general-multi-select",{key:"bf2948532aba6d577eb50e338d2a6c5e5737f674","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrlContent,ref:t=>this.comboBox=t,placeholder:m("filterTiketTypePlaceholder",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType})))),s("div",{key:"e7214b53b0c05f6379da1f6e83b69b8aadfcc59a",class:"filterItem"},s("div",{key:"2262d0e72ac653f93c04381d70b797e9fff68ead",class:"filterKey"},m("searchByDate",this.language)),s("div",{key:"c1b10ba14ebe8624af0708d0a500b9a1d1751dbf",class:"FilterCalendarWrapper"},s("vaadin-date-picker",{key:"807a7987b19ecdc3b34d759a9a5d68d3f77e27dd",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:m("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),s("vaadin-date-picker",{key:"3be5eea8d7c41f84c0d624faf32cd800468366a4",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:m("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"})))),s("div",{key:"0987fee1be9552effcc023b93e67886e7bab535a",class:"FilterModalFooter"},s("button",{key:"f46728dfb5e63db90f6c8437d233b47354419295",class:"FilterModalButton",onClick:()=>this.filterSearch()},m("filterModalButton",this.language)))))}};bh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .filterKey,.FilterModalBody .filterKey,.FilterModalFooter .filterKey{color:var(--emw--color-typography, #009993);text-align:left;font-size:16px}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-transparency-60, #e8ebef);color:var(--emw--color-secondary-variant, #263445);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-typography, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}.ticketFilterItem{margin:12px 0}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}';const gh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),yh=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&s("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},s("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(gh(this.userAgent)?" HelperModalMobileContent":"")},s("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(gh(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),s("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};yh.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-transparency-40, #848e97);box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}";const wh="en",xh=["en"],kh={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},_h=(t,e)=>{const i=e;return kh[void 0!==i&&xh.includes(i)?i:wh][t]},Ch=class{constructor(e){t(this,e),this.selectedIndex=0,this.cmsEndpoint=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0,this.tabContent=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])kh[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=kh[void 0!==i&&xh.includes(i)?i:wh][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):kh[void 0!==i&&xh.includes(i)?i:wh][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=s("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=s("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},s("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},s("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},_h("register",this.language)),s("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},_h("butTickets",this.language)),s("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},_h("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=s("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},s("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},s("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},_h("odds",this.language)),s("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},_h("winGame",this.language)),s("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},_h("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ch.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";const Sh=class{constructor(e){t(this,e),this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.mbSource=void 0,this.clientStylingurl="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}connectedCallback(){}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},s("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>s("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),s("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},s("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Sh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-typography, #009993);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-gray-50, #F1F1F1)}.TabButton.Active{background:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}';const Th=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};Th.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const Dh=["ro","en","hr"],Ah={en:{drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridDraw:"Draw Numbers",drawNumbersGridTicket:"Selected Numbers",ticketResult:"Ticket Result",amountWon:"Amount won",numberOfDraws:"Number of Draws",multiplierNum:"Multiplier Number",ticketId:"Ticket ID",ticketType:"Ticket Type",ticketAmount:"Ticket Amount",prize:"Prizes"},ro:{drawId:"Id extragere",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase",drawNumbersGridTicket:"Numere selectate",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplierNum:"Multiplier Number",ticketId:"Id biletul",ticketType:"Ticket Type",ticketAmount:"Valoarea biletului",prize:"Premii"},fr:{drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros",drawNumbersGridTicket:"Nombres sélectionnés",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplierNum:"Multiplier Number",ticketId:"ID de billets",ticketType:"Ticket Type",ticketAmount:"Montant du billet",prize:"Prix"},ar:{drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridDraw:" أرقام السحب",drawNumbersGridTicket:"الأرقام المختارة",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplierNum:"Multiplier Number",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",prize:"الجوائز"},hr:{drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih",drawNumbersGridTicket:"Odabrani brojevi",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplierNum:"Multiplier Number",ticketId:"ID listića",ticketType:"Ticket Type",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ih=(t,e)=>{const i=e;return Ah[void 0!==i&&Dh.includes(i)?i:"en"][t]},zh=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.displayPrizeCategory=(t,e)=>{const i=new Map;t.forEach((t=>{let s=this.getDivision(t,e),o=t.amount,r=t.currency;s&&"None"!=s&&(i.has(s)?i.set(s,{amount:i.get(s).amount+o,currency:r,times:i.get(s).times+1}):i.set(s,{amount:o,currency:r,times:1}))}));const s=[];for(let[t,e]of i.entries())s.push({prizeName:t,amount:e.amount,currency:e.currency,times:e.times});return s.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),s},this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketType="",this.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketMultiplierNum=void 0,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrlContent="",this.ticketDrawData="",this.historyDrawData="",this.tabValue="",this.translationUrl=void 0,this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.limitStylingAppends=!1,this.drawData=void 0,this.resultMap={Won:"Win",Lost:"Lose"}}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ah[e][i]=t[e][i]})))}connectedCallback(){if(this.historyDrawData&&(this.drawData=JSON.parse(this.historyDrawData)),this.ticketNumbers){let t=JSON.parse(this.ticketNumbers);this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.isLoading=!1}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>{t.drawData=Object.assign({},e);let i=this.displayPrizeCategory(t.details,t);t.details=[...i]}))})),this.ticketDrawDetailsFlag=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}getDivision(t,e){var i,s;let o=t.division,r=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===o));return r&&r.length?r[0].division:null}render(){return this.isLoading?s("p",null,"Loading, please wait ..."):this.hasErrors?void s("p",null,this.errorText):s("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?s("div",{class:"DrawResultsArea"},this.drawData&&s("div",null,s("div",{class:"DrawResultsHeader"},s("span",null,Ih("drawId",this.language),": ",this.drawData.id),s("span",null,Ih("drawDate",this.language),": ",fh(new Date(this.drawData.date),"dd/MM/yyyy"))),s("div",{class:"DrawResultsBody"},s("div",{class:"DrawNumbersGrid"},s("p",null,Ih("drawNumbersGridDraw",this.language)),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.length&&this.drawData.winningNumbers[0].numbers.join(","),"secondary-numbers":this.drawData.winningNumbers.length?this.drawData.winningNumbers[0].secondaryNumbers.join(","):"","display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language)," "),this.drawData.prizes.length?s("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>s("div",null,s("span",{style:{"margin-right":"5px"}},t.division,":"),s("span",{style:{"margin-right":"4px"}}," ",this.thousandSeperator(t.amount.value)),s("span",null,t.amount.currency))))):s("div",null,"None")))))):s("div",{class:"DrawResultsArea TicketDraws"},s("div",{class:"DrawResultsBody"},s("div",{class:"TicketIdContainer"},s("label",{class:"Label"},Ih("ticketId",this.language),": ",s("span",null,this.ticketId))),s("div",{class:"TicketTypeContainer"},s("label",{class:"Label"},Ih("ticketType",this.language),": ",s("span",null,this.ticketType))),s("div",{class:"TicketAmountContainer"},s("label",{class:"Label"},Ih("ticketAmount",this.language),": ",s("span",null,`${this.thousandSeperator(this.ticketAmount)} ${this.ticketCurrency}`))),s("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var i;return s("div",null,s("label",{class:"Label"},Ih("drawNumbersGridTicket",this.language),":"),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(i=this.gridSecondaryNumbers[e])||void 0===i?void 0:i.join(","),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))}))),this.ticketMultiplier&&s("div",{class:"DrawMultipler"},s("label",{class:"Label"},Ih("multiplierNum",this.language),": ",this.thousandSeperator(this.ticketMultiplierNum))),s("div",{class:"NumberOfDrawsContainer"},s("label",{class:"Label"},Ih("numberOfDraws",this.language),": ",this.thousandSeperator(this.ticketDrawCount)),s("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&s("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var i,o,r,a,n,l,h,c;return s("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},s("div",{class:"ExpandableBoxHeader"},s("div",{class:"TicketResultContainer"},s("p",null,Ih("ticketResult",this.language),": ",this.resultMap[t.state])),"won"==t.state&&s("div",{class:"AmountWonContainer"},s("p",null,Ih("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId))),s("div",{class:"ExpandableBoxBody"},s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId)),s("div",{class:"DrawDateContainer"},s("p",null,Ih("drawDate",this.language),": ",null===(i=t.drawData)||void 0===i?void 0:i.date.slice(0,10)," | ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),s("div",{class:"DrawNumbersGrid"},t.drawData&&s("div",{class:"BulletContainer"},s("label",{class:"Label"},Ih("drawNumbersGridDraw",this.language),":"),s("lottery-grid",{"selected-numbers":(null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.length)&&(null===(n=t.drawData.winningNumbers[0].numbers)||void 0===n?void 0:n.join(",")),"secondary-numbers":(null===(h=null===(l=t.drawData)||void 0===l?void 0:l.winningNumbers)||void 0===h?void 0:h.length)&&(null===(c=t.drawData.winningNumbers[0].secondaryNumbers)||void 0===c?void 0:c.join(",")),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),t.details.length>0&&s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language),":"),s("span",null,t.details.map((t=>s("span",null,s("div",null,s("span",null,t.prizeName,t.times>1?" x "+t.times:"",": "),s("span",{style:{"margin-right":"4px"}},this.thousandSeperator(t.amount)),s("span",null,t.currency)))))))))}))))))))}};zh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid var(--emw--color-typography, #009993)}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ExpandableBox{border-bottom:1px solid var(--emw--color-gray-transparency-80, #ccc);transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:var(--emw--color-typography, #009993)}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:var(--emw--color-background, #009993)}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:var(--emw--color-background, #009993);transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:auto}';const Mh=["ro","en","fr","ar","hr"],Ph={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results.",loading:"Loading, please wait ...",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",loading:"Loading, please wait ..."},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",loading:"Loading, please wait ..."},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",loading:"Loading, please wait ..."},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",loading:"Loading, please wait ..."}},Bh=(t,e)=>{const i=e;return Ph[void 0!==i&&Mh.includes(i)?i:"en"][t]},Nh=class{constructor(e){t(this,e),this.isReset=!1,this.getDrawsData=()=>{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);t.searchParams.append("limit",this.limit.toString()),t.searchParams.append("offset",this.offset.toString()),t.searchParams.append("excludeStatus","INIT,OPEN"),this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items?t.items.filter((t=>t.winningNumbers)):[],this.drawData=this.winningDataSetsData.map((t=>t)),this.totalResults=t.total})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.transDataToString=t=>{try{return JSON.stringify(t)}catch(t){throw new Error(t)}},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.drawData=[],this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.limitStylingAppends=!1,this.activeIndex=0,this.totalResults=0,this.limit=5,this.offset=0}filtersHandler(t){this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.limit=5,this.offset=0,this.getDrawsData()}clearFiltersHandler(){this.dateFiltersFrom="",this.dateFiltersTo="",this.limit=5,this.offset=0,this.drawData=this.winningDataSetsData,this.getDrawsData()}hpPageChange(t){this.limit=t.detail.limit,this.offset=t.detail.offset,this.isReset=!1,this.getDrawsData()}connectedCallback(){this.getDrawsData()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ph[e][i]=t[e][i]})))}disconnectedCallback(){clearInterval(this.interval)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("div",{key:"b8771d5092661ca5020d307ab0187311f8a60e56",class:"DrawResultsHeader"},s("div",{key:"dbe57fcd0959a88490c2ec6b92a5f828fb5abd55",class:"DrawResultsHeaderContent"},s("h4",{key:"bff47a0181c280a240cec2e3fde19381a2cf1609"},Bh("drawResultsHeader",this.language)),s("div",{key:"9c7d774d0d07be3e05f6528d000b158550e32a57",class:"FilterSection"},s("helper-filters",{key:"7325eb71811951573d107ae4a1095c4ad66ce157","activate-ticket-search":"false","game-id":this.gameId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))));return s("section",{key:"52afb52ee81dab86d31a99498bddf955e3a7bf22",class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"2d84ed5d4d2c3fa426d245284f8c2dc36da20786",class:"DrawResultsSection"},s("div",{key:"c960bea0d2c9281fd288d47f983db8929cfa2fe4",class:"DrawResultsAreaHistory"},t,s("div",{key:"4cf5407c17f5b4573f5d568679a49ee93677e884",class:"HistoryGridWrapper"},s("div",{key:"6ca8e6d7f872b75591003de5c8d5f144ec283a08",class:"HistoryGrid"},this.isLoading&&s("p",{key:"cc1ac748056d3bf79c0eb7853fed0fded00665b4"},Bh("loading",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"history-draw-data":this.transDataToString(t),"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),!this.isLoading&&this.noResults&&s("p",{key:"afca3878b22cbf60503b80ad83aeb5ed4213f775",class:"errorText"},Bh("noResults",this.language)))),s("div",{key:"43ae21f99e95c46a41a7434afb29c4544698a4b6",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&s("lottery-pagination",{key:"63594981436325b34aa0baf91f5477d83908b011",arrowsActive:!0,numberedNavActive:!0,"is-reset":this.isReset,"first-page":!1,"prev-page":!0,"next-page":!0,offset:this.offset,limit:this.limit,total:this.totalResults,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))}};Nh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-typography, #009993);border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:var(--emw--color-background, #009993);padding:10px;text-align:center;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton,.FilterSection .ResetButton{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .Active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterSection helper-filters{margin-left:auto}.errorText{color:var(--emw--color-error, #ff0000)}';const Oh=class{constructor(e){t(this,e),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.clientStyling="",this.clientStylingUrlContent="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0,this.limitStylingAppends=!1}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{key:"bfc44a442056b452e331fc736f9c22e30dca143b",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"c8ad00900a8f16050a840c2e21fd4c2cebf2e1ec","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"cc8dc2dc148fb862f51a5c45b18c6c3e9fbb46f7",class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{key:"b72ade93e6a2432276b24929be8865b2516ca44a","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};Oh.style=":host{display:block}";const Eh=["ro","en","fr","ar","hr"],Fh={en:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ro:{error:"Eroare",backButton:"Inapoi",lobbyButton:"Lobby",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",submitSuccess:"Submit successfully!",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",modalLogin:"Please login to submit a ticket",loading:"Se incarca, va rugam asteptati ..."},fr:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ar:{error:"خطأ",backButton:"خلف",lobbyButton:"ردهة",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",submitSuccess:"Submit successfully!",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة",loading:"Loading, please wait ..."},hr:{error:"Greška",backButton:"Nazad",lobbyButton:"Lobby",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",submitSuccess:"Submit successfully!",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",modalLogin:"Molimo prijavite se da uplatite listić",loading:"Učitavanje, molimo pričekajte ..."}},jh=(t,e)=>{const i=e;return Fh[void 0!==i&&Eh.includes(i)?i:"en"][t]},Rh=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Fh[e][i]=t[e][i]})),e(Fh)})).catch((t=>{i(t)}))})),Lh=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));function Wh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a=Lh(),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const $h=class{constructor(i){var s;t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.userAgent=window.navigator.userAgent,this.quickPick=!1,this.gameData={},this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.secondarySelectionAllowed=!1,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingurl),e=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{this.clientStylingUrlContent=t,e.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(e)}),1)})).catch((t=>{console.log("error ",t)}))},this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.clientStyling="",this.clientStylingurl="",this.translationUrl="",this.clientStylingUrlContent="",this.tickets=[],this.mainTickets=[],this.secondaryTickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.limitStylingAppends=!1,this.isLoading=!1,this.showSubmitError=!1,this.submitError="",this.showApiError=!1,this.apiError="",this.translationData=void 0,this.isSubscription=!1,this.subscriptionParam=null,this.showSubscriptionError=!1,this.subscriptionError="",this.isSubscribed=!1}handleNewTranslations(){this.isLoading=!0,Rh(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const e=Rh(this.translationUrl).then((t=>{this.translationData=JSON.stringify(t)})).catch((t=>{console.log(t)}));t.push(e)}return Promise.all(t)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingurl&&this.setClientStylingURL(),this.limitStylingAppends=!0)}countdownLogic(t){const e=()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)};e(),this.interval=setInterval(e,1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{var e,i;this.gameData=t,this.basicStake=this.gameData.rules.stakes.length?Number(this.gameData.rules.stakes[0].value):0,this.basicLine=(null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.length)?this.gameData.rules.betTypes[0].boardsAllowed[0]:1,this.basicBetType=this.gameData.rules.betTypes[0],this.nextDate=null===(i=this.gameData.currentDraw)||void 0===i?void 0:i.date,this.nextDate&&this.countdownLogic(this.nextDate),this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed,this.quickPick=this.gameData.rules.quickPickAvailable,this.isSubscription=this.gameData.rules.wagerTypes&&this.gameData.rules.wagerTypes.includes("Subscription");let s=this.gameData.draws?this.gameData.draws.filter((t=>!t.winningNumbers)):[];s.length>0&&(this.nextDraw=s[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.mainTickets.forEach((t=>{var e;t.completed.every((t=>t))&&(this.totalAmount+=t.drawCount*(t.stake||this.basicStake)*t.multiplierNum*t.lineNum*(null===(e=t.betType)||void 0===e?void 0:e.combinations))})),this.currency=t}gridFilledHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!0,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:t.detail.drawCount,stake:e.stake||this.basicStake,selectedNumbers:i,multiplierNum:t.detail.multiplierNum,multiplier:t.detail.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:t.detail.quickPicks,betName:t.detail.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}gridDirtyHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!1,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:e.drawCount,stake:e.stake,selectedNumbers:i,multiplierNum:e.multiplierNum,multiplier:e.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:e.quickPicks,betName:e.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}modalCloseEvent(){this.loginModalVisible=!1,this.successVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.mainTickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){const{ticketId:e,multiplierNum:i,multiplier:s}=t.detail;this.mainTickets[e-1].multiplierNum=i,this.mainTickets[e-1].multiplier=s,this.calculateTotalAmount()}drawMultiplierChangeHandler(t){const{ticketId:e,drawCount:i}=t.detail;this.mainTickets[e-1].drawCount=i,this.calculateTotalAmount()}lineMultiplierChangeHandler(t){const{ticketId:e,lineNum:i}=t.detail;this.mainTickets[e-1].lineNum=i,this.mainTickets[e-1].completed=Array.from({length:i},(()=>!1)),this.mainTickets[e-1].selectedNumbers=[],this.mainTickets[e-1].quickPicks=[]}betTypeChangeHandler(t){const{ticketId:e,betType:i}=t.detail;this.mainTickets[e-1].betType=i}createNewTicket(){this.mainTickets=[...this.mainTickets,{gameId:this.gameId,ticketId:this.mainTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine,quickPicks:[!1],betName:""}],this.secondaryTickets=[...this.secondaryTickets,{gameId:this.gameId,ticketId:this.secondaryTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}]}showLoginModal(){this.loginModalVisible=!0}handleSubscriptionReady(t){this.subscriptionParam=t.detail}handleSubscriptionCheckChange(t){this.isSubscribed=t.detail}buildTicketParam(){let t={playerId:this.playerId.toString(),tickets:[]},e=[];this.secondarySelectionAllowed&&(e=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let i=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),s=[...new Set([...e,...i])].sort(((t,e)=>t-e));if(s.length){this.showSubmitError=!0;let t=s.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,setTimeout((()=>{this.showSubmitError=!1}),3e3),null}return this.mainTickets.forEach(((e,i)=>{var s;t.tickets.push({startingDrawId:this.nextDraw,amount:(e.stake*e.drawCount*e.multiplierNum*(e.lineNum||1)*(null===(s=e.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:e.selectedNumbers.map(((t,s)=>{var o;return{betType:(null===(o=e.betType)||void 0===o?void 0:o.id)||this.gameData.rules.defaultBetType,stake:e.stake,selections:t,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[],quickPick:e.quickPicks[s],betName:e.betName}})),multiplier:e.multiplier,multiplierNum:e.multiplierNum,drawCount:e.drawCount,quickPick:this.quickPick})})),t}showNotification(t,e="",i="top-end"){const s=document.createElement("vaadin-notification");s.renderer=e=>{e.textContent=t},s.duration=5e3,e&&s.setAttribute("theme",e),s.setAttribute("position",i),document.body.appendChild(s),s.opened=!0}handleSubmitTickets(){this.isSubscription&&this.isSubscribed?(this.submitTickets(),this.submitSubscriptionTickets()):this.submitTickets()}async submitSubscriptionTickets(){try{let t=await this.buildTicketParam();if(!t)return;if(!this.subscriptionParam||"string"==typeof this.subscriptionParam)return this.subscriptionError="string"==typeof this.subscriptionParam?this.subscriptionParam:"Ouccurence is required.",this.showSubscriptionError=!0,void setTimeout((()=>{this.showSubscriptionError=!1}),3e3);this.isLoading=!0;const e=this.playerId.toString(),i=`${this.endpointSubscription}/player/${e}/ruleDefinition`;this.subscriptionParam.playerId=e;const s=fh(new Date,"yyyyMMddHHMMSS");this.subscriptionParam.name=`${this.subscriptionParam.ruleType}_${e}_${s}`;const{id:o}=await Wh(i,"POST",this.subscriptionParam,{Authorization:`Bearer ${this.sessionId}`});if(t){const e=Object.assign(Object.assign({},t),{ruleDefinitionId:o}),i=`${this.endpointTicket}/subscription`;await Wh(i,"POST",e,{Authorization:`Bearer ${this.sessionId}`}),this.showNotification("Subscription rule created successfully.","success")}}catch(t){this.showNotification("Failed to create the subscription rule. Please try again.","error")}this.isLoading=!1}submitTickets(){let t=new URL(`${this.endpointTicket}/tickets`);const e=this.buildTicketParam();if(e){const i=Lh();let s={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":i},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,s).then((t=>{if(t.status>300)throw this.apiError=t.statusText+".",this.showApiError=!0,setTimeout((()=>{this.showApiError=!1}),3e3),new Error(t.statusText);return t.json()})).then((()=>{this.showNotification("Ticket submitted successfully.","success")})).catch((t=>{console.log("Error ",t),this.showNotification("Failed to purchase the ticket. Please try again.","error")})).finally((()=>{this.isLoading=!1}))}}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,o,r,a,n,l,h,c,d,u,p,m,v,f,b,g,y,w,x;const k=i(this.isMobile?"../static/chrono_lottery_mobile.webp":"../static/chrono_desktop.webp");return this.hasErrors?s("div",{class:"GamePage"},s("div",{class:"Title"},jh("error",this.language))):s("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},s("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:k})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},s("div",{class:"BannerButtonsWrapper"}),s("div",{class:"Tabs"},s("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},jh("buy",this.language)),s("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},jh("viewLatest",this.language)))),s("div",{class:"NextDrawWrapper"},this.nextDate&&s("div",{class:"NextDraw"},s("p",{class:"BannerText"},jh("nextDraw",this.language)),s("div",{class:"BannerCountdown"},s("span",{class:"CountdownDays"},this.daysRemaining,"D"),s("span",{class:"CountdownHours"},this.hoursRemaining,"H"),s("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),s("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&s("div",{class:"GamePageContent"},s("div",{class:"GameDetails"},s("lottery-game-details",{"low-number":null===(e=null===(t=this.gameData.rules)||void 0===t?void 0:t.boards[0])||void 0===e?void 0:e.lowNumber,"high-number":null===(r=null===(o=this.gameData.rules)||void 0===o?void 0:o.boards[0])||void 0===r?void 0:r.highNumber,"minimum-allowed":null===(n=null===(a=this.gameData.rules)||void 0===a?void 0:a.boards[0])||void 0===n?void 0:n.minimumAllowed,"maxinum-allowed":null===(h=null===(l=this.gameData.rules)||void 0===l?void 0:l.boards[0])||void 0===h?void 0:h.maxinumAllowed,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent,"translation-url":this.translationData})),s("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,i;return s("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":null===(e=this.gameData.rules)||void 0===e?void 0:e.quickPickAvailable,"reset-button":null===(i=this.gameData.rules)||void 0===i?void 0:i.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})}))),s("div",{class:"OrderSummary"},s("h3",{class:"OrderSummaryTitle"},jh("orderSummaryTitle",this.language)),s("div",{class:"OrderTicketInfo"},s("div",{class:"Ticket"},jh("orderSummaryTickets",this.language),": ",s("span",null,this.mainTickets.length)),s("div",null,s("span",null,this.thousandSeperator((null===(d=null===(c=this.mainTickets[0])||void 0===c?void 0:c.betType)||void 0===d?void 0:d.combinations)*(null===(u=this.mainTickets[0])||void 0===u?void 0:u.lineNum))),s("span",{class:"Multiplier"},"x"),(null===(p=this.gameData.rules)||void 0===p?void 0:p.stakeMultiplierAvailable)&&s("span",null,s("span",null,1===(null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum)?`${null===(v=this.mainTickets[0])||void 0===v?void 0:v.multiplierNum} Multiplier`:`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multipliers`),s("span",{class:"Multiplier"},"x")),s("span",null,`${null===(b=this.mainTickets[0])||void 0===b?void 0:b.stake} EUR`),(null===(g=this.gameData.rules)||void 0===g?void 0:g.drawMultiplierAvailable)&&s("span",null,s("span",{class:"Multiplier"},"x"),s("span",null,1===(null===(y=this.mainTickets[0])||void 0===y?void 0:y.drawCount)?`${null===(w=this.mainTickets[0])||void 0===w?void 0:w.drawCount} Draw`:`${null===(x=this.mainTickets[0])||void 0===x?void 0:x.drawCount} Draws`)))),s("hr",null),s("div",{class:"Total"},jh("orderSummaryTotal",this.language),": ",s("span",null,this.thousandSeperator(this.totalAmount)," ",this.currency)),this.isSubscription&&s("div",{class:"SubscriptionWrapper"},s("lottery-subscription",{endpoint:this.endpoint,endpointSubscription:this.endpointSubscription,language:this.language,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent,gameName:this.gameData.name})),s("div",{class:"ButtonWrapper"},this.isLoggedIn&&s("div",null,!this.isLoading&&s("div",{class:"submitWrap"},s("div",{class:"Button",onClick:()=>this.handleSubmitTickets()},jh("orderSummarySubmit",this.language)),this.showSubmitError&&s("div",{class:"submitError"},this.submitError),this.showApiError&&s("div",{class:"submitError"},this.apiError),this.showSubscriptionError&&s("div",{class:"submitError"},this.subscriptionError)),this.isLoading&&s("span",{class:"Button",style:{cursor:"default"}},jh("loading",this.language))),!this.isLoggedIn&&s("div",null,s("span",{class:"Button",onClick:()=>this.showLoginModal()},jh("orderSummarySubmit",this.language)),s("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("p",{class:"SubmitModalSuccess"},jh("modalLogin",this.language))))))),1==this.tabIndex&&s("div",null,s("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),s("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("p",{class:"SubmitModalSuccess"},jh("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return o(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};$h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-gray-100, #D4D4D4);border-radius:var(--emw--button-border-radius, 4px);padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:var(--emw--button-text-color, #000);font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:var(--emw--button-background-color, #00958f);font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:var(--emw--button-background-color, #00958f);display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:var(--emw--button-border-radius, 4px);cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:var(--emw--button-background-color, #00958f);background:var(--emw--color-gray-50, #F1F1F1);border:1px solid var(--emw--color-gray-50, #F1F1F1)}.LastDrawResultsTitle{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:var(--emw--button-border-radius, 4px);text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:var(--emw--color-gray-50, #F1F1F1);background:linear-gradient(0deg, var(--emw--color-gray-50, #F1F1F1) 0%, var(--emw--color-gray-transparency-20, rgba(253, 187, 45, 0)) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:var(--emw--color-typography, #009993);font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:var(--emw--color-primary-variant, #004D4A);height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--color-primary-variant, #004D4A);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:var(--emw--color-gray-50, #F1F1F1)}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary{min-width:200px;border-radius:var(--emw--button-border-radius, 4px);display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary .OrderSummaryTitle{font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase;text-align:center}.OrderSummary .OrderTicketInfo{display:flex;align-items:center}.OrderSummary .OrderTicketInfo .Multiplier{margin:0 6px}.OrderSummary .Ticket{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px;margin-right:30px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double var(--emw--color-gray-100, #D4D4D4);color:var(--emw--color-gray-100, #D4D4D4);width:100%}.OrderSummary .Total{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-background, #009993);border:1px solid var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ButtonWrapper .Button:hover{background:var(--emw--color-background-secondary, #00ABA4)}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:var(--emw--color-gray-transparency-80, #ccc);border:1px solid var(--emw--color-gray-transparency-80, #ccc)}.ButtonWrapper .submitError{margin-top:10px;color:var(--emw--color-error, #FF3D00)}.ButtonWrapper .submitWrap{display:flex;flex-direction:column;align-items:center}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:var(--emw--button-background-color, #00958f);font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:var(--emw--button-text-color, #000);line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);padding:10px 25px;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:var(--emw--color-gray-50, #F1F1F1)}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const Hh=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.selectedCounter=0,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrlContent="",this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[],this.limitStylingAppends=!1}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return s("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))):""))}};Hh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Gh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Vh={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},qh=(t,e)=>Vh[void 0!==e&&e in Vh?e:"en"][t],Uh=class{constructor(i){t(this,i),this.hpPageChange=e(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,e)=>{isNaN(t)?0===e&&this.currentPage<=4?this.navigateTo("firstPage"):0===e&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===e&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0,this.limitStylingAppends=!1}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Vh[e][i]=t[e][i]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,e)=>e+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,e)=>this.currentPage+e-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,e)=>this.endInt-2+e)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)))}componentDidRender(){this.isReset=!1,!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(Gh(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},s("span",null,t)))))),e=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},qh("firstPage",this.language)),s("span",{class:"NavigationIcon"})),i=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"})));Gh(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},qh("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let o=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},qh("lastPage",this.language)),s("span",{class:"NavigationIcon"})),r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);return Gh(this.userAgent)&&(r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},qh("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&r)}};Uh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--button-text-color, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-transparency-30, #524e52);border-radius:5px;background:var(--emw--color-gray-transparency-30, #524e52);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004D4A);border-color:var(--emw--color-primary-variant, #004D4A)}button:disabled{background-color:var(--emw--color-gray-transparency-80, #ccc);border-color:var(--emw--color-gray-transparency-80, #ccc);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}}';const Yh=["ro","en","hr"],Jh={en:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ro:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},fr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ar:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},hr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"}},Kh=(t,e)=>{const i=e;return Jh[void 0!==i&&Yh.includes(i)?i:"en"][t]};function Zh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const Xh=class{constructor(i){t(this,i),this.subscriptionCompleted=e(this,"subscriptionCompleted",7),this.subscriptionCheckChange=e(this,"subscriptionCheckChange",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.changeDateParam=()=>{if(this.filterData.from&&!this.filterData.to){let t=this.filterData.from,e=t.split("/");t=new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),0,0,0)).toISOString();const i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:"",fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}if(this.filterData.from&&this.filterData.to){const{from:t,to:e}=this.transDate(this.filterData.from,this.filterData.to),i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:e,fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{from:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{to:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.translationUrl=void 0,this.clientStyling="",this.clientStylingUrlContent="",this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.language="en",this.gameName=void 0,this.isSubscribed=!1,this.frequenceList=[],this.frequenceState="",this.filterData={from:"",to:""},this.subscriptionCode="lottery-subscription-widget001",this.conditionId="",this.paramId="",this.conditionRule=void 0,this.paramRule=void 0,this.peroidRule=void 0,this.startDateRule=void 0,this.endDateRule=void 0,this.gameNameRule=void 0,this.ruleType="",this.limitStylingAppends=!1}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Jh[e][i]=t[e][i]}))),this.getSubscriptionData()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}transDate(t,e){let i=t.split("/"),s=e.split("/");return{from:new Date(Date.UTC(Number(i[2]),Number(i[1])-1,Number(i[0]),0,0,0)).toISOString(),to:new Date(Date.UTC(Number(s[2]),Number(s[1])-1,Number(s[0]),23,59,59)).toISOString()}}async getSubscriptionData(){try{const t=`${this.endpointSubscription}/feWidgetConfig/${this.subscriptionCode}`,{conditionMetadataId:e,paramMetadataId:i,ruleType:s}=await Zh(t);this.conditionId=e,this.paramId=i,this.ruleType=s;const o=`${this.endpointSubscription}/metadata/${this.conditionId}`,r=`${this.endpointSubscription}/metadata/${this.paramId}`,[a,n]=await Promise.allSettled([Zh(o),Zh(r)]);if("fulfilled"!==a.status||"fulfilled"!==n.status)throw new Error("Failed to get subscription data");this.conditionRule=a.value,this.paramRule=n.value,this.conditionRule.fields&&(this.peroidRule=this.conditionRule.fields.find((t=>"Period"===t.code)),this.startDateRule=this.conditionRule.fields.find((t=>"StartDate"===t.code)),this.endDateRule=this.conditionRule.fields.find((t=>"EndDate"===t.code)),this.gameNameRule=this.conditionRule.fields.find((t=>"GameName"===t.code)),this.frequenceList=this.peroidRule.enums.map((t=>({label:t.text,value:t.key}))))}catch(t){console.error(t)}}handleCheckboxchange(t){this.isSubscribed=t.target.checked,this.subscriptionCheckChange.emit(this.isSubscribed)}handleSelectionChange(t){if(this.frequenceState=t.detail.value,"NeverMissADraw"===this.frequenceState&&this.isSubscribed){const t={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};t.params=this.paramRule.fields.map((t=>({value:"",fieldId:t.id}))),this.subscriptionCompleted.emit(t)}else"Custom"===this.frequenceState&&this.isSubscribed&&this.subscriptionCompleted.emit("Subscription start date is required.")}formateDate(t){const{year:e,month:i,day:s}=t;return fh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate}))}render(){return s("div",{key:"1bf289722935c5d2b574ba18f322830c81335585",class:"subscripitonContainer",ref:t=>this.stylingContainer=t},s("vaadin-checkbox",{key:"5f62fb61bccecd3632525ab0b28a41e45487c7ec",label:"Subscription",checked:this.isSubscribed,onChange:this.handleCheckboxchange.bind(this)}),this.isSubscribed&&s("div",{key:"d8e56e346ca8f275866738ab9c6d8eb14437d84a",class:"secondConditon"},s("span",{key:"13c61d7582b1e0716395bd06c410a621b8af97d8",style:{"margin-right":"8px"}},"Occurrence: "),s("vaadin-select",{key:"cf8d9c4176f66d2095798cae79b82b748e7ffb0b",items:this.frequenceList,value:this.frequenceState,"on-value-changed":this.handleSelectionChange.bind(this)}),"Custom"===this.frequenceState&&s("div",{key:"c1496adac7e295830074da0b096bf4bbc0af8247",class:"thirdCondition"},s("div",{key:"2aa4f92c84ab37edee56640ae0657f59e92c3719",class:"filterCalenderWrap"},s("div",{key:"6665e3f2bd28650794eb174db6081ab4a9f514f0",class:"filterText"},"Subscription Start Date*"),s("div",{key:"50a05e684bf068ab00d6d4298e65a6b94c44b79a",class:"filter"},s("vaadin-date-picker",{value:this.filterData.from,key:"filterFromCalendar",max:void 0===this.filterData.to?void 0:this.changeFormate(this.filterData.to),onChange:this.handleFilterFrom,placeholder:Kh("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))),s("div",{key:"85c4bf037ad7bc9797f809aa7e71fcbfbc80c298",class:"filterCalenderWrap"},s("div",{key:"87b446788202ae55ad698c8455c9a6d09a9d22d6",class:"filterText"},"Subscription End Date"),s("div",{key:"5700c92b2f0c57959f84b5f7ac7a3488d1d0d096",class:"filter"},s("vaadin-date-picker",{value:this.filterData.to,key:"filterToCalendar",min:void 0===this.filterData.from?void 0:this.changeFormate(this.filterData.from),onChange:this.handleFilterTo,placeholder:Kh("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}};Xh.style=".subscripitonContainer{margin-bottom:40px}.subscripitonContainer vaadin-checkbox[checked]::part(checkbox){background-color:var(--emw--color-background, #009993)}.subscripitonContainer .secondCondition{padding-left:24px}.subscripitonContainer .thirdCondition{display:flex;gap:24px;align-items:center}.subscripitonContainer .thirdCondition,.subscripitonContainer .secondConditon{margin:16px 0}";const Qh=["ro","en","hr"],tc={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},ec=(t,e)=>{const i=e;return tc[void 0!==i&&Qh.includes(i)?i:"en"][t]},ic=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.limitStylingAppends=!1,this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let o=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=o.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])tc[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)],this.quickPicks[e]=!1}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return s("div",null,s("p",null,ec("loading",this.language)));if(this.hasErrors)return s("div",null,s("p",null,ec("error",this.language)));{const{rules:t}=this.gameData;return s("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},s("p",{class:"TicketTitle"},this.gameData.name),s("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>s("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&s("div",null,s("label",{class:"Label"},ec("playType",this.language),": "),s("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&s("div",null,s("label",{class:"Label"},ec("lines",this.language),": "),s("div",{class:"WagerInput"},s("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},s("span",null,this.lineMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>s("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,i)=>s("div",null,s("div",{class:"TicketGridHeader"},s("div",null,ec("lineName",this.language),i+1),this.resetButton&&this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(i)},ec("resetButton",this.language))),this.autoPick&&!this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(i)},ec("autoButton",this.language)))),s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].selectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})),this.secondarySelectionAllowed&&s("div",{class:"SecondarySelectionWrapper"},s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})))))),t.stakeMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ec("multiplier",this.language),": "),s("div",{class:"WagerInput"},t.stakeMultipliers.length>1?s("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},s("span",null,this.stakeMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>s("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ec("numberOfDraws",this.language),": "),s("div",{class:"WagerInput"},t.durations.length>1?s("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},s("span",null,this.drawMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.durations.map((t=>s("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),s("div",null,s("label",{class:"Label"},ec("wagerPerDraw",this.language),": "),s("div",{class:"WagerInput"},t.stakes.length>1?s("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleClass()},s("span",null,this.amountInfo.value," ",this.amountInfo.currency),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakes.map((t=>s("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):s("div",null,s("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),s("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};ic.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const sc=["ro","en","fr","ar","hr"],oc={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},rc=(t,e)=>{const i=e;return oc[void 0!==i&&sc.includes(i)?i:"en"][t]},ac=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.limitStylingAppends=!1}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])oc[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return s("div",{key:"581989035aa42a397cd39a4cdd929ea91190494c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"724d50d1532510344ed7acd57c3c5faef17aef8c","header-title":`${rc("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"ba851ea2792641971a5552a94558fe8d28068187",slot:"accordionContent"},s("lottery-ticket",{key:"199abc15160d60499d7d1d1d14084f64a6314c53",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))))}};ac.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{l as general_multi_select,d as helper_accordion,bh as helper_filters,yh as helper_modal,Ch as helper_tab,Sh as helper_tabs,Th as lottery_bullet,zh as lottery_draw_results,Nh as lottery_draw_results_history,Oh as lottery_game_details,$h as lottery_game_page,Hh as lottery_grid,Uh as lottery_pagination,Xh as lottery_subscription,ic as lottery_ticket,ac as lottery_ticket_controller}
6656
+ `}static get is(){return"vaadin-tabs"}}function Tl(t){return Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tl(t)}function Dl(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function Al(t,e){if(e.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+e.length+" present")}function Il(t){Al(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===Tl(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):("string"!=typeof t&&"[object String]"!==e||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}T(Sl);var zl={};function Ml(){return zl}function Pl(t){Al(1,arguments);var e=Il(t),i=e.getUTCDay(),s=(i<1?7:0)+i-1;return e.setUTCDate(e.getUTCDate()-s),e.setUTCHours(0,0,0,0),e}function Bl(t){Al(1,arguments);var e=Il(t),i=e.getUTCFullYear(),s=new Date(0);s.setUTCFullYear(i+1,0,4),s.setUTCHours(0,0,0,0);var o=Pl(s),r=new Date(0);r.setUTCFullYear(i,0,4),r.setUTCHours(0,0,0,0);var a=Pl(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function Nl(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.weekStartsOn)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.weekStartsOn)&&void 0!==o?o:c.weekStartsOn)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var u=Il(t),p=u.getUTCDay(),m=(p<d?7:0)+p-d;return u.setUTCDate(u.getUTCDate()-m),u.setUTCHours(0,0,0,0),u}function Ol(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Il(t),d=c.getUTCFullYear(),u=Ml(),p=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:u.firstWeekContainsDate)&&void 0!==s?s:null===(l=u.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var m=new Date(0);m.setUTCFullYear(d+1,0,p),m.setUTCHours(0,0,0,0);var v=Nl(m,e),f=new Date(0);f.setUTCFullYear(d,0,p),f.setUTCHours(0,0,0,0);var b=Nl(f,e);return c.getTime()>=v.getTime()?d+1:c.getTime()>=b.getTime()?d:d-1}function El(t,e){for(var i=t<0?"-":"",s=Math.abs(t).toString();s.length<e;)s="0"+s;return i+s}const Fl=function(t,e){var i=t.getUTCFullYear(),s=i>0?i:1-i;return El("yy"===e?s%100:s,e.length)},jl=function(t,e){var i=t.getUTCMonth();return"M"===e?String(i+1):El(i+1,2)},Rl=function(t,e){return El(t.getUTCDate(),e.length)},Ll=function(t,e){return El(t.getUTCHours()%12||12,e.length)},Wl=function(t,e){return El(t.getUTCHours(),e.length)},$l=function(t,e){return El(t.getUTCMinutes(),e.length)},Hl=function(t,e){return El(t.getUTCSeconds(),e.length)},Ul=function(t,e){var i=e.length,s=t.getUTCMilliseconds();return El(Math.floor(s*Math.pow(10,i-3)),e.length)};var Gl={G:function(t,e,i){var s=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return i.era(s,{width:"abbreviated"});case"GGGGG":return i.era(s,{width:"narrow"});default:return i.era(s,{width:"wide"})}},y:function(t,e,i){if("yo"===e){var s=t.getUTCFullYear();return i.ordinalNumber(s>0?s:1-s,{unit:"year"})}return Fl(t,e)},Y:function(t,e,i,s){var o=Ol(t,s),r=o>0?o:1-o;return"YY"===e?El(r%100,2):"Yo"===e?i.ordinalNumber(r,{unit:"year"}):El(r,e.length)},R:function(t,e){return El(Bl(t),e.length)},u:function(t,e){return El(t.getUTCFullYear(),e.length)},Q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(s);case"QQ":return El(s,2);case"Qo":return i.ordinalNumber(s,{unit:"quarter"});case"QQQ":return i.quarter(s,{width:"abbreviated",context:"formatting"});case"QQQQQ":return i.quarter(s,{width:"narrow",context:"formatting"});default:return i.quarter(s,{width:"wide",context:"formatting"})}},q:function(t,e,i){var s=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(s);case"qq":return El(s,2);case"qo":return i.ordinalNumber(s,{unit:"quarter"});case"qqq":return i.quarter(s,{width:"abbreviated",context:"standalone"});case"qqqqq":return i.quarter(s,{width:"narrow",context:"standalone"});default:return i.quarter(s,{width:"wide",context:"standalone"})}},M:function(t,e,i){var s=t.getUTCMonth();switch(e){case"M":case"MM":return jl(t,e);case"Mo":return i.ordinalNumber(s+1,{unit:"month"});case"MMM":return i.month(s,{width:"abbreviated",context:"formatting"});case"MMMMM":return i.month(s,{width:"narrow",context:"formatting"});default:return i.month(s,{width:"wide",context:"formatting"})}},L:function(t,e,i){var s=t.getUTCMonth();switch(e){case"L":return String(s+1);case"LL":return El(s+1,2);case"Lo":return i.ordinalNumber(s+1,{unit:"month"});case"LLL":return i.month(s,{width:"abbreviated",context:"standalone"});case"LLLLL":return i.month(s,{width:"narrow",context:"standalone"});default:return i.month(s,{width:"wide",context:"standalone"})}},w:function(t,e,i,s){var o=function(t,e){Al(1,arguments);var i=Il(t),s=Nl(i,e).getTime()-function(t,e){var i,s,o,r,a,n,l,h;Al(1,arguments);var c=Ml(),d=Dl(null!==(i=null!==(s=null!==(o=null!==(r=null==e?void 0:e.firstWeekContainsDate)&&void 0!==r?r:null==e||null===(a=e.locale)||void 0===a||null===(n=a.options)||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==o?o:c.firstWeekContainsDate)&&void 0!==s?s:null===(l=c.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1),u=Ol(t,e),p=new Date(0);return p.setUTCFullYear(u,0,d),p.setUTCHours(0,0,0,0),Nl(p,e)}(i,e).getTime();return Math.round(s/6048e5)+1}(t,s);return"wo"===e?i.ordinalNumber(o,{unit:"week"}):El(o,e.length)},I:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=Pl(e).getTime()-function(t){Al(1,arguments);var e=Bl(t),i=new Date(0);return i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0),Pl(i)}(e).getTime();return Math.round(i/6048e5)+1}(t);return"Io"===e?i.ordinalNumber(s,{unit:"week"}):El(s,e.length)},d:function(t,e,i){return"do"===e?i.ordinalNumber(t.getUTCDate(),{unit:"date"}):Rl(t,e)},D:function(t,e,i){var s=function(t){Al(1,arguments);var e=Il(t),i=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var s=e.getTime();return Math.floor((i-s)/864e5)+1}(t);return"Do"===e?i.ordinalNumber(s,{unit:"dayOfYear"}):El(s,e.length)},E:function(t,e,i){var s=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return i.day(s,{width:"abbreviated",context:"formatting"});case"EEEEE":return i.day(s,{width:"narrow",context:"formatting"});case"EEEEEE":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},e:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"e":return String(r);case"ee":return El(r,2);case"eo":return i.ordinalNumber(r,{unit:"day"});case"eee":return i.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return i.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return i.day(o,{width:"short",context:"formatting"});default:return i.day(o,{width:"wide",context:"formatting"})}},c:function(t,e,i,s){var o=t.getUTCDay(),r=(o-s.weekStartsOn+8)%7||7;switch(e){case"c":return String(r);case"cc":return El(r,e.length);case"co":return i.ordinalNumber(r,{unit:"day"});case"ccc":return i.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return i.day(o,{width:"narrow",context:"standalone"});case"cccccc":return i.day(o,{width:"short",context:"standalone"});default:return i.day(o,{width:"wide",context:"standalone"})}},i:function(t,e,i){var s=t.getUTCDay(),o=0===s?7:s;switch(e){case"i":return String(o);case"ii":return El(o,e.length);case"io":return i.ordinalNumber(o,{unit:"day"});case"iii":return i.day(s,{width:"abbreviated",context:"formatting"});case"iiiii":return i.day(s,{width:"narrow",context:"formatting"});case"iiiiii":return i.day(s,{width:"short",context:"formatting"});default:return i.day(s,{width:"wide",context:"formatting"})}},a:function(t,e,i){var s=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(t,e,i){var s,o=t.getUTCHours();switch(s=12===o?"noon":0===o?"midnight":o/12>=1?"pm":"am",e){case"b":case"bb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(t,e,i){var s,o=t.getUTCHours();switch(s=o>=17?"evening":o>=12?"afternoon":o>=4?"morning":"night",e){case"B":case"BB":case"BBB":return i.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return i.dayPeriod(s,{width:"narrow",context:"formatting"});default:return i.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(t,e,i){if("ho"===e){var s=t.getUTCHours()%12;return 0===s&&(s=12),i.ordinalNumber(s,{unit:"hour"})}return Ll(t,e)},H:function(t,e,i){return"Ho"===e?i.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Wl(t,e)},K:function(t,e,i){var s=t.getUTCHours()%12;return"Ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},k:function(t,e,i){var s=t.getUTCHours();return 0===s&&(s=24),"ko"===e?i.ordinalNumber(s,{unit:"hour"}):El(s,e.length)},m:function(t,e,i){return"mo"===e?i.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):$l(t,e)},s:function(t,e,i){return"so"===e?i.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Hl(t,e)},S:function(t,e){return Ul(t,e)},X:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();if(0===o)return"Z";switch(e){case"X":return ql(o);case"XXXX":case"XX":return Yl(o);default:return Yl(o,":")}},x:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"x":return ql(o);case"xxxx":case"xx":return Yl(o);default:return Yl(o,":")}},O:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},z:function(t,e,i,s){var o=(s._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Vl(o,":");default:return"GMT"+Yl(o,":")}},t:function(t,e,i,s){return El(Math.floor((s._originalDate||t).getTime()/1e3),e.length)},T:function(t,e,i,s){return El((s._originalDate||t).getTime(),e.length)}};function Vl(t,e){var i=t>0?"-":"+",s=Math.abs(t),o=Math.floor(s/60),r=s%60;if(0===r)return i+String(o);var a=e||"";return i+String(o)+a+El(r,2)}function ql(t,e){return t%60==0?(t>0?"-":"+")+El(Math.abs(t)/60,2):Yl(t,e)}function Yl(t,e){var i=e||"",s=t>0?"-":"+",o=Math.abs(t);return s+El(Math.floor(o/60),2)+i+El(o%60,2)}const Jl=Gl;var Kl=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},Zl=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},Xl={p:Zl,P:function(t,e){var i,s=t.match(/(P+)(p+)?/)||[],o=s[1],r=s[2];if(!r)return Kl(t,e);switch(o){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;default:i=e.dateTime({width:"full"})}return i.replace("{{date}}",Kl(o,e)).replace("{{time}}",Zl(r,e))}};const Ql=Xl;var th=["D","DD"],eh=["YY","YYYY"];function ih(t,e,i){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(i,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var sh={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function oh(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=e.width?String(e.width):t.defaultWidth;return t.formats[i]||t.formats[t.defaultWidth]}}var rh,ah={date:oh({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:oh({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:oh({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},nh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function lh(t){return function(e,i){var s;if("formatting"===(null!=i&&i.context?String(i.context):"standalone")&&t.formattingValues){var o=t.defaultFormattingWidth||t.defaultWidth,r=null!=i&&i.width?String(i.width):o;s=t.formattingValues[r]||t.formattingValues[o]}else{var a=t.defaultWidth,n=null!=i&&i.width?String(i.width):t.defaultWidth;s=t.values[n]||t.values[a]}return s[t.argumentCallback?t.argumentCallback(e):e]}}function hh(t){return function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=i.width,o=e.match(s&&t.matchPatterns[s]||t.matchPatterns[t.defaultMatchWidth]);if(!o)return null;var r,a=o[0],n=s&&t.parsePatterns[s]||t.parsePatterns[t.defaultParseWidth],l=Array.isArray(n)?function(t){for(var e=0;e<t.length;e++)if(t[e].test(a))return e}(n):function(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e].test(a))return e}(n);return r=t.valueCallback?t.valueCallback(l):l,{value:r=i.valueCallback?i.valueCallback(r):r,rest:e.slice(a.length)}}}const ch={code:"en-US",formatDistance:function(t,e,i){var s,o=sh[t];return s="string"==typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!=i&&i.addSuffix?i.comparison&&i.comparison>0?"in "+s:s+" ago":s},formatLong:ah,formatRelative:function(t){return nh[t]},localize:{ordinalNumber:function(t){var e=Number(t),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:lh({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:lh({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:lh({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:lh({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:lh({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(rh={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.match(rh.matchPattern);if(!i)return null;var s=i[0],o=t.match(rh.parsePattern);if(!o)return null;var r=rh.valueCallback?rh.valueCallback(o[0]):o[0];return{value:r=e.valueCallback?e.valueCallback(r):r,rest:t.slice(s.length)}}),era:hh({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:hh({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:hh({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:hh({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:hh({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};var dh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,uh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ph=/^'([^]*?)'?$/,mh=/''/g,vh=/[a-zA-Z]/;function fh(t,e,i){var s,o,r,a,n,l,h,c,d,u,p,m,v,f,b,g,y,w;Al(2,arguments);var x=String(e),k=Ml(),_=null!==(s=null!==(o=null==i?void 0:i.locale)&&void 0!==o?o:k.locale)&&void 0!==s?s:ch,C=Dl(null!==(r=null!==(a=null!==(n=null!==(l=null==i?void 0:i.firstWeekContainsDate)&&void 0!==l?l:null==i||null===(h=i.locale)||void 0===h||null===(c=h.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:k.firstWeekContainsDate)&&void 0!==a?a:null===(d=k.locale)||void 0===d||null===(u=d.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==r?r:1);if(!(C>=1&&C<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=Dl(null!==(p=null!==(m=null!==(v=null!==(f=null==i?void 0:i.weekStartsOn)&&void 0!==f?f:null==i||null===(b=i.locale)||void 0===b||null===(g=b.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==v?v:k.weekStartsOn)&&void 0!==m?m:null===(y=k.locale)||void 0===y||null===(w=y.options)||void 0===w?void 0:w.weekStartsOn)&&void 0!==p?p:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!_.localize)throw new RangeError("locale must contain localize property");if(!_.formatLong)throw new RangeError("locale must contain formatLong property");var T=Il(t);if(!function(t){if(Al(1,arguments),!function(t){return Al(1,arguments),t instanceof Date||"object"===Tl(t)&&"[object Date]"===Object.prototype.toString.call(t)}(t)&&"number"!=typeof t)return!1;var e=Il(t);return!isNaN(Number(e))}(T))throw new RangeError("Invalid time value");var D=function(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}(T),A=function(t,e){return Al(2,arguments),function(t,e){Al(2,arguments);var i=Il(t).getTime(),s=Dl(e);return new Date(i+s)}(t,-Dl(e))}(T,D),I={firstWeekContainsDate:C,weekStartsOn:S,locale:_,_originalDate:T};return x.match(uh).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ql[e])(t,_.formatLong):t})).join("").match(dh).map((function(s){if("''"===s)return"'";var o,r,a=s[0];if("'"===a)return(r=(o=s).match(ph))?r[1].replace(mh,"'"):o;var n=Jl[a];if(n)return null!=i&&i.useAdditionalWeekYearTokens||-1===eh.indexOf(s)||ih(s,e,String(t)),null!=i&&i.useAdditionalDayOfYearTokens||!(-1!==th.indexOf(s))||ih(s,e,String(t)),n(A,s,_.localize,I);if(a.match(vh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return s})).join("")}const bh=class{constructor(i){t(this,i),this.filterDraw=e(this,"filterDraw",7),this.filterSelection=e(this,"filterSelection",7),this.filterSelectionReset=e(this,"filterSelectionReset",7),this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterFromCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{filterToCalendar:`${e[2]}/${e[1]}/${e[0]}`}))},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.handleTicketId=t=>{t.target.value&&(this.filterData.ticketId=t.target.value)},this.handleTicketType=t=>{t.target.selectedItems&&t.target.selectedItems.length&&(this.filterData.ticketType=t.target.selectedItems.map((t=>t.value)))},this.activateTicketSearch=!1,this.gameId="",this.playerId="",this.session="",this.postMessage=!1,this.language="en",this.quickFiltersActive=!1,this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showFilterModal=!1,this.showClearButton=!1,this.filterData={},this.filterDataReset={filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1,this.ticketTypeList=[{label:"Normal",value:"NORMAL"},{label:"Syndicate",value:"SYNDICATE"},{label:"Subscription",value:"SUBSCRIPTION"}]}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])p[e][i]=t[e][i]})))}componentDidRender(){document.getElementById("#FilterById")&&(document.getElementById("#FilterById").value=""),!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}filterSelectionHandler(t){this.postMessage&&window.postMessage({type:"filterSelection",event:t},window.location.href),(this.filterData.filterFromCalendar||this.filterData.filterToCalendar||this.filterData.ticketId||this.filterData.ticketType.length)&&this.filterSelection.emit(t)}filterSelectionResetHandler(t){this.postMessage&&window.postMessage({type:"filterSelectionReset",event:t},window.location.href),this.filterSelectionReset.emit(t)}modalCloseEvent(){this.showFilterModal=!1}toggleFilterModal(){this.showFilterModal=!0}filterSearch(){if(this.modalCloseEvent(),this.showClearButton=!0,this.filterData.filterFromCalendar&&this.filterData.filterToCalendar){let t=this.filterData.filterFromCalendar.split("/"),e=this.filterData.filterToCalendar.split("/");const i={filterFromCalendar:new Date(Date.UTC(Number(t[2]),Number(t[1])-1,Number(t[0]),0,0,0)).toISOString(),filterToCalendar:new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),23,59,59)).toISOString()};this.filterData=Object.assign(Object.assign({},this.filterData),i)}this.filterSelectionHandler(this.filterData)}clearSelection(){this.comboBox.clear()}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.clearSelection(),this.filterData={}}formateDate(t){const{year:e,month:i,day:s}=t;return fh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate})}render(){return s("div",{key:"38024b55a7afaa317f11fe7dc3832e6e3ebcf7ac",class:"HelperFilters",ref:t=>this.stylingContainer=t},s("div",{key:"30f033084f8b40ceb660a92d6769fd1dfb1f7d98",class:"FilterButtonsWrapper"},s("button",{key:"3c347b67791547808207fd72c57c10a0c62c9e25",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},m("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?s("button",{class:"FilterClear",onClick:()=>this.resetSearch()},m("filterClear",this.language)):null),s("helper-modal",{key:"71eed9aa7b4c9aa16d218ad7103181498c81975a","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},s("div",{key:"a97c9b4a1cbc1fb0afc0a128e626ead51c7f8047",class:"FilterModalHeader"},s("h3",{key:"10f4051b2e02ccd372c3e0dbe757983ba43a16e6",class:"FilterModalTitle"},m(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),s("div",{key:"50f4af101f28a436b0a275010c89eae94833d449",class:"FilterModalBody"},this.activateTicketSearch&&s("div",{key:"1426e94093e76ec65f53a9b6a50aca564f572aab",class:"ticketFilterContainer"},s("div",{key:"4aa30387fb87aa411a21ea4452316f139c3301fd",class:"ticketFilterItem"},s("div",{key:"66136fc7c3588b834f02d1efeb2e622e1bd0b52d",class:"filterKey"},m("filterTicketIdPlaceholder",this.language)),s("vaadin-text-field",{key:"522a8fdc8ad41b033f4126bf27cb449d9db6606e",placeholder:m("filterTicketIdPlaceholder",this.language),value:this.filterData.ticketId,onInput:t=>this.handleTicketId(t)})),s("div",{key:"d2cde3e11ba86f6443fca85cde2c7383a87585b8",class:"ticketFilterItem"},s("div",{key:"6b98a9e702f484c19754a04cb4f1a009c9add01a",class:"filterKey"},m("searchByTicketType",this.language)),s("div",{key:"b52029c39d340ec3e5aa7f9b6844d3cf05bdaadc",class:"general-multi-select-container"},s("general-multi-select",{key:"bf2948532aba6d577eb50e338d2a6c5e5737f674","client-styling":this.clientStyling,"client-styling-Url":this.clientStylingUrlContent,ref:t=>this.comboBox=t,placeholder:m("filterTiketTypePlaceholder",this.language),"max-visible-chips":"2",options:this.ticketTypeList.map((t=>({text:t.label,value:t.value}))),onChange:this.handleTicketType})))),s("div",{key:"e7214b53b0c05f6379da1f6e83b69b8aadfcc59a",class:"filterItem"},s("div",{key:"2262d0e72ac653f93c04381d70b797e9fff68ead",class:"filterKey"},m("searchByDate",this.language)),s("div",{key:"c1b10ba14ebe8624af0708d0a500b9a1d1751dbf",class:"FilterCalendarWrapper"},s("vaadin-date-picker",{key:"807a7987b19ecdc3b34d759a9a5d68d3f77e27dd",value:this.filterData.filterFromCalendar,max:void 0===this.filterData.filterToCalendar?void 0:this.changeFormate(this.filterData.filterToCalendar),onChange:this.handleFilterFrom,placeholder:m("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}),s("vaadin-date-picker",{key:"3be5eea8d7c41f84c0d624faf32cd800468366a4",value:this.filterData.filterToCalendar,min:void 0===this.filterData.filterFromCalendar?void 0:this.changeFormate(this.filterData.filterFromCalendar),onChange:this.handleFilterTo,placeholder:m("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"})))),s("div",{key:"0987fee1be9552effcc023b93e67886e7bab535a",class:"FilterModalFooter"},s("button",{key:"f46728dfb5e63db90f6c8437d233b47354419295",class:"FilterModalButton",onClick:()=>this.filterSearch()},m("filterModalButton",this.language)))))}};bh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.FilterButtonsWrapper{display:flex;justify-content:flex-end;gap:5px}.FilterButtonsWrapper .FilterOpen{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterOpen:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterButtonsWrapper .FilterClear{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;width:max-content;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterButtonsWrapper .FilterClear:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader,.FilterModalBody,.FilterModalFooter{display:flex;flex-direction:column;gap:5px;align-items:center;margin:20px 0}.FilterModalHeader .filterKey,.FilterModalBody .filterKey,.FilterModalFooter .filterKey{color:var(--emw--color-typography, #009993);text-align:left;font-size:16px}.FilterModalHeader .FilterModalTitle,.FilterModalBody .FilterModalTitle,.FilterModalFooter .FilterModalTitle{margin:0;padding:0;font-weight:700;font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase}.FilterModalHeader .FilterModalSearch,.FilterModalBody .FilterModalSearch,.FilterModalFooter .FilterModalSearch{border-radius:var(--emw--button-border-radius, 4px);background:var(--emw--color-gray-transparency-60, #e8ebef);color:var(--emw--color-secondary-variant, #263445);width:100%;height:26px;max-width:280px;padding:5px;font-size:15px;border:none;outline:var(--emw--color-typography, #009993)}.FilterModalHeader .FilterCalendarWrapper,.FilterModalBody .FilterCalendarWrapper,.FilterModalFooter .FilterCalendarWrapper{display:flex;gap:5px}.FilterModalHeader .FilterCalendarWrapper .VaadinDatePicker,.FilterModalBody .FilterCalendarWrapper .VaadinDatePicker,.FilterModalFooter .FilterCalendarWrapper .VaadinDatePicker{width:50%;max-width:143px}.FilterModalHeader .FilterModalButton,.FilterModalBody .FilterModalButton,.FilterModalFooter .FilterModalButton{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.FilterModalHeader .FilterModalButton:hover,.FilterModalBody .FilterModalButton:hover,.FilterModalFooter .FilterModalButton:hover{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterModalHeader p,.FilterModalBody p,.FilterModalFooter p{margin:5px 0}.ticketFilterItem{margin:12px 0}.general-multi-select-container{width:var(--vaadin-field-default-width, 16em)}';const gh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),yh=class{constructor(i){t(this,i),this.cancel=e(this,"modalCloseEvent",7),this.userAgent=window.navigator.userAgent,this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=document.createElement("style");setTimeout((()=>{t.innerHTML=this.clientStylingUrlContent,this.stylingContainer.prepend(t)}),1)},this.titleModal=void 0,this.visible=!0,this.clientStyling="",this.clientStylingUrlContent="",this.limitStylingAppends=!1}handleHelperModalClose(){this.visible=!1,this.cancel.emit()}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return this.visible&&s("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},s("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(gh(this.userAgent)?" HelperModalMobileContent":"")},s("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(gh(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),s("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};yh.style=":host{display:block}.HelperModalWrapper{position:fixed;left:0;top:0;width:100%;height:100%;background:rgba(0, 0, 0, 0.7);opacity:0;visibility:hidden;transform:scale(1.1);transition:visibility 0s linear 0.25s, opacity 0.25s 0s, transform 0.25s;z-index:1}.HelperModalVisible{opacity:1;visibility:visible;transform:scale(1);transition:visibility 0s linear 0s, opacity 0.25s 0s, transform 0.25s}.HelperModalContent{position:relative;border:solid 1px var(--emw--color-gray-transparency-40, #848e97);box-shadow:2px 2px 2px rgba(0, 0, 0, 0.007);font-size:14px;padding:10px 10px 5px 10px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:600px;max-height:600px;overflow-y:scroll}.HelperModalMobileContent{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));top:50%;left:50%;transform:translate(-50%, -50%);border-radius:4px;width:80%;max-height:350px}.HelperModalClose{cursor:pointer;position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}.HelperModalMobileClose{position:absolute;top:15px;right:15px;font-size:20px;color:var(--emw--button-text-color, #000)}";const wh="en",xh=["en"],kh={en:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ro:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},fr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},ar:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"},hr:{howToPlay:"Each play includes one set of numbers from ${lowNumber} to ${highNumber} with a selectable number of ${maxinumAllowed} and a minimum selection of ${minimumAllowed}. The winnings are automatically credited to your account.",register:"Register or Login",butTickets:'Buy tickets. Select "Buy Tickets" to pick your numbers. Want us to automatically generate random numbers for you? Choose “quick pick”.',reviewPurchase:"Review and Complete your purchase. Once you've chosen your total number of plays, and confirmed your number of selections, review your ticket details and complete your purchase!",odds:"What are my odds of winning?",winGame:"How can I find out if I’ve won a draw game?",claimPrize:"How do I claim my prize?"}},_h=(t,e)=>{const i=e;return kh[void 0!==i&&xh.includes(i)?i:wh][t]},Ch=class{constructor(e){t(this,e),this.selectedIndex=0,this.cmsEndpoint=void 0,this.mbSource=void 0,this.clientStyling="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0,this.tabContent=""}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])kh[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=kh[void 0!==i&&xh.includes(i)?i:wh][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):kh[void 0!==i&&xh.includes(i)?i:wh][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=s("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=s("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},s("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},s("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},_h("register",this.language)),s("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},_h("butTickets",this.language)),s("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},_h("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=s("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},s("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},s("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},_h("odds",this.language)),s("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},_h("winGame",this.language)),s("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},_h("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ch.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";const Sh=class{constructor(e){t(this,e),this.disabled=!1,this.label=void 0,this.selected=!1,this.cmsEndpoint=void 0,this.selectedIndex=0,this.tabs=[{label:"How to Play"},{label:"About"},{label:"FAQs"}],this.clientStyling="",this.mbSource=void 0,this.clientStylingurl="",this.clientStylingUrl="",this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}connectedCallback(){}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?n(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return s("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},s("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>s("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),s("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},s("helper-tab",{key:"63c8dfc253d4fc12b0310a2585a44b90807e1a9f","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,selectedIndex:this.selectedIndex,"client-styling":this.clientStyling,language:this.language,"translation-url":this.translationUrl,"client-stylingurl":this.clientStylingurl,"client-styling-url-content":this.clientStylingUrl,"mb-source":this.mbSource})))}get host(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Sh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Tabs{display:flex;gap:10px;overflow-x:auto}.TabButton{cursor:pointer;width:auto;border-radius:var(--emw--button-border-radius, 4px);padding:8px 15px;margin:5px 0 10px;border:1px solid var(--emw--color-typography, #009993);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0;white-space:nowrap}.TabButton:hover{background:var(--emw--color-gray-50, #F1F1F1)}.TabButton.Active{background:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}';const Th=class{constructor(i){t(this,i),this.bulletEvent=e(this,"lotteryBulletSelection",7),this.select=()=>{this.selectable&&(this.isSelected=!this.isSelected,this.bulletEvent.emit({value:this.value,selected:this.isSelected}))},this.value="0",this.selectable=!0,this.isSelected=!1,this.isBonus=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"2cfab600728d3aa72f9f87e4e07a968ea030e415",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Th.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}@-webkit-keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes Circle{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}@-webkit-keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.22) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@keyframes hover-rotate{0%{-webkit-transform:scale(1) rotateZ(0);transform:scale(1) rotateZ(0)}50%{-webkit-transform:scale(1.2) rotateZ(180deg);transform:scale(1.2) rotateZ(180deg)}100%{-webkit-transform:scale(1) rotateZ(360deg);transform:scale(1) rotateZ(360deg)}}@-webkit-keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1.2);transform:scale(1.2)}}@keyframes selected-scaleUp{0%{-webkit-transform:scale(0.5);transform:scale(0.5)}100%{-webkit-transform:scale(1);transform:scale(1)}}.Circle{-webkit-animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:Circle 0.8s cubic-bezier(0.39, 0.575, 0.565, 1) both;cursor:pointer;color:var(--emw--button-text-color, #000);display:block;height:30px;width:30px;margin:0;display:flex;align-items:center;justify-content:center;justify-content:center;align-items:center;border:solid 2px var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 100%);font-weight:bold;border-radius:50%;box-shadow:0 2px 4px 0 rgba(0, 0, 0, 0.5);user-select:none;font-size:16px;line-height:16px;font-weight:600;position:relative}.Circle:hover{-webkit-animation:hover-rotate 0.4s linear both;animation:hover-rotate 0.4s linear both;background:radial-gradient(circle at top, var(--emw--color-gray-transparency-100, rgb(255, 255, 255)) 0%, var(--emw--color-gray-50, #F1F1F1) 100%)}.Circle.Selected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--button-border-color, #00958f)}.Circle.Disabled{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-gray-100, #D4D4D4);border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.DisabledSelected{-webkit-animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;animation:selected-scaleUp 0.4s cubic-bezier(0.39, 0.575, 0.565, 1) both;color:var(--emw--color-gray-50, #F1F1F1);background:var(--emw--color-primary, #9EC258);background:-webkit-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:-moz-radial-gradient(top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));background:radial-gradient(circle at top, var(--emw--button-background-color, #00958f), var(--emw--color-primary-variant, #004D4A));border:solid 2px var(--emw--color-gray-100, #D4D4D4);cursor:default}.Circle.Bonus{background:var(--emw--color-error, #FF3D00)}';const Dh=["ro","en","hr"],Ah={en:{drawId:"Draw ID",drawDate:"Draw Date",drawNumbersGridDraw:"Draw Numbers",drawNumbersGridTicket:"Selected Numbers",ticketResult:"Ticket Result",amountWon:"Amount won",numberOfDraws:"Number of Draws",multiplierNum:"Multiplier Number",ticketId:"Ticket ID",ticketType:"Ticket Type",ticketAmount:"Ticket Amount",prize:"Prizes"},ro:{drawId:"Id extragere",drawDate:"Data extragerii",drawNumbersGridDraw:"Numerele extrase",drawNumbersGridTicket:"Numere selectate",ticketResult:"Rezultatul biletului",amountWon:"Suma castigata",numberOfDraws:"Numarul de extrageri",multiplierNum:"Multiplier Number",ticketId:"Id biletul",ticketType:"Ticket Type",ticketAmount:"Valoarea biletului",prize:"Premii"},fr:{drawId:"ID de tirage",drawDate:"Date du tirage",drawNumbersGridDraw:"Tirage des numéros",drawNumbersGridTicket:"Nombres sélectionnés",ticketResult:"Résultat du ticket",amountWon:"Montant gagné",numberOfDraws:"Nombre de tirages",multiplierNum:"Multiplier Number",ticketId:"ID de billets",ticketType:"Ticket Type",ticketAmount:"Montant du billet",prize:"Prix"},ar:{drawId:"معرّف السحب",drawDate:"تاريخ السحب",drawNumbersGridDraw:" أرقام السحب",drawNumbersGridTicket:"الأرقام المختارة",ticketResult:"نتيجة التذكرة",amountWon:"المبلغ الذي تم ربحه",numberOfDraws:"عدد السحوبات",multiplierNum:"Multiplier Number",ticketId:"معرّف التذكرة",ticketAmount:"مبلغ التذكرة",prize:"الجوائز"},hr:{drawId:"ID izvlačenja",drawDate:"Datum izvlačenja",drawNumbersGridDraw:"Tablica izvučenih",drawNumbersGridTicket:"Odabrani brojevi",ticketResult:"Rezultat listića",amountWon:"Osvojeni iznos",numberOfDraws:"Broj izvlačenja",multiplierNum:"Multiplier Number",ticketId:"ID listića",ticketType:"Ticket Type",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ih=(t,e)=>{const i=e;return Ah[void 0!==i&&Dh.includes(i)?i:"en"][t]},zh=class{constructor(e){t(this,e),this.ticketDrawDetails=[],this.ticketDrawDetailsFlag=!0,this.displayPrizeCategory=(t,e)=>{const i=new Map;t.forEach((t=>{let s=this.getDivision(t,e),o=t.amount,r=t.currency;s&&"None"!=s&&(i.has(s)?i.set(s,{amount:i.get(s).amount+o,currency:r,times:i.get(s).times+1}):i.set(s,{amount:o,currency:r,times:1}))}));const s=[];for(let[t,e]of i.entries())s.push({prizeName:t,amount:e.amount,currency:e.currency,times:e.times});return s.sort(((t,e)=>e.prizeName.localeCompare(t.prizeName))),s},this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.playerId=void 0,this.drawMode=!1,this.drawId="",this.gameName="",this.ticketDate="",this.ticketStatus="",this.ticketId="",this.ticketType="",this.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketMultiplierNum=void 0,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.ticketDrawData="",this.historyDrawData="",this.tabValue="",this.translationUrl=void 0,this.multiplier=3,this.isLoading=!0,this.hasErrors=!1,this.errorText="",this.ticketData=[],this.ticketDataLoaded=!1,this.ticketDraws=[],this.toggleDrawer=[!1],this.drawData=void 0,this.resultMap={Won:"Win",Lost:"Lose"}}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ah[e][i]=t[e][i]})))}connectedCallback(){if(this.historyDrawData&&(this.drawData=JSON.parse(this.historyDrawData)),this.ticketNumbers){let t=JSON.parse(this.ticketNumbers);this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.isLoading=!1}componentWillRender(){this.ticketDrawData&&this.ticketDrawDetailsFlag&&(this.ticketDrawDetails=JSON.parse(this.ticketDrawData),this.ticketDrawDetails.forEach((t=>{this.getDrawData(t.drawId).then((e=>{t.drawData=Object.assign({},e);let i=this.displayPrizeCategory(t.details,t);t.details=[...i]}))})),this.ticketDrawDetailsFlag=!1)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}getDrawData(t){return this.isLoading=!0,new Promise(((e,i)=>{let s=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t||this.drawId}`);fetch(s.href).then((t=>t.json())).then((i=>{t?e(i):(this.drawData=i,e(!0)),this.isLoading=!1})).catch((t=>{i(t),this.isLoading=!1}))}))}drawerToggle(t){this.toggleDrawer=this.toggleDrawer.map(((e,i)=>i==t?!e:e)),t>=this.toggleDrawer.length&&this.toggleDrawer.push(!0)}getDivision(t,e){var i,s;let o=t.division,r=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===o));return r&&r.length?r[0].division:null}render(){return this.isLoading?s("p",null,"Loading, please wait ..."):this.hasErrors?void s("p",null,this.errorText):s("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?s("div",{class:"DrawResultsArea"},this.drawData&&s("div",null,s("div",{class:"DrawResultsHeader"},s("span",null,Ih("drawId",this.language),": ",this.drawData.id),s("span",null,Ih("drawDate",this.language),": ",fh(new Date(this.drawData.date),"dd/MM/yyyy"))),s("div",{class:"DrawResultsBody"},s("div",{class:"DrawNumbersGrid"},s("p",null,Ih("drawNumbersGridDraw",this.language)),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":this.drawData.winningNumbers.length&&this.drawData.winningNumbers[0].numbers.join(","),"secondary-numbers":this.drawData.winningNumbers.length?this.drawData.winningNumbers[0].secondaryNumbers.join(","):"","display-selected":!0,selectable:!1,language:this.language,"grid-type":"ticket","translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language)," "),this.drawData.prizes.length?s("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>s("div",null,s("span",{style:{"margin-right":"5px"}},t.division,":"),s("span",{style:{"margin-right":"4px"}}," ",this.thousandSeperator(t.amount.value)),s("span",null,t.amount.currency))))):s("div",null,"None")))))):s("div",{class:"DrawResultsArea TicketDraws"},s("div",{class:"DrawResultsBody"},s("div",{class:"TicketIdContainer"},s("label",{class:"Label"},Ih("ticketId",this.language),": ",s("span",null,this.ticketId))),s("div",{class:"TicketTypeContainer"},s("label",{class:"Label"},Ih("ticketType",this.language),": ",s("span",null,this.ticketType))),s("div",{class:"TicketAmountContainer"},s("label",{class:"Label"},Ih("ticketAmount",this.language),": ",s("span",null,`${this.thousandSeperator(this.ticketAmount)} ${this.ticketCurrency}`))),s("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var i;return s("div",null,s("label",{class:"Label"},Ih("drawNumbersGridTicket",this.language),":"),s("div",{class:"BulletContainer"},s("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(i=this.gridSecondaryNumbers[e])||void 0===i?void 0:i.join(","),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))}))),this.ticketMultiplier&&s("div",{class:"DrawMultipler"},s("label",{class:"Label"},Ih("multiplierNum",this.language),": ",this.thousandSeperator(this.ticketMultiplierNum))),s("div",{class:"NumberOfDrawsContainer"},s("label",{class:"Label"},Ih("numberOfDraws",this.language),": ",this.thousandSeperator(this.ticketDrawCount)),s("div",{class:"DrawTicketsContainer"},this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&s("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var i,o,r,a,n,l,h,c;return s("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},s("div",{class:"ExpandableBoxHeader"},s("div",{class:"TicketResultContainer"},s("p",null,Ih("ticketResult",this.language),": ",this.resultMap[t.state])),"won"==t.state&&s("div",{class:"AmountWonContainer"},s("p",null,Ih("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId))),s("div",{class:"ExpandableBoxBody"},s("div",{class:"DrawIdContainer"},s("p",null,Ih("drawId",this.language),": ",t.drawId)),s("div",{class:"DrawDateContainer"},s("p",null,Ih("drawDate",this.language),": ",null===(i=t.drawData)||void 0===i?void 0:i.date.slice(0,10)," | ",null===(o=t.drawData)||void 0===o?void 0:o.date.slice(11,19))),s("div",{class:"DrawNumbersGrid"},t.drawData&&s("div",{class:"BulletContainer"},s("label",{class:"Label"},Ih("drawNumbersGridDraw",this.language),":"),s("lottery-grid",{"selected-numbers":(null===(a=null===(r=t.drawData)||void 0===r?void 0:r.winningNumbers)||void 0===a?void 0:a.length)&&(null===(n=t.drawData.winningNumbers[0].numbers)||void 0===n?void 0:n.join(",")),"secondary-numbers":(null===(h=null===(l=t.drawData)||void 0===l?void 0:l.winningNumbers)||void 0===h?void 0:h.length)&&(null===(c=t.drawData.winningNumbers[0].secondaryNumbers)||void 0===c?void 0:c.join(",")),selectable:!1,"display-selected":!0,language:this.language,"translation-url":this.translationUrl,"grid-type":"ticket","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),t.details.length>0&&s("div",{class:"DrawPrizes"},s("label",{class:"Label"},Ih("prize",this.language),":"),s("span",null,t.details.map((t=>s("span",null,s("div",null,s("span",null,t.prizeName,t.times>1?" x "+t.times:"",": "),s("span",{style:{"margin-right":"4px"}},this.thousandSeperator(t.amount)),s("span",null,t.currency)))))))))}))))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};zh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketInfo{display:flex;flex-direction:row;gap:15px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:12px;font-size:14px}.DrawResultsArea{margin-top:15px}.DrawResultsArea.TicketDraws .Content{padding:0;border:0}.DrawResultsArea.TicketDraws .DrawResultsBody{padding:0;margin-bottom:5px;border-radius:0;border:0}.DrawResultsSection{max-width:600px;margin:0px auto;border-radius:4px}.DrawResultsHeader{display:flex;justify-content:space-between;padding:10px 20px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-weight:400;margin:0;padding-top:15px}.DrawResultsBody{padding:20px;margin-bottom:5px;border-radius:0 0 4px 4px;border:1px solid var(--emw--color-typography, #009993)}.DrawResultsBody>div{margin:10px 0}.DrawResultsBody .NumberOfDrawsContainer{display:table;width:100%}.DrawNumbersGrid{display:flex;flex-direction:column;gap:5px;margin-bottom:10px}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.ExpandableBoxes{position:relative;display:flex;flex-direction:column;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;background-color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ExpandableBox{border-bottom:1px solid var(--emw--color-gray-transparency-80, #ccc);transition:height 300ms ease-in-out;overflow:hidden;height:80px}.ExpandableBox:last-child{border-bottom:0}.ExpandableBoxHeader{position:relative;list-style:none;outline:0;cursor:pointer;transition:color 300ms ease-in-out;margin-bottom:24px;margin-left:5px}.ShowBox>.ExpandableBoxHeader{color:var(--emw--color-typography, #009993)}.ExpandableBoxHeader::-webkit-details-marker{display:none}.ExpandableBoxHeader:before,.ExpandableBoxHeader:after{content:"";position:absolute}.ExpandableBoxHeader:before{right:21px;top:50%;height:2px;margin-top:-1px;width:16px;background:var(--emw--color-background, #009993)}.ExpandableBoxHeader:after{right:28px;top:50%;height:16px;margin-top:-8px;width:2px;margin-left:-1px;background:var(--emw--color-background, #009993);transition:all 300ms ease-in-out}.ShowBox .ExpandableBoxHeader:after{opacity:0;transform:translateY(25%)}.ExpandableBoxBody{padding-top:0;font-weight:lighter;margin-left:5px}.ExpandableBox.ShowBox{height:auto}';const Mh=["ro","en","fr","ar","hr"],Ph={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results.",loading:"Loading, please wait ...",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",loading:"Loading, please wait ..."},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",loading:"Loading, please wait ..."},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",loading:"Loading, please wait ..."},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",loading:"Loading, please wait ..."}},Bh=(t,e)=>{const i=e;return Ph[void 0!==i&&Mh.includes(i)?i:"en"][t]},Nh=class{constructor(e){t(this,e),this.isReset=!1,this.getDrawsData=()=>{this.isLoading=!0;let t=new URL(`${this.endpoint}/games/${this.gameId}/draws`);t.searchParams.append("limit",this.limit.toString()),t.searchParams.append("offset",this.offset.toString()),t.searchParams.append("excludeStatus","INIT,OPEN"),this.dateFiltersFrom&&t.searchParams.append("from",this.dateFiltersFrom),this.dateFiltersTo&&t.searchParams.append("to",this.dateFiltersTo),fetch(t.href).then((t=>{if(t.status>=300)throw new Error("There was an error while fetching the data");return t.json()})).then((t=>{this.winningDataSetsData=t.items?t.items.filter((t=>t.winningNumbers)):[],this.drawData=this.winningDataSetsData.map((t=>t)),this.totalResults=t.total})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1,this.noResults=0==this.drawData.filter((t=>t.winningNumbers)).length}))},this.transDataToString=t=>{try{return JSON.stringify(t)}catch(t){throw new Error(t)}},this.endpoint=void 0,this.gameId=void 0,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.drawData=[],this.winningDataSetsData=[""],this.dateFiltersFrom="",this.dateFiltersTo="",this.isLoading=!1,this.noResults=!1,this.activeIndex=0,this.totalResults=0,this.limit=5,this.offset=0}filtersHandler(t){this.dateFiltersFrom=t.detail.filterFromCalendar,this.dateFiltersTo=t.detail.filterToCalendar,this.limit=5,this.offset=0,this.getDrawsData()}clearFiltersHandler(){this.dateFiltersFrom="",this.dateFiltersTo="",this.limit=5,this.offset=0,this.drawData=this.winningDataSetsData,this.getDrawsData()}hpPageChange(t){this.limit=t.detail.limit,this.offset=t.detail.offset,this.isReset=!1,this.getDrawsData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}connectedCallback(){this.getDrawsData()}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ph[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}disconnectedCallback(){clearInterval(this.interval)}render(){let t=s("div",{key:"77c5f0d587b90c5548f60e045803452e95b8377c",class:"DrawResultsHeader"},s("div",{key:"4aecd3e65ca3b687ed5f32ddd050932edcd4716d",class:"DrawResultsHeaderContent"},s("h4",{key:"373c5c9d7e2e91e0561ee5dbb56b6cc1f0531fbe"},Bh("drawResultsHeader",this.language)),s("div",{key:"443cb8d63aee0bba92b9ff288bd18336030550ec",class:"FilterSection"},s("helper-filters",{key:"1ed26ba1a261288d2d1c10a14d786da2b6ee4d6b","activate-ticket-search":"false","game-id":this.gameId,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))));return s("section",{key:"1b2914b84b381721c9a96395f9629407e1444463",class:"GridWrapper",ref:t=>this.stylingContainer=t},s("div",{key:"98295c6cd09cd28719b738e16d6aee43be5426eb",class:"DrawResultsSection"},s("div",{key:"d29bcfe89ad920705c0551c2265e2b7a0a58d6b6",class:"DrawResultsAreaHistory"},t,s("div",{key:"65b37fa0a70535b5de5f0fbecb3d221bbaa9cad6",class:"HistoryGridWrapper"},s("div",{key:"dec3e5dde880ecabaf8ccd624ac02de66f86ae82",class:"HistoryGrid"},this.isLoading&&s("p",{key:"4597f37c985b6e63540a74c3b28541974cb8798d"},Bh("loading",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>s("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"history-draw-data":this.transDataToString(t),"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))),!this.isLoading&&this.noResults&&s("p",{key:"1232ffaba11ae9ede882ce3421fb5087e04bdb87",class:"errorText"},Bh("noResults",this.language)))),s("div",{key:"c1038f322eafd601df4066746f0f1eb605ade0b0",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&s("lottery-pagination",{key:"496f30e9225389b7bc0c6d7784851a01e13ea3c8",arrowsActive:!0,numberedNavActive:!0,"is-reset":this.isReset,"first-page":!1,"prev-page":!0,"next-page":!0,offset:this.offset,limit:this.limit,total:this.totalResults,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Nh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 30px}.GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GridBanner .BannerButtonsWrapper .BannerBackButton,.GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-typography, #009993);border-radius:4px;padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GridBanner .HistoryGridBannerArea{padding-top:30px}.HistoryGridBannerArea{display:flex;flex-direction:column;align-items:center}.BannerText{font-size:14px;font-weight:300}.BannerCountdown{font-size:22px;display:flex;gap:20px}.DrawResultsSection{max-width:600px;margin:0px auto}.HistoryGrid{border-radius:5px}.DrawResultsHeader{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:4px 4px 0 0}.DrawResultsHeader h4{text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.DrawNumbersGrid{padding:10px 50px}.DrawNumbersGrid p{margin:0 0 10px 0;font-size:14px}.BulletContainer{margin-bottom:20px}.DrawResultTop{background-color:var(--emw--color-background, #009993);padding:10px;text-align:center;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));padding:0 50px;display:flex;justify-content:center;gap:40px}.ViewAllResults{display:block;padding:10px 40px;margin:40px auto;border:0;border-radius:5px;background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));outline:none}.FilterSection{display:flex;justify-content:space-between;padding:25px 15px 10px;gap:10px;margin:0px 15px}.FilterSection .FilterResultsContainer{display:flex;gap:5px;overflow-x:auto}.FilterSection .QuickFilterButton,.FilterSection .ResetButton{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-align:center;letter-spacing:0}.FilterSection .Active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.FilterSection helper-filters{margin-left:auto}.errorText{color:var(--emw--color-error, #ff0000)}';const Oh=class{constructor(e){t(this,e),this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.lowNumber=void 0,this.highNumber=void 0,this.minimumAllowed=void 0,this.maxinumAllowed=void 0,this.language="en",this.translationUrl=void 0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"0bb2683f87461804914d26c708499902d92dc503",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"2ba23b953a9519ccb36fd203c3ac98a366673822","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"54c18e3a6fde25ff0953bb7b15b8a1200e237fd0",class:"AccordionContainer",slot:"accordionContent"},s("helper-tabs",{key:"0cb93435825bf7a42636848ffd5ff67a30369cfa","low-number":this.lowNumber,"high-number":this.highNumber,"minimum-allowed":this.minimumAllowed,"maxinum-allowed":this.maxinumAllowed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Oh.style=":host{display:block}";const Eh=["ro","en","fr","ar","hr"],Fh={en:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ro:{error:"Eroare",backButton:"Inapoi",lobbyButton:"Lobby",nextDraw:"Urmatoarea extragere:",buy:"Cumpara bilet",viewLatest:"Ultimile extrageri",submitSuccess:"Submit successfully!",orderSummaryTitle:"Rezumat comanda",orderSummaryTickets:"Bilet",orderSummaryTotal:"Total",orderSummarySubmit:"Trimite",modalLogin:"Please login to submit a ticket",loading:"Se incarca, va rugam asteptati ..."},fr:{error:"Error",backButton:"Back",lobbyButton:"Lobby",nextDraw:"Next draw in: ",buy:"Buy tickets",viewLatest:"View latest results",submitSuccess:"Submit successfully!",orderSummaryTitle:"Order Summary",orderSummaryTickets:"Ticket",orderSummaryTotal:"Total",orderSummarySubmit:"Submit",modalLogin:"Please login to submit a ticket",loading:"Loading, please wait ..."},ar:{error:"خطأ",backButton:"خلف",lobbyButton:"ردهة",nextDraw:"السحب التالي:",buy:"اشتري تذاكر",viewLatest:"عرض أحدث النتائج",submitSuccess:"Submit successfully!",orderSummaryTitle:"ملخص الطلب",orderSummaryTickets:"تذكرة",orderSummaryTotal:"المجموع",orderSummarySubmit:"يُقدِّم",modalLogin:"الرجاء تسجيل الدخول لتقديم تذكرة",loading:"Loading, please wait ..."},hr:{error:"Greška",backButton:"Nazad",lobbyButton:"Lobby",nextDraw:"Sljedeće izvlačenje za: ",buy:"Uplati listić",viewLatest:"Pogledajte najnovije rezultate",submitSuccess:"Submit successfully!",orderSummaryTitle:"Sažetak narudžbe",orderSummaryTickets:"Listić",orderSummaryTotal:"Ukupno",orderSummarySubmit:"Podnijeti",modalLogin:"Molimo prijavite se da uplatite listić",loading:"Učitavanje, molimo pričekajte ..."}},jh=(t,e)=>{const i=e;return Fh[void 0!==i&&Eh.includes(i)?i:"en"][t]},Rh=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Fh[e][i]=t[e][i]})),e(Fh)})).catch((t=>{i(t)}))})),Lh=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}));function Wh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a=Lh(),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const $h=class{constructor(i){var s;t(this,i),this.goBackEvent=e(this,"goBackEvent",7),this.goToLobbyEvent=e(this,"goToLobbyEvent",7),this.userAgent=window.navigator.userAgent,this.quickPick=!1,this.gameData={},this.isMobile=!!((s=this.userAgent).toLowerCase().match(/android/i)||s.toLowerCase().match(/blackberry|bb/i)||s.toLowerCase().match(/iphone|ipad|ipod/i)||s.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),this.secondarySelectionAllowed=!1,this.thousandSeperator=t=>{if(0===t)return"0";if(!t)return"";const e=(t=t.toString()).split(".");return e[0]=e[0].replace(/\B(?=(\d{3})+(?!\d))/g,","),e.join(".")},this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.gameId=void 0,this.playerId=void 0,this.sessionId=void 0,this.language="en",this.backgroundUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.tickets=[],this.mainTickets=[],this.secondaryTickets=[],this.tabIndex=0,this.hasErrors=!1,this.totalAmount=0,this.successVisible=!1,this.daysRemaining=void 0,this.hoursRemaining=void 0,this.minutesRemaining=void 0,this.secondsRemaining=void 0,this.nextDate=void 0,this.isLoggedIn=!1,this.loginModalVisible=!1,this.isLoading=!1,this.showSubmitError=!1,this.submitError="",this.showApiError=!1,this.apiError="",this.translationData=void 0,this.isSubscription=!1,this.subscriptionParam=null,this.showSubscriptionError=!1,this.subscriptionError="",this.isSubscribed=!1}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}handleNewTranslations(){this.isLoading=!0,Rh(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const e=Rh(this.translationUrl).then((t=>{this.translationData=JSON.stringify(t)})).catch((t=>{console.log(t)}));t.push(e)}return Promise.all(t)}componentDidLoad(){console.log("Lottery Widget From LOCAL"),this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}countdownLogic(t){const e=()=>{this.daysRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/864e5),this.hoursRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/36e5-24*this.daysRemaining),this.minutesRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/6e4-24*this.daysRemaining*60-60*this.hoursRemaining),this.secondsRemaining=Math.floor((Date.parse(t)-(new Date).getTime())/1e3-24*this.daysRemaining*60*60-60*this.hoursRemaining*60-60*this.minutesRemaining)};e(),this.interval=setInterval(e,1e3)}disconnectedCallback(){clearInterval(this.interval)}getGameDetails(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.status>=300)throw this.hasErrors=!0,new Error("There was an error while fetching the data");return t.json()})).then((t=>{var e,i;this.gameData=t,this.basicStake=this.gameData.rules.stakes.length?Number(this.gameData.rules.stakes[0].value):0,this.basicLine=(null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.length)?this.gameData.rules.betTypes[0].boardsAllowed[0]:1,this.basicBetType=this.gameData.rules.betTypes[0],this.nextDate=null===(i=this.gameData.currentDraw)||void 0===i?void 0:i.date,this.nextDate&&this.countdownLogic(this.nextDate),this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed,this.quickPick=this.gameData.rules.quickPickAvailable,this.isSubscription=this.gameData.rules.wagerTypes&&this.gameData.rules.wagerTypes.includes("Subscription");let s=this.gameData.draws?this.gameData.draws.filter((t=>!t.winningNumbers)):[];s.length>0&&(this.nextDraw=s[0].id),this.createNewTicket()})).catch((t=>{this.hasErrors=!0,console.log("Error",t)}))}calculateTotalAmount(){const{currency:t}=this.gameData.rules.stakes[0];this.totalAmount=0,this.mainTickets.forEach((t=>{var e;t.completed.every((t=>t))&&(this.totalAmount+=t.drawCount*(t.stake||this.basicStake)*t.multiplierNum*t.lineNum*(null===(e=t.betType)||void 0===e?void 0:e.combinations))})),this.currency=t}gridFilledHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!0,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:t.detail.drawCount,stake:e.stake||this.basicStake,selectedNumbers:i,multiplierNum:t.detail.multiplierNum,multiplier:t.detail.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:t.detail.quickPicks,betName:t.detail.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}gridDirtyHandler(t){let e="secondarySelection"===t.detail.selectionType?this.secondaryTickets:this.mainTickets;e=e.map((e=>{if(e.ticketId==t.detail.id){let i=e.selectedNumbers||[];i[t.detail.index]=t.detail.selectedNumbers.map((t=>parseInt(t,10)));let s=e.completed||[];return s[t.detail.index]=!1,{gameId:e.gameId,ticketId:e.ticketId,completed:s,drawCount:e.drawCount,stake:e.stake,selectedNumbers:i,multiplierNum:e.multiplierNum,multiplier:e.multiplier,lineNum:e.lineNum,betType:e.betType,quickPicks:e.quickPicks,betName:e.betName}}return e})),"secondarySelection"===t.detail.selectionType?this.secondaryTickets=e:this.mainTickets=e,this.calculateTotalAmount()}modalCloseEvent(){this.loginModalVisible=!1,this.successVisible=!1}stakeChangeHandler(t){const{ticketId:e,stake:i}=t.detail;this.mainTickets[e-1].stake=i,this.calculateTotalAmount()}multiplierChangeHandler(t){const{ticketId:e,multiplierNum:i,multiplier:s}=t.detail;this.mainTickets[e-1].multiplierNum=i,this.mainTickets[e-1].multiplier=s,this.calculateTotalAmount()}drawMultiplierChangeHandler(t){const{ticketId:e,drawCount:i}=t.detail;this.mainTickets[e-1].drawCount=i,this.calculateTotalAmount()}lineMultiplierChangeHandler(t){const{ticketId:e,lineNum:i}=t.detail;this.mainTickets[e-1].lineNum=i,this.mainTickets[e-1].completed=Array.from({length:i},(()=>!1)),this.mainTickets[e-1].selectedNumbers=[],this.mainTickets[e-1].quickPicks=[]}betTypeChangeHandler(t){const{ticketId:e,betType:i}=t.detail;this.mainTickets[e-1].betType=i}createNewTicket(){this.mainTickets=[...this.mainTickets,{gameId:this.gameId,ticketId:this.mainTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine,quickPicks:[!1],betName:""}],this.secondaryTickets=[...this.secondaryTickets,{gameId:this.gameId,ticketId:this.secondaryTickets.length+1,drawCount:1,multiplierNum:1,completed:[!1],stake:this.basicStake,betType:this.basicBetType,lineNum:this.basicLine}]}showLoginModal(){this.loginModalVisible=!0}handleSubscriptionReady(t){this.subscriptionParam=t.detail}handleSubscriptionCheckChange(t){this.isSubscribed=t.detail}buildTicketParam(){let t={playerId:this.playerId.toString(),tickets:[]},e=[];this.secondarySelectionAllowed&&(e=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let i=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),s=[...new Set([...e,...i])].sort(((t,e)=>t-e));if(s.length){this.showSubmitError=!0;let t=s.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,setTimeout((()=>{this.showSubmitError=!1}),3e3),null}return this.mainTickets.forEach(((e,i)=>{var s;t.tickets.push({startingDrawId:this.nextDraw,amount:(e.stake*e.drawCount*e.multiplierNum*(e.lineNum||1)*(null===(s=e.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:e.selectedNumbers.map(((t,s)=>{var o;return{betType:(null===(o=e.betType)||void 0===o?void 0:o.id)||this.gameData.rules.defaultBetType,stake:e.stake,selections:t,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[],quickPick:e.quickPicks[s],betName:e.betName}})),multiplier:e.multiplier,multiplierNum:e.multiplierNum,drawCount:e.drawCount,quickPick:this.quickPick})})),t}showNotification(t,e="",i="top-end"){const s=document.createElement("vaadin-notification");s.renderer=e=>{e.textContent=t},s.duration=5e3,e&&s.setAttribute("theme",e),s.setAttribute("position",i),document.body.appendChild(s),s.opened=!0}handleSubmitTickets(){this.isSubscription&&this.isSubscribed?(this.submitTickets(),this.submitSubscriptionTickets()):this.submitTickets()}async submitSubscriptionTickets(){try{let t=await this.buildTicketParam();if(!t)return;if(!this.subscriptionParam||"string"==typeof this.subscriptionParam)return this.subscriptionError="string"==typeof this.subscriptionParam?this.subscriptionParam:"Ouccurence is required.",this.showSubscriptionError=!0,void setTimeout((()=>{this.showSubscriptionError=!1}),3e3);this.isLoading=!0;const e=this.playerId.toString(),i=`${this.endpointSubscription}/player/${e}/ruleDefinition`;this.subscriptionParam.playerId=e;const s=fh(new Date,"yyyyMMddHHMMSS");this.subscriptionParam.name=`${this.subscriptionParam.ruleType}_${e}_${s}`;const{id:o}=await Wh(i,"POST",this.subscriptionParam,{Authorization:`Bearer ${this.sessionId}`});if(t){const e=Object.assign(Object.assign({},t),{ruleDefinitionId:o}),i=`${this.endpointTicket}/subscription`;await Wh(i,"POST",e,{Authorization:`Bearer ${this.sessionId}`}),this.showNotification("Subscription rule created successfully.","success")}}catch(t){this.showNotification("Failed to create the subscription rule. Please try again.","error")}this.isLoading=!1}submitTickets(){let t=new URL(`${this.endpointTicket}/tickets`);const e=this.buildTicketParam();if(e){const i=Lh();let s={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":i},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,s).then((t=>{if(t.status>300)throw this.apiError=t.statusText+".",this.showApiError=!0,setTimeout((()=>{this.showApiError=!1}),3e3),new Error(t.statusText);return t.json()})).then((()=>{this.showNotification("Ticket submitted successfully.","success")})).catch((t=>{console.log("Error ",t),this.showNotification("Failed to purchase the ticket. Please try again.","error")})).finally((()=>{this.isLoading=!1}))}}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,o,r,a,n,l,h,c,d,u,p,m,v,f,b,g,y,w,x;const k=i(this.isMobile?"../static/chrono_lottery_mobile.webp":"../static/chrono_desktop.webp");return this.hasErrors?s("div",{class:"GamePage"},s("div",{class:"Title"},jh("error",this.language))):s("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},s("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:k})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},s("div",{class:"BannerButtonsWrapper"}),s("div",{class:"Tabs"},s("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},jh("buy",this.language)),s("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},jh("viewLatest",this.language)))),s("div",{class:"NextDrawWrapper"},this.nextDate&&s("div",{class:"NextDraw"},s("p",{class:"BannerText"},jh("nextDraw",this.language)),s("div",{class:"BannerCountdown"},s("span",{class:"CountdownDays"},this.daysRemaining,"D"),s("span",{class:"CountdownHours"},this.hoursRemaining,"H"),s("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),s("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&s("div",{class:"GamePageContent"},s("div",{class:"GameDetails"},s("lottery-game-details",{"low-number":null===(e=null===(t=this.gameData.rules)||void 0===t?void 0:t.boards[0])||void 0===e?void 0:e.lowNumber,"high-number":null===(r=null===(o=this.gameData.rules)||void 0===o?void 0:o.boards[0])||void 0===r?void 0:r.highNumber,"minimum-allowed":null===(n=null===(a=this.gameData.rules)||void 0===a?void 0:a.boards[0])||void 0===n?void 0:n.minimumAllowed,"maxinum-allowed":null===(h=null===(l=this.gameData.rules)||void 0===l?void 0:l.boards[0])||void 0===h?void 0:h.maxinumAllowed,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,"translation-url":this.translationData})),s("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,i;return s("lottery-ticket-controller",{endpoint:this.endpoint,"ticket-id":t.ticketId,"game-id":t.gameId,collapsed:!1,last:!0,language:this.language,"auto-pick":null===(e=this.gameData.rules)||void 0===e?void 0:e.quickPickAvailable,"reset-button":null===(i=this.gameData.rules)||void 0===i?void 0:i.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})}))),s("div",{class:"OrderSummary"},s("h3",{class:"OrderSummaryTitle"},jh("orderSummaryTitle",this.language)),s("div",{class:"OrderTicketInfo"},s("div",{class:"Ticket"},jh("orderSummaryTickets",this.language),": ",s("span",null,this.mainTickets.length)),s("div",null,s("span",null,this.thousandSeperator((null===(d=null===(c=this.mainTickets[0])||void 0===c?void 0:c.betType)||void 0===d?void 0:d.combinations)*(null===(u=this.mainTickets[0])||void 0===u?void 0:u.lineNum))),s("span",{class:"Multiplier"},"x"),(null===(p=this.gameData.rules)||void 0===p?void 0:p.stakeMultiplierAvailable)&&s("span",null,s("span",null,1===(null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum)?`${null===(v=this.mainTickets[0])||void 0===v?void 0:v.multiplierNum} Multiplier`:`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multipliers`),s("span",{class:"Multiplier"},"x")),s("span",null,`${null===(b=this.mainTickets[0])||void 0===b?void 0:b.stake} EUR`),(null===(g=this.gameData.rules)||void 0===g?void 0:g.drawMultiplierAvailable)&&s("span",null,s("span",{class:"Multiplier"},"x"),s("span",null,1===(null===(y=this.mainTickets[0])||void 0===y?void 0:y.drawCount)?`${null===(w=this.mainTickets[0])||void 0===w?void 0:w.drawCount} Draw`:`${null===(x=this.mainTickets[0])||void 0===x?void 0:x.drawCount} Draws`)))),s("hr",null),s("div",{class:"Total"},jh("orderSummaryTotal",this.language),": ",s("span",null,this.thousandSeperator(this.totalAmount)," ",this.currency)),this.isSubscription&&s("div",{class:"SubscriptionWrapper"},s("lottery-subscription",{endpoint:this.endpoint,endpointSubscription:this.endpointSubscription,language:this.language,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource,gameName:this.gameData.name})),s("div",{class:"ButtonWrapper"},this.isLoggedIn&&s("div",null,!this.isLoading&&s("div",{class:"submitWrap"},s("div",{class:"Button",onClick:()=>this.handleSubmitTickets()},jh("orderSummarySubmit",this.language)),this.showSubmitError&&s("div",{class:"submitError"},this.submitError),this.showApiError&&s("div",{class:"submitError"},this.apiError),this.showSubscriptionError&&s("div",{class:"submitError"},this.subscriptionError)),this.isLoading&&s("span",{class:"Button",style:{cursor:"default"}},jh("loading",this.language))),!this.isLoggedIn&&s("div",null,s("span",{class:"Button",onClick:()=>this.showLoginModal()},jh("orderSummarySubmit",this.language)),s("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("modalLogin",this.language))))))),1==this.tabIndex&&s("div",null,s("lottery-draw-results-history",{endpoint:this.endpoint,"game-id":this.gameId,language:this.language,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),s("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("p",{class:"SubmitModalSuccess"},jh("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return o(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"],translationUrl:["handleNewTranslations"]}}};$h.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GamePage .GridBanner{background-color:var(--emw--color-background, #009993);background-repeat:no-repeat;background-position:center;color:var(--emw--color-gray-300, #111);padding:0 20px 10px;height:220px;display:flex;flex-direction:column;justify-content:space-between}.GamePage .GridBanner .BannerButtonsWrapper{display:flex;justify-content:space-between;padding-top:16px}.GamePage .GridBanner .BannerButtonsWrapper .BannerBackButton,.GamePage .GridBanner .BannerButtonsWrapper .BannerLobbyButton{background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--color-gray-100, #D4D4D4);border-radius:var(--emw--button-border-radius, 4px);padding:7px 15px;font-size:12px;text-transform:uppercase;width:80px;cursor:pointer}.GamePage .GridBanner .GridBannerArea{padding-top:30px;display:flex;flex-direction:column;align-items:center}.GamePage .TotalWinnings{color:var(--emw--button-text-color, #000);font-size:18px;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:10px;text-transform:uppercase}.GamePage .TotalWinnings span{font-size:18px;font-weight:700}.GamePage .NextDraw{color:var(--emw--button-background-color, #00958f);font-size:24px;font-weight:600;margin:0 auto;text-align:center;text-transform:uppercase;display:flex;justify-content:center;align-items:center;flex-direction:column;gap:4px}.GamePage .NextDraw .BannerText{font-weight:400;font-size:18px;text-transform:uppercase;padding:0;margin:15px 0 0 0}.GamePage .NextDraw .BannerCountdown{font-size:22px;color:var(--emw--button-background-color, #00958f);display:flex;gap:20px}.GamePage .Tabs{display:flex;justify-content:center;gap:10px}.GamePage .Tabs .TabButton{border-radius:var(--emw--button-border-radius, 4px);cursor:pointer;padding:8px 0;width:50%;max-width:200px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.GamePage .Tabs .TabButton.Active{color:var(--emw--button-background-color, #00958f);background:var(--emw--color-gray-50, #F1F1F1);border:1px solid var(--emw--color-gray-50, #F1F1F1)}.LastDrawResultsTitle{color:var(--emw--color-typography, #009993);padding:25px 0 10px 0;text-align:center;border-radius:var(--emw--button-border-radius, 4px);text-transform:uppercase;font-size:16px;font-weight:600;margin:0}.NextDrawWrapper{padding:10px 15px;background:var(--emw--color-gray-50, #F1F1F1);background:linear-gradient(0deg, var(--emw--color-gray-50, #F1F1F1) 0%, var(--emw--color-gray-transparency-20, rgba(253, 187, 45, 0)) 100%)}.NextDrawWrapper .BannerText{font-size:16px;font-weight:700;text-align:center}.NextDrawWrapper .BannerCountdown{font-size:22px;display:flex;gap:8px;color:var(--emw--color-typography, #009993);font-weight:bolder;justify-content:center}.GamePageContent{padding:15px;max-width:1200px;margin:0 auto}.GameDetails{padding-bottom:10px;margin-bottom:20px}.CreateNewTicket{background:var(--emw--color-primary-variant, #004D4A);height:100px;width:100%;display:flex;margin-top:10px;flex-direction:column;justify-content:center;align-items:center}.CreateNewTicket button{cursor:pointer;display:inline-block;border-radius:50%;width:40px;height:40px;margin:5px;border:1px solid var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--color-primary-variant, #004D4A);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.CreateNewTicket button:hover{background:var(--emw--color-gray-50, #F1F1F1)}.CreateNewTicket span{display:inline-block;font-size:12px;text-align:center;margin:0 auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary{min-width:200px;border-radius:var(--emw--button-border-radius, 4px);display:flex;flex-direction:column;justify-content:center;margin-top:20px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.OrderSummary .OrderSummaryTitle{font-size:16px;color:var(--emw--color-typography, #009993);text-transform:uppercase;text-align:center}.OrderSummary .OrderTicketInfo{display:flex;align-items:center}.OrderSummary .OrderTicketInfo .Multiplier{margin:0 6px}.OrderSummary .Ticket{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px;margin-right:30px}.OrderSummary .Ticket span{text-align:right}.OrderSummary hr{border:none;border-top:1px double var(--emw--color-gray-100, #D4D4D4);color:var(--emw--color-gray-100, #D4D4D4);width:100%}.OrderSummary .Total{display:inline-block;color:var(--emw--button-text-color, #000);font-size:14px;height:50px;line-height:50px;margin-left:15px}.OrderSummary .Total span{text-align:right}.ButtonWrapper{display:flex;align-items:center;justify-content:center}.ButtonWrapper .Button{cursor:pointer;border-radius:var(--emw--button-border-radius, 4px);padding:8px 60px;width:max-content;margin:5px;font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-background, #009993);border:1px solid var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ButtonWrapper .Button:hover{background:var(--emw--color-background-secondary, #00ABA4)}.ButtonWrapper .Button.ButtonDisabled{pointer-events:none;background:var(--emw--color-gray-transparency-80, #ccc);border:1px solid var(--emw--color-gray-transparency-80, #ccc)}.ButtonWrapper .submitError{margin-top:10px;color:var(--emw--color-error, #FF3D00)}.ButtonWrapper .submitWrap{display:flex;flex-direction:column;align-items:center}.SubmitModalSuccess{text-align:center;font-size:18px;padding:20px}.DeleteTicketModalWrapper{padding:20px;text-align:center}.DeleteTicketModalWrapper .DeleteTicketModalTitle{font-size:16px;color:var(--emw--button-background-color, #00958f);font-weight:400;text-transform:uppercase;margin:20px 0 40px}.DeleteTicketModalWrapper .DeleteTicketModalText{font-size:14px;color:var(--emw--button-text-color, #000);line-height:22px;margin-bottom:40px}.DeleteTicketModalWrapper .DeleteTicketModalButtons{display:flex;gap:10px;justify-content:center}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm{cursor:pointer;border-radius:4px;padding:8px 25px;width:max-content;margin:5px;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalConfirm:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel{cursor:pointer;width:max-content;border-radius:var(--emw--button-border-radius, 4px);padding:10px 25px;margin:5px;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.DeleteTicketModalWrapper .DeleteTicketModalButtons .DeleteTicketModalCancel:hover{background:var(--emw--color-gray-50, #F1F1F1)}@media (min-width: 1200px){.GamePageContent .TicketsWrapper{float:left;width:49%}.GamePageContent .GameDetails{float:right;width:49%}.GamePageContent .OrderSummary{float:right;width:49%}}';const Hh=class{constructor(i){t(this,i),this.gridFilledEvent=e(this,"gridFilled",7),this.gridDirtyEvent=e(this,"gridDirty",7),this.gridClearAllEvent=e(this,"gridClearAllEvent",7),this.selectedCounter=0,this.ticketId=void 0,this.totalNumbers=0,this.gameId=void 0,this.maximumAllowed=7,this.minimumAllowed=3,this.numberRange=void 0,this.selectable=!0,this.selectedNumbers="",this.secondaryNumbers="",this.displaySelected=!1,this.language="en",this.gridIndex=void 0,this.gridType="",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.highNumber=47,this.lowNumber=1,this.selectionType="mainSelection",this.partialQuickpickAvailable=!1,this.numbers=[],this.bonusNumbers=[]}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}connectedCallback(){let t=[];this.selectedNumbers.length>0&&(t=this.selectedNumbers.split(","),this.selectedCounter=t.length),this.secondaryNumbers.length>0&&(this.bonusNumbers=this.secondaryNumbers.split(",").map((t=>({number:t,selected:!0,selectable:this.selectable})))),this.displaySelected?t.forEach((t=>{this.numbers.push({number:t,selected:!0,selectable:this.selectable})})):Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e)).map((t=>t.toString())).forEach((e=>{this.numbers.push({number:e,selected:t.indexOf(e)>=0,selectable:this.selectedCounter!=this.maximumAllowed&&this.selectable})}))}shuffleArray(t){const e=[];for(;t.length>0;){const i=Math.floor(Math.random()*t.length);e.push(t.splice(i,1)[0])}return e}lotteryBulletSelectionHandler(t){this.numbers=this.numbers.map((e=>({number:e.number,selected:e.number==t.detail.value?t.detail.selected:e.selected,selectable:e.selectable}))),t.detail.selected?(this.selectedCounter+=1,this.selectedCounter>=this.minimumAllowed&&this.selectedCounter<=this.maximumAllowed&&(this.numbers=this.numbers.map((t=>this.selectedCounter===this.maximumAllowed?{number:t.number,selected:t.selected,selectable:!!t.selected}:{number:t.number,selected:t.selected,selectable:!0})),JSON.parse(this.numberRange).includes(this.selectedCounter)?this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))):(this.selectedCounter-=1,this.numbers=this.numbers.map((t=>({number:t.number,selected:t.selected,selectable:!0}))),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex),this.selectedCounter<this.minimumAllowed?this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}):this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}))}async resetSelectionHandler(t){t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex&&(this.selectedCounter=0,this.numbers=this.numbers.map((t=>({number:t.number,selected:!1,selectable:this.selectable}))),this.gridDirtyEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:[]}))}async autoSelectionHandler(t){if(t.detail&&t.detail.ticketId==this.ticketId&&t.detail.index===this.gridIndex){this.resetSelectionHandler(t);let e=Array.from({length:this.highNumber-this.lowNumber+1},((t,e)=>this.lowNumber+e));e=this.shuffleArray(e),e=e.slice(0,this.minimumAllowed),this.numbers=this.numbers.map((t=>({number:t.number,selected:e.indexOf(parseInt(t.number,10))>=0,selectable:!!this.partialQuickpickAvailable&&e.indexOf(parseInt(t.number,10))>=0}))),this.gridFilledEvent.emit({id:this.ticketId,index:this.gridIndex,selectionType:this.selectionType,selectedNumbers:this.numbers.filter((t=>t.selected)).map((t=>t.number))}),this.selectedCounter=this.minimumAllowed}}render(){return s("div",{key:"f62b5b1e5a6cf7bcaa13ce2c8a281bc93fa439f7",class:"GridContainer",ref:t=>this.stylingContainer=t},s("div",{key:"e381adbfff57e2cc343188c46037eb45ab798cac",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))),this.bonusNumbers.length?this.bonusNumbers.map((t=>s("div",null,s("lottery-bullet",{value:t.number,selectable:t.selectable,"is-selected":t.selected,"is-bonus":!0,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))):""))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Hh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.GridContainer{display:flex;flex-direction:column;max-width:1200px}.Grid{margin-top:10px 0 10px 0;display:flex;flex-direction:row;flex-wrap:wrap;gap:20px}.Grid.TicketGrid{gap:5px}';const Uh=t=>!!(t.toLowerCase().match(/android/i)||t.toLowerCase().match(/blackberry|bb/i)||t.toLowerCase().match(/iphone|ipad|ipod/i)||t.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i)),Gh={en:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ro:{firstPage:"Prima",previousPage:"Anterior",nextPage:"Urmatoarea",lastPage:"Ultima"},fr:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},ar:{firstPage:"First",previousPage:"Previous",nextPage:"Next",lastPage:"Last"},hu:{firstPage:"First",previousPage:"Previous",nextPage:"Következő",lastPage:"Last"},hr:{firstPage:"Prva",previousPage:"Prethodna",nextPage:"Slijedeća",lastPage:"Zadnja"}},Vh=(t,e)=>Gh[void 0!==e&&e in Gh?e:"en"][t],qh=class{constructor(i){t(this,i),this.hpPageChange=e(this,"hpPageChange",7),this.userAgent=window.navigator.userAgent,this.currentPage=1,this.navigateTo=t=>{switch(t){case"firstPage":this.offsetInt=0;break;case"lastPage":this.offsetInt=this.endInt*this.limitInt;break;case"previousPage":this.offsetInt-=this.limitInt,this.nextPage=!0;break;case"nextPage":this.offsetInt+=this.limitInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage;break;case"fivePagesBack":this.offsetInt-=5*this.limitInt,this.offsetInt=this.offsetInt<=0?0:this.offsetInt;break;case"fivePagesForward":this.offsetInt+=5*this.limitInt,this.offsetInt=this.offsetInt/this.limitInt>=this.endInt?this.endInt*this.limitInt:this.offsetInt,this.nextPage=!(this.offsetInt/this.limitInt>=this.endInt)&&this.nextPage}this.previousPage=!!this.offsetInt,this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt})},this.paginationNavigation=(t,e)=>{isNaN(t)?0===e&&this.currentPage<=4?this.navigateTo("firstPage"):0===e&&this.currentPage>4?this.navigateTo("fivePagesBack"):4===e&&this.endInt-this.currentPage>=2&&this.navigateTo("fivePagesForward"):(1===t?(this.offsetInt=t-1,this.previousPage=!1):(this.offsetInt=(t-1)*this.limitInt,this.nextPage=!(t>this.endInt)),this.hpPageChange.emit({offset:this.offsetInt,limit:this.limitInt,total:this.totalInt}))},this.nextPage=!1,this.prevPage=!1,this.offset=0,this.limit=10,this.total=1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.arrowsActive=void 0,this.secondaryArrowsActive=void 0,this.numberedNavActive=void 0,this.isReset=!1,this.translationUrl=void 0,this.offsetInt=void 0,this.lastPage=!1,this.previousPage=!1,this.limitInt=void 0,this.totalInt=void 0,this.pagesArray=[],this.endInt=0}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Gh[e][i]=t[e][i]})))}componentWillRender(){this.offsetInt=this.offset,this.limitInt=this.limit,this.nextPage=!!this.isReset||this.nextPage,this.currentPage=this.offsetInt/this.limitInt+1,this.limitInt=this.limit,this.totalInt=this.total,this.endInt=Math.ceil(this.totalInt/this.limitInt)-1,this.lastPage=!(this.offsetInt>=this.endInt*this.limitInt),1==this.currentPage||2==this.currentPage?this.endInt>3?(this.pagesArray=Array.from({length:4},((t,e)=>e+1)),this.pagesArray.push("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)):this.currentPage>=3&&this.endInt-this.currentPage>=2?(this.pagesArray=Array.from({length:3},((t,e)=>this.currentPage+e-1)),this.pagesArray.push("..."),this.pagesArray.unshift("...")):this.endInt-this.currentPage<3&&(this.endInt>4?(this.pagesArray=Array.from({length:4},((t,e)=>this.endInt-2+e)),this.pagesArray.unshift("...")):this.pagesArray=Array.from({length:this.endInt+1},((t,e)=>e+1)))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){let t=s("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>s("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(Uh(this.userAgent)?"MobileButtons":"")},s("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},s("span",null,t)))))),e=s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},s("span",{class:"NavigationButton"},Vh("firstPage",this.language)),s("span",{class:"NavigationIcon"})),i=s("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,s("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},Vh("previousPage",this.language)),s("span",{class:"NavigationIcon"})));Uh(this.userAgent)&&(i=s("div",{class:"LeftItems"},s("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},s("span",{class:"NavigationButton"},Vh("previousPage",this.language)),s("span",{class:"NavigationIcon"}))));let o=s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},s("span",{class:"NavigationButton"},Vh("lastPage",this.language)),s("span",{class:"NavigationIcon"})),r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},Vh("nextPage",this.language)),s("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&o);return Uh(this.userAgent)&&(r=s("div",{class:"RightItems"},s("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},s("span",{class:"NavigationButton"},Vh("nextPage",this.language)),s("span",{class:"NavigationIcon"})))),s("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&i,this.numberedNavActive&&t,this.arrowsActive&&r)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};qh.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}#PaginationContainer{width:100%;margin:20px 0;display:inline-flex;justify-content:space-between;align-items:center}.LeftItems button:not(:first-child),.RightItems button:not(:last-child){margin:0 10px}.LeftItems button,.RightItems button{padding:0;background-color:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993)}.PaginationArea{display:inline-flex;gap:10px;list-style:none}.PaginationArea li{margin:0;padding:0}.PaginationArea li button{width:24px;height:24px;display:flex;border:0;padding:0;justify-content:center;align-items:center;background-color:transparent;color:var(--emw--button-text-color, #000);cursor:pointer;pointer-events:all}.PaginationItem.ActiveItem button{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.PaginationItem.ActiveItem button:disabled{pointer-events:none;cursor:not-allowed}.PaginationItem button:hover,.PaginationItem button:active{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));opacity:0.8}button{width:100px;height:32px;border:1px solid var(--emw--color-gray-transparency-30, #524e52);border-radius:5px;background:var(--emw--color-gray-transparency-30, #524e52);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));font-size:14px;font:inherit;cursor:pointer;transition:all 0.1s linear;text-transform:uppercase;text-align:center;letter-spacing:0}button:hover,button:active{background:var(--emw--color-primary-variant, #004D4A);border-color:var(--emw--color-primary-variant, #004D4A)}button:disabled{background-color:var(--emw--color-gray-transparency-80, #ccc);border-color:var(--emw--color-gray-transparency-80, #ccc);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));cursor:not-allowed}@media screen and (max-width: 720px){button{width:90px;font-size:14px}}@media screen and (max-width: 480px){button{width:70px;font-size:14px}.paginationArea{padding:5px}}@media screen and (max-width: 320px){button{width:58px;font-size:12px}.paginationArea{padding:5px;gap:5px}}@media (hover: none){.paginationItem button:hover{background:inherit;border-color:inherit;color:inherit;opacity:1}.paginationItem.activeItem button:hover{background:var(--emw--color-background, #009993);border-color:var(--emw--color-typography, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}}';const Yh=["ro","en","hr"],Jh={en:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ro:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},fr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},ar:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"},hr:{filterFromCalendar:"Start Date",filterToCalendar:"End Date"}},Kh=(t,e)=>{const i=e;return Jh[void 0!==i&&Yh.includes(i)?i:"en"][t]};function Zh(t,e="GET",i=null,s={}){return new Promise(((o,r)=>{const a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)})),n={method:e,headers:Object.assign({"Content-Type":"application/json","X-Idempotency-Key":a},s),body:null};i&&(n.body=JSON.stringify(i)),fetch(t,n).then((t=>{if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);return t.json()})).then((t=>o(t))).catch((t=>r(t)))}))}const Xh=class{constructor(i){t(this,i),this.subscriptionCompleted=e(this,"subscriptionCompleted",7),this.subscriptionCheckChange=e(this,"subscriptionCheckChange",7),this.changeDateParam=()=>{if(this.filterData.from&&!this.filterData.to){let t=this.filterData.from,e=t.split("/");t=new Date(Date.UTC(Number(e[2]),Number(e[1])-1,Number(e[0]),0,0,0)).toISOString();const i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:"",fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}if(this.filterData.from&&this.filterData.to){const{from:t,to:e}=this.transDate(this.filterData.from,this.filterData.to),i={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:t,fieldId:this.startDateRule.id},{value:e,fieldId:this.endDateRule.id},{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};i.params=this.paramRule.fields.map((t=>({value:"",field:t,fieldId:t.id}))),this.subscriptionCompleted.emit(i)}},this.handleFilterFrom=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{from:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.handleFilterTo=t=>{let e=t.target.value.split("-");3===e.length&&(this.filterData=Object.assign(Object.assign({},this.filterData),{to:`${e[2]}/${e[1]}/${e[0]}`})),this.changeDateParam()},this.translationUrl=void 0,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.endpoint=void 0,this.endpointTicket=void 0,this.endpointSubscription=void 0,this.language="en",this.gameName=void 0,this.isSubscribed=!1,this.frequenceList=[],this.frequenceState="",this.filterData={from:"",to:""},this.subscriptionCode="lottery-subscription-widget001",this.conditionId="",this.paramId="",this.conditionRule=void 0,this.paramRule=void 0,this.peroidRule=void 0,this.startDateRule=void 0,this.endDateRule=void 0,this.gameNameRule=void 0,this.ruleType=""}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Jh[e][i]=t[e][i]}))),this.getSubscriptionData()}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}transDate(t,e){let i=t.split("/"),s=e.split("/");return{from:new Date(Date.UTC(Number(i[2]),Number(i[1])-1,Number(i[0]),0,0,0)).toISOString(),to:new Date(Date.UTC(Number(s[2]),Number(s[1])-1,Number(s[0]),23,59,59)).toISOString()}}async getSubscriptionData(){try{const t=`${this.endpointSubscription}/feWidgetConfig/${this.subscriptionCode}`,{conditionMetadataId:e,paramMetadataId:i,ruleType:s}=await Zh(t);this.conditionId=e,this.paramId=i,this.ruleType=s;const o=`${this.endpointSubscription}/metadata/${this.conditionId}`,r=`${this.endpointSubscription}/metadata/${this.paramId}`,[a,n]=await Promise.allSettled([Zh(o),Zh(r)]);if("fulfilled"!==a.status||"fulfilled"!==n.status)throw new Error("Failed to get subscription data");this.conditionRule=a.value,this.paramRule=n.value,this.conditionRule.fields&&(this.peroidRule=this.conditionRule.fields.find((t=>"Period"===t.code)),this.startDateRule=this.conditionRule.fields.find((t=>"StartDate"===t.code)),this.endDateRule=this.conditionRule.fields.find((t=>"EndDate"===t.code)),this.gameNameRule=this.conditionRule.fields.find((t=>"GameName"===t.code)),this.frequenceList=this.peroidRule.enums.map((t=>({label:t.text,value:t.key}))))}catch(t){console.error(t)}}handleCheckboxchange(t){this.isSubscribed=t.target.checked,this.subscriptionCheckChange.emit(this.isSubscribed)}handleSelectionChange(t){if(this.frequenceState=t.detail.value,"NeverMissADraw"===this.frequenceState&&this.isSubscribed){const t={conditionMetadata:this.conditionRule,paramMetadata:this.paramRule,conditions:[{value:this.frequenceState,fieldId:this.peroidRule.id},{fieldId:this.gameNameRule.id,value:this.gameName}],params:[],ruleType:this.ruleType};t.params=this.paramRule.fields.map((t=>({value:"",fieldId:t.id}))),this.subscriptionCompleted.emit(t)}else"Custom"===this.frequenceState&&this.isSubscribed&&this.subscriptionCompleted.emit("Subscription start date is required.")}formateDate(t){const{year:e,month:i,day:s}=t;return fh(new Date(e,i,s),"dd/MM/yyyy")}parseDate(t){const[e,i,s]=t.split("/");return{year:s,month:parseInt(i)-1,day:e}}changeFormate(t){const[e,i,s]=t.split("/");return`${s}-${i}-${e}`}setDateFormate(t){t&&(t.i18n=Object.assign(Object.assign({},t.i18n),{formatDate:this.formateDate,parseDate:this.parseDate}))}render(){return s("div",{key:"f301b99245d1950605dbdfac1f4bc06c60ea0c50",class:"subscripitonContainer",ref:t=>this.stylingContainer=t},s("vaadin-checkbox",{key:"e9005320778ae1d66975e7825b5259fa2bca36d2",label:"Subscription",checked:this.isSubscribed,onChange:this.handleCheckboxchange.bind(this)}),this.isSubscribed&&s("div",{key:"9dc052565ef92bb4c00559766b933e4bf567c1a7",class:"secondConditon"},s("span",{key:"4251cf447cb9c00b12109c1d930720f6465983be",style:{"margin-right":"8px"}},"Occurrence: "),s("vaadin-select",{key:"0eabde390ba1fcab6ec654bf567c38b1afd376c7",items:this.frequenceList,value:this.frequenceState,"on-value-changed":this.handleSelectionChange.bind(this)}),"Custom"===this.frequenceState&&s("div",{key:"61ab68b026444a2c2f63f200b7eeeb84d615c00e",class:"thirdCondition"},s("div",{key:"6b03192f386a3b864012c8c5374a454f367a95e3",class:"filterCalenderWrap"},s("div",{key:"ec7e479eaba4b50dcd41cb953b90dd97fe879dae",class:"filterText"},"Subscription Start Date*"),s("div",{key:"796c81340a082f033a9461d7ef2e0116b962d1e6",class:"filter"},s("vaadin-date-picker",{value:this.filterData.from,key:"filterFromCalendar",max:void 0===this.filterData.to?void 0:this.changeFormate(this.filterData.to),onChange:this.handleFilterFrom,placeholder:Kh("filterFromCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))),s("div",{key:"7a8a64b82154802b65a848f73226e65904e6fe57",class:"filterCalenderWrap"},s("div",{key:"396e291a86a3121f7a3fd7d1316271b8c36f6915",class:"filterText"},"Subscription End Date"),s("div",{key:"ecf9e2f2564c8bf336fcaef61d9ed46635f1bda0",class:"filter"},s("vaadin-date-picker",{value:this.filterData.to,key:"filterToCalendar",min:void 0===this.filterData.from?void 0:this.changeFormate(this.filterData.from),onChange:this.handleFilterTo,placeholder:Kh("filterToCalendar",this.language),ref:t=>this.setDateFormate(t),class:"VaadinDatePicker"}))))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};Xh.style=".subscripitonContainer{margin-bottom:40px}.subscripitonContainer vaadin-checkbox[checked]::part(checkbox){background-color:var(--emw--color-background, #009993)}.subscripitonContainer .secondCondition{padding-left:24px}.subscripitonContainer .thirdCondition{display:flex;gap:24px;align-items:center}.subscripitonContainer .thirdCondition,.subscripitonContainer .secondConditon{margin:16px 0}";const Qh=["ro","en","hr"],tc={en:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ro:{loading:"Se incarca, va rugam asteptati ...",error:"A fost o eroare in timp ce asteptam datele",multiplier:"Multiplicator",numberOfDraws:"Numarul de extrageri",wagerPerDraw:"Pariul per extragere",resetButton:"Reseteaza",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},fr:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},ar:{loading:"Loading, please wait ...",error:"It was an error while trying to fetch the data",multiplier:"Multiplier",numberOfDraws:"Number of Draws",wagerPerDraw:"Wager per Draw",resetButton:"Reset",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"},hr:{loading:"Učitavanje, molimo pričekajte ...",error:"Došlo je do pogreške prilikom pokušaja dohvaćanja podataka",multiplier:"Multiplikator",numberOfDraws:"Broj izvlačenja",wagerPerDraw:"Ulog po izvlačenju",resetButton:"Resetiraj",autoButton:"quick pick",lines:"Select how many lines you want to buy",lineName:"Line",playType:"Select one play type you want to buy"}},ec=(t,e)=>{const i=e;return tc[void 0!==i&&Qh.includes(i)?i:"en"][t]},ic=class{constructor(i){t(this,i),this.ticketCompleted=e(this,"ticketCompleted",7),this.autoSelection=e(this,"autoSelection",7),this.resetSelection=e(this,"resetSelection",7),this.stakeChange=e(this,"stakeChange",7),this.multiplierChange=e(this,"multiplierChange",7),this.drawMultiplierChange=e(this,"drawMultiplierChange",7),this.lineMultiplierChange=e(this,"lineMultiplierChange",7),this.betTypeChange=e(this,"betTypeChange",7),this.endpoint=void 0,this.gameId=void 0,this.numberOfGrids=1,this.multipleDraws=!0,this.ticketId=void 0,this.resetButton=!1,this.autoPick=!1,this.language="en",this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0,this.isLoading=!0,this.hasErrors=!1,this.ticketDone=[],this.isCustomSelect=!1,this.amountInfo={},this.stakeMultiplier="1",this.lineMultiplier=0,this.isCustomSelectStake=!1,this.isCustomSelectDraw=!1,this.isCustomSelectLine=!1,this.drawMultiplier=1,this.secondarySelectionAllowed=!1,this.partialQuickpickAvailable=!1,this.boardsAllowed=[],this.tabIndex=0,this.groupType=[],this.playType=[],this.selectedPlayTypeId="",this.maximumAllowed=6,this.numberRange=[],this.secondaryNumberRange=[],this.secondaryMaximumAllowed=1,this.minimumAllowed=6,this.secondaryMinimumAllowed=1,this.quickPicks=[]}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=Array.from({length:t},(()=>!1)),this.quickPicks=Array.from({length:t},(()=>!1)),this.grids.forEach(((t,e)=>{this.resetSelection.emit({ticketId:this.ticketId,index:e})}))}handleTabIndexChange(t){this.grids.forEach(((t,e)=>{this.toggleResetSelection(e)})),this.setDrawMultiplier(1),this.setStakeMultiplier("1"),this.amountInfo=this.gameData.rules.stakes[0],this.setWagerPerDraw(this.amountInfo),this.playType=this.groupType[t].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.boardsAllowed=this.playType[0].boardsAllowed,this.setLineMultiplier(this.boardsAllowed[0]),this.selectedPlayTypeId=this.playType[0].value,this.numberRange=this.playType[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=this.playType[0].secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange),this.betTypeChange.emit({ticketId:this.ticketId,betType:this.playType[0]})}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}checkForClickOutside(t){this.selectRef&&!this.selectRef.contains(t.composedPath()[0])&&(this.isCustomSelect=!1),this.selectStakeRef&&!this.selectStakeRef.contains(t.composedPath()[0])&&(this.isCustomSelectStake=!1),this.selectDrawRef&&!this.selectDrawRef.contains(t.composedPath()[0])&&(this.isCustomSelectDraw=!1),this.selectLineRef&&!this.selectLineRef.contains(t.composedPath()[0])&&(this.isCustomSelectLine=!1)}connectedCallback(){let t=new URL(`${this.endpoint}/games/${this.gameId}`);fetch(t.href).then((t=>{if(t.ok)return t.json();this.hasErrors=!0})).then((t=>{var e;this.isLoading=!1,this.gameData=t,this.amountInfo=this.gameData.rules.stakes[0],this.secondarySelectionAllowed="INPUT"===this.gameData.rules.secondarySelectionAllowed;const i=this.gameData.rules.betTypes.reduce(((t,e)=>(e.group?(t.groups[e.group]||(t.groups[e.group]=[]),t.groups[e.group].push(e)):t.noGroup.push({groupName:e.name||e.id,betType:[Object.assign({},e)]}),t)),{groups:{},noGroup:[]}),s=Object.entries(i.groups).map((([t,e])=>({groupName:t,betType:e})));this.groupType=[...i.noGroup,...s],this.playType=this.groupType[0].betType.map((t=>Object.assign(Object.assign({},t),{label:t.name||t.id,value:t.id}))),this.partialQuickpickAvailable=this.gameData.rules.partialQuickpickAvailable,this.boardsAllowed=null===(e=this.gameData.rules.betTypes)||void 0===e?void 0:e.filter((t=>"Prima"===t.id))[0].boardsAllowed,this.lineMultiplier=this.boardsAllowed[0];let o=this.gameData.rules.betTypes[0].secondarySelectionRules;this.numberRange=this.gameData.rules.betTypes[0].selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=o.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange)})).catch((t=>{this.isLoading=!1,this.hasErrors=!0,console.error("Error!",t)}))}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])tc[e][i]=t[e][i]})))}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}gridFilledHandler(t){this.ticket=Object.assign(Object.assign({},t.detail),{drawCount:this.drawMultiplier,multiplierNum:Number(this.stakeMultiplier),multiplier:this.gameData.rules.stakeMultiplierAvailable,quickPicks:this.quickPicks,betName:this.playType.length>1?this.playType.find((t=>t.value===this.selectedPlayTypeId)).label:this.groupType[this.tabIndex].groupName}),this.ticketDone=[...this.ticketDone.slice(0,t.detail.index),!0,...this.ticketDone.slice(t.detail.index+1)],this.ticketCompleted.emit(this.ticket)}handleGridClearAllEvent(t){let e=t.detail;this.ticketDone=[...this.ticketDone.slice(0,e),!1,...this.ticketDone.slice(e+1)],this.quickPicks[e]=!1}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!0}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t}),this.quickPicks[t]=!1}changeStake(t,e){this.stakeChange.emit({ticketId:t,stake:e})}toggleClass(){this.isCustomSelect=!this.isCustomSelect}toggleSelection(){this.isCustomSelectStake=!this.isCustomSelectStake}toggleLineSelection(){this.isCustomSelectLine=!this.isCustomSelectLine}toggleDrawSelection(){this.isCustomSelectDraw=!this.isCustomSelectDraw}setWagerPerDraw(t){this.amountInfo={value:t.value,currency:t.currency},this.isCustomSelect=!1,this.changeStake(this.ticketId,t.value)}setStakeMultiplier(t){this.stakeMultiplier=t,this.isCustomSelectStake=!1,this.multiplierChange.emit({ticketId:this.ticketId,multiplierNum:Number(t),multiplier:this.gameData.rules.stakeMultiplierAvailable})}setLineMultiplier(t){this.lineMultiplier=t,this.isCustomSelectLine=!1,this.lineMultiplierChange.emit({ticketId:this.ticketId,lineNum:t})}setDrawMultiplier(t){this.drawMultiplier=t,this.isCustomSelectDraw=!1,this.drawMultiplierChange.emit({ticketId:this.ticketId,drawCount:t})}handlePlayTypeChange(t){this.selectedPlayTypeId=t;let e=this.playType.filter((e=>e.id===t))[0];this.boardsAllowed=e.boardsAllowed,this.numberRange=e.selectionRules.map((t=>t.selectionCount)),this.maximumAllowed=Math.max(...this.numberRange),this.minimumAllowed=Math.min(...this.numberRange),this.secondaryNumberRange=e.secondarySelectionRules.map((t=>t.selectionCount)),this.secondaryMaximumAllowed=Math.max(...this.secondaryNumberRange),this.secondaryMinimumAllowed=Math.min(...this.secondaryNumberRange);for(let t=0;t<this.lineMultiplier;t++)this.toggleResetSelection(t);this.betTypeChange.emit({ticketId:this.ticketId,betType:e}),this.setLineMultiplier(this.boardsAllowed[0])}render(){if(this.isLoading)return s("div",null,s("p",null,ec("loading",this.language)));if(this.hasErrors)return s("div",null,s("p",null,ec("error",this.language)));{const{rules:t}=this.gameData;return s("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},s("p",{class:"TicketTitle"},this.gameData.name),s("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>s("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&s("div",null,s("label",{class:"Label"},ec("playType",this.language),": "),s("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&s("div",null,s("label",{class:"Label"},ec("lines",this.language),": "),s("div",{class:"WagerInput"},s("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},s("span",null,this.lineMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>s("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,i)=>s("div",null,s("div",{class:"TicketGridHeader"},s("div",null,ec("lineName",this.language),i+1),this.resetButton&&this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(i)},ec("resetButton",this.language))),this.autoPick&&!this.ticketDone[i]&&s("div",{class:"ButtonContainer"},s("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(i)},ec("autoButton",this.language)))),s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].selectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.maximumAllowed,"minimum-allowed":this.minimumAllowed,"number-range":JSON.stringify(this.numberRange),"high-number":t.boards[0].highNumber,"low-number":t.boards[0].lowNumber,"total-numbers":t.boards[0].highNumber-t.boards[0].lowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"mainSelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})),this.secondarySelectionAllowed&&s("div",{class:"SecondarySelectionWrapper"},s("div",{class:"TicketGridBullets"},s("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),s("lottery-grid",{"grid-index":i,"maximum-allowed":this.secondaryMaximumAllowed,"minimum-allowed":this.secondaryMinimumAllowed,"number-range":JSON.stringify(this.secondaryNumberRange),"high-number":t.boards[0].secondaryHighNumber,"low-number":t.boards[0].secondaryLowNumber,"total-numbers":t.boards[0].secondaryHighNumber-t.boards[0].secondaryLowNumber+1,selectable:!0,"reset-button":!0,"auto-pick":!0,"game-id":this.gameId,"ticket-id":this.ticketId,"partial-quickpick-available":this.partialQuickpickAvailable,language:this.language,"translation-url":this.translationUrl,"selection-type":"secondarySelection","client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource})))))),t.stakeMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ec("multiplier",this.language),": "),s("div",{class:"WagerInput"},t.stakeMultipliers.length>1?s("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},s("span",null,this.stakeMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>s("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&s("div",null,s("label",{class:"Label"},ec("numberOfDraws",this.language),": "),s("div",{class:"WagerInput"},t.durations.length>1?s("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},s("span",null,this.drawMultiplier),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.durations.map((t=>s("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):s("div",null,s("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),s("div",null,s("label",{class:"Label"},ec("wagerPerDraw",this.language),": "),s("div",{class:"WagerInput"},t.stakes.length>1?s("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},s("div",{class:"SelectButton",onClick:()=>this.toggleClass()},s("span",null,this.amountInfo.value," ",this.amountInfo.currency),s("span",{class:"SelectExpand"},"▼")),s("div",{class:"SelectContent"},s("ul",{class:"SelectOptions"},t.stakes.map((t=>s("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):s("div",null,s("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),s("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"],clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ic.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.TicketTitle{font-size:16px;font-weight:bold}.TicketTabs{display:flex;overflow:auto}.TicketTabs .TabButton{color:var(--emw--color-typography, #009993);margin:0 40px 10px 0;cursor:pointer}.TicketTabs .Active{border-bottom:1px solid var(--emw--color-typography, #009993)}.ButtonContainer{display:flex;justify-content:flex-end}.SecondarySelectionWrapper{margin-top:20px}.Label{margin-right:5px;position:relative;top:2px;font-size:14px;font-weight:lighter;color:var(--emw--button-text-color, #000)}input[type=number]{-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.NumberInput,.WagerInput{margin-top:10px;display:inline-flex;align-items:center}.NumberInput,.NumberInput *{box-sizing:border-box}.NumberInput button{cursor:pointer;outline:none;-webkit-appearance:none;border:none;align-items:center;justify-content:center;height:20px;position:relative}.NumberInput button:after{display:inline-block;position:absolute;transform:translate(-50%, -50%) rotate(180deg);align-items:center;text-align:center}.NumberInput button.Plus:after{transform:translate(-50%, -50%) rotate(0deg);width:30px;display:inline-flex;align-items:center;text-align:center}.NumberInput input[type=number],.WagerInput input[type=number]{max-width:50px;display:inline-flex;align-items:center;padding:4px 10px;text-align:center}.NumberInput input[type=number] .WagerInputTitle,.WagerInput input[type=number] .WagerInputTitle{font-size:14px;color:var(--emw--button-text-color, #000);padding:10px;margin-left:8px}.AutoButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;border:1px solid var(--emw--button-border-color, #00958f);background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0}.AutoButton:active{background:var(--emw--button-background-color, #00958f);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);padding:8px 20px;width:max-content;margin:5px 0;color:var(--emw--button-text-color, #000);font-size:12px;transition:all 0.2s linear;text-transform:uppercase;text-align:center;letter-spacing:0;background:var(--emw--color-error, #FF3D00);border:1px solid var(--emw--color-error, #FF3D00);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.ResetButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}.TicketGridHeader{display:flex;justify-content:space-between;align-items:center;font-weight:bold;margin-top:10px}.TicketGridBullets{background:var(--emw--color-gray-50, #F1F1F1);border-radius:4px;padding:20px;margin-top:5px;margin-bottom:10px}.TicketGridBullets .TicketGridTitle{margin-top:0px}.Minus{border-radius:4px;width:30px;height:24px !important;margin-right:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.Plus{border-radius:4px;width:30px;height:24px !important;margin-left:10px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));background:var(--emw--color-background, #009993)}.SelectWrapper{width:auto;padding:5px;margin:0 auto;border:1px solid var(--emw--color-gray-transparency-80, #ccc);border-radius:5px;position:relative}.SelectButton,.SelectOptions li{display:flex;align-items:center;cursor:pointer}.SelectButton{display:flex;padding:0 5px;border-radius:7px;align-items:center;justify-content:space-between;font-size:14px}.SelectButton span:first-child{padding-right:10px}.SelectExpand{transition:transform 0.3s linear;font-size:12px}.SelectActive .SelectExpand{transform:rotate(180deg)}.SelectContent{display:none;padding:5px;border-radius:7px}.SelectWrapper.SelectActive .SelectContent{width:100%;display:block;position:absolute;left:0;top:32px;padding:0;border:1px solid var(--emw--color-gray-transparency-80, #ccc);overflow:hidden;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));z-index:20}.SelectContent .SelectOptions{max-height:100px;margin:0;overflow-y:auto;padding:0}.SelectContent .SelectOptions .SelectedValue{background-color:var(--emw--color-background, #009993);color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255))}.SelectOptions::-webkit-scrollbar{width:7px}.SelectOptions::-webkit-scrollbar-track{background:var(--emw--color-gray-50, #F1F1F1);border-radius:25px}.SelectOptions::-webkit-scrollbar-thumb{background:var(--emw--color-gray-transparency-80, #ccc);border-radius:25px}.SelectOptions li{height:20px;padding:0 13px;font-size:14px}.SelectOptions li:hover{background:var(--emw--color-gray-150, #f2f2f2)}';const sc=["ro","en","fr","ar","hr"],oc={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},rc=(t,e)=>{const i=e;return oc[void 0!==i&&sc.includes(i)?i:"en"][t]},ac=class{constructor(i){t(this,i),this.deleteTicketEvent=e(this,"deleteTicket",7),this.endpoint="",this.ticketId=1,this.ticketDescription=void 0,this.gameId=void 0,this.postMessage=!1,this.eventName="deleteTicketAction",this.collapsed=!0,this.numberOfGrids=1,this.last=!1,this.language="en",this.autoPick=!1,this.resetButton=!1,this.totalControllers=1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl=void 0}helperAccordionActionHandler(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.deleteTicketEvent.emit({ticketId:this.ticketId})}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])oc[e][i]=t[e][i]})))}handleClientStylingChange(t,e){t!=e&&r(this.stylingContainer,this.clientStyling)}handleClientStylingUrlChange(t,e){t!=e&&a(this.stylingContainer,this.clientStylingUrl)}handleMbSourceChange(t,e){t!=e&&n(this.stylingContainer,`${this.mbSource}.Style`)}componentDidLoad(){this.stylingContainer&&(this.mbSource&&n(this.stylingContainer,`${this.mbSource}.Style`),this.clientStyling&&r(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&a(this.stylingContainer,this.clientStylingUrl))}render(){return s("div",{key:"28756fcff01b738bfe8339114445032a5da757c2",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},s("helper-accordion",{key:"18a566d1c97ccbf74cd759215df3a18faf5c43dc","header-title":`${rc("ticket",this.language)} ${this.ticketId}`,"header-subtitle":this.ticketDescription,footer:!0,"delete-tab":1!==this.totalControllers,collapsed:!this.last||this.collapsed,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource},s("div",{key:"3a056f64dc8572b66f50cb151adde2caea2cd427",slot:"accordionContent"},s("lottery-ticket",{key:"06a0696b79840c05381429b1b87af94b478b09f0",endpoint:this.endpoint,"game-id":this.gameId,"ticket-id":this.ticketId,"number-of-grids":this.numberOfGrids,language:this.language,"translation-url":this.translationUrl,"reset-button":this.resetButton,"auto-pick":this.autoPick,"client-styling":this.clientStyling,"client-styling-url":this.clientStylingUrl,"mb-source":this.mbSource}))))}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"],mbSource:["handleMbSourceChange"]}}};ac.style=':host{font-family:"Roboto", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:0.8rem}*,*::before,*::after{margin:0;padding:0;list-style:none;outline:none;box-sizing:border-box}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}';export{l as general_multi_select,d as helper_accordion,bh as helper_filters,yh as helper_modal,Ch as helper_tab,Sh as helper_tabs,Th as lottery_bullet,zh as lottery_draw_results,Nh as lottery_draw_results_history,Oh as lottery_game_details,$h as lottery_game_page,Hh as lottery_grid,qh as lottery_pagination,Xh as lottery_subscription,ic as lottery_ticket,ac as lottery_ticket_controller}