@everymatrix/lottery-game-page 1.65.1 → 1.65.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/cjs/helper-accordion_15.cjs.entry.js +11054 -0
  2. package/dist/cjs/index-bc91a30a.js +2 -2
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/lottery-game-page.cjs.js +1 -1
  5. package/dist/collection/collection-manifest.json +6 -0
  6. package/dist/collection/components/lottery-game-page/lottery-game-page.js +187 -43
  7. package/dist/collection/utils/utils.js +22 -0
  8. package/dist/esm/helper-accordion_15.entry.js +11036 -0
  9. package/dist/esm/index-1df2d78b.js +2 -2
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/lottery-game-page.js +1 -1
  12. package/dist/lottery-game-page/lottery-game-page.esm.js +1 -1
  13. package/dist/lottery-game-page/p-b563cc44.entry.js +5614 -0
  14. package/dist/types/components/lottery-game-page/lottery-game-page.d.ts +18 -0
  15. package/dist/types/components.d.ts +8 -0
  16. package/dist/types/utils/utils.d.ts +1 -0
  17. package/package.json +1 -1
  18. package/dist/cjs/helper-accordion_14.cjs.entry.js +0 -29037
  19. package/dist/esm/helper-accordion_14.entry.js +0 -29020
  20. package/dist/lottery-game-page/p-d5801627.entry.js +0 -3899
  21. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  22. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.d.ts +0 -0
  23. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/stencil.config.dev.d.ts +0 -0
  24. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/storybook/main.d.ts +0 -0
  25. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/packages/stencil/lottery-game-page/storybook/preview.d.ts +0 -0
  26. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/index.d.ts +0 -0
  27. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  28. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  29. /package/dist/types/Users/{adrian.pripon/Documents/Work → raul.vasile/workspace/everymatrix}/widgets-monorepo/packages/stencil/lottery-game-page/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,3899 +0,0 @@
1
- import{r as t,c as e,h as i,g as s,a as r}from"./p-486d5a35.js";const o=["ro","en","hr"],a={en:{deleteTicket:"Delete ticket"},ro:{deleteTicket:"Sterge biletul"},fr:{deleteTicket:"Supprimer le billet"},ar:{deleteTicket:"حذف التذكرة"},hr:{deleteTicket:"Izbriši listić"}},n=class{constructor(i){t(this,i),this.accordionEvent=e(this,"helperAccordionAction",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.ticketHistoryFlag=!1,this.headerTitle="",this.headerSubtitle="",this.description="",this.footer=!1,this.deleteTab=!1,this.postMessage=!1,this.eventName="helperAccordionAction",this.collapsed=!0,this.language="en",this.clientStyling="",this.clientStylingUrlContent="",this.translationUrl=void 0,this.showContent=void 0,this.limitStylingAppends=!1}connectedCallback(){this.showContent=!this.collapsed}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])a[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}toggleContent(){this.showContent=!this.showContent}deleteAction(){this.postMessage&&window.postMessage({type:this.eventName},window.location.href),this.accordionEvent.emit()}render(){return i("div",{key:"2db19795aa22479f038d9fc7c936cf7403efa43e",class:"Wrapper",ref:t=>this.stylingContainer=t},i("div",{key:"6804e27dbd68e4f4182ab07beb665c53b54069b6",class:!0===this.ticketHistoryFlag?"HeaderTicketHistory":"Header",onClick:()=>this.toggleContent()},i("p",{key:"d1293990d39da1f50d36dff28e1abbe53259356b",class:"Title"},this.headerTitle),i("p",{key:"7632e3ddda5dea8e91d8a3935ff46c0f357c4397",class:"Subtitle"},this.headerSubtitle),i("p",{key:"1ab0dd4cc2625ef20c858738ee290e922e37dd21",class:"Subtitle Description"},this.description),i("span",{key:"3c7e3d3092aa97d24f62383e17a8a91646a78058",class:"Expand"},this.showContent?"<":">")),this.showContent&&i("div",{key:"ba970b8947e1986aedbdfd37b044e05f2b1c29fc"},i("div",{key:"7cfc0ca2b99d76d7647569f7105c29d1be8cf994",class:"Content"},i("slot",{key:"a2d866a914d33eac26b3b7e138e611be9f942c65",name:"accordionContent"}),this.footer&&this.showContent&&i("div",{key:"c44d54e98f712c921e7dd16faaaaa7cfb92e17c4"},this.deleteTab&&i("span",{key:"8c46aa94fcce959f370d07da69bd58509c143373",class:"ActionButton",onClick:()=>this.deleteAction()},(()=>{const t=this.language;return a[void 0!==t&&o.includes(t)?t:"en"].deleteTicket})())))))}};n.style='@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@100&display=swap");:host{display:block;font-family:"Roboto", sans-serif}.Header{border-radius:5px;background:var(--emw--color-background, #009993);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:1px;cursor:pointer}.Header:hover{background:var(--emw--color-background-secondary, #00ABA4)}.Header .Title,.Header .Subtitle,.Header .Description{margin:0;font-size:14px;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));text-transform:capitalize}.Header .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.HeaderTicketHistory{border-radius:4px;background:var(--emw--color-gray-50, #F1F1F1);display:flex;gap:30px;border:1px solid var(--emw--color-typography, #009993);padding:8px 10px;user-select:none;margin-bottom:5px;cursor:pointer}.HeaderTicketHistory:hover{background:var(--emw--color-secondary, #00ABA4)}.HeaderTicketHistory .Title,.HeaderTicketHistory .Subtitle,.HeaderTicketHistory .Description{margin:0;font-size:14px;color:var(--emw--button-text-color, #000)}.HeaderTicketHistory .Expand{margin-left:auto;color:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));width:17px;height:17px;cursor:pointer;text-align:center;transform:rotate(90deg);font-size:20px;user-select:none}.Content{border-radius:0 0 4px 4px;background:var(--emw--color-gray-transparency-100, rgb(255, 255, 255));border:1px solid var(--emw--button-border-color, #009993);padding:10px 15px;user-select:none;color:var(--emw--button-text-color, #000);margin-bottom:10px}.ActionButton{cursor:pointer;display:inline-block;border-radius:var(--emw--button-border-radius, 4px);margin:20px 0 10px;text-transform:uppercase;font-size:12px;text-align:center;padding:8px 20px;min-width:80px;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))}.ActionButton:hover{background:var(--emw--color-secondary, #FF6536);border:1px solid var(--emw--color-error, #FF3D00)}';const l=["ro","en","hr"],h={en:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ro:{filterOpen:"Filtrare",filterClear:"Stergere",filterModalTicketTitle:"Rezultatele biletelor",filterModalDrawTitle:"Rezultatele draw-urilor",filterTicketPlaceholder:"Cauta ID bilet",filterDrawPlaceholder:"Cauta ID draw",filterModalButton:"Cauta",filterOrDate:"sau cauta dupa data"},fr:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},ar:{filterOpen:"Filter",filterClear:"Clear",filterModalTicketTitle:"Ticket Results",filterModalDrawTitle:"Draws Results History",filterTicketPlaceholder:"Search for a ticket ID",filterDrawPlaceholder:"Search for a draw ID",filterModalButton:"Search",filterFromCalendar:"From",filterToCalendar:"To",filterOrDate:"or search by date"},hr:{filterOpen:"Filter",filterClear:"Očisti",filterModalTicketTitle:"Rezultati listića",filterModalDrawTitle:"Povijest rezultata Izvlačenja",filterTicketPlaceholder:"Pretraga ID listića",filterDrawPlaceholder:"Pretraga ID izvlačenja",filterModalButton:"Traži",filterFromCalendar:"Od",filterToCalendar:"Do",filterOrDate:"ili tražite po datumu"}},c=(t,e)=>{const i=e;return h[void 0!==i&&l.includes(i)?i:"en"][t]};
2
- /**
3
- * @license
4
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
5
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
6
- */
7
- function d(t,e="24.5.12"){Object.defineProperty(t,"version",{get:()=>e});const i=customElements.get(t.is);if(i){const e=i.version;e&&t.version&&e===t.version?console.warn(`The component ${t.is} has been loaded twice`):console.error(`Tried to define ${t.is} version ${t.version} when version ${i.version} is already in use. Something will probably break.`)}else customElements.define(t.is,t)}
8
- /**
9
- * @license
10
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
11
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
12
- */class u extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}d(u);
13
- /**
14
- * @license
15
- * Copyright 2019 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */
18
- const p=globalThis,m=p.ShadowRoot&&(void 0===p.ShadyCSS||p.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,f=Symbol(),b=new WeakMap;class v{constructor(t,e,i){if(this._$cssResult$=!0,i!==f)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(m&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=b.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&b.set(e,t))}return t}toString(){return this.cssText}}const g=(t,...e)=>{const i=1===t.length?t[0]:e.reduce(((e,i,s)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[s+1]),t[0]);return new v(i,t,f)},y=(t,e)=>{if(m)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=p.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},w=m?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new v("string"==typeof t?t:t+"",void 0,f))(e)})(t):t
19
- /**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */,{is:x,defineProperty:k,getOwnPropertyDescriptor:_,getOwnPropertyNames:C,getOwnPropertySymbols:D,getPrototypeOf:A}=Object,T=globalThis,S=T.trustedTypes,z=S?S.emptyScript:"",B=T.reactiveElementPolyfillSupport,P={toAttribute(t,e){switch(e){case Boolean:t=t?z: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}},N=(t,e)=>!x(t,e),I={attribute:!0,type:String,converter:P,reflect:!1,hasChanged:N};Symbol.metadata??=Symbol("metadata"),T.litPropertyMetadata??=new WeakMap;class M extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=I){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),s=this.getPropertyDescriptor(t,i,e);void 0!==s&&k(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:r}=_(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const o=s?.call(this);r.call(this,e),this.requestUpdate(t,o,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??I}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=A(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=[...C(t),...D(t)];for(const i of e)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,i]of e)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const i=this._$Eu(t,e);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const t of i)e.unshift(w(t))}else void 0!==t&&e.push(w(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(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.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(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return y(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){const i=this.constructor.elementProperties.get(t),s=this.constructor._$Eu(t,i);if(void 0!==s&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:P).toAttribute(e,i.type);this._$Em=t,null==r?this.removeAttribute(s):this.setAttribute(s,r),this._$Em=null}}_$AK(t,e){const i=this.constructor,s=i._$Eh.get(t);if(void 0!==s&&this._$Em!==s){const t=i.getPropertyOptions(s),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:P;this._$Em=s,this[s]=r.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??N)(this[t],e))return;this.P(t,e,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,e,i){this._$AL.has(t)||this._$AL.set(t,e),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,i]of t)!0!==i.wrapped||this._$AL.has(e)||void 0===this[e]||this.P(e,this[e],i)}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(e)):this._$EU()}catch(e){throw t=!1,this._$EU(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}M.elementStyles=[],M.shadowRootOptions={mode:"open"},M.elementProperties=new Map,M.finalized=new Map,B?.({ReactiveElement:M}),(T.reactiveElementVersions??=[]).push("2.0.4");
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- const O=globalThis,F=O.trustedTypes,E=F?F.createPolicy("lit-html",{createHTML:t=>t}):void 0,R="$lit$",j=`lit$${Math.random().toFixed(9).slice(2)}$`,W="?"+j,L=`<${W}>`,H=document,G=()=>H.createComment(""),$=t=>null===t||"object"!=typeof t&&"function"!=typeof t,U=Array.isArray,q="[ \t\n\f\r]",V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y=/-->/g,J=/>/g,K=RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Z=/'/g,Q=/"/g,X=/^(?:script|style|textarea|title)$/i,tt=Symbol.for("lit-noChange"),et=Symbol.for("lit-nothing"),it=new WeakMap,st=H.createTreeWalker(H,129);function rt(t,e){if(!U(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==E?E.createHTML(e):e}const ot=(t,e)=>{const i=t.length-1,s=[];let r,o=2===e?"<svg>":3===e?"<math>":"",a=V;for(let e=0;e<i;e++){const i=t[e];let n,l,h=-1,c=0;for(;c<i.length&&(a.lastIndex=c,l=a.exec(i),null!==l);)c=a.lastIndex,a===V?"!--"===l[1]?a=Y:void 0!==l[1]?a=J:void 0!==l[2]?(X.test(l[2])&&(r=RegExp("</"+l[2],"g")),a=K):void 0!==l[3]&&(a=K):a===K?">"===l[0]?(a=r??V,h=-1):void 0===l[1]?h=-2:(h=a.lastIndex-l[2].length,n=l[1],a=void 0===l[3]?K:'"'===l[3]?Q:Z):a===Q||a===Z?a=K:a===Y||a===J?a=V:(a=K,r=void 0);const d=a===K&&t[e+1].startsWith("/>")?" ":"";o+=a===V?i+L:h>=0?(s.push(n),i.slice(0,h)+R+i.slice(h)+j+d):i+j+(-2===h?e:d)}return[rt(t,o+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class at{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let r=0,o=0;const a=t.length-1,n=this.parts,[l,h]=ot(t,e);if(this.el=at.createElement(l,i),st.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=st.nextNode())&&n.length<a;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(R)){const e=h[o++],i=s.getAttribute(t).split(j),a=/([.?@])?(.*)/.exec(e);n.push({type:1,index:r,name:a[2],strings:i,ctor:"."===a[1]?dt:"?"===a[1]?ut:"@"===a[1]?pt:ct}),s.removeAttribute(t)}else t.startsWith(j)&&(n.push({type:6,index:r}),s.removeAttribute(t));if(X.test(s.tagName)){const t=s.textContent.split(j),e=t.length-1;if(e>0){s.textContent=F?F.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],G()),st.nextNode(),n.push({type:2,index:++r});s.append(t[e],G())}}}else if(8===s.nodeType)if(s.data===W)n.push({type:2,index:r});else{let t=-1;for(;-1!==(t=s.data.indexOf(j,t+1));)n.push({type:7,index:r}),t+=j.length-1}r++}}static createElement(t,e){const i=H.createElement("template");return i.innerHTML=t,i}}function nt(t,e,i=t,s){if(e===tt)return e;let r=void 0!==s?i._$Co?.[s]:i._$Cl;const o=$(e)?void 0:e._$litDirective$;return r?.constructor!==o&&(r?._$AO?.(!1),void 0===o?r=void 0:(r=new o(t),r._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=r:i._$Cl=r),void 0!==r&&(e=nt(t,r._$AS(t,e.values),r,s)),e}class lt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:i}=this._$AD,s=(t?.creationScope??H).importNode(e,!0);st.currentNode=s;let r=st.nextNode(),o=0,a=0,n=i[0];for(;void 0!==n;){if(o===n.index){let e;2===n.type?e=new ht(r,r.nextSibling,this,t):1===n.type?e=new n.ctor(r,n.name,n.strings,this,t):6===n.type&&(e=new mt(r,this,t)),this._$AV.push(e),n=i[++a]}o!==n?.index&&(r=st.nextNode(),o++)}return st.currentNode=H,s}p(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class ht{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=et,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=s,this._$Cv=s?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=nt(this,t,e),$(t)?t===et||null==t||""===t?(this._$AH!==et&&this._$AR(),this._$AH=et):t!==this._$AH&&t!==tt&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>U(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==et&&$(this._$AH)?this._$AA.nextSibling.data=t:this.T(H.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:i}=t,s="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=at.createElement(rt(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new lt(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=it.get(t.strings);return void 0===e&&it.set(t.strings,e=new at(t)),e}k(t){U(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const r of t)s===e.length?e.push(i=new ht(this.O(G()),this.O(G()),this,this.options)):i=e[s],i._$AI(r),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class ct{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,r){this.type=1,this._$AH=et,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=r,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=et}_$AI(t,e=this,i,s){const r=this.strings;let o=!1;if(void 0===r)t=nt(this,t,e,0),o=!$(t)||t!==this._$AH&&t!==tt,o&&(this._$AH=t);else{const s=t;let a,n;for(t=r[0],a=0;a<r.length-1;a++)n=nt(this,s[i+a],e,a),n===tt&&(n=this._$AH[a]),o||=!$(n)||n!==this._$AH[a],n===et?t=et:t!==et&&(t+=(n??"")+r[a+1]),this._$AH[a]=n}o&&!s&&this.j(t)}j(t){t===et?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class dt extends ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===et?void 0:t}}class ut extends ct{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==et)}}class pt extends ct{constructor(t,e,i,s,r){super(t,e,i,s,r),this.type=5}_$AI(t,e=this){if((t=nt(this,t,e,0)??et)===tt)return;const i=this._$AH,s=t===et&&i!==et||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==et&&(i===et||s);s&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class mt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){nt(this,t)}}const ft=O.litHtmlPolyfillSupport;ft?.(at,ht),(O.litHtmlVersions??=[]).push("3.2.1");
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */
35
- class bt extends M{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{const s=i?.renderBefore??e;let r=s._$litPart$;if(void 0===r){const t=i?.renderBefore??null;s._$litPart$=r=new ht(e.insertBefore(G(),t),t,void 0,i??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tt}}bt._$litElement$=!0,bt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:bt});const vt=globalThis.litElementPolyfillSupport;vt?.({LitElement:bt}),(globalThis.litElementVersions??=[]).push("4.1.1");
36
- /**
37
- * @license
38
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
39
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
40
- */
41
- const gt=t=>class extends t{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,e,i){super.attributeChangedCallback(t,e,i),"theme"===t&&this._set_theme(i)}}
42
- /**
43
- * @license
44
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
45
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
46
- */,yt=[],wt=new Set,xt=new Set;function kt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function _t(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function Ct(t){return t.map((t=>t.cssText)).join("\n")}const Dt="vaadin-themable-mixin-style";function At(t){t.prototype instanceof bt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(Dt).textContent=Ct(t.getStylesForThis()),xt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&At(i)}))}function Tt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof v||(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):yt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&xt.forEach((i=>{if(_t(t,i)&&function(t){return kt(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}`),At(t),function(t){wt.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof bt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),y(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(Dt).textContent=e.prototype._template.content.getElementById(Dt).textContent}(i):i||wt.delete(e)}))}(t)}}))}function St(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():yt}function zt(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Bt(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=St().find((e=>e.moduleId===t));i?e.push(...Bt(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Pt(t){const e=`${t}-default-theme`,i=St().filter((i=>i.moduleId!==e&&_t(i.themeFor,t))).map((t=>({...t,styles:[...Bt(t),...t.styles],includePriority:zt(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:St().filter((t=>t.moduleId===e))}const Nt=t=>class extends(gt(t)){constructor(){super(),wt.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&xt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!kt(this)&&function(t,e){const i=document.createElement("style");i.id=Dt,i.textContent=Ct(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:[])||[],...Pt(this.is)];const s=this.__themes.flatMap((t=>t.styles));return s.filter(((t,e)=>e===s.lastIndexOf(t)))}}
47
- /**
48
- * @license
49
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
50
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
51
- */,It=(t,...e)=>{((t,...e)=>{const i=document.createElement("style");i.id=t,i.textContent=e.map((t=>t.toString())).join("\n").replace(":host","html"),document.head.insertAdjacentElement("afterbegin",i)})(`lumo-${t}`,e)};It("sizing-props",g`
52
- :host {
53
- --lumo-size-xs: 1.625rem;
54
- --lumo-size-s: 1.875rem;
55
- --lumo-size-m: 2.25rem;
56
- --lumo-size-l: 2.75rem;
57
- --lumo-size-xl: 3.5rem;
58
-
59
- /* Icons */
60
- --lumo-icon-size-s: 1.25em;
61
- --lumo-icon-size-m: 1.5em;
62
- --lumo-icon-size-l: 2.25em;
63
- /* For backwards compatibility */
64
- --lumo-icon-size: var(--lumo-icon-size-m);
65
- }
66
- `),It("spacing-props",g`
67
- :host {
68
- /* Square */
69
- --lumo-space-xs: 0.25rem;
70
- --lumo-space-s: 0.5rem;
71
- --lumo-space-m: 1rem;
72
- --lumo-space-l: 1.5rem;
73
- --lumo-space-xl: 2.5rem;
74
-
75
- /* Wide */
76
- --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
77
- --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
78
- --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
79
- --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
80
- --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);
81
-
82
- /* Tall */
83
- --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
84
- --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
85
- --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
86
- --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
87
- --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
88
- }
89
- `),g`
90
- html {
91
- /* Button */
92
- --vaadin-button-background: var(--lumo-contrast-5pct);
93
- --vaadin-button-border: none;
94
- --vaadin-button-border-radius: var(--lumo-border-radius-m);
95
- --vaadin-button-font-size: var(--lumo-font-size-m);
96
- --vaadin-button-font-weight: 500;
97
- --vaadin-button-height: var(--lumo-size-m);
98
- --vaadin-button-margin: var(--lumo-space-xs) 0;
99
- --vaadin-button-min-width: calc(var(--vaadin-button-height) * 2);
100
- --vaadin-button-padding: 0 calc(var(--vaadin-button-height) / 3 + var(--lumo-border-radius-m) / 2);
101
- --vaadin-button-text-color: var(--lumo-primary-text-color);
102
- --vaadin-button-primary-background: var(--lumo-primary-color);
103
- --vaadin-button-primary-border: none;
104
- --vaadin-button-primary-font-weight: 600;
105
- --vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
106
- --vaadin-button-tertiary-background: transparent !important;
107
- --vaadin-button-tertiary-text-color: var(--lumo-primary-text-color);
108
- --vaadin-button-tertiary-font-weight: 500;
109
- --vaadin-button-tertiary-padding: 0 calc(var(--vaadin-button-height) / 6);
110
- /* Checkbox */
111
- --vaadin-checkbox-background: var(--lumo-contrast-20pct);
112
- --vaadin-checkbox-background-hover: var(--lumo-contrast-30pct);
113
- --vaadin-checkbox-border-radius: var(--lumo-border-radius-s);
114
- --vaadin-checkbox-checkmark-char: var(--lumo-icons-checkmark);
115
- --vaadin-checkbox-checkmark-char-indeterminate: '';
116
- --vaadin-checkbox-checkmark-color: var(--lumo-primary-contrast-color);
117
- --vaadin-checkbox-checkmark-size: calc(var(--vaadin-checkbox-size) + 2px);
118
- --vaadin-checkbox-label-color: var(--lumo-body-text-color);
119
- --vaadin-checkbox-label-font-size: var(--lumo-font-size-m);
120
- --vaadin-checkbox-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs);
121
- --vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
122
- --vaadin-checkbox-disabled-checkmark-color: var(--lumo-contrast-30pct);
123
- --vaadin-checkbox-disabled-background: var(--lumo-contrast-10pct);
124
- /* Radio button */
125
- --vaadin-radio-button-background: var(--lumo-contrast-20pct);
126
- --vaadin-radio-button-background-hover: var(--lumo-contrast-30pct);
127
- --vaadin-radio-button-dot-color: var(--lumo-primary-contrast-color);
128
- --vaadin-radio-button-dot-size: 3px;
129
- --vaadin-radio-button-label-color: var(--lumo-body-text-color);
130
- --vaadin-radio-button-label-font-size: var(--lumo-font-size-m);
131
- --vaadin-radio-button-label-padding: var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs)
132
- var(--lumo-space-xs);
133
- --vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
134
- --vaadin-radio-button-disabled-background: var(--lumo-contrast-10pct);
135
- --vaadin-radio-button-disabled-dot-color: var(--lumo-contrast-30pct);
136
- --vaadin-selection-color: var(--lumo-primary-color);
137
- --vaadin-selection-color-text: var(--lumo-primary-text-color);
138
- --vaadin-input-field-border-radius: var(--lumo-border-radius-m);
139
- --vaadin-focus-ring-color: var(--lumo-primary-color-50pct);
140
- --vaadin-focus-ring-width: 2px;
141
- /* Label */
142
- --vaadin-input-field-label-color: var(--lumo-secondary-text-color);
143
- --vaadin-input-field-focused-label-color: var(--lumo-primary-text-color);
144
- --vaadin-input-field-hovered-label-color: var(--lumo-body-text-color);
145
- --vaadin-input-field-label-font-size: var(--lumo-font-size-s);
146
- --vaadin-input-field-label-font-weight: 500;
147
- /* Helper */
148
- --vaadin-input-field-helper-color: var(--lumo-secondary-text-color);
149
- --vaadin-input-field-helper-font-size: var(--lumo-font-size-xs);
150
- --vaadin-input-field-helper-font-weight: 400;
151
- --vaadin-input-field-helper-spacing: 0.4em;
152
- /* Error message */
153
- --vaadin-input-field-error-color: var(--lumo-error-text-color);
154
- --vaadin-input-field-error-font-size: var(--lumo-font-size-xs);
155
- --vaadin-input-field-error-font-weight: 400;
156
- /* Input field */
157
- --vaadin-input-field-background: var(--lumo-contrast-10pct);
158
- --vaadin-input-field-icon-color: var(--lumo-contrast-60pct);
159
- --vaadin-input-field-icon-size: var(--lumo-icon-size-m);
160
- --vaadin-input-field-invalid-background: var(--lumo-error-color-10pct);
161
- --vaadin-input-field-invalid-hover-highlight: var(--lumo-error-color-50pct);
162
- --vaadin-input-field-disabled-background: var(--lumo-contrast-5pct);
163
- --vaadin-input-field-disabled-value-color: var(--lumo-disabled-text-color);
164
- --vaadin-input-field-height: var(--lumo-size-m);
165
- --vaadin-input-field-hover-highlight: var(--lumo-contrast-50pct);
166
- --vaadin-input-field-placeholder-color: var(--lumo-secondary-text-color);
167
- --vaadin-input-field-readonly-border: 1px dashed var(--lumo-contrast-30pct);
168
- --vaadin-input-field-value-color: var(--lumo-body-text-color);
169
- --vaadin-input-field-value-font-size: var(--lumo-font-size-m);
170
- --vaadin-input-field-value-font-weight: 500;
171
- }
172
- `,It("style-props",g`
173
- :host {
174
- /* Border radius */
175
- --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
176
- --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
177
- --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
178
-
179
- /* Shadow */
180
- --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
181
- --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
182
- --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
183
- --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
184
- --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
185
-
186
- /* Clickable element cursor */
187
- --lumo-clickable-cursor: default;
188
- }
189
- `),It("color-props",g`
190
- :host {
191
- /* Base (background) */
192
- --lumo-base-color: #fff;
193
-
194
- /* Tint */
195
- --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
196
- --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
197
- --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
198
- --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
199
- --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
200
- --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
201
- --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
202
- --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
203
- --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
204
- --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
205
- --lumo-tint: #fff;
206
-
207
- /* Shade */
208
- --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
209
- --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
210
- --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
211
- --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
212
- --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
213
- --lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
214
- --lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
215
- --lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
216
- --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
217
- --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
218
- --lumo-shade: hsl(214, 35%, 15%);
219
-
220
- /* Contrast */
221
- --lumo-contrast-5pct: var(--lumo-shade-5pct);
222
- --lumo-contrast-10pct: var(--lumo-shade-10pct);
223
- --lumo-contrast-20pct: var(--lumo-shade-20pct);
224
- --lumo-contrast-30pct: var(--lumo-shade-30pct);
225
- --lumo-contrast-40pct: var(--lumo-shade-40pct);
226
- --lumo-contrast-50pct: var(--lumo-shade-50pct);
227
- --lumo-contrast-60pct: var(--lumo-shade-60pct);
228
- --lumo-contrast-70pct: var(--lumo-shade-70pct);
229
- --lumo-contrast-80pct: var(--lumo-shade-80pct);
230
- --lumo-contrast-90pct: var(--lumo-shade-90pct);
231
- --lumo-contrast: var(--lumo-shade);
232
-
233
- /* Text */
234
- --lumo-header-text-color: var(--lumo-contrast);
235
- --lumo-body-text-color: var(--lumo-contrast-90pct);
236
- --lumo-secondary-text-color: var(--lumo-contrast-70pct);
237
- --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
238
- --lumo-disabled-text-color: var(--lumo-contrast-30pct);
239
-
240
- /* Primary */
241
- --lumo-primary-color: hsl(214, 100%, 48%);
242
- --lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
243
- --lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
244
- --lumo-primary-text-color: hsl(214, 100%, 43%);
245
- --lumo-primary-contrast-color: #fff;
246
-
247
- /* Error */
248
- --lumo-error-color: hsl(3, 85%, 48%);
249
- --lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
250
- --lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
251
- --lumo-error-text-color: hsl(3, 89%, 42%);
252
- --lumo-error-contrast-color: #fff;
253
-
254
- /* Success */
255
- --lumo-success-color: hsl(145, 72%, 30%);
256
- --lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
257
- --lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
258
- --lumo-success-text-color: hsl(145, 85%, 25%);
259
- --lumo-success-contrast-color: #fff;
260
-
261
- /* Warning */
262
- --lumo-warning-color: hsl(48, 100%, 50%);
263
- --lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
264
- --lumo-warning-text-color: hsl(32, 100%, 30%);
265
- --lumo-warning-contrast-color: var(--lumo-shade-90pct);
266
- }
267
-
268
- /* forced-colors mode adjustments */
269
- @media (forced-colors: active) {
270
- html {
271
- --lumo-disabled-text-color: GrayText;
272
- }
273
- }
274
- `),Tt("",g`
275
- [theme~='dark'] {
276
- /* Base (background) */
277
- --lumo-base-color: hsl(214, 35%, 21%);
278
-
279
- /* Tint */
280
- --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
281
- --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
282
- --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
283
- --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
284
- --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
285
- --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
286
- --lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
287
- --lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
288
- --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
289
- --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
290
- --lumo-tint: hsl(214, 100%, 98%);
291
-
292
- /* Shade */
293
- --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
294
- --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
295
- --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
296
- --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
297
- --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
298
- --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
299
- --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
300
- --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
301
- --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
302
- --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
303
- --lumo-shade: hsl(214, 33%, 13%);
304
-
305
- /* Contrast */
306
- --lumo-contrast-5pct: var(--lumo-tint-5pct);
307
- --lumo-contrast-10pct: var(--lumo-tint-10pct);
308
- --lumo-contrast-20pct: var(--lumo-tint-20pct);
309
- --lumo-contrast-30pct: var(--lumo-tint-30pct);
310
- --lumo-contrast-40pct: var(--lumo-tint-40pct);
311
- --lumo-contrast-50pct: var(--lumo-tint-50pct);
312
- --lumo-contrast-60pct: var(--lumo-tint-60pct);
313
- --lumo-contrast-70pct: var(--lumo-tint-70pct);
314
- --lumo-contrast-80pct: var(--lumo-tint-80pct);
315
- --lumo-contrast-90pct: var(--lumo-tint-90pct);
316
- --lumo-contrast: var(--lumo-tint);
317
-
318
- /* Text */
319
- --lumo-header-text-color: var(--lumo-contrast);
320
- --lumo-body-text-color: var(--lumo-contrast-90pct);
321
- --lumo-secondary-text-color: var(--lumo-contrast-70pct);
322
- --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
323
- --lumo-disabled-text-color: var(--lumo-contrast-30pct);
324
-
325
- /* Primary */
326
- --lumo-primary-color: hsl(214, 90%, 48%);
327
- --lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
328
- --lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
329
- --lumo-primary-text-color: hsl(214, 90%, 77%);
330
- --lumo-primary-contrast-color: #fff;
331
-
332
- /* Error */
333
- --lumo-error-color: hsl(3, 79%, 49%);
334
- --lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
335
- --lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
336
- --lumo-error-text-color: hsl(3, 100%, 80%);
337
-
338
- /* Success */
339
- --lumo-success-color: hsl(145, 72%, 30%);
340
- --lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
341
- --lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
342
- --lumo-success-text-color: hsl(145, 85%, 46%);
343
-
344
- /* Warning */
345
- --lumo-warning-color: hsl(43, 100%, 48%);
346
- --lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
347
- --lumo-warning-text-color: hsl(45, 100%, 60%);
348
- --lumo-warning-contrast-color: var(--lumo-shade-90pct);
349
- }
350
-
351
- html {
352
- color: var(--lumo-body-text-color);
353
- background-color: var(--lumo-base-color);
354
- color-scheme: light;
355
- }
356
-
357
- [theme~='dark'] {
358
- color: var(--lumo-body-text-color);
359
- background-color: var(--lumo-base-color);
360
- color-scheme: dark;
361
- }
362
-
363
- h1,
364
- h2,
365
- h3,
366
- h4,
367
- h5,
368
- h6 {
369
- color: var(--lumo-header-text-color);
370
- }
371
-
372
- a:where(:any-link) {
373
- color: var(--lumo-primary-text-color);
374
- }
375
-
376
- a:not(:any-link) {
377
- color: var(--lumo-disabled-text-color);
378
- }
379
-
380
- blockquote {
381
- color: var(--lumo-secondary-text-color);
382
- }
383
-
384
- code,
385
- pre {
386
- background-color: var(--lumo-contrast-10pct);
387
- border-radius: var(--lumo-border-radius-m);
388
- }
389
- pre code {
390
- background: transparent;
391
- }
392
- `,{moduleId:"lumo-color"});
393
- /**
394
- * @license
395
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
396
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
397
- */
398
- const Mt=g`
399
- :host {
400
- /* prettier-ignore */
401
- --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
402
-
403
- /* Font sizes */
404
- --lumo-font-size-xxs: 0.75rem;
405
- --lumo-font-size-xs: 0.8125rem;
406
- --lumo-font-size-s: 0.875rem;
407
- --lumo-font-size-m: 1rem;
408
- --lumo-font-size-l: 1.125rem;
409
- --lumo-font-size-xl: 1.375rem;
410
- --lumo-font-size-xxl: 1.75rem;
411
- --lumo-font-size-xxxl: 2.5rem;
412
-
413
- /* Line heights */
414
- --lumo-line-height-xs: 1.25;
415
- --lumo-line-height-s: 1.375;
416
- --lumo-line-height-m: 1.625;
417
- }
418
- `;Tt("",g`
419
- body,
420
- :host {
421
- font-family: var(--lumo-font-family);
422
- font-size: var(--lumo-font-size-m);
423
- line-height: var(--lumo-line-height-m);
424
- -webkit-text-size-adjust: 100%;
425
- -webkit-font-smoothing: antialiased;
426
- -moz-osx-font-smoothing: grayscale;
427
- }
428
-
429
- small,
430
- [theme~='font-size-s'] {
431
- font-size: var(--lumo-font-size-s);
432
- line-height: var(--lumo-line-height-s);
433
- }
434
-
435
- [theme~='font-size-xs'] {
436
- font-size: var(--lumo-font-size-xs);
437
- line-height: var(--lumo-line-height-xs);
438
- }
439
-
440
- :where(h1, h2, h3, h4, h5, h6) {
441
- font-weight: 600;
442
- line-height: var(--lumo-line-height-xs);
443
- margin-block: 0;
444
- }
445
-
446
- :where(h1) {
447
- font-size: var(--lumo-font-size-xxxl);
448
- }
449
-
450
- :where(h2) {
451
- font-size: var(--lumo-font-size-xxl);
452
- }
453
-
454
- :where(h3) {
455
- font-size: var(--lumo-font-size-xl);
456
- }
457
-
458
- :where(h4) {
459
- font-size: var(--lumo-font-size-l);
460
- }
461
-
462
- :where(h5) {
463
- font-size: var(--lumo-font-size-m);
464
- }
465
-
466
- :where(h6) {
467
- font-size: var(--lumo-font-size-xs);
468
- text-transform: uppercase;
469
- letter-spacing: 0.03em;
470
- }
471
-
472
- p,
473
- blockquote {
474
- margin-top: 0.5em;
475
- margin-bottom: 0.75em;
476
- }
477
-
478
- a {
479
- text-decoration: none;
480
- }
481
-
482
- a:where(:any-link):hover {
483
- text-decoration: underline;
484
- }
485
-
486
- hr {
487
- display: block;
488
- align-self: stretch;
489
- height: 1px;
490
- border: 0;
491
- padding: 0;
492
- margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
493
- background-color: var(--lumo-contrast-10pct);
494
- }
495
-
496
- blockquote {
497
- border-left: 2px solid var(--lumo-contrast-30pct);
498
- }
499
-
500
- b,
501
- strong {
502
- font-weight: 600;
503
- }
504
-
505
- /* RTL specific styles */
506
- blockquote[dir='rtl'] {
507
- border-left: none;
508
- border-right: 2px solid var(--lumo-contrast-30pct);
509
- }
510
- `,{moduleId:"lumo-typography"}),It("typography-props",Mt);
511
- /**
512
- * @license
513
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
514
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
515
- */
516
- const Ot=g`
517
- :host {
518
- top: var(--lumo-space-m);
519
- right: var(--lumo-space-m);
520
- bottom: var(--lumo-space-m);
521
- left: var(--lumo-space-m);
522
- /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */
523
- /* stylelint-disable-next-line */
524
- outline: 0px solid transparent;
525
- }
526
-
527
- [part='overlay'] {
528
- background-color: var(--lumo-base-color);
529
- background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
530
- border-radius: var(--lumo-border-radius-m);
531
- box-shadow:
532
- 0 0 0 1px var(--lumo-shade-5pct),
533
- var(--lumo-box-shadow-m);
534
- color: var(--lumo-body-text-color);
535
- font-family: var(--lumo-font-family);
536
- font-size: var(--lumo-font-size-m);
537
- font-weight: 400;
538
- line-height: var(--lumo-line-height-m);
539
- letter-spacing: 0;
540
- text-transform: none;
541
- -webkit-text-size-adjust: 100%;
542
- -webkit-font-smoothing: antialiased;
543
- -moz-osx-font-smoothing: grayscale;
544
- }
545
-
546
- [part='content'] {
547
- padding: var(--lumo-space-xs);
548
- }
549
-
550
- [part='backdrop'] {
551
- background-color: var(--lumo-shade-20pct);
552
- animation: 0.2s lumo-overlay-backdrop-enter both;
553
- will-change: opacity;
554
- }
555
-
556
- @keyframes lumo-overlay-backdrop-enter {
557
- 0% {
558
- opacity: 0;
559
- }
560
- }
561
-
562
- :host([closing]) [part='backdrop'] {
563
- animation: 0.2s lumo-overlay-backdrop-exit both;
564
- }
565
-
566
- @keyframes lumo-overlay-backdrop-exit {
567
- 100% {
568
- opacity: 0;
569
- }
570
- }
571
-
572
- @keyframes lumo-overlay-dummy-animation {
573
- 0% {
574
- opacity: 1;
575
- }
576
-
577
- 100% {
578
- opacity: 1;
579
- }
580
- }
581
- `;Tt("",Ot,{moduleId:"lumo-overlay"});
582
- /**
583
- * @license
584
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
585
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
586
- */
587
- const Ft=g`
588
- :host([opening]),
589
- :host([closing]) {
590
- animation: 0.14s lumo-overlay-dummy-animation;
591
- }
592
-
593
- [part='overlay'] {
594
- will-change: opacity, transform;
595
- }
596
-
597
- :host([opening]) [part='overlay'] {
598
- animation: 0.1s lumo-menu-overlay-enter ease-out both;
599
- }
600
-
601
- @keyframes lumo-menu-overlay-enter {
602
- 0% {
603
- opacity: 0;
604
- transform: translateY(-4px);
605
- }
606
- }
607
-
608
- :host([closing]) [part='overlay'] {
609
- animation: 0.1s lumo-menu-overlay-exit both;
610
- }
611
-
612
- @keyframes lumo-menu-overlay-exit {
613
- 100% {
614
- opacity: 0;
615
- }
616
- }
617
- `;Tt("",Ft,{moduleId:"lumo-menu-overlay-core"});const Et=[Ot,Ft,g`
618
- /* Small viewport (bottom sheet) styles */
619
- /* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
620
- @media (max-width: 450px), (max-height: 450px) {
621
- :host {
622
- top: 0 !important;
623
- right: 0 !important;
624
- bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
625
- left: 0 !important;
626
- align-items: stretch !important;
627
- justify-content: flex-end !important;
628
- }
629
-
630
- [part='overlay'] {
631
- max-height: 50vh;
632
- width: 100vw;
633
- border-radius: 0;
634
- box-shadow: var(--lumo-box-shadow-xl);
635
- }
636
-
637
- /* The content part scrolls instead of the overlay part, because of the gradient fade-out */
638
- [part='content'] {
639
- padding: 30px var(--lumo-space-m);
640
- max-height: inherit;
641
- box-sizing: border-box;
642
- -webkit-overflow-scrolling: touch;
643
- overflow: auto;
644
- -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
645
- mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);
646
- }
647
-
648
- [part='backdrop'] {
649
- display: block;
650
- }
651
-
652
- /* Animations */
653
-
654
- :host([opening]) [part='overlay'] {
655
- animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
656
- }
657
-
658
- :host([closing]),
659
- :host([closing]) [part='backdrop'] {
660
- animation-delay: 0.14s;
661
- }
662
-
663
- :host([closing]) [part='overlay'] {
664
- animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
665
- }
666
- }
667
-
668
- @keyframes lumo-mobile-menu-overlay-enter {
669
- 0% {
670
- transform: translateY(150%);
671
- }
672
- }
673
-
674
- @keyframes lumo-mobile-menu-overlay-exit {
675
- 100% {
676
- transform: translateY(150%);
677
- }
678
- }
679
- `];Tt("",Et,{moduleId:"lumo-menu-overlay"}),Tt("vaadin-date-picker-overlay",[Et,g`
680
- [part='overlay'] {
681
- /*
682
- Width:
683
- date cell widths
684
- + month calendar side padding
685
- + year scroller width
686
- */
687
- /* prettier-ignore */
688
- width:
689
- calc(
690
- var(--lumo-size-m) * 7
691
- + var(--lumo-space-xs) * 2
692
- + 57px
693
- );
694
- height: 100%;
695
- max-height: calc(var(--lumo-size-m) * 14);
696
- overflow: hidden;
697
- -webkit-tap-highlight-color: transparent;
698
- flex-direction: column;
699
- }
700
-
701
- [part='content'] {
702
- padding: 0;
703
- height: 100%;
704
- overflow: hidden;
705
- -webkit-mask-image: none;
706
- mask-image: none;
707
- }
708
-
709
- :host([top-aligned]) [part~='overlay'] {
710
- margin-top: var(--lumo-space-xs);
711
- }
712
-
713
- :host([bottom-aligned]) [part~='overlay'] {
714
- margin-bottom: var(--lumo-space-xs);
715
- }
716
-
717
- @media (max-width: 450px), (max-height: 450px) {
718
- [part='overlay'] {
719
- width: 100vw;
720
- height: 70vh;
721
- max-height: 70vh;
722
- }
723
- }
724
- `],{moduleId:"lumo-date-picker-overlay"}),Tt("vaadin-button",g`
725
- :host {
726
- /* Sizing */
727
- --lumo-button-size: var(--lumo-size-m);
728
- min-width: var(--vaadin-button-min-width, calc(var(--_button-size) * 2));
729
- height: var(--_button-size);
730
- padding: var(--vaadin-button-padding, 0 calc(var(--_button-size) / 3 + var(--lumo-border-radius-m) / 2));
731
- margin: var(--vaadin-button-margin, var(--lumo-space-xs) 0);
732
- box-sizing: border-box;
733
- /* Style */
734
- font-family: var(--lumo-font-family);
735
- font-size: var(--vaadin-button-font-size, var(--lumo-font-size-m));
736
- font-weight: var(--vaadin-button-font-weight, 500);
737
- color: var(--_lumo-button-text-color);
738
- background: var(--_lumo-button-background);
739
- border: var(--vaadin-button-border, none);
740
- border-radius: var(--vaadin-button-border-radius, var(--lumo-border-radius-m));
741
- cursor: var(--lumo-clickable-cursor);
742
- -webkit-tap-highlight-color: transparent;
743
- -webkit-font-smoothing: antialiased;
744
- -moz-osx-font-smoothing: grayscale;
745
- flex-shrink: 0;
746
- --_button-size: var(--vaadin-button-height, var(--lumo-button-size));
747
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
748
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
749
- /* Used by notification */
750
- --_lumo-button-background: var(--vaadin-button-background, var(--lumo-contrast-5pct));
751
- --_lumo-button-text-color: var(--vaadin-button-text-color, var(--lumo-primary-text-color));
752
- --_lumo-button-primary-background: var(--vaadin-button-primary-background, var(--lumo-primary-color));
753
- --_lumo-button-primary-text-color: var(--vaadin-button-primary-text-color, var(--lumo-primary-contrast-color));
754
- }
755
-
756
- /* Set only for the internal parts so we don't affect the host vertical alignment */
757
- [part='label'],
758
- [part='prefix'],
759
- [part='suffix'] {
760
- line-height: var(--lumo-line-height-xs);
761
- }
762
-
763
- [part='label'] {
764
- padding: calc(var(--lumo-button-size) / 6) 0;
765
- }
766
-
767
- :host([theme~='small']) {
768
- font-size: var(--lumo-font-size-s);
769
- --lumo-button-size: var(--lumo-size-s);
770
- }
771
-
772
- :host([theme~='large']) {
773
- font-size: var(--lumo-font-size-l);
774
- --lumo-button-size: var(--lumo-size-l);
775
- }
776
-
777
- /* For interaction states */
778
- :host::before,
779
- :host::after {
780
- content: '';
781
- /* We rely on the host always being relative */
782
- position: absolute;
783
- z-index: 1;
784
- inset: 0;
785
- background-color: currentColor;
786
- border-radius: inherit;
787
- opacity: 0;
788
- pointer-events: none;
789
- }
790
-
791
- /* Hover */
792
-
793
- @media (any-hover: hover) {
794
- :host(:hover)::before {
795
- opacity: 0.02;
796
- }
797
- }
798
-
799
- /* Active */
800
-
801
- :host::after {
802
- transition:
803
- opacity 1.4s,
804
- transform 0.1s;
805
- filter: blur(8px);
806
- }
807
-
808
- :host([active])::before {
809
- opacity: 0.05;
810
- transition-duration: 0s;
811
- }
812
-
813
- :host([active])::after {
814
- opacity: 0.1;
815
- transition-duration: 0s, 0s;
816
- transform: scale(0);
817
- }
818
-
819
- /* Keyboard focus */
820
-
821
- :host([focus-ring]) {
822
- box-shadow:
823
- 0 0 0 calc(1px * var(--_focus-ring-gap-on, 0)) var(--_focus-ring-gap-color, var(--lumo-base-color)),
824
- 0 0 0 calc(var(--_focus-ring-width) + 1px * var(--_focus-ring-gap-on, 0)) var(--_focus-ring-color);
825
- }
826
-
827
- :host([theme~='primary'][focus-ring]) {
828
- --_focus-ring-gap-on: 1;
829
- }
830
-
831
- /* Types (primary, tertiary, tertiary-inline */
832
-
833
- :host([theme~='tertiary']),
834
- :host([theme~='tertiary-inline']) {
835
- --_background: transparent !important;
836
- background: var(--vaadin-button-tertiary-background, var(--_background));
837
- min-width: 0;
838
- }
839
-
840
- :host([theme~='tertiary']) {
841
- border: var(--vaadin-button-tertiary-border, none);
842
- color: var(--vaadin-button-tertiary-text-color, var(--lumo-primary-text-color));
843
- font-weight: var(--vaadin-button-tertiary-font-weight, 500);
844
- padding: var(--vaadin-button-tertiary-padding, 0 calc(var(--_button-size) / 6));
845
- }
846
-
847
- :host([theme~='tertiary-inline'])::before {
848
- display: none;
849
- }
850
-
851
- :host([theme~='tertiary-inline']) {
852
- margin: 0;
853
- height: auto;
854
- padding: 0;
855
- line-height: inherit;
856
- font-size: inherit;
857
- }
858
-
859
- :host([theme~='tertiary-inline']) [part='label'] {
860
- padding: 0;
861
- overflow: visible;
862
- line-height: inherit;
863
- }
864
-
865
- :host([theme~='primary']) {
866
- background: var(--_lumo-button-primary-background);
867
- border: var(--vaadin-button-primary-border, none);
868
- color: var(--_lumo-button-primary-text-color);
869
- font-weight: var(--vaadin-button-primary-font-weight, 600);
870
- min-width: calc(var(--lumo-button-size) * 2.5);
871
- }
872
-
873
- :host([theme~='primary'])::before {
874
- background-color: black;
875
- }
876
-
877
- @media (any-hover: hover) {
878
- :host([theme~='primary']:hover)::before {
879
- opacity: 0.05;
880
- }
881
- }
882
-
883
- :host([theme~='primary'][active])::before {
884
- opacity: 0.1;
885
- }
886
-
887
- :host([theme~='primary'][active])::after {
888
- opacity: 0.2;
889
- }
890
-
891
- /* Colors (success, warning, error, contrast) */
892
-
893
- :host([theme~='success']) {
894
- color: var(--lumo-success-text-color);
895
- }
896
-
897
- :host([theme~='success'][theme~='primary']) {
898
- background-color: var(--lumo-success-color);
899
- color: var(--lumo-success-contrast-color);
900
- }
901
-
902
- :host([theme~='warning']) {
903
- color: var(--lumo-warning-text-color);
904
- }
905
-
906
- :host([theme~='warning'][theme~='primary']) {
907
- background-color: var(--lumo-warning-color);
908
- color: var(--lumo-warning-contrast-color);
909
- }
910
-
911
- :host([theme~='error']) {
912
- color: var(--lumo-error-text-color);
913
- }
914
-
915
- :host([theme~='error'][theme~='primary']) {
916
- background-color: var(--lumo-error-color);
917
- color: var(--lumo-error-contrast-color);
918
- }
919
-
920
- :host([theme~='contrast']) {
921
- color: var(--lumo-contrast);
922
- }
923
-
924
- :host([theme~='contrast'][theme~='primary']) {
925
- background-color: var(--lumo-contrast);
926
- color: var(--lumo-base-color);
927
- }
928
-
929
- /* Disabled state. Keep selectors after other color variants. */
930
-
931
- :host([disabled]) {
932
- pointer-events: none;
933
- color: var(--lumo-disabled-text-color);
934
- }
935
-
936
- :host([theme~='primary'][disabled]) {
937
- background-color: var(--lumo-contrast-30pct);
938
- color: var(--lumo-base-color);
939
- }
940
-
941
- :host([theme~='primary'][disabled]) [part] {
942
- opacity: 0.7;
943
- }
944
-
945
- /* Icons */
946
-
947
- [part] ::slotted(vaadin-icon) {
948
- display: inline-block;
949
- width: var(--lumo-icon-size-m);
950
- height: var(--lumo-icon-size-m);
951
- }
952
-
953
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
954
- [part] ::slotted(vaadin-icon[icon^='vaadin:']) {
955
- padding: 0.25em;
956
- box-sizing: border-box !important;
957
- }
958
-
959
- [part='prefix'] {
960
- margin-left: -0.25em;
961
- margin-right: 0.25em;
962
- }
963
-
964
- [part='suffix'] {
965
- margin-left: 0.25em;
966
- margin-right: -0.25em;
967
- }
968
-
969
- /* Icon-only */
970
-
971
- :host([theme~='icon']:not([theme~='tertiary-inline'])) {
972
- min-width: var(--lumo-button-size);
973
- padding-left: calc(var(--lumo-button-size) / 4);
974
- padding-right: calc(var(--lumo-button-size) / 4);
975
- }
976
-
977
- :host([theme~='icon']) [part='prefix'],
978
- :host([theme~='icon']) [part='suffix'] {
979
- margin-left: 0;
980
- margin-right: 0;
981
- }
982
-
983
- /* RTL specific styles */
984
-
985
- :host([dir='rtl']) [part='prefix'] {
986
- margin-left: 0.25em;
987
- margin-right: -0.25em;
988
- }
989
-
990
- :host([dir='rtl']) [part='suffix'] {
991
- margin-left: -0.25em;
992
- margin-right: 0.25em;
993
- }
994
-
995
- :host([dir='rtl'][theme~='icon']) [part='prefix'],
996
- :host([dir='rtl'][theme~='icon']) [part='suffix'] {
997
- margin-left: 0;
998
- margin-right: 0;
999
- }
1000
- `,{moduleId:"lumo-button"}),Tt("vaadin-date-picker-year",g`
1001
- :host([current]) [part='year-number'] {
1002
- color: var(--lumo-primary-text-color);
1003
- }
1004
-
1005
- :host(:not([current])) [part='year-number'],
1006
- [part='year-separator'] {
1007
- opacity: var(--_lumo-date-picker-year-opacity, 0.7);
1008
- transition: 0.2s opacity;
1009
- }
1010
-
1011
- [part='year-number'],
1012
- [part='year-separator'] {
1013
- display: flex;
1014
- align-items: center;
1015
- justify-content: center;
1016
- height: 50%;
1017
- transform: translateY(-50%);
1018
- }
1019
-
1020
- [part='year-separator']::after {
1021
- color: var(--lumo-disabled-text-color);
1022
- content: '\\2022';
1023
- }
1024
- `,{moduleId:"lumo-date-picker-year"}),Tt("vaadin-date-picker-overlay-content",g`
1025
- :host {
1026
- position: relative;
1027
- /* Background for the year scroller, placed here as we are using a mask image on the actual years part */
1028
- background-image: linear-gradient(var(--lumo-shade-5pct), var(--lumo-shade-5pct));
1029
- background-size: 57px 100%;
1030
- background-position: top right;
1031
- background-repeat: no-repeat;
1032
- cursor: default;
1033
- }
1034
-
1035
- ::slotted([slot='months']) {
1036
- /* Month calendar height:
1037
- header height + margin-bottom
1038
- + weekdays height + margin-bottom
1039
- + date cell heights
1040
- + small margin between month calendars
1041
- */
1042
- /* prettier-ignore */
1043
- --vaadin-infinite-scroller-item-height:
1044
- calc(
1045
- var(--lumo-font-size-l) + var(--lumo-space-m)
1046
- + var(--lumo-font-size-xs) + var(--lumo-space-s)
1047
- + var(--lumo-size-m) * 6
1048
- + var(--lumo-space-s)
1049
- );
1050
- --vaadin-infinite-scroller-buffer-offset: 10%;
1051
- -webkit-mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1052
- mask-image: linear-gradient(transparent, #000 10%, #000 85%, transparent);
1053
- position: relative;
1054
- margin-right: 57px;
1055
- }
1056
-
1057
- ::slotted([slot='years']) {
1058
- /* TODO get rid of fixed magic number */
1059
- --vaadin-infinite-scroller-buffer-width: 97px;
1060
- width: 57px;
1061
- height: auto;
1062
- top: 0;
1063
- bottom: 0;
1064
- font-size: var(--lumo-font-size-s);
1065
- box-shadow: inset 2px 0 4px 0 var(--lumo-shade-5pct);
1066
- -webkit-mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1067
- mask-image: linear-gradient(transparent, #000 35%, #000 65%, transparent);
1068
- cursor: var(--lumo-clickable-cursor);
1069
- }
1070
-
1071
- ::slotted([slot='years']:hover) {
1072
- --_lumo-date-picker-year-opacity: 1;
1073
- }
1074
-
1075
- /* TODO unsupported selector */
1076
- #scrollers {
1077
- position: static;
1078
- display: block;
1079
- }
1080
-
1081
- /* TODO fix this in vaadin-date-picker that it adapts to the width of the year scroller */
1082
- :host([desktop]) ::slotted([slot='months']) {
1083
- right: auto;
1084
- }
1085
-
1086
- /* Year scroller position indicator */
1087
- ::slotted([slot='years'])::before {
1088
- border: none;
1089
- width: 1em;
1090
- height: 1em;
1091
- background-color: var(--lumo-base-color);
1092
- background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));
1093
- transform: translate(-75%, -50%) rotate(45deg);
1094
- border-top-right-radius: var(--lumo-border-radius-s);
1095
- box-shadow: 2px -2px 6px 0 var(--lumo-shade-5pct);
1096
- z-index: 1;
1097
- }
1098
-
1099
- [part='toolbar'] {
1100
- padding: var(--lumo-space-s);
1101
- border-bottom-left-radius: var(--lumo-border-radius-l);
1102
- margin-right: 57px;
1103
- }
1104
-
1105
- [part='toolbar'] ::slotted(vaadin-button) {
1106
- margin: 0;
1107
- }
1108
-
1109
- /* Narrow viewport mode (fullscreen) */
1110
-
1111
- :host([fullscreen]) [part='toolbar'] {
1112
- order: -1;
1113
- background-color: var(--lumo-base-color);
1114
- }
1115
-
1116
- :host([fullscreen]) [part='overlay-header'] {
1117
- order: -2;
1118
- height: var(--lumo-size-m);
1119
- padding: var(--lumo-space-s);
1120
- position: absolute;
1121
- left: 0;
1122
- right: 0;
1123
- justify-content: center;
1124
- }
1125
-
1126
- :host([fullscreen]) [part='toggle-button'],
1127
- :host([fullscreen]) [part='clear-button'],
1128
- [part='overlay-header'] [part='label'] {
1129
- display: none;
1130
- }
1131
-
1132
- /* Very narrow screen (year scroller initially hidden) */
1133
-
1134
- [part='years-toggle-button'] {
1135
- display: flex;
1136
- align-items: center;
1137
- height: var(--lumo-size-s);
1138
- padding: 0 0.5em;
1139
- border-radius: var(--lumo-border-radius-m);
1140
- z-index: 3;
1141
- color: var(--lumo-primary-text-color);
1142
- font-weight: 500;
1143
- -webkit-font-smoothing: antialiased;
1144
- -moz-osx-font-smoothing: grayscale;
1145
- }
1146
-
1147
- :host([years-visible]) [part='years-toggle-button'] {
1148
- background-color: var(--lumo-primary-color);
1149
- color: var(--lumo-primary-contrast-color);
1150
- }
1151
-
1152
- /* TODO magic number (same as used for media-query in vaadin-date-picker-overlay-content) */
1153
- @media screen and (max-width: 374px) {
1154
- :host {
1155
- background-image: none;
1156
- }
1157
-
1158
- [part='toolbar'],
1159
- ::slotted([slot='months']) {
1160
- margin-right: 0;
1161
- }
1162
-
1163
- /* TODO make date-picker adapt to the width of the years part */
1164
- ::slotted([slot='years']) {
1165
- --vaadin-infinite-scroller-buffer-width: 90px;
1166
- width: 50px;
1167
- background-color: var(--lumo-shade-5pct);
1168
- }
1169
-
1170
- :host([years-visible]) ::slotted([slot='months']) {
1171
- padding-left: 50px;
1172
- }
1173
- }
1174
- `,{moduleId:"lumo-date-picker-overlay-content"}),Tt("vaadin-month-calendar",g`
1175
- :host {
1176
- -moz-user-select: none;
1177
- -webkit-user-select: none;
1178
- -webkit-tap-highlight-color: transparent;
1179
- user-select: none;
1180
- font-size: var(--lumo-font-size-m);
1181
- color: var(--lumo-body-text-color);
1182
- text-align: center;
1183
- padding: 0 var(--lumo-space-xs);
1184
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
1185
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
1186
- --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
1187
- --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
1188
- }
1189
-
1190
- /* Month header */
1191
-
1192
- [part='month-header'] {
1193
- color: var(--lumo-header-text-color);
1194
- font-size: var(--lumo-font-size-l);
1195
- line-height: 1;
1196
- font-weight: 500;
1197
- margin-bottom: var(--lumo-space-m);
1198
- }
1199
-
1200
- /* Week days and numbers */
1201
-
1202
- [part='weekdays'],
1203
- [part='weekday'],
1204
- [part='week-number'] {
1205
- font-size: var(--lumo-font-size-xxs);
1206
- line-height: 1;
1207
- color: var(--lumo-secondary-text-color);
1208
- }
1209
-
1210
- [part='weekdays'] {
1211
- margin-bottom: var(--lumo-space-s);
1212
- }
1213
-
1214
- [part='weekday']:empty,
1215
- [part='week-number'] {
1216
- width: var(--lumo-size-xs);
1217
- }
1218
-
1219
- /* Date and week number cells */
1220
-
1221
- [part~='date'],
1222
- [part='week-number'] {
1223
- box-sizing: border-box;
1224
- display: inline-flex;
1225
- align-items: center;
1226
- justify-content: center;
1227
- height: var(--lumo-size-m);
1228
- position: relative;
1229
- }
1230
-
1231
- [part~='date'] {
1232
- transition: color 0.1s;
1233
- }
1234
-
1235
- [part~='date']:not(:empty) {
1236
- cursor: var(--lumo-clickable-cursor);
1237
- }
1238
-
1239
- :host([week-numbers]) [part='weekday']:not(:empty),
1240
- :host([week-numbers]) [part~='date'] {
1241
- width: calc((100% - var(--lumo-size-xs)) / 7);
1242
- }
1243
-
1244
- /* Today date */
1245
-
1246
- [part~='date'][part~='today'] {
1247
- color: var(--_selection-color-text);
1248
- }
1249
-
1250
- /* Focused date */
1251
-
1252
- [part~='date']::before {
1253
- content: '';
1254
- position: absolute;
1255
- z-index: -1;
1256
- top: 50%;
1257
- left: 50%;
1258
- transform: translate(-50%, -50%);
1259
- min-width: 2em;
1260
- min-height: 2em;
1261
- width: 80%;
1262
- height: 80%;
1263
- max-height: 100%;
1264
- max-width: 100%;
1265
- border-radius: var(--lumo-border-radius-m);
1266
- }
1267
-
1268
- [part~='date'][part~='focused']::before {
1269
- box-shadow:
1270
- 0 0 0 1px var(--lumo-base-color),
1271
- 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color);
1272
- }
1273
-
1274
- :host(:not([focused])) [part~='date'][part~='focused']::before {
1275
- animation: vaadin-date-picker-month-calendar-focus-date 1.4s infinite;
1276
- }
1277
-
1278
- @keyframes vaadin-date-picker-month-calendar-focus-date {
1279
- 50% {
1280
- box-shadow:
1281
- 0 0 0 1px var(--lumo-base-color),
1282
- 0 0 0 calc(var(--_focus-ring-width) + 1px) transparent;
1283
- }
1284
- }
1285
-
1286
- [part~='date']:not(:empty):not([part~='disabled']):not([part~='selected']):hover::before {
1287
- background-color: var(--lumo-primary-color-10pct);
1288
- }
1289
-
1290
- [part~='date'][part~='selected'] {
1291
- color: var(--lumo-primary-contrast-color);
1292
- }
1293
-
1294
- [part~='date'][part~='selected']::before {
1295
- background-color: var(--_selection-color);
1296
- }
1297
-
1298
- [part~='date'][part~='disabled'] {
1299
- color: var(--lumo-disabled-text-color);
1300
- }
1301
-
1302
- @media (pointer: coarse) {
1303
- [part~='date']:hover:not([part~='selected'])::before,
1304
- :host(:not([focus-ring])) [part~='focused']:not([part~='selected'])::before {
1305
- display: none;
1306
- }
1307
-
1308
- [part~='date']:not(:empty):not([part~='disabled']):active::before {
1309
- display: block;
1310
- }
1311
-
1312
- :host(:not([focus-ring])) [part~='date'][part~='selected']::before {
1313
- box-shadow: none;
1314
- }
1315
- }
1316
- /* Disabled */
1317
-
1318
- :host([disabled]) * {
1319
- color: var(--lumo-disabled-text-color) !important;
1320
- }
1321
- `,{moduleId:"lumo-month-calendar"}),Tt("vaadin-input-container",g`
1322
- :host {
1323
- background: var(--_background);
1324
- padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
1325
- font-weight: var(--vaadin-input-field-value-font-weight, 500);
1326
- line-height: 1;
1327
- position: relative;
1328
- cursor: text;
1329
- box-sizing: border-box;
1330
- border-radius:
1331
- /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
1332
- var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
1333
- var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
1334
- var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
1335
- var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
1336
- /* Fallback */
1337
- --_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
1338
- --_input-height: var(--lumo-text-field-size, var(--lumo-size-m));
1339
- /* Default values */
1340
- --_background: var(--vaadin-input-field-background, var(--lumo-contrast-10pct));
1341
- --_hover-highlight: var(--vaadin-input-field-hover-highlight, var(--lumo-contrast-50pct));
1342
- --_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
1343
- --_icon-color: var(--vaadin-input-field-icon-color, var(--lumo-contrast-60pct));
1344
- --_icon-size: var(--vaadin-input-field-icon-size, var(--lumo-icon-size-m));
1345
- --_invalid-background: var(--vaadin-input-field-invalid-background, var(--lumo-error-color-10pct));
1346
- --_invalid-hover-highlight: var(--vaadin-input-field-invalid-hover-highlight, var(--lumo-error-color-50pct));
1347
- --_disabled-background: var(--vaadin-input-field-disabled-background, var(--lumo-contrast-5pct));
1348
- --_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
1349
- }
1350
-
1351
- :host([dir='rtl']) {
1352
- border-radius:
1353
- /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
1354
- var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
1355
- var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
1356
- var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
1357
- var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
1358
- }
1359
-
1360
- /* Used for hover and activation effects */
1361
- :host::after {
1362
- content: '';
1363
- position: absolute;
1364
- inset: 0;
1365
- border-radius: inherit;
1366
- pointer-events: none;
1367
- background: var(--_hover-highlight);
1368
- opacity: 0;
1369
- transition:
1370
- transform 0.15s,
1371
- opacity 0.2s;
1372
- transform-origin: 100% 0;
1373
- }
1374
-
1375
- ::slotted(:not([slot$='fix'])) {
1376
- cursor: inherit;
1377
- min-height: var(--vaadin-input-field-height, var(--_input-height));
1378
- padding: 0 0.25em;
1379
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
1380
- -webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
1381
- mask-image: var(--_lumo-text-field-overflow-mask-image);
1382
- }
1383
-
1384
- /* Read-only */
1385
- :host([readonly]) {
1386
- color: var(--lumo-secondary-text-color);
1387
- background-color: transparent;
1388
- cursor: default;
1389
- }
1390
-
1391
- :host([readonly])::after {
1392
- background-color: transparent;
1393
- opacity: 1;
1394
- border: var(--vaadin-input-field-readonly-border, 1px dashed var(--lumo-contrast-30pct));
1395
- }
1396
-
1397
- /* Disabled */
1398
- :host([disabled]) {
1399
- background: var(--_disabled-background);
1400
- }
1401
-
1402
- :host([disabled]) ::slotted(:not([slot$='fix'])) {
1403
- -webkit-text-fill-color: var(--_disabled-value-color);
1404
- color: var(--_disabled-value-color);
1405
- }
1406
-
1407
- /* Invalid */
1408
- :host([invalid]) {
1409
- background: var(--_invalid-background);
1410
- }
1411
-
1412
- :host([invalid]:not([readonly]))::after {
1413
- background: var(--_invalid-hover-highlight);
1414
- }
1415
-
1416
- /* Slotted icons */
1417
- ::slotted(vaadin-icon) {
1418
- color: var(--_icon-color);
1419
- width: var(--_icon-size);
1420
- height: var(--_icon-size);
1421
- }
1422
-
1423
- /* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
1424
- ::slotted(vaadin-icon[icon^='vaadin:']) {
1425
- padding: 0.25em;
1426
- box-sizing: border-box !important;
1427
- }
1428
-
1429
- /* Text align */
1430
- :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
1431
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
1432
- }
1433
-
1434
- @-moz-document url-prefix() {
1435
- :host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
1436
- mask-image: var(--_lumo-text-field-overflow-mask-image);
1437
- }
1438
- }
1439
-
1440
- :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
1441
- text-align: start;
1442
- --_lumo-text-field-overflow-mask-image: none;
1443
- }
1444
-
1445
- :host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
1446
- text-align: center;
1447
- --_lumo-text-field-overflow-mask-image: none;
1448
- }
1449
-
1450
- :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
1451
- text-align: end;
1452
- --_lumo-text-field-overflow-mask-image: none;
1453
- }
1454
-
1455
- @-moz-document url-prefix() {
1456
- /* Firefox is smart enough to align overflowing text to right */
1457
- :host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
1458
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
1459
- }
1460
- }
1461
-
1462
- @-moz-document url-prefix() {
1463
- /* Firefox is smart enough to align overflowing text to right */
1464
- :host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
1465
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
1466
- }
1467
- }
1468
-
1469
- /* RTL specific styles */
1470
- :host([dir='rtl'])::after {
1471
- transform-origin: 0% 0;
1472
- }
1473
-
1474
- :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1475
- --_lumo-text-field-overflow-mask-image: none;
1476
- }
1477
-
1478
- :host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1479
- --_lumo-text-field-overflow-mask-image: none;
1480
- }
1481
-
1482
- :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1483
- --_lumo-text-field-overflow-mask-image: none;
1484
- }
1485
-
1486
- @-moz-document url-prefix() {
1487
- /* Firefox is smart enough to align overflowing text to right */
1488
- :host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1489
- --_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
1490
- }
1491
- }
1492
-
1493
- @-moz-document url-prefix() {
1494
- /* Firefox is smart enough to align overflowing text to right */
1495
- :host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
1496
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
1497
- }
1498
- }
1499
- `,{moduleId:"lumo-input-container"}),It("font-icons",g`
1500
- @font-face {
1501
- font-family: 'lumo-icons';
1502
- src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABEgAAsAAAAAIjQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuKY21hcAAAAYgAAAD4AAADrsCU8d5nbHlmAAACgAAAC2cAABeAWri7U2hlYWQAAA3oAAAAMAAAADZa/6SsaGhlYQAADhgAAAAdAAAAJAbpA35obXR4AAAOOAAAABAAAACspBAAAGxvY2EAAA5IAAAAWAAAAFh57oA4bWF4cAAADqAAAAAfAAAAIAFKAXBuYW1lAAAOwAAAATEAAAIuUUJZCHBvc3QAAA/0AAABKwAAAelm8SzVeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+yDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mIO+p/FEMUcxDANKMwIkgMABn8MLQB4nO3SWW6DMABF0UtwCEnIPM/zhLK8LqhfXRybSP14XUYtHV9hGYQwQBNIo3cUIPkhQeM7rib1ekqnXg981XuC1qvy84lzojleh3puxL0hPjGjRU473teloEefAUNGjJkwZcacBUtWrNmwZceeA0dOnLlw5cadB09elPGhGf+j0NTI/65KfXerT6JhqKnpRKtgOpuqaTrtKjPUlqHmhto21I7pL6i6hlqY3q7qGWrfUAeGOjTUkaGODXViqFNDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUB+G+jTUl6GWRvkL24BkEXictVh9bFvVFb/nxvbz+7Rf/N6zHcd2bCfP+Wic1Z9N0jpNHCD9SNqqoVBgbQoMjY+pjA4hNnWa2pV1rHSIif0DGkyT2k10Kmu1Cag6huj4ZpqYBHSqJsTEJgZCG3TaVBFv595nO3ZIv4RIrPPuvefe884599zzO/cRF8G/tgn6CFFImNgkR0ggX8wlspbhSSWSdrC5ozd30s2dw5afzvgtyz9/zG9t1hV4RtF1pXolowvtzc2z6L2aYUQM45jKH9WDTvd1LRDoDASYWhfTzTyvboXz6uZX4ARX5wrF39y+HM2+CJ8d0pkyqBIqoze3D12ez4DrFoYzxI8dWwMrDlZ2DMqQAR9AROsJU+2smlTPaTTco52BVxXa2a2+I8vvqd2dVHm1LoPeTn/AZPRYGthDYOeZjBjKoFsVGulR3lGU95SeCK44oHU7MhWUGUKZDT3oSUcG2GWuh+EDDfUYA/jhIhl0TOsJNYSEu7mQmi3UzfXwZKA4BsVsHLXQYGgJW95qEtpJ1VcW9HiTriZBlFEqxsDjA09yCNUoQxxwd7KWSTt2y3GTKifkqHRCoWZc3m11Wa/dKdFgXD4kSYfkeJBKd8KMz7J8dZn/cGRCcLGDnA2Ge3bKzcvlnTDNthFWLH7Xt80ua5FMjA4WKelWv5Xo16vHuYzpRbJhhdVlftuRK0VlR27D9lu5TF0DPBi60OrHNO0AfP/uRWvhn/U3LXICE+nh+3IHPUJ8JE6GyBjZQLbjGchlrSgYngF8zyrIF4NJD3atUcgWsWunGN/UHX5B5/yg7uF87Nqp4Gf52F3gH73DjEZNRoqCKAr9giQJp5rGJABpiVE2htNhW9R8nw0jqYjCYcY4LIjwYNScf4WN06IZnZCEqsI4cFaQbo4Z1TsZBx40YhXkHOecaYE5oY37IIQ+iJJ+UsDYSun5MuRSBRZRUUhlY2DqOGajOR6zrSU/5My6l2DnusH1GQgnw5BZP7iuYM/ahcfQ7Z8y51ddfutvuwNqWQ0cBYr8fj0U0vsHpwerVaB2sWhXT2NExi2r1KUE2tUuVMnkepVQrxTmpQrZTG4iu8he8iPyM3KcPE/+RP5KPoE2CEAKclCBzXATxkYOtUY/o961PWRqsj0chRrHFBbtrjP9/P0ven5pcbRdpL94vfsy33e5+izuwz3nFLFPVNayPZx/jdG1fOChflFRvYzsW6L18efgLrSWIgvcqnGJYi4skO4xREURjbDuxKke5v0T3Mrzkt2fi31uyZlLLrqIpEuXXsMlgw442Jb0GAxjS1DM20kBoCzHLXm/jEm0IltdcvU0fEW24jgiwwRjVd9u4NJHcIyoHJcwvyVqgqj5hqBJ1ZWSJryh9p56UWhX1XbhRbW2ZopuZWsQd5y8mEQ8M+C6xjRYxZbDKWf5AgY+Qq/l6wSPk16zDFjowYuu+wjx13mfkxbyDDxadYT/LijZyI0THB+6yfLaWsRcO82zo9mWTNtpO18qlorZoIVMwSN40tky5DOQ1MCIAe24mvlsuwIIxPb10+uXDQ4uWz/9m3rj+ql7p6bufZARuPVq5tXtsn6KwfP8Jy0TeWOyNhUJN6mhX5rkUTtUppQWEMNTqEdaCGKFYKJaQrCE4JtDLYOlNEKmO5kBTPGY2A0N2sY3+dVlo1N9ycBsIGtOjQ2p/tlZvzo0ur4v6cOh8NTospB7U/X40KahoU3bGIH97dnwmtHlYffVG3R1YOwKM2vNhrPhCT5zk64sG53oS4b31aYjqe/B7+kQiXBN+b6h21hNUPMq29B8CU4elINdygMPKF1B+WBTG7Z9ZshpN/xwEuuDQZR+nuoo4CDaAiiwXmLpmukMQyPf/JMclqgL1ixZQ/nnP2VbdUODFGt2fgBvL123rlLYu/6A9ckb7F3K0/CyBMEu6aQoPscroCcacVehvyQyCZAsizsWWBkoLC+WAiWnOksLKaeuQDzGuqSk42aiYTiJ4zf9afl17SrqaTO1f+XlZAfIuYcq7/IqYMaMrksOJ6vHkOCPDq943xcCnHqVD9pHFRpMqSPXrIua1WNs+tOz1U+ciTCDpPk+c4QYJIHnYhxP/kVPAq+ahFpVhPcHp8qyarhiF+HsBU9Hrl+UZa876fbKipL0KqB6OdUveErgtOI97fZ63ae9SvWU6k2w1JfwqnUbHsYcFCJFrC/W12zIMMirWYEHxMPs6LGYSdkSZ5TsNP9PCpwnWC3HKZ1lydNjWHC2Mn3l6vL0dHn1ldP3LTSrX+vKrBqv7KmMr8p0SR6P1NqF63or6XRlIyO90f7+kf7+myOhvt4tq7f09oUiTc2/dycGgqFQcCDRLYmi1NL7fk0CknVMxEg/cdfs/TnpJMNkgqwj17B8beVazSrVbU4lG67IZYOCnWrYy3yBR9cyWcChywos3LJBEdhhFoAdYjiw0rLGm0xU5OzoGm5/ZfmHjVZpNNg6SznzGKDdwv2cCtVn6Eaxo12cfxLprpVtTcZ6hVx6dow7Yq7e8LXO8PY9Jgjoze9yCtU5FNbegcKkQMdCbt9au/te4Ebe0jkc0ukUL32eYnTpNs20h0KpUOhZPYwVcfhZnfdqeCvDfXiuCbAoYWcXERPc/mDQD3/hdF+wK4i/xv3kYfprIpAuMkk2kW3kdtS0kBIKpZwp8KxmsCyfM1MFzAss9LBkDxRyThiaqTLwKYKJVTwmWTudMyz+yks09346MDh4m72yOxCKrt1XMlQ1qPVlTEVVQ1ofdK/sCWjtZu9qGwZ8YZ9PPWlo1IV3eW3+U0aXblP39zrt+JPf6UhEQ1rUjNBULN+utyuaDNW34kpAVuSOeMTyWbSNWnooFu+QFNWQ4d/Ox4IPWx41fP/fB/Rjeoz08ezPA9TysMtmnOXfGN7Ui3xIYLDALrlDLOP09qtJuY2OeL0+QZXdRnR1nxRVBF/SOyKKPpcrn9mWzH4rH9IidE+PTNU2182+hOgSItrE1slByS24vaLvJpxOqe4Pduf3HJkZ+jLqUz9rRzB7p8gKcgWZwV1L8JtUS5Z2JxZSOCuBoMTQihMzLbCPA0KqGMAljRQjONklW/wjnXKy8vxT/Elvm3/KiMUMOoV0/vnDYlhec0SMKtt3/kKMyOt33tj2bqxQLsTjSGLl+EAsNhCnTyRGktW55EgCn/A4PlnWn+Mg8bgZrWqHxTbPwMuyy1u5YeZF2SUM7JRhddwRgiRuxpmgJmxn9ZW7XpcF3ViX/ar6ptRpGJ0S9Adg4qhb9sI3vbL7qNJV/y4i07t5TZBiho1imFoMz3gED+CtjYUxvP4SOxov4bFoNPg5aR1e+G4UgDPoedJTpogyCJ7oYvRqoVS0MQAy+CoNEdTDUjok5ZHZL/WtjV7rFj3PKQE3iKp7ou+rIxN3b9LB1dGjeT4cvKo3FrnWpYpuaFd/h3dtV8UeKN1Y9hpR3dt4p0H/zKuPQq0kZQUIIpuDfoiETsnIk+gCWMJZUXHtE8V9LkUc2TE8vOMbO4ax/MACabzyaGXc7u3FBr11ThBdB8SIeMAlCntG2KThHSPsaj2Dc9KNyY2a0KZ7ODaTHoRiFkeYz+shZBpCS4X6471KKKnuHd84edfk5F37d1XO5bbkcltu2ZLNbvnPXiUVAnVvprJrP+NObryjxrllS65md6Tm6wzFHRR4dY3QUUjb7MgxaIixU8hspi98fl/Xc+IB4iU66eCVL9YfAfahiSUt4TONS8x0D8W7u8vd3fGWx6OXlM/U1IoU/s61PGhpyXRFa3eReq2qG56lvmYtXavCC1iN7lbiBpWxXHU+cSlztVLVz0tVN600fVsLxaVDknhYioeoXP3t4lqV1r79MAw0GCI1FTL1YIGzPL1MMlJ9ZsN9P7lvA2yr9ZFUzwzPrVgxN/x/SS+chwB4nGNgZGBgAOLPrYdY4vltvjJwM78AijDUqG5oRND/XzNPZboF5HIwMIFEAU/lC+J4nGNgZGBgDvqfBSRfMAAB81QGRgZUoA0AVvYDbwAAAHicY2BgYGB+MTQwAM8EJo8AAAAAAE4AmgDoAQoBLAFOAXABmgHEAe4CGgKcAugEmgS8BNYE8gUOBSoFegXQBf4GRAZmBrYHGAeQCBgIUghqCP4JRgm+CdoKBAo+CoQKugr0C1QLmgvAeJxjYGRgYNBmTGEQZQABJiDmAkIGhv9gPgMAGJQBvAB4nG2RPU7DMBiG3/QP0UoIBGJh8QILavozdmRo9w7d09RpUzlx5LgVvQMn4BAcgoEzcAgOwVvzSZVQbcnf48fvFysJgGt8IcJxROiG9TgauODuj5ukG+EW+UG4jR4ehTv0Q+EunjER7uEWmk+IWpc0d3gVbuAKb8JN+nfhFvlDuI17fAp36L+Fu1jgR7iHp+jF7Arbz1Nb1nO93pnEncSJFtrVuS3VKB6e5EyX2iVer9TyoOr9eux9pjJnCzW1pdfGWFU5u9WpjzfeV5PBIBMfp7aAwQ4FLPrIkbKWqDHn+67pDRK4s4lzbsEux5qHvcIIMb/nueSMyTKkE3jWFdNLHLjW2PPmMa1Hxn3GjGW/wjT0HtOG09JU4WxLk9LH2ISuiv9twJn9y8fh9uIXI+BknAAAAHicbY7ZboMwEEW5CVBCSLrv+76kfJRjTwHFsdGAG+Xvy5JUfehIHp0rnxmNN/D6ir3/a4YBhvARIMQOIowQY4wEE0yxiz3s4wCHOMIxTnCKM5zjApe4wjVucIs73OMBj3jCM17wije84wMzfHqJ0EVmUkmmJo77oOmrHvfIRZbXsTCZplTZldlgb3TYGVHProwFs11t1A57tcON2rErR3PBqcwF1/6ctI6k0GSU4JHMSS6WghdJQ99sTbfuN7QLJ9vQ37dNrgyktnIxlDYLJNuqitpRbYWKFNuyDT6pog6oOYKHtKakeakqKjHXpPwlGRcsC+OqxLIiJpXqoqqDMreG2l5bv9Ri3TRX+c23DZna9WFFgmXuO6Ps1Jm/w6ErW8N3FbHn/QC444j0AA==)
1503
- format('woff');
1504
- font-weight: normal;
1505
- font-style: normal;
1506
- }
1507
-
1508
- html {
1509
- --lumo-icons-align-center: '\\ea01';
1510
- --lumo-icons-align-left: '\\ea02';
1511
- --lumo-icons-align-right: '\\ea03';
1512
- --lumo-icons-angle-down: '\\ea04';
1513
- --lumo-icons-angle-left: '\\ea05';
1514
- --lumo-icons-angle-right: '\\ea06';
1515
- --lumo-icons-angle-up: '\\ea07';
1516
- --lumo-icons-arrow-down: '\\ea08';
1517
- --lumo-icons-arrow-left: '\\ea09';
1518
- --lumo-icons-arrow-right: '\\ea0a';
1519
- --lumo-icons-arrow-up: '\\ea0b';
1520
- --lumo-icons-bar-chart: '\\ea0c';
1521
- --lumo-icons-bell: '\\ea0d';
1522
- --lumo-icons-calendar: '\\ea0e';
1523
- --lumo-icons-checkmark: '\\ea0f';
1524
- --lumo-icons-chevron-down: '\\ea10';
1525
- --lumo-icons-chevron-left: '\\ea11';
1526
- --lumo-icons-chevron-right: '\\ea12';
1527
- --lumo-icons-chevron-up: '\\ea13';
1528
- --lumo-icons-clock: '\\ea14';
1529
- --lumo-icons-cog: '\\ea15';
1530
- --lumo-icons-cross: '\\ea16';
1531
- --lumo-icons-download: '\\ea17';
1532
- --lumo-icons-dropdown: '\\ea18';
1533
- --lumo-icons-edit: '\\ea19';
1534
- --lumo-icons-error: '\\ea1a';
1535
- --lumo-icons-eye: '\\ea1b';
1536
- --lumo-icons-eye-disabled: '\\ea1c';
1537
- --lumo-icons-menu: '\\ea1d';
1538
- --lumo-icons-minus: '\\ea1e';
1539
- --lumo-icons-ordered-list: '\\ea1f';
1540
- --lumo-icons-phone: '\\ea20';
1541
- --lumo-icons-photo: '\\ea21';
1542
- --lumo-icons-play: '\\ea22';
1543
- --lumo-icons-plus: '\\ea23';
1544
- --lumo-icons-redo: '\\ea24';
1545
- --lumo-icons-reload: '\\ea25';
1546
- --lumo-icons-search: '\\ea26';
1547
- --lumo-icons-undo: '\\ea27';
1548
- --lumo-icons-unordered-list: '\\ea28';
1549
- --lumo-icons-upload: '\\ea29';
1550
- --lumo-icons-user: '\\ea2a';
1551
- }
1552
- `);
1553
- /**
1554
- * @license
1555
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
1556
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1557
- */
1558
- const Rt=g`
1559
- [part$='button'] {
1560
- flex: none;
1561
- width: 1em;
1562
- height: 1em;
1563
- line-height: 1;
1564
- font-size: var(--lumo-icon-size-m);
1565
- text-align: center;
1566
- color: var(--lumo-contrast-60pct);
1567
- transition: 0.2s color;
1568
- cursor: var(--lumo-clickable-cursor);
1569
- }
1570
-
1571
- [part$='button']:hover {
1572
- color: var(--lumo-contrast-90pct);
1573
- }
1574
-
1575
- :host([disabled]) [part$='button'],
1576
- :host([readonly]) [part$='button'] {
1577
- color: var(--lumo-contrast-20pct);
1578
- cursor: default;
1579
- }
1580
-
1581
- [part$='button']::before {
1582
- font-family: 'lumo-icons';
1583
- display: block;
1584
- }
1585
- `;Tt("",Rt,{moduleId:"lumo-field-button"});
1586
- /**
1587
- * @license
1588
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
1589
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1590
- */
1591
- const jt=g`
1592
- :host {
1593
- --_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
1594
- }
1595
-
1596
- :host([has-helper]) [part='helper-text']::before {
1597
- content: '';
1598
- display: block;
1599
- height: var(--_helper-spacing);
1600
- }
1601
-
1602
- [part='helper-text'] {
1603
- display: block;
1604
- color: var(--vaadin-input-field-helper-color, var(--lumo-secondary-text-color));
1605
- font-size: var(--vaadin-input-field-helper-font-size, var(--lumo-font-size-xs));
1606
- line-height: var(--lumo-line-height-xs);
1607
- font-weight: var(--vaadin-input-field-helper-font-weight, 400);
1608
- margin-left: calc(var(--lumo-border-radius-m) / 4);
1609
- transition: color 0.2s;
1610
- }
1611
-
1612
- :host(:hover:not([readonly])) [part='helper-text'] {
1613
- color: var(--lumo-body-text-color);
1614
- }
1615
-
1616
- :host([disabled]) [part='helper-text'] {
1617
- color: var(--lumo-disabled-text-color);
1618
- -webkit-text-fill-color: var(--lumo-disabled-text-color);
1619
- }
1620
-
1621
- :host([has-helper][theme~='helper-above-field']) [part='helper-text']::before {
1622
- display: none;
1623
- }
1624
-
1625
- :host([has-helper][theme~='helper-above-field']) [part='helper-text']::after {
1626
- content: '';
1627
- display: block;
1628
- height: var(--_helper-spacing);
1629
- }
1630
-
1631
- :host([has-helper][theme~='helper-above-field']) [part='label'] {
1632
- order: 0;
1633
- padding-bottom: var(--_helper-spacing);
1634
- }
1635
-
1636
- :host([has-helper][theme~='helper-above-field']) [part='helper-text'] {
1637
- order: 1;
1638
- }
1639
-
1640
- :host([has-helper][theme~='helper-above-field']) [part='label'] + * {
1641
- order: 2;
1642
- }
1643
-
1644
- :host([has-helper][theme~='helper-above-field']) [part='error-message'] {
1645
- order: 3;
1646
- }
1647
- `
1648
- /**
1649
- * @license
1650
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
1651
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1652
- */,Wt=g`
1653
- [part='label'] {
1654
- align-self: flex-start;
1655
- color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
1656
- font-weight: var(--vaadin-input-field-label-font-weight, 500);
1657
- font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
1658
- margin-left: calc(var(--lumo-border-radius-m) / 4);
1659
- transition: color 0.2s;
1660
- line-height: 1;
1661
- padding-right: 1em;
1662
- padding-bottom: 0.5em;
1663
- /* As a workaround for diacritics being cut off, add a top padding and a
1664
- negative margin to compensate */
1665
- padding-top: 0.25em;
1666
- margin-top: -0.25em;
1667
- overflow: hidden;
1668
- white-space: nowrap;
1669
- text-overflow: ellipsis;
1670
- position: relative;
1671
- max-width: 100%;
1672
- box-sizing: border-box;
1673
- }
1674
-
1675
- :host([focused]:not([readonly])) [part='label'] {
1676
- color: var(--vaadin-input-field-focused-label-color, var(--lumo-primary-text-color));
1677
- }
1678
-
1679
- :host(:hover:not([readonly]):not([focused])) [part='label'] {
1680
- color: var(--vaadin-input-field-hovered-label-color, var(--lumo-body-text-color));
1681
- }
1682
-
1683
- /* Touch device adjustment */
1684
- @media (pointer: coarse) {
1685
- :host(:hover:not([readonly]):not([focused])) [part='label'] {
1686
- color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
1687
- }
1688
- }
1689
-
1690
- :host([has-label])::before {
1691
- margin-top: calc(var(--lumo-font-size-s) * 1.5);
1692
- }
1693
-
1694
- :host([has-label][theme~='small'])::before {
1695
- margin-top: calc(var(--lumo-font-size-xs) * 1.5);
1696
- }
1697
-
1698
- :host([has-label]) {
1699
- padding-top: var(--lumo-space-m);
1700
- }
1701
-
1702
- :host([has-label]) ::slotted([slot='tooltip']) {
1703
- --vaadin-tooltip-offset-bottom: calc((var(--lumo-space-m) - var(--lumo-space-xs)) * -1);
1704
- }
1705
-
1706
- :host([required]) [part='required-indicator']::after {
1707
- content: var(--lumo-required-field-indicator, '\\2022');
1708
- transition: opacity 0.2s;
1709
- color: var(--lumo-required-field-indicator-color, var(--lumo-primary-text-color));
1710
- position: absolute;
1711
- right: 0;
1712
- width: 1em;
1713
- text-align: center;
1714
- }
1715
-
1716
- :host([invalid]) [part='required-indicator']::after {
1717
- color: var(--lumo-required-field-indicator-color, var(--lumo-error-text-color));
1718
- }
1719
-
1720
- [part='error-message'] {
1721
- margin-left: calc(var(--lumo-border-radius-m) / 4);
1722
- font-size: var(--vaadin-input-field-error-font-size, var(--lumo-font-size-xs));
1723
- line-height: var(--lumo-line-height-xs);
1724
- font-weight: var(--vaadin-input-field-error-font-weight, 400);
1725
- color: var(--vaadin-input-field-error-color, var(--lumo-error-text-color));
1726
- will-change: max-height;
1727
- transition: 0.4s max-height;
1728
- max-height: 5em;
1729
- }
1730
-
1731
- :host([has-error-message]) [part='error-message']::before,
1732
- :host([has-error-message]) [part='error-message']::after {
1733
- content: '';
1734
- display: block;
1735
- height: 0.4em;
1736
- }
1737
-
1738
- :host(:not([invalid])) [part='error-message'] {
1739
- max-height: 0;
1740
- overflow: hidden;
1741
- }
1742
-
1743
- /* RTL specific styles */
1744
-
1745
- :host([dir='rtl']) [part='label'] {
1746
- margin-left: 0;
1747
- margin-right: calc(var(--lumo-border-radius-m) / 4);
1748
- }
1749
-
1750
- :host([dir='rtl']) [part='label'] {
1751
- padding-left: 1em;
1752
- padding-right: 0;
1753
- }
1754
-
1755
- :host([dir='rtl']) [part='required-indicator']::after {
1756
- right: auto;
1757
- left: 0;
1758
- }
1759
-
1760
- :host([dir='rtl']) [part='error-message'] {
1761
- margin-left: 0;
1762
- margin-right: calc(var(--lumo-border-radius-m) / 4);
1763
- }
1764
- `;Tt("",Wt,{moduleId:"lumo-required-field"});
1765
- /**
1766
- * @license
1767
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
1768
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
1769
- */
1770
- const Lt=[Wt,Rt,jt,g`
1771
- :host {
1772
- --lumo-text-field-size: var(--lumo-size-m);
1773
- color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
1774
- font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
1775
- font-family: var(--lumo-font-family);
1776
- -webkit-font-smoothing: antialiased;
1777
- -moz-osx-font-smoothing: grayscale;
1778
- -webkit-tap-highlight-color: transparent;
1779
- padding: var(--lumo-space-xs) 0;
1780
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
1781
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
1782
- --_input-height: var(--vaadin-input-field-height, var(--lumo-text-field-size));
1783
- --_disabled-value-color: var(--vaadin-input-field-disabled-value-color, var(--lumo-disabled-text-color));
1784
- }
1785
-
1786
- :host::before {
1787
- height: var(--_input-height);
1788
- box-sizing: border-box;
1789
- display: inline-flex;
1790
- align-items: center;
1791
- }
1792
-
1793
- :host([focused]) [part='input-field'] ::slotted(:is(input, textarea)) {
1794
- -webkit-mask-image: none;
1795
- mask-image: none;
1796
- }
1797
-
1798
- ::slotted(:is(input, textarea):placeholder-shown) {
1799
- color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
1800
- }
1801
-
1802
- /* Hover */
1803
- :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
1804
- opacity: var(--vaadin-input-field-hover-highlight-opacity, 0.1);
1805
- }
1806
-
1807
- /* Touch device adjustment */
1808
- @media (pointer: coarse) {
1809
- :host(:hover:not([readonly]):not([focused])) [part='input-field']::after {
1810
- opacity: 0;
1811
- }
1812
-
1813
- :host(:active:not([readonly]):not([focused])) [part='input-field']::after {
1814
- opacity: 0.2;
1815
- }
1816
- }
1817
-
1818
- /* Trigger when not focusing using the keyboard */
1819
- :host([focused]:not([focus-ring]):not([readonly])) [part='input-field']::after {
1820
- transform: scaleX(0);
1821
- transition-duration: 0.15s, 1s;
1822
- }
1823
-
1824
- /* Focus-ring */
1825
- :host([focus-ring]) [part='input-field'] {
1826
- box-shadow: 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
1827
- }
1828
-
1829
- /* Read-only and disabled */
1830
- :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {
1831
- opacity: 0;
1832
- }
1833
-
1834
- /* Read-only style */
1835
- :host([readonly]) {
1836
- --vaadin-input-field-border-color: transparent;
1837
- }
1838
-
1839
- /* Disabled style */
1840
- :host([disabled]) {
1841
- pointer-events: none;
1842
- --vaadin-input-field-border-color: var(--lumo-contrast-20pct);
1843
- }
1844
-
1845
- :host([disabled]) [part='label'],
1846
- :host([disabled]) [part='input-field'] ::slotted([slot$='fix']) {
1847
- color: var(--lumo-disabled-text-color);
1848
- -webkit-text-fill-color: var(--lumo-disabled-text-color);
1849
- }
1850
-
1851
- :host([disabled]) [part='input-field'] ::slotted(:not([slot$='fix'])) {
1852
- color: var(--_disabled-value-color);
1853
- -webkit-text-fill-color: var(--_disabled-value-color);
1854
- }
1855
-
1856
- /* Invalid style */
1857
- :host([invalid]) {
1858
- --vaadin-input-field-border-color: var(--lumo-error-color);
1859
- }
1860
-
1861
- :host([invalid][focus-ring]) [part='input-field'] {
1862
- box-shadow: 0 0 0 var(--_focus-ring-width) var(--lumo-error-color-50pct);
1863
- }
1864
-
1865
- :host([input-prevented]) [part='input-field'] {
1866
- animation: shake 0.15s infinite;
1867
- }
1868
-
1869
- @keyframes shake {
1870
- 25% {
1871
- transform: translateX(4px);
1872
- }
1873
- 75% {
1874
- transform: translateX(-4px);
1875
- }
1876
- }
1877
-
1878
- /* Small theme */
1879
- :host([theme~='small']) {
1880
- font-size: var(--lumo-font-size-s);
1881
- --lumo-text-field-size: var(--lumo-size-s);
1882
- }
1883
-
1884
- :host([theme~='small']) [part='label'] {
1885
- font-size: var(--lumo-font-size-xs);
1886
- }
1887
-
1888
- :host([theme~='small']) [part='error-message'] {
1889
- font-size: var(--lumo-font-size-xxs);
1890
- }
1891
-
1892
- /* Slotted content */
1893
- [part='input-field'] ::slotted(:not(vaadin-icon):not(input):not(textarea)) {
1894
- color: var(--lumo-secondary-text-color);
1895
- font-weight: 400;
1896
- }
1897
-
1898
- [part='clear-button']::before {
1899
- content: var(--lumo-icons-cross);
1900
- }
1901
- `];Tt("",Lt,{moduleId:"lumo-input-field-shared-styles"}),Tt("vaadin-date-picker",[Lt,g`
1902
- [part='toggle-button']::before {
1903
- content: var(--lumo-icons-calendar);
1904
- }
1905
-
1906
- [part='clear-button']::before {
1907
- content: var(--lumo-icons-cross);
1908
- }
1909
-
1910
- @media (max-width: 450px), (max-height: 450px) {
1911
- [part='overlay-content'] {
1912
- height: 70vh;
1913
- }
1914
- }
1915
-
1916
- :host([dir='rtl']) [part='input-field'] ::slotted(input) {
1917
- --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
1918
- }
1919
-
1920
- :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
1921
- --_lumo-text-field-overflow-mask-image: none;
1922
- }
1923
- `],{moduleId:"lumo-date-picker"}),
1924
- /**
1925
- @license
1926
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1927
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1928
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1929
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1930
- Code distributed by Google as part of the polymer project is also
1931
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1932
- */
1933
- window.JSCompiler_renameProperty=function(t){return t};
1934
- /**
1935
- @license
1936
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1937
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1938
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1939
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1940
- Code distributed by Google as part of the polymer project is also
1941
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1942
- */
1943
- let Ht,Gt,$t=/(url\()([^)]*)(\))/g,Ut=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function qt(t,e){if(t&&Ut.test(t))return t;if("//"===t)return t;if(void 0===Ht){Ht=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ht="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ht)try{return new URL(t,e).href}catch(e){return t}return Gt||(Gt=document.implementation.createHTMLDocument("temp"),Gt.base=Gt.createElement("base"),Gt.head.appendChild(Gt.base),Gt.anchor=Gt.createElement("a"),Gt.body.appendChild(Gt.anchor)),Gt.base.href=e,Gt.anchor.href=t,Gt.anchor.href||t}function Vt(t,e){return t.replace($t,(function(t,i,s,r){return i+"'"+qt(s.replace(/["']/g,""),e)+"'"+r}))}function Yt(t){return t.substring(0,t.lastIndexOf("/")+1)}
1944
- /**
1945
- @license
1946
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1947
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1948
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1949
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1950
- Code distributed by Google as part of the polymer project is also
1951
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1952
- */const Jt=!window.ShadyDOM||!window.ShadyDOM.inUse,Kt=Jt&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})();let Zt=window.Polymer&&window.Polymer.rootPath||Yt(document.baseURI||window.location.href),Qt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Xt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,te=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ee=window.Polymer&&window.Polymer.legacyOptimizations||!1,ie=window.Polymer&&window.Polymer.legacyWarnings||!1,se=window.Polymer&&window.Polymer.syncInitialRender||!1,re=window.Polymer&&window.Polymer.legacyUndefined||!1,oe=window.Polymer&&window.Polymer.orderedComputed||!1,ae=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ne=window.Polymer&&window.Polymer.fastDomIf||!1,le=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,he=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,ce=0;const de=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=ce++;return function(s){let r=s.__mixinSet;if(r&&r[i])return s;let o=e,a=o.get(s);if(!a){a=t(s),o.set(s,a);let e=Object.create(a.__mixinSet||r||null);e[i]=!0,a.__mixinSet=e}return a}};
1953
- /**
1954
- @license
1955
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1956
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1957
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1958
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1959
- Code distributed by Google as part of the polymer project is also
1960
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1961
- */let ue={},pe={};function me(t,e){ue[t]=pe[t.toLowerCase()]=e}function fe(t){return ue[t]||pe[t.toLowerCase()]}class be extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=fe(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,s){e!==i&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=qt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Yt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Xt&&void 0!==fe(t))throw me(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,me(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}be.prototype.modules=ue,customElements.define("dom-module",be);
1962
- /**
1963
- @license
1964
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1965
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1966
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1967
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1968
- Code distributed by Google as part of the polymer project is also
1969
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1970
- */
1971
- const ve="link[rel=import][type~=css]",ge="include",ye="shady-unscoped";function we(t){return be.import(t)}function xe(t){const e=Vt((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function ke(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(..._e(e[t]));return i}function _e(t){const e=we(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...De(e));const i=e.querySelector("template");i&&t.push(...Ce(i,e.assetpath)),e._styles=t}return e._styles}function Ce(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let r=s[t],o=r.getAttribute(ge);o&&i.push(...ke(o).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(r.textContent=Vt(r.textContent,e)),i.push(r)}t._styles=i}return t._styles}function De(t){const e=[],i=t.querySelectorAll(ve);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(ye);if(i&&!t._unscopedStyle){const e=xe(t);e.setAttribute(ye,""),t._unscopedStyle=e}else t._style||(t._style=xe(t));e.push(i?t._unscopedStyle:t._style)}}return e}
1972
- /**
1973
- @license
1974
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1975
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1976
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1977
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1978
- Code distributed by Google as part of the polymer project is also
1979
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1980
- */const Ae=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;
1981
- /**
1982
- @license
1983
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1984
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1985
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1986
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1987
- Code distributed by Google as part of the polymer project is also
1988
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1989
- */function Te(t){return t.indexOf(".")>=0}function Se(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function ze(t,e){return 0===t.indexOf(e+".")}function Be(t,e){return 0===e.indexOf(t+".")}function Pe(t,e,i){return e+i.slice(t.length)}function Ne(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 Ie(t){return Array.isArray(t)?Ne(t).split("."):t.toString().split(".")}function Me(t,e,i){let s=t,r=Ie(e);for(let t=0;t<r.length;t++){if(!s)return;s=s[r[t]]}return i&&(i.path=r.join(".")),s}function Oe(t,e,i){let s=t,r=Ie(e),o=r[r.length-1];if(r.length>1){for(let t=0;t<r.length-1;t++)if(s=s[r[t]],!s)return;s[o]=i}else s[e]=i;return r.join(".")}
1990
- /**
1991
- @license
1992
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
1993
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
1994
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
1995
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
1996
- Code distributed by Google as part of the polymer project is also
1997
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
1998
- */const Fe={},Ee=/-[a-z]/g,Re=/([A-Z])/g;function je(t){return Fe[t]||(Fe[t]=t.indexOf("-")<0?t:t.replace(Ee,(t=>t[1].toUpperCase())))}function We(t){return Fe[t]||(Fe[t]=t.replace(Re,"-$1").toLowerCase())}
1999
- /**
2000
- @license
2001
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2002
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2003
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2004
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2005
- Code distributed by Google as part of the polymer project is also
2006
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2007
- */let Le=0,He=0,Ge=[],$e=0,Ue=!1,qe=document.createTextNode("");new window.MutationObserver((function(){Ue=!1;const t=Ge.length;for(let e=0;e<t;e++){let t=Ge[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}Ge.splice(0,t),He+=t})).observe(qe,{characterData:!0});const Ve={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},Ye={run:t=>(Ue||(Ue=!0,qe.textContent=$e++),Ge.push(t),Le++),cancel(t){const e=t-He;if(e>=0){if(!Ge[e])throw new Error("invalid async handle: "+t);Ge[e]=null}}},Je=Ye,Ke=de((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],r=this._shouldPropertyChange(t,e,s);return r&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),r}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Je.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,i=this.__dataOld;this._shouldPropertiesChange(t,e,i)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,i)),this.__dataCounter--}_shouldPropertiesChange(t,e,i){return Boolean(e)}_propertiesChanged(t,e,i){}_shouldPropertyChange(t,e,i){return i!==e&&(i==i||e==e)}attributeChangedCallback(t,e,i,s){e!==i&&this._attributeToProperty(t,i),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,i,s)}_attributeToProperty(t,e,i){if(!this.__serializing){const s=this.__dataAttributes,r=s&&s[t]||t;this[r]=this._deserializeValue(e,i||this.constructor.typeForProperty(r))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=Ae(t)),void 0===s?t.removeAttribute(i):t.setAttribute(i,""===s&&window.trustedTypes?window.trustedTypes.emptyScript:s)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),Ze={};let Qe=HTMLElement.prototype;for(;Qe;){let t=Object.getOwnPropertyNames(Qe);for(let e=0;e<t.length;e++)Ze[t[e]]=!0;Qe=Object.getPrototypeOf(Qe)}const Xe=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,ti=de((t=>{const e=Ke(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(je(t[e]))}static attributeNameForProperty(t){return We(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t){if(Xe(t))return t;try{return JSON.stringify(t)}catch(t){return""}}}return super._serializeValue(t)}_deserializeValue(t,e){let i;switch(e){case Object:try{i=JSON.parse(t)}catch(e){i=t}break;case Array:try{i=JSON.parse(t)}catch(e){i=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:i=isNaN(t)?String(t):Number(t),i=new Date(i);break;default:i=super._deserializeValue(t,e)}return i}_definePropertyAccessor(t,e){!function(t,e){if(!Ze[e]){let i=t[e];void 0!==i&&(t.__data?t._setPendingProperty(e,i):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=i))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),ei={"dom-if":!0,"dom-repeat":!0};let ii=!1,si=!1;const ri=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const r=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(r,s)):e.setAttribute(s,r)}})();function oi(t){let e=t.getAttribute("is");if(e&&ei[e]){let i=t;for(i.removeAttribute("is"),t=i.ownerDocument.createElement(e),i.parentNode.replaceChild(t,i),t.appendChild(i);i.attributes.length;){const{name:e}=i.attributes[0];ri(t,i,e),i.removeAttribute(e)}}return t}function ai(t,e){let i=e.parentInfo&&ai(t,e.parentInfo);if(!i)return t;for(let t=i.firstChild,s=0;t;t=t.nextSibling)if(e.parentIndex===s++)return t}function ni(t,e,i,s){s.id&&(e[s.id]=i)}function li(t,e,i){if(i.events&&i.events.length)for(let s,r=0,o=i.events;r<o.length&&(s=o[r]);r++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function hi(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const ci=de((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let i=t._templateInfo={};i.nodeInfoList=[],i.nestedTemplate=Boolean(e),i.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute&&t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,i,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,i){return this._parseTemplateNode(t.content,e,i)}static _parseTemplateNode(t,e,i){let s=!1,r=t;return"template"!=r.localName||r.hasAttribute("preserve-content")?"slot"===r.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(r,e,i)||s,function(t){(function(){if(!ii){ii=!0;const t=document.createElement("textarea");t.placeholder="a",si=t.placeholder===t.textContent}return si})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(r),r.firstChild&&this._parseTemplateChildNodes(r,e,i),r.hasAttributes&&r.hasAttributes()&&(s=this._parseTemplateNodeAttributes(r,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,r=t.firstChild,o=0;r;r=s){if("template"==r.localName&&(r=oi(r)),s=r.nextSibling,r.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)r.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!r.textContent.trim()){t.removeChild(r);continue}}let a={parentIndex:o,parentInfo:i};this._parseTemplateNode(r,e,a)&&(a.infoIndex=e.nodeInfoList.push(a)-1),r.parentNode&&o++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,r=this._parseTemplate(s,e);return(r.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=r,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,r=Array.from(t.attributes);for(let o,a=r.length-1;o=r[a];a--)s=this._parseTemplateNodeAttribute(t,e,i,o.name,o.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,r){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:r}),!0):"id"===s&&(i.id=r,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let r=s.nodeList=new Array(i.length);s.$={};for(let t,o=0,a=i.length;o<a&&(t=i[o]);o++){let i=r[o]=ai(s,t);ni(0,s.$,i,t),hi(0,i,t,e),li(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let r=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,r),r}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
2008
- /**
2009
- * @fileoverview
2010
- * @suppress {checkPrototypalTypes}
2011
- * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2012
- * This code may only be used under the BSD style license found at
2013
- * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
2014
- * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
2015
- * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
2016
- * Google as part of the polymer project is also subject to an additional IP
2017
- * rights grant found at http://polymer.github.io/PATENTS.txt
2018
- */let di=0;const ui=[],pi={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},mi="__computeInfo",fi=/[A-Z]/;function bi(t,e,i){let s=t[e];if(s){if(!t.hasOwnProperty(e)&&(s=t[e]=Object.create(t[e]),i))for(let t in s){let e=s[t],i=s[t]=Array(e.length);for(let t=0;t<e.length;t++)i[t]=e[t]}}else s=t[e]={};return s}function vi(t,e,i,s,r,o){if(e){let a=!1;const n=di++;for(let l in i){let h=e[r?Se(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===n||r&&!yi(l,e.trigger)||(e.info&&(e.info.lastRun=n),e.fn(t,l,i,s,e.info,r,o),a=!0)}return a}return!1}function gi(t,e,i,s,r,o,a,n){let l=!1,h=e[a?Se(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&&!yi(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,r,o,e.info,a,n),l=!0);return l}function yi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!ze(i,t))||!(!e.wildcard||!Be(i,t))}return!0}function wi(t,e,i,s,r){let o="string"==typeof r.method?t[r.method]:r.method,a=r.property;o?o.call(t,t.__data[a],s[a]):r.dynamicFn||console.warn("observer method `"+r.method+"` not defined")}function xi(t,e,i){let s=Se(e);return s!==e&&(ki(t,We(s)+"-changed",i[e],e),!0)}function ki(t,e,i,s){let r={value:i,queueProperty:!0};s&&(r.path=s),Ae(t).dispatchEvent(new CustomEvent(e,{detail:r}))}function _i(t,e,i,s,r,o){let a=(o?Se(e):e)!=e?e:null,n=a?Me(t,a):t.__data[e];a&&void 0===n&&(n=i[e]),ki(t,r.eventName,n,a)}function Ci(t,e,i,s,r){let o=t.__data[e];Qt&&(o=Qt(o,r.attrName,"attribute",t)),t._propertyToAttribute(e,r.attrName,o)}const Di=(t,e,i)=>{let s=0,r=e.length-1,o=-1;for(;s<=r;){const a=s+r>>1,n=i.get(e[a].methodInfo)-i.get(t.methodInfo);if(n<0)s=a+1;else{if(!(n>0)){o=a;break}r=a-1}}o<0&&(o=r+1),e.splice(o,0,t)},Ai=(t,e,i,s,r)=>{const o=e[r?Se(t):t];if(o)for(let e=0;e<o.length;e++){const a=o[e];a.info.lastRun===di||r&&!yi(t,a.trigger)||(a.info.lastRun=di,Di(a.info,i,s))}};function Ti(t,e,i,s,r){let o=Mi(t,e,i,0,r);if(o===ui)return!1;let a=r.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[a]?t._setPendingProperty(a,o,!0):(t[a]=o,!1)}function Si(t,e,i,s,r,o,a){i.bindings=i.bindings||[];let n={kind:s,target:r,parts:o,literal:a,isCompound:1!==o.length};if(i.bindings.push(n),function(t){return Boolean(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||We(r)+"-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,zi(t,e,n,s,l)}}function zi(t,e,i,s,r){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let o=s.dependencies,a={index:r,binding:i,part:s,evaluator:t};for(let i=0;i<o.length;i++){let s=o[i];"string"==typeof s&&(s=Li(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Bi,info:a,trigger:s})}}}function Bi(t,e,i,s,r,o,a){let n=a[r.index],l=r.binding,h=r.part;if(o&&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=Pe(h.source,l.target,e),n._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(n)}else{let a=r.evaluator._evaluateBinding(t,h,e,i,s,o);a!==ui&&function(t,e,i,s,r){if(r=function(t,e,i,s){if(i.isCompound){let r=t.__dataCompoundStorage[i.target];r[s.compoundIndex]=e,e=r.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,r,i,s),Qt&&(r=Qt(r,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,r,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[pi.READ_ONLY]&&e[pi.READ_ONLY][s]||e._setPendingProperty(s,r)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,r)}}(t,n,l,h,a)}}function Pi(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,r=new Array(s.length);for(let t=0;t<s.length;t++)r[t]=s[t].literal;let o=e.target;i[o]=r,e.literal&&"property"==e.kind&&("className"===o&&(t=Ae(t)),t[o]=e.literal)}}function Ni(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,r){let o,a=t.detail,n=a&&a.path;n?(s=Pe(i,s,n),o=a&&a.value):o=t.currentTarget[i],o=r?!o:o,e[pi.READ_ONLY]&&e[pi.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,o,!0,Boolean(n))||a&&a.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Ii(t,e,i,s,r,o){let a={methodName:e.methodName,args:e.args,methodInfo:r,dynamicFn:o=e.static||o&&("object"!=typeof o||o[e.methodName])};for(let r,o=0;o<e.args.length&&(r=e.args[o]);o++)r.literal||t._addPropertyEffect(r.rootProperty,i,{fn:s,info:a,trigger:r});return o&&t._addPropertyEffect(e.methodName,i,{fn:s,info:a}),a}function Mi(t,e,i,s,r){let o=t._methodHost||t,a=o[r.methodName];if(a){let s=t._marshalArgs(r.args,e,i);return s===ui?ui:a.apply(o,s)}r.dynamicFn||console.warn("method `"+r.methodName+"` not defined")}const Oi=[],Fi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Ei="(?:("+Fi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ri=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Fi+"\\s*(?:\\(\\s*(?:(?:"+Ei+"(?:,\\s*"+Ei+")*)?)\\)\\s*)?)(?:]]|}})","g");function ji(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Wi(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Oi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Li(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Li(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=Se(e),i.structured=Te(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Hi(t,e,i){let s=Me(t,i);return void 0===s&&(s=e[i]),s}function Gi(t,e,i,s){const r={indexSplices:s};re&&!t._overrideLegacyUndefined&&(e.splices=r),t.notifyPath(i+".splices",r),t.notifyPath(i+".length",e.length),re&&!t._overrideLegacyUndefined&&(r.indexSplices=[])}function $i(t,e,i,s,r,o){Gi(t,e,i,[{index:s,addedCount:r,removed:o,object:e,type:"splice"}])}const Ui=de((t=>{const e=ci(ti(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return pi}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(qi.length){let t=qi[qi.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[pi.READ_ONLY];for(let i in t)e&&e[i]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[i]=this.__dataPending[i]=t[i])}_addPropertyEffect(t,e,i){this._createPropertyAccessor(t,e==pi.READ_ONLY);let s=bi(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=bi(this,e,!0)[t],r=s.indexOf(i);r>=0&&s.splice(r,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,pi.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,pi.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,pi.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,pi.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||Se(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Me(this,t);if(!(t=Oe(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let r;for(let o in s){let a=s[o];Be(o,e)?(r=Pe(o,a,e),t._setPendingPropertyOrPath(r,i,!0,!0)):Be(a,e)&&(r=Pe(a,o,e),t._setPendingPropertyOrPath(r,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=Ae(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&Te(t);return!!this._shouldPropertyChange(t,e,(s?this.__dataTemp:this.__data)[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),s?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(s||this[pi.NOTIFY]&&this[pi.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=i),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let i=t[e];i.__dataEnabled?i.__dataPending&&i._flushProperties():i._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let i in t)!e&&this[pi.READ_ONLY]&&this[pi.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,r=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let r=t[pi.COMPUTE];if(r)if(oe){di++;const o=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[pi.COMPUTE];let s,{counts:r,ready:o,total:a}=function(t){const e=t[mi],i={},s=t[pi.COMPUTE],r=[];let o=0;for(let t in e){const s=e[t];o+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||r.push(t);return{counts:i,ready:r,total:o}}(t);for(;s=o.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--a,0==--r[e]&&o.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)Ai(t,r,a,o,s);let n;for(;n=a.shift();)Ti(t,"",e,0,n)&&Ai(n.methodInfo,r,a,o,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let o=e;for(;vi(t,r,o,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),o=t.__dataPending,t.__dataPending=null}}(this,e,i,r),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,r),this._flushClients(),vi(this,this[pi.REFLECT],e,i,r),vi(this,this[pi.OBSERVE],e,i,r),s&&function(t,e,i,s,r){let o,a,n=t[pi.NOTIFY],l=di++;for(let a in e)e[a]&&(n&&gi(t,n,l,a,i,s,r)||r&&xi(t,a,i))&&(o=!0);o&&(a=t.__dataHost)&&a._invalidateProperties&&a._invalidateProperties()}(this,s,e,i,r),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[pi.PROPAGATE]&&vi(this,this[pi.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const r=(e,s)=>{vi(this,t.propertyEffects,e,i,s,t.nodeList);for(let r=t.firstChild;r;r=r.nextSibling)this._runEffectsForTemplate(r,e,i,s)};t.runEffects?t.runEffects(r,e,s):r(e,s)}linkPaths(t,e){t=Ne(t),e=Ne(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Ne(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};Gi(this,Me(this,t,i),i.path,e)}get(t,e){return Me(e||this,t)}set(t,e,i){i?Oe(i,t,e):this[pi.READ_ONLY]&&this[pi.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Me(this,t,i),r=s.length,o=s.push(...e);return e.length&&$i(this,s,i.path,r,e.length,[]),o}pop(t){let e={path:""},i=Me(this,t,e),s=Boolean(i.length),r=i.pop();return s&&$i(this,i,e.path,i.length,0,[r]),r}splice(t,e,i,...s){let r,o={path:""},a=Me(this,t,o);return e<0?e=a.length-Math.floor(-e):e&&(e=Math.floor(e)),r=2===arguments.length?a.splice(e):a.splice(e,i,...s),(s.length||r.length)&&$i(this,a,o.path,e,s.length,r),r}shift(t){let e={path:""},i=Me(this,t,e),s=Boolean(i.length),r=i.shift();return s&&$i(this,i,e.path,0,0,[r]),r}unshift(t,...e){let i={path:""},s=Me(this,t,i),r=s.unshift(...e);return e.length&&$i(this,s,i.path,0,e.length,[]),r}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Me(this,t,s),i=s.path}else i=Array.isArray(t)?Ne(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,pi.READ_ONLY),e&&(this["_set"+(i=t,i[0].toUpperCase()+i.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,i){let s={property:t,method:e,dynamicFn:Boolean(i)};this._addPropertyEffect(t,pi.OBSERVE,{fn:wi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,pi.OBSERVE,{fn:wi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Wi(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Ii(this,i,pi.OBSERVE,Mi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,pi.NOTIFY,{fn:_i,info:{eventName:We(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,pi.REFLECT,{fn:Ci,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Wi(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const r=Ii(this,s,pi.COMPUTE,Ti,t,i);bi(this,mi)[t]=r}_marshalArgs(t,e,i){const s=this.__data,r=[];for(let o=0,a=t.length;o<a;o++){let{name:a,structured:n,wildcard:l,value:h,literal:c}=t[o];if(!c)if(l){const t=Be(a,e),r=Hi(s,i,t?e:a);h={path:t?e:a,value:r,base:t?Me(s,a):r}}else h=n?Hi(s,i,a):s[a];if(re&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ui;r[o]=h}return r}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),qi.push(this);let i=super._stampTemplate(t,e);if(qi.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let r=i[e],o=s[e].bindings;if(o)for(let e=0;e<o.length;e++){let i=o[e];Pi(r,i),Ni(r,t,i)}r.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:r}=e;i?i.nextSibling=s:r&&(r.firstChild=s),s?s.previousSibling=i:r&&(r.lastChild=i),e.nextSibling=e.previousSibling=null;let o=e.childNodes;for(let t=0;t<o.length;t++){let e=o[t];Ae(Ae(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let r=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=ji(e)||" ",Si(this,i,s,"text","textContent",e),r=!0)}return r}static _parseTemplateNodeAttribute(t,i,s,r,o){let a=this._parseBindings(o,i);if(a){let e=r,o="property";fi.test(r)?o="attribute":"$"==r[r.length-1]&&(r=r.slice(0,-1),o="attribute");let n=ji(a);return n&&"attribute"==o&&("class"==r&&t.hasAttribute("class")&&(n+=" "+t.getAttribute(r)),t.setAttribute(r,n)),"attribute"==o&&"disable-upgrade$"==e&&t.setAttribute(r,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===o&&(r=je(r)),Si(this,i,s,o,r,a,n),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,r,o)}static _parseTemplateNestedTemplate(t,i,s){let r=e._parseTemplateNestedTemplate.call(this,t,i,s);const o=t.parentNode,a=s.templateInfo,n="dom-if"===o.localName;ae&&(n||"dom-repeat"===o.localName)&&(o.removeChild(t),(s=s.parentInfo).templateInfo=a,s.noted=!0,r=!1);let l=a.hostProps;if(ne&&n)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ae||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)Si(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return r}static _parseBindings(t,e){let i,s=[],r=0;for(;null!==(i=Ri.exec(t));){i.index>r&&s.push({literal:t.slice(r,i.index)});let o=i[1][0],a=Boolean(i[2]),n=i[3].trim(),l=!1,h="",c=-1;"{"==o&&(c=n.indexOf("::"))>0&&(h=n.substring(c+2),n=n.substring(0,c),l=!0);let d=Wi(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:o,negate:a,customEvent:l,signature:d,dependencies:u,event:h}),r=Ri.lastIndex}if(r&&r<t.length){let e=t.substring(r);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,r,o){let a;return a=e.signature?Mi(t,i,s,0,e.signature):i!=e.source?Me(t,e.source):o&&Te(i)?Me(t,i):t.__data[i],e.negate&&(a=!a),a}}})),qi=[],Vi=de((t=>{const e=Ke(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof r?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
2019
- /**
2020
- @license
2021
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2022
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2023
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2024
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2025
- Code distributed by Google as part of the polymer project is also
2026
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2027
- */
2028
- function(t){const e={};for(let i in t){const s=t[i];e[i]="function"==typeof s?{type:s}:s}return e}(i))}t.__ownProperties=e}return t.__ownProperties}class r extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return r})),Yi=window.ShadyCSS&&window.ShadyCSS.cssBuild,Ji=de((t=>{const e=Vi(Ui(t));function i(t,e,i,s){i.computed&&(i.readOnly=!0),i.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,i.computed,s)),i.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!i.computed):!1===i.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),i.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===i.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),i.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===i.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),i.observer&&t._createPropertyObserver(e,i.observer,s[i.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.5.2"}static _finalizeClass(){e._finalizeClass.call(this);const t=((i=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",i))||(i.__ownObservers=i.hasOwnProperty(JSCompiler_renameProperty("observers",i))?i.observers:null),i.__ownObservers);var i;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):ee||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)i(this.prototype,e,t[e],t)}static createObservers(t,e){const i=this.prototype;for(let s=0;s<t.length;s++)i._createMethodObserver(t[s],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;"function"==typeof t&&(t=t()),this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!Xt||te)&&(e=be.import(t,"template"),Xt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=Yt(t.url);else{const t=be.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super()}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Zt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let i in e){let s=e[i];"value"in s&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[i]=s)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let i=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof i.value?i.value.call(this):i.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return Vt(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const i=this.importPath;(function(t,e,i,s){if(!Yi){const r=e.content.querySelectorAll("style"),o=Ce(e),a=function(t){let e=we(t);return e?De(e):[]}(i),n=e.content.firstElementChild;for(let i=0;i<a.length;i++){let r=a[i];r.textContent=t._processStyleText(r.textContent,s),e.content.insertBefore(r,n)}let l=0;for(let e=0;e<o.length;e++){let i=o[e],a=r[l];a!==i?(i=i.cloneNode(!0),a.parentNode.insertBefore(i,a)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),he&&Yi&&Kt){const i=e.content.querySelectorAll("style");if(i){let e="";Array.from(i).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,i?qt(i):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=Ae(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),se&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=qt(this.importPath)),qt(t,e)}static _parseTemplateContent(t,i,s){return i.dynamicFns=i.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,i,s)}static _addTemplatePropertyEffect(t,i,s){return!ie||i in this._properties||s.info.part.signature&&s.info.part.signature.static||s.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${i}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,i,s)}}})),Ki=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Zi{constructor(t,e){ts(t,e);const i=e.reduce(((e,i,s)=>e+Qi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Qi(t){if(t instanceof Zi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Xi=function(t,...e){ts(t,e);const i=document.createElement("template");let s=e.reduce(((e,i,s)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof Zi)return Qi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return Ki&&(s=Ki.createHTML(s)),i.innerHTML=s,i},ts=(t,e)=>{if(!Array.isArray(t)||!Array.isArray(t.raw)||e.length!==t.length-1)throw new TypeError("Invalid call to the html template tag")},es=Ji(HTMLElement),is=[];function ss(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function rs(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=rs();is.forEach((e=>{ss(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const os=t=>class extends t{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>""===t?null:t}}}}get __isRTL(){return"rtl"===this.getAttribute("dir")}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")&&!this.__restoreSubscription||(this.__subscribe(),ss(this,rs(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=rs(),r=i===s&&-1===is.indexOf(this),o=!i&&e&&-1===is.indexOf(this),a=i!==s&&e===s;r||o?(this.__subscribe(),ss(this,s,i)):a&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=is.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,e,i){("dir"!==i||""!==e||t.hasAttribute("dir"))&&super._valueToNodeAttribute(t,e,i)}_attributeToProperty(t,e,i){"dir"!==t||e?super._attributeToProperty(t,e,i):this.dir=""}__subscribe(){is.includes(this)||is.push(this)}__unsubscribe(){is.includes(this)&&is.splice(is.indexOf(this),1)}}
2029
- /**
2030
- * @license
2031
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2032
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2033
- */,as=t=>class extends t{static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",(t=>{t.target===this&&t.preventDefault()})),this.addEventListener("click",(t=>{t.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach((t=>t.focus&&t.focus()))}))}}
2034
- /**
2035
- * @license
2036
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2037
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2038
- */;
2039
- /**
2040
- * @license
2041
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2042
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2043
- */
2044
- Tt("vaadin-input-container",g`
2045
- :host {
2046
- display: flex;
2047
- align-items: center;
2048
- flex: 0 1 auto;
2049
- border-radius:
2050
- /* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
2051
- var(--vaadin-input-field-top-start-radius, var(--__border-radius))
2052
- var(--vaadin-input-field-top-end-radius, var(--__border-radius))
2053
- var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
2054
- var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
2055
- --_border-radius: var(--vaadin-input-field-border-radius, 0);
2056
- --_input-border-width: var(--vaadin-input-field-border-width, 0);
2057
- --_input-border-color: var(--vaadin-input-field-border-color, transparent);
2058
- box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
2059
- }
2060
-
2061
- :host([dir='rtl']) {
2062
- border-radius:
2063
- /* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
2064
- var(--vaadin-input-field-top-end-radius, var(--_border-radius))
2065
- var(--vaadin-input-field-top-start-radius, var(--_border-radius))
2066
- var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
2067
- var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
2068
- }
2069
-
2070
- :host([hidden]) {
2071
- display: none !important;
2072
- }
2073
-
2074
- /* Reset the native input styles */
2075
- ::slotted(input) {
2076
- -webkit-appearance: none;
2077
- -moz-appearance: none;
2078
- flex: auto;
2079
- white-space: nowrap;
2080
- overflow: hidden;
2081
- width: 100%;
2082
- height: 100%;
2083
- outline: none;
2084
- margin: 0;
2085
- padding: 0;
2086
- border: 0;
2087
- border-radius: 0;
2088
- min-width: 0;
2089
- font: inherit;
2090
- line-height: normal;
2091
- color: inherit;
2092
- background-color: transparent;
2093
- /* Disable default invalid style in Firefox */
2094
- box-shadow: none;
2095
- }
2096
-
2097
- ::slotted(*) {
2098
- flex: none;
2099
- }
2100
-
2101
- ::slotted(:is(input, textarea))::placeholder {
2102
- /* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
2103
- /* because ::slotted(...)::placeholder does not work in Safari. */
2104
- font: inherit;
2105
- color: inherit;
2106
- /* Override default opacity in Firefox */
2107
- opacity: 1;
2108
- }
2109
- `,{moduleId:"vaadin-input-container-styles"});class ns extends(as(Nt(os(es)))){static get is(){return"vaadin-input-container"}static get template(){return Xi`
2110
- <slot name="prefix"></slot>
2111
- <slot></slot>
2112
- <slot name="suffix"></slot>
2113
- `}}d(ns);
2114
- /**
2115
- * @license
2116
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2117
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2118
- */
2119
- const ls=g`
2120
- :host {
2121
- z-index: 200;
2122
- position: fixed;
2123
-
2124
- /* Despite of what the names say, <vaadin-overlay> is just a container
2125
- for position/sizing/alignment. The actual overlay is the overlay part. */
2126
-
2127
- /* Default position constraints: the entire viewport. Note: themes can
2128
- override this to introduce gaps between the overlay and the viewport. */
2129
- inset: 0;
2130
- bottom: var(--vaadin-overlay-viewport-bottom);
2131
-
2132
- /* Use flexbox alignment for the overlay part. */
2133
- display: flex;
2134
- flex-direction: column; /* makes dropdowns sizing easier */
2135
- /* Align to center by default. */
2136
- align-items: center;
2137
- justify-content: center;
2138
-
2139
- /* Allow centering when max-width/max-height applies. */
2140
- margin: auto;
2141
-
2142
- /* The host is not clickable, only the overlay part is. */
2143
- pointer-events: none;
2144
-
2145
- /* Remove tap highlight on touch devices. */
2146
- -webkit-tap-highlight-color: transparent;
2147
-
2148
- /* CSS API for host */
2149
- --vaadin-overlay-viewport-bottom: 0;
2150
- }
2151
-
2152
- :host([hidden]),
2153
- :host(:not([opened]):not([closing])),
2154
- :host(:not([opened]):not([closing])) [part='overlay'] {
2155
- display: none !important;
2156
- }
2157
-
2158
- [part='overlay'] {
2159
- -webkit-overflow-scrolling: touch;
2160
- overflow: auto;
2161
- pointer-events: auto;
2162
-
2163
- /* Prevent overflowing the host */
2164
- max-width: 100%;
2165
- box-sizing: border-box;
2166
-
2167
- -webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
2168
- }
2169
-
2170
- [part='backdrop'] {
2171
- z-index: -1;
2172
- content: '';
2173
- background: rgba(0, 0, 0, 0.5);
2174
- position: fixed;
2175
- inset: 0;
2176
- pointer-events: auto;
2177
- }
2178
- `;
2179
- /**
2180
- * @license
2181
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2182
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2183
- */let hs=!1;function cs(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ds(){return hs}function us(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}function ps(t,e){const i=Math.max(t.tabIndex,0),s=Math.max(e.tabIndex,0);return 0===i||0===s?s>i:i>s}function ms(t){const e=t.length;if(e<2)return t;const i=Math.ceil(e/2);return function(t,e){const i=[];for(;t.length>0&&e.length>0;)ps(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(ms(t.slice(0,i)),ms(t.slice(i)))}function fs(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||us(t)}function bs(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}function vs(t){return t.getRootNode().activeElement===t}function gs(t,e){if(t.nodeType!==Node.ELEMENT_NODE||us(t))return!1;const i=t,s=function(t){if(!bs(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let r=s>0;s>=0&&e.push(i);let o=[];return o="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...o].forEach((t=>{r=gs(t,e)||r})),r}window.addEventListener("keydown",(()=>{hs=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{hs=!1}),{capture:!0});
2184
- /**
2185
- @license
2186
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2187
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2188
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2189
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2190
- Code distributed by Google as part of the polymer project is also
2191
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2192
- */
2193
- let ys=!1,ws=[],xs=[];function ks(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function _s(t,e,i){ys||(ys=!0,requestAnimationFrame((function(){ys=!1,function(t){for(;t.length;)ks(t.shift())}(ws),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)ks(t.shift())}(xs)}))}))),xs.push([t,e,i])}
2194
- /**
2195
- * @license
2196
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2197
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2198
- */const Cs=t=>t.test(navigator.userAgent),Ds=t=>t.test(navigator.platform);Cs(/Android/u),Cs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),Cs(/Firefox/u);const As=Ds(/^iPad/u)||Ds(/^Mac/u)&&navigator.maxTouchPoints>1,Ts=Ds(/^iPhone/u)||As;Cs(/^((?!chrome|android).)*safari/iu);const Ss=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(t){return!1}})();
2199
- /**
2200
- * @license
2201
- * Copyright (c) 2017 Anton Korzunov
2202
- * SPDX-License-Identifier: MIT
2203
- */let zs=new WeakMap,Bs=new WeakMap,Ps={},Ns=0;const Is=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ms=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Os=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const r=((t,e)=>Is(t)?e.map((e=>{if(!Is(e))return Ms(e,"is not a valid element"),null;let i=e;for(;i&&i!==t;){if(t.contains(i))return e;i=i.getRootNode().host}return Ms(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Ms(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);Ps[i]||(Ps[i]=new WeakMap);const o=Ps[i],a=[],n=new Set,l=new Set(r),h=t=>{if(!t||n.has(t))return;n.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};r.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(n.has(t))c(t);else{const e=t.getAttribute(s),r=null!==e&&"false"!==e,n=(zs.get(t)||0)+1,l=(o.get(t)||0)+1;zs.set(t,n),o.set(t,l),a.push(t),1===n&&r&&Bs.set(t,!0),1===l&&t.setAttribute(i,"true"),r||t.setAttribute(s,"true")}}))};return c(e),n.clear(),Ns+=1,()=>{a.forEach((t=>{const e=zs.get(t)-1,r=o.get(t)-1;zs.set(t,e),o.set(t,r),e||(Bs.has(t)?Bs.delete(t):t.removeAttribute(s)),r||t.removeAttribute(i)})),Ns-=1,Ns||(zs=new WeakMap,zs=new WeakMap,Bs=new WeakMap,Ps={})}})(s,e,i,"aria-hidden")};
2204
- /**
2205
- * @license
2206
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2207
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2208
- */
2209
- class Fs{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=Os(t)}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null)}}
2210
- /**
2211
- * @license
2212
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2213
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2214
- */class Es{saveFocus(t){this.focusNode=t||cs()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;cs()===document.body?setTimeout((()=>e.focus({preventScroll:i}))):e.focus({preventScroll:i}),this.focusNode=null}}
2215
- /**
2216
- * @license
2217
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2218
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2219
- */const Rs=[];class js{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return gs(t,e)?ms(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(vs).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.");Rs.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Rs.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Rs).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()}}
2220
- /**
2221
- * @license
2222
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2223
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2224
- */const Ws=de((t=>"function"==typeof t.prototype.addController?t:class extends t{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach((t=>{t.hostConnected&&t.hostConnected()}))}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach((t=>{t.hostDisconnected&&t.hostDisconnected()}))}addController(t){this.__controllers.add(t),void 0!==this.$&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}})),Ls=t=>class extends(Ws(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Fs(this),this.__focusTrapController=new js(this),this.__focusRestorationController=new Es}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=!ds();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=cs();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}}
2225
- /**
2226
- * @license
2227
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2228
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2229
- */,Hs=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Gs=()=>Hs().filter((t=>t.$.overlay)),$s=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Gs().pop())()}bringToFront(){let t="";const e=Hs().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"),Gs().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=Gs();let e;for(;(e=t.pop())&&(e===this||(e.$.overlay.style.removeProperty("pointer-events"),e.modeless)););}}
2230
- /**
2231
- * @license
2232
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2233
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2234
- */,Us=t=>class extends(Ls($s(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),Ts&&(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,i=document.documentElement.clientHeight;this.style.setProperty("--vaadin-overlay-viewport-bottom",e>t&&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 r=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const o=this._oldRenderer!==t,a=void 0!==this._oldRenderer;this._oldRenderer=t;const n=this._oldOpened!==s;this._oldOpened=s,o&&a&&(this.innerHTML="",delete this._$litPart$),s&&t&&(o||n||r)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),_s(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)}}}
2235
- /**
2236
- * @license
2237
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2238
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2239
- */;
2240
- /**
2241
- * @license
2242
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2243
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2244
- */function qs(t){const e=[];let i;return"slot"===t.localName?i=t.assignedElements():(e.push(t),i=[...t.children]),i.forEach((t=>e.push(...qs(t)))),e}function Vs(t){return t?new Set(t.split(" ")):new Set}function Ys(t){return t?[...t].join(" "):""}function Js(t,e,i){const s=Vs(t.getAttribute(e));s.add(i),t.setAttribute(e,Ys(s))}
2245
- /**
2246
- * @license
2247
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2248
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2249
- */
2250
- const Ks={start:"top",end:"bottom"},Zs={start:"left",end:"right"},Qs=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),Xs=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=function(t){const e=[];for(;t;){if(t.nodeType===Node.DOCUMENT_NODE){e.push(t);break}t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?t=t.assignedSlot?t.assignedSlot:t.parentNode:(e.push(t),t=t.host)}return e}(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)})),this.positionTarget&&(this.__observePositionTargetMove=
2251
- /**
2252
- * @license
2253
- * Copyright (c) 2024 Vaadin Ltd.
2254
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2255
- */
2256
- function(t,e){let i=null;const s=document.documentElement;function r(){i&&i.disconnect(),i=null}return function o(a=!1,n=1){r();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(a||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,n))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==n){if(!p)return o();0===e&&(e=1e-7),o(!1,e)}p=!1}),u),i.observe(t)}(!0),r}(this.positionTarget,(()=>{this._updatePosition()})))}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,Qs.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,Qs.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),r=!i&&s||i&&!s;this.style.alignItems=r?"flex-start":"flex-end";const o=this.getBoundingClientRect(),a=this.__calculatePositionInOneDimension(t,o,this.noVerticalOverlap,Ks,this,e),n=this.__calculatePositionInOneDimension(t,o,this.noHorizontalOverlap,Zs,this,s);Object.assign(this.style,a,n),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!r),this.toggleAttribute("start-aligned",r)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Zs)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight);return this.__shouldAlignStart(t,e,i,this.__margins,"top"===this.verticalAlign,this.noVerticalOverlap,Ks)}__shouldAlignStart(t,e,i,s,r,o,a){const n=i-t[o?a.end:a.start]-s[a.end],l=t[o?a.start:a.end]-s[a.start],h=r?n:l;return r===(h>(r?l:n)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Ks.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(s=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===Zs.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,r,o){const a=o?s.start:s.end,n=o?s.end:s.start,l=parseFloat(r.style[a]||getComputedStyle(r)[a]),h=this.__adjustBottomProperty(a,s,l),c=h?`${h}px`:`${l+(e[o?s.start:s.end]-t[i===o?s.end:s.start])*(o?-1:1)}px`;return{[a]:c,[n]:""}}}
2257
- /**
2258
- * @license
2259
- * Copyright (c) 2015 - 2024 Vaadin Ltd.
2260
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2261
- */,tr=t=>class extends(Xs(Us(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!bs(t.composedPath()[0])&&t.preventDefault()}}
2262
- /**
2263
- * @license
2264
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2265
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2266
- */;
2267
- /**
2268
- * @license
2269
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2270
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2271
- */
2272
- Tt("vaadin-date-picker-overlay",[ls,g`
2273
- [part='overlay'] {
2274
- display: flex;
2275
- flex: auto;
2276
- }
2277
-
2278
- [part~='content'] {
2279
- flex: auto;
2280
- }
2281
-
2282
- @media (forced-colors: active) {
2283
- [part='overlay'] {
2284
- outline: 3px solid;
2285
- }
2286
- }
2287
- `],{moduleId:"vaadin-date-picker-overlay-styles"});class er extends(tr(os(Nt(es)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Xi`
2288
- <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
2289
- <div part="overlay" id="overlay">
2290
- <div part="content" id="content">
2291
- <slot></slot>
2292
- </div>
2293
- </div>
2294
- `}}d(er);const ir=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,sr=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function rr(t,e){if("function"!=typeof t)return;const i=ir.exec(t.toString());if(i)try{t=new Function(i[1])}catch(t){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",t)}return t(e)}window.Vaadin=window.Vaadin||{};function or(){
2295
- /*! vaadin-dev-mode:start
2296
- (function () {
2297
- 'use strict';
2298
-
2299
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
2300
- return typeof obj;
2301
- } : function (obj) {
2302
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
2303
- };
2304
-
2305
- var classCallCheck = function (instance, Constructor) {
2306
- if (!(instance instanceof Constructor)) {
2307
- throw new TypeError("Cannot call a class as a function");
2308
- }
2309
- };
2310
-
2311
- var createClass = function () {
2312
- function defineProperties(target, props) {
2313
- for (var i = 0; i < props.length; i++) {
2314
- var descriptor = props[i];
2315
- descriptor.enumerable = descriptor.enumerable || false;
2316
- descriptor.configurable = true;
2317
- if ("value" in descriptor) descriptor.writable = true;
2318
- Object.defineProperty(target, descriptor.key, descriptor);
2319
- }
2320
- }
2321
-
2322
- return function (Constructor, protoProps, staticProps) {
2323
- if (protoProps) defineProperties(Constructor.prototype, protoProps);
2324
- if (staticProps) defineProperties(Constructor, staticProps);
2325
- return Constructor;
2326
- };
2327
- }();
2328
-
2329
- var getPolymerVersion = function getPolymerVersion() {
2330
- return window.Polymer && window.Polymer.version;
2331
- };
2332
-
2333
- var StatisticsGatherer = function () {
2334
- function StatisticsGatherer(logger) {
2335
- classCallCheck(this, StatisticsGatherer);
2336
-
2337
- this.now = new Date().getTime();
2338
- this.logger = logger;
2339
- }
2340
-
2341
- createClass(StatisticsGatherer, [{
2342
- key: 'frameworkVersionDetectors',
2343
- value: function frameworkVersionDetectors() {
2344
- return {
2345
- 'Flow': function Flow() {
2346
- if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
2347
- var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
2348
- return window.Vaadin.Flow.clients[key];
2349
- }).filter(function (client) {
2350
- return client.getVersionInfo;
2351
- }).map(function (client) {
2352
- return client.getVersionInfo().flow;
2353
- });
2354
- if (flowVersions.length > 0) {
2355
- return flowVersions[0];
2356
- }
2357
- }
2358
- },
2359
- 'Vaadin Framework': function VaadinFramework() {
2360
- if (window.vaadin && window.vaadin.clients) {
2361
- var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
2362
- return client.getVersionInfo;
2363
- }).map(function (client) {
2364
- return client.getVersionInfo().vaadinVersion;
2365
- });
2366
- if (frameworkVersions.length > 0) {
2367
- return frameworkVersions[0];
2368
- }
2369
- }
2370
- },
2371
- 'AngularJs': function AngularJs() {
2372
- if (window.angular && window.angular.version && window.angular.version) {
2373
- return window.angular.version.full;
2374
- }
2375
- },
2376
- 'Angular': function Angular() {
2377
- if (window.ng) {
2378
- var tags = document.querySelectorAll("[ng-version]");
2379
- if (tags.length > 0) {
2380
- return tags[0].getAttribute("ng-version");
2381
- }
2382
- return "Unknown";
2383
- }
2384
- },
2385
- 'Backbone.js': function BackboneJs() {
2386
- if (window.Backbone) {
2387
- return window.Backbone.VERSION;
2388
- }
2389
- },
2390
- 'React': function React() {
2391
- var reactSelector = '[data-reactroot], [data-reactid]';
2392
- if (!!document.querySelector(reactSelector)) {
2393
- // React does not publish the version by default
2394
- return "unknown";
2395
- }
2396
- },
2397
- 'Ember': function Ember() {
2398
- if (window.Em && window.Em.VERSION) {
2399
- return window.Em.VERSION;
2400
- } else if (window.Ember && window.Ember.VERSION) {
2401
- return window.Ember.VERSION;
2402
- }
2403
- },
2404
- 'jQuery': function (_jQuery) {
2405
- function jQuery() {
2406
- return _jQuery.apply(this, arguments);
2407
- }
2408
-
2409
- jQuery.toString = function () {
2410
- return _jQuery.toString();
2411
- };
2412
-
2413
- return jQuery;
2414
- }(function () {
2415
- if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
2416
- return jQuery.prototype.jquery;
2417
- }
2418
- }),
2419
- 'Polymer': function Polymer() {
2420
- var version = getPolymerVersion();
2421
- if (version) {
2422
- return version;
2423
- }
2424
- },
2425
- 'LitElement': function LitElement() {
2426
- var version = window.litElementVersions && window.litElementVersions[0];
2427
- if (version) {
2428
- return version;
2429
- }
2430
- },
2431
- 'LitHtml': function LitHtml() {
2432
- var version = window.litHtmlVersions && window.litHtmlVersions[0];
2433
- if (version) {
2434
- return version;
2435
- }
2436
- },
2437
- 'Vue.js': function VueJs() {
2438
- if (window.Vue) {
2439
- return window.Vue.version;
2440
- }
2441
- }
2442
- };
2443
- }
2444
- }, {
2445
- key: 'getUsedVaadinElements',
2446
- value: function getUsedVaadinElements(elements) {
2447
- var version = getPolymerVersion();
2448
- var elementClasses = void 0;
2449
- // NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
2450
- // Check all locations calling the method getEntries() in
2451
- // https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
2452
- // Currently it is only used by BootstrapHandler.
2453
- if (version && version.indexOf('2') === 0) {
2454
- // Polymer 2: components classes are stored in window.Vaadin
2455
- elementClasses = Object.keys(window.Vaadin).map(function (c) {
2456
- return window.Vaadin[c];
2457
- }).filter(function (c) {
2458
- return c.is;
2459
- });
2460
- } else {
2461
- // Polymer 3: components classes are stored in window.Vaadin.registrations
2462
- elementClasses = window.Vaadin.registrations || [];
2463
- }
2464
- elementClasses.forEach(function (klass) {
2465
- var version = klass.version ? klass.version : "0.0.0";
2466
- elements[klass.is] = { version: version };
2467
- });
2468
- }
2469
- }, {
2470
- key: 'getUsedVaadinThemes',
2471
- value: function getUsedVaadinThemes(themes) {
2472
- ['Lumo', 'Material'].forEach(function (themeName) {
2473
- var theme;
2474
- var version = getPolymerVersion();
2475
- if (version && version.indexOf('2') === 0) {
2476
- // Polymer 2: themes are stored in window.Vaadin
2477
- theme = window.Vaadin[themeName];
2478
- } else {
2479
- // Polymer 3: themes are stored in custom element registry
2480
- theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
2481
- }
2482
- if (theme && theme.version) {
2483
- themes[themeName] = { version: theme.version };
2484
- }
2485
- });
2486
- }
2487
- }, {
2488
- key: 'getFrameworks',
2489
- value: function getFrameworks(frameworks) {
2490
- var detectors = this.frameworkVersionDetectors();
2491
- Object.keys(detectors).forEach(function (framework) {
2492
- var detector = detectors[framework];
2493
- try {
2494
- var version = detector();
2495
- if (version) {
2496
- frameworks[framework] = { version: version };
2497
- }
2498
- } catch (e) {}
2499
- });
2500
- }
2501
- }, {
2502
- key: 'gather',
2503
- value: function gather(storage) {
2504
- var storedStats = storage.read();
2505
- var gatheredStats = {};
2506
- var types = ["elements", "frameworks", "themes"];
2507
-
2508
- types.forEach(function (type) {
2509
- gatheredStats[type] = {};
2510
- if (!storedStats[type]) {
2511
- storedStats[type] = {};
2512
- }
2513
- });
2514
-
2515
- var previousStats = JSON.stringify(storedStats);
2516
-
2517
- this.getUsedVaadinElements(gatheredStats.elements);
2518
- this.getFrameworks(gatheredStats.frameworks);
2519
- this.getUsedVaadinThemes(gatheredStats.themes);
2520
-
2521
- var now = this.now;
2522
- types.forEach(function (type) {
2523
- var keys = Object.keys(gatheredStats[type]);
2524
- keys.forEach(function (key) {
2525
- if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
2526
- storedStats[type][key] = { firstUsed: now };
2527
- }
2528
- // Discards any previously logged version number
2529
- storedStats[type][key].version = gatheredStats[type][key].version;
2530
- storedStats[type][key].lastUsed = now;
2531
- });
2532
- });
2533
-
2534
- var newStats = JSON.stringify(storedStats);
2535
- storage.write(newStats);
2536
- if (newStats != previousStats && Object.keys(storedStats).length > 0) {
2537
- this.logger.debug("New stats: " + newStats);
2538
- }
2539
- }
2540
- }]);
2541
- return StatisticsGatherer;
2542
- }();
2543
-
2544
- var StatisticsStorage = function () {
2545
- function StatisticsStorage(key) {
2546
- classCallCheck(this, StatisticsStorage);
2547
-
2548
- this.key = key;
2549
- }
2550
-
2551
- createClass(StatisticsStorage, [{
2552
- key: 'read',
2553
- value: function read() {
2554
- var localStorageStatsString = localStorage.getItem(this.key);
2555
- try {
2556
- return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
2557
- } catch (e) {
2558
- return {};
2559
- }
2560
- }
2561
- }, {
2562
- key: 'write',
2563
- value: function write(data) {
2564
- localStorage.setItem(this.key, data);
2565
- }
2566
- }, {
2567
- key: 'clear',
2568
- value: function clear() {
2569
- localStorage.removeItem(this.key);
2570
- }
2571
- }, {
2572
- key: 'isEmpty',
2573
- value: function isEmpty() {
2574
- var storedStats = this.read();
2575
- var empty = true;
2576
- Object.keys(storedStats).forEach(function (key) {
2577
- if (Object.keys(storedStats[key]).length > 0) {
2578
- empty = false;
2579
- }
2580
- });
2581
-
2582
- return empty;
2583
- }
2584
- }]);
2585
- return StatisticsStorage;
2586
- }();
2587
-
2588
- var StatisticsSender = function () {
2589
- function StatisticsSender(url, logger) {
2590
- classCallCheck(this, StatisticsSender);
2591
-
2592
- this.url = url;
2593
- this.logger = logger;
2594
- }
2595
-
2596
- createClass(StatisticsSender, [{
2597
- key: 'send',
2598
- value: function send(data, errorHandler) {
2599
- var logger = this.logger;
2600
-
2601
- if (navigator.onLine === false) {
2602
- logger.debug("Offline, can't send");
2603
- errorHandler();
2604
- return;
2605
- }
2606
- logger.debug("Sending data to " + this.url);
2607
-
2608
- var req = new XMLHttpRequest();
2609
- req.withCredentials = true;
2610
- req.addEventListener("load", function () {
2611
- // Stats sent, nothing more to do
2612
- logger.debug("Response: " + req.responseText);
2613
- });
2614
- req.addEventListener("error", function () {
2615
- logger.debug("Send failed");
2616
- errorHandler();
2617
- });
2618
- req.addEventListener("abort", function () {
2619
- logger.debug("Send aborted");
2620
- errorHandler();
2621
- });
2622
- req.open("POST", this.url);
2623
- req.setRequestHeader("Content-Type", "application/json");
2624
- req.send(data);
2625
- }
2626
- }]);
2627
- return StatisticsSender;
2628
- }();
2629
-
2630
- var StatisticsLogger = function () {
2631
- function StatisticsLogger(id) {
2632
- classCallCheck(this, StatisticsLogger);
2633
-
2634
- this.id = id;
2635
- }
2636
-
2637
- createClass(StatisticsLogger, [{
2638
- key: '_isDebug',
2639
- value: function _isDebug() {
2640
- return localStorage.getItem("vaadin." + this.id + ".debug");
2641
- }
2642
- }, {
2643
- key: 'debug',
2644
- value: function debug(msg) {
2645
- if (this._isDebug()) {
2646
- console.info(this.id + ": " + msg);
2647
- }
2648
- }
2649
- }]);
2650
- return StatisticsLogger;
2651
- }();
2652
-
2653
- var UsageStatistics = function () {
2654
- function UsageStatistics() {
2655
- classCallCheck(this, UsageStatistics);
2656
-
2657
- this.now = new Date();
2658
- this.timeNow = this.now.getTime();
2659
- this.gatherDelay = 10; // Delay between loading this file and gathering stats
2660
- this.initialDelay = 24 * 60 * 60;
2661
-
2662
- this.logger = new StatisticsLogger("statistics");
2663
- this.storage = new StatisticsStorage("vaadin.statistics.basket");
2664
- this.gatherer = new StatisticsGatherer(this.logger);
2665
- this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
2666
- }
2667
-
2668
- createClass(UsageStatistics, [{
2669
- key: 'maybeGatherAndSend',
2670
- value: function maybeGatherAndSend() {
2671
- var _this = this;
2672
-
2673
- if (localStorage.getItem(UsageStatistics.optOutKey)) {
2674
- return;
2675
- }
2676
- this.gatherer.gather(this.storage);
2677
- setTimeout(function () {
2678
- _this.maybeSend();
2679
- }, this.gatherDelay * 1000);
2680
- }
2681
- }, {
2682
- key: 'lottery',
2683
- value: function lottery() {
2684
- return true;
2685
- }
2686
- }, {
2687
- key: 'currentMonth',
2688
- value: function currentMonth() {
2689
- return this.now.getYear() * 12 + this.now.getMonth();
2690
- }
2691
- }, {
2692
- key: 'maybeSend',
2693
- value: function maybeSend() {
2694
- var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
2695
- var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
2696
-
2697
- if (!firstUse) {
2698
- // Use a grace period to avoid interfering with tests, incognito mode etc
2699
- firstUse = this.timeNow;
2700
- localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
2701
- }
2702
-
2703
- if (this.timeNow < firstUse + this.initialDelay * 1000) {
2704
- this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
2705
- return;
2706
- }
2707
- if (this.currentMonth() <= monthProcessed) {
2708
- this.logger.debug("This month has already been processed");
2709
- return;
2710
- }
2711
- localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
2712
- // Use random sampling
2713
- if (this.lottery()) {
2714
- this.logger.debug("Congratulations, we have a winner!");
2715
- } else {
2716
- this.logger.debug("Sorry, no stats from you this time");
2717
- return;
2718
- }
2719
-
2720
- this.send();
2721
- }
2722
- }, {
2723
- key: 'send',
2724
- value: function send() {
2725
- // Ensure we have the latest data
2726
- this.gatherer.gather(this.storage);
2727
-
2728
- // Read, send and clean up
2729
- var data = this.storage.read();
2730
- data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
2731
- data["usageStatisticsVersion"] = UsageStatistics.version;
2732
- var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
2733
- var self = this;
2734
- this.sender.send(info + JSON.stringify(data), function () {
2735
- // Revert the 'month processed' flag
2736
- localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
2737
- });
2738
- }
2739
- }], [{
2740
- key: 'version',
2741
- get: function get$1() {
2742
- return '2.1.2';
2743
- }
2744
- }, {
2745
- key: 'firstUseKey',
2746
- get: function get$1() {
2747
- return 'vaadin.statistics.firstuse';
2748
- }
2749
- }, {
2750
- key: 'monthProcessedKey',
2751
- get: function get$1() {
2752
- return 'vaadin.statistics.monthProcessed';
2753
- }
2754
- }, {
2755
- key: 'optOutKey',
2756
- get: function get$1() {
2757
- return 'vaadin.statistics.optout';
2758
- }
2759
- }]);
2760
- return UsageStatistics;
2761
- }();
2762
-
2763
- try {
2764
- window.Vaadin = window.Vaadin || {};
2765
- window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
2766
- window.Vaadin.usageStatsChecker.maybeGatherAndSend();
2767
- } catch (e) {
2768
- // Intentionally ignored as this is not a problem in the app being developed
2769
- }
2770
-
2771
- }());
2772
-
2773
- vaadin-dev-mode:end **/}void 0===window.Vaadin.developmentMode&&(window.Vaadin.developmentMode=function(){try{return!!localStorage.getItem("vaadin.developmentmode.force")||["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0&&(sr?!(sr&&Object.keys(sr).map((t=>sr[t])).filter((t=>t.productionMode)).length>0):!rr((function(){return!0})))}catch(t){return!1}}());
2774
- /**
2775
- * @license
2776
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2777
- * This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2778
- * The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2779
- * The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2780
- * Code distributed by Google as part of the polymer project is also
2781
- * subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2782
- */
2783
- let ar=0,nr=0;const lr=[];let hr=!1;const cr={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},dr={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},ur={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},pr={run(t){hr||(hr=!0,queueMicrotask((()=>function(){hr=!1;const t=lr.length;for(let e=0;e<t;e++){const t=lr[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}lr.splice(0,t),nr+=t}()))),lr.push(t);const e=ar;return ar+=1,e},cancel(t){const e=t-nr;if(e>=0){if(!lr[e])throw new Error(`invalid async handle: ${t}`);lr[e]=null}}},mr=new Set;class fr{static debounce(t,e,i){return t instanceof fr?t._cancelAsync():t=new fr,t.setConfig(e,i),t}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,mr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),mr.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}}let br;
2784
- /**
2785
- * @license
2786
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2787
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2788
- */
2789
- window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){!function(t,e){if(window.Vaadin.developmentMode)rr(t,e)}(or)};const vr=new Set,gr=t=>class extends(os(t)){static finalize(){super.finalize();const{is:t}=this;t&&!vr.has(t)&&(window.Vaadin.registrations.push(this),vr.add(t),window.Vaadin.developmentModeCallback&&(br=fr.debounce(br,ur,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),mr.add(br)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}
2790
- /**
2791
- * @license
2792
- * Copyright (c) 2023 - 2024 Vaadin Ltd.
2793
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2794
- */;class yr{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,r)=>{const o=t.indexOf(e);-1===o?i.push(e):o!==r&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
2795
- /**
2796
- * @license
2797
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2798
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2799
- */let wr=0;function xr(){return wr++}
2800
- /**
2801
- * @license
2802
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2803
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2804
- */class kr extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${xr()}`}constructor(t,e,i,s={}){super();const{initializer:r,multiple:o,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 o&&o,this.slotInitializer=r,o&&(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 yr(e,(({addedNodes:t,removedNodes:e})=>{const i=this.multiple?this.nodes:[this.node],s=t.filter((t=>!function(t){return t.nodeType===Node.TEXT_NODE&&""===t.textContent.trim()}(t)&&!i.includes(t)));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)))}))}}
2805
- /**
2806
- * @license
2807
- * Copyright (c) 2022 - 2024 Vaadin Ltd.
2808
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2809
- */class _r extends kr{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}}))}}
2810
- /**
2811
- * @license
2812
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2813
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2814
- */const Cr=g`
2815
- :host {
2816
- display: inline-block;
2817
- position: relative;
2818
- outline: none;
2819
- white-space: nowrap;
2820
- -webkit-user-select: none;
2821
- -moz-user-select: none;
2822
- user-select: none;
2823
- }
2824
-
2825
- :host([hidden]) {
2826
- display: none !important;
2827
- }
2828
-
2829
- /* Aligns the button with form fields when placed on the same line.
2830
- Note, to make it work, the form fields should have the same "::before" pseudo-element. */
2831
- .vaadin-button-container::before {
2832
- content: '\\2003';
2833
- display: inline-block;
2834
- width: 0;
2835
- max-height: 100%;
2836
- }
2837
-
2838
- .vaadin-button-container {
2839
- display: inline-flex;
2840
- align-items: center;
2841
- justify-content: center;
2842
- text-align: center;
2843
- width: 100%;
2844
- height: 100%;
2845
- min-height: inherit;
2846
- text-shadow: inherit;
2847
- }
2848
-
2849
- [part='prefix'],
2850
- [part='suffix'] {
2851
- flex: none;
2852
- }
2853
-
2854
- [part='label'] {
2855
- white-space: nowrap;
2856
- overflow: hidden;
2857
- text-overflow: ellipsis;
2858
- }
2859
-
2860
- @media (forced-colors: active) {
2861
- :host {
2862
- outline: 1px solid;
2863
- outline-offset: -1px;
2864
- }
2865
-
2866
- :host([focused]) {
2867
- outline-width: 2px;
2868
- }
2869
-
2870
- :host([disabled]) {
2871
- outline-color: GrayText;
2872
- }
2873
- }
2874
- `,Dr=!1,Ar=t=>t,Tr="string"==typeof document.head.style.touchAction,Sr="__polymerGestures",zr="__polymerGesturesHandled",Br="__polymerGesturesTouchAction",Pr=["mousedown","mousemove","mouseup","click"],Nr=[0,1,4,2],Ir=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function Mr(t){return Pr.indexOf(t)>-1}let Or=!1;function Fr(t){if(!Mr(t)&&"touchend"!==t)return Tr&&Or&&Dr?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){Or=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const Er=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Rr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function jr(t){const e=t.type;if(!Mr(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Ir&&(e=Nr[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Wr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Lr(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function Hr(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Gr=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],$r={},Ur=[];function qr(t){const e=Gr(t);return e.length>0?e[0]:t.target}function Vr(t){const e=t.type,i=t.currentTarget[Sr];if(!i)return;const s=i[e];if(!s)return;if(!t[zr]&&(t[zr]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Wr.touch.id=i.identifier),Wr.touch.id!==i.identifier)return;Tr||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Wr.touch.x=e.clientX,Wr.touch.y=e.clientY,Wr.touch.scrollDecided=!1;else if("touchmove"===i){if(Wr.touch.scrollDecided)return;Wr.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Gr(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[Br]){e=t[Br];break}return e}(t);let s=!1;const r=Math.abs(Wr.touch.x-e.clientX),o=Math.abs(Wr.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=o>r:"pan-y"===i&&(s=r>o)),s?t.preventDefault():Qr("track")}}(t)}const r=t[zr];if(!r.skip){for(let e,i=0;i<Ur.length;i++)e=Ur[i],s[e.name]&&!r[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,o=0;o<Ur.length;o++)i=Ur[o],s[i.name]&&!r[i.name]&&(r[i.name]=!0,i[e](t))}}function Yr(t,e,i){return!!$r[e]&&(function(t,e,i){const s=$r[e],r=s.deps,o=s.name;let a=t[Sr];a||(t[Sr]=a={});for(let e,i,s=0;s<r.length;s++)e=r[s],Er&&Mr(e)&&"click"!==e||(i=a[e],i||(a[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Vr,Fr(e)),i[o]=(i[o]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Kr(t,s.touchAction)}(t,e,i),!0)}function Jr(t){Ur.push(t),t.emits.forEach((e=>{$r[e]=t}))}function Kr(t,e){Tr&&t instanceof HTMLElement&&pr.run((()=>{t.style.touchAction=e})),t[Br]=e}function Zr(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,Ar(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function Qr(t){const e=function(t){for(let e,i=0;i<Ur.length;i++){e=Ur[i];for(let i,s=0;s<e.emits.length;s++)if(i=e.emits[s],i===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function Xr(t,e,i,s){e&&Zr(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>Qr(t)})}function to(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),r=Math.abs(t.y-i);return s>=5||r>=5}function eo(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],r=t.moves[t.moves.length-1];let o,a=0;s&&(o=r.x-s.x,a=r.y-s.y),Zr(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:r.x-t.x,dy:r.y-t.y,ddx:o,ddy:a,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const r=s;if(s=s.shadowRoot.elementFromPoint(t,e),r===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function io(t,e,i){const s=Math.abs(e.clientX-t.x),r=Math.abs(e.clientY-t.y),o=qr(i||e);!o||Rr[o.localName]&&o.hasAttribute("disabled")||(isNaN(s)||isNaN(r)||s<=25&&r<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=qr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,r=t.pageY;return!(s>=i.left&&s<=i.right&&r>=i.top&&r<=i.bottom)}return!1}(e))&&(t.prevent||Zr(o,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i}))}
2875
- /**
2876
- * @license
2877
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2878
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2879
- */Jr({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Hr(this.info)},mousedown(t){if(!jr(t))return;const e=qr(t),i=this;Lr(this.info,(t=>{jr(t)||(Xr("up",e,t),Hr(i.info))}),(t=>{jr(t)&&Xr("up",e,t),Hr(i.info)})),Xr("down",e,t)},touchstart(t){Xr("down",qr(t),t.changedTouches[0],t)},touchend(t){Xr("up",qr(t),t.changedTouches[0],t)}}),Jr({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Hr(this.info)},mousedown(t){if(!jr(t))return;const e=qr(t),i=this,s=t=>{const s=t.clientX,r=t.clientY;to(i.info,s,r)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&Qr("tap"),i.info.addMove({x:s,y:r}),jr(t)||(i.info.state="end",Hr(i.info)),e&&eo(i.info,e,t),i.info.started=!0)};Lr(this.info,s,(t=>{i.info.started&&s(t),Hr(i.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=qr(t),i=t.changedTouches[0],s=i.clientX,r=i.clientY;to(this.info,s,r)&&("start"===this.info.state&&Qr("tap"),this.info.addMove({x:s,y:r}),eo(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=qr(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),eo(this.info,e,i))}}),Jr({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){jr(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){jr(t)&&io(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){io(this.info,t.changedTouches[0],t)}});const so=de((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}})),ro=de((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}})),oo=t=>class extends(so(ro(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Yr(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Yr(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}
2880
- /**
2881
- * @license
2882
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2883
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2884
- */,ao=de((t=>class extends t{get _keyboardActive(){return ds()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}})),no=t=>class extends(so(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}
2885
- /**
2886
- * @license
2887
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2888
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2889
- */,lo=t=>class extends(oo(no(ao(t)))){static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button")}_onKeyDown(t){super._onKeyDown(t),t.altKey||t.shiftKey||t.ctrlKey||t.metaKey||this._activeKeys.includes(t.key)&&(t.preventDefault(),this.click())}}
2890
- /**
2891
- * @license
2892
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
2893
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2894
- */;
2895
- /**
2896
- * @license
2897
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
2898
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2899
- */Tt("vaadin-button",Cr,{moduleId:"vaadin-button-styles"});class ho extends(lo(gr(Nt(Ws(es))))){static get is(){return"vaadin-button"}static get template(){return(t=>t`
2900
- <div class="vaadin-button-container">
2901
- <span part="prefix" aria-hidden="true">
2902
- <slot name="prefix"></slot>
2903
- </span>
2904
- <span part="label">
2905
- <slot></slot>
2906
- </span>
2907
- <span part="suffix" aria-hidden="true">
2908
- <slot name="suffix"></slot>
2909
- </span>
2910
- </div>
2911
- <slot name="tooltip"></slot>
2912
- `
2913
- /**
2914
- @license
2915
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2916
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2917
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2918
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2919
- Code distributed by Google as part of the polymer project is also
2920
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2921
- */)(Xi)}ready(){super.ready(),this._tooltipController=new _r(this),this.addController(this._tooltipController)}}function co(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function uo(t,e,i=co){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function po(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function mo(t,e,i,s){let r=!1;return"function"==typeof s&&t&&(r=s(po(t))),(!e||t>=e)&&(!i||t<=i)&&!r}function fo(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 bo(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function vo(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}d(ho);
2922
- /**
2923
- @license
2924
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2925
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2926
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2927
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2928
- Code distributed by Google as part of the polymer project is also
2929
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2930
- */
2931
- class go{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,yo.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),yo.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,i){return t instanceof go?t._cancelAsync():t=new go,t.setConfig(e,i),t}}let yo=new Set;const wo=function(){const t=Boolean(yo.size);return yo.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t},xo=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=wo()}while(t||e)},ko=document.createElement("template");ko.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 _o extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(ko.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()),xo()}_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=fr.debounce(this._debouncerScrollFinish,cr.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=fr.debounce(this._debouncerUpdateClones,cr.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-${xr()}`,r=document.createElement("slot");r.setAttribute("name",s),r._itemWrapper=i,e.appendChild(r),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 r=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const o=i._itemWrapper;t&&!this._isVisible(o,e)||this._updateElement(o.instance,r+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
2932
- /**
2933
- * @license
2934
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2935
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2936
- */const Co=document.createElement("template");Co.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 270px;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n height: 100%;\n }\n </style>\n",d(class extends _o{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Co.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=bo(e)}});
2937
- /**
2938
- * @license
2939
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2940
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2941
- */
2942
- const Do=document.createElement("template");Do.innerHTML="\n <style>\n :host {\n --vaadin-infinite-scroller-item-height: 80px;\n width: 50px;\n display: block;\n height: 100%;\n position: absolute;\n right: 0;\n transform: translateX(100%);\n -webkit-tap-highlight-color: transparent;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n /* Center the year scroller position. */\n --vaadin-infinite-scroller-buffer-offset: 50%;\n }\n\n :host::before {\n content: '';\n display: block;\n background: transparent;\n width: 0;\n height: 0;\n position: absolute;\n left: 0;\n top: 50%;\n transform: translateY(-50%);\n border-width: 6px;\n border-style: solid;\n border-color: transparent;\n border-left-color: #000;\n }\n </style>\n",d(class extends _o{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Do.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-date-picker-year")}_updateElement(t,e){t.year=this._yearAfterXYears(e)}_yearAfterXYears(t){const e=new Date,i=new Date(e);return i.setFullYear(parseInt(t)+e.getFullYear()),i.getFullYear()}});
2943
- /**
2944
- * @license
2945
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2946
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2947
- */
2948
- const Ao=t=>class extends t{static get properties(){return{year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return["__updateSelected(year, selectedDate)"]}__updateSelected(t,e){this.toggleAttribute("selected",e&&e.getFullYear()===t),this.toggleAttribute("current",t===(new Date).getFullYear())}}
2949
- /**
2950
- * @license
2951
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
2952
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
2953
- */;class To extends(Nt(Ao(es))){static get is(){return"vaadin-date-picker-year"}static get template(){return Xi`
2954
- <style>
2955
- :host {
2956
- display: block;
2957
- height: 100%;
2958
- }
2959
- </style>
2960
- <div part="year-number">[[year]]</div>
2961
- <div part="year-separator" aria-hidden="true"></div>
2962
- `}}
2963
- /**
2964
- @license
2965
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2966
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2967
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2968
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2969
- Code distributed by Google as part of the polymer project is also
2970
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2971
- */
2972
- function So(t,e,i,s,r){let o;r&&(o="object"==typeof i&&null!==i,o&&(s=t.__dataTemp[e]));let a=s!==i&&(s==s||i==i);return o&&a&&(t.__dataTemp[e]=i),a}d(To);const zo=de((t=>class extends t{_shouldPropertyChange(t,e,i){return So(this,t,e,i,!0)}})),Bo=de((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return So(this,t,e,i,this.mutableData)}}));zo._mutablePropertyChange=So;
2973
- /**
2974
- @license
2975
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2976
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2977
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2978
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2979
- Code distributed by Google as part of the polymer project is also
2980
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2981
- */
2982
- let Po=null;function No(){return Po}No.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:No,writable:!0}});const Io=Ui(No),Mo=zo(Io),Oo=Ui(class{});class Fo extends Oo{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,i(t)}));else{let s=this.__dataHost.__dataHost;s&&s._addEventListenerToNode(t,e,i)}}_showHideChildren(t){!function(t,e){for(let i=0;i<e.length;i++){let s=e[i];if(Boolean(t)!=Boolean(s.__hideTemplateChildren__))if(s.nodeType===Node.TEXT_NODE)t?(s.__polymerTextContent__=s.textContent,s.textContent=""):s.textContent=s.__polymerTextContent__;else if("slot"===s.localName)if(t)s.__polymerReplaced__=document.createComment("hidden-slot"),Ae(Ae(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&Ae(Ae(t).parentNode).replaceChild(s,t)}else s.style&&(t?(s.__polymerDisplay__=s.style.display,s.style.display="none"):s.style.display=s.__polymerDisplay__);s.__hideTemplateChildren__=t,s._showHideChildren&&s._showHideChildren(t)}}(t,this.children)}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}const Eo=zo(Fo);function Ro(t){let e=t.__dataHost;return e&&e._methodHost||e}function jo(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Wo(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Lo(t,e,i){if(Xt&&!Ro(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(i=i||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let s=(e?e.constructor:Fo)._parseTemplate(t),r=s.templatizeInstanceClass;r||(r=function(t,e,i){let s=i.mutableData?Eo:Fo;Lo.mixin&&(s=Lo.mixin(s));let r=class extends s{};return r.prototype.__templatizeOptions=i,r.prototype._bindTemplate(t),function(t,e,i,s){let r=i.hostProps||{};for(let e in s.instanceProps){delete r[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Wo(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in r)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(r,t,e,i),r}(t,s,i),s.templatizeInstanceClass=r);const o=Ro(t);!function(t,e,i,s){let r=i.forwardHostProp;if(r&&e.hasHostProps){const o="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(o){let t=i.mutableData?Mo:Io;class s extends t{}a=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}a=e.templatizeTemplateClass=s}let n=e.hostProps;for(let t in n)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:jo(0,r)}),a.prototype._createNotifyingProperty("_host_"+t);ie&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:r}=t,{instanceProps:o}=e;for(let t in r)if(!(s[t]||o&&o[t])){const e=r[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),o)!function(t,e){Po=t,Object.setPrototypeOf(t,e.prototype),new e,Po=null}(t,a),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,o);let a=class extends r{};return a.prototype._methodHost=o,a.prototype.__dataHost=t,a.prototype.__templatizeOwner=e,a.prototype.__hostProps=s.hostProps,a}
2983
- /**
2984
- @license
2985
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2986
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2987
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2988
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2989
- Code distributed by Google as part of the polymer project is also
2990
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
2991
- */
2992
- let Ho=!1;
2993
- /**
2994
- @license
2995
- Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
2996
- This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
2997
- The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
2998
- The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
2999
- Code distributed by Google as part of the polymer project is also
3000
- subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
3001
- */
3002
- const Go=Bo(es);class $o extends Go{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:!le,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t);this.__chunkingId&&cancelAnimationFrame(this.__chunkingId)}connectedCallback(){if(super.connectedCallback(),function(){if(ee&&!Jt){if(!Ho){Ho=!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=Ae(Ae(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=Lo(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,r=0;r<i.length&&(s=i[r]);r++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(r=e)||ze(s,r)||Be(s,r)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let r=Pe(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(r,i)}var s,r}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)0===t.indexOf(e[i])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=go.debounce(this.__renderDebouncer,e>0?Ve.after(e):Ye,t.bind(this)),yo.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),xo()}__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),le&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let e=this.__instances[r],o=i[r],a=t[o];s[o]=r,e?(e._setPendingProperty(this.as,a),e._setPendingProperty(this.indexAs,r),e._setPendingProperty(this.itemsIndexAs,o),e._flushProperties()):this.__insertInstance(a,r,o)}for(let t=this.__instances.length-1;t>=r;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=Ae(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let r=this.__instances[e+1],o=r?r.children[0]:this;return Ae(Ae(this).parentNode).insertBefore(s.root,o),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),r=s<0?i:i.substring(0,s);if(r==parseInt(r,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let o=this.__instances[this.__itemsIdxToInstIdx[r]];return o&&(o._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),o._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=Ae(e).parentNode;return null}(this.template,t)}}customElements.define($o.is,$o);
3003
- /**
3004
- * @license
3005
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3006
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3007
- */
3008
- const Uo=t=>class extends(ao(t)){static get properties(){return{month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return[...this.shadowRoot.querySelectorAll("[part~=date]")].find((t=>uo(t.date,this.focusedDate)))}ready(){super.ready(),Yr(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const r=new Date(0,0);return r.setFullYear(t.getFullYear()),r.setMonth(t.getMonth()+1),r.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||mo(s,e,i)||mo(r,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:r}=t,o=this._applyFirstDayOfWeek(s,r);return this._applyFirstDayOfWeek(i,r).map(((t,e)=>({weekDay:t,weekDayShort:o[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>uo(e,t)))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true")}_getDate(t){return t?t.getDate():""}_showWeekSeparator(t,e){return t&&e&&1===e.firstDayOfWeek}_isToday(t){return uo(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],r=i.getMonth(),o=t.getMonth();for(;i.getMonth()===o||i.getMonth()===r;)s.push(i.getMonth()===o?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){const e=t.reduce(((t,e)=>!t&&e?e:t));
3009
- /**
3010
- * @license
3011
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3012
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3013
- */
3014
- return function(t){let e=t.getDay();0===e&&(e=7);const i=4-e,s=new Date(t.getTime()+24*i*3600*1e3),r=new Date(0,0);r.setFullYear(s.getFullYear());const o=s.getTime()-r.getTime(),a=Math.round(o/864e5);return Math.floor(a/7+1)}(e)}__getDayAriaLabel(t){if(!t)return"";let e=`${this._getDate(t)} ${this.i18n.monthNames[t.getMonth()]} ${t.getFullYear()}, ${this.i18n.weekdays[t.getDay()]}`;return this._isToday(t)&&(e+=`, ${this.i18n.today}`),e}}
3015
- /**
3016
- * @license
3017
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3018
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3019
- */;
3020
- /**
3021
- * @license
3022
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3023
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3024
- */
3025
- Tt("vaadin-month-calendar",g`
3026
- :host {
3027
- display: block;
3028
- }
3029
-
3030
- #monthGrid {
3031
- width: 100%;
3032
- border-collapse: collapse;
3033
- }
3034
-
3035
- #days-container tr,
3036
- #weekdays-container tr {
3037
- display: flex;
3038
- }
3039
-
3040
- [part~='date'] {
3041
- outline: none;
3042
- }
3043
-
3044
- [part~='disabled'] {
3045
- pointer-events: none;
3046
- }
3047
-
3048
- [part='week-number'][hidden],
3049
- [part='weekday'][hidden] {
3050
- display: none;
3051
- }
3052
-
3053
- [part='weekday'],
3054
- [part~='date'] {
3055
- width: calc(100% / 7);
3056
- padding: 0;
3057
- font-weight: normal;
3058
- }
3059
-
3060
- [part='weekday']:empty,
3061
- [part='week-number'] {
3062
- width: 12.5%;
3063
- flex-shrink: 0;
3064
- padding: 0;
3065
- }
3066
-
3067
- :host([week-numbers]) [part='weekday']:not(:empty),
3068
- :host([week-numbers]) [part~='date'] {
3069
- width: 12.5%;
3070
- }
3071
-
3072
- @media (forced-colors: active) {
3073
- [part~='date'][part~='focused'] {
3074
- outline: 1px solid;
3075
- }
3076
-
3077
- [part~='date'][part~='selected'] {
3078
- outline: 3px solid;
3079
- }
3080
- }
3081
- `,{moduleId:"vaadin-month-calendar-styles"});class qo extends(Uo(Nt(es))){static get template(){return Xi`
3082
- <div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
3083
- <table
3084
- id="monthGrid"
3085
- role="grid"
3086
- aria-labelledby="month-header"
3087
- on-touchend="_preventDefault"
3088
- on-touchstart="_onMonthGridTouchStart"
3089
- >
3090
- <thead id="weekdays-container">
3091
- <tr role="row" part="weekdays">
3092
- <th part="weekday" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]"></th>
3093
- <template is="dom-repeat" items="[[_getWeekDayNames(i18n, showWeekNumbers)]]">
3094
- <th role="columnheader" part="weekday" scope="col" abbr$="[[item.weekDay]]" aria-hidden="true">
3095
- [[item.weekDayShort]]
3096
- </th>
3097
- </template>
3098
- </tr>
3099
- </thead>
3100
- <tbody id="days-container">
3101
- <template is="dom-repeat" items="[[_weeks]]" as="week">
3102
- <tr role="row">
3103
- <td part="week-number" aria-hidden="true" hidden$="[[!_showWeekSeparator(showWeekNumbers, i18n)]]">
3104
- [[__getWeekNumber(week)]]
3105
- </td>
3106
- <template is="dom-repeat" items="[[week]]">
3107
- <td
3108
- role="gridcell"
3109
- part$="[[__getDatePart(item, focusedDate, selectedDate, minDate, maxDate, isDateDisabled)]]"
3110
- date="[[item]]"
3111
- tabindex$="[[__getDayTabindex(item, focusedDate)]]"
3112
- disabled$="[[__isDayDisabled(item, minDate, maxDate, isDateDisabled)]]"
3113
- aria-selected$="[[__getDayAriaSelected(item, selectedDate)]]"
3114
- aria-disabled$="[[__getDayAriaDisabled(item, minDate, maxDate, isDateDisabled)]]"
3115
- aria-label$="[[__getDayAriaLabel(item)]]"
3116
- >[[_getDate(item)]]</td
3117
- >
3118
- </template>
3119
- </tr>
3120
- </template>
3121
- </tbody>
3122
- </table>
3123
- `}static get is(){return"vaadin-month-calendar"}static get properties(){return{_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&1===e.firstDayOfWeek?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers")}__getDatePart(t,e,i,s,r,o){const a=["date"],n=t>co(new Date),l=t<co(new Date);return this.__isDayDisabled(t,s,r,o)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),l&&a.push("past"),n&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return uo(t,e)}__isDaySelected(t,e){return uo(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!mo(t,e,i,s)}__getDayAriaDisabled(t,e,i,s){if(void 0!==t&&(void 0!==e||void 0!==i||void 0!==s))return this.__isDayDisabled(t,e,i,s)?"true":void 0}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}d(qo);
3124
- /**
3125
- * @license
3126
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3127
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3128
- */
3129
- class Vo{constructor(t,e){this.query=t,this.callback=e,this._boundQueryHandler=this._queryHandler.bind(this)}hostConnected(){this._removeListener(),this._mediaQuery=window.matchMedia(this.query),this._addListener(),this._queryHandler(this._mediaQuery)}hostDisconnected(){this._removeListener()}_addListener(){this._mediaQuery&&this._mediaQuery.addListener(this._boundQueryHandler)}_removeListener(){this._mediaQuery&&this._mediaQuery.removeListener(this._boundQueryHandler),this._mediaQuery=null}_queryHandler(t){"function"==typeof this.callback&&this.callback(t.matches)}}
3130
- /**
3131
- * @license
3132
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3133
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3134
- */const Yo=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(){Kr(this.$.scrollers,"pan-y"),Yr(this.$.scrollers,"track",this._track.bind(this)),Yr(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Yr(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Yr(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Vo(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new kr(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Yr(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new kr(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Yr(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 kr(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 kr(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Yr(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,r){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,r))}__updateCalendars(t,e,i,s,r,o,a,n,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=o,t.selectedDate=r,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,r=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,o=this._monthScroller.position+r-1<i;s?this._scrollToPosition(i,e):o&&this._scrollToPosition(i-r+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._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=fr.debounce(this._debouncer,cr.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(po(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._scrollToPosition(this._monthScroller.position+e/this._yearScroller.itemHeight*12,!0)}}_scrollToPosition(t,e){if(void 0!==this._targetPosition)return void(this._targetPosition=t);if(!e)return this._monthScroller.position=t,this._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 r=this._monthScroller.position,o=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,r,this._targetPosition-r);this._monthScroller.position=t,window.requestAnimationFrame(o)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:r}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(o)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return bo(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){uo(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&&uo(t.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,t.focus())}}async focusDate(t,e){const i=t||this.selectedDate||this.initialPosition||new Date;this.focusedDate=i,e||(this._focusedMonthDate=i.getDate()),await this.focusDateElement(!1)}async focusDateElement(t=!0){this.__pendingDateFocus=this.focusedDate,this.calendars.length||await new Promise((t=>{_s(this,(()=>{xo(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(fo(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 mo(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}}
3135
- /**
3136
- * @license
3137
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3138
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3139
- */;
3140
- /**
3141
- * @license
3142
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3143
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3144
- */
3145
- Tt("vaadin-date-picker-overlay-content",g`
3146
- :host {
3147
- display: flex;
3148
- flex-direction: column;
3149
- height: 100%;
3150
- width: 100%;
3151
- outline: none;
3152
- }
3153
-
3154
- [part='overlay-header'] {
3155
- display: flex;
3156
- flex-shrink: 0;
3157
- flex-wrap: nowrap;
3158
- align-items: center;
3159
- }
3160
-
3161
- :host(:not([fullscreen])) [part='overlay-header'] {
3162
- display: none;
3163
- }
3164
-
3165
- [part='label'] {
3166
- flex-grow: 1;
3167
- }
3168
-
3169
- [hidden] {
3170
- display: none !important;
3171
- }
3172
-
3173
- [part='years-toggle-button'] {
3174
- display: flex;
3175
- }
3176
-
3177
- #scrollers {
3178
- display: flex;
3179
- height: 100%;
3180
- width: 100%;
3181
- position: relative;
3182
- overflow: hidden;
3183
- }
3184
-
3185
- :host([desktop]) ::slotted([slot='months']) {
3186
- right: 50px;
3187
- transform: none !important;
3188
- }
3189
-
3190
- :host([desktop]) ::slotted([slot='years']) {
3191
- transform: none !important;
3192
- }
3193
-
3194
- :host(.animate) ::slotted([slot='months']),
3195
- :host(.animate) ::slotted([slot='years']) {
3196
- transition: all 200ms;
3197
- }
3198
-
3199
- [part='toolbar'] {
3200
- display: flex;
3201
- justify-content: space-between;
3202
- z-index: 2;
3203
- flex-shrink: 0;
3204
- }
3205
- `,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Jo extends(Yo(Ws(Nt(os(es))))){static get template(){return Xi`
3206
- <div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
3207
- <div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
3208
- <div part="clear-button" hidden$="[[!selectedDate]]"></div>
3209
- <div part="toggle-button"></div>
3210
-
3211
- <div part="years-toggle-button" hidden$="[[_desktopMode]]" aria-hidden="true">
3212
- [[_yearAfterXMonths(_visibleMonthIndex)]]
3213
- </div>
3214
- </div>
3215
-
3216
- <div id="scrollers">
3217
- <slot name="months"></slot>
3218
- <slot name="years"></slot>
3219
- </div>
3220
-
3221
- <div on-touchend="_preventDefault" role="toolbar" part="toolbar">
3222
- <slot name="today-button"></slot>
3223
- <slot name="cancel-button"></slot>
3224
- </div>
3225
- `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}d(Jo);
3226
- /**
3227
- * @license
3228
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3229
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3230
- */
3231
- const Ko=de((t=>class extends(ao(no(t))){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame((()=>{this.focus(),this.setAttribute("focus-ring","")}))}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,e){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):e&&this._removeFocusListeners(e)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,e){super._disabledChanged(t,e),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){void 0!==t&&this.focusElement&&(this.focusElement.tabIndex=t,-1!==t&&(this.tabindex=void 0)),this.disabled&&t&&(-1!==t&&(this._lastTabIndex=t),this.tabindex=void 0)}})),Zo=new WeakMap,Qo=de((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Zo.has(t)||Zo.set(t,new Set),Zo.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))}))}})),Xo=de((t=>class extends t{static get properties(){return{inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged"},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0},_hasInputValue:{type:Boolean,value:!1,observer:"_hasInputValueChanged"}}}constructor(){super(),this._boundOnInput=this.__onInput.bind(this),this._boundOnChange=this._onChange.bind(this)}get _hasValue(){return null!=this.value&&""!==this.value}get _inputElementValueProperty(){return"value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=null!=t?t:"")}_inputElementChanged(t,e){t?this._addInputListeners(t):e&&this._removeInputListeners(e)}_hasInputValueChanged(t,e){(t||e)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const e=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=e.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,e){this._toggleHasValue(this._hasValue),""===t&&void 0===e||this.__userInput||this._forwardInputValue(t)}_setHasInputValue(t){const e=t.composedPath()[0];this._hasInputValue=e.value.length>0}})),ta=t=>class extends(Xo(ro(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(),Ss||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}))}}
3232
- /**
3233
- * @license
3234
- * Copyright (c) 2023 - 2024 Vaadin Ltd.
3235
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3236
- */,ea=new Map;
3237
- /**
3238
- * @license
3239
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3240
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3241
- */function ia(t){return ea.has(t)||ea.set(t,new WeakMap),ea.get(t)}function sa(t,e){t&&t.removeAttribute(e)}function ra(t,e){if(!t||!e)return;const i=ia(e);if(i.has(t))return;const s=Vs(t.getAttribute(e));i.set(t,new Set(s))}function oa(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:r,fromUser:o}=i,a=ia(e),n=a.get(t);if(!o&&n)return r&&n.delete(r),void(s&&n.add(s));o&&(n?s||a.delete(t):ra(t,e),sa(t,e)),function(t,e,i){const s=Vs(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Ys(s)):t.removeAttribute(e)}(t,e,r);const l=s||Ys(n);l&&Js(t,e,l)}
3242
- /**
3243
- * @license
3244
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3245
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3246
- */
3247
- class aa{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){var e;this.__target&&(t?(ra(e=this.__target,"aria-labelledby"),sa(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=ia(e),s=i.get(t);s&&0!==s.size?Js(t,e,Ys(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){oa(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){oa(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){oa(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")))}}
3248
- /**
3249
- * @license
3250
- * Copyright (c) 2022 - 2024 Vaadin Ltd.
3251
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3252
- */const na=document.createElement("div");let la;na.style.position="fixed",na.style.clip="rect(0px, 0px, 0px, 0px)",na.setAttribute("aria-live","polite"),document.body.appendChild(na);
3253
- /**
3254
- * @license
3255
- * Copyright (c) 2022 - 2024 Vaadin Ltd.
3256
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3257
- */
3258
- class ha extends kr{constructor(t,e,i,s={}){super(t,e,i,{...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)}}
3259
- /**
3260
- * @license
3261
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3262
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3263
- */class ca extends ha{constructor(t){super(t,"error-message","div")}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node)}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node)}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t)}initNode(t){this.updateDefaultNode(t)}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,s=Boolean(i&&e&&""!==e.trim());t&&(t.textContent=s?e:"",t.hidden=!s,s&&function(t,e={}){const i=e.mode||"polite",s=void 0===e.timeout?150:e.timeout;"alert"===i?(na.removeAttribute("aria-live"),na.removeAttribute("role"),la=fr.debounce(la,dr,(()=>{na.setAttribute("role","alert")}))):(la&&la.cancel(),na.removeAttribute("role"),na.setAttribute("aria-live",i)),na.textContent="",setTimeout((()=>{na.textContent=t}),s)}(e,{mode:"assertive"})),super.updateDefaultNode(t)}}
3264
- /**
3265
- * @license
3266
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3267
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3268
- */class da extends ha{constructor(t){super(t,"helper",null)}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:t}=this;if(t&&""!==t.trim()){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
3269
- /**
3270
- * @license
3271
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3272
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3273
- */class ua extends ha{constructor(t){super(t,"label","label")}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:t}=this;if(t&&""!==t.trim()){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t)}initCustomNode(t){super.initCustomNode(t),this.observeNode(t)}}
3274
- /**
3275
- * @license
3276
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3277
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3278
- */const pa=de((t=>class extends(Ws(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new ua(this),this._labelController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-label",t.detail.hasContent)}))}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}})),ma=de((t=>class extends t{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}})),fa=t=>class extends(ma(pa(Ws(t)))){static get properties(){return{ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new aa(this),this._helperController=new da(this),this._errorController=new ca(this),this._errorController.addEventListener("slot-content-changed",(t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)})),this._labelController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.__labelChanged(e,i)})),this._helperController.addEventListener("slot-content-changed",(t=>{const{hasContent:e,node:i}=t.detail;this.toggleAttribute("has-helper",e),this.__helperChanged(e,i)}))}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,e){this._fieldAriaController.setHelperId(t?e.id:null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,e){this._fieldAriaController.setLabelId(t?e.id:null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout((()=>{if(t){const t=this._errorNode;this._fieldAriaController.setErrorId(t&&t.id)}else this._fieldAriaController.setErrorId(null)}))}}
3279
- /**
3280
- * @license
3281
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3282
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3283
- */,ba=de((t=>class extends t{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach((t=>{this._delegateAttribute(t,this[t])}))}_ensurePropsDelegated(){this.constructor.delegateProps.forEach((t=>{this._delegateProperty(t,this[t])}))}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach(((e,i)=>{this._delegateAttribute(e,t[i])}))}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach(((e,i)=>{this._delegateProperty(e,t[i])}))}_delegateAttribute(t,e){this.stateTarget&&("invalid"===t&&this._delegateAttribute("aria-invalid",!!e&&"true"),"boolean"==typeof e?this.stateTarget.toggleAttribute(t,e):e?this.stateTarget.setAttribute(t,e):this.stateTarget.removeAttribute(t))}_delegateProperty(t,e){this.stateTarget&&(this.stateTarget[t]=e)}})),va=de((t=>class extends(ba(ma(Xo(t)))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map((t=>this[t])))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some((t=>this.__isValidConstraint(t)))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...e){if(!t)return;const i=this._hasValidConstraints(e),s=this.__previousHasConstraints&&!i;(this._hasValue||this.invalid)&&i?this.validate():s&&this._setInvalid(!1),this.__previousHasConstraints=i}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return Boolean(t)||0===t}})),ga=t=>class extends(Qo(Ko(va(fa(ta(ro(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=fr.debounce(this._preventInputDebouncer,cr.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)}}}
3284
- /**
3285
- * @license
3286
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3287
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3288
- */;
3289
- /**
3290
- * @license
3291
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3292
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3293
- */class ya extends kr{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})}}
3294
- /**
3295
- * @license
3296
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3297
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3298
- */class wa{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",(t=>{this.__initLabel(t.detail.node)})),this.__initLabel(e.node)}__initLabel(t){t&&(t.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&t.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const t=e=>{e.stopImmediatePropagation(),this.input.removeEventListener("click",t)};this.input.addEventListener("click",t)}}
3299
- /**
3300
- * @license
3301
- * Copyright (c) 2021 - 2024 Vaadin Ltd..
3302
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3303
- */const xa=g`
3304
- :host {
3305
- display: inline-flex;
3306
- outline: none;
3307
- }
3308
-
3309
- :host::before {
3310
- content: '\\2003';
3311
- width: 0;
3312
- display: inline-block;
3313
- /* Size and position this element on the same vertical position as the input-field element
3314
- to make vertical align for the host element work as expected */
3315
- }
3316
-
3317
- :host([hidden]) {
3318
- display: none !important;
3319
- }
3320
-
3321
- :host(:not([has-label])) [part='label'] {
3322
- display: none;
3323
- }
3324
-
3325
- @media (forced-colors: active) {
3326
- :host(:not([readonly])) [part='input-field'] {
3327
- outline: 1px solid;
3328
- outline-offset: -1px;
3329
- }
3330
- :host([focused]) [part='input-field'] {
3331
- outline-width: 2px;
3332
- }
3333
- :host([disabled]) [part='input-field'] {
3334
- outline-color: GrayText;
3335
- }
3336
- }
3337
- `
3338
- /**
3339
- * @license
3340
- * Copyright (c) 2021 - 2024 Vaadin Ltd..
3341
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3342
- */,ka=g`
3343
- [class$='container'] {
3344
- display: flex;
3345
- flex-direction: column;
3346
- min-width: 100%;
3347
- max-width: 100%;
3348
- width: var(--vaadin-field-default-width, 12em);
3349
- }
3350
- `
3351
- /**
3352
- * @license
3353
- * Copyright (c) 2021 - 2024 Vaadin Ltd..
3354
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3355
- */,_a=[xa,ka,g`
3356
- [part='clear-button'] {
3357
- display: none;
3358
- cursor: default;
3359
- }
3360
-
3361
- [part='clear-button']::before {
3362
- content: '\\2715';
3363
- }
3364
-
3365
- :host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
3366
- display: block;
3367
- }
3368
- `
3369
- /**
3370
- * @license
3371
- * Copyright (c) 2021 - 2024 Vaadin Ltd..
3372
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3373
- */],Ca=t=>class extends t{static get properties(){return{overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(t,e){if(!e)return;if(void 0===t)return;const{classList:i}=e;if(this.__initialClasses||(this.__initialClasses=new Set(i)),Array.isArray(this.__previousClasses)){const t=this.__previousClasses.filter((t=>!this.__initialClasses.has(t)));t.length>0&&i.remove(...t)}const s="string"==typeof t?t.split(" ").filter(Boolean):[];s.length>0&&i.add(...s),this.__previousClasses=s}}
3374
- /**
3375
- * @license
3376
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3377
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3378
- */;class Da{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}
3379
- /**
3380
- * @license
3381
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3382
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3383
- */const Aa=t=>class extends(Ca(Ws(Ko(va(ro(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,r=i.getMonth(),o=i.getFullYear();if(3===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1]),o=parseInt(e[2]),e[2].length<3&&o>=0&&(o=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let r=e+100*Math.floor(t.getFullYear()/100);return t<new Date(r-50,i,s)?r-=100:t>new Date(r+50,i,s)&&(r+=100),r}(this.referenceDate?vo(this.referenceDate):new Date,o,r,s))):2===e.length?(r=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:r,year:o}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,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:Ts},_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&&!ds()&&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 Vo(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new Da(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=vo(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(po(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||mo(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,r,o){return!t||e&&(!o||r)||i&&r||!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",r=t.year;return r<0?(r=-r,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(r,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=vo(t);!t||i?(t?uo(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,r,o,a,n,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=r,t.focusedDate=o,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=Os(this._noInput?t:[s,t])}_getInitialPosition(){const t=vo(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||mo(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?fo(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)return this.clearButtonVisible&&this.value&&!this.readonly?(t.stopPropagation(),void this._onClearButtonClick(t)):void(""===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,uo(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return vo(t)}}
3384
- /**
3385
- * @license
3386
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3387
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3388
- */;
3389
- /**
3390
- * @license
3391
- * Copyright (c) 2016 - 2024 Vaadin Ltd.
3392
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3393
- */
3394
- Tt("vaadin-date-picker",[_a,g`
3395
- :host([opened]) {
3396
- pointer-events: auto;
3397
- }
3398
-
3399
- :host([dir='rtl']) [part='input-field'] {
3400
- direction: ltr;
3401
- }
3402
-
3403
- :host([dir='rtl']) [part='input-field'] ::slotted(input)::placeholder {
3404
- direction: rtl;
3405
- text-align: left;
3406
- }
3407
- `],{moduleId:"vaadin-date-picker-styles"});class Ta extends(Aa(ga(Nt(gr(es))))){static get is(){return"vaadin-date-picker"}static get template(){return Xi`
3408
- <div class="vaadin-date-picker-container">
3409
- <div part="label">
3410
- <slot name="label"></slot>
3411
- <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
3412
- </div>
3413
-
3414
- <vaadin-input-container
3415
- part="input-field"
3416
- readonly="[[readonly]]"
3417
- disabled="[[disabled]]"
3418
- invalid="[[invalid]]"
3419
- theme$="[[_theme]]"
3420
- >
3421
- <slot name="prefix" slot="prefix"></slot>
3422
- <slot name="input"></slot>
3423
- <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
3424
- <div part="toggle-button" slot="suffix" aria-hidden="true" on-click="_toggle"></div>
3425
- </vaadin-input-container>
3426
-
3427
- <div part="helper-text">
3428
- <slot name="helper"></slot>
3429
- </div>
3430
-
3431
- <div part="error-message">
3432
- <slot name="error-message"></slot>
3433
- </div>
3434
- </div>
3435
-
3436
- <vaadin-date-picker-overlay
3437
- id="overlay"
3438
- fullscreen$="[[_fullscreen]]"
3439
- theme$="[[_theme]]"
3440
- opened="{{opened}}"
3441
- on-vaadin-overlay-escape-press="_onOverlayEscapePress"
3442
- on-vaadin-overlay-open="_onOverlayOpened"
3443
- on-vaadin-overlay-closing="_onOverlayClosed"
3444
- restore-focus-on-close
3445
- restore-focus-node="[[inputElement]]"
3446
- ></vaadin-date-picker-overlay>
3447
-
3448
- <slot name="tooltip"></slot>
3449
- `}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new ya(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new wa(this.inputElement,this._labelController)),this._tooltipController=new _r(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}}d(Ta);const Sa=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.handleTicketDrawId=t=>{this.filterData.ticketDrawId=t.target.value},this.handleFilterFrom=t=>{let e=t.target.value.split("-");this.filterData.filterFromCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),0,0,0).toISOString()},this.handleFilterTo=t=>{let e=t.target.value.split("-");this.filterData.filterToCalendar=new Date(Number(e[0]),Number(e[1])-1,Number(e[2]),23,59,59).toISOString()},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.showFilterId=!0,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={ticketDrawId:"",filterFromCalendar:"",filterToCalendar:""},this.limitStylingAppends=!1}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])h[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.ticketDrawId||this.filterData.filterFromCalendar||this.filterData.filterToCalendar)&&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(){this.modalCloseEvent(),this.showClearButton=!0,this.filterSelectionHandler(this.filterData)}resetSearch(){this.showClearButton=!1,this.filterSelectionResetHandler(this.filterDataReset),this.filterData={}}render(){return i("div",{key:"92b6e88d833f8fdc12d833636e80aff214a8eb9d",class:"HelperFilters",ref:t=>this.stylingContainer=t},i("div",{key:"fed2cf119553fc6d2b9ecaaf83e3c68ef040fd46",class:"FilterButtonsWrapper"},i("button",{key:"2ef40face6ef68541041994f263094d155aca23e",class:"FilterOpen",onClick:()=>this.toggleFilterModal()},c("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},c("filterClear",this.language)):null),i("helper-modal",{key:"7b6a634f3f1f4497d6d39aebcb8249d153e5c277","title-modal":"Filter Modal",visible:this.showFilterModal,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"37c5aaabc27e32d24de1e3a50c8140c3674e07d5",class:"FilterModalHeader"},i("h3",{key:"50b10b90dffdff3edd5933278d3ab000ecc2a93a",class:"FilterModalTitle"},c(this.activateTicketSearch?"filterModalTicketTitle":"filterModalDrawTitle",this.language))),i("div",{key:"bf843f5003fe32555a949474b1fa7b966000cb83",class:"FilterModalBody"},this.showFilterId&&i("div",{key:"bd763dc296c986f1d3a2c04e30f2c4c8f02c9b7e"},i("input",{key:"d393e06b61d5f14e3a28330c15c3fb01257c8472",id:"FilterById",type:"text",value:this.filterData.ticketDrawId,onInput:this.handleTicketDrawId,class:"FilterModalSearch",placeholder:c(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",{key:"f8a8afe9594f8f0cad7bf0654f23348341f08a3d"},c("filterOrDate",this.language))),i("div",{key:"a6b8fc4a3c424a1d56236c168e0298de3511cba5",class:"FilterCalendarWrapper"},i("vaadin-date-picker",{key:"06c32fbf0073a7097ec6a8c24b200868a0c525cb",value:this.filterData.filterFromCalendar,onChange:this.handleFilterFrom,placeholder:c("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"a4d4212b6107ce9cf572f40a4713d9d038c8b395",value:this.filterData.filterToCalendar,onChange:this.handleFilterTo,placeholder:c("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{key:"7dec7662f1b093b6c443d0c194eb614aa608a342",class:"FilterModalFooter"},i("button",{key:"336d6f0a0fb88bff6c44f593a754afbc43cd1e03",class:"FilterModalButton",onClick:()=>this.filterSearch()},c("filterModalButton",this.language)))))}};Sa.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 .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}';const za=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)),Ba=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&&i("div",{key:"ba2aed789565b37bfdbb34bdf3ccace827231653",class:this.visible?"HelperModalWrapper HelperModalVisible":"HelperModalWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"151ca4cd80d259ac955b92b10bf6f0df2698a937",class:"HelperModalWrapper HelperModalVisible"},i("div",{key:"804cb1dea73321c4935e4a8ddb1136e98e89a070",class:"HelperModalContent"+(za(this.userAgent)?" HelperModalMobileContent":"")},i("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(za(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};Ba.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 Pa="en",Na=["en"],Ia={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?"}},Ma=(t,e)=>{const i=e;return Ia[void 0!==i&&Na.includes(i)?i:Pa][t]};function Oa(t,e){if(t){const i=document.createElement("style");i.innerHTML=e,t.appendChild(i)}}function Fa(t,e){const i=new URL(e);fetch(i.href).then((t=>t.text())).then((e=>{const i=document.createElement("style");i.innerHTML=e,t&&t.appendChild(i)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}function Ea(t,e){if(window.emMessageBus){const i=document.createElement("style");window.emMessageBus.subscribe(e,(e=>{i.innerHTML=e,t&&t.appendChild(i)}))}}const Ra=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&&Oa(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&Fa(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?Ea(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&Oa(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&Fa(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])Ia[e][i]=t[e][i]})))}getHowToPlay(){return this.lowNumber&&this.highNumber&&this.maxinumAllowed&&this.minimumAllowed?((t,e)=>{const i=e.lang;let s=Ia[void 0!==i&&Na.includes(i)?i:Pa][t];return e?(Object.keys(e).forEach((t=>{s=s.replace(new RegExp("\\${"+t+"}","gm"),e[t])})),s):Ia[void 0!==i&&Na.includes(i)?i:Pa][t]})("howToPlay",{lowNumber:this.lowNumber,highNumber:this.highNumber,maxinumAllowed:this.maxinumAllowed,minimumAllowed:this.minimumAllowed,lang:this.language}):""}render(){return this.tabContent=i("div",{key:"92877a17361066f68fce6299cb8f65901f6abc60",class:"TabContent",ref:t=>this.stylingContainer=t},this.getHowToPlay()),this.selectedIndex+1==2?this.tabContent=i("div",{key:"9876b9250371034ef40dab0f5fc3fe1a5631a370",class:"TabContent",ref:t=>this.stylingContainer=t},i("ol",{key:"ef2097eb54aeb640f06871277d8cafd2f4455109"},i("li",{key:"e9a0237e1fdead445abcd9240174276ffef81a67"},Ma("register",this.language)),i("li",{key:"2bdfaffdc9f1a7ae021913cb0ba346132140dcfd"},Ma("butTickets",this.language)),i("li",{key:"bff38eaeabeaece83dc8ed1697e5b052802753f6"},Ma("reviewPurchase",this.language)))):this.selectedIndex+1==3&&(this.tabContent=i("div",{key:"49a7fb3435fb50b54572ec38d1e632e2eacf56fb",class:"TabContent",ref:t=>this.stylingContainer=t},i("ul",{key:"7f642625f35a1ed1eae7655144c0b8b1bfe25f55"},i("li",{key:"037a5913be57dd1e2dcde5a061e9c64e70365e8d"},Ma("odds",this.language)),i("li",{key:"8775a1b2e8eda285e2c248b8d7235f06ac593fc6"},Ma("winGame",this.language)),i("li",{key:"5297fc5e757c29a1349049f1fe294e926255d518"},Ma("claimPrize",this.language))))),this.tabContent}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};Ra.style=":host{display:block}.TabContent{font-size:14px;color:var(--emw--button-text-color, #000);font-weight:normal}";const ja=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&&Oa(this.stylingContainer,this.clientStyling)}handleClientStylingChangeURL(t,e){t!=e&&this.clientStylingUrl&&Fa(this.stylingContainer,this.clientStylingUrl)}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBus?Ea(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&Oa(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&Fa(this.stylingContainer,this.clientStylingUrl)))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}render(){return i("div",{key:"173c4774748482dc56fcffb4bac4e1666fa9170f",ref:t=>this.stylingContainer=t},i("div",{key:"680b65218e4b00f134b354f593c0c20fb5882dca",class:"Tabs"},this.tabs.map(((t,e)=>i("button",{class:"TabButton"+(this.selectedIndex==e?" Active":""),onClick:()=>this.selectedIndex=e},t.label)))),i("div",{key:"67aa26c92fb416c5d0934988fb071481f805685b"},i("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 s(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingChangeURL"]}}};ja.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 Wa=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 i("div",{key:"a21cbee8f556bfbbe9f97be5f44bfc08b6f24dd6",class:"Circle "+(this.selectable?"":"Disabled")+(this.isSelected?"Selected":"")+(this.isBonus?" Bonus":""),onClick:()=>this.select(),ref:t=>this.stylingContainer=t},this.value)}};Wa.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 La=["ro","en","hr"],Ha={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",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",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",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",ticketAmount:"Iznos listića",prize:"Nagrade"}},Ga=(t,e)=>{const i=e;return Ha[void 0!==i&&La.includes(i)?i:"en"][t]},$a=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.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.ticketAmount="",this.ticketCurrency="",this.ticketMultiplier=!1,this.ticketMultiplierNum=void 0,this.ticketDrawCount=0,this.ticketNumbers="",this.sessionId="",this.clientStyling="",this.clientStylingUrlContent="",this.ticketDrawData="",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}componentWillLoad(){var t;this.translationUrl&&(t=JSON.parse(this.translationUrl),Object.keys(t).forEach((e=>{for(let i in t[e])Ha[e][i]=t[e][i]})))}connectedCallback(){let t=[];if(this.ticketNumbers){let t=[];try{t=JSON.parse(this.ticketNumbers)}catch(e){t=[]}this.gridNumbers=t.map((t=>t.selections)),this.gridSecondaryNumbers=t.map((t=>t.secondarySelections||[]))}this.drawId&&t.push(this.getDrawData()),Promise.all(t).then((()=>{this.isLoading=!1})).catch((t=>{console.log("error ",t),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)))})),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 r=t.division,o=null===(s=null===(i=e.drawData)||void 0===i?void 0:i.prizes)||void 0===s?void 0:s.filter((t=>t.order===r));return o&&o.length?o[0].division:null}render(){return this.isLoading?i("p",null,"Loading, please wait ..."):this.hasErrors?void i("p",null,this.errorText):i("section",{class:"DrawResultsSection",ref:t=>this.stylingContainer=t},this.drawMode?i("div",{class:"DrawResultsArea"},this.drawData&&i("div",null,i("div",{class:"DrawResultsHeader"},i("span",null,Ga("drawId",this.language),": ",this.drawData.id),i("span",null,Ga("drawDate",this.language),": ",this.drawData.date.slice(0,10))),i("div",{class:"DrawResultsBody"},i("div",{class:"DrawNumbersGrid"},i("p",null,Ga("drawNumbersGridDraw",this.language)),i("div",{class:"BulletContainer"},i("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})),i("div",{class:"DrawPrizes"},i("label",{class:"Label"},Ga("prize",this.language)," "),this.drawData.prizes.length?i("div",null," ",this.drawData.prizes.filter((t=>"None"!==t.division)).map((t=>i("div",null,i("span",{style:{"margin-right":"5px"}},t.division,":"),i("span",{style:{"margin-right":"2px"}},t.amount.value),i("span",null,t.amount.currency))))):i("div",null,"None")))))):i("div",{class:"DrawResultsArea TicketDraws"},i("div",{class:"DrawResultsBody"},i("div",{class:"TicketIdContainer"},i("label",{class:"Label"},Ga("ticketId",this.language),": ",i("span",null,this.ticketId))),i("div",{class:"TicketAmountContainer"},i("label",{class:"Label"},Ga("ticketAmount",this.language),": ",i("span",null,this.ticketAmount),i("span",null,this.ticketCurrency))),i("div",{class:"DrawNumbersGrid"},this.gridNumbers.map(((t,e)=>{var s;return i("div",null,i("label",{class:"Label"},Ga("drawNumbersGridTicket",this.language),":"),i("div",{class:"BulletContainer"},i("lottery-grid",{"selected-numbers":t.join(","),"secondary-numbers":null===(s=this.gridSecondaryNumbers[e])||void 0===s?void 0:s.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&&i("div",{class:"DrawMultipler"},i("label",{class:"Label"},Ga("multiplierNum",this.language),": ",this.ticketMultiplierNum)),i("div",{class:"NumberOfDrawsContainer"},i("label",{class:"Label"},Ga("numberOfDraws",this.language),": ",this.ticketDrawCount),i("div",{class:"DrawTicketsContainer"},"Settled"===this.tabValue&&this.ticketDrawDetails&&this.ticketDrawDetails.length>0&&i("div",{class:"ExpandableBoxes"},this.ticketDrawDetails.map(((t,e)=>{var s,r,o,a,n,l,h,c;return i("div",{class:{ExpandableBox:!0,ShowBox:this.toggleDrawer[e]},onClick:this.drawerToggle.bind(this,e)},i("div",{class:"ExpandableBoxHeader"},i("div",{class:"TicketResultContainer"},i("p",null,Ga("ticketResult",this.language),": ",t.state)),"won"==t.state&&i("div",{class:"AmountWonContainer"},i("p",null,Ga("amountWon",this.language),": ",Number(t.amount).toLocaleString("en")," ",t.currency)),"lost"==t.state&&i("div",{class:"DrawIdContainer"},i("p",null,Ga("drawId",this.language),": ",t.drawId))),i("div",{class:"ExpandableBoxBody"},i("div",{class:"DrawIdContainer"},i("p",null,Ga("drawId",this.language),": ",t.drawId)),i("div",{class:"DrawDateContainer"},i("p",null,Ga("drawDate",this.language),": ",null===(s=t.drawData)||void 0===s?void 0:s.date.slice(0,10)," | ",null===(r=t.drawData)||void 0===r?void 0:r.date.slice(11,19))),i("div",{class:"DrawNumbersGrid"},t.drawData&&i("div",{class:"BulletContainer"},i("label",{class:"Label"},Ga("drawNumbersGridDraw",this.language),":"),i("lottery-grid",{"selected-numbers":(null===(a=null===(o=t.drawData)||void 0===o?void 0:o.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}))),i("div",{class:"DrawPrizes"},i("label",{class:"Label"},Ga("prize",this.language),":"),0!==Number(t.amount)?i("span",null,t.details.filter((t=>"0"!==t.amount)).map((e=>i("span",null,this.getDivision(e,t)&&i("div",null,i("span",null,this.getDivision(e,t),":"),i("span",{style:{"margin-right":"2px"}},e.amount),i("span",null,e.currency)))))):i("span",null,"None"))))}))))))))}};$a.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}.DrawNumbersGrid label{display:block;margin-bottom:7px}.Label{position:relative}.DrawTicketsContainer{display:flex;flex-direction:column;margin:20px auto 0}.DrawMultipler{margin-top:15px}.DrawPrizes{margin-top:10px}.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;text-transform:uppercase;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 Ua=["ro","en","fr","ar","hr"],qa={en:{drawResultsHeader:"Draw results history",viewAllResults:"View All",noResults:"No results",fetchingResults:"Fetching results",resetButton:"Reset"},ro:{drawResultsHeader:"Istoricul extragerilor",viewAllResults:"Vezi toate rezultatele",noResults:"Niciun rezultat",fetchingResults:"Se obtin rezultatele"},fr:{drawResultsHeader:"Dessiner l'historique des résultats",viewAllResults:"Voir tout",noResults:"Aucun résultat",fetchingResults:"Récupération des résultats"},ar:{drawResultsHeader:"سجل نتائج السحب",viewAllResults:"عرض الكل",noResults:"لا توجد نتائج",fetchingResults:"جلب النتائج"},hr:{drawResultsHeader:"Povijest rezultata izvlačenja",viewAllResults:"Pogledaj sve",noResults:"Nema rezultata",fetchingResults:"Dohvaćanje rezultata"}},Va=(t,e)=>{const i=e;return qa[void 0!==i&&Ua.includes(i)?i:"en"][t]},Ya=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.getDrawResults=t=>{this.isLoading=!0;let e=new URL(`${this.endpoint}/games/${this.gameId}/draws/${t}`);fetch(e.href,{method:"GET",headers:{"Content-Type":"application/json",Accept:"application/json"}}).then((t=>(404==t.status&&(this.noResults=!0),t.json()))).then((t=>{this.drawData=[t].map((t=>t))})).catch((t=>{console.log("err",t)})).finally((()=>{this.isLoading=!1}))},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.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){t.detail.ticketDrawId?this.getDrawResults(t.detail.ticketDrawId):(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])qa[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=i("div",{key:"6fe19d40938e44d09482b7c1b8c58ff5d962565e",class:"DrawResultsHeader"},i("div",{key:"0b3639c6d21100af3fa1c33b9663452da8281f63",class:"DrawResultsHeaderContent"},i("h4",{key:"66902020884d393eb476fe1503fb75530a8fd0b1"},Va("drawResultsHeader",this.language)),i("div",{key:"3b98ce12acfd58006ab1c92805c4808370f5a1a4",class:"FilterSection"},i("helper-filters",{key:"3fba60abe71aa1c231365be8e20a8deccd7940cf","show-filter-id":"true","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 i("section",{key:"b6e07e38c0c0c3aecd95972f345c839d7230c7e5",class:"GridWrapper",ref:t=>this.stylingContainer=t},i("div",{key:"428ec5f0cf7556b92c1a5b840c23fae3133dcc59",class:"DrawResultsSection"},i("div",{key:"5d5da0f3740c674ad9fc526c2a9950ae209f4a00",class:"DrawResultsAreaHistory"},t,i("div",{key:"5a483612824d102ccf8685b030b7475b17caeeaf",class:"HistoryGridWrapper"},i("div",{key:"0645d2e1b984fe63b9a75a5e6e1af13b853cf39c",class:"HistoryGrid"},this.isLoading&&i("p",{key:"473d2a7b68d2d288b8c43917d2cff16f479d350f"},Va("fetchingResults",this.language)),!this.isLoading&&!this.noResults&&this.drawData.map((t=>i("lottery-draw-results",{endpoint:this.endpoint,"game-id":this.gameId,"draw-id":t.id,"draw-mode":!0,language:this.language,"translation-url":this.translationUrl,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent}))),!this.isLoading&&this.noResults&&i("p",{key:"66c3dcbac799822242b7036ef8aa9b2e1d9c0f7e"},Va("noResults",this.language)))),i("div",{key:"dadc2068cec33ef4571a36cbb4aa713f435befdd",class:"DrawHistoryPaginationWrapper"},this.totalResults>this.limit&&i("lottery-pagination",{key:"3f4a23466e8245517e5cca81e0f2e6de3a698d05",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})))))}};Ya.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}';const Ja=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 i("div",{key:"bfc44a442056b452e331fc736f9c22e30dca143b",class:"GamePageDetailsContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"c8ad00900a8f16050a840c2e21fd4c2cebf2e1ec","header-title":"Game Details",collapsed:!1,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("div",{key:"cc8dc2dc148fb862f51a5c45b18c6c3e9fbb46f7",class:"AccordionContainer",slot:"accordionContent"},i("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}))))}};Ja.style=":host{display:block}";const Ka=["ro","en","fr","ar","hr"],Za={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 ..."}},Qa=(t,e)=>{const i=e;return Za[void 0!==i&&Ka.includes(i)?i:"en"][t]},Xa=t=>new Promise(((e,i)=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((e=>{for(let i in t[e])Za[e][i]=t[e][i]})),e(Za)})).catch((t=>{i(t)}))})),tn=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.endpoint=void 0,this.endpointTicket=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}handleNewTranslations(){this.isLoading=!0,Xa(this.translationUrl).then((()=>{this.isLoading=!1}))}connectedCallback(){this.getGameDetails(),this.sessionId&&(this.isLoggedIn=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const e=Xa(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){this.interval=setInterval((()=>{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)}),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;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}}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}}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=[]}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}],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}submitTickets(){let t=new URL(`${this.endpointTicket}/tickets`),e={playerId:this.playerId.toString(),tickets:[]},i=[];this.secondarySelectionAllowed&&(i=this.secondaryTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]));let s=this.mainTickets[0].completed.reduce(((t,e,i)=>(e||t.push(i),t)),[]),r=[...new Set([...i,...s])].sort(((t,e)=>t-e));if(r.length){this.showSubmitError=!0;let t=r.map((t=>`Line${t+1}`)).join();return this.submitError=`The number of the selected number(s) on ${t} is invalid.`,void setTimeout((()=>{this.showSubmitError=!1}),3e3)}this.mainTickets.forEach(((t,i)=>{var s;e.tickets.push({startingDrawId:this.nextDraw,amount:(t.stake*t.drawCount*t.multiplierNum*(t.lineNum||1)*(null===(s=t.betType)||void 0===s?void 0:s.combinations)).toString(),gameId:this.gameId,gameName:this.gameData.name,currency:this.currency,selection:t.selectedNumbers.map(((e,s)=>{var r;return{betType:(null===(r=t.betType)||void 0===r?void 0:r.id)||this.gameData.rules.defaultBetType,stake:t.stake,selections:e,secondarySelections:this.secondarySelectionAllowed?this.secondaryTickets[i].selectedNumbers[s]:[]}})),multiplier:t.multiplier,multiplierNum:t.multiplierNum,drawCount:t.drawCount,quickPick:this.quickPick})}));const o="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)}));let a={method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:`Bearer ${this.sessionId}`,"X-Idempotency-Key":o},body:JSON.stringify(e)};this.isLoading=!0,fetch(t.href,a).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.successVisible=!0})).catch((t=>{console.log("Error ",t)})).finally((()=>{this.isLoading=!1}))}goBack(){this.goBackEvent.emit()}goToLobby(){this.goToLobbyEvent.emit()}render(){var t,e,s,o,a,n,l,h,c,d,u,p,m,f,b,v,g,y,w,x;const k=r(this.isMobile?"../static/chrono_lottery_mobile.png":"../static/chrono_desktop.png");return this.hasErrors?i("div",{class:"GamePage"},i("div",{class:"Title"},Qa("error",this.language))):i("div",{class:"GamePage",dir:"ar"==this.language?"rtl":"ltr",ref:t=>this.stylingContainer=t},i("div",{class:"GridBanner",style:{background:`url(${this.backgroundUrl?this.backgroundUrl:k})`,"background-size":"contain","background-repeat":"no-repeat","background-position":"center"}},i("div",{class:"BannerButtonsWrapper"}),i("div",{class:"Tabs"},i("div",{class:"TabButton"+(0==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=0},Qa("buy",this.language)),i("div",{class:"TabButton"+(1==this.tabIndex?" Active":""),onClick:()=>this.tabIndex=1},Qa("viewLatest",this.language)))),i("div",{class:"NextDrawWrapper"},this.nextDate&&i("div",{class:"NextDraw"},i("p",{class:"BannerText"},Qa("nextDraw",this.language)),i("div",{class:"BannerCountdown"},i("span",{class:"CountdownDays"},this.daysRemaining,"D"),i("span",{class:"CountdownHours"},this.hoursRemaining,"H"),i("span",{class:"CountdownMinutes"},this.minutesRemaining,"M"),i("span",{class:"CountdownSeconds"},this.secondsRemaining,"S")))),0==this.tabIndex&&i("div",{class:"GamePageContent"},i("div",{class:"GameDetails"},i("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===(o=null===(s=this.gameData.rules)||void 0===s?void 0:s.boards[0])||void 0===o?void 0:o.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})),i("div",{class:"TicketsWrapper"},this.mainTickets.map((t=>{var e,s;return i("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===(s=this.gameData.rules)||void 0===s?void 0:s.quickPickAvailable,"total-controllers":this.mainTickets.length,"translation-url":this.translationData,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent})}))),i("div",{class:"OrderSummary"},i("h3",{class:"OrderSummaryTitle"},Qa("orderSummaryTitle",this.language)),i("div",{class:"OrderTicketInfo"},i("div",{class:"Ticket"},Qa("orderSummaryTickets",this.language),": ",i("span",null,this.mainTickets.length)),i("div",null,i("span",null,(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)),i("span",{class:"Multiplier"},"x"),(null===(p=this.gameData.rules)||void 0===p?void 0:p.stakeMultiplierAvailable)&&i("span",null,i("span",null,1===(null===(m=this.mainTickets[0])||void 0===m?void 0:m.multiplierNum)?`${null===(f=this.mainTickets[0])||void 0===f?void 0:f.multiplierNum} Multiplier`:`${null===(b=this.mainTickets[0])||void 0===b?void 0:b.multiplierNum} Multipliers`),i("span",{class:"Multiplier"},"x")),i("span",null,`${null===(v=this.mainTickets[0])||void 0===v?void 0:v.stake} EUR`),(null===(g=this.gameData.rules)||void 0===g?void 0:g.drawMultiplierAvailable)&&i("span",null,i("span",{class:"Multiplier"},"x"),i("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`)))),i("hr",null),i("div",{class:"Total"},Qa("orderSummaryTotal",this.language),": ",i("span",null,this.totalAmount," ",this.currency)),i("div",{class:"ButtonWrapper"},this.isLoggedIn&&i("div",null,!this.isLoading&&i("div",{class:"submitWrap"},i("div",{class:"Button",onClick:()=>this.submitTickets()},Qa("orderSummarySubmit",this.language)),this.showSubmitError&&i("div",{class:"submitError"},this.submitError),this.showApiError&&i("div",{class:"submitError"},this.apiError)),this.isLoading&&i("span",{class:"Button",style:{cursor:"default"}},Qa("loading",this.language))),!this.isLoggedIn&&i("div",null,i("span",{class:"Button",onClick:()=>this.showLoginModal()},Qa("orderSummarySubmit",this.language)),i("helper-modal",{"title-modal":"Success",visible:this.loginModalVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Qa("modalLogin",this.language))))))),1==this.tabIndex&&i("div",null,i("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})),i("helper-modal",{"title-modal":"Success",visible:this.successVisible,"client-styling":this.clientStyling,"client-styling-url-content":this.clientStylingUrlContent},i("p",{class:"SubmitModalSuccess"},Qa("submitSuccess",this.language))))}static get assetsDirs(){return["../static"]}get element(){return s(this)}static get watchers(){return{translationUrl:["handleNewTranslations"]}}};tn.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 en=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}))),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))}),0===this.selectedCounter&&this.gridClearAllEvent.emit(this.gridIndex))}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 i("div",{key:"8ad436904a126e6bee036c7372cf45c075022e5f",class:"GridContainer",ref:t=>this.stylingContainer=t},i("div",{key:"5a8818209485f0808a99978910f6f26473dd6f59",class:"ticket"===this.gridType?"Grid TicketGrid":"Grid"},this.numbers.map((t=>i("div",null,i("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=>i("div",null,i("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})))):""))}};en.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 sn=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)),rn={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"}},on=(t,e)=>rn[void 0!==e&&e in rn?e:"en"][t],an=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])rn[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=i("ul",{class:"PaginationArea"},this.pagesArray.map(((t,e)=>i("li",{class:"PaginationItem"+(t===this.currentPage?" ActiveItem":" ")+" "+(sn(this.userAgent)?"MobileButtons":"")},i("button",{disabled:t===this.currentPage,onClick:this.paginationNavigation.bind(this,t,e)},i("span",null,t)))))),e=i("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"firstPage")},i("span",{class:"NavigationButton"},on("firstPage",this.language)),i("span",{class:"NavigationIcon"})),s=i("div",{class:"LeftItems"},this.secondaryArrowsActive&&e,i("button",{disabled:!this.prevPage||1===this.currentPage,onClick:this.navigateTo.bind(this,"previousPage")},i("span",{class:"NavigationButton"},on("previousPage",this.language)),i("span",{class:"NavigationIcon"})));sn(this.userAgent)&&(s=i("div",{class:"LeftItems"},i("button",{disabled:!this.prevPage,onClick:this.navigateTo.bind(this,"previousPage")},i("span",{class:"NavigationButton"},on("previousPage",this.language)),i("span",{class:"NavigationIcon"}))));let r=i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"lastPage")},i("span",{class:"NavigationButton"},on("lastPage",this.language)),i("span",{class:"NavigationIcon"})),o=i("div",{class:"RightItems"},i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},i("span",{class:"NavigationButton"},on("nextPage",this.language)),i("span",{class:"NavigationIcon"})),this.secondaryArrowsActive&&r);return sn(this.userAgent)&&(o=i("div",{class:"RightItems"},i("button",{disabled:!this.nextPage,onClick:this.navigateTo.bind(this,"nextPage")},i("span",{class:"NavigationButton"},on("nextPage",this.language)),i("span",{class:"NavigationIcon"})))),i("div",{id:"PaginationContainer",ref:t=>this.stylingContainer=t},this.arrowsActive&&s,this.numberedNavActive&&t,this.arrowsActive&&o)}};an.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 nn=["ro","en","hr"],ln={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"}},hn=(t,e)=>{const i=e;return ln[void 0!==i&&nn.includes(i)?i:"en"][t]},cn=g`
3450
- :host {
3451
- display: flex;
3452
- align-items: center;
3453
- box-sizing: border-box;
3454
- font-family: var(--lumo-font-family);
3455
- font-size: var(--lumo-font-size-m);
3456
- line-height: var(--lumo-line-height-xs);
3457
- padding: 0.5em calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4) 0.5em
3458
- var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
3459
- min-height: var(--lumo-size-m);
3460
- outline: none;
3461
- border-radius: var(--lumo-border-radius-m);
3462
- cursor: var(--lumo-clickable-cursor);
3463
- -webkit-font-smoothing: antialiased;
3464
- -moz-osx-font-smoothing: grayscale;
3465
- -webkit-tap-highlight-color: var(--lumo-primary-color-10pct);
3466
- --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
3467
- --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
3468
- --_selection-color-text: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
3469
- }
3470
-
3471
- /* Checkmark */
3472
- [part='checkmark']::before {
3473
- display: var(--_lumo-item-selected-icon-display, none);
3474
- content: var(--lumo-icons-checkmark);
3475
- font-family: lumo-icons;
3476
- font-size: var(--lumo-icon-size-m);
3477
- line-height: 1;
3478
- font-weight: normal;
3479
- width: 1em;
3480
- height: 1em;
3481
- margin: calc((1 - var(--lumo-line-height-xs)) * var(--lumo-font-size-m) / 2) 0;
3482
- color: var(--_selection-color-text);
3483
- flex: none;
3484
- opacity: 0;
3485
- transition:
3486
- transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2),
3487
- opacity 0.1s;
3488
- }
3489
-
3490
- :host([selected]) [part='checkmark']::before {
3491
- opacity: 1;
3492
- }
3493
-
3494
- :host([active]:not([selected])) [part='checkmark']::before {
3495
- transform: scale(0.8);
3496
- opacity: 0;
3497
- transition-duration: 0s;
3498
- }
3499
-
3500
- [part='content'] {
3501
- flex: auto;
3502
- }
3503
-
3504
- /* Disabled */
3505
- :host([disabled]) {
3506
- color: var(--lumo-disabled-text-color);
3507
- cursor: default;
3508
- pointer-events: none;
3509
- }
3510
-
3511
- /* TODO a workaround until we have "focus-follows-mouse". After that, use the hover style for focus-ring as well */
3512
- @media (any-hover: hover) {
3513
- :host(:hover:not([disabled])) {
3514
- background-color: var(--lumo-primary-color-10pct);
3515
- }
3516
- }
3517
-
3518
- :host([focus-ring]:not([disabled])) {
3519
- box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
3520
- }
3521
-
3522
- /* RTL specific styles */
3523
- :host([dir='rtl']) {
3524
- padding-left: calc(var(--lumo-space-l) + var(--lumo-border-radius-m) / 4);
3525
- padding-right: var(--_lumo-list-box-item-padding-left, calc(var(--lumo-border-radius-m) / 4));
3526
- }
3527
-
3528
- /* Slotted icons */
3529
- :host ::slotted(vaadin-icon) {
3530
- width: var(--lumo-icon-size-m);
3531
- height: var(--lumo-icon-size-m);
3532
- }
3533
- `;Tt("vaadin-item",cn,{moduleId:"lumo-item"});const dn=g`
3534
- :host {
3535
- -webkit-tap-highlight-color: transparent;
3536
- --_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
3537
- }
3538
-
3539
- /* Dividers */
3540
- [part='items'] ::slotted(hr) {
3541
- height: 1px;
3542
- border: 0;
3543
- padding: 0;
3544
- margin: var(--lumo-space-s) var(--lumo-border-radius-m);
3545
- background-color: var(--lumo-contrast-10pct);
3546
- }
3547
- `;Tt("vaadin-list-box",dn,{moduleId:"lumo-list-box"}),
3548
- /**
3549
- * @license
3550
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3551
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3552
- */
3553
- Tt("vaadin-select-item",cn,{moduleId:"lumo-select-item"}),Tt("vaadin-select-list-box",dn,{moduleId:"lumo-select-list-box"}),Tt("vaadin-select",[Lt,g`
3554
- :host(:not([theme*='align'])) ::slotted([slot='value']) {
3555
- text-align: start;
3556
- }
3557
-
3558
- [part='input-field'] {
3559
- cursor: var(--lumo-clickable-cursor);
3560
- }
3561
-
3562
- [part='input-field'] ::slotted([slot='value']) {
3563
- font-weight: var(--vaadin-input-field-value-font-weight, 500);
3564
- }
3565
-
3566
- [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
3567
- color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
3568
- }
3569
-
3570
- :host([readonly]) [part='input-field'] ::slotted([slot='value']:not([placeholder])) {
3571
- color: var(--lumo-secondary-text-color);
3572
- }
3573
-
3574
- /* placeholder styles */
3575
- [part='input-field'] ::slotted([slot='value'][placeholder]) {
3576
- color: var(--vaadin-input-field-placeholder-color, var(--lumo-secondary-text-color));
3577
- }
3578
-
3579
- :host(:is([readonly], [disabled])) ::slotted([slot='value'][placeholder]) {
3580
- opacity: 0;
3581
- }
3582
-
3583
- [part='toggle-button']::before {
3584
- content: var(--lumo-icons-dropdown);
3585
- }
3586
-
3587
- /* Highlight the toggle button when hovering over the entire component */
3588
- :host(:hover:not([readonly]):not([disabled])) [part='toggle-button'] {
3589
- color: var(--lumo-contrast-80pct);
3590
- }
3591
-
3592
- :host([theme~='small']) [part='input-field'] ::slotted([slot='value']) {
3593
- --_lumo-selected-item-height: var(--lumo-size-s);
3594
- --_lumo-selected-item-padding: 0;
3595
- }
3596
- `],{moduleId:"lumo-select"}),Tt("vaadin-select-value-button",g`
3597
- :host {
3598
- font-family: var(--lumo-font-family);
3599
- font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
3600
- padding: 0 0.25em;
3601
- --_lumo-selected-item-height: var(--lumo-size-m);
3602
- --_lumo-selected-item-padding: 0.5em;
3603
- }
3604
-
3605
- ::slotted(*) {
3606
- min-height: var(--_lumo-selected-item-height);
3607
- padding-top: var(--_lumo-selected-item-padding);
3608
- padding-bottom: var(--_lumo-selected-item-padding);
3609
- font-size: inherit;
3610
- }
3611
-
3612
- ::slotted(*:hover) {
3613
- background-color: transparent;
3614
- }
3615
- `,{moduleId:"lumo-select-value-button"}),Tt("vaadin-select-overlay",[Et,g`
3616
- :host {
3617
- --_lumo-item-selected-icon-display: block;
3618
- }
3619
-
3620
- /* Small viewport adjustment */
3621
- :host([phone]) {
3622
- /* stylelint-disable declaration-block-no-redundant-longhand-properties */
3623
- top: 0 !important;
3624
- right: 0 !important;
3625
- bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;
3626
- left: 0 !important;
3627
- /* stylelint-enable declaration-block-no-redundant-longhand-properties */
3628
- align-items: stretch;
3629
- justify-content: flex-end;
3630
- }
3631
-
3632
- :host([no-vertical-overlap][top-aligned]) [part='overlay'] {
3633
- margin-block-start: var(--lumo-space-xs);
3634
- }
3635
-
3636
- :host([no-vertical-overlap][bottom-aligned]) [part='overlay'] {
3637
- margin-block-end: var(--lumo-space-xs);
3638
- }
3639
-
3640
- :host([theme~='align-left']) {
3641
- text-align: left;
3642
- }
3643
-
3644
- :host([theme~='align-right']) {
3645
- text-align: right;
3646
- }
3647
-
3648
- :host([theme~='align-center']) {
3649
- text-align: center;
3650
- }
3651
- `],{moduleId:"lumo-select-overlay"});
3652
- /**
3653
- * @license
3654
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3655
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3656
- */
3657
- const un=t=>class extends(oo(ao(t))){static get properties(){return{_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return["Enter"," "]}get value(){return void 0!==this._value?this._value:this.textContent.trim()}set value(t){this._value=t}ready(){super.ready();const t=this.getAttribute("value");null!==t&&(this.value=t)}focus(){this.disabled||(super.focus(),this._setFocused(!0))}_shouldSetActive(t){return!(this.disabled||"keydown"===t.type&&t.defaultPrevented)}_selectedChanged(t){this.setAttribute("aria-selected",t)}_disabledChanged(t){super._disabledChanged(t),t&&(this.selected=!1,this.blur())}_onKeyDown(t){super._onKeyDown(t),this._activeKeys.includes(t.key)&&!t.defaultPrevented&&(t.preventDefault(),this.click())}}
3658
- /**
3659
- * @license
3660
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3661
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3662
- */;class pn extends(un(Nt(os(es)))){static get is(){return"vaadin-select-item"}static get template(){return Xi`
3663
- <style>
3664
- :host {
3665
- display: inline-block;
3666
- }
3667
-
3668
- :host([hidden]) {
3669
- display: none !important;
3670
- }
3671
- </style>
3672
- <span part="checkmark" aria-hidden="true"></span>
3673
- <div part="content">
3674
- <slot></slot>
3675
- </div>
3676
- `}ready(){super.ready(),this.setAttribute("role","option")}}d(pn);
3677
- /**
3678
- * @license
3679
- * Copyright (c) 2022 - 2024 Vaadin Ltd.
3680
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3681
- */
3682
- const mn=t=>class extends(ro(t)){get focused(){return(this._getItems()||[]).find(vs)}get _vertical(){return!0}focus(){const t=this._getItems();if(Array.isArray(t)){const e=this._getAvailableIndex(t,0,null,(t=>!fs(t)));e>=0&&this._focus(e)}}_getItems(){return Array.from(this.children)}_onKeyDown(t){if(super._onKeyDown(t),t.metaKey||t.ctrlKey)return;const{key:e}=t,i=this._getItems()||[],s=i.indexOf(this.focused);let r,o;const a=this._vertical||"rtl"!==this.getAttribute("dir")?1:-1;this.__isPrevKey(e)?(o=-a,r=s-a):this.__isNextKey(e)?(o=a,r=s+a):"Home"===e?(o=1,r=0):"End"===e&&(o=-1,r=i.length-1),r=this._getAvailableIndex(i,r,o,(t=>!fs(t))),r>=0&&(t.preventDefault(),this._focus(r,!0))}__isPrevKey(t){return this._vertical?"ArrowUp"===t:"ArrowLeft"===t}__isNextKey(t){return this._vertical?"ArrowDown"===t:"ArrowRight"===t}_focus(t,e=!1){const i=this._getItems();this._focusItem(i[t],e)}_focusItem(t){t&&(t.focus(),t.setAttribute("focus-ring",""))}_getAvailableIndex(t,e,i,s){const r=t.length;let o=e;for(let e=0;"number"==typeof o&&e<r;e+=1,o+=i||1){o<0?o=r-1:o>=r&&(o=0);const e=t[o];if(!e.hasAttribute("disabled")&&this.__isMatchingItem(e,s))return o}return-1}__isMatchingItem(t,e){return"function"!=typeof e||e(t)}}
3683
- /**
3684
- * @license
3685
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3686
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3687
- */,fn=t=>class extends(mn(t)){static get properties(){return{disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return!this._vertical&&"rtl"===this.getAttribute("dir")}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return"horizontal"!==this.orientation}focus(){this._observer&&this._observer.flush();const t=Array.isArray(this.items)?this.items:[],e=this._getAvailableIndex(t,0,null,(t=>0===t.tabIndex&&!fs(t)));e>=0?this._focus(e):super.focus()}ready(){super.ready(),this.addEventListener("click",(t=>this._onClick(t)));const t=this.shadowRoot.querySelector("slot:not([name])");this._observer=new yr(t,(()=>{this._setItems(this._filterItems(qs(this)))}))}_getItems(){return this.items}_enhanceItems(t,e,i,s){if(!s&&t){this.setAttribute("aria-orientation",e||"vertical"),t.forEach((t=>{e?t.setAttribute("orientation",e):t.removeAttribute("orientation")})),this._setFocusable(i<0||!i?0:i);const s=t[i];t.forEach((t=>{t.selected=t===s})),s&&!s.disabled&&this._scrollToItem(i)}}_filterItems(t){return t.filter((t=>t._hasVaadinItemMixin))}_onClick(t){if(t.metaKey||t.shiftKey||t.ctrlKey||t.defaultPrevented)return;const e=this._filterItems(t.composedPath())[0];let i;e&&!e.disabled&&(i=this.items.indexOf(e))>=0&&(this.selected=i)}_searchKey(t,e){return this._searchReset=fr.debounce(this._searchReset,cr.after(500),(()=>{this._searchBuf=""})),this._searchBuf+=e.toLowerCase(),this.items.some((t=>this.__isMatchingKey(t)))||(this._searchBuf=e.toLowerCase()),this._getAvailableIndex(this.items,1===this._searchBuf.length?t+1:t,1,(t=>this.__isMatchingKey(t)&&"none"!==getComputedStyle(t).display))}__isMatchingKey(t){return t.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(t){if(t.metaKey||t.ctrlKey)return;const e=t.key,i=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(e)&&1===e.length){const t=this._searchKey(i,e);t>=0&&this._focus(t)}else super._onKeyDown(t)}_isItemHidden(t){return"none"===getComputedStyle(t).display}_setFocusable(t){t=this._getAvailableIndex(this.items,t,1);const e=this.items[t];this.items.forEach((t=>{t.tabIndex=t===e?0:-1}))}_focus(t){this.items.forEach(((e,i)=>{e.focused=i===t})),this._setFocusable(t),this._scrollToItem(t),super._focus(t)}_scrollToItem(t){const e=this.items[t];if(!e)return;const i=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],s=this._scrollerElement.getBoundingClientRect(),r=(this.items[t+1]||e).getBoundingClientRect(),o=(this.items[t-1]||e).getBoundingClientRect();let a=0;!this._isRTL&&r[i[1]]>=s[i[1]]||this._isRTL&&r[i[1]]<=s[i[1]]?a=r[i[1]]-s[i[1]]:(!this._isRTL&&o[i[0]]<=s[i[0]]||this._isRTL&&o[i[0]]>=s[i[0]])&&(a=o[i[0]]-s[i[0]]),this._scroll(a)}_scroll(t){if(this._vertical)this._scrollerElement.scrollTop+=t;else{const e=this.getAttribute("dir")||"ltr",i=
3688
- /**
3689
- * @license
3690
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3691
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3692
- */
3693
- function(t,e){const{scrollLeft:i}=t;return"rtl"!==e?i:t.scrollWidth-t.clientWidth+i}(this._scrollerElement,e)+t;!function(t,e,i){t.scrollLeft="rtl"!==e?i:t.clientWidth-t.scrollWidth+i}(this._scrollerElement,e,i)}}}
3694
- /**
3695
- * @license
3696
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3697
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3698
- */;class bn extends(fn(Nt(os(Ws(es))))){static get is(){return"vaadin-select-list-box"}static get template(){return Xi`
3699
- <style>
3700
- :host {
3701
- display: flex;
3702
- }
3703
-
3704
- :host([hidden]) {
3705
- display: none !important;
3706
- }
3707
-
3708
- [part='items'] {
3709
- height: 100%;
3710
- width: 100%;
3711
- overflow-y: auto;
3712
- -webkit-overflow-scrolling: touch;
3713
- }
3714
- </style>
3715
- <div part="items">
3716
- <slot></slot>
3717
- </div>
3718
- `}static get properties(){return{orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox")}}d(bn);
3719
- /**
3720
- * @license
3721
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3722
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3723
- */
3724
- const vn=t=>class extends(Xs(Us(os(t)))){static get observers(){return["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0}_getMenuElement(){return Array.from(this.children).find((t=>"style"!==t.localName))}_updateOverlayWidth(t,e){if(t&&e){const t="--vaadin-select-overlay-width",i=getComputedStyle(e).getPropertyValue(t);""===i?this.style.removeProperty(t):this.style.setProperty(t,i)}}}
3725
- /**
3726
- * @license
3727
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3728
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3729
- */;Tt("vaadin-select-overlay",[ls,g`
3730
- :host {
3731
- align-items: flex-start;
3732
- justify-content: flex-start;
3733
- }
3734
-
3735
- :host(:not([phone])) [part='overlay'] {
3736
- min-width: var(--vaadin-select-overlay-width, var(--vaadin-select-text-field-width));
3737
- }
3738
-
3739
- @media (forced-colors: active) {
3740
- [part='overlay'] {
3741
- outline: 3px solid;
3742
- }
3743
- }
3744
- `],{moduleId:"vaadin-select-overlay-styles"});class gn extends(vn(Nt(es))){static get is(){return"vaadin-select-overlay"}static get template(){return Xi`
3745
- <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
3746
- <div part="overlay" id="overlay" tabindex="0">
3747
- <div part="content" id="content">
3748
- <slot></slot>
3749
- </div>
3750
- </div>
3751
- `}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t)}}}d(gn),
3752
- /**
3753
- * @license
3754
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3755
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3756
- */
3757
- Tt("vaadin-select-value-button",g`
3758
- :host {
3759
- display: inline-block;
3760
- position: relative;
3761
- outline: none;
3762
- white-space: nowrap;
3763
- -webkit-user-select: none;
3764
- -moz-user-select: none;
3765
- user-select: none;
3766
- min-width: 0;
3767
- width: 0;
3768
- }
3769
-
3770
- ::slotted(*) {
3771
- padding-left: 0;
3772
- padding-right: 0;
3773
- flex: auto;
3774
- }
3775
-
3776
- /* placeholder styles */
3777
- ::slotted(*:not([selected])) {
3778
- line-height: 1;
3779
- }
3780
-
3781
- .vaadin-button-container {
3782
- display: inline-flex;
3783
- align-items: center;
3784
- justify-content: center;
3785
- text-align: inherit;
3786
- width: 100%;
3787
- height: 100%;
3788
- min-height: inherit;
3789
- text-shadow: inherit;
3790
- }
3791
-
3792
- [part='label'] {
3793
- white-space: nowrap;
3794
- overflow: hidden;
3795
- text-overflow: ellipsis;
3796
- width: 100%;
3797
- line-height: inherit;
3798
- }
3799
- `,{moduleId:"vaadin-select-value-button-styles"});class yn extends(lo(Nt(es))){static get is(){return"vaadin-select-value-button"}static get template(){return Xi`
3800
- <div class="vaadin-button-container">
3801
- <span part="label">
3802
- <slot></slot>
3803
- </span>
3804
- </div>
3805
- `}}d(yn);
3806
- /**
3807
- * @license
3808
- * Copyright (c) 2021 - 2024 Vaadin Ltd..
3809
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3810
- */
3811
- const wn=g`
3812
- .sr-only {
3813
- border: 0 !important;
3814
- clip: rect(1px, 1px, 1px, 1px) !important;
3815
- -webkit-clip-path: inset(50%) !important;
3816
- clip-path: inset(50%) !important;
3817
- height: 1px !important;
3818
- margin: -1px !important;
3819
- overflow: hidden !important;
3820
- padding: 0 !important;
3821
- position: absolute !important;
3822
- width: 1px !important;
3823
- white-space: nowrap !important;
3824
- }
3825
- `
3826
- /**
3827
- * @license
3828
- * Copyright (c) 2021 - 2024 Vaadin Ltd.
3829
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3830
- */;
3831
- /**
3832
- * @license
3833
- * Copyright (c) 2023 - 2024 Vaadin Ltd.
3834
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3835
- */
3836
- class xn extends kr{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")}})}}
3837
- /**
3838
- * @license
3839
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3840
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3841
- */const kn=t=>class extends(Ca(Ko(ba(ro(fa(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}-${xr()}`,this._srLabelController=new ua(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 xn(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Vo(this._phoneMediaQuery,(t=>{this._phone=t}))),this._tooltipController=new _r(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=Boolean(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",Boolean(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),oa(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&&(Boolean(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))}))}async __dispatchChange(){this.updateComplete&&await this.updateComplete,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1}}
3842
- /**
3843
- * @license
3844
- * Copyright (c) 2017 - 2024 Vaadin Ltd.
3845
- * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
3846
- */;Tt("vaadin-select",[xa,ka,wn],{moduleId:"vaadin-select-styles"});class _n extends(kn(gr(Nt(es)))){static get is(){return"vaadin-select"}static get template(){return Xi`
3847
- <style>
3848
- :host {
3849
- position: relative;
3850
- }
3851
-
3852
- ::slotted([slot='value']) {
3853
- flex-grow: 1;
3854
- }
3855
- </style>
3856
-
3857
- <div class="vaadin-select-container">
3858
- <div part="label" on-click="_onClick">
3859
- <slot name="label"></slot>
3860
- <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
3861
- </div>
3862
-
3863
- <vaadin-input-container
3864
- part="input-field"
3865
- readonly="[[readonly]]"
3866
- disabled="[[disabled]]"
3867
- invalid="[[invalid]]"
3868
- theme$="[[_theme]]"
3869
- on-click="_onClick"
3870
- >
3871
- <slot name="prefix" slot="prefix"></slot>
3872
- <slot name="value"></slot>
3873
- <div part="toggle-button" slot="suffix" aria-hidden="true" on-mousedown="_onToggleMouseDown"></div>
3874
- </vaadin-input-container>
3875
-
3876
- <div part="helper-text">
3877
- <slot name="helper"></slot>
3878
- </div>
3879
-
3880
- <div part="error-message">
3881
- <slot name="error-message"></slot>
3882
- </div>
3883
- </div>
3884
-
3885
- <vaadin-select-overlay
3886
- position-target="[[_inputContainer]]"
3887
- opened="{{opened}}"
3888
- with-backdrop="[[_phone]]"
3889
- phone$="[[_phone]]"
3890
- theme$="[[_theme]]"
3891
- no-vertical-overlap$="[[noVerticalOverlap]]"
3892
- on-vaadin-overlay-open="_onOverlayOpen"
3893
- ></vaadin-select-overlay>
3894
-
3895
- <slot name="tooltip"></slot>
3896
- <div class="sr-only">
3897
- <slot name="sr-label"></slot>
3898
- </div>
3899
- `}static get observers(){return["_rendererChanged(renderer, _overlayElement)"]}ready(){var t;super.ready(),t=this,window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate())}_onOverlayOpen(){this._menuElement&&this._menuElement.focus()}}d(_n);const Cn=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}handleLineMultiplierChange(t){this.grids=Array.from({length:t},((t,e)=>e+1)),this.ticketDone=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 r=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=r.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])ln[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}),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)]}toggleAutoSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!0,...this.ticketDone.slice(t+1)],this.autoSelection.emit({ticketId:this.ticketId,index:t})}toggleResetSelection(t){this.ticketDone=[...this.ticketDone.slice(0,t),!1,...this.ticketDone.slice(t+1)],this.resetSelection.emit({ticketId:this.ticketId,index:t})}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})}render(){if(this.isLoading)return i("div",null,i("p",null,hn("loading",this.language)));if(this.hasErrors)return i("div",null,i("p",null,hn("error",this.language)));{const{rules:t}=this.gameData;return i("div",{class:"TicketContainer",ref:t=>this.stylingContainer=t},i("p",{class:"TicketTitle"},this.gameData.name),i("div",{class:"TicketTabs"},this.groupType.map(((t,e)=>i("div",{class:"TabButton"+(this.tabIndex==e?" Active":""),onClick:()=>this.tabIndex=e},t.groupName)))),this.playType.length>1&&i("div",null,i("label",{class:"Label"},hn("playType",this.language),": "),i("vaadin-select",{style:{width:"160px"},items:this.playType,value:this.selectedPlayTypeId,"on-value-changed":t=>this.handlePlayTypeChange(t.detail.value)})),this.boardsAllowed.length>1&&i("div",null,i("label",{class:"Label"},hn("lines",this.language),": "),i("div",{class:"WagerInput"},i("div",{ref:t=>this.selectLineRef=t,class:this.isCustomSelectLine?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleLineSelection()},i("span",null,this.lineMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},this.boardsAllowed.map((t=>i("li",{class:this.lineMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setLineMultiplier(t)},t)))))))),this.grids.map(((e,s)=>i("div",null,i("div",{class:"TicketGridHeader"},i("div",null,hn("lineName",this.language),s+1),this.resetButton&&this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"ResetButton",onClick:()=>this.toggleResetSelection(s)},hn("resetButton",this.language))),this.autoPick&&!this.ticketDone[s]&&i("div",{class:"ButtonContainer"},i("a",{class:"AutoButton",onClick:()=>this.toggleAutoSelection(s)},hn("autoButton",this.language)))),i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].selectionName),i("lottery-grid",{"grid-index":s,"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&&i("div",{class:"SecondarySelectionWrapper"},i("div",{class:"TicketGridBullets"},i("p",{class:"TicketGridTitle"},t.boards[0].secondarySelectionName),i("lottery-grid",{"grid-index":s,"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&&i("div",null,i("label",{class:"Label"},hn("multiplier",this.language),": "),i("div",{class:"WagerInput"},t.stakeMultipliers.length>1?i("div",{ref:t=>this.selectStakeRef=t,class:this.isCustomSelectStake?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleSelection()},i("span",null,this.stakeMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakeMultipliers.map((t=>i("li",{class:this.stakeMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setStakeMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.stakeMultipliers[0]||1,type:"number",disabled:!0})))),t.drawMultiplierAvailable&&i("div",null,i("label",{class:"Label"},hn("numberOfDraws",this.language),": "),i("div",{class:"WagerInput"},t.durations.length>1?i("div",{ref:t=>this.selectDrawRef=t,class:this.isCustomSelectDraw?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleDrawSelection()},i("span",null,this.drawMultiplier),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.durations.map((t=>i("li",{class:this.drawMultiplier==t?"SelectedValue":"",value:t,onClick:()=>this.setDrawMultiplier(t)},t)))))):i("div",null,i("input",{min:"1",value:t.durations[0]||1,type:"number",disabled:!0})))),i("div",null,i("label",{class:"Label"},hn("wagerPerDraw",this.language),": "),i("div",{class:"WagerInput"},t.stakes.length>1?i("div",{ref:t=>this.selectRef=t,class:this.isCustomSelect?"SelectWrapper SelectActive":"SelectWrapper"},i("div",{class:"SelectButton",onClick:()=>this.toggleClass()},i("span",null,this.amountInfo.value," ",this.amountInfo.currency),i("span",{class:"SelectExpand"},"▼")),i("div",{class:"SelectContent"},i("ul",{class:"SelectOptions"},t.stakes.map((t=>i("li",{class:this.amountInfo.value==t.value?"SelectedValue":"",value:t.value,onClick:()=>this.setWagerPerDraw(t)},t.value," ",t.currency)))))):i("div",null,i("input",{min:"1",value:t.stakes[0].value,type:"number",disabled:!0}),i("span",{class:"WagerInputTitle"},t.stakes[0].currency)))))}}static get watchers(){return{lineMultiplier:["handleLineMultiplierChange"],tabIndex:["handleTabIndexChange"]}}};Cn.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 Dn=["ro","en","fr","ar","hr"],An={en:{ticket:"Ticket"},ro:{ticket:"Bilet"},fr:{ticket:"Billet"},ar:{ticket:"تذكرة"},hr:{ticket:"Listić"}},Tn=(t,e)=>{const i=e;return An[void 0!==i&&Dn.includes(i)?i:"en"][t]},Sn=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])An[e][i]=t[e][i]})))}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrlContent&&this.setClientStylingURL(),this.limitStylingAppends=!0)}render(){return i("div",{key:"581989035aa42a397cd39a4cdd929ea91190494c",class:"LotteryTicketControllerContainer",ref:t=>this.stylingContainer=t},i("helper-accordion",{key:"724d50d1532510344ed7acd57c3c5faef17aef8c","header-title":`${Tn("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},i("div",{key:"ba851ea2792641971a5552a94558fe8d28068187",slot:"accordionContent"},i("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}))))}};Sn.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{n as helper_accordion,Sa as helper_filters,Ba as helper_modal,Ra as helper_tab,ja as helper_tabs,Wa as lottery_bullet,$a as lottery_draw_results,Ya as lottery_draw_results_history,Ja as lottery_game_details,tn as lottery_game_page,en as lottery_grid,an as lottery_pagination,Cn as lottery_ticket,Sn as lottery_ticket_controller}