@everymatrix/helper-filters 1.65.0 → 1.65.2

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 (24) hide show
  1. package/dist/cjs/helper-filters.cjs.js +1 -1
  2. package/dist/cjs/helper-filters_2.cjs.entry.js +6661 -22832
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/components/helper-filters/helper-filters.css +11 -0
  5. package/dist/collection/components/helper-filters/helper-filters.js +66 -33
  6. package/dist/collection/utils/locale.utils.js +19 -5
  7. package/dist/esm/helper-filters.js +1 -1
  8. package/dist/esm/helper-filters_2.entry.js +6663 -22834
  9. package/dist/esm/loader.js +1 -1
  10. package/dist/helper-filters/helper-filters.esm.js +1 -1
  11. package/dist/helper-filters/p-ab13487b.entry.js +5614 -0
  12. package/dist/types/components/helper-filters/helper-filters.d.ts +10 -6
  13. package/dist/types/components.d.ts +0 -8
  14. package/package.json +1 -1
  15. package/dist/helper-filters/p-185df28e.entry.js +0 -3449
  16. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  17. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/packages/stencil/helper-filters/stencil.config.d.ts +0 -0
  18. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/packages/stencil/helper-filters/stencil.config.dev.d.ts +0 -0
  19. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/packages/stencil/helper-filters/storybook/main.d.ts +0 -0
  20. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/packages/stencil/helper-filters/storybook/preview.d.ts +0 -0
  21. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/tools/plugins/index.d.ts +0 -0
  22. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  23. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  24. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/helper-filters/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,3449 +0,0 @@
1
- import{r as t,c as e,h as i}from"./p-a730a9fa.js";const s=["ro","en","hr"],o={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"}},r=(t,e)=>{const i=e;return o[void 0!==i&&s.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 n(t,e="24.5.10"){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 a extends HTMLElement{static get is(){return"vaadin-lumo-styles"}}n(a);
13
- /**
14
- * @license
15
- * Copyright 2019 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */
18
- const l=globalThis,h=l.ShadowRoot&&(void 0===l.ShadyCSS||l.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,c=Symbol(),d=new WeakMap;class u{constructor(t,e,i){if(this._$cssResult$=!0,i!==c)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(h&&void 0===t){const i=void 0!==e&&1===e.length;i&&(t=d.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&d.set(e,t))}return t}toString(){return this.cssText}}const p=(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 u(i,t,c)},m=(t,e)=>{if(h)t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const i of e){const e=document.createElement("style"),s=l.litNonce;void 0!==s&&e.setAttribute("nonce",s),e.textContent=i.cssText,t.appendChild(e)}},f=h?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return(t=>new u("string"==typeof t?t:t+"",void 0,c))(e)})(t):t
19
- /**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */,{is:v,defineProperty:b,getOwnPropertyDescriptor:g,getOwnPropertyNames:y,getOwnPropertySymbols:w,getPrototypeOf:_}=Object,x=globalThis,k=x.trustedTypes,A=k?k.emptyScript:"",C=x.reactiveElementPolyfillSupport,D={toAttribute(t,e){switch(e){case Boolean:t=t?A: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}},T=(t,e)=>!v(t,e),S={attribute:!0,type:String,converter:D,reflect:!1,hasChanged:T};Symbol.metadata??=Symbol("metadata"),x.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=S){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&&b(this.prototype,t,s)}}static getPropertyDescriptor(t,e,i){const{get:s,set:o}=g(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get(){return s?.call(this)},set(e){const r=s?.call(this);o.call(this,e),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??S}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;const t=_(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){const t=this.properties,e=[...y(t),...w(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(f(t))}else void 0!==t&&e.push(f(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 m(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 o=(void 0!==i.converter?.toAttribute?i.converter:D).toAttribute(e,i.type);this._$Em=t,null==o?this.removeAttribute(s):this.setAttribute(s,o),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),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:D;this._$Em=s,this[s]=o.fromAttribute(e,t.type),this._$Em=null}}requestUpdate(t,e,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??T)(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,C?.({ReactiveElement:M}),(x.reactiveElementVersions??=[]).push("2.0.4");
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- const z=globalThis,P=z.trustedTypes,O=P?P.createPolicy("lit-html",{createHTML:t=>t}):void 0,E="$lit$",F=`lit$${Math.random().toFixed(9).slice(2)}$`,N="?"+F,I=`<${N}>`,B=document,j=()=>B.createComment(""),W=t=>null===t||"object"!=typeof t&&"function"!=typeof t,R=Array.isArray,U="[ \t\n\f\r]",H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,L=/-->/g,$=/>/g,q=RegExp(`>|${U}(?:([^\\s"'>=/]+)(${U}*=${U}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),Y=/'/g,V=/"/g,G=/^(?:script|style|textarea|title)$/i,J=Symbol.for("lit-noChange"),K=Symbol.for("lit-nothing"),Z=new WeakMap,X=B.createTreeWalker(B,129);function Q(t,e){if(!R(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==O?O.createHTML(e):e}const tt=(t,e)=>{const i=t.length-1,s=[];let o,r=2===e?"<svg>":3===e?"<math>":"",n=H;for(let e=0;e<i;e++){const i=t[e];let a,l,h=-1,c=0;for(;c<i.length&&(n.lastIndex=c,l=n.exec(i),null!==l);)c=n.lastIndex,n===H?"!--"===l[1]?n=L:void 0!==l[1]?n=$:void 0!==l[2]?(G.test(l[2])&&(o=RegExp("</"+l[2],"g")),n=q):void 0!==l[3]&&(n=q):n===q?">"===l[0]?(n=o??H,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,a=l[1],n=void 0===l[3]?q:'"'===l[3]?V:Y):n===V||n===Y?n=q:n===L||n===$?n=H:(n=q,o=void 0);const d=n===q&&t[e+1].startsWith("/>")?" ":"";r+=n===H?i+I:h>=0?(s.push(a),i.slice(0,h)+E+i.slice(h)+F+d):i+F+(-2===h?e:d)}return[Q(t,r+(t[i]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),s]};class et{constructor({strings:t,_$litType$:e},i){let s;this.parts=[];let o=0,r=0;const n=t.length-1,a=this.parts,[l,h]=tt(t,e);if(this.el=et.createElement(l,i),X.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(s=X.nextNode())&&a.length<n;){if(1===s.nodeType){if(s.hasAttributes())for(const t of s.getAttributeNames())if(t.endsWith(E)){const e=h[r++],i=s.getAttribute(t).split(F),n=/([.?@])?(.*)/.exec(e);a.push({type:1,index:o,name:n[2],strings:i,ctor:"."===n[1]?nt:"?"===n[1]?at:"@"===n[1]?lt:rt}),s.removeAttribute(t)}else t.startsWith(F)&&(a.push({type:6,index:o}),s.removeAttribute(t));if(G.test(s.tagName)){const t=s.textContent.split(F),e=t.length-1;if(e>0){s.textContent=P?P.emptyScript:"";for(let i=0;i<e;i++)s.append(t[i],j()),X.nextNode(),a.push({type:2,index:++o});s.append(t[e],j())}}}else if(8===s.nodeType)if(s.data===N)a.push({type:2,index:o});else{let t=-1;for(;-1!==(t=s.data.indexOf(F,t+1));)a.push({type:7,index:o}),t+=F.length-1}o++}}static createElement(t,e){const i=B.createElement("template");return i.innerHTML=t,i}}function it(t,e,i=t,s){if(e===J)return e;let o=void 0!==s?i._$Co?.[s]:i._$Cl;const r=W(e)?void 0:e._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),void 0===r?o=void 0:(o=new r(t),o._$AT(t,i,s)),void 0!==s?(i._$Co??=[])[s]=o:i._$Cl=o),void 0!==o&&(e=it(t,o._$AS(t,e.values),o,s)),e}class st{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??B).importNode(e,!0);X.currentNode=s;let o=X.nextNode(),r=0,n=0,a=i[0];for(;void 0!==a;){if(r===a.index){let e;2===a.type?e=new ot(o,o.nextSibling,this,t):1===a.type?e=new a.ctor(o,a.name,a.strings,this,t):6===a.type&&(e=new ht(o,this,t)),this._$AV.push(e),a=i[++n]}r!==a?.index&&(o=X.nextNode(),r++)}return X.currentNode=B,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 ot{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,i,s){this.type=2,this._$AH=K,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=it(this,t,e),W(t)?t===K||null==t||""===t?(this._$AH!==K&&this._$AR(),this._$AH=K):t!==this._$AH&&t!==J&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>R(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!==K&&W(this._$AH)?this._$AA.nextSibling.data=t:this.T(B.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=et.createElement(Q(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===s)this._$AH.p(e);else{const t=new st(s,this),i=t.u(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let e=Z.get(t.strings);return void 0===e&&Z.set(t.strings,e=new et(t)),e}k(t){R(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,s=0;for(const o of t)s===e.length?e.push(i=new ot(this.O(j()),this.O(j()),this,this.options)):i=e[s],i._$AI(o),s++;s<e.length&&(this._$AR(i&&i._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){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 rt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,s,o){this.type=1,this._$AH=K,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=o,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=K}_$AI(t,e=this,i,s){const o=this.strings;let r=!1;if(void 0===o)t=it(this,t,e,0),r=!W(t)||t!==this._$AH&&t!==J,r&&(this._$AH=t);else{const s=t;let n,a;for(t=o[0],n=0;n<o.length-1;n++)a=it(this,s[i+n],e,n),a===J&&(a=this._$AH[n]),r||=!W(a)||a!==this._$AH[n],a===K?t=K:t!==K&&(t+=(a??"")+o[n+1]),this._$AH[n]=a}r&&!s&&this.j(t)}j(t){t===K?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class nt extends rt{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===K?void 0:t}}class at extends rt{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==K)}}class lt extends rt{constructor(t,e,i,s,o){super(t,e,i,s,o),this.type=5}_$AI(t,e=this){if((t=it(this,t,e,0)??K)===J)return;const i=this._$AH,s=t===K&&i!==K||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==K&&(i===K||s);s&&this.element.removeEventListener(this.name,this,i),o&&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 ht{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){it(this,t)}}const ct=z.litHtmlPolyfillSupport;ct?.(et,ot),(z.litHtmlVersions??=[]).push("3.2.1");
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */
35
- class dt 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 o=s._$litPart$;if(void 0===o){const t=i?.renderBefore??null;s._$litPart$=o=new ot(e.insertBefore(j(),t),t,void 0,i??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return J}}dt._$litElement$=!0,dt.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:dt});const ut=globalThis.litElementPolyfillSupport;ut?.({LitElement:dt}),(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 pt=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
- */,mt=[],ft=new Set,vt=new Set;function bt(t){return t&&Object.prototype.hasOwnProperty.call(t,"__themes")}function gt(t,e){return(t||"").split(" ").some((t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e)))}function yt(t){return t.map((t=>t.cssText)).join("\n")}const wt="vaadin-themable-mixin-style";function _t(t){t.prototype instanceof dt?t.elementStyles=t.finalizeStyles(t.styles):t.prototype._template.content.getElementById(wt).textContent=yt(t.getStylesForThis()),vt.forEach((e=>{const i=customElements.get(e);i!==t&&i.prototype instanceof t&&_t(i)}))}function xt(t,e,i={}){e=function(t=[]){return[t].flat(1/0).filter((t=>t instanceof u||(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):mt.push({themeFor:t,styles:e,include:i.include,moduleId:i.moduleId}),t&&vt.forEach((i=>{if(gt(t,i)&&function(t){return bt(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}`),_t(t),function(t){ft.forEach((e=>{const i=e.deref();i instanceof t?function(t){if(!t.shadowRoot)return;const e=t.constructor;t instanceof dt?([...t.shadowRoot.querySelectorAll("style")].forEach((t=>t.remove())),m(t.shadowRoot,e.elementStyles)):t.shadowRoot.getElementById(wt).textContent=e.prototype._template.content.getElementById(wt).textContent}(i):i||ft.delete(e)}))}(t)}}))}function kt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():mt}function At(t=""){let e=0;return t.startsWith("lumo-")||t.startsWith("material-")?e=1:t.startsWith("vaadin-")&&(e=2),e}function Ct(t){const e=[];return t.include&&[].concat(t.include).forEach((t=>{const i=kt().find((e=>e.moduleId===t));i?e.push(...Ct(i),...i.styles):console.warn(`Included moduleId ${t} not found in style registry`)}),t.styles),e}function Dt(t){const e=`${t}-default-theme`,i=kt().filter((i=>i.moduleId!==e&&gt(i.themeFor,t))).map((t=>({...t,styles:[...Ct(t),...t.styles],includePriority:At(t.moduleId)}))).sort(((t,e)=>e.includePriority-t.includePriority));return i.length>0?i:kt().filter((t=>t.moduleId===e))}const Tt=t=>class extends(pt(t)){constructor(){super(),ft.add(new WeakRef(this))}static finalize(){if(super.finalize(),this.is&&vt.add(this.is),this.elementStyles)return;const t=this.prototype._template;t&&!bt(this)&&function(t,e){const i=document.createElement("style");i.id=wt,i.textContent=yt(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:[])||[],...Dt(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
- */,St=(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)};St("sizing-props",p`
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
- `),St("spacing-props",p`
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
- `),p`
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
- `,St("style-props",p`
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
- `),St("color-props",p`
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
- `),xt("",p`
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=p`
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
- `;xt("",p`
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"}),St("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 zt=p`
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
- `;xt("",zt,{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 Pt=p`
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
- `;xt("",Pt,{moduleId:"lumo-menu-overlay-core"});const Ot=[zt,Pt,p`
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
- `];xt("",Ot,{moduleId:"lumo-menu-overlay"}),xt("vaadin-date-picker-overlay",[Ot,p`
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"}),xt("vaadin-button",p`
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"}),xt("vaadin-date-picker-year",p`
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"}),xt("vaadin-date-picker-overlay-content",p`
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"}),xt("vaadin-month-calendar",p`
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"}),xt("vaadin-input-container",p`
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"}),St("font-icons",p`
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 Et=p`
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
- `;xt("",Et,{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 Ft=p`
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
- */,Nt=p`
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
- `;xt("",Nt,{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 It=[Nt,Et,Ft,p`
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
- `];xt("",It,{moduleId:"lumo-input-field-shared-styles"}),xt("vaadin-date-picker",[It,p`
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 Bt,jt,Wt=/(url\()([^)]*)(\))/g,Rt=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function Ut(t,e){if(t&&Rt.test(t))return t;if("//"===t)return t;if(void 0===Bt){Bt=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Bt="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),Bt)try{return new URL(t,e).href}catch(e){return t}return jt||(jt=document.implementation.createHTMLDocument("temp"),jt.base=jt.createElement("base"),jt.head.appendChild(jt.base),jt.anchor=jt.createElement("a"),jt.body.appendChild(jt.anchor)),jt.base.href=e,jt.anchor.href=t,jt.anchor.href||t}function Ht(t,e){return t.replace(Wt,(function(t,i,s,o){return i+"'"+Ut(s.replace(/["']/g,""),e)+"'"+o}))}function Lt(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 $t=!window.ShadyDOM||!window.ShadyDOM.inUse,qt=$t&&"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 Yt=window.Polymer&&window.Polymer.rootPath||Lt(document.baseURI||window.location.href),Vt=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Gt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,Jt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Kt=window.Polymer&&window.Polymer.legacyOptimizations||!1,Zt=window.Polymer&&window.Polymer.legacyWarnings||!1,Xt=window.Polymer&&window.Polymer.syncInitialRender||!1,Qt=window.Polymer&&window.Polymer.legacyUndefined||!1,te=window.Polymer&&window.Polymer.orderedComputed||!1,ee=window.Polymer&&window.Polymer.removeNestedTemplates||!1,ie=window.Polymer&&window.Polymer.fastDomIf||!1,se=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,oe=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,re=0;const ne=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let i=re++;return function(s){let o=s.__mixinSet;if(o&&o[i])return s;let r=e,n=r.get(s);if(!n){n=t(s),r.set(s,n);let e=Object.create(n.__mixinSet||o||null);e[i]=!0,n.__mixinSet=e}return n}};
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 ae={},le={};function he(t,e){ae[t]=le[t.toLowerCase()]=e}function ce(t){return ae[t]||le[t.toLowerCase()]}class de extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let i=ce(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=Ut(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Lt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(Gt&&void 0!==ce(t))throw he(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,he(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}de.prototype.modules=ae,customElements.define("dom-module",de);
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 ue="link[rel=import][type~=css]",pe="include",me="shady-unscoped";function fe(t){return de.import(t)}function ve(t){const e=Ht((t.body?t.body:t).textContent,t.baseURI),i=document.createElement("style");return i.textContent=e,i}function be(t){const e=t.trim().split(/\s+/),i=[];for(let t=0;t<e.length;t++)i.push(...ge(e[t]));return i}function ge(t){const e=fe(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...we(e));const i=e.querySelector("template");i&&t.push(...ye(i,e.assetpath)),e._styles=t}return e._styles}function ye(t,e){if(!t._styles){const i=[],s=t.content.querySelectorAll("style");for(let t=0;t<s.length;t++){let o=s[t],r=o.getAttribute(pe);r&&i.push(...be(r).filter((function(t,e,i){return i.indexOf(t)===e}))),e&&(o.textContent=Ht(o.textContent,e)),i.push(o)}t._styles=i}return t._styles}function we(t){const e=[],i=t.querySelectorAll(ue);for(let t=0;t<i.length;t++){let s=i[t];if(s.import){const t=s.import,i=s.hasAttribute(me);if(i&&!t._unscopedStyle){const e=ve(t);e.setAttribute(me,""),t._unscopedStyle=e}else t._style||(t._style=ve(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 _e=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 xe(t){return t.indexOf(".")>=0}function ke(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Ae(t,e){return 0===t.indexOf(e+".")}function Ce(t,e){return 0===e.indexOf(t+".")}function De(t,e,i){return e+i.slice(t.length)}function Te(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 Se(t){return Array.isArray(t)?Te(t).split("."):t.toString().split(".")}function Me(t,e,i){let s=t,o=Se(e);for(let t=0;t<o.length;t++){if(!s)return;s=s[o[t]]}return i&&(i.path=o.join(".")),s}function ze(t,e,i){let s=t,o=Se(e),r=o[o.length-1];if(o.length>1){for(let t=0;t<o.length-1;t++)if(s=s[o[t]],!s)return;s[r]=i}else s[e]=i;return o.join(".")}
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 Pe={},Oe=/-[a-z]/g,Ee=/([A-Z])/g;function Fe(t){return Pe[t]||(Pe[t]=t.indexOf("-")<0?t:t.replace(Oe,(t=>t[1].toUpperCase())))}function Ne(t){return Pe[t]||(Pe[t]=t.replace(Ee,"-$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 Ie=0,Be=0,je=[],We=0,Re=!1,Ue=document.createTextNode("");new window.MutationObserver((function(){Re=!1;const t=je.length;for(let e=0;e<t;e++){let t=je[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}je.splice(0,t),Be+=t})).observe(Ue,{characterData:!0});const He={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)}},Le={run:t=>(Re||(Re=!0,Ue.textContent=We++),je.push(t),Ie++),cancel(t){const e=t-Be;if(e>=0){if(!je[e])throw new Error("invalid async handle: "+t);je[e]=null}}},$e=Le,qe=ne((t=>class extends t{static createProperties(t){const e=this.prototype;for(let i in t)i in e||e._createPropertyAccessor(i)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,i){let s=this.__data[t],o=this._shouldPropertyChange(t,e,s);return o&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=s),this.__data[t]=e,this.__dataPending[t]=e),o}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,$e.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,o=s&&s[t]||t;this[o]=this._deserializeValue(e,i||this.constructor.typeForProperty(o))}}_propertyToAttribute(t,e,i){this.__serializing=!0,this._valueToNodeAttribute(this,i=arguments.length<3?this[t]:i,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,i){const s=this._serializeValue(e);"class"!==i&&"name"!==i&&"slot"!==i||(t=_e(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}}})),Ye={};let Ve=HTMLElement.prototype;for(;Ve;){let t=Object.getOwnPropertyNames(Ve);for(let e=0;e<t.length;e++)Ye[t[e]]=!0;Ve=Object.getPrototypeOf(Ve)}const Ge=window.trustedTypes?t=>trustedTypes.isHTML(t)||trustedTypes.isScript(t)||trustedTypes.isScriptURL(t):()=>!1,Je=ne((t=>{const e=qe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(Fe(t[e]))}static attributeNameForProperty(t){return Ne(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(Ge(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(!Ye[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)}}})),Ke={"dom-if":!0,"dom-repeat":!0};let Ze=!1,Xe=!1;const Qe=(()=>{const t=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return(e,i,s)=>{const o=i.getAttribute(s);t&&s.startsWith("on-")?e.setAttribute(s,t.createScript(o,s)):e.setAttribute(s,o)}})();function ti(t){let e=t.getAttribute("is");if(e&&Ke[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];Qe(t,i,e),i.removeAttribute(e)}}return t}function ei(t,e){let i=e.parentInfo&&ei(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 ii(t,e,i,s){s.id&&(e[s.id]=i)}function si(t,e,i){if(i.events&&i.events.length)for(let s,o=0,r=i.events;o<r.length&&(s=r[o]);o++)t._addMethodEventListenerToNode(e,s.name,s.value,t)}function oi(t,e,i,s){i.templateInfo&&(e._templateInfo=i.templateInfo,e._parentTemplateInfo=s)}const ri=ne((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,o=t;return"template"!=o.localName||o.hasAttribute("preserve-content")?"slot"===o.localName&&(e.hasInsertionPoint=!0):s=this._parseTemplateNestedTemplate(o,e,i)||s,function(t){(function(){if(!Ze){Ze=!0;const t=document.createElement("textarea");t.placeholder="a",Xe=t.placeholder===t.textContent}return Xe})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(o),o.firstChild&&this._parseTemplateChildNodes(o,e,i),o.hasAttributes&&o.hasAttributes()&&(s=this._parseTemplateNodeAttributes(o,e,i)||s),s||i.noted}static _parseTemplateChildNodes(t,e,i){if("script"!==t.localName&&"style"!==t.localName)for(let s,o=t.firstChild,r=0;o;o=s){if("template"==o.localName&&(o=ti(o)),s=o.nextSibling,o.nodeType===Node.TEXT_NODE){let i=s;for(;i&&i.nodeType===Node.TEXT_NODE;)o.textContent+=i.textContent,s=i.nextSibling,t.removeChild(i),i=s;if(e.stripWhiteSpace&&!o.textContent.trim()){t.removeChild(o);continue}}let n={parentIndex:r,parentInfo:i};this._parseTemplateNode(o,e,n)&&(n.infoIndex=e.nodeInfoList.push(n)-1),o.parentNode&&r++}}static _parseTemplateNestedTemplate(t,e,i){let s=t,o=this._parseTemplate(s,e);return(o.content=s.content.ownerDocument.createDocumentFragment()).appendChild(s.content),i.templateInfo=o,!0}static _parseTemplateNodeAttributes(t,e,i){let s=!1,o=Array.from(t.attributes);for(let r,n=o.length-1;r=o[n];n--)s=this._parseTemplateNodeAttribute(t,e,i,r.name,r.value)||s;return s}static _parseTemplateNodeAttribute(t,e,i,s,o){return"on-"===s.slice(0,3)?(t.removeAttribute(s),i.events=i.events||[],i.events.push({name:s.slice(3),value:o}),!0):"id"===s&&(i.id=o,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let i=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,s=document.importNode(e.content||t.content,!0);s.__noInsertionPoint=!e.hasInsertionPoint;let o=s.nodeList=new Array(i.length);s.$={};for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++){let i=o[r]=ei(s,t);ii(0,s.$,i,t),oi(0,i,t,e),si(this,i,t)}return s}_addMethodEventListenerToNode(t,e,i,s){let o=function(t,e,i){return t=t._methodHost||t,function(e){t[i]?t[i](e,e.detail):console.warn("listener method `"+i+"` not defined")}}(s=s||t,0,i);return this._addEventListenerToNode(t,e,o),o}_addEventListenerToNode(t,e,i){t.addEventListener(e,i)}_removeEventListenerFromNode(t,e,i){t.removeEventListener(e,i)}}));
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 ni=0;const ai=[],li={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},hi="__computeInfo",ci=/[A-Z]/;function di(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 ui(t,e,i,s,o,r){if(e){let n=!1;const a=ni++;for(let l in i){let h=e[o?ke(l):l];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===a||o&&!mi(l,e.trigger)||(e.info&&(e.info.lastRun=a),e.fn(t,l,i,s,e.info,o,r),n=!0)}return n}return!1}function pi(t,e,i,s,o,r,n,a){let l=!1,h=e[n?ke(s):s];if(h)for(let e,c=0,d=h.length;c<d&&(e=h[c]);c++)e.info&&e.info.lastRun===i||n&&!mi(s,e.trigger)||(e.info&&(e.info.lastRun=i),e.fn(t,s,o,r,e.info,n,a),l=!0);return l}function mi(t,e){if(e){let i=e.name;return i==t||!(!e.structured||!Ae(i,t))||!(!e.wildcard||!Ce(i,t))}return!0}function fi(t,e,i,s,o){let r="string"==typeof o.method?t[o.method]:o.method,n=o.property;r?r.call(t,t.__data[n],s[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined")}function vi(t,e,i){let s=ke(e);return s!==e&&(bi(t,Ne(s)+"-changed",i[e],e),!0)}function bi(t,e,i,s){let o={value:i,queueProperty:!0};s&&(o.path=s),_e(t).dispatchEvent(new CustomEvent(e,{detail:o}))}function gi(t,e,i,s,o,r){let n=(r?ke(e):e)!=e?e:null,a=n?Me(t,n):t.__data[e];n&&void 0===a&&(a=i[e]),bi(t,o.eventName,a,n)}function yi(t,e,i,s,o){let r=t.__data[e];Vt&&(r=Vt(r,o.attrName,"attribute",t)),t._propertyToAttribute(e,o.attrName,r)}const wi=(t,e,i)=>{let s=0,o=e.length-1,r=-1;for(;s<=o;){const n=s+o>>1,a=i.get(e[n].methodInfo)-i.get(t.methodInfo);if(a<0)s=n+1;else{if(!(a>0)){r=n;break}o=n-1}}r<0&&(r=o+1),e.splice(r,0,t)},_i=(t,e,i,s,o)=>{const r=e[o?ke(t):t];if(r)for(let e=0;e<r.length;e++){const n=r[e];n.info.lastRun===ni||o&&!mi(t,n.trigger)||(n.info.lastRun=ni,wi(n.info,i,s))}};function xi(t,e,i,s,o){let r=Mi(t,e,i,0,o);if(r===ai)return!1;let n=o.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[n]?t._setPendingProperty(n,r,!0):(t[n]=r,!1)}function ki(t,e,i,s,o,r,n){i.bindings=i.bindings||[];let a={kind:s,target:o,parts:r,literal:n,isCompound:1!==r.length};if(i.bindings.push(a),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(a)){let{event:t,negate:e}=a.parts[0];a.listenerEvent=t||Ne(o)+"-changed",a.listenerNegate=e}let l=e.nodeInfoList.length;for(let i=0;i<a.parts.length;i++){let s=a.parts[i];s.compoundIndex=i,Ai(t,e,a,s,l)}}function Ai(t,e,i,s,o){if(!s.literal)if("attribute"===i.kind&&"-"===i.target[0])console.warn("Cannot set attribute "+i.target+' because "-" is not a valid attribute starting character');else{let r=s.dependencies,n={index:o,binding:i,part:s,evaluator:t};for(let i=0;i<r.length;i++){let s=r[i];"string"==typeof s&&(s=Ii(s),s.wildcard=!0),t._addTemplatePropertyEffect(e,s.rootProperty,{fn:Ci,info:n,trigger:s})}}}function Ci(t,e,i,s,o,r,n){let a=n[o.index],l=o.binding,h=o.part;if(r&&h.source&&e.length>h.source.length&&"property"==l.kind&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let s=i[e];e=De(h.source,l.target,e),a._setPendingPropertyOrPath(e,s,!1,!0)&&t._enqueueClient(a)}else{let n=o.evaluator._evaluateBinding(t,h,e,i,s,r);n!==ai&&function(t,e,i,s,o){if(o=function(t,e,i,s){if(i.isCompound){let o=t.__dataCompoundStorage[i.target];o[s.compoundIndex]=e,e=o.join("")}return"attribute"!==i.kind&&("textContent"!==i.target&&("value"!==i.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,o,i,s),Vt&&(o=Vt(o,i.target,i.kind,e)),"attribute"==i.kind)t._valueToNodeAttribute(e,o,i.target);else{let s=i.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[s]?e[li.READ_ONLY]&&e[li.READ_ONLY][s]||e._setPendingProperty(s,o)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,s,o)}}(t,a,l,h,n)}}function Di(t,e){if(e.isCompound){let i=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),s=e.parts,o=new Array(s.length);for(let t=0;t<s.length;t++)o[t]=s[t].literal;let r=e.target;i[r]=o,e.literal&&"property"==e.kind&&("className"===r&&(t=_e(t)),t[r]=e.literal)}}function Ti(t,e,i){if(i.listenerEvent){let s=i.parts[0];t.addEventListener(i.listenerEvent,(function(t){!function(t,e,i,s,o){let r,n=t.detail,a=n&&n.path;a?(s=De(i,s,a),r=n&&n.value):r=t.currentTarget[i],r=o?!r:r,e[li.READ_ONLY]&&e[li.READ_ONLY][s]||!e._setPendingPropertyOrPath(s,r,!0,Boolean(a))||n&&n.queueProperty||e._invalidateProperties()}(t,e,i.target,s.source,s.negate)}))}}function Si(t,e,i,s,o,r){let n={methodName:e.methodName,args:e.args,methodInfo:o,dynamicFn:r=e.static||r&&("object"!=typeof r||r[e.methodName])};for(let o,r=0;r<e.args.length&&(o=e.args[r]);r++)o.literal||t._addPropertyEffect(o.rootProperty,i,{fn:s,info:n,trigger:o});return r&&t._addPropertyEffect(e.methodName,i,{fn:s,info:n}),n}function Mi(t,e,i,s,o){let r=t._methodHost||t,n=r[o.methodName];if(n){let s=t._marshalArgs(o.args,e,i);return s===ai?ai:n.apply(r,s)}o.dynamicFn||console.warn("method `"+o.methodName+"` not defined")}const zi=[],Pi="(?:[a-zA-Z_$][\\w.:$\\-*]*)",Oi="(?:("+Pi+"|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)",Ei=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?("+Pi+"\\s*(?:\\(\\s*(?:(?:"+Oi+"(?:,\\s*"+Oi+")*)?)\\)\\s*)?)(?:]]|}})","g");function Fi(t){let e="";for(let i=0;i<t.length;i++)e+=t[i].literal||"";return e}function Ni(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:zi};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let i=Ii(t);return i.literal||(e.static=!1),i}),this),e}(e[2].replace(/\\,/g,"&comma;").split(","),t):t}return null}function Ii(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=ke(e),i.structured=xe(e),i.structured&&(i.wildcard=".*"==e.slice(-2),i.wildcard&&(i.name=e.slice(0,-2)))),i}function Bi(t,e,i){let s=Me(t,i);return void 0===s&&(s=e[i]),s}function ji(t,e,i,s){const o={indexSplices:s};Qt&&!t._overrideLegacyUndefined&&(e.splices=o),t.notifyPath(i+".splices",o),t.notifyPath(i+".length",e.length),Qt&&!t._overrideLegacyUndefined&&(o.indexSplices=[])}function Wi(t,e,i,s,o,r){ji(t,e,i,[{index:s,addedCount:o,removed:r,object:e,type:"splice"}])}const Ri=ne((t=>{const e=ri(Je(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return li}_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(Ui.length){let t=Ui[Ui.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[li.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==li.READ_ONLY);let s=di(this,e,!0)[t];s||(s=this[e][t]=[]),s.push(i)}_removePropertyEffect(t,e,i){let s=di(this,e,!0)[t],o=s.indexOf(i);o>=0&&s.splice(o,1)}_hasPropertyEffect(t,e){let i=this[e];return Boolean(i&&i[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,li.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,li.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,li.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,li.COMPUTE)}_setPendingPropertyOrPath(t,e,i,s){if(s||ke(Array.isArray(t)?t[0]:t)!==t){if(!s){let i=Me(this,t);if(!(t=ze(this,t,e))||!super._shouldPropertyChange(t,e,i))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,i))return function(t,e,i){let s=t.__dataLinkedPaths;if(s){let o;for(let r in s){let n=s[r];Ce(r,e)?(o=De(r,n,e),t._setPendingPropertyOrPath(o,i,!0,!0)):Ce(n,e)&&(o=De(n,r,e),t._setPendingPropertyOrPath(o,i,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,i);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,i){i===t[e]&&"object"!=typeof i||("className"===e&&(t=_e(t)),t[e]=i)}_setPendingProperty(t,e,i){let s=this.__dataHasPaths&&xe(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[li.NOTIFY]&&this[li.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[li.READ_ONLY]&&this[li.READ_ONLY][i]||this._setPendingPropertyOrPath(i,t[i],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,i){let s,o=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,i,s){let o=t[li.COMPUTE];if(o)if(te){ni++;const r=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const i=t[li.COMPUTE];let s,{counts:o,ready:r,total:n}=function(t){const e=t[hi],i={},s=t[li.COMPUTE],o=[];let r=0;for(let t in e){const s=e[t];r+=i[t]=s.args.filter((t=>!t.literal)).length+(s.dynamicFn?1:0)}for(let t in s)e[t]||o.push(t);return{counts:i,ready:o,total:r}}(t);for(;s=r.shift();){e.set(s,e.size);const t=i[s];t&&t.forEach((t=>{const e=t.info.methodInfo;--n,0==--o[e]&&r.push(e)}))}0!==n&&console.warn(`Computed graph for ${t.localName} incomplete; circular?`),t.constructor.__orderedComputedDeps=e}return e}(t),n=[];for(let t in e)_i(t,o,n,r,s);let a;for(;a=n.shift();)xi(t,"",e,0,a)&&_i(a.methodInfo,o,n,r,s);Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let r=e;for(;ui(t,o,r,i,s);)Object.assign(i,t.__dataOld),Object.assign(e,t.__dataPending),r=t.__dataPending,t.__dataPending=null}}(this,e,i,o),s=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,i,o),this._flushClients(),ui(this,this[li.REFLECT],e,i,o),ui(this,this[li.OBSERVE],e,i,o),s&&function(t,e,i,s,o){let r,n,a=t[li.NOTIFY],l=ni++;for(let n in e)e[n]&&(a&&pi(t,a,l,n,i,s,o)||o&&vi(t,n,i))&&(r=!0);r&&(n=t.__dataHost)&&n._invalidateProperties&&n._invalidateProperties()}(this,s,e,i,o),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,i){this[li.PROPAGATE]&&ui(this,this[li.PROPAGATE],t,e,i),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,i)}_runEffectsForTemplate(t,e,i,s){const o=(e,s)=>{ui(this,t.propertyEffects,e,i,s,t.nodeList);for(let o=t.firstChild;o;o=o.nextSibling)this._runEffectsForTemplate(o,e,i,s)};t.runEffects?t.runEffects(o,e,s):o(e,s)}linkPaths(t,e){t=Te(t),e=Te(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Te(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let i={path:""};ji(this,Me(this,t,i),i.path,e)}get(t,e){return Me(e||this,t)}set(t,e,i){i?ze(i,t,e):this[li.READ_ONLY]&&this[li.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let i={path:""},s=Me(this,t,i),o=s.length,r=s.push(...e);return e.length&&Wi(this,s,i.path,o,e.length,[]),r}pop(t){let e={path:""},i=Me(this,t,e),s=Boolean(i.length),o=i.pop();return s&&Wi(this,i,e.path,i.length,0,[o]),o}splice(t,e,i,...s){let o,r={path:""},n=Me(this,t,r);return e<0?e=n.length-Math.floor(-e):e&&(e=Math.floor(e)),o=2===arguments.length?n.splice(e):n.splice(e,i,...s),(s.length||o.length)&&Wi(this,n,r.path,e,s.length,o),o}shift(t){let e={path:""},i=Me(this,t,e),s=Boolean(i.length),o=i.shift();return s&&Wi(this,i,e.path,0,0,[o]),o}unshift(t,...e){let i={path:""},s=Me(this,t,i),o=s.unshift(...e);return e.length&&Wi(this,s,i.path,0,e.length,[]),o}notifyPath(t,e){let i;if(1==arguments.length){let s={path:""};e=Me(this,t,s),i=s.path}else i=Array.isArray(t)?Te(t):t;this._setPendingPropertyOrPath(i,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var i;this._addPropertyEffect(t,li.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,li.OBSERVE,{fn:fi,info:s,trigger:{name:t}}),i&&this._addPropertyEffect(e,li.OBSERVE,{fn:fi,info:s,trigger:{name:e}})}_createMethodObserver(t,e){let i=Ni(t);if(!i)throw new Error("Malformed observer expression '"+t+"'");Si(this,i,li.OBSERVE,Mi,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,li.NOTIFY,{fn:gi,info:{eventName:Ne(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,li.REFLECT,{fn:yi,info:{attrName:e}})}_createComputedProperty(t,e,i){let s=Ni(e);if(!s)throw new Error("Malformed computed expression '"+e+"'");const o=Si(this,s,li.COMPUTE,xi,t,i);di(this,hi)[t]=o}_marshalArgs(t,e,i){const s=this.__data,o=[];for(let r=0,n=t.length;r<n;r++){let{name:n,structured:a,wildcard:l,value:h,literal:c}=t[r];if(!c)if(l){const t=Ce(n,e),o=Bi(s,i,t?e:n);h={path:t?e:n,value:o,base:t?Me(s,n):o}}else h=a?Bi(s,i,n):s[n];if(Qt&&!this._overrideLegacyUndefined&&void 0===h&&t.length>1)return ai;o[r]=h}return o}static addPropertyEffect(t,e,i){this.prototype._addPropertyEffect(t,e,i)}static createPropertyObserver(t,e,i){this.prototype._createPropertyObserver(t,e,i)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,i){this.prototype._createComputedProperty(t,e,i)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let i=this.constructor._parseTemplate(t),s=this.__preBoundTemplateInfo==i;if(!s)for(let t in i.propertyEffects)this._createPropertyAccessor(t);if(e)if(i=Object.create(i),i.wasPreBound=s,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,s=e.lastChild;i.parent=e,e.lastChild=i,i.previousSibling=s,s?s.nextSibling=i:e.firstChild=i}else this.__templateInfo=i;else this.__preBoundTemplateInfo=i;return i}static _addTemplatePropertyEffect(t,e,i){(t.hostProps=t.hostProps||{})[e]=!0;let s=t.propertyEffects=t.propertyEffects||{};(s[e]=s[e]||[]).push(i)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),Ui.push(this);let i=super._stampTemplate(t,e);if(Ui.pop(),e.nodeList=i.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=i.firstChild;e;e=e.nextSibling)t.push(e)}return i.templateInfo=e,function(t,e){let{nodeList:i,nodeInfoList:s}=e;if(s.length)for(let e=0;e<s.length;e++){let o=i[e],r=s[e].bindings;if(r)for(let e=0;e<r.length;e++){let i=r[e];Di(o,i),Ti(o,t,i)}o.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),i}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:i,nextSibling:s,parent:o}=e;i?i.nextSibling=s:o&&(o.firstChild=s),s?s.previousSibling=i:o&&(o.lastChild=i),e.nextSibling=e.previousSibling=null;let r=e.childNodes;for(let t=0;t<r.length;t++){let e=r[t];_e(_e(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,i,s){let o=e._parseTemplateNode.call(this,t,i,s);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,i);e&&(t.textContent=Fi(e)||" ",ki(this,i,s,"text","textContent",e),o=!0)}return o}static _parseTemplateNodeAttribute(t,i,s,o,r){let n=this._parseBindings(r,i);if(n){let e=o,r="property";ci.test(o)?r="attribute":"$"==o[o.length-1]&&(o=o.slice(0,-1),r="attribute");let a=Fi(n);return a&&"attribute"==r&&("class"==o&&t.hasAttribute("class")&&(a+=" "+t.getAttribute(o)),t.setAttribute(o,a)),"attribute"==r&&"disable-upgrade$"==e&&t.setAttribute(o,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===r&&(o=Fe(o)),ki(this,i,s,r,o,n,a),!0}return e._parseTemplateNodeAttribute.call(this,t,i,s,o,r)}static _parseTemplateNestedTemplate(t,i,s){let o=e._parseTemplateNestedTemplate.call(this,t,i,s);const r=t.parentNode,n=s.templateInfo,a="dom-if"===r.localName;ee&&(a||"dom-repeat"===r.localName)&&(r.removeChild(t),(s=s.parentInfo).templateInfo=n,s.noted=!0,o=!1);let l=n.hostProps;if(ie&&a)l&&(i.hostProps=Object.assign(i.hostProps||{},l),ee||(s.parentInfo.noted=!0));else{let t="{";for(let e in l)ki(this,i,s,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return o}static _parseBindings(t,e){let i,s=[],o=0;for(;null!==(i=Ei.exec(t));){i.index>o&&s.push({literal:t.slice(o,i.index)});let r=i[1][0],n=Boolean(i[2]),a=i[3].trim(),l=!1,h="",c=-1;"{"==r&&(c=a.indexOf("::"))>0&&(h=a.substring(c+2),a=a.substring(0,c),l=!0);let d=Ni(a),u=[];if(d){let{args:t,methodName:i}=d;for(let e=0;e<t.length;e++){let i=t[e];i.literal||u.push(i)}let s=e.dynamicFns;(s&&s[i]||d.static)&&(u.push(i),d.dynamicFn=!0)}else u.push(a);s.push({source:a,mode:r,negate:n,customEvent:l,signature:d,dependencies:u,event:h}),o=Ei.lastIndex}if(o&&o<t.length){let e=t.substring(o);e&&s.push({literal:e})}return s.length?s:null}static _evaluateBinding(t,e,i,s,o,r){let n;return n=e.signature?Mi(t,i,s,0,e.signature):i!=e.source?Me(t,e.source):r&&xe(i)?Me(t,i):t.__data[i],e.negate&&(n=!n),n}}})),Ui=[],Hi=ne((t=>{const e=qe(t);function i(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof o?e:null}function s(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const i=t.properties;i&&(e=
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 o extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=i(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=s(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=i(this);this.__properties=Object.assign({},t&&t._properties,s(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return o})),Li=window.ShadyCSS&&window.ShadyCSS.cssBuild,$i=ne((t=>{const e=Hi(Ri(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):Kt||(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&&(!Gt||Jt)&&(e=de.import(t,"template"),Gt&&!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=Lt(t.url);else{const t=de.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=Yt,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 Ht(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(!Li){const o=e.content.querySelectorAll("style"),r=ye(e),n=function(t){let e=fe(t);return e?we(e):[]}(i),a=e.content.firstElementChild;for(let i=0;i<n.length;i++){let o=n[i];o.textContent=t._processStyleText(o.textContent,s),e.content.insertBefore(o,a)}let l=0;for(let e=0;e<r.length;e++){let i=r[e],n=o[l];n!==i?(i=i.cloneNode(!0),n.parentNode.insertBefore(i,n)):l++,i.textContent=t._processStyleText(i.textContent,s)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,i),oe&&Li&&qt){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?Ut(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=_e(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])),Xt&&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=Ut(this.importPath)),Ut(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!Zt||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)}}})),qi=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:t=>t});class Yi{constructor(t,e){Ji(t,e);const i=e.reduce(((e,i,s)=>e+Vi(i)+t[s+1]),t[0]);this.value=i.toString()}toString(){return this.value}}function Vi(t){if(t instanceof Yi)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}const Gi=function(t,...e){Ji(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 Yi)return Vi(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(i)+t[s+1]),t[0]);return qi&&(s=qi.createHTML(s)),i.innerHTML=s,i},Ji=(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")},Ki=$i(HTMLElement),Zi=[];function Xi(t,e,i=t.getAttribute("dir")){e?t.setAttribute("dir",e):null!=i&&t.removeAttribute("dir")}function Qi(){return document.documentElement.getAttribute("dir")}new MutationObserver((function(){const t=Qi();Zi.forEach((e=>{Xi(e,t)}))})).observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const ts=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(),Xi(this,Qi(),null))}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),"dir"!==t)return;const s=Qi(),o=i===s&&-1===Zi.indexOf(this),r=!i&&e&&-1===Zi.indexOf(this),n=i!==s&&e===s;o||r?(this.__subscribe(),Xi(this,s,i)):n&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=Zi.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(){Zi.includes(this)||Zi.push(this)}__unsubscribe(){Zi.includes(this)&&Zi.splice(Zi.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
- */,es=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
- xt("vaadin-input-container",p`
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 is extends(es(Tt(ts(Ki)))){static get is(){return"vaadin-input-container"}static get template(){return Gi`
2110
- <slot name="prefix"></slot>
2111
- <slot></slot>
2112
- <slot name="suffix"></slot>
2113
- `}}n(is);
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 ss=p`
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 os=!1;function rs(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function ns(){return os}function as(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 ls(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;)as(t[0],e[0])?i.push(e.shift()):i.push(t.shift());return i.concat(t,e)}(ls(t.slice(0,i)),ls(t.slice(i)))}function hs(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 cs(t){return t.getRootNode().activeElement===t}function ds(t,e){if(t.nodeType!==Node.ELEMENT_NODE||function(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const i=window.getComputedStyle(t);return"hidden"===i.visibility||"none"===i.display}(t))return!1;const i=t,s=function(t){if(!hs(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(i);let o=s>0;s>=0&&e.push(i);let r=[];return r="slot"===i.localName?i.assignedNodes({flatten:!0}):(i.shadowRoot||i).children,[...r].forEach((t=>{o=ds(t,e)||o})),o}window.addEventListener("keydown",(()=>{os=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{os=!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 us=!1,ps=[],ms=[];function fs(t){const e=t[0],i=t[1],s=t[2];try{i.apply(e,s)}catch(t){setTimeout((()=>{throw t}))}}function vs(t,e,i){us||(us=!0,requestAnimationFrame((function(){us=!1,function(t){for(;t.length;)fs(t.shift())}(ps),setTimeout((function(){!function(t){for(let e=0,i=t.length;e<i;e++)fs(t.shift())}(ms)}))}))),ms.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 bs=t=>t.test(navigator.userAgent),gs=t=>t.test(navigator.platform);bs(/Android/u),bs(/Chrome/u)&&/Google Inc/u.test(navigator.vendor),bs(/Firefox/u);const ys=gs(/^iPad/u)||gs(/^Mac/u)&&navigator.maxTouchPoints>1,ws=gs(/^iPhone/u)||ys;bs(/^((?!chrome|android).)*safari/iu);const _s=(()=>{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 xs=new WeakMap,ks=new WeakMap,As={},Cs=0;const Ds=t=>t&&t.nodeType===Node.ELEMENT_NODE,Ts=(...t)=>{console.error(`Error: ${t.join(" ")}. Skip setting aria-hidden.`)},Ss=(t,e=document.body,i="data-aria-hidden")=>{const s=Array.from(Array.isArray(t)?t:[t]);return e&&s.push(...Array.from(e.querySelectorAll("[aria-live]"))),((t,e,i,s)=>{const o=((t,e)=>Ds(t)?e.map((e=>{if(!Ds(e))return Ts(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 Ts(e,"is not contained inside",t),null})).filter((t=>Boolean(t))):(Ts(t,"is not a valid element"),[]))(e,Array.isArray(t)?t:[t]);As[i]||(As[i]=new WeakMap);const r=As[i],n=[],a=new Set,l=new Set(o),h=t=>{if(!t||a.has(t))return;a.add(t);const e=t.assignedSlot;e&&h(e),h(t.parentNode||t.host)};o.forEach(h);const c=t=>{if(!t||l.has(t))return;const e=t.shadowRoot;(e?[...t.children,...e.children]:[...t.children]).forEach((t=>{if(!["template","script","style"].includes(t.localName))if(a.has(t))c(t);else{const e=t.getAttribute(s),o=null!==e&&"false"!==e,a=(xs.get(t)||0)+1,l=(r.get(t)||0)+1;xs.set(t,a),r.set(t,l),n.push(t),1===a&&o&&ks.set(t,!0),1===l&&t.setAttribute(i,"true"),o||t.setAttribute(s,"true")}}))};return c(e),a.clear(),Cs+=1,()=>{n.forEach((t=>{const e=xs.get(t)-1,o=r.get(t)-1;xs.set(t,e),r.set(t,o),e||(ks.has(t)?ks.delete(t):t.removeAttribute(s)),o||t.removeAttribute(i)})),Cs-=1,Cs||(xs=new WeakMap,xs=new WeakMap,ks=new WeakMap,As={})}})(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 Ms{constructor(t,e){this.host=t,this.callback="function"==typeof e?e:()=>t}showModal(){const t=this.callback();this.__showOthers=Ss(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 zs{saveFocus(t){this.focusNode=t||rs()}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=!!t&&t.preventScroll;rs()===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 Ps=[];class Os{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this)}get __focusableElements(){return function(t){const e=[];return ds(t,e)?ls(e):e}(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(cs).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.");Ps.push(this),-1===this.__focusedElementIndex&&this.__focusableElements[0].focus()}releaseFocus(){this.__trapNode=null,Ps.pop()}__onKeyDown(t){this.__trapNode&&this===Array.from(Ps).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 Es=ne((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)}})),Fs=t=>class extends(Es(t)){static get properties(){return{focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ms(this),this.__focusTrapController=new Os(this),this.__focusRestorationController=new zs}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=!ns();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=rs();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
- */,Ns=()=>Array.from(document.body.children).filter((t=>t instanceof HTMLElement&&t._hasOverlayStackMixin&&!t.hasAttribute("closing"))).sort(((t,e)=>t.__zIndex-e.__zIndex||0)),Is=()=>Ns().filter((t=>t.$.overlay)),Bs=t=>class extends t{constructor(){super(),this._hasOverlayStackMixin=!0}get _last(){return(()=>this===Is().pop())()}bringToFront(){let t="";const e=Ns().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"),Is().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=Is();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
- */,js=t=>class extends(Fs(Bs(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),ws&&(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 o=this._oldOwner!==e||this._oldModel!==i;this._oldModel=i,this._oldOwner=e;const r=this._oldRenderer!==t,n=void 0!==this._oldRenderer;this._oldRenderer=t;const a=this._oldOpened!==s;this._oldOpened=s,r&&n&&(this.innerHTML="",delete this._$litPart$),s&&t&&(r||a||o)&&this.requestContentUpdate()}_modelessChanged(t){t?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_openedChanged(t,e){t?(this._saveFocus(),this._animatedOpening(),vs(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 Ws(t){return t?new Set(t.split(" ")):new Set}function Rs(t){return t?[...t].join(" "):""}function Us(t,e,i){const s=Ws(t.getAttribute(e));s.add(i),t.setAttribute(e,Rs(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 Hs={start:"top",end:"bottom"},Ls={start:"left",end:"right"},$s=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),qs=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 o(){i&&i.disconnect(),i=null}return function r(n=!1,a=1){o();const{left:l,top:h,width:c,height:d}=t.getBoundingClientRect();if(n||e(),!c||!d)return;const u={rootMargin:`${-Math.floor(h)}px ${-Math.floor(s.clientWidth-(l+c))}px ${-Math.floor(s.clientHeight-(h+d))}px ${-Math.floor(l)}px`,threshold:Math.max(0,Math.min(1,a))||1};let p=!0;i=new IntersectionObserver((function(t){let e=t[0].intersectionRatio;if(e!==a){if(!p)return r();0===e&&(e=1e-7),r(!1,e)}p=!1}),u),i.observe(t)}(!0),o}(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,$s.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,$s.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){t.target instanceof Node&&this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const t=this.positionTarget.getBoundingClientRect();if(0===t.width&&0===t.height&&this.opened)return void(this.opened=!1);const e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,s=this.__shouldAlignStartHorizontally(t,i),o=!i&&s||i&&!s;this.style.alignItems=o?"flex-start":"flex-end";const r=this.getBoundingClientRect(),n=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,Hs,this,e),a=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,Ls,this,s);Object.assign(this.style,n,a),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!o),this.toggleAttribute("start-aligned",o)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const s=Math.min(window.innerWidth,document.documentElement.clientWidth);return this.__shouldAlignStart(t,i,s,this.__margins,!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign,this.noHorizontalOverlap,Ls)}__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,Hs)}__shouldAlignStart(t,e,i,s,o,r,n){const a=i-t[r?n.end:n.start]-s[n.end],l=t[r?n.start:n.end]-s[n.start],h=o?a:l;return o===(h>(o?l:a)||h>e)}__adjustBottomProperty(t,e,i){let s;if(t===e.end){if(e.end===Hs.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===Ls.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(s=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return s}__calculatePositionInOneDimension(t,e,i,s,o,r){const n=r?s.start:s.end,a=r?s.end:s.start,l=parseFloat(o.style[n]||getComputedStyle(o)[n]),h=this.__adjustBottomProperty(n,s,l),c=h?`${h}px`:`${l+(e[r?s.start:s.end]-t[i===r?s.end:s.start])*(r?-1:1)}px`;return{[n]:c,[a]:""}}}
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
- */,Ys=t=>class extends(qs(js(t))){_shouldCloseOnOutsideClick(t){return!t.composedPath().includes(this.positionTarget)}_mouseDownListener(t){super._mouseDownListener(t),this._shouldCloseOnOutsideClick(t)&&!hs(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
- xt("vaadin-date-picker-overlay",[ss,p`
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 Vs extends(Ys(ts(Tt(Ki)))){static get is(){return"vaadin-date-picker-overlay"}static get template(){return Gi`
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
- `}}n(Vs);const Gs=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Js=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Ks(t,e){if("function"!=typeof t)return;const i=Gs.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 Zs(){
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&&(Js?!(Js&&Object.keys(Js).map((t=>Js[t])).filter((t=>t.productionMode)).length>0):!Ks((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 Xs=0,Qs=0;const to=[];let eo=!1;const io={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)}},so={run:t=>window.requestAnimationFrame(t),cancel(t){window.cancelAnimationFrame(t)}},oo={run:t=>window.requestIdleCallback?window.requestIdleCallback(t):window.setTimeout(t,16),cancel(t){window.cancelIdleCallback?window.cancelIdleCallback(t):window.clearTimeout(t)}},ro={run(t){eo||(eo=!0,queueMicrotask((()=>function(){eo=!1;const t=to.length;for(let e=0;e<t;e++){const t=to[e];if(t)try{t()}catch(t){setTimeout((()=>{throw t}))}}to.splice(0,t),Qs+=t}()))),to.push(t);const e=Xs;return Xs+=1,e},cancel(t){const e=t-Qs;if(e>=0){if(!to[e])throw new Error(`invalid async handle: ${t}`);to[e]=null}}},no=new Set;class ao{static debounce(t,e,i){return t instanceof ao?t._cancelAsync():t=new ao,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,no.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),no.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 lo;
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)Ks(t,e)}(Zs)};const ho=new Set,co=t=>class extends(ts(t)){static finalize(){super.finalize();const{is:t}=this;t&&!ho.has(t)&&(window.Vaadin.registrations.push(this),ho.add(t),window.Vaadin.developmentModeCallback&&(lo=ao.debounce(lo,oo,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),no.add(lo)))}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 uo{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask((()=>{this.flush()})))}flush(){this._connected&&(this._scheduled=!1,this._processNodes())}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],s=[];t.length&&(e=t.filter((t=>!this._storedNodes.includes(t)))),this._storedNodes.length&&this._storedNodes.forEach(((e,o)=>{const r=t.indexOf(e);-1===r?i.push(e):r!==o&&s.push(e)})),(e.length||i.length||s.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:s,removedNodes:i}),this._storedNodes=t}}
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 po=0;function mo(){return po++}
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 fo extends EventTarget{static generateId(t,e="default"){return`${e}-${t.localName}-${mo()}`}constructor(t,e,i,s={}){super();const{initializer:o,multiple:r,observe:n,useUniqueId:a,uniqueIdPrefix:l}=s;this.host=t,this.slotName=e,this.tagName=i,this.observe="boolean"!=typeof n||n,this.multiple="boolean"==typeof r&&r,this.slotInitializer=o,r&&(this.nodes=[]),a&&(this.defaultId=this.constructor.generateId(t,l||e))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t))}initMultiple(){const t=this.getSlotChildren();if(0===t.length){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=t,t.forEach((t=>{this.initAddedNode(t)}))}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let s=this.defaultNode;return!s&&i&&(s=document.createElement(i),s instanceof Element&&(""!==e&&s.setAttribute("slot",e),this.defaultNode=s)),s&&(this.node=s,t.appendChild(s)),s}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter((e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&""===t))}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host)}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t))}observeSlot(){const{slotName:t}=this,e=this.host.shadowRoot.querySelector(""===t?"slot:not([name])":`slot[name=${t}]`);this.__slotObserver=new uo(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 vo extends fo{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 bo=p`
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
- `,go=!1,yo=t=>t,wo="string"==typeof document.head.style.touchAction,_o="__polymerGestures",xo="__polymerGesturesHandled",ko="__polymerGesturesTouchAction",Ao=["mousedown","mousemove","mouseup","click"],Co=[0,1,4,2],Do=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function To(t){return Ao.indexOf(t)>-1}let So=!1;function Mo(t){if(!To(t)&&"touchend"!==t)return wo&&So&&go?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){So=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const zo=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Po={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Oo(t){const e=t.type;if(!To(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!Do&&(e=Co[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const Eo={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Fo(t,e,i){t.movefn=e,t.upfn=i,document.addEventListener("mousemove",e),document.addEventListener("mouseup",i)}function No(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const Io=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Bo={},jo=[];function Wo(t){const e=Io(t);return e.length>0?e[0]:t.target}function Ro(t){const e=t.type,i=t.currentTarget[_o];if(!i)return;const s=i[e];if(!s)return;if(!t[xo]&&(t[xo]={},e.startsWith("touch"))){const i=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(Eo.touch.id=i.identifier),Eo.touch.id!==i.identifier)return;wo||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],i=t.type;if("touchstart"===i)Eo.touch.x=e.clientX,Eo.touch.y=e.clientY,Eo.touch.scrollDecided=!1;else if("touchmove"===i){if(Eo.touch.scrollDecided)return;Eo.touch.scrollDecided=!0;const i=function(t){let e="auto";const i=Io(t);for(let t,s=0;s<i.length;s++)if(t=i[s],t[ko]){e=t[ko];break}return e}(t);let s=!1;const o=Math.abs(Eo.touch.x-e.clientX),r=Math.abs(Eo.touch.y-e.clientY);t.cancelable&&("none"===i?s=!0:"pan-x"===i?s=r>o:"pan-y"===i&&(s=o>r)),s?t.preventDefault():qo("track")}}(t)}const o=t[xo];if(!o.skip){for(let e,i=0;i<jo.length;i++)e=jo[i],s[e.name]&&!o[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let i,r=0;r<jo.length;r++)i=jo[r],s[i.name]&&!o[i.name]&&(o[i.name]=!0,i[e](t))}}function Uo(t,e,i){return!!Bo[e]&&(function(t,e,i){const s=Bo[e],o=s.deps,r=s.name;let n=t[_o];n||(t[_o]=n={});for(let e,i,s=0;s<o.length;s++)e=o[s],zo&&To(e)&&"click"!==e||(i=n[e],i||(n[e]=i={_count:0}),0===i._count&&t.addEventListener(e,Ro,Mo(e)),i[r]=(i[r]||0)+1,i._count=(i._count||0)+1);t.addEventListener(e,i),s.touchAction&&Lo(t,s.touchAction)}(t,e,i),!0)}function Ho(t){jo.push(t),t.emits.forEach((e=>{Bo[e]=t}))}function Lo(t,e){wo&&t instanceof HTMLElement&&ro.run((()=>{t.style.touchAction=e})),t[ko]=e}function $o(t,e,i){const s=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(s.detail=i,yo(t).dispatchEvent(s),s.defaultPrevented){const t=i.preventer||i.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function qo(t){const e=function(t){for(let e,i=0;i<jo.length;i++){e=jo[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 Yo(t,e,i,s){e&&$o(e,t,{x:i.clientX,y:i.clientY,sourceEvent:i,preventer:s,prevent:t=>qo(t)})}function Vo(t,e,i){if(t.prevent)return!1;if(t.started)return!0;const s=Math.abs(t.x-e),o=Math.abs(t.y-i);return s>=5||o>=5}function Go(t,e,i){if(!e)return;const s=t.moves[t.moves.length-2],o=t.moves[t.moves.length-1];let r,n=0;s&&(r=o.x-s.x,n=o.y-s.y),$o(e,"track",{state:t.state,x:i.clientX,y:i.clientY,dx:o.x-t.x,dy:o.y-t.y,ddx:r,ddy:n,sourceEvent:i,hover:()=>function(t,e){let i=document.elementFromPoint(t,e),s=i;for(;s&&s.shadowRoot&&!window.ShadyDOM;){const o=s;if(s=s.shadowRoot.elementFromPoint(t,e),o===s)break;s&&(i=s)}return i}(i.clientX,i.clientY)})}function Jo(t,e,i){const s=Math.abs(e.clientX-t.x),o=Math.abs(e.clientY-t.y),r=Wo(i||e);!r||Po[r.localName]&&r.hasAttribute("disabled")||(isNaN(s)||isNaN(o)||s<=25&&o<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=Wo(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const i=e.getBoundingClientRect(),s=t.pageX,o=t.pageY;return!(s>=i.left&&s<=i.right&&o>=i.top&&o<=i.bottom)}return!1}(e))&&(t.prevent||$o(r,"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
- */Ho({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){No(this.info)},mousedown(t){if(!Oo(t))return;const e=Wo(t),i=this;Fo(this.info,(t=>{Oo(t)||(Yo("up",e,t),No(i.info))}),(t=>{Oo(t)&&Yo("up",e,t),No(i.info)})),Yo("down",e,t)},touchstart(t){Yo("down",Wo(t),t.changedTouches[0],t)},touchend(t){Yo("up",Wo(t),t.changedTouches[0],t)}}),Ho({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,No(this.info)},mousedown(t){if(!Oo(t))return;const e=Wo(t),i=this,s=t=>{const s=t.clientX,o=t.clientY;Vo(i.info,s,o)&&(i.info.state=i.info.started?"mouseup"===t.type?"end":"track":"start","start"===i.info.state&&qo("tap"),i.info.addMove({x:s,y:o}),Oo(t)||(i.info.state="end",No(i.info)),e&&Go(i.info,e,t),i.info.started=!0)};Fo(this.info,s,(t=>{i.info.started&&s(t),No(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=Wo(t),i=t.changedTouches[0],s=i.clientX,o=i.clientY;Vo(this.info,s,o)&&("start"===this.info.state&&qo("tap"),this.info.addMove({x:s,y:o}),Go(this.info,e,i),this.info.state="track",this.info.started=!0)},touchend(t){const e=Wo(t),i=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:i.clientX,y:i.clientY}),Go(this.info,e,i))}}),Ho({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){Oo(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){Oo(t)&&Jo(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){Jo(this.info,t.changedTouches[0],t)}});const Ko=ne((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()}})),Zo=ne((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){}})),Xo=t=>class extends(Ko(Zo(t))){get _activeKeys(){return[" "]}ready(){super.ready(),Uo(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),Uo(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
- */,Qo=ne((t=>class extends t{get _keyboardActive(){return ns()}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}})),tr=t=>class extends(Ko(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
- */,er=t=>class extends(Xo(tr(Qo(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
- */xt("vaadin-button",bo,{moduleId:"vaadin-button-styles"});class ir extends(er(co(Tt(Es(Ki))))){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
- */)(Gi)}ready(){super.ready(),this._tooltipController=new vo(this),this.addController(this._tooltipController)}}function sr(t){const e=new Date(t);return e.setHours(0,0,0,0),e}function or(t,e,i=sr){return t instanceof Date&&e instanceof Date&&i(t).getTime()===i(e).getTime()}function rr(t){return{day:t.getDate(),month:t.getMonth(),year:t.getFullYear()}}function nr(t,e,i,s){let o=!1;return"function"==typeof s&&t&&(o=s(rr(t))),(!e||t>=e)&&(!i||t<=i)&&!o}function ar(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 lr(t){const e=new Date,i=new Date(e);return i.setDate(1),i.setMonth(parseInt(t)+e.getMonth()),i}function hr(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}n(ir);
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 cr{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,dr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),dr.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 cr?t._cancelAsync():t=new cr,t.setConfig(e,i),t}}let dr=new Set;const ur=function(){const t=Boolean(dr.size);return dr.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t},pr=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=ur()}while(t||e)},mr=document.createElement("template");mr.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 fr extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(mr.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()),pr()}_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=ao.debounce(this._debouncerScrollFinish,io.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=ao.debounce(this._debouncerUpdateClones,io.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-${mo()}`,o=document.createElement("slot");o.setAttribute("name",s),o._itemWrapper=i,e.appendChild(o),i.setAttribute("slot",s),this.appendChild(i),this._isVisible(i,t)&&this._ensureStampedInstance(i)}})),requestAnimationFrame((()=>{this._finishInit()}))}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach((i=>{t.instance[i]=e[i]}))}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach(((i,s)=>{if(!i.updated){const o=this._firstIndex+this.bufferSize*s;[...i.children].forEach(((i,s)=>{const r=i._itemWrapper;t&&!this._isVisible(r,e)||this._updateElement(r.instance,o+s)})),i.updated=!0}}))}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}
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 vr=document.createElement("template");vr.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",n(class extends fr{static get is(){return"vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(vr.content.cloneNode(!0))}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=lr(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 br=document.createElement("template");br.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",n(class extends fr{static get is(){return"vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(br.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 gr=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 yr extends(Tt(gr(Ki))){static get is(){return"vaadin-date-picker-year"}static get template(){return Gi`
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 wr(t,e,i,s,o){let r;o&&(r="object"==typeof i&&null!==i,r&&(s=t.__dataTemp[e]));let n=s!==i&&(s==s||i==i);return r&&n&&(t.__dataTemp[e]=i),n}n(yr);const _r=ne((t=>class extends t{_shouldPropertyChange(t,e,i){return wr(this,t,e,i,!0)}})),xr=ne((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,i){return wr(this,t,e,i,this.mutableData)}}));_r._mutablePropertyChange=wr;
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 kr=null;function Ar(){return kr}Ar.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Ar,writable:!0}});const Cr=Ri(Ar),Dr=_r(Cr),Tr=Ri(class{});class Sr extends Tr{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"),_e(_e(s).parentNode).replaceChild(s.__polymerReplaced__,s);else{const t=s.__polymerReplaced__;t&&_e(_e(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 Mr=_r(Sr);function zr(t){let e=t.__dataHost;return e&&e._methodHost||e}function Pr(t,e){return function(t,i,s){e.call(t.__templatizeOwner,i.substring(6),s[i])}}function Or(t,e){return function(t,i,s){e.call(t.__templatizeOwner,t,i,s[i])}}function Er(t,e,i){if(Gt&&!zr(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:Sr)._parseTemplate(t),o=s.templatizeInstanceClass;o||(o=function(t,e,i){let s=i.mutableData?Mr:Sr;Er.mixin&&(s=Er.mixin(s));let o=class extends s{};return o.prototype.__templatizeOptions=i,o.prototype._bindTemplate(t),function(t,e,i,s){let o=i.hostProps||{};for(let e in s.instanceProps){delete o[e];let i=s.notifyInstanceProp;i&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Or(0,i)})}if(s.forwardHostProp&&e.__dataHost)for(let e in o)i.hasHostProps||(i.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0)}})}(o,t,e,i),o}(t,s,i),s.templatizeInstanceClass=o);const r=zr(t);!function(t,e,i,s){let o=i.forwardHostProp;if(o&&e.hasHostProps){const r="template"==t.localName;let n=e.templatizeTemplateClass;if(!n){if(r){let t=i.mutableData?Dr:Cr;class s extends t{}n=e.templatizeTemplateClass=s}else{const i=t.constructor;class s extends i{}n=e.templatizeTemplateClass=s}let a=e.hostProps;for(let t in a)n.prototype._addPropertyEffect("_host_"+t,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Pr(0,o)}),n.prototype._createNotifyingProperty("_host_"+t);Zt&&s&&function(t,e,i){const s=i.constructor._properties,{propertyEffects:o}=t,{instanceProps:r}=e;for(let t in o)if(!(s[t]||r&&r[t])){const e=o[t];for(let i=0;i<e.length;i++){const{part:s}=e[i].info;if(!s.signature||!s.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,i,s)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),r)!function(t,e){kr=t,Object.setPrototypeOf(t,e.prototype),new e,kr=null}(t,n),t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,n.prototype);const i=e.hostProps;for(let e in i)if(e="_host_"+e,e in t){const i=t[e];delete t[e],t.__data[e]=i}}}}(t,s,i,r);let n=class extends o{};return n.prototype._methodHost=r,n.prototype.__dataHost=t,n.prototype.__templatizeOwner=e,n.prototype.__hostProps=s.hostProps,n}
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 Fr=!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 Nr=xr(Ki);class Ir extends Nr{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:!se,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(Kt&&!$t){if(!Fr){Fr=!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=_e(_e(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=Er(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(t,e){let i=this.__instances;for(let s,o=0;o<i.length&&(s=i[o]);o++)s.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,i){if((s=this.as)===(o=e)||Ae(s,o)||Ce(s,o)){let s=t[this.itemsIndexAs];e==this.as&&(this.items[s]=i);let o=De(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,e);this.notifyPath(o,i)}var s,o}})}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=cr.debounce(this.__renderDebouncer,e>0?He.after(e):Le,t.bind(this)),dr.add(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),pr()}__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),se&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter(((e,i,s)=>this.__filterFn(t[e],i,s)))),this.__sortFn&&e.sort(((e,i)=>this.__sortFn(t[e],t[i]))),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let s;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),s=Math.max(e-i,0),this.__chunkCount=s||1):(s=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+s,t)),this.__shouldMeasureChunk=s===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime;this.__chunkCount=Math.round(this.__chunkCount*(this._targetFrameTime/t))||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,i){const s=this.__itemsIdxToInstIdx={};let o;for(o=0;o<e;o++){let e=this.__instances[o],r=i[o],n=t[r];s[r]=o,e?(e._setPendingProperty(this.as,n),e._setPendingProperty(this.indexAs,o),e._setPendingProperty(this.itemsIndexAs,r),e._flushProperties()):this.__insertInstance(n,o,r)}for(let t=this.__instances.length-1;t>=o;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const i=_e(e.root);for(let t=0;t<e.children.length;t++)i.appendChild(e.children[t]);return e}__attachInstance(t,e){e.insertBefore(this.__instances[t].root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,i){let s={};return s[this.as]=t,s[this.indexAs]=e,s[this.itemsIndexAs]=i,new this.__ctor(s)}__insertInstance(t,e,i){const s=this.__stampInstance(t,e,i);let o=this.__instances[e+1],r=o?o.children[0]:this;return _e(_e(this).parentNode).insertBefore(s.root,r),this.__instances[e]=s,s}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let i=t.slice(6),s=i.indexOf("."),o=s<0?i:i.substring(0,s);if(o==parseInt(o,10)){let t=s<0?"":i.substring(s+1);this.__handleObservedPaths(t);let r=this.__instances[this.__itemsIdxToInstIdx[o]];return r&&(r._setPendingPropertyOrPath(this.as+(t?"."+t:""),e,!1,!0),r._flushProperties()),!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let i;for(;e;)if(i=e.__dataHost?e:e.__templatizeInstance){if(i.__dataHost==t)return i;e=i.__dataHost}else e=_e(e).parentNode;return null}(this.template,t)}}customElements.define(Ir.is,Ir);
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 Br=t=>class extends(Qo(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=>or(t.date,this.focusedDate)))}ready(){super.ready(),Uo(this.$.monthGrid,"tap",this._handleTap.bind(this))}_isDisabled(t,e,i){const s=new Date(0,0);s.setFullYear(t.getFullYear()),s.setMonth(t.getMonth()),s.setDate(1);const o=new Date(0,0);return o.setFullYear(t.getFullYear()),o.setMonth(t.getMonth()+1),o.setDate(0),!(e&&i&&e.getMonth()===i.getMonth()&&e.getMonth()===t.getMonth()&&i.getDate()-e.getDate()>=0||nr(s,e,i)||nr(o,e,i))}_getTitle(t,e){if(void 0!==t&&void 0!==e)return e.formatTitle(e.monthNames[t.getMonth()],t.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300)}_dateAdd(t,e){t.setDate(t.getDate()+e)}_applyFirstDayOfWeek(t,e){if(void 0!==t&&void 0!==e)return t.slice(e).concat(t.slice(0,e))}_getWeekDayNames(t,e){if(void 0===t||void 0===e)return[];const{weekdays:i,weekdaysShort:s,firstDayOfWeek:o}=t,r=this._applyFirstDayOfWeek(s,o);return this._applyFirstDayOfWeek(i,o).map(((t,e)=>({weekDay:t,weekDayShort:r[e]}))).slice(0,7)}__focusedDateChanged(t,e){Array.isArray(e)&&e.some((e=>or(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 or(new Date,t)}_getDays(t,e){if(void 0===t||void 0===e)return[];const i=new Date(0,0);for(i.setFullYear(t.getFullYear()),i.setMonth(t.getMonth()),i.setDate(1);i.getDay()!==e.firstDayOfWeek;)this._dateAdd(i,-1);const s=[],o=i.getMonth(),r=t.getMonth();for(;i.getMonth()===r||i.getMonth()===o;)s.push(i.getMonth()===r?new Date(i.getTime()):null),this._dateAdd(i,1);return s}_getWeeks(t){return t.reduce(((t,e,i)=>(i%7==0&&t.push([]),t[t.length-1].push(e),t)),[])}_handleTap(t){this.ignoreTaps||this._notTapping||!t.target.date||t.target.hasAttribute("disabled")||(this.selectedDate=t.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:t.target.date},bubbles:!0,composed:!0})))}_preventDefault(t){t.preventDefault()}__getWeekNumber(t){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),o=new Date(0,0);o.setFullYear(s.getFullYear());const r=s.getTime()-o.getTime(),n=Math.round(r/864e5);return Math.floor(n/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
- xt("vaadin-month-calendar",p`
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 jr extends(Br(Tt(Ki))){static get template(){return Gi`
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,o,r){const n=["date"],a=t>sr(new Date),l=t<sr(new Date);return this.__isDayDisabled(t,s,o,r)&&n.push("disabled"),this.__isDayFocused(t,e)&&n.push("focused"),this.__isDaySelected(t,i)&&n.push("selected"),this._isToday(t)&&n.push("today"),l&&n.push("past"),a&&n.push("future"),n.join(" ")}__isDayFocused(t,e){return or(t,e)}__isDaySelected(t,e){return or(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return"true"}__isDayDisabled(t,e,i,s){return!nr(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"}}n(jr);
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 Wr{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 Rr=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(){Lo(this.$.scrollers,"pan-y"),Uo(this.$.scrollers,"track",this._track.bind(this)),Uo(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),Uo(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),Uo(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this))}_initControllers(){this.addController(new Wr(this._desktopMediaQuery,(t=>{this._desktopMode=t}))),this.addController(new fo(this,"today-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onTodayButtonKeyDown(t))),Uo(t,"tap",this._onTodayTap.bind(this)),this._todayButton=t}})),this.addController(new fo(this,"cancel-button","vaadin-button",{observe:!1,initializer:t=>{t.setAttribute("theme","tertiary"),t.addEventListener("keydown",(t=>this.__onCancelButtonKeyDown(t))),Uo(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 fo(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 fo(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:t=>{t.setAttribute("aria-hidden","true"),Uo(t,"tap",(t=>{this._onYearTap(t)})),t.addEventListener("custom-scroll",(()=>{this._onYearScroll()})),t.addEventListener("touchstart",(()=>{this._onYearScrollTouchStart()})),t.addEventListener("init-done",(()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")]})),this._yearScroller=t}}))}__updateCancelButton(t,e){t&&(t.textContent=e&&e.cancel)}__updateTodayButton(t,e,i,s,o){t&&(t.textContent=e&&e.today,t.disabled=!this._isTodayAllowed(i,s,o))}__updateCalendars(t,e,i,s,o,r,n,a,l,h){t&&t.length&&t.forEach((t=>{t.i18n=e,t.minDate=i,t.maxDate=s,t.isDateDisabled=h,t.focusedDate=r,t.selectedDate=o,t.showWeekNumbers=n,t.ignoreTaps=a,l?t.setAttribute("theme",l):t.removeAttribute("theme")}))}__updateYears(t,e,i){t&&t.length&&t.forEach((t=>{t.selectedDate=e,i?t.setAttribute("theme",i):t.removeAttribute("theme")}))}_selectDate(t){return!!this._dateAllowed(t)&&(this.selectedDate=t,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:t},bubbles:!0,composed:!0})),!0)}_desktopModeChanged(t){this.toggleAttribute("desktop",t)}_focusedDateChanged(t){this.revealDate(t)}revealDate(t,e=!0){if(!t)return;const i=this._differenceInMonths(t,this._originDate);if(this.__useSubMonthScrolling){const s=this._calculateWeekScrollOffset(t);return void this._scrollToPosition(i+s,e)}const s=this._monthScroller.position>i,o=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-2*this._monthScroller.bufferOffset)/this._monthScroller.itemHeight,r=this._monthScroller.position+o-1<i;s?this._scrollToPosition(i,e):r&&this._scrollToPosition(i-o+1,e)}_calculateWeekScrollOffset(t){const e=new Date(0,0);e.setFullYear(t.getFullYear()),e.setMonth(t.getMonth()),e.setDate(1);let i=0;for(;e.getDate()<t.getDate();)e.setDate(e.getDate()+1),e.getDay()===this.i18n.firstDayOfWeek&&(i+=1);return i/6}_initialPositionChanged(t){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(t)}_repositionYearScroller(){const t=this._monthScroller.position;this._visibleMonthIndex=Math.floor(t),this._yearScroller.position=(t+this._originDate.getMonth())/12}_repositionMonthScroller(){this._monthScroller.position=12*this._yearScroller.position-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position)}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps()}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps()}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout((()=>{this._notTapping=!0}),300),this._repositionMonthScroller()}_onMonthScrollTouchStart(){this._repositionYearScroller()}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=ao.debounce(this._debouncer,io.after(300),(()=>{this._ignoreTaps=!1}))}_formatDisplayed(t,e,i){return t&&e&&"function"==typeof e.formatDate?e.formatDate(rr(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 o=this._monthScroller.position,r=t=>{s||(s=t);const e=t-s;if(e<this.scrollDuration){const t=((t,e,i)=>(t/=this.scrollDuration/2)<1?i/2*t*t+e:-i/2*((t-=1)*(t-2)-1)+e)(e,o,this._targetPosition-o);this._monthScroller.position=t,window.requestAnimationFrame(r)}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:o}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,i(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1)};window.requestAnimationFrame(r)}_limit(t,e){return Math.min(e.max,Math.max(e.min,t))}_handleTrack(t){Math.abs(t.detail.dx)<10||Math.abs(t.detail.ddy)>10||(Math.abs(t.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0),this._translateX=this._limit(this._translateX+t.detail.ddx,{min:0,max:this._yearScrollerWidth}))}_track(t){if(!this._desktopMode)switch(t.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(t);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller()}}_toggleAnimateClass(t){t?this.classList.add("animate"):this.classList.remove("animate")}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller()}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","")}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(t){this._desktopMode||(this._monthScroller.style.transform=`translateX(${t-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${t}px)`)}_yearAfterXMonths(t){return lr(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){or(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&&or(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=>{vs(this,(()=>{pr(),t()}))})),t&&this.revealDate(this.focusedDate),this._revealPromise&&await this._revealPromise,this.__tryFocusDate()}_focusClosestDate(t){this.focusDate(ar(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 nr(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
- xt("vaadin-date-picker-overlay-content",p`
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 Ur extends(Rr(Es(Tt(ts(Ki))))){static get template(){return Gi`
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()}}n(Ur);
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 Hr=ne((t=>class extends(Qo(tr(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)}})),Lr=new WeakMap,$r=ne((t=>class extends t{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),e=function(t){return Lr.has(t)||Lr.set(t,new Set),Lr.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))}))}})),qr=ne((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}})),Yr=t=>class extends(qr(Zo(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(),_s||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
- */,Vr=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 Gr(t){return Vr.has(t)||Vr.set(t,new WeakMap),Vr.get(t)}function Jr(t,e){t&&t.removeAttribute(e)}function Kr(t,e){if(!t||!e)return;const i=Gr(e);if(i.has(t))return;const s=Ws(t.getAttribute(e));i.set(t,new Set(s))}function Zr(t,e,i={newId:null,oldId:null,fromUser:!1}){if(!t||!e)return;const{newId:s,oldId:o,fromUser:r}=i,n=Gr(e),a=n.get(t);if(!r&&a)return o&&a.delete(o),void(s&&a.add(s));r&&(a?s||n.delete(t):Kr(t,e),Jr(t,e)),function(t,e,i){const s=Ws(t.getAttribute(e));s.delete(i),0!==s.size?t.setAttribute(e,Rs(s)):t.removeAttribute(e)}(t,e,o);const l=s||Rs(a);l&&Us(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 Xr{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?(Kr(e=this.__target,"aria-labelledby"),Jr(e,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(function(t,e){if(!t)return;const i=Gr(e),s=i.get(t);s&&0!==s.size?Us(t,e,Rs(s)):t.removeAttribute(e),i.delete(t)}(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(t,e,i){Zr(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i})}__setErrorIdToAriaAttribute(t,e){Zr(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1})}__setHelperIdToAriaAttribute(t,e){Zr(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 Qr=document.createElement("div");let tn;Qr.style.position="fixed",Qr.style.clip="rect(0px, 0px, 0px, 0px)",Qr.setAttribute("aria-live","polite"),document.body.appendChild(Qr);
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 en extends fo{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 sn extends en{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?(Qr.removeAttribute("aria-live"),Qr.removeAttribute("role"),tn=ao.debounce(tn,so,(()=>{Qr.setAttribute("role","alert")}))):(tn&&tn.cancel(),Qr.removeAttribute("role"),Qr.setAttribute("aria-live",i)),Qr.textContent="",setTimeout((()=>{Qr.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 on extends en{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 rn extends en{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 nn=ne((t=>class extends(Es(t)){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new rn(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)}})),an=ne((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}})),ln=t=>class extends(an(nn(Es(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 Xr(this),this._helperController=new on(this),this._errorController=new sn(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
- */,hn=ne((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)}})),cn=ne((t=>class extends(hn(an(qr(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}})),dn=t=>class extends($r(Hr(cn(ln(Yr(Zo(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=ao.debounce(this._preventInputDebouncer,io.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 un extends fo{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 pn{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 mn=[p`
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
- */,p`
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
- */,p`
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
- */],fn=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 vn{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 bn=t=>class extends(fn(Es(Hr(cn(Zo(t)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(t){const e=String(t.year).replace(/\d+/u,(t=>"0000".substr(t.length)+t));return[t.month+1,t.day,e].join("/")},parseDate(t){const e=t.split("/"),i=new Date;let s,o=i.getMonth(),r=i.getFullYear();if(3===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1]),r=parseInt(e[2]),e[2].length<3&&r>=0&&(r=function(t,e,i=0,s=1){if(e>99)throw new Error("The provided year cannot have more than 2 digits.");if(e<0)throw new Error("The provided year cannot be negative.");let o=e+100*Math.floor(t.getFullYear()/100);return t<new Date(o-50,i,s)?o-=100:t>new Date(o+50,i,s)&&(o+=100),o}(this.referenceDate?hr(this.referenceDate):new Date,r,o,s))):2===e.length?(o=parseInt(e[0])-1,s=parseInt(e[1])):1===e.length&&(s=parseInt(e[0])),void 0!==s)return{day:s,month:o,year:r}},formatTitle:(t,e)=>`${t} ${e}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:ws},_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&&!ns()&&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 Wr(this._fullscreenMediaQuery,(t=>{this._fullscreen=t}))),this.addController(new vn(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=hr(`${e.year}-${e.month+1}-${e.day}`)),e&&!isNaN(e.getTime())?e:void 0}__formatDate(t){if(this.i18n.formatDate)return this.i18n.formatDate(rr(t))}checkValidity(){const t=this._inputElementValue,e=!t||!!this._selectedDate&&t===this.__formatDate(this._selectedDate),i=!this._selectedDate||nr(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let s=!0;return this.inputElement&&(this.inputElement.checkValidity?s=this.inputElement.checkValidity():this.inputElement.validate&&(s=this.inputElement.validate())),e&&i&&s}_shouldSetFocus(t){return!this._shouldKeepFocusRing}_shouldRemoveFocus(t){const{relatedTarget:e}=t;return!(!this.opened||null===e||e===document.body||this.contains(e)||this._overlayContent.contains(e))||!this.opened}_setFocused(t){super._setFocused(t),this._shouldKeepFocusRing=t&&this._keyboardActive}__commitValueChange(){const t=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==t&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=t}__commitDate(t){this.__keepCommittedValue=!0,this._selectedDate=t,this.__keepCommittedValue=!1,this.__commitValueChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(t,e,i,s,o,r){return!t||e&&(!r||o)||i&&o||!s.parseDate}_formatISO(t){return function(t){return t instanceof Date?function(t){const e=(t,e="00")=>(e+t).substr((e+t).length-e.length);let i="",s="0000",o=t.year;return o<0?(o=-o,i="-",s="000000"):t.year>=1e4&&(i="+",s="000000"),[i+e(o,s),e(t.month+1),e(t.day)].join("-")}({year:t.getFullYear(),month:t.getMonth(),day:t.getDate()}):""}(t)}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(t){this.inputElement&&this.inputElement.setAttribute("aria-expanded",t)}_selectedDateChanged(t,e){void 0!==t&&void 0!==e&&(this.__keepInputValue||this._applyInputValue(t),this.value=this._formatISO(t),this._ignoreFocusedDateChange=!0,this._focusedDate=t,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(t,e){void 0!==t&&void 0!==e&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(t))}_valueChanged(t,e){const i=hr(t);!t||i?(t?or(this._selectedDate,i)||(this._selectedDate=i,void 0!==e&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue)):this.value=e}__updateOverlayContent(t,e,i,s,o,r,n,a,l){t&&(t.i18n=e,t.label=i,t.minDate=s,t.maxDate=o,t.focusedDate=r,t.selectedDate=n,t.showWeekNumbers=a,t.isDateDisabled=l)}__updateOverlayContentTheme(t,e){t&&(e?t.setAttribute("theme",e):t.removeAttribute("theme"))}__updateOverlayContentFullScreen(t,e){t&&t.toggleAttribute("fullscreen",e)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1}_onOverlayOpened(){const t=this._overlayContent;t.reset();const e=this._getInitialPosition();t.initialPosition=e;const i=t.focusedDate||e;t.scrollToDate(i),this._ignoreFocusedDateChange=!0,t.focusedDate=i,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(t.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const s=this._nativeInput;this._noInput&&s&&(s.blur(),this._overlayContent.focusDateElement()),this.__showOthers=Ss(this._noInput?t:[s,t])}_getInitialPosition(){const t=hr(this.initialPosition),e=this._selectedDate||this._overlayContent.initialPosition||t||new Date;return t||nr(e,this._minDate,this._maxDate,this.isDateDisabled)?e:this._minDate||this._maxDate?ar(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,or(t,this._focusedDate)||(this._focusedDate=t),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(t){return hr(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
- xt("vaadin-date-picker",[mn,p`
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 gn extends(bn(dn(Tt(co(Ki))))){static get is(){return"vaadin-date-picker"}static get template(){return Gi`
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 un(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}),{uniqueIdPrefix:"search-input"})),this.addController(new pn(this.inputElement,this._labelController)),this._tooltipController=new vo(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}}n(gn);const yn=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])o[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()},r("filterOpen",this.language)),this.showClearButton||this.quickFiltersActive?i("button",{class:"FilterClear",onClick:()=>this.resetSearch()},r("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"},r(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:r(this.activateTicketSearch?"filterTicketPlaceholder":"filterDrawPlaceholder",this.language)}),i("p",{key:"f8a8afe9594f8f0cad7bf0654f23348341f08a3d"},r("filterOrDate",this.language))),i("div",{key:"a6b8fc4a3c424a1d56236c168e0298de3511cba5",class:"FilterCalendarWrapper"},i("vaadin-date-picker",{key:"06c32fbf0073a7097ec6a8c24b200868a0c525cb",value:this.filterData.filterFromCalendar,onChange:this.handleFilterFrom,placeholder:r("filterFromCalendar",this.language),class:"VaadinDatePicker"}),i("vaadin-date-picker",{key:"a4d4212b6107ce9cf572f40a4713d9d038c8b395",value:this.filterData.filterToCalendar,onChange:this.handleFilterTo,placeholder:r("filterToCalendar",this.language),class:"VaadinDatePicker"}))),i("div",{key:"7dec7662f1b093b6c443d0c194eb614aa608a342",class:"FilterModalFooter"},i("button",{key:"336d6f0a0fb88bff6c44f593a754afbc43cd1e03",class:"FilterModalButton",onClick:()=>this.filterSearch()},r("filterModalButton",this.language)))))}};yn.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 wn=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)),_n=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"+(wn(this.userAgent)?" HelperModalMobileContent":"")},i("span",{key:"30cf7928c1e4baa53f3514fc1930823db76c874c",class:"HelperModalClose"+(wn(this.userAgent)?" HelperModalMobileClose":""),onClick:this.handleHelperModalClose.bind(this)},"X"),i("slot",{key:"5c1323a98cdcd09669020a00affe5673856e807e"}))))}};_n.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)}";export{yn as helper_filters,_n as helper_modal}