@everymatrix/general-input 1.73.1 → 1.74.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_13.cjs.entry.js +388 -394
- package/dist/esm/checkbox-group-input_13.entry.js +388 -394
- package/dist/general-input/checkbox-group-input_13.entry.js +107 -112
- package/package.json +1 -1
- package/dist/collection/components/general-input/general-input.stories.js +0 -86
- package/dist/types/components/general-input/general-input.stories.d.ts +0 -5
|
@@ -6112,33 +6112,33 @@ const EmailInput = class {
|
|
|
6112
6112
|
};
|
|
6113
6113
|
EmailInput.style = EmailInputStyle0;
|
|
6114
6114
|
|
|
6115
|
-
var
|
|
6115
|
+
var Sa=Object.defineProperty,ka=Object.defineProperties;var Ta=Object.getOwnPropertyDescriptors;var _o=Object.getOwnPropertySymbols;var Pa=Object.prototype.hasOwnProperty,Oa=Object.prototype.propertyIsEnumerable;var ti=(s,t,e)=>t in s?Sa(s,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[t]=e,H=(s,t)=>{for(var e in t||(t={}))Pa.call(t,e)&&ti(s,e,t[e]);if(_o)for(var e of _o(t))Oa.call(t,e)&&ti(s,e,t[e]);return s},ze=(s,t)=>ka(s,Ta(t));var v=(s,t,e)=>(ti(s,typeof t!="symbol"?t+"":t,e),e);var Me=(s,t,e)=>new Promise((i,o)=>{var r=l=>{try{a(e.next(l));}catch(d){o(d);}},n=l=>{try{a(e.throw(l));}catch(d){o(d);}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,n);a((e=e.apply(s,t)).next());});/**
|
|
6116
6116
|
* @license
|
|
6117
6117
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
6118
6118
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6119
|
-
*/function
|
|
6119
|
+
*/function x(s,t="24.5.12"){Object.defineProperty(s,"version",{get(){return t}});const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
6120
6120
|
* @license
|
|
6121
6121
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6122
6122
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6123
|
-
*/let
|
|
6123
|
+
*/let Da=class extends HTMLElement{static get is(){return "vaadin-lumo-styles"}};x(Da);/**
|
|
6124
6124
|
* @license
|
|
6125
6125
|
* Copyright 2019 Google LLC
|
|
6126
6126
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6127
|
-
*/const
|
|
6127
|
+
*/const bt=globalThis,us=bt.ShadowRoot&&(bt.ShadyCSS===void 0||bt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ps=Symbol(),mo=new WeakMap;let Lt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ps)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(us&&t===void 0){const i=e!==void 0&&e.length===1;i&&(t=mo.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&mo.set(e,t));}return t}toString(){return this.cssText}};const za=s=>new Lt(typeof s=="string"?s:s+"",void 0,ps),p=(s,...t)=>{const e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[r+1],s[0]);return new Lt(e,s,ps)},_s=(s,t)=>{if(us)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const e of t){const i=document.createElement("style"),o=bt.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i);}},fo=us?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(const i of t.cssRules)e+=i.cssText;return za(e)})(s):s;/**
|
|
6128
6128
|
* @license
|
|
6129
6129
|
* Copyright 2017 Google LLC
|
|
6130
6130
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6131
|
-
*/const{is:
|
|
6131
|
+
*/const{is:Ma,defineProperty:Na,getOwnPropertyDescriptor:La,getOwnPropertyNames:Va,getOwnPropertySymbols:Fa,getPrototypeOf:Ba}=Object,Z=globalThis,vo=Z.trustedTypes,Ra=vo?vo.emptyScript:"",ii=Z.reactiveElementPolyfillSupport,Ue=(s,t)=>s,Pi={toAttribute(s,t){switch(t){case Boolean:s=s?Ra:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s);}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s);}catch(i){e=null;}}return e}},xr=(s,t)=>!Ma(s,t),go={attribute:!0,type:String,converter:Pi,reflect:!1,useDefault:!1,hasChanged:xr};(Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Z.litPropertyMetadata)!=null||(Z.litPropertyMetadata=new WeakMap);class be extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=go){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const i=Symbol(),o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Na(this.prototype,t,o);}}static getPropertyDescriptor(t,e,i){var n;const{get:o,set:r}=(n=La(this.prototype,t))!=null?n:{get(){return this[e]},set(a){this[e]=a;}};return {get:o,set(a){const l=o==null?void 0:o.call(this);r==null||r.call(this,a),this.requestUpdate(t,l,i);},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return (e=this.elementProperties.get(t))!=null?e:go}static _$Ei(){if(this.hasOwnProperty(Ue("elementProperties")))return;const t=Ba(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(Ue("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ue("properties"))){const e=this.properties,i=[...Va(e),...Fa(e)];for(const o of i)this.createProperty(o,e[o]);}const t=this[Symbol.metadata];if(t!==null){const e=litPropertyMetadata.get(t);if(e!==void 0)for(const[i,o]of e)this.elementProperties.set(i,o);}this._$Eh=new Map;for(const[e,i]of this.elementProperties){const o=this._$Eu(e,i);o!==void 0&&this._$Eh.set(o,e);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const i=new Set(t.flat(1/0).reverse());for(const o of i)e.unshift(fo(o));}else t!==void 0&&e.push(fo(t));return e}static _$Eu(t,e){const i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this));}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t));}removeController(t){var e;(e=this._$EO)==null||e.delete(t);}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){var e;const t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return _s(t,this.constructor.elementStyles),t}connectedCallback(){var e;(this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostConnected)==null?void 0:o.call(i)});}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return (i=e.hostDisconnected)==null?void 0:i.call(e)});}attributeChangedCallback(t,e,i){this._$AK(t,i);}_$ET(t,e){var r;const i=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,i);if(o!==void 0&&i.reflect===!0){const n=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Pi).toAttribute(e,i.type);this._$Em=t,n==null?this.removeAttribute(o):this.setAttribute(o,n),this._$Em=null;}}_$AK(t,e){var r,n,a,l;const i=this.constructor,o=i._$Eh.get(t);if(o!==void 0&&this._$Em!==o){const d=i.getPropertyOptions(o),h=typeof d.converter=="function"?{fromAttribute:d.converter}:((r=d.converter)==null?void 0:r.fromAttribute)!==void 0?d.converter:Pi;this._$Em=o,this[o]=(l=(a=h.fromAttribute(e,d.type))!=null?a:(n=this._$Ej)==null?void 0:n.get(o))!=null?l:null,this._$Em=null;}}requestUpdate(t,e,i){var o,r;if(t!==void 0){const n=this.constructor,a=this[t];if(i!=null||(i=n.getPropertyOptions(t)),!(((o=i.hasChanged)!=null?o:xr)(a,e)||i.useDefault&&i.reflect&&a===((r=this._$Ej)==null?void 0:r.get(t))&&!this.hasAttribute(n._$Eu(t,i))))return;this.C(t,e,i);}this.isUpdatePending===!1&&(this._$ES=this._$EP());}C(t,e,{useDefault:i,reflect:o,wrapped:r},n){var a,l,d;i&&!((a=this._$Ej)!=null?a:this._$Ej=new Map).has(t)&&(this._$Ej.set(t,(l=n!=null?n:e)!=null?l:this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||i||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&((d=this._$Eq)!=null?d:this._$Eq=new Set).add(t));}_$EP(){return Me(this,null,function*(){this.isUpdatePending=!0;try{yield this._$ES;}catch(e){Promise.reject(e);}const t=this.scheduleUpdate();return t!=null&&(yield t),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var o;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[n,a]of this._$Ep)this[n]=a;this._$Ep=void 0;}const r=this.constructor.elementProperties;if(r.size>0)for(const[n,a]of r){const{wrapped:l}=a,d=this[n];l!==!0||this._$AL.has(n)||d===void 0||this.C(n,void 0,a,d);}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(o=this._$EO)==null||o.forEach(r=>{var n;return (n=r.hostUpdate)==null?void 0:n.call(r)}),this.update(e)):this._$EM();}catch(r){throw t=!1,this._$EM(),r}t&&this._$AE(e);}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var o;return (o=i.hostUpdated)==null?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map,this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return !0}update(t){this._$Eq&&(this._$Eq=this._$Eq.forEach(e=>this._$ET(e,this[e]))),this._$EM();}updated(t){}firstUpdated(t){}}var fr;be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[Ue("elementProperties")]=new Map,be[Ue("finalized")]=new Map,ii==null||ii({ReactiveElement:be}),((fr=Z.reactiveElementVersions)!=null?fr:Z.reactiveElementVersions=[]).push("2.1.0");/**
|
|
6132
6132
|
* @license
|
|
6133
6133
|
* Copyright 2017 Google LLC
|
|
6134
6134
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6135
|
-
*/const
|
|
6136
|
-
\f\r]`,
|
|
6137
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,
|
|
6135
|
+
*/const We=globalThis,It=We.trustedTypes,bo=It?It.createPolicy("lit-html",{createHTML:s=>s}):void 0,Cr="$lit$",Q=`lit$${Math.random().toFixed(9).slice(2)}$`,wr="?"+Q,$a=`<${wr}>`,ue=document,Ye=()=>ue.createComment(""),Ge=s=>s===null||typeof s!="object"&&typeof s!="function",ms=Array.isArray,Ha=s=>ms(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",si=`[
|
|
6136
|
+
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yo=/-->/g,xo=/>/g,ae=RegExp(`>|${si}(?:([^\\s"'>=/]+)(${si}*=${si}*(?:[^
|
|
6137
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,Ie=Symbol.for("lit-noChange"),T=Symbol.for("lit-nothing"),Io=new WeakMap,le=ue.createTreeWalker(ue,129);function Ar(s,t){if(!ms(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return bo!==void 0?bo.createHTML(t):t}const qa=(s,t)=>{const e=s.length-1,i=[];let o,r=t===2?"<svg>":t===3?"<math>":"",n=Ne;for(let a=0;a<e;a++){const l=s[a];let d,h,c=-1,u=0;for(;u<l.length&&(n.lastIndex=u,h=n.exec(l),h!==null);)u=n.lastIndex,n===Ne?h[1]==="!--"?n=yo:h[1]!==void 0?n=xo:h[2]!==void 0?(Ir.test(h[2])&&(o=RegExp("</"+h[2],"g")),n=ae):h[3]!==void 0&&(n=ae):n===ae?h[0]===">"?(n=o!=null?o:Ne,c=-1):h[1]===void 0?c=-2:(c=n.lastIndex-h[2].length,d=h[1],n=h[3]===void 0?ae:h[3]==='"'?wo:Co):n===wo||n===Co?n=ae:n===yo||n===xo?n=Ne:(n=ae,o=void 0);const _=n===ae&&s[a+1].startsWith("/>")?" ":"";r+=n===Ne?l+$a:c>=0?(i.push(d),l.slice(0,c)+Cr+l.slice(c)+Q+_):l+Q+(c===-2?a:_);}return [Ar(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),i]};class Ke{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0;const a=t.length-1,l=this.parts,[d,h]=qa(t,e);if(this.el=Ke.createElement(d,i),le.currentNode=this.el.content,e===2||e===3){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes);}for(;(o=le.nextNode())!==null&&l.length<a;){if(o.nodeType===1){if(o.hasAttributes())for(const c of o.getAttributeNames())if(c.endsWith(Cr)){const u=h[n++],_=o.getAttribute(c).split(Q),m=/([.?@])?(.*)/.exec(u);l.push({type:1,index:r,name:m[2],strings:_,ctor:m[1]==="."?Wa:m[1]==="?"?ja:m[1]==="@"?Ya:Vt}),o.removeAttribute(c);}else c.startsWith(Q)&&(l.push({type:6,index:r}),o.removeAttribute(c));if(Ir.test(o.tagName)){const c=o.textContent.split(Q),u=c.length-1;if(u>0){o.textContent=It?It.emptyScript:"";for(let _=0;_<u;_++)o.append(c[_],Ye()),le.nextNode(),l.push({type:2,index:++r});o.append(c[u],Ye());}}}else if(o.nodeType===8)if(o.data===wr)l.push({type:2,index:r});else {let c=-1;for(;(c=o.data.indexOf(Q,c+1))!==-1;)l.push({type:7,index:r}),c+=Q.length-1;}r++;}}static createElement(t,e){const i=ue.createElement("template");return i.innerHTML=t,i}}function Ae(s,t,e=s,i){var n,a,l;if(t===Ie)return t;let o=i!==void 0?(n=e._$Co)==null?void 0:n[i]:e._$Cl;const r=Ge(t)?void 0:t._$litDirective$;return (o==null?void 0:o.constructor)!==r&&((a=o==null?void 0:o._$AO)==null||a.call(o,!1),r===void 0?o=void 0:(o=new r(s),o._$AT(s,e,i)),i!==void 0?((l=e._$Co)!=null?l:e._$Co=[])[i]=o:e._$Cl=o),o!==void 0&&(t=Ae(s,o._$AS(s,t.values),o,i)),t}class Ua{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e;}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var d;const{el:{content:e},parts:i}=this._$AD,o=((d=t==null?void 0:t.creationScope)!=null?d:ue).importNode(e,!0);le.currentNode=o;let r=le.nextNode(),n=0,a=0,l=i[0];for(;l!==void 0;){if(n===l.index){let h;l.type===2?h=new nt(r,r.nextSibling,this,t):l.type===1?h=new l.ctor(r,l.name,l.strings,this,t):l.type===6&&(h=new Ga(r,this,t)),this._$AV.push(h),l=i[++a];}n!==(l==null?void 0:l.index)&&(r=le.nextNode(),n++);}return le.currentNode=ue,o}p(t){let e=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++;}}class nt{get _$AU(){var t,e;return (e=(t=this._$AM)==null?void 0:t._$AU)!=null?e:this._$Cv}constructor(t,e,i,o){var r;this.type=2,this._$AH=T,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cv=(r=o==null?void 0:o.isConnected)!=null?r:!0;}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return e!==void 0&&(t==null?void 0:t.nodeType)===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Ae(this,t,e),Ge(t)?t===T||t==null||t===""?(this._$AH!==T&&this._$AR(),this._$AH=T):t!==this._$AH&&t!==Ie&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Ha(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!==T&&Ge(this._$AH)?this._$AA.nextSibling.data=t:this.T(ue.createTextNode(t)),this._$AH=t;}$(t){var r;const{values:e,_$litType$:i}=t,o=typeof i=="number"?this._$AC(t):(i.el===void 0&&(i.el=Ke.createElement(Ar(i.h,i.h[0]),this.options)),i);if(((r=this._$AH)==null?void 0:r._$AD)===o)this._$AH.p(e);else {const n=new Ua(o,this),a=n.u(this.options);n.p(e),this.T(a),this._$AH=n;}}_$AC(t){let e=Io.get(t.strings);return e===void 0&&Io.set(t.strings,e=new Ke(t)),e}k(t){ms(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const r of t)o===e.length?e.push(i=new nt(this.O(Ye()),this.O(Ye()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o);}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,e);t&&t!==this._$AB;){const o=t.nextSibling;t.remove(),t=o;}}setConnected(t){var e;this._$AM===void 0&&(this._$Cv=t,(e=this._$AP)==null||e.call(this,t));}}class Vt{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,i,o,r){this.type=1,this._$AH=T,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=T;}_$AI(t,e=this,i,o){const r=this.strings;let n=!1;if(r===void 0)t=Ae(this,t,e,0),n=!Ge(t)||t!==this._$AH&&t!==Ie,n&&(this._$AH=t);else {const a=t;let l,d;for(t=r[0],l=0;l<r.length-1;l++)d=Ae(this,a[i+l],e,l),d===Ie&&(d=this._$AH[l]),n||(n=!Ge(d)||d!==this._$AH[l]),d===T?t=T:t!==T&&(t+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d;}n&&!o&&this.j(t);}j(t){t===T?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t!=null?t:"");}}class Wa extends Vt{constructor(){super(...arguments),this.type=3;}j(t){this.element[this.name]=t===T?void 0:t;}}class ja extends Vt{constructor(){super(...arguments),this.type=4;}j(t){this.element.toggleAttribute(this.name,!!t&&t!==T);}}class Ya extends Vt{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5;}_$AI(t,e=this){var n;if((t=(n=Ae(this,t,e,0))!=null?n:T)===Ie)return;const i=this._$AH,o=t===T&&i!==T||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,r=t!==T&&(i===T||o);o&&this.element.removeEventListener(this.name,this,i),r&&this.element.addEventListener(this.name,this,t),this._$AH=t;}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)==null?void 0:e.host)!=null?i:this.element,t):this._$AH.handleEvent(t);}}class Ga{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i;}get _$AU(){return this._$AM._$AU}_$AI(t){Ae(this,t);}}const oi=We.litHtmlPolyfillSupport;var vr;oi==null||oi(Ke,nt),((vr=We.litHtmlVersions)!=null?vr:We.litHtmlVersions=[]).push("3.3.0");const Er=(s,t,e)=>{var r,n;const i=(r=e==null?void 0:e.renderBefore)!=null?r:t;let o=i._$litPart$;if(o===void 0){const a=(n=e==null?void 0:e.renderBefore)!=null?n:null;i._$litPart$=o=new nt(t.insertBefore(Ye(),a),a,void 0,e!=null?e:{});}return o._$AI(s),o};/**
|
|
6138
6138
|
* @license
|
|
6139
6139
|
* Copyright 2017 Google LLC
|
|
6140
6140
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6141
|
-
*/const
|
|
6141
|
+
*/const he=globalThis;class ee extends be{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){var e;const t=super.createRenderRoot();return ((e=this.renderOptions).renderBefore)!=null||(e.renderBefore=t.firstChild),t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Er(e,this.renderRoot,this.renderOptions);}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)==null||t.setConnected(!0);}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)==null||t.setConnected(!1);}render(){return Ie}}var gr;ee._$litElement$=!0,ee.finalized=!0,(gr=he.litElementHydrateSupport)==null||gr.call(he,{LitElement:ee});const ri=he.litElementPolyfillSupport;ri==null||ri({LitElement:ee});var br;((br=he.litElementVersions)!=null?br:he.litElementVersions=[]).push("4.2.0");/**
|
|
6142
6142
|
* @license
|
|
6143
6143
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6144
6144
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -6146,17 +6146,17 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6146
6146
|
* @license
|
|
6147
6147
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6148
6148
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6149
|
-
*/const kr=[],
|
|
6150
|
-
`)}const
|
|
6149
|
+
*/const kr=[],Oi=new Set,fs=new Set;function Tr(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Ka(s){return Tr(customElements.get(s))}function Xa(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Pr(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Or(s){return s.map(t=>t.cssText).join(`
|
|
6150
|
+
`)}const At="vaadin-themable-mixin-style";function Ja(s,t){const e=document.createElement("style");e.id=At,e.textContent=Or(s),t.content.appendChild(e);}function Qa(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)[...s.shadowRoot.querySelectorAll("style")].forEach(e=>e.remove()),_s(s.shadowRoot,t.elementStyles);else {const e=s.shadowRoot.getElementById(At),i=t.prototype._template;e.textContent=i.content.getElementById(At).textContent;}}function Za(s){Oi.forEach(t=>{const e=t.deref();e instanceof s?Qa(e):e||Oi.delete(t);});}function Dr(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(At).textContent=Or(s.getStylesForThis());}fs.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Dr(e);});}function el(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function f(s,t,e={}){t=Xa(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):kr.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&fs.forEach(i=>{if(Pr(s,i)&&Ka(i)){const o=customElements.get(i);el(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Dr(o),Za(o);}});}function Di(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():kr}function tl(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function zr(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=Di().find(o=>o.moduleId===e);i?t.push(...zr(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function il(s){const t=`${s}-default-theme`,e=Di().filter(i=>i.moduleId!==t&&Pr(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...zr(i),...i.styles],includePriority:tl(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:Di().filter(i=>i.moduleId===t)}const E=s=>class extends Sr(s){constructor(){super(),Oi.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&fs.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Tr(this)||Ja(this.getStylesForThis(),e);}static finalizeStyles(e){const i=this.getStylesForThis();return e?[...[e].flat(1/0),...i]:i}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...il(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
6151
6151
|
* @license
|
|
6152
6152
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6153
6153
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6154
|
-
*/const
|
|
6155
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
6154
|
+
*/const sl=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
6155
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ke=(s,...t)=>{sl(`lumo-${s}`,t);};/**
|
|
6156
6156
|
* @license
|
|
6157
6157
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6158
6158
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6159
|
-
*/const
|
|
6159
|
+
*/const ol=p`
|
|
6160
6160
|
:host {
|
|
6161
6161
|
/* Base (background) */
|
|
6162
6162
|
--lumo-base-color: #fff;
|
|
@@ -6241,7 +6241,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6241
6241
|
--lumo-disabled-text-color: GrayText;
|
|
6242
6242
|
}
|
|
6243
6243
|
}
|
|
6244
|
-
`;
|
|
6244
|
+
`;ke("color-props",ol);const rl=p`
|
|
6245
6245
|
[theme~='dark'] {
|
|
6246
6246
|
/* Base (background) */
|
|
6247
6247
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -6359,11 +6359,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6359
6359
|
pre code {
|
|
6360
6360
|
background: transparent;
|
|
6361
6361
|
}
|
|
6362
|
-
`;f("",
|
|
6362
|
+
`;f("",rl,{moduleId:"lumo-color"});/**
|
|
6363
6363
|
* @license
|
|
6364
6364
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6365
6365
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6366
|
-
*/const
|
|
6366
|
+
*/const nl=p`
|
|
6367
6367
|
@font-face {
|
|
6368
6368
|
font-family: 'lumo-icons';
|
|
6369
6369
|
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==)
|
|
@@ -6416,11 +6416,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6416
6416
|
--lumo-icons-upload: '\\ea29';
|
|
6417
6417
|
--lumo-icons-user: '\\ea2a';
|
|
6418
6418
|
}
|
|
6419
|
-
`;
|
|
6419
|
+
`;ke("font-icons",nl);/**
|
|
6420
6420
|
* @license
|
|
6421
6421
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6422
6422
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6423
|
-
*/const
|
|
6423
|
+
*/const al=p`
|
|
6424
6424
|
:host {
|
|
6425
6425
|
--lumo-size-xs: 1.625rem;
|
|
6426
6426
|
--lumo-size-s: 1.875rem;
|
|
@@ -6435,11 +6435,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6435
6435
|
/* For backwards compatibility */
|
|
6436
6436
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
6437
6437
|
}
|
|
6438
|
-
`;
|
|
6438
|
+
`;ke("sizing-props",al);/**
|
|
6439
6439
|
* @license
|
|
6440
6440
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6441
6441
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6442
|
-
*/const
|
|
6442
|
+
*/const ll=p`
|
|
6443
6443
|
:host {
|
|
6444
6444
|
/* Square */
|
|
6445
6445
|
--lumo-space-xs: 0.25rem;
|
|
@@ -6462,11 +6462,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6462
6462
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
6463
6463
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
6464
6464
|
}
|
|
6465
|
-
`;
|
|
6465
|
+
`;ke("spacing-props",ll);/**
|
|
6466
6466
|
* @license
|
|
6467
6467
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6468
6468
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6469
|
-
*/const
|
|
6469
|
+
*/const dl=p`
|
|
6470
6470
|
:host {
|
|
6471
6471
|
/* Border radius */
|
|
6472
6472
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -6566,11 +6566,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6566
6566
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
6567
6567
|
--vaadin-input-field-value-font-weight: 500;
|
|
6568
6568
|
}
|
|
6569
|
-
`;
|
|
6569
|
+
`;ke("style-props",dl);/**
|
|
6570
6570
|
* @license
|
|
6571
6571
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6572
6572
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6573
|
-
*/const
|
|
6573
|
+
*/const hl=p`
|
|
6574
6574
|
:host {
|
|
6575
6575
|
/* prettier-ignore */
|
|
6576
6576
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -6590,7 +6590,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6590
6590
|
--lumo-line-height-s: 1.375;
|
|
6591
6591
|
--lumo-line-height-m: 1.625;
|
|
6592
6592
|
}
|
|
6593
|
-
`,
|
|
6593
|
+
`,cl=p`
|
|
6594
6594
|
body,
|
|
6595
6595
|
:host {
|
|
6596
6596
|
font-family: var(--lumo-font-family);
|
|
@@ -6682,7 +6682,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6682
6682
|
border-left: none;
|
|
6683
6683
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
6684
6684
|
}
|
|
6685
|
-
`;f("",
|
|
6685
|
+
`;f("",cl,{moduleId:"lumo-typography"});ke("typography-props",hl);f("vaadin-checkbox",p`
|
|
6686
6686
|
:host {
|
|
6687
6687
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
6688
6688
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -7002,7 +7002,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7002
7002
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7003
7003
|
Code distributed by Google as part of the polymer project is also
|
|
7004
7004
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7005
|
-
*/let
|
|
7005
|
+
*/let ul=/(url\()([^)]*)(\))/g,pl=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,lt,D;function je(s,t){if(s&&pl.test(s)||s==="//")return s;if(lt===void 0){lt=!1;try{const e=new URL("b","http://a");e.pathname="c%20d",lt=e.href==="http://a/c%20d";}catch(e){}}if(t||(t=document.baseURI||window.location.href),lt)try{return new URL(s,t).href}catch(e){return s}return D||(D=document.implementation.createHTMLDocument("temp"),D.base=D.createElement("base"),D.head.appendChild(D.base),D.anchor=D.createElement("a"),D.body.appendChild(D.anchor)),D.base.href=t,D.anchor.href=s,D.anchor.href||s}function vs(s,t){return s.replace(ul,function(e,i,o,r){return i+"'"+je(o.replace(/["']/g,""),t)+"'"+r})}function gs(s){return s.substring(0,s.lastIndexOf("/")+1)}/**
|
|
7006
7006
|
@license
|
|
7007
7007
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7008
7008
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7010,7 +7010,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7010
7010
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7011
7011
|
Code distributed by Google as part of the polymer project is also
|
|
7012
7012
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7013
|
-
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const
|
|
7013
|
+
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const _l=Mr&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const s=new CSSStyleSheet;s.replaceSync("");const t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[s],t.shadowRoot.adoptedStyleSheets[0]===s}catch(s){return !1}})();let ml=window.Polymer&&window.Polymer.rootPath||gs(document.baseURI||window.location.href),Et=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;let St=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,fl=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,Nr=window.Polymer&&window.Polymer.legacyOptimizations||!1,Lr=window.Polymer&&window.Polymer.legacyWarnings||!1,vl=window.Polymer&&window.Polymer.syncInitialRender||!1,zi=window.Polymer&&window.Polymer.legacyUndefined||!1,gl=window.Polymer&&window.Polymer.orderedComputed||!1,Ao=window.Polymer&&window.Polymer.removeNestedTemplates||!1,bl=window.Polymer&&window.Polymer.fastDomIf||!1,Eo=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;let yl=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
7014
7014
|
@license
|
|
7015
7015
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7016
7016
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7018,7 +7018,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7018
7018
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7019
7019
|
Code distributed by Google as part of the polymer project is also
|
|
7020
7020
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7021
|
-
*/let
|
|
7021
|
+
*/let xl=0;const S=function(s){let t=s.__mixinApplications;t||(t=new WeakMap,s.__mixinApplications=t);let e=xl++;function i(o){let r=o.__mixinSet;if(r&&r[e])return o;let n=t,a=n.get(o);if(!a){a=s(o),n.set(o,a);let l=Object.create(a.__mixinSet||r||null);l[e]=!0,a.__mixinSet=l;}return a}return i};/**
|
|
7022
7022
|
@license
|
|
7023
7023
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7024
7024
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7026,7 +7026,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7026
7026
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7027
7027
|
Code distributed by Google as part of the polymer project is also
|
|
7028
7028
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7029
|
-
*/let
|
|
7029
|
+
*/let bs={},Vr={};function So(s,t){bs[s]=Vr[s.toLowerCase()]=t;}function ko(s){return bs[s]||Vr[s.toLowerCase()]}function Cl(s){s.querySelector("style")&&console.warn("dom-module %s has style outside template",s.id);}class Xe extends HTMLElement{static get observedAttributes(){return ["id"]}static import(t,e){if(t){let i=ko(t);return i&&e?i.querySelector(e):i}return null}attributeChangedCallback(t,e,i,o){e!==i&&this.register();}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=je(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=gs(e);}return this.__assetpath}register(t){if(t=t||this.id,t){if(St&&ko(t)!==void 0)throw So(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,So(t,this),Cl(this);}}}Xe.prototype.modules=bs;customElements.define("dom-module",Xe);/**
|
|
7030
7030
|
@license
|
|
7031
7031
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7032
7032
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7034,7 +7034,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7034
7034
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7035
7035
|
Code distributed by Google as part of the polymer project is also
|
|
7036
7036
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7037
|
-
*/const
|
|
7037
|
+
*/const wl="link[rel=import][type~=css]",Il="include",To="shady-unscoped";function Fr(s){return Xe.import(s)}function Po(s){let t=s.body?s.body:s;const e=vs(t.textContent,s.baseURI),i=document.createElement("style");return i.textContent=e,i}function Al(s){const t=s.trim().split(/\s+/),e=[];for(let i=0;i<t.length;i++)e.push(...El(t[i]));return e}function El(s){const t=Fr(s);if(!t)return console.warn("Could not find style data in module named",s),[];if(t._styles===void 0){const e=[];e.push(...Rr(t));const i=t.querySelector("template");i&&e.push(...Br(i,t.assetpath)),t._styles=e;}return t._styles}function Br(s,t){if(!s._styles){const e=[],i=s.content.querySelectorAll("style");for(let o=0;o<i.length;o++){let r=i[o],n=r.getAttribute(Il);n&&e.push(...Al(n).filter(function(a,l,d){return d.indexOf(a)===l})),t&&(r.textContent=vs(r.textContent,t)),e.push(r);}s._styles=e;}return s._styles}function Sl(s){let t=Fr(s);return t?Rr(t):[]}function Rr(s){const t=[],e=s.querySelectorAll(wl);for(let i=0;i<e.length;i++){let o=e[i];if(o.import){const r=o.import,n=o.hasAttribute(To);if(n&&!r._unscopedStyle){const a=Po(r);a.setAttribute(To,""),r._unscopedStyle=a;}else r._style||(r._style=Po(r));t.push(n?r._unscopedStyle:r._style);}}return t}/**
|
|
7038
7038
|
@license
|
|
7039
7039
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7040
7040
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7050,7 +7050,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7050
7050
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7051
7051
|
Code distributed by Google as part of the polymer project is also
|
|
7052
7052
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7053
|
-
*/function
|
|
7053
|
+
*/function Mi(s){return s.indexOf(".")>=0}function pe(s){let t=s.indexOf(".");return t===-1?s:s.slice(0,t)}function $r(s,t){return s.indexOf(t+".")===0}function Je(s,t){return t.indexOf(s+".")===0}function Qe(s,t,e){return t+e.slice(s.length)}function kl(s,t){return s===t||$r(s,t)||Je(s,t)}function Re(s){if(Array.isArray(s)){let t=[];for(let e=0;e<s.length;e++){let i=s[e].toString().split(".");for(let o=0;o<i.length;o++)t.push(i[o]);}return t.join(".")}else return s}function Hr(s){return Array.isArray(s)?Re(s).split("."):s.toString().split(".")}function O(s,t,e){let i=s,o=Hr(t);for(let r=0;r<o.length;r++){if(!i)return;let n=o[r];i=i[n];}return e&&(e.path=o.join(".")),i}function Oo(s,t,e){let i=s,o=Hr(t),r=o[o.length-1];if(o.length>1){for(let n=0;n<o.length-1;n++){let a=o[n];if(i=i[a],!i)return}i[r]=e;}else i[t]=e;return o.join(".")}/**
|
|
7054
7054
|
@license
|
|
7055
7055
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7056
7056
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7058,7 +7058,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7058
7058
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7059
7059
|
Code distributed by Google as part of the polymer project is also
|
|
7060
7060
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7061
|
-
*/const
|
|
7061
|
+
*/const kt={},Tl=/-[a-z]/g,Pl=/([A-Z])/g;function qr(s){return kt[s]||(kt[s]=s.indexOf("-")<0?s:s.replace(Tl,t=>t[1].toUpperCase()))}function Ft(s){return kt[s]||(kt[s]=s.replace(Pl,"-$1").toLowerCase())}/**
|
|
7062
7062
|
@license
|
|
7063
7063
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7064
7064
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7066,7 +7066,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7066
7066
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7067
7067
|
Code distributed by Google as part of the polymer project is also
|
|
7068
7068
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7069
|
-
*/let
|
|
7069
|
+
*/let Ol=0,Ur=0,ye=[],Dl=0,Ni=!1,Wr=document.createTextNode("");new window.MutationObserver(zl).observe(Wr,{characterData:!0});function zl(){Ni=!1;const s=ye.length;for(let t=0;t<s;t++){let e=ye[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}ye.splice(0,s),Ur+=s;}const Ml={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},jr={run(s){return Ni||(Ni=!0,Wr.textContent=Dl++),ye.push(s),Ol++},cancel(s){const t=s-Ur;if(t>=0){if(!ye[t])throw new Error("invalid async handle: "+s);ye[t]=null;}}};/**
|
|
7070
7070
|
@license
|
|
7071
7071
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7072
7072
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7074,7 +7074,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7074
7074
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7075
7075
|
Code distributed by Google as part of the polymer project is also
|
|
7076
7076
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7077
|
-
*/const
|
|
7077
|
+
*/const Nl=jr,Yr=S(s=>{class t extends s{static createProperties(i){const o=this.prototype;for(let r in i)r in o||o._createPropertyAccessor(r);}static attributeNameForProperty(i){return i.toLowerCase()}static typeForProperty(i){}_createPropertyAccessor(i,o){this._addPropertyToAttributeMap(i),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[i]||(this.__dataHasAccessor[i]=!0,this._definePropertyAccessor(i,o));}_addPropertyToAttributeMap(i){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let o=this.__dataAttributes[i];return o||(o=this.constructor.attributeNameForProperty(i),this.__dataAttributes[o]=i),o}_definePropertyAccessor(i,o){Object.defineProperty(this,i,{get(){return this.__data[i]},set:o?function(){}:function(r){this._setPendingProperty(i,r,!0)&&this._invalidateProperties();}});}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties();}ready(){this.__dataReady=!0,this._flushProperties();}_initializeProperties(){for(let i in this.__dataHasAccessor)this.hasOwnProperty(i)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[i]=this[i],delete this[i]);}_initializeInstanceProperties(i){Object.assign(this,i);}_setProperty(i,o){this._setPendingProperty(i,o)&&this._invalidateProperties();}_getProperty(i){return this.__data[i]}_setPendingProperty(i,o,r){let n=this.__data[i],a=this._shouldPropertyChange(i,o,n);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(i in this.__dataOld)&&(this.__dataOld[i]=n),this.__data[i]=o,this.__dataPending[i]=o),a}_isPropertyPending(i){return !!(this.__dataPending&&this.__dataPending.hasOwnProperty(i))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Nl.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties());}));}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready());}_flushProperties(){this.__dataCounter++;const i=this.__data,o=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(i,o,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(i,o,r)),this.__dataCounter--;}_shouldPropertiesChange(i,o,r){return !!o}_propertiesChanged(i,o,r){}_shouldPropertyChange(i,o,r){return r!==o&&(r===r||o===o)}attributeChangedCallback(i,o,r,n){o!==r&&this._attributeToProperty(i,r),super.attributeChangedCallback&&super.attributeChangedCallback(i,o,r,n);}_attributeToProperty(i,o,r){if(!this.__serializing){const n=this.__dataAttributes,a=n&&n[i]||i;this[a]=this._deserializeValue(o,r||this.constructor.typeForProperty(a));}}_propertyToAttribute(i,o,r){this.__serializing=!0,r=arguments.length<3?this[i]:r,this._valueToNodeAttribute(this,r,o||this.constructor.attributeNameForProperty(i)),this.__serializing=!1;}_valueToNodeAttribute(i,o,r){const n=this._serializeValue(o);(r==="class"||r==="name"||r==="slot")&&(i=P(i)),n===void 0?i.removeAttribute(r):i.setAttribute(r,n===""&&window.trustedTypes?window.trustedTypes.emptyScript:n);}_serializeValue(i){switch(typeof i){case"boolean":return i?"":void 0;default:return i!=null?i.toString():void 0}}_deserializeValue(i,o){switch(o){case Boolean:return i!==null;case Number:return Number(i);default:return i}}}return t});/**
|
|
7078
7078
|
@license
|
|
7079
7079
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7080
7080
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7082,7 +7082,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7082
7082
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7083
7083
|
Code distributed by Google as part of the polymer project is also
|
|
7084
7084
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7085
|
-
*/const Gr={};let
|
|
7085
|
+
*/const Gr={};let dt=HTMLElement.prototype;for(;dt;){let s=Object.getOwnPropertyNames(dt);for(let t=0;t<s.length;t++)Gr[s[t]]=!0;dt=Object.getPrototypeOf(dt);}const Ll=window.trustedTypes?s=>trustedTypes.isHTML(s)||trustedTypes.isScript(s)||trustedTypes.isScriptURL(s):()=>!1;function Vl(s,t){if(!Gr[t]){let e=s[t];e!==void 0&&(s.__data?s._setPendingProperty(t,e):(s.__dataProto?s.hasOwnProperty(JSCompiler_renameProperty("__dataProto",s))||(s.__dataProto=Object.create(s.__dataProto)):s.__dataProto={},s.__dataProto[t]=e));}}const Fl=S(s=>{const t=Yr(s);class e extends t{static createPropertiesForAttributes(){let o=this.observedAttributes;for(let r=0;r<o.length;r++)this.prototype._createPropertyAccessor(qr(o[r]));}static attributeNameForProperty(o){return Ft(o)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties();}_initializeProtoProperties(o){for(let r in o)this._setProperty(r,o[r]);}_ensureAttribute(o,r){const n=this;n.hasAttribute(o)||this._valueToNodeAttribute(n,r,o);}_serializeValue(o){switch(typeof o){case"object":if(o instanceof Date)return o.toString();if(o){if(Ll(o))return o;try{return JSON.stringify(o)}catch(r){return ""}}default:return super._serializeValue(o)}}_deserializeValue(o,r){let n;switch(r){case Object:try{n=JSON.parse(o);}catch(a){n=o;}break;case Array:try{n=JSON.parse(o);}catch(a){n=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${o}`);}break;case Date:n=isNaN(o)?String(o):Number(o),n=new Date(n);break;default:n=super._deserializeValue(o,r);break}return n}_definePropertyAccessor(o,r){Vl(this,o),super._definePropertyAccessor(o,r);}_hasAccessor(o){return this.__dataHasAccessor&&this.__dataHasAccessor[o]}_isPropertyPending(o){return !!(this.__dataPending&&o in this.__dataPending)}}return e});/**
|
|
7086
7086
|
@license
|
|
7087
7087
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7088
7088
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7090,7 +7090,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7090
7090
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7091
7091
|
Code distributed by Google as part of the polymer project is also
|
|
7092
7092
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7093
|
-
*/const
|
|
7093
|
+
*/const Bl={"dom-if":!0,"dom-repeat":!0};let Do=!1,zo=!1;function Rl(){if(!Do){Do=!0;const s=document.createElement("textarea");s.placeholder="a",zo=s.placeholder===s.textContent;}return zo}function $l(s){Rl()&&s.localName==="textarea"&&s.placeholder&&s.placeholder===s.textContent&&(s.textContent=null);}const Hl=(()=>{const s=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:t=>t});return (t,e,i)=>{const o=e.getAttribute(i);if(s&&i.startsWith("on-")){t.setAttribute(i,s.createScript(o,i));return}t.setAttribute(i,o);}})();function ql(s){let t=s.getAttribute("is");if(t&&Bl[t]){let e=s;for(e.removeAttribute("is"),s=e.ownerDocument.createElement(t),e.parentNode.replaceChild(s,e),s.appendChild(e);e.attributes.length;){const{name:i}=e.attributes[0];Hl(s,e,i),e.removeAttribute(i);}}return s}function Kr(s,t){let e=t.parentInfo&&Kr(s,t.parentInfo);if(e){for(let i=e.firstChild,o=0;i;i=i.nextSibling)if(t.parentIndex===o++)return i}else return s}function Ul(s,t,e,i){i.id&&(t[i.id]=e);}function Wl(s,t,e){if(e.events&&e.events.length)for(let i=0,o=e.events,r;i<o.length&&(r=o[i]);i++)s._addMethodEventListenerToNode(t,r.name,r.value,s);}function jl(s,t,e,i){e.templateInfo&&(t._templateInfo=e.templateInfo,t._parentTemplateInfo=i);}function Yl(s,t,e){return s=s._methodHost||s,function(o){s[e]?s[e](o,o.detail):console.warn("listener method `"+e+"` not defined");}}const Gl=S(s=>{class t extends s{static _parseTemplate(i,o){if(!i._templateInfo){let r=i._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!o,r.stripWhiteSpace=o&&o.stripWhiteSpace||i.hasAttribute&&i.hasAttribute("strip-whitespace"),this._parseTemplateContent(i,r,{parent:null});}return i._templateInfo}static _parseTemplateContent(i,o,r){return this._parseTemplateNode(i.content,o,r)}static _parseTemplateNode(i,o,r){let n=!1,a=i;return a.localName=="template"&&!a.hasAttribute("preserve-content")?n=this._parseTemplateNestedTemplate(a,o,r)||n:a.localName==="slot"&&(o.hasInsertionPoint=!0),$l(a),a.firstChild&&this._parseTemplateChildNodes(a,o,r),a.hasAttributes&&a.hasAttributes()&&(n=this._parseTemplateNodeAttributes(a,o,r)||n),n||r.noted}static _parseTemplateChildNodes(i,o,r){if(!(i.localName==="script"||i.localName==="style"))for(let n=i.firstChild,a=0,l;n;n=l){if(n.localName=="template"&&(n=ql(n)),l=n.nextSibling,n.nodeType===Node.TEXT_NODE){let h=l;for(;h&&h.nodeType===Node.TEXT_NODE;)n.textContent+=h.textContent,l=h.nextSibling,i.removeChild(h),h=l;if(o.stripWhiteSpace&&!n.textContent.trim()){i.removeChild(n);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(n,o,d)&&(d.infoIndex=o.nodeInfoList.push(d)-1),n.parentNode&&a++;}}static _parseTemplateNestedTemplate(i,o,r){let n=i,a=this._parseTemplate(n,o);return (a.content=n.content.ownerDocument.createDocumentFragment()).appendChild(n.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(i,o,r){let n=!1,a=Array.from(i.attributes);for(let l=a.length-1,d;d=a[l];l--)n=this._parseTemplateNodeAttribute(i,o,r,d.name,d.value)||n;return n}static _parseTemplateNodeAttribute(i,o,r,n,a){return n.slice(0,3)==="on-"?(i.removeAttribute(n),r.events=r.events||[],r.events.push({name:n.slice(3),value:a}),!0):n==="id"?(r.id=a,!0):!1}static _contentForTemplate(i){let o=i._templateInfo;return o&&o.content||i.content}_stampTemplate(i,o){i&&!i.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(i),o=o||this.constructor._parseTemplate(i);let r=o.nodeInfoList,n=o.content||i.content,a=document.importNode(n,!0);a.__noInsertionPoint=!o.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,h=r.length,c;d<h&&(c=r[d]);d++){let u=l[d]=Kr(a,c);Ul(this,a.$,u,c),jl(this,u,c,o),Wl(this,u,c);}return a=a,a}_addMethodEventListenerToNode(i,o,r,n){n=n||i;let a=Yl(n,o,r);return this._addEventListenerToNode(i,o,a),a}_addEventListenerToNode(i,o,r){i.addEventListener(o,r);}_removeEventListenerFromNode(i,o,r){i.removeEventListener(o,r);}}return t});/**
|
|
7094
7094
|
* @fileoverview
|
|
7095
7095
|
* @suppress {checkPrototypalTypes}
|
|
7096
7096
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -7100,7 +7100,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7100
7100
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
7101
7101
|
* Google as part of the polymer project is also subject to an additional IP
|
|
7102
7102
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7103
|
-
*/let Qe=0;const Ze=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Yl=/[A-Z]/;function ri(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function Re(s,t,e,i,o,r){if(t){let n=!1;const a=Qe++;for(let l in e){let d=o?ue(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||bs(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Gl(s,t,e,i,o,r,n,a){let l=!1,d=n?ue(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||bs(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function bs(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Xe(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Kl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Qe++;for(let d in t)t[d]&&(r&&Gl(s,r,a,d,e,i,o)||o&&Xl(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Xl(s,t,e){let i=ue(t);if(i!==t){let o=Vt(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Jl(s,t,e,i,o,r){let a=(r?ue(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function Ql(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Je(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function Zl(s,t,e,i,o){let r=s.__data[t];At&&(r=At(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function ed(s,t,e,i){let o=s[g.COMPUTE];if(o)if(fl){Qe++;const r=id(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;Re(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const td=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?ue(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Qe&&(!o||bs(s,l.trigger))&&(l.info.lastRun=Qe,td(l.info,e,i));}};function id(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=sd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function sd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Ni(s,t,e,i,o);if(r===Ze)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function od(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Xe(r,t)?(o=Je(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Xe(n,t)&&(o=Je(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ni(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),dd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Vt(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,rd(s,t,a,h,l);}}function rd(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:nd,info:n,trigger:l});}}}function nd(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Je(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==Ze&&ad(s,a,l,d,h);}}function ad(s,t,e,i,o){if(o=ld(t,o,e,i),At&&(o=At(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function ld(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function dd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function hd(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];cd(n,d),ud(n,s,d);}n.__dataHost=s;}}function cd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function ud(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){Ql(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Ni(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===Ze?Ze:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const pd=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",_d="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",md="(?:'(?:[^'\\\\]|\\\\.)*')",fd='(?:"(?:[^"\\\\]|\\\\.)*")',vd="(?:"+md+"|"+fd+")",Vo="(?:("+Zr+"|"+_d+"|"+vd+")\\s*)",gd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",bd="(?:\\(\\s*(?:"+gd+"?)\\)\\s*)",yd="("+Zr+"\\s*"+bd+"?)",xd="(\\[\\[|{{)\\s*",Cd="(?:]]|}})",wd="(?:(!)\\s*)?",Id=xd+wd+yd+Cd,Fo=new RegExp(Id,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function ai(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:pd};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Ad(o,i)}else return i}return null}function Ad(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=ue(t),e.structured=zi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};Di&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),Di&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Ne(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function Ed(s){return s[0].toUpperCase()+s.substring(1)}const ys=b(s=>{const t=jl(Ll(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1;}_registerHost(){if(Le.length){let o=Le[Le.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ri(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ri(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||ue(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return od(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&zi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;ed(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),Re(this,this[g.REFLECT],r,n,a),Re(this,this[g.OBSERVE],r,n,a),l&&Kl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&Re(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{Re(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Be(o),r=Be(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Be(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Ne(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Ne(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Ne(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Ne(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Ne(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Be(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+Ed(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=ai(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Ni,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Jl,info:{eventName:Vt(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:Zl,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=ai(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ri(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:E}=o[d];if(!E)if(_){const k=Xe(c,r),I=Ro(a,n,k?r:c);m={path:k?r:c,value:I,base:k?O(a,c):I};}else m=u?Ro(a,n,c):a[c];if(Di&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return Ze;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Le.push(this);let n=super._stampTemplate(o,r);if(Le.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,hd(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ni(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Yl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=Ur(a)),ni(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(vl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let E=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ni(this,r,n,"property","_host_"+m,E);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let E=ai(c),k=[];if(E){let{args:I,methodName:w}=E;for(let re=0;re<I.length;re++){let M=I[re];M.literal||k.push(M);}let F=r.dynamicFns;(F&&F[w]||E.static)&&(k.push(w),E.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:E,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Ni(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&zi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Le=[];/**
|
|
7103
|
+
*/let Ze=0;const et=[],g={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Xr="__computeInfo",Kl=/[A-Z]/;function ni(s,t,e){let i=s[t];if(!i)i=s[t]={};else if(!s.hasOwnProperty(t)&&(i=s[t]=Object.create(s[t]),e))for(let o in i){let r=i[o],n=i[o]=Array(r.length);for(let a=0;a<r.length;a++)n[a]=r[a];}return i}function $e(s,t,e,i,o,r){if(t){let n=!1;const a=Ze++;for(let l in e){let d=o?pe(l):l,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==a)&&(!o||ys(l,_.trigger))&&(_.info&&(_.info.lastRun=a),_.fn(s,l,e,i,_.info,o,r),n=!0);}return n}return !1}function Xl(s,t,e,i,o,r,n,a){let l=!1,d=n?pe(i):i,h=t[d];if(h)for(let c=0,u=h.length,_;c<u&&(_=h[c]);c++)(!_.info||_.info.lastRun!==e)&&(!n||ys(i,_.trigger))&&(_.info&&(_.info.lastRun=e),_.fn(s,i,o,r,_.info,n,a),l=!0);return l}function ys(s,t){if(t){let e=t.name;return e==s||!!(t.structured&&$r(e,s))||!!(t.wildcard&&Je(e,s))}else return !0}function Mo(s,t,e,i,o){let r=typeof o.method=="string"?s[o.method]:o.method,n=o.property;r?r.call(s,s.__data[n],i[n]):o.dynamicFn||console.warn("observer method `"+o.method+"` not defined");}function Jl(s,t,e,i,o){let r=s[g.NOTIFY],n,a=Ze++;for(let d in t)t[d]&&(r&&Xl(s,r,a,d,e,i,o)||o&&Ql(s,d,e))&&(n=!0);let l;n&&(l=s.__dataHost)&&l._invalidateProperties&&l._invalidateProperties();}function Ql(s,t,e){let i=pe(t);if(i!==t){let o=Ft(i)+"-changed";return Jr(s,o,e[t],t),!0}return !1}function Jr(s,t,e,i){let o={value:e,queueProperty:!0};i&&(o.path=i),P(s).dispatchEvent(new CustomEvent(t,{detail:o}));}function Zl(s,t,e,i,o,r){let a=(r?pe(t):t)!=t?t:null,l=a?O(s,a):s.__data[t];a&&l===void 0&&(l=e[t]),Jr(s,o.eventName,l,a);}function ed(s,t,e,i,o){let r,n=s.detail,a=n&&n.path;a?(i=Qe(e,i,a),r=n&&n.value):r=s.currentTarget[e],r=o?!r:r,(!t[g.READ_ONLY]||!t[g.READ_ONLY][i])&&t._setPendingPropertyOrPath(i,r,!0,!!a)&&(!n||!n.queueProperty)&&t._invalidateProperties();}function td(s,t,e,i,o){let r=s.__data[t];Et&&(r=Et(r,o.attrName,"attribute",s)),s._propertyToAttribute(t,o.attrName,r);}function id(s,t,e,i){let o=s[g.COMPUTE];if(o)if(gl){Ze++;const r=od(s),n=[];for(let l in t)No(l,o,n,r,i);let a;for(;a=n.shift();)Qr(s,"",t,e,a)&&No(a.methodInfo,o,n,r,i);Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),s.__dataPending=null;}else {let r=t;for(;$e(s,o,r,e,i);)Object.assign(e,s.__dataOld),Object.assign(t,s.__dataPending),r=s.__dataPending,s.__dataPending=null;}}const sd=(s,t,e)=>{let i=0,o=t.length-1,r=-1;for(;i<=o;){const n=i+o>>1,a=e.get(t[n].methodInfo)-e.get(s.methodInfo);if(a<0)i=n+1;else if(a>0)o=n-1;else {r=n;break}}r<0&&(r=o+1),t.splice(r,0,s);},No=(s,t,e,i,o)=>{const r=o?pe(s):s,n=t[r];if(n)for(let a=0;a<n.length;a++){const l=n[a];l.info.lastRun!==Ze&&(!o||ys(s,l.trigger))&&(l.info.lastRun=Ze,sd(l.info,e,i));}};function od(s){let t=s.constructor.__orderedComputedDeps;if(!t){t=new Map;const e=s[g.COMPUTE];let{counts:i,ready:o,total:r}=rd(s),n;for(;n=o.shift();){t.set(n,t.size);const a=e[n];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--i[d]===0&&o.push(d);});}r!==0&&console.warn(`Computed graph for ${s.localName} incomplete; circular?`),s.constructor.__orderedComputedDeps=t;}return t}function rd(s){const t=s[Xr],e={},i=s[g.COMPUTE],o=[];let r=0;for(let n in t){const a=t[n];r+=e[n]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0);}for(let n in i)t[n]||o.push(n);return {counts:e,ready:o,total:r}}function Qr(s,t,e,i,o){let r=Li(s,t,e,i,o);if(r===et)return !1;let n=o.methodInfo;return s.__dataHasAccessor&&s.__dataHasAccessor[n]?s._setPendingProperty(n,r,!0):(s[n]=r,!1)}function nd(s,t,e){let i=s.__dataLinkedPaths;if(i){let o;for(let r in i){let n=i[r];Je(r,t)?(o=Qe(r,n,t),s._setPendingPropertyOrPath(o,e,!0,!0)):Je(n,t)&&(o=Qe(n,r,t),s._setPendingPropertyOrPath(o,e,!0,!0));}}}function ai(s,t,e,i,o,r,n){e.bindings=e.bindings||[];let a={kind:i,target:o,parts:r,literal:n,isCompound:r.length!==1};if(e.bindings.push(a),cd(a)){let{event:d,negate:h}=a.parts[0];a.listenerEvent=d||Ft(o)+"-changed",a.listenerNegate=h;}let l=t.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let h=a.parts[d];h.compoundIndex=d,ad(s,t,a,h,l);}}function ad(s,t,e,i,o){if(!i.literal)if(e.kind==="attribute"&&e.target[0]==="-")console.warn("Cannot set attribute "+e.target+' because "-" is not a valid attribute starting character');else {let r=i.dependencies,n={index:o,binding:e,part:i,evaluator:s};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=en(l),l.wildcard=!0),s._addTemplatePropertyEffect(t,l.rootProperty,{fn:ld,info:n,trigger:l});}}}function ld(s,t,e,i,o,r,n){let a=n[o.index],l=o.binding,d=o.part;if(r&&d.source&&t.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let h=e[t];t=Qe(d.source,l.target,t),a._setPendingPropertyOrPath(t,h,!1,!0)&&s._enqueueClient(a);}else {let h=o.evaluator._evaluateBinding(s,d,t,e,i,r);h!==et&&dd(s,a,l,d,h);}}function dd(s,t,e,i,o){if(o=hd(t,o,e,i),Et&&(o=Et(o,e.target,e.kind,t)),e.kind=="attribute")s._valueToNodeAttribute(t,o,e.target);else {let r=e.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[r]?(!t[g.READ_ONLY]||!t[g.READ_ONLY][r])&&t._setPendingProperty(r,o)&&s._enqueueClient(t):s._setUnmanagedPropertyToNode(t,r,o);}}function hd(s,t,e,i){if(e.isCompound){let o=s.__dataCompoundStorage[e.target];o[i.compoundIndex]=t,t=o.join("");}return e.kind!=="attribute"&&(e.target==="textContent"||e.target==="value"&&(s.localName==="input"||s.localName==="textarea"))&&(t=t==null?"":t),t}function cd(s){return !!s.target&&s.kind!="attribute"&&s.kind!="text"&&!s.isCompound&&s.parts[0].mode==="{"}function ud(s,t){let{nodeList:e,nodeInfoList:i}=t;if(i.length)for(let o=0;o<i.length;o++){let r=i[o],n=e[o],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];pd(n,d),_d(n,s,d);}n.__dataHost=s;}}function pd(s,t){if(t.isCompound){let e=s.__dataCompoundStorage||(s.__dataCompoundStorage={}),i=t.parts,o=new Array(i.length);for(let n=0;n<i.length;n++)o[n]=i[n].literal;let r=t.target;e[r]=o,t.literal&&t.kind=="property"&&(r==="className"&&(s=P(s)),s[r]=t.literal);}}function _d(s,t,e){if(e.listenerEvent){let i=e.parts[0];s.addEventListener(e.listenerEvent,function(o){ed(o,t,e.target,i.source,i.negate);});}}function Lo(s,t,e,i,o,r){r=t.static||r&&(typeof r!="object"||r[t.methodName]);let n={methodName:t.methodName,args:t.args,methodInfo:o,dynamicFn:r};for(let a=0,l;a<t.args.length&&(l=t.args[a]);a++)l.literal||s._addPropertyEffect(l.rootProperty,e,{fn:i,info:n,trigger:l});return r&&s._addPropertyEffect(t.methodName,e,{fn:i,info:n}),n}function Li(s,t,e,i,o){let r=s._methodHost||s,n=r[o.methodName];if(n){let a=s._marshalArgs(o.args,t,e);return a===et?et:n.apply(r,a)}else o.dynamicFn||console.warn("method `"+o.methodName+"` not defined");}const md=[],Zr="(?:[a-zA-Z_$][\\w.:$\\-*]*)",fd="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",vd="(?:'(?:[^'\\\\]|\\\\.)*')",gd='(?:"(?:[^"\\\\]|\\\\.)*")',bd="(?:"+vd+"|"+gd+")",Vo="(?:("+Zr+"|"+fd+"|"+bd+")\\s*)",yd="(?:"+Vo+"(?:,\\s*"+Vo+")*)",xd="(?:\\(\\s*(?:"+yd+"?)\\)\\s*)",Cd="("+Zr+"\\s*"+xd+"?)",wd="(\\[\\[|{{)\\s*",Id="(?:]]|}})",Ad="(?:(!)\\s*)?",Ed=wd+Ad+Cd+Id,Fo=new RegExp(Ed,"g");function Bo(s){let t="";for(let e=0;e<s.length;e++){let i=s[e].literal;t+=i||"";}return t}function li(s){let t=s.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let i={methodName:t[1],static:!0,args:md};if(t[2].trim()){let o=t[2].replace(/\\,/g,",").split(",");return Sd(o,i)}else return i}return null}function Sd(s,t){return t.args=s.map(function(e){let i=en(e);return i.literal||(t.static=!1),i},this),t}function en(s){let t=s.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),e={name:t,value:"",literal:!1},i=t[0];switch(i==="-"&&(i=t[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':e.value=t.slice(1,-1),e.literal=!0;break;case"#":e.value=Number(t),e.literal=!0;break}return e.literal||(e.rootProperty=pe(t),e.structured=Mi(t),e.structured&&(e.wildcard=t.slice(-2)==".*",e.wildcard&&(e.name=t.slice(0,-2)))),e}function Ro(s,t,e){let i=O(s,e);return i===void 0&&(i=t[e]),i}function tn(s,t,e,i){const o={indexSplices:i};zi&&!s._overrideLegacyUndefined&&(t.splices=o),s.notifyPath(e+".splices",o),s.notifyPath(e+".length",t.length),zi&&!s._overrideLegacyUndefined&&(o.indexSplices=[]);}function Le(s,t,e,i,o,r){tn(s,t,e,[{index:i,addedCount:o,removed:r,object:t,type:"splice"}]);}function kd(s){return s[0].toUpperCase()+s.substring(1)}const xs=S(s=>{const t=Gl(Fl(s));class e extends t{constructor(){super(),this.__isPropertyEffectsClient=!0;}get PROPERTY_EFFECT_TYPES(){return g}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1;}_registerHost(){if(Ve.length){let o=Ve[Ve.length-1];o._enqueueClient(this),this.__dataHost=o;}}_initializeProtoProperties(o){this.__data=Object.create(o),this.__dataPending=Object.create(o),this.__dataOld={};}_initializeInstanceProperties(o){let r=this[g.READ_ONLY];for(let n in o)(!r||!r[n])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[n]=this.__dataPending[n]=o[n]);}_addPropertyEffect(o,r,n){this._createPropertyAccessor(o,r==g.READ_ONLY);let a=ni(this,r,!0)[o];a||(a=this[r][o]=[]),a.push(n);}_removePropertyEffect(o,r,n){let a=ni(this,r,!0)[o],l=a.indexOf(n);l>=0&&a.splice(l,1);}_hasPropertyEffect(o,r){let n=this[r];return !!(n&&n[o])}_hasReadOnlyEffect(o){return this._hasPropertyEffect(o,g.READ_ONLY)}_hasNotifyEffect(o){return this._hasPropertyEffect(o,g.NOTIFY)}_hasReflectEffect(o){return this._hasPropertyEffect(o,g.REFLECT)}_hasComputedEffect(o){return this._hasPropertyEffect(o,g.COMPUTE)}_setPendingPropertyOrPath(o,r,n,a){if(a||pe(Array.isArray(o)?o[0]:o)!==o){if(!a){let l=O(this,o);if(o=Oo(this,o,r),!o||!super._shouldPropertyChange(o,r,l))return !1}if(this.__dataHasPaths=!0,this._setPendingProperty(o,r,n))return nd(this,o,r),!0}else {if(this.__dataHasAccessor&&this.__dataHasAccessor[o])return this._setPendingProperty(o,r,n);this[o]=r;}return !1}_setUnmanagedPropertyToNode(o,r,n){(n!==o[r]||typeof n=="object")&&(r==="className"&&(o=P(o)),o[r]=n);}_setPendingProperty(o,r,n){let a=this.__dataHasPaths&&Mi(o),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(o,r,l[o])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),o in this.__dataOld||(this.__dataOld[o]=this.__data[o]),a?this.__dataTemp[o]=r:this.__data[o]=r,this.__dataPending[o]=r,(a||this[g.NOTIFY]&&this[g.NOTIFY][o])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[o]=n),!0):!1}_setProperty(o,r){this._setPendingProperty(o,r,!0)&&this._invalidateProperties();}_invalidateProperties(){this.__dataReady&&this._flushProperties();}_enqueueClient(o){this.__dataPendingClients=this.__dataPendingClients||[],o!==this&&this.__dataPendingClients.push(o);}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0);}__enableOrFlushClients(){let o=this.__dataPendingClients;if(o){this.__dataPendingClients=null;for(let r=0;r<o.length;r++){let n=o[r];n.__dataEnabled?n.__dataPending&&n._flushProperties():n._enableProperties();}}}_readyClients(){this.__enableOrFlushClients();}setProperties(o,r){for(let n in o)(r||!this[g.READ_ONLY]||!this[g.READ_ONLY][n])&&this._setPendingPropertyOrPath(n,o[n],!0);this._invalidateProperties();}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties();}_propertiesChanged(o,r,n){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;id(this,r,n,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,n,a),this._flushClients(),$e(this,this[g.REFLECT],r,n,a),$e(this,this[g.OBSERVE],r,n,a),l&&Jl(this,l,r,n,a),this.__dataCounter==1&&(this.__dataTemp={});}_propagatePropertyChanges(o,r,n){this[g.PROPAGATE]&&$e(this,this[g.PROPAGATE],o,r,n),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,o,r,n);}_runEffectsForTemplate(o,r,n,a){const l=(d,h)=>{$e(this,o.propertyEffects,d,n,h,o.nodeList);for(let c=o.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,n,h);};o.runEffects?o.runEffects(l,r,a):l(r,a);}linkPaths(o,r){o=Re(o),r=Re(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[o]=r;}unlinkPaths(o){o=Re(o),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[o];}notifySplices(o,r){let n={path:""},a=O(this,o,n);tn(this,a,n.path,r);}get(o,r){return O(r||this,o)}set(o,r,n){n?Oo(n,o,r):(!this[g.READ_ONLY]||!this[g.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,r,!0)&&this._invalidateProperties();}push(o,...r){let n={path:""},a=O(this,o,n),l=a.length,d=a.push(...r);return r.length&&Le(this,a,n.path,l,r.length,[]),d}pop(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.pop();return a&&Le(this,n,r.path,n.length,0,[l]),l}splice(o,r,n,...a){let l={path:""},d=O(this,o,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let h;return arguments.length===2?h=d.splice(r):h=d.splice(r,n,...a),(a.length||h.length)&&Le(this,d,l.path,r,a.length,h),h}shift(o){let r={path:""},n=O(this,o,r),a=!!n.length,l=n.shift();return a&&Le(this,n,r.path,0,0,[l]),l}unshift(o,...r){let n={path:""},a=O(this,o,n),l=a.unshift(...r);return r.length&&Le(this,a,n.path,0,r.length,[]),l}notifyPath(o,r){let n;if(arguments.length==1){let a={path:""};r=O(this,o,a),n=a.path;}else Array.isArray(o)?n=Re(o):n=o;this._setPendingPropertyOrPath(n,r,!0,!0)&&this._invalidateProperties();}_createReadOnlyProperty(o,r){this._addPropertyEffect(o,g.READ_ONLY),r&&(this["_set"+kd(o)]=function(n){this._setProperty(o,n);});}_createPropertyObserver(o,r,n){let a={property:o,method:r,dynamicFn:!!n};this._addPropertyEffect(o,g.OBSERVE,{fn:Mo,info:a,trigger:{name:o}}),n&&this._addPropertyEffect(r,g.OBSERVE,{fn:Mo,info:a,trigger:{name:r}});}_createMethodObserver(o,r){let n=li(o);if(!n)throw new Error("Malformed observer expression '"+o+"'");Lo(this,n,g.OBSERVE,Li,null,r);}_createNotifyingProperty(o){this._addPropertyEffect(o,g.NOTIFY,{fn:Zl,info:{eventName:Ft(o)+"-changed",property:o}});}_createReflectedProperty(o){let r=this.constructor.attributeNameForProperty(o);r[0]==="-"?console.warn("Property "+o+" cannot be reflected to attribute "+r+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(o,g.REFLECT,{fn:td,info:{attrName:r}});}_createComputedProperty(o,r,n){let a=li(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Lo(this,a,g.COMPUTE,Qr,o,n);ni(this,Xr)[o]=l;}_marshalArgs(o,r,n){const a=this.__data,l=[];for(let d=0,h=o.length;d<h;d++){let{name:c,structured:u,wildcard:_,value:m,literal:A}=o[d];if(!A)if(_){const k=Je(c,r),w=Ro(a,n,k?r:c);m={path:k?r:c,value:w,base:k?O(a,c):w};}else m=u?Ro(a,n,c):a[c];if(zi&&!this._overrideLegacyUndefined&&m===void 0&&o.length>1)return et;l[d]=m;}return l}static addPropertyEffect(o,r,n){this.prototype._addPropertyEffect(o,r,n);}static createPropertyObserver(o,r,n){this.prototype._createPropertyObserver(o,r,n);}static createMethodObserver(o,r){this.prototype._createMethodObserver(o,r);}static createNotifyingProperty(o){this.prototype._createNotifyingProperty(o);}static createReadOnlyProperty(o,r){this.prototype._createReadOnlyProperty(o,r);}static createReflectedProperty(o){this.prototype._createReflectedProperty(o);}static createComputedProperty(o,r,n){this.prototype._createComputedProperty(o,r,n);}static bindTemplate(o){return this.prototype._bindTemplate(o)}_bindTemplate(o,r){let n=this.constructor._parseTemplate(o),a=this.__preBoundTemplateInfo==n;if(!a)for(let l in n.propertyEffects)this._createPropertyAccessor(l);if(r)if(n=Object.create(n),n.wasPreBound=a,!this.__templateInfo)this.__templateInfo=n;else {const l=o._parentTemplateInfo||this.__templateInfo,d=l.lastChild;n.parent=l,l.lastChild=n,n.previousSibling=d,d?d.nextSibling=n:l.firstChild=n;}else this.__preBoundTemplateInfo=n;return n}static _addTemplatePropertyEffect(o,r,n){let a=o.hostProps=o.hostProps||{};a[r]=!0;let l=o.propertyEffects=o.propertyEffects||{};(l[r]=l[r]||[]).push(n);}_stampTemplate(o,r){r=r||this._bindTemplate(o,!0),Ve.push(this);let n=super._stampTemplate(o,r);if(Ve.pop(),r.nodeList=n.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=n.firstChild;l;l=l.nextSibling)a.push(l);}return n.templateInfo=r,ud(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),n}_removeBoundDom(o){const r=o.templateInfo,{previousSibling:n,nextSibling:a,parent:l}=r;n?n.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=n:l&&(l.lastChild=n),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let h=0;h<d.length;h++){let c=d[h];P(P(c).parentNode).removeChild(c);}}static _parseTemplateNode(o,r,n){let a=t._parseTemplateNode.call(this,o,r,n);if(o.nodeType===Node.TEXT_NODE){let l=this._parseBindings(o.textContent,r);l&&(o.textContent=Bo(l)||" ",ai(this,r,n,"text","textContent",l),a=!0);}return a}static _parseTemplateNodeAttribute(o,r,n,a,l){let d=this._parseBindings(l,r);if(d){let h=a,c="property";Kl.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let u=Bo(d);return u&&c=="attribute"&&(a=="class"&&o.hasAttribute("class")&&(u+=" "+o.getAttribute(a)),o.setAttribute(a,u)),c=="attribute"&&h=="disable-upgrade$"&&o.setAttribute(a,""),o.localName==="input"&&h==="value"&&o.setAttribute(h,""),o.removeAttribute(h),c==="property"&&(a=qr(a)),ai(this,r,n,c,a,d,u),!0}else return t._parseTemplateNodeAttribute.call(this,o,r,n,a,l)}static _parseTemplateNestedTemplate(o,r,n){let a=t._parseTemplateNestedTemplate.call(this,o,r,n);const l=o.parentNode,d=n.templateInfo,h=l.localName==="dom-if",c=l.localName==="dom-repeat";Ao&&(h||c)&&(l.removeChild(o),n=n.parentInfo,n.templateInfo=d,n.noted=!0,a=!1);let u=d.hostProps;if(bl&&h)u&&(r.hostProps=Object.assign(r.hostProps||{},u),Ao||(n.parentInfo.noted=!0));else {let _="{";for(let m in u){let A=[{mode:_,source:m,dependencies:[m],hostProp:!0}];ai(this,r,n,"property","_host_"+m,A);}}return a}static _parseBindings(o,r){let n=[],a=0,l;for(;(l=Fo.exec(o))!==null;){l.index>a&&n.push({literal:o.slice(a,l.index)});let d=l[1][0],h=!!l[2],c=l[3].trim(),u=!1,_="",m=-1;d=="{"&&(m=c.indexOf("::"))>0&&(_=c.substring(m+2),c=c.substring(0,m),u=!0);let A=li(c),k=[];if(A){let{args:w,methodName:C}=A;for(let ne=0;ne<w.length;ne++){let M=w[ne];M.literal||k.push(M);}let B=r.dynamicFns;(B&&B[C]||A.static)&&(k.push(C),A.dynamicFn=!0);}else k.push(c);n.push({source:c,mode:d,negate:h,customEvent:u,signature:A,dependencies:k,event:_}),a=Fo.lastIndex;}if(a&&a<o.length){let d=o.substring(a);d&&n.push({literal:d});}return n.length?n:null}static _evaluateBinding(o,r,n,a,l,d){let h;return r.signature?h=Li(o,n,a,l,r.signature):n!=r.source?h=O(o,r.source):d&&Mi(n)?h=O(o,n):h=o.__data[n],r.negate&&(h=!h),h}}return e}),Ve=[];/**
|
|
7104
7104
|
@license
|
|
7105
7105
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7106
7106
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7116,7 +7116,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7116
7116
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7117
7117
|
Code distributed by Google as part of the polymer project is also
|
|
7118
7118
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7119
|
-
*/function
|
|
7119
|
+
*/function Td(s){const t={};for(let e in s){const i=s[e];t[e]=typeof i=="function"?{type:i}:i;}return t}const Pd=S(s=>{const t=Yr(s);function e(r){const n=Object.getPrototypeOf(r);return n.prototype instanceof o?n:null}function i(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let n=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(n=Td(a));}r.__ownProperties=n;}return r.__ownProperties}class o extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const n=this._properties;this.__observedAttributes=n?Object.keys(n).map(a=>this.prototype._addPropertyToAttributeMap(a)):[];}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const n=e(this);n&&n.finalize(),this.__finalized=!0,this._finalizeClass();}}static _finalizeClass(){const n=i(this);n&&this.createProperties(n);}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const n=e(this);this.__properties=Object.assign({},n&&n._properties,i(this));}return this.__properties}static typeForProperty(n){const a=this._properties[n];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties();}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties();}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback();}}return o});/**
|
|
7120
7120
|
* @fileoverview
|
|
7121
7121
|
* @suppress {checkPrototypalTypes}
|
|
7122
7122
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -7126,7 +7126,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7126
7126
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
7127
7127
|
* Google as part of the polymer project is also subject to an additional IP
|
|
7128
7128
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7129
|
-
*/const
|
|
7129
|
+
*/const Od="3.5.2",$o=window.ShadyCSS&&window.ShadyCSS.cssBuild,Dd=S(s=>{const t=Pd(xs(s));function e(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let h in d){let c=d[h];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[h]=c);}}return l.__propertyDefaults}function i(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function o(l,d,h,c){h.computed&&(h.readOnly=!0),h.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,h.computed,c)),h.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!h.computed):h.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),h.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):h.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),h.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):h.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),h.observer&&l._createPropertyObserver(d,h.observer,c[h.observer]),l._addPropertyToAttributeMap(d);}function r(l,d,h,c){if(!$o){const u=d.content.querySelectorAll("style"),_=Br(d),m=Sl(h),A=d.content.firstElementChild;for(let w=0;w<m.length;w++){let C=m[w];C.textContent=l._processStyleText(C.textContent,c),d.content.insertBefore(C,A);}let k=0;for(let w=0;w<_.length;w++){let C=_[w],B=u[k];B!==C?(C=C.cloneNode(!0),B.parentNode.insertBefore(C,B)):k++,C.textContent=l._processStyleText(C.textContent,c);}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,h),yl&&$o&&_l){const u=d.content.querySelectorAll("style");if(u){let _="";Array.from(u).forEach(m=>{_+=m.textContent,m.parentNode.removeChild(m);}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(_);}}}function n(l){let d=null;if(l&&(!St||fl)&&(d=Xe.import(l,"template"),St&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends t{static get polymerElementVersion(){return Od}static _finalizeClass(){t._finalizeClass.call(this);const d=i(this);d&&this.createObservers(d,this._properties),this._prepareTemplate();}static _prepareTemplate(){let d=this.template;d&&(typeof d=="string"?(console.error("template getter must return HTMLTemplateElement"),d=null):Nr||(d=d.cloneNode(!0))),this.prototype._template=d;}static createProperties(d){for(let h in d)o(this.prototype,h,d[h],d);}static createObservers(d,h){const c=this.prototype;for(let u=0;u<d.length;u++)c._createMethodObserver(d[u],h);}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let d=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;typeof d=="function"&&(d=d()),this._template=d!==void 0?d:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&n(this.is)||Object.getPrototypeOf(this.prototype).constructor.template;}return this._template}static set template(d){this._template=d;}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const d=this.importMeta;if(d)this._importPath=gs(d.url);else {const h=Xe.import(this.is);this._importPath=h&&h.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath;}}return this._importPath}constructor(){super();}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=ml,this.importPath=this.constructor.importPath;let d=e(this.constructor);if(d)for(let h in d){let c=d[h];if(this._canApplyPropertyDefault(h)){let u=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(h)?this._setPendingProperty(h,u,!0):this[h]=u;}}}_canApplyPropertyDefault(d){return !this.hasOwnProperty(d)}static _processStyleText(d,h){return vs(d,h)}static _finalizeTemplate(d){const h=this.prototype._template;if(h&&!h.__polymerFinalized){h.__polymerFinalized=!0;const c=this.importPath,u=c?je(c):"";r(this,h,d,u),this.prototype._bindTemplate(h);}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback();}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready();}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients();}_attachDom(d){const h=P(this);if(h.attachShadow)return d?(h.shadowRoot||(h.attachShadow({mode:"open",shadyUpgradeFragment:d}),h.shadowRoot.appendChild(d),this.constructor._styleSheet&&(h.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),vl&&window.ShadyDOM&&window.ShadyDOM.flushInitial(h.shadowRoot),h.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(d){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,d);}resolveUrl(d,h){return !h&&this.importPath&&(h=je(this.importPath)),je(d,h)}static _parseTemplateContent(d,h,c){return h.dynamicFns=h.dynamicFns||this._properties,t._parseTemplateContent.call(this,d,h,c)}static _addTemplatePropertyEffect(d,h,c){return Lr&&!(h in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${h}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,d,h,c)}}return a});/**
|
|
7130
7130
|
@license
|
|
7131
7131
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7132
7132
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7134,7 +7134,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7134
7134
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7135
7135
|
Code distributed by Google as part of the polymer project is also
|
|
7136
7136
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7137
|
-
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function
|
|
7137
|
+
*/const Ho=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:s=>s});class sn{constructor(t,e){rn(t,e);const i=e.reduce((o,r,n)=>o+on(r)+t[n+1],t[0]);this.value=i.toString();}toString(){return this.value}}function on(s){if(s instanceof sn)return s.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${s}`)}function zd(s){if(s instanceof HTMLTemplateElement)return s.innerHTML;if(s instanceof sn)return on(s);throw new Error(`non-template value passed to Polymer's html function: ${s}`)}const b=function(t,...e){rn(t,e);const i=document.createElement("template");let o=e.reduce((r,n,a)=>r+zd(n)+t[a+1],t[0]);return Ho&&(o=Ho.createHTML(o)),i.innerHTML=o,i},rn=(s,t)=>{if(!Array.isArray(s)||!Array.isArray(s.raw)||t.length!==s.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
7138
7138
|
@license
|
|
7139
7139
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7140
7140
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7142,7 +7142,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7142
7142
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7143
7143
|
Code distributed by Google as part of the polymer project is also
|
|
7144
7144
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7145
|
-
*/const
|
|
7145
|
+
*/const y=Dd(HTMLElement),Md=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,yt=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Nd(){function s(){return !0}return nn(s)}function Ld(){try{return Vd()?!0:Fd()?yt?!Bd():!Nd():!1}catch(s){return !1}}function Vd(){return localStorage.getItem("vaadin.developmentmode.force")}function Fd(){return ["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function Bd(){return !!(yt&&Object.keys(yt).map(t=>yt[t]).filter(t=>t.productionMode).length>0)}function nn(s,t){if(typeof s!="function")return;const e=Md.exec(s.toString());if(e)try{s=new Function(e[1]);}catch(i){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",i);}return s(t)}window.Vaadin=window.Vaadin||{};const qo=function(s,t){if(window.Vaadin.developmentMode)return nn(s,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=Ld());function Rd(){/*! vaadin-dev-mode:start
|
|
7146
7146
|
(function () {
|
|
7147
7147
|
'use strict';
|
|
7148
7148
|
|
|
@@ -7620,7 +7620,7 @@ try {
|
|
|
7620
7620
|
|
|
7621
7621
|
}());
|
|
7622
7622
|
|
|
7623
|
-
vaadin-dev-mode:end **/}const an=function(){if(typeof
|
|
7623
|
+
vaadin-dev-mode:end **/}const an=function(){if(typeof qo=="function")return qo(Rd)};/**
|
|
7624
7624
|
* @license
|
|
7625
7625
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7626
7626
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7628,7 +7628,7 @@ try {
|
|
|
7628
7628
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7629
7629
|
* Code distributed by Google as part of the polymer project is also
|
|
7630
7630
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7631
|
-
*/let
|
|
7631
|
+
*/let Uo=0,ln=0;const xe=[];let Vi=!1;function $d(){Vi=!1;const s=xe.length;for(let t=0;t<s;t++){const e=xe[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}xe.splice(0,s),ln+=s;}const te={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},tt={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},dn={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},Tt={run(s){Vi||(Vi=!0,queueMicrotask(()=>$d())),xe.push(s);const t=Uo;return Uo+=1,t},cancel(s){const t=s-ln;if(t>=0){if(!xe[t])throw new Error(`invalid async handle: ${s}`);xe[t]=null;}}};/**
|
|
7632
7632
|
@license
|
|
7633
7633
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7634
7634
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7636,35 +7636,35 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7636
7636
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7637
7637
|
Code distributed by Google as part of the polymer project is also
|
|
7638
7638
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7639
|
-
*/const
|
|
7639
|
+
*/const it=new Set;let z=class Fi{static debounce(t,e,i){return t instanceof Fi?t._cancelAsync():t=new Fi,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,it.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),it.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}};function hn(s){it.add(s);}function Hd(){const s=!!it.size;return it.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const He=()=>{let s;do s=Hd();while(s)};/**
|
|
7640
7640
|
* @license
|
|
7641
7641
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7642
7642
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7643
|
-
*/const U=[];function
|
|
7643
|
+
*/const U=[];function Bi(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function Ri(){return document.documentElement.getAttribute("dir")}function qd(){const s=Ri();U.forEach(t=>{Bi(t,s);});}const Ud=new MutationObserver(qd);Ud.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const $=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),Bi(this,Ri(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=Ri(),n=o===r&&U.indexOf(this)===-1,a=!o&&i&&U.indexOf(this)===-1;n||a?(this.__subscribe(),Bi(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=U.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){U.includes(this)||U.push(this);}__unsubscribe(){U.includes(this)&&U.splice(U.indexOf(this),1);}};/**
|
|
7644
7644
|
* @license
|
|
7645
7645
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7646
7646
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7647
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
7647
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let di;const Wo=new Set,X=s=>class extends $(s){static finalize(){super.finalize();const{is:e}=this;e&&!Wo.has(e)&&(window.Vaadin.registrations.push(this),Wo.add(e),window.Vaadin.developmentModeCallback&&(di=z.debounce(di,dn,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),hn(di)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
7648
7648
|
* @license
|
|
7649
7649
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7650
7650
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7651
|
-
*/function
|
|
7651
|
+
*/function Wd(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function cn(s){const t=[];let e;return s.localName==="slot"?e=s.assignedElements():(t.push(s),e=[...s.children]),e.forEach(i=>t.push(...cn(i))),t}function Cs(s){return s?new Set(s.split(" ")):new Set}function Bt(s){return s?[...s].join(" "):""}function un(s,t,e){const i=Cs(s.getAttribute(t));i.add(e),s.setAttribute(t,Bt(i));}function jd(s,t,e){const i=Cs(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Bt(i));}function Yd(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
7652
7652
|
* @license
|
|
7653
7653
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7654
7654
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7655
|
-
*/let
|
|
7655
|
+
*/let ws=class{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}};/**
|
|
7656
7656
|
* @license
|
|
7657
7657
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7658
7658
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7659
|
-
*/let
|
|
7659
|
+
*/let Gd=0;function Rt(){return Gd++}/**
|
|
7660
7660
|
* @license
|
|
7661
7661
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7662
7662
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7663
|
-
*/let
|
|
7663
|
+
*/let G=class extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${Rt()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new ws(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!Yd(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}};/**
|
|
7664
7664
|
* @license
|
|
7665
7665
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7666
7666
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7667
|
-
*/let
|
|
7667
|
+
*/let _e=class extends G{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(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}}));}};/**
|
|
7668
7668
|
@license
|
|
7669
7669
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7670
7670
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7672,107 +7672,107 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7672
7672
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7673
7673
|
Code distributed by Google as part of the polymer project is also
|
|
7674
7674
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7675
|
-
*/const
|
|
7675
|
+
*/const Kd=s=>s,pn=typeof document.head.style.touchAction=="string",$i="__polymerGestures",hi="__polymerGesturesHandled",Hi="__polymerGesturesTouchAction",jo=25,Yo=5,Xd=2,Jd=["mousedown","mousemove","mouseup","click"],Qd=[0,1,4,2],Zd=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(s){return !1}}();function Is(s){return Jd.indexOf(s)>-1}(function(){try{const s=Object.defineProperty({},"passive",{get(){}});window.addEventListener("test",null,s),window.removeEventListener("test",null,s);}catch(s){}})();function th(s){}const ih=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),sh={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function ce(s){const t=s.type;if(!Is(t))return !1;if(t==="mousemove"){let i=s.buttons===void 0?1:s.buttons;return s instanceof window.MouseEvent&&!Zd&&(i=Qd[s.which]||0),!!(i&1)}return (s.button===void 0?0:s.button)===0}function oh(s){if(s.type==="click"){if(s.detail===0)return !0;const t=ie(s);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return !0;const e=t.getBoundingClientRect(),i=s.pageX,o=s.pageY;return !(i>=e.left&&i<=e.right&&o>=e.top&&o<=e.bottom)}return !1}const j={touch:{x:0,y:0,id:-1,scrollDecided:!1}};function rh(s){let t="auto";const e=mn(s);for(let i=0,o;i<e.length;i++)if(o=e[i],o[Hi]){t=o[Hi];break}return t}function _n(s,t,e){s.movefn=t,s.upfn=e,document.addEventListener("mousemove",t),document.addEventListener("mouseup",e);}function Ce(s){document.removeEventListener("mousemove",s.movefn),document.removeEventListener("mouseup",s.upfn),s.movefn=null,s.upfn=null;}const mn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:s=>s.composedPath&&s.composedPath()||[],As={},de=[];function nh(s,t){let e=document.elementFromPoint(s,t),i=e;for(;i&&i.shadowRoot&&!window.ShadyDOM;){const o=i;if(i=i.shadowRoot.elementFromPoint(s,t),o===i)break;i&&(e=i);}return e}function ie(s){const t=mn(s);return t.length>0?t[0]:s.target}function ah(s){const t=s.type,i=s.currentTarget[$i];if(!i)return;const o=i[t];if(!o)return;if(!s[hi]&&(s[hi]={},t.startsWith("touch"))){const n=s.changedTouches[0];if(t==="touchstart"&&s.touches.length===1&&(j.touch.id=n.identifier),j.touch.id!==n.identifier)return;pn||(t==="touchstart"||t==="touchmove")&&lh(s);}const r=s[hi];if(!r.skip){for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(s.type)>-1&&a.reset&&a.reset();for(let n=0,a;n<de.length;n++)a=de[n],o[a.name]&&!r[a.name]&&(r[a.name]=!0,a[t](s));}}function lh(s){const t=s.changedTouches[0],e=s.type;if(e==="touchstart")j.touch.x=t.clientX,j.touch.y=t.clientY,j.touch.scrollDecided=!1;else if(e==="touchmove"){if(j.touch.scrollDecided)return;j.touch.scrollDecided=!0;const i=rh(s);let o=!1;const r=Math.abs(j.touch.x-t.clientX),n=Math.abs(j.touch.y-t.clientY);s.cancelable&&(i==="none"?o=!0:i==="pan-x"?o=n>r:i==="pan-y"&&(o=r>n)),o?s.preventDefault():Pt("track");}}function R(s,t,e){return As[t]?(dh(s,t,e),!0):!1}function dh(s,t,e){const i=As[t],o=i.deps,r=i.name;let n=s[$i];n||(s[$i]=n={});for(let a=0,l,d;a<o.length;a++)l=o[a],!(ih&&Is(l)&&l!=="click")&&(d=n[l],d||(n[l]=d={_count:0}),d._count===0&&s.addEventListener(l,ah,th()),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);s.addEventListener(t,e),i.touchAction&&fn(s,i.touchAction);}function Es(s){de.push(s),s.emits.forEach(t=>{As[t]=s;});}function hh(s){for(let t=0,e;t<de.length;t++){e=de[t];for(let i=0,o;i<e.emits.length;i++)if(o=e.emits[i],o===s)return e}return null}function fn(s,t){pn&&s instanceof HTMLElement&&Tt.run(()=>{s.style.touchAction=t;}),s[Hi]=t;}function Ss(s,t,e){const i=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=e,Kd(s).dispatchEvent(i),i.defaultPrevented){const o=e.preventer||e.sourceEvent;o&&o.preventDefault&&o.preventDefault();}}function Pt(s){const t=hh(s);t.info&&(t.info.prevent=!0);}Es({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{ce(r)||(Fe("up",t,r),Ce(e.info));},o=r=>{ce(r)&&Fe("up",t,r),Ce(e.info);};_n(this.info,i,o),Fe("down",t,s);},touchstart(s){Fe("down",ie(s),s.changedTouches[0],s);},touchend(s){Fe("up",ie(s),s.changedTouches[0],s);}});function Fe(s,t,e,i){t&&Ss(t,s,{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:i,prevent(o){return Pt(o)}});}Es({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(s){this.moves.length>Xd&&this.moves.shift(),this.moves.push(s);},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Ce(this.info);},mousedown(s){if(!ce(s))return;const t=ie(s),e=this,i=r=>{const n=r.clientX,a=r.clientY;Go(e.info,n,a)&&(e.info.state=e.info.started?r.type==="mouseup"?"end":"track":"start",e.info.state==="start"&&Pt("tap"),e.info.addMove({x:n,y:a}),ce(r)||(e.info.state="end",Ce(e.info)),t&&ci(e.info,t,r),e.info.started=!0);},o=r=>{e.info.started&&i(r),Ce(e.info);};_n(this.info,i,o),this.info.x=s.clientX,this.info.y=s.clientY;},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchmove(s){const t=ie(s),e=s.changedTouches[0],i=e.clientX,o=e.clientY;Go(this.info,i,o)&&(this.info.state==="start"&&Pt("tap"),this.info.addMove({x:i,y:o}),ci(this.info,t,e),this.info.state="track",this.info.started=!0);},touchend(s){const t=ie(s),e=s.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:e.clientX,y:e.clientY}),ci(this.info,t,e));}});function Go(s,t,e){if(s.prevent)return !1;if(s.started)return !0;const i=Math.abs(s.x-t),o=Math.abs(s.y-e);return i>=Yo||o>=Yo}function ci(s,t,e){if(!t)return;const i=s.moves[s.moves.length-2],o=s.moves[s.moves.length-1],r=o.x-s.x,n=o.y-s.y;let a,l=0;i&&(a=o.x-i.x,l=o.y-i.y),Ss(t,"track",{state:s.state,x:e.clientX,y:e.clientY,dx:r,dy:n,ddx:a,ddy:l,sourceEvent:e,hover(){return nh(e.clientX,e.clientY)}});}Es({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1;},mousedown(s){ce(s)&&(this.info.x=s.clientX,this.info.y=s.clientY);},click(s){ce(s)&&Ko(this.info,s);},touchstart(s){const t=s.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY;},touchend(s){Ko(this.info,s.changedTouches[0],s);}});function Ko(s,t,e){const i=Math.abs(t.clientX-s.x),o=Math.abs(t.clientY-s.y),r=ie(e||t);!r||sh[r.localName]&&r.hasAttribute("disabled")||(isNaN(i)||isNaN(o)||i<=jo&&o<=jo||oh(t))&&(s.prevent||Ss(r,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:e}));}/**
|
|
7676
7676
|
* @license
|
|
7677
7677
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7678
7678
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7679
|
-
*/const
|
|
7679
|
+
*/const Te=S(s=>class extends s{static get properties(){return {disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(e){this._setAriaDisabled(e);}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled");}click(){this.disabled||super.click();}});/**
|
|
7680
7680
|
* @license
|
|
7681
7681
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7682
7682
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7683
|
-
*/const
|
|
7683
|
+
*/const me=S(s=>class extends s{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e);}),this.addEventListener("keyup",e=>{this._onKeyUp(e);});}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
7684
7684
|
* @license
|
|
7685
7685
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7686
7686
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7687
|
-
*/const
|
|
7687
|
+
*/const ks=s=>class extends Te(me(s)){get _activeKeys(){return [" "]}ready(){super.ready(),R(this,"down",e=>{this._shouldSetActive(e)&&this._setActive(!0);}),R(this,"up",()=>{this._setActive(!1);});}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1);}_shouldSetActive(e){return !this.disabled}_onKeyDown(e){super._onKeyDown(e),this._shouldSetActive(e)&&this._activeKeys.includes(e.key)&&(this._setActive(!0),document.addEventListener("keyup",i=>{this._activeKeys.includes(i.key)&&this._setActive(!1);},{once:!0}));}_setActive(e){this.toggleAttribute("active",e);}};/**
|
|
7688
7688
|
* @license
|
|
7689
7689
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7690
7690
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7691
|
-
*/let
|
|
7691
|
+
*/let Ts=!1;window.addEventListener("keydown",()=>{Ts=!0;},{capture:!0});window.addEventListener("mousedown",()=>{Ts=!1;},{capture:!0});function qi(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function $t(){return Ts}function vn(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function ch(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function uh(s,t){const e=[];for(;s.length>0&&t.length>0;)ch(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function Ui(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=Ui(s.slice(0,e)),o=Ui(s.slice(e));return uh(i,o)}function Wi(s){return s.offsetParent===null&&s.clientWidth===0&&s.clientHeight===0?!0:vn(s)}function Ps(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function Os(s){return s.getRootNode().activeElement===s}function ph(s){if(!Ps(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function gn(s,t){if(s.nodeType!==Node.ELEMENT_NODE||vn(s))return !1;const e=s,i=ph(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=gn(n,t)||o;}),o}function _h(s){const t=[];return gn(s,t)?Ui(t):t}/**
|
|
7692
7692
|
* @license
|
|
7693
7693
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7694
7694
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7695
|
-
*/const
|
|
7695
|
+
*/const fe=S(s=>class extends s{get _keyboardActive(){return $t()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0);}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1);}),super.ready();}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1);}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive);}_shouldSetFocus(e){return !0}_shouldRemoveFocus(e){return !0}});/**
|
|
7696
7696
|
* @license
|
|
7697
7697
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7698
7698
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7699
|
-
*/const bn=s=>class extends
|
|
7699
|
+
*/const bn=s=>class extends Te(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):i&&(this.tabindex=this._lastTabIndex);}_tabindexChanged(e){this.disabled&&e!==-1&&(this._lastTabIndex=e,this.tabindex=-1);}};/**
|
|
7700
7700
|
* @license
|
|
7701
7701
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7702
7702
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7703
|
-
*/const
|
|
7703
|
+
*/const Ht=S(s=>class extends fe(bn(s)){static get properties(){return {autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this);}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","");});}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus();}blur(){this.focusElement&&this.focusElement.blur();}click(){this.focusElement&&!this.disabled&&this.focusElement.click();}_focusElementChanged(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0);}});/**
|
|
7704
7704
|
* @license
|
|
7705
7705
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7706
7706
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7707
|
-
*/const
|
|
7707
|
+
*/const Ds=S(s=>class extends s{static get properties(){return {stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return []}static get delegateProps(){return []}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver();}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated());}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`);}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`);}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
7708
7708
|
* @license
|
|
7709
7709
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7710
7710
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7711
|
-
*/const
|
|
7711
|
+
*/const at=S(s=>class extends s{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 this.value!=null&&this.value!==""}get _inputElementValueProperty(){return "value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e);}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue="";}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange);}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange);}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"");}_inputElementChanged(e,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_hasInputValueChanged(e,i){(e||i)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"));}__onInput(e){this._setHasInputValue(e),this._onInput(e);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}_setHasInputValue(e){const i=e.composedPath()[0];this._hasInputValue=i.value.length>0;}});/**
|
|
7712
7712
|
* @license
|
|
7713
7713
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7714
7714
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7715
|
-
*/const
|
|
7715
|
+
*/const mh=S(s=>class extends Ds(Te(at(s))){static get properties(){return {checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return [...super.delegateProps,"checked"]}_onChange(e){const i=e.target;this._toggleChecked(i.checked);}_toggleChecked(e){this.checked=e;}});/**
|
|
7716
7716
|
* @license
|
|
7717
7717
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7718
7718
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7719
|
-
*/const
|
|
7719
|
+
*/const ui=new Map;function zs(s){return ui.has(s)||ui.set(s,new WeakMap),ui.get(s)}function yn(s,t){s&&s.removeAttribute(t);}function xn(s,t){if(!s||!t)return;const e=zs(t);if(e.has(s))return;const i=Cs(s.getAttribute(t));e.set(s,new Set(i));}function fh(s,t){if(!s||!t)return;const e=zs(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):un(s,t,Bt(i)),e.delete(s);}function xt(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=zs(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):xn(s,t),yn(s,t)),jd(s,t,o);const l=i||Bt(a);l&&un(s,t,l);}function vh(s,t){xn(s,t),yn(s,t);}/**
|
|
7720
7720
|
* @license
|
|
7721
7721
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7722
7722
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7723
|
-
*/let
|
|
7723
|
+
*/let gh=class{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label);}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(vh(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(fh(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){xt(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){xt(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){xt(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")));}};/**
|
|
7724
7724
|
* @license
|
|
7725
7725
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7726
7726
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7727
|
-
*/const
|
|
7727
|
+
*/const oe=S(s=>typeof s.prototype.addController=="function"?s:class extends s{constructor(){super(),this.__controllers=new Set;}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected();});}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected();});}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected();}removeController(e){this.__controllers.delete(e);}});/**
|
|
7728
7728
|
* @license
|
|
7729
7729
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7730
7730
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7731
|
-
*/const
|
|
7731
|
+
*/const V=document.createElement("div");V.style.position="fixed";V.style.clip="rect(0px, 0px, 0px, 0px)";V.setAttribute("aria-live","polite");document.body.appendChild(V);let ht;function bh(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(V.removeAttribute("aria-live"),V.removeAttribute("role"),ht=z.debounce(ht,tt,()=>{V.setAttribute("role","alert");})):(ht&&ht.cancel(),V.removeAttribute("role"),V.setAttribute("aria-live",e)),V.textContent="",setTimeout(()=>{V.textContent=s;},i);}/**
|
|
7732
7732
|
* @license
|
|
7733
7733
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7734
7734
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7735
|
-
*/let
|
|
7735
|
+
*/let Ms=class extends G{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}};/**
|
|
7736
7736
|
* @license
|
|
7737
7737
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7738
7738
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7739
|
-
*/let
|
|
7739
|
+
*/let yh=class extends Ms{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&bh(e,{mode:"assertive"})),super.updateDefaultNode(t);}};/**
|
|
7740
7740
|
* @license
|
|
7741
7741
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7742
7742
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7743
|
-
*/let
|
|
7743
|
+
*/let xh=class extends Ms{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
7744
7744
|
* @license
|
|
7745
7745
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7746
7746
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7747
|
-
*/let Cn=class extends
|
|
7747
|
+
*/let Cn=class extends Ms{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}};/**
|
|
7748
7748
|
* @license
|
|
7749
7749
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7750
7750
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7751
|
-
*/const
|
|
7751
|
+
*/const Ch=S(s=>class extends oe(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Cn(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
|
|
7752
7752
|
* @license
|
|
7753
7753
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7754
7754
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7755
|
-
*/const
|
|
7755
|
+
*/const Ns=S(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}});/**
|
|
7756
7756
|
* @license
|
|
7757
7757
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7758
7758
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7759
|
-
*/const
|
|
7759
|
+
*/const qt=s=>class extends Ns(Ch(oe(s))){static get properties(){return {ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return ["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new gh(this),this._helperController=new xh(this),this._errorController=new yh(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController);}__helperChanged(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
7760
7760
|
* @license
|
|
7761
7761
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7762
7762
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7763
|
-
*/let Ut=class extends
|
|
7763
|
+
*/let Ut=class extends G{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}};/**
|
|
7764
7764
|
* @license
|
|
7765
7765
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7766
7766
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7767
|
-
*/let
|
|
7767
|
+
*/let Wt=class{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.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);}};/**
|
|
7768
7768
|
* @license
|
|
7769
7769
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7770
7770
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7771
|
-
*/const
|
|
7771
|
+
*/const wh=s=>class extends qt(mh(Ht(ks(s)))){static get properties(){return {indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get observers(){return ["__readonlyChanged(readonly, inputElement)"]}static get delegateProps(){return [...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return [...super.delegateAttrs,"name","invalid","required"]}constructor(){super(),this._setType("checkbox"),this._boundOnInputClick=this._onInputClick.bind(this),this.value="on";}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(this.inputElement,this._labelController)),this._createMethodObserver("_checkedChanged(checked)");}_shouldSetActive(e){return this.readonly||e.target.localName==="a"||e.target===this._helperNode||e.target===this._errorNode?!1:super._shouldSetActive(e)}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("click",this._boundOnInputClick);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("click",this._boundOnInputClick);}_onInputClick(e){this.readonly&&e.preventDefault();}__readonlyChanged(e,i){i&&(e?i.setAttribute("aria-readonly","true"):i.removeAttribute("aria-readonly"));}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e);}checkValidity(){return !this.required||!!this.checked}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_checkedChanged(e){(e||this.__oldChecked)&&this.validate(),this.__oldChecked=e;}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}_onRequiredIndicatorClick(){this._labelNode.click();}};/**
|
|
7772
7772
|
* @license
|
|
7773
7773
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7774
7774
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7775
|
-
*/const
|
|
7775
|
+
*/const Ih=p`
|
|
7776
7776
|
:host {
|
|
7777
7777
|
display: inline-block;
|
|
7778
7778
|
}
|
|
@@ -7864,7 +7864,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7864
7864
|
* @license
|
|
7865
7865
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7866
7866
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7867
|
-
*/f("vaadin-checkbox",
|
|
7867
|
+
*/f("vaadin-checkbox",Ih,{moduleId:"vaadin-checkbox-styles"});class Ah extends wh(X(E(y))){static get is(){return "vaadin-checkbox"}static get template(){return b`
|
|
7868
7868
|
<div class="vaadin-checkbox-container">
|
|
7869
7869
|
<div part="checkbox" aria-hidden="true"></div>
|
|
7870
7870
|
<slot name="input"></slot>
|
|
@@ -7880,7 +7880,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7880
7880
|
</div>
|
|
7881
7881
|
</div>
|
|
7882
7882
|
<slot name="tooltip"></slot>
|
|
7883
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
7883
|
+
`}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Ah);/**
|
|
7884
7884
|
* @license
|
|
7885
7885
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7886
7886
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -7944,7 +7944,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7944
7944
|
* @license
|
|
7945
7945
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7946
7946
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7947
|
-
*/const
|
|
7947
|
+
*/const Ls=p`
|
|
7948
7948
|
[part='label'] {
|
|
7949
7949
|
align-self: flex-start;
|
|
7950
7950
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -8056,7 +8056,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8056
8056
|
margin-left: 0;
|
|
8057
8057
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
8058
8058
|
}
|
|
8059
|
-
`;f("",
|
|
8059
|
+
`;f("",Ls,{moduleId:"lumo-required-field"});const Eh=p`
|
|
8060
8060
|
:host {
|
|
8061
8061
|
color: var(--lumo-body-text-color);
|
|
8062
8062
|
font-size: var(--lumo-font-size-m);
|
|
@@ -8099,15 +8099,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8099
8099
|
color: var(--lumo-secondary-text-color);
|
|
8100
8100
|
}
|
|
8101
8101
|
}
|
|
8102
|
-
`;f("vaadin-checkbox-group",[
|
|
8102
|
+
`;f("vaadin-checkbox-group",[Ls,wn,Eh],{moduleId:"lumo-checkbox-group"});/**
|
|
8103
8103
|
* @license
|
|
8104
8104
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8105
8105
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8106
|
-
*/const
|
|
8106
|
+
*/const Sh=s=>class extends qt(fe(Te(s))){static get properties(){return {value:{type:Array,value:()=>[],notify:!0,sync:!0,observer:"__valueChanged"},readonly:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__readonlyChanged"}}}constructor(){super(),this.__registerCheckbox=this.__registerCheckbox.bind(this),this.__unregisterCheckbox=this.__unregisterCheckbox.bind(this),this.__onCheckboxCheckedChanged=this.__onCheckboxCheckedChanged.bind(this),this._tooltipController=new _e(this),this._tooltipController.addEventListener("tooltip-changed",e=>{const i=e.detail.node;if(i&&i.isConnected){const o=this.__checkboxes.map(r=>r.inputElement);this._tooltipController.setAriaTarget(o);}else this._tooltipController.setAriaTarget([]);});}get __checkboxes(){return this.__filterCheckboxes([...this.children])}ready(){super.ready(),this.ariaTarget=this,this.setAttribute("role","group");const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new ws(e,({addedNodes:i,removedNodes:o})=>{const r=this.__filterCheckboxes(i),n=this.__filterCheckboxes(o);r.forEach(this.__registerCheckbox),n.forEach(this.__unregisterCheckbox);const a=this.__checkboxes.map(l=>l.inputElement);this._tooltipController.setAriaTarget(a),this.__warnOfCheckboxesWithoutValue(r);}),this.addController(this._tooltipController);}checkValidity(){return !this.required||!!(this.value&&this.value.length>0)}__filterCheckboxes(e){return e.filter(i=>i.nodeType===Node.ELEMENT_NODE&&i.localName==="vaadin-checkbox")}__warnOfCheckboxesWithoutValue(e){e.some(o=>{const{value:r}=o;return !o.hasAttribute("value")&&(!r||r==="on")})&&console.warn("Please provide the value attribute to all the checkboxes inside the checkbox group.");}__registerCheckbox(e){e.addEventListener("checked-changed",this.__onCheckboxCheckedChanged),this.disabled&&(e.disabled=!0),this.readonly&&(e.readonly=!0),e.checked?this.__addCheckboxToValue(e.value):this.value&&this.value.includes(e.value)&&(e.checked=!0);}__unregisterCheckbox(e){e.removeEventListener("checked-changed",this.__onCheckboxCheckedChanged),e.checked&&this.__removeCheckboxFromValue(e.value);}_disabledChanged(e,i){super._disabledChanged(e,i),!(!e&&i===void 0)&&i!==e&&this.__checkboxes.forEach(o=>{o.disabled=e;});}__addCheckboxToValue(e){this.value?this.value.includes(e)||(this.value=[...this.value,e]):this.value=[e];}__removeCheckboxFromValue(e){this.value&&this.value.includes(e)&&(this.value=this.value.filter(i=>i!==e));}__onCheckboxCheckedChanged(e){const i=e.target;i.checked?this.__addCheckboxToValue(i.value):this.__removeCheckboxFromValue(i.value);}__valueChanged(e,i){e&&e.length===0&&i===void 0||(this.toggleAttribute("has-value",e&&e.length>0),this.__checkboxes.forEach(o=>{o.checked=e&&e.includes(o.value);}),i!==void 0&&this.validate());}__readonlyChanged(e,i){(e||i)&&this.__checkboxes.forEach(o=>{o.readonly=e;});}_shouldRemoveFocus(e){return !this.contains(e.relatedTarget)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}};/**
|
|
8107
8107
|
* @license
|
|
8108
8108
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8109
8109
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8110
|
-
*/const
|
|
8110
|
+
*/const kh=p`
|
|
8111
8111
|
:host {
|
|
8112
8112
|
display: inline-flex;
|
|
8113
8113
|
}
|
|
@@ -8140,7 +8140,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8140
8140
|
* @license
|
|
8141
8141
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8142
8142
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8143
|
-
*/f("vaadin-checkbox-group",
|
|
8143
|
+
*/f("vaadin-checkbox-group",kh,{moduleId:"vaadin-checkbox-group-styles"});class Th extends Sh(X(E(y))){static get is(){return "vaadin-checkbox-group"}static get template(){return b`
|
|
8144
8144
|
<div class="vaadin-group-field-container">
|
|
8145
8145
|
<div part="label">
|
|
8146
8146
|
<slot name="label"></slot>
|
|
@@ -8161,11 +8161,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8161
8161
|
</div>
|
|
8162
8162
|
|
|
8163
8163
|
<slot name="tooltip"></slot>
|
|
8164
|
-
`}}
|
|
8164
|
+
`}}x(Th);/**
|
|
8165
8165
|
* @license
|
|
8166
8166
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
8167
8167
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8168
|
-
*/const
|
|
8168
|
+
*/const Vs=p`
|
|
8169
8169
|
:host {
|
|
8170
8170
|
top: var(--lumo-space-m);
|
|
8171
8171
|
right: var(--lumo-space-m);
|
|
@@ -8230,11 +8230,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8230
8230
|
opacity: 1;
|
|
8231
8231
|
}
|
|
8232
8232
|
}
|
|
8233
|
-
`;f("",
|
|
8233
|
+
`;f("",Vs,{moduleId:"lumo-overlay"});/**
|
|
8234
8234
|
* @license
|
|
8235
8235
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
8236
8236
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8237
|
-
*/const
|
|
8237
|
+
*/const Fs=p`
|
|
8238
8238
|
:host([opening]),
|
|
8239
8239
|
:host([closing]) {
|
|
8240
8240
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -8264,7 +8264,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8264
8264
|
opacity: 0;
|
|
8265
8265
|
}
|
|
8266
8266
|
}
|
|
8267
|
-
`;f("",
|
|
8267
|
+
`;f("",Fs,{moduleId:"lumo-menu-overlay-core"});const Ph=p`
|
|
8268
8268
|
/* Small viewport (bottom sheet) styles */
|
|
8269
8269
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
8270
8270
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -8326,7 +8326,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8326
8326
|
transform: translateY(150%);
|
|
8327
8327
|
}
|
|
8328
8328
|
}
|
|
8329
|
-
`,
|
|
8329
|
+
`,Bs=[Vs,Fs,Ph];f("",Bs,{moduleId:"lumo-menu-overlay"});const Oh=p`
|
|
8330
8330
|
[part='overlay'] {
|
|
8331
8331
|
/*
|
|
8332
8332
|
Width:
|
|
@@ -8371,7 +8371,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8371
8371
|
max-height: 70vh;
|
|
8372
8372
|
}
|
|
8373
8373
|
}
|
|
8374
|
-
`;f("vaadin-date-picker-overlay",[
|
|
8374
|
+
`;f("vaadin-date-picker-overlay",[Bs,Oh],{moduleId:"lumo-date-picker-overlay"});const In=p`
|
|
8375
8375
|
:host {
|
|
8376
8376
|
/* Sizing */
|
|
8377
8377
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -9181,7 +9181,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9181
9181
|
* @license
|
|
9182
9182
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9183
9183
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9184
|
-
*/const
|
|
9184
|
+
*/const Dh=p`
|
|
9185
9185
|
:host {
|
|
9186
9186
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
9187
9187
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -9312,7 +9312,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9312
9312
|
[part='clear-button']::before {
|
|
9313
9313
|
content: var(--lumo-icons-cross);
|
|
9314
9314
|
}
|
|
9315
|
-
`,
|
|
9315
|
+
`,Pe=[Ls,An,wn,Dh];f("",Pe,{moduleId:"lumo-input-field-shared-styles"});const zh=p`
|
|
9316
9316
|
[part='toggle-button']::before {
|
|
9317
9317
|
content: var(--lumo-icons-calendar);
|
|
9318
9318
|
}
|
|
@@ -9334,15 +9334,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9334
9334
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
9335
9335
|
--_lumo-text-field-overflow-mask-image: none;
|
|
9336
9336
|
}
|
|
9337
|
-
`;f("vaadin-date-picker",[
|
|
9337
|
+
`;f("vaadin-date-picker",[Pe,zh],{moduleId:"lumo-date-picker"});/**
|
|
9338
9338
|
* @license
|
|
9339
9339
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9340
9340
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9341
|
-
*/const
|
|
9341
|
+
*/const Mh=s=>class extends s{static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
|
|
9342
9342
|
* @license
|
|
9343
9343
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9344
9344
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9345
|
-
*/const
|
|
9345
|
+
*/const Nh=p`
|
|
9346
9346
|
:host {
|
|
9347
9347
|
display: flex;
|
|
9348
9348
|
align-items: center;
|
|
@@ -9411,15 +9411,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9411
9411
|
* @license
|
|
9412
9412
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9413
9413
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9414
|
-
*/f("vaadin-input-container",
|
|
9414
|
+
*/f("vaadin-input-container",Nh,{moduleId:"vaadin-input-container-styles"});let Lh=class extends Mh(E($(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
9415
9415
|
<slot name="prefix"></slot>
|
|
9416
9416
|
<slot></slot>
|
|
9417
9417
|
<slot name="suffix"></slot>
|
|
9418
|
-
`}};
|
|
9418
|
+
`}};x(Lh);/**
|
|
9419
9419
|
* @license
|
|
9420
9420
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9421
9421
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9422
|
-
*/const
|
|
9422
|
+
*/const Rs=p`
|
|
9423
9423
|
:host {
|
|
9424
9424
|
z-index: 200;
|
|
9425
9425
|
position: fixed;
|
|
@@ -9486,55 +9486,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9486
9486
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9487
9487
|
Code distributed by Google as part of the polymer project is also
|
|
9488
9488
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9489
|
-
*/let
|
|
9489
|
+
*/let ji=!1,Vh=[],En=[];function Fh(){ji=!0,requestAnimationFrame(function(){ji=!1,Bh(Vh),setTimeout(function(){Rh(En);});});}function Bh(s){for(;s.length;)Sn(s.shift());}function Rh(s){for(let t=0,e=s.length;t<e;t++)Sn(s.shift());}function Sn(s){const t=s[0],e=s[1],i=s[2];try{e.apply(t,i);}catch(o){setTimeout(()=>{throw o});}}function kn(s,t,e){ji||Fh(),En.push([s,t,e]);}/**
|
|
9490
9490
|
* @license
|
|
9491
9491
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9492
9492
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9493
|
-
*/const
|
|
9493
|
+
*/const jt=s=>s.test(navigator.userAgent),Yi=s=>s.test(navigator.platform),$h=s=>s.test(navigator.vendor);jt(/Android/u);jt(/Chrome/u)&&$h(/Google Inc/u);jt(/Firefox/u);const Hh=Yi(/^iPad/u)||Yi(/^Mac/u)&&navigator.maxTouchPoints>1,qh=Yi(/^iPhone/u),$s=qh||Hh,Uh=jt(/^((?!chrome|android).)*safari/iu),Gi=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
9494
9494
|
* @license
|
|
9495
9495
|
* Copyright (c) 2017 Anton Korzunov
|
|
9496
9496
|
* SPDX-License-Identifier: MIT
|
|
9497
|
-
*/let
|
|
9497
|
+
*/let ve=new WeakMap,ct=new WeakMap,ut={},pi=0;const Xo=s=>s&&s.nodeType===Node.ELEMENT_NODE,_i=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},Wh=(s,t)=>Xo(s)?t.map(e=>{if(!Xo(e))return _i(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return _i(e,"is not contained inside",s),null}).filter(e=>!!e):(_i(s,"is not a valid element"),[]),jh=(s,t,e,i)=>{const o=Wh(t,Array.isArray(s)?s:[s]);ut[e]||(ut[e]=new WeakMap);const r=ut[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ve.get(m)||0)+1,C=(r.get(m)||0)+1;ve.set(m,w),r.set(m,C),n.push(m),w===1&&k&&ct.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),pi+=1,()=>{n.forEach(c=>{const u=ve.get(c)-1,_=r.get(c)-1;ve.set(c,u),r.set(c,_),u||(ct.has(c)?ct.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),pi-=1,pi||(ve=new WeakMap,ve=new WeakMap,ct=new WeakMap,ut={});}},Tn=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),jh(i,t,e,"aria-hidden")};/**
|
|
9498
9498
|
* @license
|
|
9499
9499
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9500
9500
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9501
|
-
*/let
|
|
9501
|
+
*/let Yh=class{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=Tn(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}};/**
|
|
9502
9502
|
* @license
|
|
9503
9503
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9504
9504
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9505
|
-
*/let
|
|
9505
|
+
*/let Gh=class{saveFocus(t){this.focusNode=t||qi();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;qi()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}};/**
|
|
9506
9506
|
* @license
|
|
9507
9507
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9508
9508
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9509
|
-
*/const
|
|
9509
|
+
*/const mi=[];let Kh=class{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return _h(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(Os).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");mi.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,mi.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(mi).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}};/**
|
|
9510
9510
|
* @license
|
|
9511
9511
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9512
9512
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9513
|
-
*/const
|
|
9513
|
+
*/const Xh=s=>class extends oe(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Yh(this),this.__focusTrapController=new Kh(this),this.__focusRestorationController=new Gh;}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController);}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!$t();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=qi();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
9514
9514
|
* @license
|
|
9515
9515
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9516
9516
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9517
|
-
*/const
|
|
9517
|
+
*/const Pn=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),Ki=()=>Pn().filter(s=>s.$.overlay),Jh=s=>s===Ki().pop(),On=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Jh(this)}bringToFront(){let e="";const i=Pn().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex);}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),Ki().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=Ki();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
9518
9518
|
* @license
|
|
9519
9519
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9520
9520
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9521
|
-
*/const Hs=s=>class extends
|
|
9521
|
+
*/const Hs=s=>class extends Xh(On(s)){static get properties(){return {opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:{type:Object},model:{type:Object},renderer:{type:Object},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return ["_rendererOrDataChanged(renderer, owner, model, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&this.$.overlay.focus();});}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener));}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener);}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model);}close(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0");}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0);}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0);}_rendererOrDataChanged(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),kn(this,()=>{this._trapFocus();const o=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(o);}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening();}):this._finishOpening();}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront();}_finishOpening(){this.removeAttribute("opening");}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"));}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing();}):this._finishClosing());}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder);}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
9522
9522
|
* @license
|
|
9523
9523
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
9524
9524
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9525
|
-
*/function
|
|
9525
|
+
*/function Qh(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
9526
9526
|
* @license
|
|
9527
9527
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9528
9528
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9529
|
-
*/const
|
|
9529
|
+
*/const fi={start:"top",end:"bottom"},vi={start:"left",end:"right"},Jo=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),qs=s=>class extends s{static get properties(){return {positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return ["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this);}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners();}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners();}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=Wd(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=Qh(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,Jo.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,Jo.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,fi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,vi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,vi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,fi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===fi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===vi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
9530
9530
|
* @license
|
|
9531
9531
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
9532
9532
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9533
|
-
*/const
|
|
9533
|
+
*/const Zh=s=>class extends qs(Hs(s)){_shouldCloseOnOutsideClick(e){return !e.composedPath().includes(this.positionTarget)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}};/**
|
|
9534
9534
|
* @license
|
|
9535
9535
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9536
9536
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9537
|
-
*/const
|
|
9537
|
+
*/const ec=p`
|
|
9538
9538
|
[part='overlay'] {
|
|
9539
9539
|
display: flex;
|
|
9540
9540
|
flex: auto;
|
|
@@ -9553,18 +9553,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9553
9553
|
* @license
|
|
9554
9554
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9555
9555
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9556
|
-
*/f("vaadin-date-picker-overlay",[
|
|
9556
|
+
*/f("vaadin-date-picker-overlay",[Rs,ec],{moduleId:"vaadin-date-picker-overlay-styles"});class tc extends Zh($(E(y))){static get is(){return "vaadin-date-picker-overlay"}static get template(){return b`
|
|
9557
9557
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
9558
9558
|
<div part="overlay" id="overlay">
|
|
9559
9559
|
<div part="content" id="content">
|
|
9560
9560
|
<slot></slot>
|
|
9561
9561
|
</div>
|
|
9562
9562
|
</div>
|
|
9563
|
-
`}}
|
|
9563
|
+
`}}x(tc);/**
|
|
9564
9564
|
* @license
|
|
9565
9565
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9566
9566
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9567
|
-
*/const
|
|
9567
|
+
*/const Dn=p`
|
|
9568
9568
|
:host {
|
|
9569
9569
|
display: inline-block;
|
|
9570
9570
|
position: relative;
|
|
@@ -9624,7 +9624,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9624
9624
|
outline-color: GrayText;
|
|
9625
9625
|
}
|
|
9626
9626
|
}
|
|
9627
|
-
`,
|
|
9627
|
+
`,ic=s=>s`
|
|
9628
9628
|
<div class="vaadin-button-container">
|
|
9629
9629
|
<span part="prefix" aria-hidden="true">
|
|
9630
9630
|
<slot name="prefix"></slot>
|
|
@@ -9641,15 +9641,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9641
9641
|
* @license
|
|
9642
9642
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9643
9643
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9644
|
-
*/const
|
|
9644
|
+
*/const Us=s=>class extends ks(bn(fe(s))){static get properties(){return {tabindex:{type:Number,value:0,reflectToAttribute:!0}}}get _activeKeys(){return ["Enter"," "]}ready(){super.ready(),this.hasAttribute("role")||this.setAttribute("role","button");}_onKeyDown(e){super._onKeyDown(e),!(e.altKey||e.shiftKey||e.ctrlKey||e.metaKey)&&this._activeKeys.includes(e.key)&&(e.preventDefault(),this.click());}};/**
|
|
9645
9645
|
* @license
|
|
9646
9646
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9647
9647
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9648
|
-
*/f("vaadin-button",
|
|
9648
|
+
*/f("vaadin-button",Dn,{moduleId:"vaadin-button-styles"});class sc extends Us(X(E(oe(y)))){static get is(){return "vaadin-button"}static get template(){return ic(b)}ready(){super.ready(),this._tooltipController=new _e(this),this.addController(this._tooltipController);}}x(sc);/**
|
|
9649
9649
|
* @license
|
|
9650
9650
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9651
9651
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9652
|
-
*/function
|
|
9652
|
+
*/function oc(s){let t=s.getDay();t===0&&(t=7);const e=4-t,i=new Date(s.getTime()+e*24*3600*1e3),o=new Date(0,0);o.setFullYear(i.getFullYear());const r=i.getTime()-o.getTime(),n=Math.round(r/(24*3600*1e3));return Math.floor(n/7+1)}function Xi(s){const t=new Date(s);return t.setHours(0,0,0,0),t}function K(s,t,e=Xi){return s instanceof Date&&t instanceof Date&&e(s).getTime()===e(t).getTime()}function Ws(s){return {day:s.getDate(),month:s.getMonth(),year:s.getFullYear()}}function Ee(s,t,e,i){let o=!1;if(typeof i=="function"&&s){const r=Ws(s);o=i(r);}return (!t||s>=t)&&(!e||s<=e)&&!o}function zn(s,t){return t.filter(e=>e!==void 0).reduce((e,i)=>{if(!i)return e;if(!e)return i;const o=Math.abs(s.getTime()-i.getTime()),r=Math.abs(e.getTime()-s.getTime());return o<r?i:e})}function Mn(s){const t=new Date,e=new Date(t);return e.setDate(1),e.setMonth(parseInt(s)+t.getMonth()),e}function rc(s,t,e=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let o=t+Math.floor(s.getFullYear()/100)*100;return s<new Date(o-50,e,i)?o-=100:s>new Date(o+50,e,i)&&(o+=100),o}function Be(s){const t=/^([-+]\d{1}|\d{2,4}|[-+]\d{6})-(\d{1,2})-(\d{1,2})$/u.exec(s);if(!t)return;const e=new Date(0,0);return e.setFullYear(parseInt(t[1],10)),e.setMonth(parseInt(t[2],10)-1),e.setDate(parseInt(t[3],10)),e}function nc(s){const t=(l,d="00")=>(d+l).substr((d+l).length-d.length);let e="",i="0000",o=s.year;o<0?(o=-o,e="-",i="000000"):s.year>=1e4&&(e="+",i="000000");const r=e+t(o,i),n=t(s.month+1),a=t(s.day);return [r,n,a].join("-")}function ac(s){return s instanceof Date?nc({year:s.getFullYear(),month:s.getMonth(),day:s.getDate()}):""}/**
|
|
9653
9653
|
@license
|
|
9654
9654
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9655
9655
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9657,7 +9657,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9657
9657
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9658
9658
|
Code distributed by Google as part of the polymer project is also
|
|
9659
9659
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9660
|
-
*/let
|
|
9660
|
+
*/let lc=class Ji{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,st.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),st.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}static debounce(t,e,i){return t instanceof Ji?t._cancelAsync():t=new Ji,t.setConfig(e,i),t}},st=new Set;const dc=function(s){st.add(s);},hc=function(){const s=!!st.size;return st.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s};/**
|
|
9661
9661
|
@license
|
|
9662
9662
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9663
9663
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9665,11 +9665,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9665
9665
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9666
9666
|
Code distributed by Google as part of the polymer project is also
|
|
9667
9667
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9668
|
-
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=
|
|
9668
|
+
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=hc();while(s||t)};/**
|
|
9669
9669
|
* @license
|
|
9670
9670
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9671
9671
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9672
|
-
*/const
|
|
9672
|
+
*/const Nn=document.createElement("template");Nn.innerHTML=`
|
|
9673
9673
|
<style>
|
|
9674
9674
|
:host {
|
|
9675
9675
|
display: block;
|
|
@@ -9719,11 +9719,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9719
9719
|
<div class="buffer"></div>
|
|
9720
9720
|
<div id="fullHeight"></div>
|
|
9721
9721
|
</div>
|
|
9722
|
-
`;class
|
|
9722
|
+
`;class Ln extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"}).appendChild(Nn.content.cloneNode(!0)),this.bufferSize=20,this._initialScroll=5e5,this._initialIndex=0,this._activated=!1;}get active(){return this._activated}set active(t){t&&!this._activated&&(this._createPool(),this._activated=!0);}get bufferOffset(){return this._buffers[0].offsetTop}get itemHeight(){if(!this._itemHeightVal){const t=getComputedStyle(this).getPropertyValue("--vaadin-infinite-scroller-item-height"),e="background-position";this.$.fullHeight.style.setProperty(e,t);const i=getComputedStyle(this.$.fullHeight).getPropertyValue(e);this.$.fullHeight.style.removeProperty(e),this._itemHeightVal=parseFloat(i);}return this._itemHeightVal}get _bufferHeight(){return this.itemHeight*this.bufferSize}get position(){return (this.$.scroller.scrollTop-this._buffers[0].translateY)/this.itemHeight+this._firstIndex}set position(t){this._preventScrollEvent=!0,t>this._firstIndex&&t<this._firstIndex+this.bufferSize*2?this.$.scroller.scrollTop=this.itemHeight*(t-this._firstIndex)+this._buffers[0].translateY:(this._initialIndex=~~t,this._reset(),this._scrollDisabled=!0,this.$.scroller.scrollTop+=t%1*this.itemHeight,this._scrollDisabled=!1),this._mayHaveMomentum&&(this.$.scroller.classList.add("notouchscroll"),this._mayHaveMomentum=!1,setTimeout(()=>{this.$.scroller.classList.remove("notouchscroll");},10));}connectedCallback(){this._ready||(this._ready=!0,this.$={},this.shadowRoot.querySelectorAll("[id]").forEach(t=>{this.$[t.id]=t;}),this.$.scroller.addEventListener("scroll",()=>this._scroll()),this._buffers=[...this.shadowRoot.querySelectorAll(".buffer")],this.$.fullHeight.style.height=`${this._initialScroll*2}px`);}forceUpdate(){this._debouncerScrollFinish&&this._debouncerScrollFinish.flush(),this._debouncerUpdateClones&&(this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(),this._debouncerUpdateClones.cancel()),js();}_createElement(){}_updateElement(t,e){}_finishInit(){this._initDone||(this._buffers.forEach(t=>{[...t.children].forEach(e=>{this._ensureStampedInstance(e._itemWrapper);});}),this._buffers[0].translateY||this._reset(),this._initDone=!0,this.dispatchEvent(new CustomEvent("init-done")));}_translateBuffer(t){const e=t?1:0;this._buffers[e].translateY=this._buffers[e?0:1].translateY+this._bufferHeight*(e?-1:1),this._buffers[e].style.transform=`translate3d(0, ${this._buffers[e].translateY}px, 0)`,this._buffers[e].updated=!1,this._buffers.reverse();}_scroll(){if(this._scrollDisabled)return;const t=this.$.scroller.scrollTop;(t<this._bufferHeight||t>this._initialScroll*2-this._bufferHeight)&&(this._initialIndex=~~this.position,this._reset());const e=this.itemHeight+this.bufferOffset,i=t>this._buffers[1].translateY+e,o=t<this._buffers[0].translateY+e;(i||o)&&(this._translateBuffer(o),this._updateClones()),this._preventScrollEvent||(this.dispatchEvent(new CustomEvent("custom-scroll",{bubbles:!1,composed:!0})),this._mayHaveMomentum=!0),this._preventScrollEvent=!1,this._debouncerScrollFinish=z.debounce(this._debouncerScrollFinish,te.after(200),()=>{const r=this.$.scroller.getBoundingClientRect();!this._isVisible(this._buffers[0],r)&&!this._isVisible(this._buffers[1],r)&&(this.position=this.position);});}_reset(){this._scrollDisabled=!0,this.$.scroller.scrollTop=this._initialScroll,this._buffers[0].translateY=this._initialScroll-this._bufferHeight,this._buffers[1].translateY=this._initialScroll,this._buffers.forEach(t=>{t.style.transform=`translate3d(0, ${t.translateY}px, 0)`;}),this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones(!0),this._debouncerUpdateClones=z.debounce(this._debouncerUpdateClones,te.after(200),()=>{this._buffers[0].updated=this._buffers[1].updated=!1,this._updateClones();}),this._scrollDisabled=!1;}_createPool(){const t=this.getBoundingClientRect();this._buffers.forEach(e=>{for(let i=0;i<this.bufferSize;i++){const o=document.createElement("div");o.style.height=`${this.itemHeight}px`,o.instance={};const r=`vaadin-infinite-scroller-item-content-${Rt()}`,n=document.createElement("slot");n.setAttribute("name",r),n._itemWrapper=o,e.appendChild(n),o.setAttribute("slot",r),this.appendChild(o),this._isVisible(o,t)&&this._ensureStampedInstance(o);}}),requestAnimationFrame(()=>{this._finishInit();});}_ensureStampedInstance(t){if(t.firstElementChild)return;const e=t.instance;t.instance=this._createElement(),t.appendChild(t.instance),Object.keys(e).forEach(i=>{t.instance[i]=e[i];});}_updateClones(t){this._firstIndex=Math.round((this._buffers[0].translateY-this._initialScroll)/this.itemHeight)+this._initialIndex;const e=t?this.$.scroller.getBoundingClientRect():void 0;this._buffers.forEach((i,o)=>{if(!i.updated){const r=this._firstIndex+this.bufferSize*o;[...i.children].forEach((n,a)=>{const l=n._itemWrapper;(!t||this._isVisible(l,e))&&this._updateElement(l.instance,r+a);}),i.updated=!0;}});}_isVisible(t,e){const i=t.getBoundingClientRect();return i.bottom>e.top&&i.top<e.bottom}}/**
|
|
9723
9723
|
* @license
|
|
9724
9724
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9725
9725
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9726
|
-
*/const
|
|
9726
|
+
*/const Vn=document.createElement("template");Vn.innerHTML=`
|
|
9727
9727
|
<style>
|
|
9728
9728
|
:host {
|
|
9729
9729
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -9735,11 +9735,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9735
9735
|
height: 100%;
|
|
9736
9736
|
}
|
|
9737
9737
|
</style>
|
|
9738
|
-
`;class
|
|
9738
|
+
`;class cc extends Ln{static get is(){return "vaadin-date-picker-month-scroller"}constructor(){super(),this.bufferSize=3,this.shadowRoot.appendChild(Vn.content.cloneNode(!0));}_createElement(){return document.createElement("vaadin-month-calendar")}_updateElement(t,e){t.month=Mn(e);}}x(cc);/**
|
|
9739
9739
|
* @license
|
|
9740
9740
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9741
9741
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9742
|
-
*/const
|
|
9742
|
+
*/const Fn=document.createElement("template");Fn.innerHTML=`
|
|
9743
9743
|
<style>
|
|
9744
9744
|
:host {
|
|
9745
9745
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -9773,15 +9773,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9773
9773
|
border-left-color: #000;
|
|
9774
9774
|
}
|
|
9775
9775
|
</style>
|
|
9776
|
-
`;class
|
|
9776
|
+
`;class uc extends Ln{static get is(){return "vaadin-date-picker-year-scroller"}constructor(){super(),this.bufferSize=12,this.shadowRoot.appendChild(Fn.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()}}x(uc);/**
|
|
9777
9777
|
* @license
|
|
9778
9778
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9779
9779
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9780
|
-
*/const
|
|
9780
|
+
*/const pc=s=>class extends s{static get properties(){return {year:{type:String,sync:!0},selectedDate:{type:Object,sync:!0}}}static get observers(){return ["__updateSelected(year, selectedDate)"]}__updateSelected(e,i){this.toggleAttribute("selected",i&&i.getFullYear()===e),this.toggleAttribute("current",e===new Date().getFullYear());}};/**
|
|
9781
9781
|
* @license
|
|
9782
9782
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9783
9783
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9784
|
-
*/class
|
|
9784
|
+
*/class _c extends E(pc(y)){static get is(){return "vaadin-date-picker-year"}static get template(){return b`
|
|
9785
9785
|
<style>
|
|
9786
9786
|
:host {
|
|
9787
9787
|
display: block;
|
|
@@ -9790,7 +9790,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9790
9790
|
</style>
|
|
9791
9791
|
<div part="year-number">[[year]]</div>
|
|
9792
9792
|
<div part="year-separator" aria-hidden="true"></div>
|
|
9793
|
-
`}}
|
|
9793
|
+
`}}x(_c);/**
|
|
9794
9794
|
@license
|
|
9795
9795
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9796
9796
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9798,7 +9798,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9798
9798
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9799
9799
|
Code distributed by Google as part of the polymer project is also
|
|
9800
9800
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9801
|
-
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=
|
|
9801
|
+
*/function Ys(s,t,e,i,o){let r;o&&(r=typeof e=="object"&&e!==null,r&&(i=s.__dataTemp[t]));let n=i!==e&&(i===i||e===e);return r&&n&&(s.__dataTemp[t]=e),n}const Gs=S(s=>{class t extends s{_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,!0)}}return t}),mc=S(s=>{class t extends s{static get properties(){return {mutableData:Boolean}}_shouldPropertyChange(i,o,r){return Ys(this,i,o,r,this.mutableData)}}return t});Gs._mutablePropertyChange=Ys;/**
|
|
9802
9802
|
@license
|
|
9803
9803
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9804
9804
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9806,7 +9806,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9806
9806
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9807
9807
|
Code distributed by Google as part of the polymer project is also
|
|
9808
9808
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9809
|
-
*/let
|
|
9809
|
+
*/let Qi=null;function Zi(){return Qi}Zi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Zi,writable:!0}});const Bn=xs(Zi),fc=Gs(Bn);function vc(s,t){Qi=s,Object.setPrototypeOf(s,t.prototype),new t,Qi=null;}const gc=xs(class{});function bc(s,t){for(let e=0;e<t.length;e++){let i=t[e];if(!!s!=!!i.__hideTemplateChildren__)if(i.nodeType===Node.TEXT_NODE)s?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if(i.localName==="slot")if(s)i.__polymerReplaced__=document.createComment("hidden-slot"),P(P(i).parentNode).replaceChild(i.__polymerReplaced__,i);else {const o=i.__polymerReplaced__;o&&P(P(o).parentNode).replaceChild(i,o);}else i.style&&(s?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=s,i._showHideChildren&&i._showHideChildren(s);}}class re extends gc{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let o=this.root.firstChild;o;o=o.nextSibling)e.push(o),o.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let i=this.__templatizeOptions;(t&&i.instanceProps||!i.instanceProps)&&this._enableProperties();}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let i in this.__hostProps)this._setPendingProperty(i,this.__dataHost["_host_"+i]);for(let i in t)this._setPendingProperty(i,t[i]);}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this);}_addEventListenerToNode(t,e,i){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,o=>{o.model=this,i(o);});else {let o=this.__dataHost.__dataHost;o&&o._addEventListenerToNode(t,e,i);}}_showHideChildren(t){bc(t,this.children);}_setUnmanagedPropertyToNode(t,e,i){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&e=="textContent"?t.__polymerTextContent__=i:super._setUnmanagedPropertyToNode(t,e,i);}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do t=t.__dataHost.__dataHost;while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t;}return t}dispatchEvent(t){return !0}}const yc=Gs(re);function Qo(s){let t=s.__dataHost;return t&&t._methodHost||t}function xc(s,t,e){let i=e.mutableData?yc:re;es.mixin&&(i=es.mixin(i));let o=class extends i{};return o.prototype.__templatizeOptions=e,o.prototype._bindTemplate(s),Ic(o,s,t,e),o}function Cc(s,t,e,i){let o=e.forwardHostProp;if(o&&t.hasHostProps){const r=s.localName=="template";let n=t.templatizeTemplateClass;if(!n){if(r){let l=e.mutableData?fc:Bn;class d extends l{}n=t.templatizeTemplateClass=d;}else {const l=s.constructor;class d extends l{}n=t.templatizeTemplateClass=d;}let a=t.hostProps;for(let l in a)n.prototype._addPropertyEffect("_host_"+l,n.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:wc(l,o)}),n.prototype._createNotifyingProperty("_host_"+l);Lr&&i&&Sc(t,e,i);}if(s.__dataProto&&Object.assign(s.__data,s.__dataProto),r)vc(s,n),s.__dataTemp={},s.__dataPending=null,s.__dataOld=null,s._enableProperties();else {Object.setPrototypeOf(s,n.prototype);const a=t.hostProps;for(let l in a)if(l="_host_"+l,l in s){const d=s[l];delete s[l],s.__data[l]=d;}}}}function wc(s,t){return function(i,o,r){t.call(i.__templatizeOwner,o.substring(6),r[o]);}}function Ic(s,t,e,i){let o=e.hostProps||{};for(let r in i.instanceProps){delete o[r];let n=i.notifyInstanceProp;n&&s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ac(r,n)});}if(i.forwardHostProp&&t.__dataHost)for(let r in o)e.hasHostProps||(e.hasHostProps=!0),s.prototype._addPropertyEffect(r,s.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ec()});}function Ac(s,t){return function(i,o,r){t.call(i.__templatizeOwner,i,o,r[o]);}}function Ec(){return function(t,e,i){t.__dataHost._setPendingPropertyOrPath("_host_"+e,i[e],!0,!0);}}function es(s,t,e){if(St&&!Qo(s))throw new Error("strictTemplatePolicy: template owner not trusted");if(e=e||{},s.__templatizeOwner)throw new Error("A <template> can only be templatized once");s.__templatizeOwner=t;let o=(t?t.constructor:re)._parseTemplate(s),r=o.templatizeInstanceClass;r||(r=xc(s,o,e),o.templatizeInstanceClass=r);const n=Qo(s);Cc(s,o,e,n);let a=class extends r{};return a.prototype._methodHost=n,a.prototype.__dataHost=s,a.prototype.__templatizeOwner=t,a.prototype.__hostProps=o.hostProps,a=a,a}function Sc(s,t,e){const i=e.constructor._properties,{propertyEffects:o}=s,{instanceProps:r}=t;for(let n in o)if(!i[n]&&!(r&&r[n])){const a=o[n];for(let l=0;l<a.length;l++){const{part:d}=a[l].info;if(!(d.signature&&d.signature.static)){console.warn(`Property '${n}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function kc(s,t){let e;for(;t;)if(e=t.__dataHost?t:t.__templatizeInstance)if(e.__dataHost!=s)t=e.__dataHost;else return e;else t=P(t).parentNode;return null}/**
|
|
9810
9810
|
@license
|
|
9811
9811
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9812
9812
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9814,7 +9814,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9814
9814
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9815
9815
|
Code distributed by Google as part of the polymer project is also
|
|
9816
9816
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9817
|
-
*/let Zo=!1;function
|
|
9817
|
+
*/let Zo=!1;function Tc(){if(Nr&&!Mr){if(!Zo){Zo=!0;const s=document.createElement("style");s.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(s);}return !0}return !1}/**
|
|
9818
9818
|
@license
|
|
9819
9819
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9820
9820
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9822,15 +9822,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9822
9822
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9823
9823
|
Code distributed by Google as part of the polymer project is also
|
|
9824
9824
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9825
|
-
*/const
|
|
9825
|
+
*/const Pc=mc(y);class er extends Pc{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:!Eo,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(),Tc()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=P(P(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t);this.__chunkingId&&this.__render();}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let o=new MutationObserver(()=>{if(this.querySelector("template"))o.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return o.observe(this,{childList:!0}),!1}let i={};i[this.as]=!0,i[this.indexAs]=!0,i[this.itemsIndexAs]=!0,this.__ctor=es(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:i,forwardHostProp:function(o,r){let n=this.__instances;for(let a=0,l;a<n.length&&(l=n[a]);a++)l.forwardHostProp(o,r);},notifyInstanceProp:function(o,r,n){if(kl(this.as,r)){let a=o[this.itemsIndexAs];r==this.as&&(this.items[a]=n);let l=Qe(this.as,`${JSCompiler_renameProperty("items",this)}.${a}`,r);this.notifyPath(l,n);}}});}return !0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){let e=t,i=this.__getMethodHost();return function(){return i[e].apply(i,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render);}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ");}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let e=this.__observePaths;for(let i=0;i<e.length;i++)t.indexOf(e[i])===0&&this.__debounceRender(this.__render,this.delay);}}}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render));}__debounceRender(t,e=0){this.__renderDebouncer=lc.debounce(this.__renderDebouncer,e>0?Ml.after(e):jr,t.bind(this)),dc(this.__renderDebouncer);}render(){this.__debounceRender(this.__render),js();}__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),(!Eo||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}));}__sortAndFilterItems(t){let e=new Array(t.length);for(let i=0;i<t.length;i++)e[i]=i;return this.__filterFn&&(e=e.filter((i,o,r)=>this.__filterFn(t[i],o,r))),this.__sortFn&&e.sort((i,o)=>this.__sortFn(t[i],t[o])),e}__calculateLimit(t){let e=t;const i=this.__instances.length;if(this.initialCount){let o;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),o=Math.max(e-i,0),this.__chunkCount=o||1):(o=Math.min(Math.max(t-i,0),this.__chunkCount),e=Math.min(i+o,t)),this.__shouldMeasureChunk=o===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now();}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1;}this.__shouldContinueChunking&&this.__debounceRender(this.__render);}__updateInstances(t,e,i){const o=this.__itemsIdxToInstIdx={};let r;for(r=0;r<e;r++){let n=this.__instances[r],a=i[r],l=t[a];o[a]=r,n?(n._setPendingProperty(this.as,l),n._setPendingProperty(this.indexAs,r),n._setPendingProperty(this.itemsIndexAs,a),n._flushProperties()):this.__insertInstance(l,r,a);}for(let n=this.__instances.length-1;n>=r;n--)this.__detachAndRemoveInstance(n);}__detachInstance(t){let e=this.__instances[t];const i=P(e.root);for(let o=0;o<e.children.length;o++){let r=e.children[o];i.appendChild(r);}return e}__attachInstance(t,e){let i=this.__instances[t];e.insertBefore(i.root,this);}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1);}__stampInstance(t,e,i){let o={};return o[this.as]=t,o[this.indexAs]=e,o[this.itemsIndexAs]=i,new this.__ctor(o)}__insertInstance(t,e,i){const o=this.__stampInstance(t,e,i);let r=this.__instances[e+1],n=r?r.children[0]:this;return P(P(this).parentNode).insertBefore(o.root,n),this.__instances[e]=o,o}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t);}__handleItemPath(t,e){let i=t.slice(6),o=i.indexOf("."),r=o<0?i:i.substring(0,o);if(r==parseInt(r,10)){let n=o<0?"":i.substring(o+1);this.__handleObservedPaths(n);let a=this.__itemsIdxToInstIdx[r],l=this.__instances[a];if(l){let d=this.as+(n?"."+n:"");l._setPendingPropertyOrPath(d,e,!1,!0),l._flushProperties();}return !0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return kc(this.template,t)}}customElements.define(er.is,er);/**
|
|
9826
9826
|
* @license
|
|
9827
9827
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9828
9828
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9829
|
-
*/const
|
|
9829
|
+
*/const Oc=s=>class extends fe(s){static get properties(){return {month:{type:Object,value:new Date,sync:!0},selectedDate:{type:Object,notify:!0,sync:!0},focusedDate:{type:Object},showWeekNumbers:{type:Boolean,value:!1},i18n:{type:Object},ignoreTaps:{type:Boolean},minDate:{type:Date,value:null,sync:!0},maxDate:{type:Date,value:null,sync:!0},isDateDisabled:{type:Function,value:()=>!1},disabled:{type:Boolean,reflectToAttribute:!0},_days:{type:Array},_weeks:{type:Array},_notTapping:{type:Boolean}}}static get observers(){return ["__focusedDateChanged(focusedDate, _days)"]}get focusableDateElement(){return [...this.shadowRoot.querySelectorAll("[part~=date]")].find(e=>K(e.date,this.focusedDate))}ready(){super.ready(),R(this.$.monthGrid,"tap",this._handleTap.bind(this));}_isDisabled(e,i,o){const r=new Date(0,0);r.setFullYear(e.getFullYear()),r.setMonth(e.getMonth()),r.setDate(1);const n=new Date(0,0);return n.setFullYear(e.getFullYear()),n.setMonth(e.getMonth()+1),n.setDate(0),i&&o&&i.getMonth()===o.getMonth()&&i.getMonth()===e.getMonth()&&o.getDate()-i.getDate()>=0?!1:!Ee(r,i,o)&&!Ee(n,i,o)}_getTitle(e,i){if(!(e===void 0||i===void 0))return i.formatTitle(i.monthNames[e.getMonth()],e.getFullYear())}_onMonthGridTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300);}_dateAdd(e,i){e.setDate(e.getDate()+i);}_applyFirstDayOfWeek(e,i){if(!(e===void 0||i===void 0))return e.slice(i).concat(e.slice(0,i))}_getWeekDayNames(e,i){if(e===void 0||i===void 0)return [];const{weekdays:o,weekdaysShort:r,firstDayOfWeek:n}=e,a=this._applyFirstDayOfWeek(r,n);return this._applyFirstDayOfWeek(o,n).map((d,h)=>({weekDay:d,weekDayShort:a[h]})).slice(0,7)}__focusedDateChanged(e,i){Array.isArray(i)&&i.some(o=>K(o,e))?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true");}_getDate(e){return e?e.getDate():""}_showWeekSeparator(e,i){return e&&i&&i.firstDayOfWeek===1}_isToday(e){return K(new Date,e)}_getDays(e,i){if(e===void 0||i===void 0)return [];const o=new Date(0,0);for(o.setFullYear(e.getFullYear()),o.setMonth(e.getMonth()),o.setDate(1);o.getDay()!==i.firstDayOfWeek;)this._dateAdd(o,-1);const r=[],n=o.getMonth(),a=e.getMonth();for(;o.getMonth()===a||o.getMonth()===n;)r.push(o.getMonth()===a?new Date(o.getTime()):null),this._dateAdd(o,1);return r}_getWeeks(e){return e.reduce((i,o,r)=>(r%7===0&&i.push([]),i[i.length-1].push(o),i),[])}_handleTap(e){!this.ignoreTaps&&!this._notTapping&&e.target.date&&!e.target.hasAttribute("disabled")&&(this.selectedDate=e.target.date,this.dispatchEvent(new CustomEvent("date-tap",{detail:{date:e.target.date},bubbles:!0,composed:!0})));}_preventDefault(e){e.preventDefault();}__getWeekNumber(e){const i=e.reduce((o,r)=>!o&&r?r:o);return oc(i)}__getDayAriaLabel(e){if(!e)return "";let i=`${this._getDate(e)} ${this.i18n.monthNames[e.getMonth()]} ${e.getFullYear()}, ${this.i18n.weekdays[e.getDay()]}`;return this._isToday(e)&&(i+=`, ${this.i18n.today}`),i}};/**
|
|
9830
9830
|
* @license
|
|
9831
9831
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9832
9832
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9833
|
-
*/const
|
|
9833
|
+
*/const Dc=p`
|
|
9834
9834
|
:host {
|
|
9835
9835
|
display: block;
|
|
9836
9836
|
}
|
|
@@ -9890,7 +9890,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9890
9890
|
* @license
|
|
9891
9891
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9892
9892
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9893
|
-
*/f("vaadin-month-calendar",
|
|
9893
|
+
*/f("vaadin-month-calendar",Dc,{moduleId:"vaadin-month-calendar-styles"});class zc extends Oc(E(y)){static get template(){return b`
|
|
9894
9894
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
9895
9895
|
<table
|
|
9896
9896
|
id="monthGrid"
|
|
@@ -9932,7 +9932,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9932
9932
|
</template>
|
|
9933
9933
|
</tbody>
|
|
9934
9934
|
</table>
|
|
9935
|
-
`}static get is(){return "vaadin-month-calendar"}static get properties(){return {_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return ["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>
|
|
9935
|
+
`}static get is(){return "vaadin-month-calendar"}static get properties(){return {_days:{type:Array,computed:"_getDays(month, i18n, minDate, maxDate, isDateDisabled)"},_weeks:{type:Array,computed:"_getWeeks(_days)"},disabled:{type:Boolean,reflectToAttribute:!0,computed:"_isDisabled(month, minDate, maxDate)"}}}static get observers(){return ["_showWeekNumbersChanged(showWeekNumbers, i18n)"]}_showWeekNumbersChanged(t,e){t&&e&&e.firstDayOfWeek===1?this.setAttribute("week-numbers",""):this.removeAttribute("week-numbers");}__getDatePart(t,e,i,o,r,n){const a=["date"],l=t>Xi(new Date),d=t<Xi(new Date);return this.__isDayDisabled(t,o,r,n)&&a.push("disabled"),this.__isDayFocused(t,e)&&a.push("focused"),this.__isDaySelected(t,i)&&a.push("selected"),this._isToday(t)&&a.push("today"),d&&a.push("past"),l&&a.push("future"),a.join(" ")}__isDayFocused(t,e){return K(t,e)}__isDaySelected(t,e){return K(t,e)}__getDayAriaSelected(t,e){if(this.__isDaySelected(t,e))return "true"}__isDayDisabled(t,e,i,o){return !Ee(t,e,i,o)}__getDayAriaDisabled(t,e,i,o){if(!(t===void 0||e===void 0&&i===void 0&&o===void 0)&&this.__isDayDisabled(t,e,i,o))return "true"}__getDayTabindex(t,e){return this.__isDayFocused(t,e)?"0":"-1"}}x(zc);/**
|
|
9936
9936
|
* @license
|
|
9937
9937
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9938
9938
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -9940,11 +9940,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9940
9940
|
* @license
|
|
9941
9941
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9942
9942
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9943
|
-
*/const Dc=s=>class extends s{static get properties(){return {scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return ["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){fn(this.$.scrollers,"pan-y"),B(this.$.scrollers,"track",this._track.bind(this)),B(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),B(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),B(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new Y(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),B(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new Y(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),B(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new Y(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new Y(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),B(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position);}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps();}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps();}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300),this._repositionMonthScroller();}_onMonthScrollTouchStart(){this._repositionYearScroller();}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=z.debounce(this._debouncer,ee.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate");}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller();}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","");}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth;}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return zn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){G(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&G(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return ze(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return ze(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{Rs(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(Dn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ae(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
9943
|
+
*/const Mc=s=>class extends s{static get properties(){return {scrollDuration:{type:Number,value:300},selectedDate:{type:Object,value:null,sync:!0},focusedDate:{type:Object,notify:!0,observer:"_focusedDateChanged",sync:!0},_focusedMonthDate:Number,initialPosition:{type:Object,observer:"_initialPositionChanged"},_originDate:{type:Object,value:new Date},_visibleMonthIndex:Number,_desktopMode:{type:Boolean,observer:"_desktopModeChanged"},_desktopMediaQuery:{type:String,value:"(min-width: 375px)"},_translateX:{observer:"_translateXChanged"},_yearScrollerWidth:{value:50},i18n:{type:Object},showWeekNumbers:{type:Boolean,value:!1},_ignoreTaps:Boolean,_notTapping:Boolean,minDate:{type:Object,sync:!0},maxDate:{type:Object,sync:!0},isDateDisabled:{type:Function},label:String,_cancelButton:{type:Object},_todayButton:{type:Object},calendars:{type:Array,value:()=>[]},years:{type:Array,value:()=>[]}}}static get observers(){return ["__updateCalendars(calendars, i18n, minDate, maxDate, selectedDate, focusedDate, showWeekNumbers, _ignoreTaps, _theme, isDateDisabled)","__updateCancelButton(_cancelButton, i18n)","__updateTodayButton(_todayButton, i18n, minDate, maxDate, isDateDisabled)","__updateYears(years, selectedDate, _theme)"]}get __useSubMonthScrolling(){return this._monthScroller.clientHeight<this._monthScroller.itemHeight+this._monthScroller.bufferOffset}get focusableDateElement(){return this.calendars.map(e=>e.focusableDateElement).find(Boolean)}_addListeners(){fn(this.$.scrollers,"pan-y"),R(this.$.scrollers,"track",this._track.bind(this)),R(this.shadowRoot.querySelector('[part="clear-button"]'),"tap",this._clear.bind(this)),R(this.shadowRoot.querySelector('[part="toggle-button"]'),"tap",this._cancel.bind(this)),R(this.shadowRoot.querySelector('[part="years-toggle-button"]'),"tap",this._toggleYearScroller.bind(this));}_initControllers(){this.addController(new Ks(this._desktopMediaQuery,e=>{this._desktopMode=e;})),this.addController(new G(this,"today-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onTodayButtonKeyDown(i)),R(e,"tap",this._onTodayTap.bind(this)),this._todayButton=e;}})),this.addController(new G(this,"cancel-button","vaadin-button",{observe:!1,initializer:e=>{e.setAttribute("theme","tertiary"),e.addEventListener("keydown",i=>this.__onCancelButtonKeyDown(i)),R(e,"tap",this._cancel.bind(this)),this._cancelButton=e;}})),this.__initMonthScroller(),this.__initYearScroller();}reset(){this._closeYearScroller(),this._toggleAnimateClass(!0);}focusCancel(){this._cancelButton.focus();}scrollToDate(e,i){const o=this.__useSubMonthScrolling?this._calculateWeekScrollOffset(e):0;this._scrollToPosition(this._differenceInMonths(e,this._originDate)+o,i),this._monthScroller.forceUpdate();}__initMonthScroller(){this.addController(new G(this,"months","vaadin-date-picker-month-scroller",{observe:!1,initializer:e=>{e.addEventListener("custom-scroll",()=>{this._onMonthScroll();}),e.addEventListener("touchstart",()=>{this._onMonthScrollTouchStart();}),e.addEventListener("keydown",i=>{this.__onMonthCalendarKeyDown(i);}),e.addEventListener("init-done",()=>{const i=[...this.querySelectorAll("vaadin-month-calendar")];i.forEach(o=>{o.addEventListener("selected-date-changed",r=>{this.selectedDate=r.detail.value;});}),this.calendars=i;}),this._monthScroller=e;}}));}__initYearScroller(){this.addController(new G(this,"years","vaadin-date-picker-year-scroller",{observe:!1,initializer:e=>{e.setAttribute("aria-hidden","true"),R(e,"tap",i=>{this._onYearTap(i);}),e.addEventListener("custom-scroll",()=>{this._onYearScroll();}),e.addEventListener("touchstart",()=>{this._onYearScrollTouchStart();}),e.addEventListener("init-done",()=>{this.years=[...this.querySelectorAll("vaadin-date-picker-year")];}),this._yearScroller=e;}}));}__updateCancelButton(e,i){e&&(e.textContent=i&&i.cancel);}__updateTodayButton(e,i,o,r,n){e&&(e.textContent=i&&i.today,e.disabled=!this._isTodayAllowed(o,r,n));}__updateCalendars(e,i,o,r,n,a,l,d,h,c){e&&e.length&&e.forEach(u=>{u.i18n=i,u.minDate=o,u.maxDate=r,u.isDateDisabled=c,u.focusedDate=a,u.selectedDate=n,u.showWeekNumbers=l,u.ignoreTaps=d,h?u.setAttribute("theme",h):u.removeAttribute("theme");});}__updateYears(e,i,o){e&&e.length&&e.forEach(r=>{r.selectedDate=i,o?r.setAttribute("theme",o):r.removeAttribute("theme");});}_selectDate(e){return this._dateAllowed(e)?(this.selectedDate=e,this.dispatchEvent(new CustomEvent("date-selected",{detail:{date:e},bubbles:!0,composed:!0})),!0):!1}_desktopModeChanged(e){this.toggleAttribute("desktop",e);}_focusedDateChanged(e){this.revealDate(e);}revealDate(e,i=!0){if(!e)return;const o=this._differenceInMonths(e,this._originDate);if(this.__useSubMonthScrolling){const d=this._calculateWeekScrollOffset(e);this._scrollToPosition(o+d,i);return}const r=this._monthScroller.position>o,a=Math.max(this._monthScroller.itemHeight,this._monthScroller.clientHeight-this._monthScroller.bufferOffset*2)/this._monthScroller.itemHeight,l=this._monthScroller.position+a-1<o;r?this._scrollToPosition(o,i):l&&this._scrollToPosition(o-a+1,i);}_calculateWeekScrollOffset(e){const i=new Date(0,0);i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(1);let o=0;for(;i.getDate()<e.getDate();)i.setDate(i.getDate()+1),i.getDay()===this.i18n.firstDayOfWeek&&(o+=1);return o/6}_initialPositionChanged(e){this._monthScroller&&this._yearScroller&&(this._monthScroller.active=!0,this._yearScroller.active=!0),this.scrollToDate(e);}_repositionYearScroller(){const e=this._monthScroller.position;this._visibleMonthIndex=Math.floor(e),this._yearScroller.position=(e+this._originDate.getMonth())/12;}_repositionMonthScroller(){this._monthScroller.position=this._yearScroller.position*12-this._originDate.getMonth(),this._visibleMonthIndex=Math.floor(this._monthScroller.position);}_onMonthScroll(){this._repositionYearScroller(),this._doIgnoreTaps();}_onYearScroll(){this._repositionMonthScroller(),this._doIgnoreTaps();}_onYearScrollTouchStart(){this._notTapping=!1,setTimeout(()=>{this._notTapping=!0;},300),this._repositionMonthScroller();}_onMonthScrollTouchStart(){this._repositionYearScroller();}_doIgnoreTaps(){this._ignoreTaps=!0,this._debouncer=z.debounce(this._debouncer,te.after(300),()=>{this._ignoreTaps=!1;});}_formatDisplayed(e,i,o){return e&&i&&typeof i.formatDate=="function"?i.formatDate(Ws(e)):o}_onTodayTap(){const e=this._getTodayMidnight();Math.abs(this._monthScroller.position-this._differenceInMonths(e,this._originDate))<.001?(this._selectDate(e),this._close()):this._scrollToCurrentMonth();}_scrollToCurrentMonth(){this.focusedDate&&(this.focusedDate=new Date),this.scrollToDate(new Date,!0);}_onYearTap(e){if(!this._ignoreTaps&&!this._notTapping){const o=(e.detail.y-(this._yearScroller.getBoundingClientRect().top+this._yearScroller.clientHeight/2))/this._yearScroller.itemHeight;this._scrollToPosition(this._monthScroller.position+o*12,!0);}}_scrollToPosition(e,i){if(this._targetPosition!==void 0){this._targetPosition=e;return}if(!i){this._monthScroller.position=e,this._monthScroller.forceUpdate(),this._targetPosition=void 0,this._repositionYearScroller(),this.__tryFocusDate();return}this._targetPosition=e;let o;this._revealPromise=new Promise(d=>{o=d;});const r=(d,h,c,u)=>(d/=u/2,d<1?c/2*d*d+h:(d-=1,-c/2*(d*(d-2)-1)+h));let n=0;const a=this._monthScroller.position,l=d=>{n||(n=d);const h=d-n;if(h<this.scrollDuration){const c=r(h,a,this._targetPosition-a,this.scrollDuration);this._monthScroller.position=c,window.requestAnimationFrame(l);}else this.dispatchEvent(new CustomEvent("scroll-animation-finished",{bubbles:!0,composed:!0,detail:{position:this._targetPosition,oldPosition:a}})),this._monthScroller.position=this._targetPosition,this._monthScroller.forceUpdate(),this._targetPosition=void 0,o(),this._revealPromise=void 0;setTimeout(this._repositionYearScroller.bind(this),1);};window.requestAnimationFrame(l);}_limit(e,i){return Math.min(i.max,Math.max(i.min,e))}_handleTrack(e){if(Math.abs(e.detail.dx)<10||Math.abs(e.detail.ddy)>10)return;Math.abs(e.detail.ddx)>this._yearScrollerWidth/3&&this._toggleAnimateClass(!0);const i=this._translateX+e.detail.ddx;this._translateX=this._limit(i,{min:0,max:this._yearScrollerWidth});}_track(e){if(!this._desktopMode)switch(e.detail.state){case"start":this._toggleAnimateClass(!1);break;case"track":this._handleTrack(e);break;case"end":this._toggleAnimateClass(!0),this._translateX>=this._yearScrollerWidth/2?this._closeYearScroller():this._openYearScroller();break}}_toggleAnimateClass(e){e?this.classList.add("animate"):this.classList.remove("animate");}_toggleYearScroller(){this._isYearScrollerVisible()?this._closeYearScroller():this._openYearScroller();}_openYearScroller(){this._translateX=0,this.setAttribute("years-visible","");}_closeYearScroller(){this.removeAttribute("years-visible"),this._translateX=this._yearScrollerWidth;}_isYearScrollerVisible(){return this._translateX<this._yearScrollerWidth/2}_translateXChanged(e){this._desktopMode||(this._monthScroller.style.transform=`translateX(${e-this._yearScrollerWidth}px)`,this._yearScroller.style.transform=`translateX(${e}px)`);}_yearAfterXMonths(e){return Mn(e).getFullYear()}_differenceInMonths(e,i){return (e.getFullYear()-i.getFullYear())*12-i.getMonth()+e.getMonth()}_clear(){this._selectDate("");}_close(){this.dispatchEvent(new CustomEvent("close",{bubbles:!0,composed:!0}));}_cancel(){this.focusedDate=this.selectedDate,this._close();}_preventDefault(e){e.preventDefault();}__toggleDate(e){K(e,this.selectedDate)?(this._clear(),this.focusedDate=e):this._selectDate(e);}__onMonthCalendarKeyDown(e){let i=!1;switch(e.key){case"ArrowDown":this._moveFocusByDays(7),i=!0;break;case"ArrowUp":this._moveFocusByDays(-7),i=!0;break;case"ArrowRight":this._moveFocusByDays(this.__isRTL?-1:1),i=!0;break;case"ArrowLeft":this._moveFocusByDays(this.__isRTL?1:-1),i=!0;break;case"Enter":this._selectDate(this.focusedDate)&&(this._close(),i=!0);break;case" ":this.__toggleDate(this.focusedDate),i=!0;break;case"Home":this._moveFocusInsideMonth(this.focusedDate,"minDate"),i=!0;break;case"End":this._moveFocusInsideMonth(this.focusedDate,"maxDate"),i=!0;break;case"PageDown":this._moveFocusByMonths(e.shiftKey?12:1),i=!0;break;case"PageUp":this._moveFocusByMonths(e.shiftKey?-12:-1),i=!0;break;case"Tab":this._onTabKeyDown(e,"calendar");break}i&&(e.preventDefault(),e.stopPropagation());}_onTabKeyDown(e,i){switch(e.stopPropagation(),i){case"calendar":e.shiftKey&&(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusCancel():this.__focusInput());break;case"today":e.shiftKey&&(e.preventDefault(),this.focusDateElement());break;case"cancel":e.shiftKey||(e.preventDefault(),this.hasAttribute("fullscreen")?this.focusDateElement():this.__focusInput());break}}__onTodayButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"today");}__onCancelButtonKeyDown(e){e.key==="Tab"&&this._onTabKeyDown(e,"cancel");}__focusInput(){this.dispatchEvent(new CustomEvent("focus-input",{bubbles:!0,composed:!0}));}__tryFocusDate(){if(this.__pendingDateFocus){const i=this.focusableDateElement;i&&K(i.date,this.__pendingDateFocus)&&(delete this.__pendingDateFocus,i.focus());}}focusDate(e,i){return Me(this,null,function*(){const o=e||this.selectedDate||this.initialPosition||new Date;this.focusedDate=o,i||(this._focusedMonthDate=o.getDate()),yield this.focusDateElement(!1);})}focusDateElement(e=!0){return Me(this,null,function*(){this.__pendingDateFocus=this.focusedDate,this.calendars.length||(yield new Promise(i=>{kn(this,()=>{js(),i();});})),e&&this.revealDate(this.focusedDate),this._revealPromise&&(yield this._revealPromise),this.__tryFocusDate();})}_focusClosestDate(e){this.focusDate(zn(e,[this.minDate,this.maxDate]));}_focusAllowedDate(e,i,o){this._dateAllowed(e,void 0,void 0,()=>!1)?this.focusDate(e,o):this._dateAllowed(this.focusedDate)?i>0?this.focusDate(this.maxDate):this.focusDate(this.minDate):this._focusClosestDate(this.focusedDate);}_getDateDiff(e,i){const o=new Date(0,0);return o.setFullYear(this.focusedDate.getFullYear()),o.setMonth(this.focusedDate.getMonth()+e),i&&o.setDate(this.focusedDate.getDate()+i),o}_moveFocusByDays(e){const i=this._getDateDiff(0,e);this._focusAllowedDate(i,e,!1);}_moveFocusByMonths(e){const i=this._getDateDiff(e),o=i.getMonth();this._focusedMonthDate||(this._focusedMonthDate=this.focusedDate.getDate()),i.setDate(this._focusedMonthDate),i.getMonth()!==o&&i.setDate(0),this._focusAllowedDate(i,e,!0);}_moveFocusInsideMonth(e,i){const o=new Date(0,0);o.setFullYear(e.getFullYear()),i==="minDate"?(o.setMonth(e.getMonth()),o.setDate(1)):(o.setMonth(e.getMonth()+1),o.setDate(0)),this._dateAllowed(o)?this.focusDate(o):this._dateAllowed(e)?this.focusDate(this[i]):this._focusClosestDate(e);}_dateAllowed(e,i=this.minDate,o=this.maxDate,r=this.isDateDisabled){return Ee(e,i,o,r)}_isTodayAllowed(e,i,o){return this._dateAllowed(this._getTodayMidnight(),e,i,o)}_getTodayMidnight(){const e=new Date,i=new Date(0,0);return i.setFullYear(e.getFullYear()),i.setMonth(e.getMonth()),i.setDate(e.getDate()),i}};/**
|
|
9944
9944
|
* @license
|
|
9945
9945
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9946
9946
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9947
|
-
*/const
|
|
9947
|
+
*/const Nc=p`
|
|
9948
9948
|
:host {
|
|
9949
9949
|
display: flex;
|
|
9950
9950
|
flex-direction: column;
|
|
@@ -10008,7 +10008,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10008
10008
|
* @license
|
|
10009
10009
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10010
10010
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10011
|
-
*/f("vaadin-date-picker-overlay-content",
|
|
10011
|
+
*/f("vaadin-date-picker-overlay-content",Nc,{moduleId:"vaadin-date-picker-overlay-content-styles"});class Lc extends Mc(oe(E($(y)))){static get template(){return b`
|
|
10012
10012
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
10013
10013
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
10014
10014
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -10028,32 +10028,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10028
10028
|
<slot name="today-button"></slot>
|
|
10029
10029
|
<slot name="cancel-button"></slot>
|
|
10030
10030
|
</div>
|
|
10031
|
-
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}
|
|
10031
|
+
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}x(Lc);/**
|
|
10032
10032
|
* @license
|
|
10033
10033
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10034
10034
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10035
|
-
*/const
|
|
10035
|
+
*/const gi=new WeakMap;function Vc(s){return gi.has(s)||gi.set(s,new Set),gi.get(s)}function Fc(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const Rn=S(s=>class extends s{get slotStyles(){return {}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=Vc(e);this.slotStyles.forEach(o=>{i.has(o)||(Fc(o,e),i.add(o));});}});/**
|
|
10036
10036
|
* @license
|
|
10037
10037
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10038
10038
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10039
|
-
*/const
|
|
10039
|
+
*/const Bc=s=>class extends at(me(s)){static get properties(){return {clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),Gi||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
|
|
10040
10040
|
* @license
|
|
10041
10041
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10042
10042
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10043
|
-
*/const Xs=
|
|
10043
|
+
*/const Xs=S(s=>class extends Ds(Ns(at(s))){static get constraints(){return ["required"]}static get delegateAttrs(){return [...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver();}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
|
|
10044
10044
|
* @license
|
|
10045
10045
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10046
10046
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10047
|
-
*/const Js=s=>class extends
|
|
10047
|
+
*/const Js=s=>class extends Rn(Ht(Xs(qt(Bc(me(s)))))){static get properties(){return {allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this);}get slotStyles(){return [`
|
|
10048
10048
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
10049
10049
|
font: inherit;
|
|
10050
10050
|
color: inherit;
|
|
10051
10051
|
}
|
|
10052
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=z.debounce(this._preventInputDebouncer,
|
|
10052
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_onChange(e){e.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=z.debounce(this._preventInputDebouncer,te.after(200),()=>{this.removeAttribute("input-prevented");});}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented());}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u");}catch(i){console.error(i);}}};/**
|
|
10053
10053
|
* @license
|
|
10054
10054
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10055
10055
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10056
|
-
*/const
|
|
10056
|
+
*/const Rc=p`
|
|
10057
10057
|
[part='clear-button'] {
|
|
10058
10058
|
display: none;
|
|
10059
10059
|
cursor: default;
|
|
@@ -10070,7 +10070,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10070
10070
|
* @license
|
|
10071
10071
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10072
10072
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10073
|
-
*/const
|
|
10073
|
+
*/const $n=p`
|
|
10074
10074
|
:host {
|
|
10075
10075
|
display: inline-flex;
|
|
10076
10076
|
outline: none;
|
|
@@ -10108,7 +10108,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10108
10108
|
* @license
|
|
10109
10109
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10110
10110
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10111
|
-
*/const
|
|
10111
|
+
*/const Hn=p`
|
|
10112
10112
|
[class$='container'] {
|
|
10113
10113
|
display: flex;
|
|
10114
10114
|
flex-direction: column;
|
|
@@ -10120,23 +10120,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10120
10120
|
* @license
|
|
10121
10121
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10122
10122
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10123
|
-
*/const Qs=[
|
|
10123
|
+
*/const Qs=[$n,Hn,Rc];/**
|
|
10124
10124
|
* @license
|
|
10125
10125
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10126
10126
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10127
|
-
*/const
|
|
10127
|
+
*/const Yt=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
10128
10128
|
* @license
|
|
10129
10129
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10130
10130
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10131
|
-
*/let
|
|
10131
|
+
*/let qn=class{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");}};/**
|
|
10132
10132
|
* @license
|
|
10133
10133
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10134
10134
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10135
|
-
*/const Bc=s=>class extends jt(se($t(Xs(_e(s))))){static get properties(){return {_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Fe(this.referenceDate):new Date;a=sc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:$s},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return ["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return [...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this);}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1;}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return !this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!Rt()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new Hn(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",()=>this.__bringToFront()),this.addEventListener("touchstart",()=>this.__bringToFront());}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.$.overlay.close();}_overlayRenderer(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Fe(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ae(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return rc(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Fe(e);if(e&&!o){this.value=i;return}e?G(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=kn(n);}_getInitialPosition(){const e=Fe(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ae(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?Dn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1);}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1;}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate();}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,G(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Fe(e)}};/**
|
|
10135
|
+
*/const $c=s=>class extends Yt(oe(Ht(Xs(me(s))))){static get properties(){return {_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const i=String(e.year).replace(/\d+/u,o=>"0000".substr(o.length)+o);return [e.month+1,e.day,i].join("/")},parseDate(e){const i=e.split("/"),o=new Date;let r,n=o.getMonth(),a=o.getFullYear();if(i.length===3){if(n=parseInt(i[0])-1,r=parseInt(i[1]),a=parseInt(i[2]),i[2].length<3&&a>=0){const l=this.referenceDate?Be(this.referenceDate):new Date;a=rc(l,a,n,r);}}else i.length===2?(n=parseInt(i[0])-1,r=parseInt(i[1])):i.length===1&&(r=parseInt(i[0]));if(r!==void 0)return {day:r,month:n,year:a}},formatTitle:(e,i)=>`${e} ${i}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},isDateDisabled:{type:Function},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:$s},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return ["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers, isDateDisabled)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return [...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this);}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1;}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}get __unparsableValue(){return !this._inputElementValue||this.__parseDate(this._inputElementValue)?"":this._inputElementValue}_onFocus(e){super._onFocus(e),this._noInput&&!$t()&&e.target.blur();}_onBlur(e){super._onBlur(e),this.opened||(this.__commitParsedOrFocusedDate(),document.hasFocus()&&this.validate());}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new Ks(this._fullscreenMediaQuery,i=>{this._fullscreen=i;})),this.addController(new qn(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",()=>this.__bringToFront()),this.addEventListener("touchstart",()=>this.__bringToFront());}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.$.overlay.close();}_overlayRenderer(e){if(e.firstChild)return;const i=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(i),this._overlayContent=i,i.addEventListener("close",()=>{this._close();}),i.addEventListener("focus-input",this._focusAndSelect.bind(this)),i.addEventListener("date-tap",o=>{this.__commitDate(o.detail.date),this._close();}),i.addEventListener("date-selected",o=>{this.__commitDate(o.detail.date);}),i.addEventListener("focusin",()=>{this._keyboardActive&&this._setFocused(!0);}),i.addEventListener("focusout",o=>{this._shouldRemoveFocus(o)&&this._setFocused(!1);}),i.addEventListener("focused-date-changed",o=>{this._focusedDate=o.detail.value;}),i.addEventListener("click",o=>o.stopPropagation());}__parseDate(e){if(!this.i18n.parseDate)return;let i=this.i18n.parseDate(e);if(i&&(i=Be(`${i.year}-${i.month+1}-${i.day}`)),i&&!isNaN(i.getTime()))return i}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(Ws(e))}checkValidity(){const e=this._inputElementValue,i=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),o=!this._selectedDate||Ee(this._selectedDate,this._minDate,this._maxDate,this.isDateDisabled);let r=!0;return this.inputElement&&(this.inputElement.checkValidity?r=this.inputElement.checkValidity():this.inputElement.validate&&(r=this.inputElement.validate())),i&&o&&r}_shouldSetFocus(e){return !this._shouldKeepFocusRing}_shouldRemoveFocus(e){const{relatedTarget:i}=e;return this.opened&&i!==null&&i!==document.body&&!this.contains(i)&&!this._overlayContent.contains(i)?!0:!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive;}__commitValueChange(){const e=this.__unparsableValue;this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValue!==e&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValue=e;}__commitDate(e){this.__keepCommittedValue=!0,this._selectedDate=e,this.__keepCommittedValue=!1,this.__commitValueChange();}_close(){this._focus(),this.close();}__bringToFront(){requestAnimationFrame(()=>{this.$.overlay.bringToFront();});}_isNoInput(e,i,o,r,n,a){return !e||i&&(!a||n)||o&&n||!r.parseDate}_formatISO(e){return ac(e)}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate));}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e);}_selectedDateChanged(e,i){e===void 0||i===void 0||(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1);}_focusedDateChanged(e,i){e===void 0||i===void 0||!this._ignoreFocusedDateChange&&!this._noInput&&this._applyInputValue(e);}_valueChanged(e,i){const o=Be(e);if(e&&!o){this.value=i;return}e?K(this._selectedDate,o)||(this._selectedDate=o,i!==void 0&&this.validate()):this._selectedDate=null,this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValue=""),this._toggleHasValue(this._hasValue);}__updateOverlayContent(e,i,o,r,n,a,l,d,h){e&&(e.i18n=i,e.label=o,e.minDate=r,e.maxDate=n,e.focusedDate=a,e.selectedDate=l,e.showWeekNumbers=d,e.isDateDisabled=h);}__updateOverlayContentTheme(e,i){e&&(i?e.setAttribute("theme",i):e.removeAttribute("theme"));}__updateOverlayContentFullScreen(e,i){e&&e.toggleAttribute("fullscreen",i);}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._closedByEscape=!0,this._close(),this._closedByEscape=!1;}_onOverlayOpened(){const e=this._overlayContent;e.reset();const i=this._getInitialPosition();e.initialPosition=i;const o=e.focusedDate||i;e.scrollToDate(o),this._ignoreFocusedDateChange=!0,e.focusedDate=o,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const r=this._nativeInput;this._noInput&&r&&(r.blur(),this._overlayContent.focusDateElement());const n=this._noInput?e:[r,e];this.__showOthers=Tn(n);}_getInitialPosition(){const e=Be(this.initialPosition),i=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||Ee(i,this._minDate,this._maxDate,this.isDateDisabled)?i:this._minDate||this._maxDate?zn(i,[this._minDate,this._maxDate]):new Date}__commitParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",i=this.__parseDate(e);i?this.__commitDate(i):(this.__keepInputValue=!0,this.__commitDate(null),this.__keepInputValue=!1);}else this._focusedDate&&this.__commitDate(this._focusedDate);this._ignoreFocusedDateChange=!1;}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this._closedByEscape&&this._applyInputValue(this._selectedDate),this.__commitParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),!this.value&&!this._keyboardActive&&this.validate();}_onScroll(e){(e.target===window||!this._overlayContent.contains(e.target))&&this._overlayContent._repositionYearScroller();}_focus(){this._noInput||this.inputElement.focus();}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length);}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):"";}_setSelectionRange(e,i){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,i);}_onChange(e){e.stopPropagation();}_onClick(e){this._isClearButton(e)||this._onHostClick(e);}_onHostClick(e){(!this.autoOpenDisabled||this._noInput)&&(e.preventDefault(),this.open());}_onClearButtonClick(e){e.preventDefault(),this.__commitDate(null);}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&[9].indexOf(e.keyCode)===-1&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement());break}}_onEnter(e){this.opened?this.close():this.__commitParsedOrFocusedDate();}_onEscape(e){if(!this.opened){if(this.clearButtonVisible&&this.value&&!this.readonly){e.stopPropagation(),this._onClearButtonClick(e);return}this.inputElement.value===""?this.__commitDate(null):this._applyInputValue(this._selectedDate);}}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(!this.opened&&this._inputElementValue&&!this.autoOpenDisabled&&this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,K(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1);}}__computeMinOrMaxDate(e){return Be(e)}};/**
|
|
10136
10136
|
* @license
|
|
10137
10137
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10138
10138
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10139
|
-
*/const
|
|
10139
|
+
*/const Hc=p`
|
|
10140
10140
|
:host([opened]) {
|
|
10141
10141
|
pointer-events: auto;
|
|
10142
10142
|
}
|
|
@@ -10153,7 +10153,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10153
10153
|
* @license
|
|
10154
10154
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10155
10155
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10156
|
-
*/f("vaadin-date-picker",[Qs,
|
|
10156
|
+
*/f("vaadin-date-picker",[Qs,Hc],{moduleId:"vaadin-date-picker-styles"});class qc extends $c(Js(E(X(y)))){static get is(){return "vaadin-date-picker"}static get template(){return b`
|
|
10157
10157
|
<div class="vaadin-date-picker-container">
|
|
10158
10158
|
<div part="label">
|
|
10159
10159
|
<slot name="label"></slot>
|
|
@@ -10195,23 +10195,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10195
10195
|
></vaadin-date-picker-overlay>
|
|
10196
10196
|
|
|
10197
10197
|
<slot name="tooltip"></slot>
|
|
10198
|
-
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new
|
|
10198
|
+
`}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;},{uniqueIdPrefix:"search-input"})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this.shadowRoot.querySelector('[part="toggle-button"]').addEventListener("mousedown",e=>e.preventDefault()),this.$.overlay.addEventListener("vaadin-overlay-close",this._onVaadinOverlayClose.bind(this));}_onVaadinOverlayClose(t){t.detail.sourceEvent&&t.detail.sourceEvent.composedPath().includes(this)&&t.preventDefault();}_toggle(t){t.stopPropagation(),this.$.overlay.opened?this.close():this.open();}_openedChanged(t){super._openedChanged(t),this.$.overlay.positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this.$.overlay.noVerticalOverlap=!0;}}x(qc);/**
|
|
10199
10199
|
* @license
|
|
10200
10200
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10201
10201
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10202
|
-
*/f("vaadin-text-field",
|
|
10202
|
+
*/f("vaadin-text-field",Pe,{moduleId:"lumo-text-field-styles"});/**
|
|
10203
10203
|
* @license
|
|
10204
10204
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10205
10205
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10206
|
-
*/const
|
|
10206
|
+
*/const Uc=s=>class extends Js(s){static get properties(){return {autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(e){this.__dataValue=e;}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.value&&e.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),e.value=""),this.value&&(e.value=this.value));}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}_onInput(e){super._onInput(e),this.invalid&&this.validate();}_valueChanged(e,i){super._valueChanged(e,i),i!==void 0&&this.invalid&&this.validate();}};/**
|
|
10207
10207
|
* @license
|
|
10208
10208
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10209
10209
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10210
|
-
*/const
|
|
10210
|
+
*/const Wc=s=>class extends Uc(s){static get properties(){return {maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return [...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text");}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new Wt(this.inputElement,this._labelController));}};/**
|
|
10211
10211
|
* @license
|
|
10212
10212
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10213
10213
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10214
|
-
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends
|
|
10214
|
+
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends Wc(E(X(y))){static get is(){return "vaadin-text-field"}static get template(){return b`
|
|
10215
10215
|
<div class="vaadin-field-container">
|
|
10216
10216
|
<div part="label">
|
|
10217
10217
|
<slot name="label"></slot>
|
|
@@ -10240,11 +10240,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10240
10240
|
</div>
|
|
10241
10241
|
</div>
|
|
10242
10242
|
<slot name="tooltip"></slot>
|
|
10243
|
-
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
10243
|
+
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Un);/**
|
|
10244
10244
|
* @license
|
|
10245
10245
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10246
10246
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10247
|
-
*/const
|
|
10247
|
+
*/const jc=p`
|
|
10248
10248
|
:host {
|
|
10249
10249
|
position: absolute;
|
|
10250
10250
|
right: 0;
|
|
@@ -10257,11 +10257,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10257
10257
|
background: transparent;
|
|
10258
10258
|
outline: none;
|
|
10259
10259
|
}
|
|
10260
|
-
`;f("vaadin-password-field-button",[In,
|
|
10260
|
+
`;f("vaadin-password-field-button",[In,jc],{moduleId:"lumo-password-field-button"});/**
|
|
10261
10261
|
* @license
|
|
10262
10262
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10263
10263
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10264
|
-
*/const
|
|
10264
|
+
*/const Yc=p`
|
|
10265
10265
|
[part='reveal-button']::before {
|
|
10266
10266
|
content: var(--lumo-icons-eye);
|
|
10267
10267
|
}
|
|
@@ -10279,27 +10279,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10279
10279
|
[part='reveal-button'][hidden] {
|
|
10280
10280
|
display: none !important;
|
|
10281
10281
|
}
|
|
10282
|
-
`;f("vaadin-password-field",[
|
|
10282
|
+
`;f("vaadin-password-field",[Pe,Yc],{moduleId:"lumo-password-field"});/**
|
|
10283
10283
|
* @license
|
|
10284
10284
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10285
10285
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10286
|
-
*/f("vaadin-password-field-button",
|
|
10286
|
+
*/f("vaadin-password-field-button",Dn,{moduleId:"vaadin-password-field-button-styles"});class Gc extends Us($(E(y))){static get is(){return "vaadin-password-field-button"}static get template(){return b``}}x(Gc);/**
|
|
10287
10287
|
* @license
|
|
10288
10288
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10289
10289
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10290
|
-
*/const
|
|
10290
|
+
*/const Kc=s=>class extends Rn(Te(fe(at(s)))){static get properties(){return {revealButtonHidden:{type:Boolean,observer:"_revealButtonHiddenChanged",value:!1},passwordVisible:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_passwordVisibleChanged",readOnly:!0},i18n:{type:Object,value:()=>({reveal:"Show password"})}}}static get observers(){return ["__i18nChanged(i18n)"]}constructor(){super(),this._setType("password"),this.__boundRevealButtonClick=this._onRevealButtonClick.bind(this),this.__boundRevealButtonMouseDown=this._onRevealButtonMouseDown.bind(this),this.__lastChange="";}get slotStyles(){const e=this.localName;return [...super.slotStyles,`
|
|
10291
10291
|
${e} [slot="input"]::-ms-reveal {
|
|
10292
10292
|
display: none;
|
|
10293
10293
|
}
|
|
10294
|
-
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new
|
|
10294
|
+
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new G(this,"reveal","vaadin-password-field-button",{initializer:e=>{e.disabled=this.disabled,e.addEventListener("click",this.__boundRevealButtonClick),e.addEventListener("mousedown",this.__boundRevealButtonMouseDown);}}),this.addController(this._revealButtonController),this.__updateAriaLabel(this.i18n),this._updateToggleState(!1),this._toggleRevealHidden(this.revealButtonHidden),this.inputElement&&(this.inputElement.autocapitalize="off");}_onChange(e){super._onChange(e),this.__lastChange=this.inputElement.value;}_shouldSetFocus(e){return e.target===this.inputElement||e.target===this._revealNode}_shouldRemoveFocus(e){return !(e.relatedTarget===this._revealNode||e.relatedTarget===this.inputElement&&e.target===this._revealNode)}_setFocused(e){if(super._setFocused(e),!e)this._setPasswordVisible(!1),this.__lastChange!==this.inputElement.value&&(this.__lastChange=this.inputElement.value,this.dispatchEvent(new CustomEvent("change",{bubbles:!0})));else {const i=this.getRootNode().activeElement===this._revealNode;this.toggleAttribute("focus-ring",this._keyboardActive&&!i);}}__updateAriaLabel(e){e&&e.reveal&&this._revealNode&&this._revealNode.setAttribute("aria-label",e.reveal);}__i18nChanged(e){this.__updateAriaLabel(e);}_revealButtonHiddenChanged(e){this._toggleRevealHidden(e);}_togglePasswordVisibility(){this._setPasswordVisible(!this.passwordVisible);}_onRevealButtonClick(){this._togglePasswordVisibility();}_onRevealButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_toggleRevealHidden(e){this._revealNode&&(e?(this._revealPart.setAttribute("hidden",""),this._revealNode.setAttribute("tabindex","-1"),this._revealNode.setAttribute("aria-hidden","true")):(this._revealPart.removeAttribute("hidden"),this._revealNode.setAttribute("tabindex","0"),this._revealNode.removeAttribute("aria-hidden")));}_updateToggleState(e){this._revealNode&&this._revealNode.setAttribute("aria-pressed",e?"true":"false");}_passwordVisibleChanged(e){this._setType(e?"text":"password"),this._updateToggleState(e);}_disabledChanged(e,i){super._disabledChanged(e,i),this._revealNode&&(this._revealNode.disabled=e);}};/**
|
|
10295
10295
|
* @license
|
|
10296
10296
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10297
10297
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10298
|
-
*/const
|
|
10298
|
+
*/const Xc=b`
|
|
10299
10299
|
<div part="reveal-button" slot="suffix">
|
|
10300
10300
|
<slot name="reveal"></slot>
|
|
10301
10301
|
</div>
|
|
10302
|
-
`;let
|
|
10302
|
+
`;let pt;class Jc extends Kc(Un){static get is(){return "vaadin-password-field"}static get template(){if(!pt){pt=super.template.cloneNode(!0);const t=Xc.content.querySelector('[part="reveal-button"]');pt.content.querySelector('[part="input-field"]').appendChild(t);}return pt}}x(Jc);const Zs=p`
|
|
10303
10303
|
:host {
|
|
10304
10304
|
display: flex;
|
|
10305
10305
|
align-items: center;
|
|
@@ -10383,7 +10383,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10383
10383
|
width: var(--lumo-icon-size-m);
|
|
10384
10384
|
height: var(--lumo-icon-size-m);
|
|
10385
10385
|
}
|
|
10386
|
-
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const
|
|
10386
|
+
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const Qc=p`
|
|
10387
10387
|
:host {
|
|
10388
10388
|
transition: background-color 100ms;
|
|
10389
10389
|
overflow: hidden;
|
|
@@ -10395,11 +10395,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10395
10395
|
:host([focused]:not([disabled])) {
|
|
10396
10396
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
10397
10397
|
}
|
|
10398
|
-
`;f("vaadin-combo-box-item",[Zs,
|
|
10398
|
+
`;f("vaadin-combo-box-item",[Zs,Qc],{moduleId:"lumo-combo-box-item"});/**
|
|
10399
10399
|
* @license
|
|
10400
10400
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10401
10401
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10402
|
-
*/const
|
|
10402
|
+
*/const Zc=p`
|
|
10403
10403
|
[part~='loader'] {
|
|
10404
10404
|
box-sizing: border-box;
|
|
10405
10405
|
width: var(--lumo-icon-size-s);
|
|
@@ -10441,7 +10441,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10441
10441
|
transform: rotate(360deg);
|
|
10442
10442
|
}
|
|
10443
10443
|
}
|
|
10444
|
-
`,
|
|
10444
|
+
`,eu=p`
|
|
10445
10445
|
[part='content'] {
|
|
10446
10446
|
padding: 0;
|
|
10447
10447
|
}
|
|
@@ -10462,7 +10462,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10462
10462
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
10463
10463
|
margin-bottom: var(--lumo-space-xs);
|
|
10464
10464
|
}
|
|
10465
|
-
`,
|
|
10465
|
+
`,tu=p`
|
|
10466
10466
|
[part~='loader'] {
|
|
10467
10467
|
position: absolute;
|
|
10468
10468
|
z-index: 1;
|
|
@@ -10470,24 +10470,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10470
10470
|
top: var(--lumo-space-s);
|
|
10471
10471
|
margin-inline: auto 0;
|
|
10472
10472
|
}
|
|
10473
|
-
`;f("vaadin-combo-box-overlay",[
|
|
10473
|
+
`;f("vaadin-combo-box-overlay",[Vs,Fs,eu,Zc,tu,p`
|
|
10474
10474
|
:host {
|
|
10475
10475
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
10476
10476
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
10477
10477
|
}
|
|
10478
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
10478
|
+
`],{moduleId:"lumo-combo-box-overlay"});const iu=p`
|
|
10479
10479
|
[part='toggle-button']::before {
|
|
10480
10480
|
content: var(--lumo-icons-dropdown);
|
|
10481
10481
|
}
|
|
10482
|
-
`;f("vaadin-combo-box",[
|
|
10482
|
+
`;f("vaadin-combo-box",[Pe,iu],{moduleId:"lumo-combo-box"});/**
|
|
10483
10483
|
* @license
|
|
10484
10484
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10485
10485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10486
|
-
*/const
|
|
10486
|
+
*/const su=s=>class extends s{static get properties(){return {index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return ["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return [...super.observedAttributes,"hidden"]}attributeChangedCallback(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
10487
10487
|
* @license
|
|
10488
10488
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10489
10489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10490
|
-
*/class
|
|
10490
|
+
*/class ou extends su(E($(y))){static get template(){return b`
|
|
10491
10491
|
<style>
|
|
10492
10492
|
:host {
|
|
10493
10493
|
display: block;
|
|
@@ -10501,15 +10501,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10501
10501
|
<div part="content">
|
|
10502
10502
|
<slot></slot>
|
|
10503
10503
|
</div>
|
|
10504
|
-
`}static get is(){return "vaadin-combo-box-item"}}
|
|
10504
|
+
`}static get is(){return "vaadin-combo-box-item"}}x(ou);/**
|
|
10505
10505
|
* @license
|
|
10506
10506
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10507
10507
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10508
|
-
*/const
|
|
10508
|
+
*/const ru=s=>class extends qs(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!Ps(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.clientWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
10509
10509
|
* @license
|
|
10510
10510
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10511
10511
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10512
|
-
*/const
|
|
10512
|
+
*/const nu=p`
|
|
10513
10513
|
#overlay {
|
|
10514
10514
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
10515
10515
|
}
|
|
@@ -10519,17 +10519,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10519
10519
|
flex-direction: column;
|
|
10520
10520
|
height: 100%;
|
|
10521
10521
|
}
|
|
10522
|
-
`;f("vaadin-combo-box-overlay",[
|
|
10522
|
+
`;f("vaadin-combo-box-overlay",[Rs,nu],{moduleId:"vaadin-combo-box-overlay-styles"});class au extends ru(Hs($(E(y)))){static get is(){return "vaadin-combo-box-overlay"}static get template(){return b`
|
|
10523
10523
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
10524
10524
|
<div part="overlay" id="overlay">
|
|
10525
10525
|
<div part="loader"></div>
|
|
10526
10526
|
<div part="content" id="content"><slot></slot></div>
|
|
10527
10527
|
</div>
|
|
10528
|
-
`}}
|
|
10528
|
+
`}}x(au);/**
|
|
10529
10529
|
* @license
|
|
10530
10530
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10531
10531
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10532
|
-
*/function
|
|
10532
|
+
*/function Ot(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
10533
10533
|
* @license
|
|
10534
10534
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
10535
10535
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -10537,23 +10537,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10537
10537
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
10538
10538
|
* Code distributed by Google as part of the polymer project is also
|
|
10539
10539
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10540
|
-
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
10540
|
+
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),lu=tr&&tr[1]>=8,ir=3,du={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),Tt);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,ir,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),dn):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),Tt));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(ir));},_itemsChanged(s){s.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,tt));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!lu&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(He(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null;},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0;},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1);},tt);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=z.debounce(this._debouncers[s],e,t.bind(this)),hn(this._debouncers[s]);}};/**
|
|
10541
10541
|
* @license
|
|
10542
10542
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10543
10543
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10544
|
-
*/const lu=1e5,gi=1e3;let qn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<gi?(i=t,this._vidxOffset=0):(i=gi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),$e(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){$e();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,et,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),$e(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),$e(),this._debounce("_update",this._update,kt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,lu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,ee.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,ee.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,et,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,ee.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Hh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=gi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(qn.prototype,au);let du=class{constructor(t){this.__adapter=new qn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
10544
|
+
*/const hu=1e5,bi=1e3;let Wn=class{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<bi?(i=t,this._vidxOffset=0):(i=bi,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=z.debounce(this.__placeholderClearDebouncer,tt,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,Tt);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,hu)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=z.debounce(this.__fixInvalidItemPositioningDebouncer,te.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=z.debounce(this.__scrollReorderDebouncer,te.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=z.debounce(this.__debouncerWheelAnimationFrame,tt,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=z.debounce(this._debouncerIgnoreNewWheel,te.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(Uh){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=bi,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}};Object.setPrototypeOf(Wn.prototype,du);let cu=class{constructor(t){this.__adapter=new Wn(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}};/**
|
|
10545
10545
|
* @license
|
|
10546
10546
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10547
10547
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10548
|
-
*/const
|
|
10548
|
+
*/const Se=class{toString(){return ""}};/**
|
|
10549
10549
|
* @license
|
|
10550
10550
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10551
10551
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10552
|
-
*/const
|
|
10552
|
+
*/const uu=s=>class extends s{static get properties(){return {items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this);}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${Rt()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof Se?!1:o&&e!==void 0&&i!==void 0?Ot(o,e)===Ot(o,i):e===i}__initVirtualizer(){this.__virtualizer=new cu({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.performUpdate&&!e.hasUpdated&&e.performUpdate(),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof Se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
10553
10553
|
* @license
|
|
10554
10554
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10555
10555
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10556
|
-
*/class
|
|
10556
|
+
*/class pu extends uu(y){static get is(){return "vaadin-combo-box-scroller"}static get template(){return b`
|
|
10557
10557
|
<style>
|
|
10558
10558
|
:host {
|
|
10559
10559
|
display: block;
|
|
@@ -10580,27 +10580,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10580
10580
|
<div id="selector">
|
|
10581
10581
|
<slot></slot>
|
|
10582
10582
|
</div>
|
|
10583
|
-
`}}
|
|
10583
|
+
`}}x(pu);/**
|
|
10584
10584
|
* @license
|
|
10585
10585
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10586
10586
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10587
|
-
*/const
|
|
10587
|
+
*/const _u=s=>class extends Xs(s){static get properties(){return {pattern:{type:String}}}static get delegateAttrs(){return [...super.delegateAttrs,"pattern"]}static get constraints(){return [...super.constraints,"pattern"]}};/**
|
|
10588
10588
|
* @license
|
|
10589
10589
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10590
10590
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10591
|
-
*/function
|
|
10591
|
+
*/function Dt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Dt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function jn({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=jn({getItemId:s},r,e,i+1,n+1);if(a)return a}}function Yn(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?Yn(r,e,i+o+1):i+o}/**
|
|
10592
10592
|
* @license
|
|
10593
10593
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10594
10594
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10595
|
-
*/let
|
|
10595
|
+
*/let mu=class Gn{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new Gn(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Dt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Dt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}};/**
|
|
10596
10596
|
* @license
|
|
10597
10597
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10598
10598
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10599
|
-
*/let
|
|
10599
|
+
*/let fu=class extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return Dt(this.rootCache,e)}getItemContext(e){return jn({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return Yn(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new mu(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}};/**
|
|
10600
10600
|
* @license
|
|
10601
10601
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10602
10602
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10603
|
-
*/const
|
|
10603
|
+
*/const vu=s=>class extends s{static get properties(){return {pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return ["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new fu(this,{placeholder:new Se,isPlaceholder:e=>e instanceof Se,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this));}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue();}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0);}_sizeChanged(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`");}}};/**
|
|
10604
10604
|
* @license
|
|
10605
10605
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10606
10606
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -10608,11 +10608,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10608
10608
|
* @license
|
|
10609
10609
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10610
10610
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10611
|
-
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Ee?!1:t(e))}const fu=s=>class extends jt(se(Ms(me(_e(nt(ke(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),eo(this),this.addController(new Hn(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Ps(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Yi&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Pt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Pt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Yi&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Ee)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(Rt()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
10611
|
+
*/function sr(s){return s!=null}function or(s,t){return s.findIndex(e=>e instanceof Se?!1:t(e))}const gu=s=>class extends Yt(oe(Ns(fe(me(at(Te(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),eo(this),this.addController(new qn(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){if(e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}),e.performUpdate&&!e.hasUpdated))try{e.performUpdate();}catch(u){}}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&Os(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!Gi&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Ot(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Ot(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{Gi&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(sr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this.validate(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!sr(i)?-1:or(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:or(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof Se)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if($t()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
10612
10612
|
* @license
|
|
10613
10613
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10614
10614
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10615
|
-
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class
|
|
10615
|
+
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class bu extends vu(gu(_u(Js(E(X(y)))))){static get is(){return "vaadin-combo-box"}static get template(){return b`
|
|
10616
10616
|
<style>
|
|
10617
10617
|
:host([opened]) {
|
|
10618
10618
|
pointer-events: auto;
|
|
@@ -10657,33 +10657,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10657
10657
|
></vaadin-combo-box-overlay>
|
|
10658
10658
|
|
|
10659
10659
|
<slot name="tooltip"></slot>
|
|
10660
|
-
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new
|
|
10660
|
+
`}static get properties(){return {_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new Ut(this,t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t;})),this.addController(new Wt(this.inputElement,this._labelController)),this._tooltipController=new _e(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(t=>!t.opened),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton;}_onClearButtonClick(t){t.stopPropagation(),super._onClearButtonClick(t);}_onHostClick(t){const e=t.composedPath();(e.includes(this._labelNode)||e.includes(this._positionTarget))&&super._onHostClick(t);}}x(bu);/**
|
|
10661
10661
|
* @license
|
|
10662
10662
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
10663
10663
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10664
|
-
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function
|
|
10664
|
+
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function yu(s){return s.replace(/-[a-z]/gu,t=>t[1].toUpperCase())}const q={};function J(s,t="24.8.0"){if(Object.defineProperty(s,"version",{get(){return t}}),s.experimental){const i=typeof s.experimental=="string"?s.experimental:`${yu(s.is.split("-").slice(1).join("-"))}Component`;if(!window.Vaadin.featureFlags[i]&&!q[i]){q[i]=new Set,q[i].add(s),Object.defineProperty(window.Vaadin.featureFlags,i,{get(){return q[i].size===0},set(o){o&&q[i].size>0&&(q[i].forEach(r=>{customElements.define(r.is,r);}),q[i].clear());}});return}else if(q[i]){q[i].add(s);return}}const e=customElements.get(s.is);if(!e)customElements.define(s.is,s);else {const i=e.version;i&&s.version&&i===s.version?console.warn(`The component ${s.is} has been loaded twice`):console.error(`Tried to define ${s.is} version ${s.version} when version ${e.version} is already in use. Something will probably break.`);}}/**
|
|
10665
10665
|
* @license
|
|
10666
10666
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10667
10667
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10668
|
-
*/class
|
|
10668
|
+
*/class xu extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}J(xu);/**
|
|
10669
|
+
* @license
|
|
10670
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
10671
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10672
|
+
*/function Cu(s){const t=s.constructor,e=s.__cssInjectorStyleSheet;return e?[...t.baseStyles,e,...t.themeStyles]:t.elementStyles}function wu(s){[...s.shadowRoot.querySelectorAll("style")].forEach(t=>t.remove()),_s(s.shadowRoot,Cu(s));}/**
|
|
10669
10673
|
* @license
|
|
10670
10674
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10671
10675
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10672
|
-
*/const
|
|
10676
|
+
*/const Iu=s=>class extends s{static get properties(){return {_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return [...super.observedAttributes,"theme"]}attributeChangedCallback(e,i,o){super.attributeChangedCallback(e,i,o),e==="theme"&&this._set_theme(o);}};/**
|
|
10673
10677
|
* @license
|
|
10674
10678
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10675
10679
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10676
|
-
*/const
|
|
10677
|
-
`)}const
|
|
10680
|
+
*/const Kn=[],ts=new Set,to=new Set;function Xn(s){return s&&Object.prototype.hasOwnProperty.call(s,"__themes")}function Au(s){return Xn(customElements.get(s))}function Eu(s=[]){return [s].flat(1/0).filter(t=>t instanceof Lt?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function Jn(s,t){return (s||"").split(" ").some(e=>new RegExp(`^${e.split("*").join(".*")}$`,"u").test(t))}function Qn(s){return s.map(t=>t.cssText).join(`
|
|
10681
|
+
`)}const zt="vaadin-themable-mixin-style";function Su(s,t){const e=document.createElement("style");e.id=zt,e.textContent=Qn(s),t.content.appendChild(e);}function ku(s){if(!s.shadowRoot)return;const t=s.constructor;if(s instanceof ee)wu(s);else {const e=s.shadowRoot.getElementById(zt),i=t.prototype._template;e.textContent=i.content.getElementById(zt).textContent;}}function Tu(s){ts.forEach(t=>{const e=t.deref();e instanceof s?ku(e):e||ts.delete(t);});}function Zn(s){if(s.prototype instanceof ee)s.elementStyles=s.finalizeStyles(s.styles);else {const t=s.prototype._template;t.content.getElementById(zt).textContent=Qn(s.getStylesForThis());}to.forEach(t=>{const e=customElements.get(t);e!==s&&e.prototype instanceof s&&Zn(e);});}function Pu(s,t){const e=s.__themes;return !e||!t?!1:e.some(i=>i.styles.some(o=>t.some(r=>r.cssText===o.cssText)))}function I(s,t,e={}){t=Eu(t),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(s,t,e):Kn.push({themeFor:s,styles:t,include:e.include,moduleId:e.moduleId}),s&&to.forEach(i=>{if(Jn(s,i)&&Au(i)){const o=customElements.get(i);Pu(o,t)?console.warn(`Registering styles that already exist for ${i}`):(!window.Vaadin||!window.Vaadin.suppressPostFinalizeStylesWarning)&&console.warn(`The custom element definition for "${i}" was finalized before a style module was registered. Ideally, import component specific style modules before importing the corresponding custom element. This warning can be suppressed by setting "window.Vaadin.suppressPostFinalizeStylesWarning = true".`),Zn(o),Tu(o);}});}function is(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():Kn}function Ou(s=""){let t=0;return s.startsWith("lumo-")||s.startsWith("material-")?t=1:s.startsWith("vaadin-")&&(t=2),t}function ea(s){const t=[];return s.include&&[].concat(s.include).forEach(e=>{const i=is().find(o=>o.moduleId===e);i?t.push(...ea(i),...i.styles):console.warn(`Included moduleId ${e} not found in style registry`);},s.styles),t}function Du(s){const t=`${s}-default-theme`,e=is().filter(i=>i.moduleId!==t&&Jn(i.themeFor,s)).map(i=>ze(H({},i),{styles:[...ea(i),...i.styles],includePriority:Ou(i.moduleId)})).sort((i,o)=>o.includePriority-i.includePriority);return e.length>0?e:is().filter(i=>i.moduleId===t)}const Oe=s=>class extends Iu(s){constructor(){super(),ts.add(new WeakRef(this));}static finalize(){if(super.finalize(),this.is&&to.add(this.is),this.elementStyles)return;const e=this.prototype._template;!e||Xn(this)||Su(this.getStylesForThis(),e);}static finalizeStyles(e){return this.baseStyles=e?[e].flat(1/0):[],this.themeStyles=this.getStylesForThis(),[...this.baseStyles,...this.themeStyles]}static getStylesForThis(){const e=s.__themes||[],i=Object.getPrototypeOf(this.prototype),o=(i?i.constructor.__themes:[])||[];this.__themes=[...e,...o,...Du(this.is)];const r=this.__themes.flatMap(n=>n.styles);return r.filter((n,a)=>a===r.lastIndexOf(n))}};/**
|
|
10678
10682
|
* @license
|
|
10679
10683
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10680
10684
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10681
|
-
*/const
|
|
10682
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
10685
|
+
*/const zu=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
10686
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},De=(s,...t)=>{zu(`lumo-${s}`,t);};/**
|
|
10683
10687
|
* @license
|
|
10684
10688
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10685
10689
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10686
|
-
*/const
|
|
10690
|
+
*/const Mu=p`
|
|
10687
10691
|
:host {
|
|
10688
10692
|
/* Base (background) */
|
|
10689
10693
|
--lumo-base-color: #fff;
|
|
@@ -10768,7 +10772,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10768
10772
|
--lumo-disabled-text-color: GrayText;
|
|
10769
10773
|
}
|
|
10770
10774
|
}
|
|
10771
|
-
`;
|
|
10775
|
+
`;De("color-props",Mu);const Nu=p`
|
|
10772
10776
|
[theme~='dark'] {
|
|
10773
10777
|
/* Base (background) */
|
|
10774
10778
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -10886,11 +10890,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10886
10890
|
pre code {
|
|
10887
10891
|
background: transparent;
|
|
10888
10892
|
}
|
|
10889
|
-
`;
|
|
10893
|
+
`;I("",Nu,{moduleId:"lumo-color"});/**
|
|
10890
10894
|
* @license
|
|
10891
10895
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10892
10896
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10893
|
-
*/const
|
|
10897
|
+
*/const Lu=p`
|
|
10894
10898
|
@font-face {
|
|
10895
10899
|
font-family: 'lumo-icons';
|
|
10896
10900
|
src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABHAAAsAAAAAI6AAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAQwAAAFZAIUuNY21hcAAAAYgAAAD+AAADymne8hxnbHlmAAACiAAAC+gAABioIzlOlWhlYWQAAA5wAAAAMAAAADZa/6SsaGhlYQAADqAAAAAdAAAAJAbpA4BobXR4AAAOwAAAABAAAAC0q+AAAGxvY2EAAA7QAAAAXAAAAFyF7o1GbWF4cAAADywAAAAfAAAAIAFMAXBuYW1lAAAPTAAAATEAAAIuUUJZCHBvc3QAABCAAAABPQAAAgfdkltveJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGS+xDiBgZWBgamKaQ8DA0MPhGZ8wGDIyAQUZWBlZsAKAtJcUxgcXjG+0mEO+p/FEMUcxDANKMwIkgMABvgMMAB4nO3SV26EMABF0UsZpjG9d6Y3FpgF5StLYxMTP16WEUvHV1gGIQzQAJKgDFKIfojQ+A6rUb2e0KnXU77qPanWq/LzCXOkOVyn9RyHvWl4YkaTFu1wX5ecHn0GDBkxZsKUGXMWLFmxZsOWHXsOFBw5cebClRt3Hjx58dZ7RRn/I9cUF39Xpb691acRG2piOtUqNZ1P1TCdeJUZatNQW4baNtSO6U+ouoaam96u6hlq31AHhjo01JGhjg11YqhTQ50Z6txQF4a6NNSVoa4NdWOoW0PdGereUA+GWhjq0VBPhno21IuhXg31Zqh3Q30Y6tNQX4b6NtTSKH8BOIRpQQAAeJy1WH1sW9UVv+fG9vPz+7Bf/N6zHcd2/J04jbP6s0lap4kDpB9JWzUUCqxNgaHxpTI6hNhUNLVr17HSISb2D2iAJrWb6FTWahNQdQxRvmHamAR0qibE1E18CG3QaVNFvJ17n+3YIf1AiMQ679x77j3v3HPPPed3H7ER/OsYpw8TmQRIiuQJ8RZK+WjO1B3xaCzla21orY10a+OQ6aHTHtP0zB31mBs1GZ6RNU2uXc7oPL+xdRS9R9X1oK4fVfijdsBqvqF6vd1eLzPrYrYZ57WteF7bPDIc5+ZcJnta+S9i2Vfhs4MaMwZNQmO0Vv7gF/MZcNsCcJp4sJFSwYyAmRuFCmTBDRBUkwGqnlViyjmVBpLqaXhNpt0J5V1JOqMkuqn8WkMHvZX+iOlImiqkBiFVYDrCqINulmkwKb8ry2fkZBBn7FcTlk4ZdfpRZ9MOesLSAakKt0N3g4p2jAL8eIEOOqom/U0lgQRXUl8LtXM7HFkojUIpF0ErVBhcZC1vtyjtpsqr83a8RVcSH+ool8LgcIMjNohmVCACuDs506BdO6WIQeXjUsh1XKZGRNpp9piv3+Givoh00OU6KEV81HUHTLtN093Q+YGlE3wLHWRtMNy9XWqdLm2HKbaNsGzhu+41eswFOjE6WKSk2/1Wpt+qHeM6phbohmVmj3GvpdcVkiy9zbXfzHVqKuDB0IR2P6ZpF+D7dy6YC/9svGmBE5hKB9+X2+hh4iYRMkhGyTqyFc9APmeGQHf043tWQKHkizmwaY5AroTNVJzJDc2SFzUu92kOLsdmKu77vByb8/IjtxmhkMFISRBFISO4XMLJlj4XgGuRXtaHw2FLyHifdSOpisIhJjgkiPBAyJh7lfXTkhEadwk1mUngrOC6MazX7mASeEAPV1FyjEumBOaEDu4DP/ogRDKkiLEV1woVyMeLLKJCEM+FwdCwL4XLcRgdbfkhbzS8BNvXDKzNQiAWgOzagTXF1Eyq+Ci6/TPm/JrNY/59p1epKN4jQFGe0fx+LTMwNVCrAU2VSqnaKYzIiGmWe2Rvp9KDJhncrjLaFce8VCUbyQ1kB9lNfkJ+To6R58mfyd/Ip9ABXohDHqqwEW7A2Mij1ehntLu+h8xMtocjUJcYwoLdtYafv/1Vjy8vjLaLtBfOt3/B931Rexa24e5zstgnyqvZHs69zuhq3vFgRpQVJyN7FuE++RLSeW4xMi+t6Zeo5sIK6S5dlGVRD2hWnGoB3j7OV3lesvNLic8tOnLRSRfRdOna63VJp/1WbYs5dFZjy1AqpGICQEWKmNI+CZNoVTJ7pNop+IZkRrBHgnEmqr3TrEsfw1Gi8LqE+S1aV0SNNwXVVVvuUoU3ld6TLwmditIpvKTU50zSzWwO1h0rL8awnulwTXMYrGDT4aQ1fb4GPkyv5vMEh5Vec6yw0AMXnfcx1l/rfVZaKLDi0W4j/HfeyGZuHOf1IUGW1udizU2leXY0OmLpVDpVKJfKpZzPRKHgEBzpXAUKWYipoIeBdl3JfLZVBizEqWun1i4ZGFiyduq3DebayXsmJ+95gBG4+Urm1a2SdpKV57lP2wZyZqI+FAlfUtO+NCmgdWhMOS1gDY+jHWnBhwjBQLMEXxmLbx6t9JXTWDLtsSxgisfErqvQMbbBoywZmeyLeWe8OWNydFDxzMx4lMGRtX0xN3YFJkeW+O0bascGNwwObtjCCOzrzAVWjSwN2K9cpyn9o5cZOXMmkAuM85EbNHnJyHhfLLCnPhxJYw9eoIMkyC3l+4ZuY5ig7lW2oYUynDgg+Xrk+++Xe3zSgRYetnyuy+KbfjiB+GAAtZ8HHXmtijZfFFgrujhmOs2qkXvuSV6WqA1WLYqhPHOfsa26rklKFqbAGL2dOIlGurB6LWFVFd/KoBBaYTFYVBs93hZRFlrG5Ex4NVFIJguJVvqnBW2kNNvFGx90YUcSEvyZSMDeZjc0xYlEYy8+hHcWx9YrZOaPPyCGepP5Q34aXnGBr8d1QhSf4yjtiebZqNJfEYl4SY6dDRb8WSguLZW9ZQtBpoW4hX0QMyB2KmsYcOh8HMQxBn288oZ6BXV0GOq/ClKsC6T8g9X3OFKZNkJrYkOx2lEk+KNDy953+wGHXuGGzhGZ+uLK8FVrQkbtKBv+9EztU2sgTCNpvXMdJjqJ4tkdw+x00dPKkZ1QR254x7GQoFmvfakSnL3gCc5nREly2mN2pyTLMacMipNT7YInGU7JzlN2p9N+yinXTirOKEvPUafSWMNDmCf9pIQYaG19DSxKGqvAQ+xg60iabEm5MheUU2n+HxO4TDDbjnw6xxK8QzfhbHXq8pWVqanKysun9s6ztdt7sivGqruqYyuyPS6Hw9XehGt6q+l0dT0jvaFMZjiTuTHo7+vdtHJTb58/2ML+IxHt9/n9vv5owiWKrrbWD+sakKxhKoYzxF5f7y9INxki42QNuYrVFDPfvqxyY83xWNMV+ZxPSMWb62W+wPSCJwkDDl1WZOGW84nAEo4A7HjB/uWmOdayRFnKjazi668u/ajJlUd87aPk048Crlu4j1Oh9gxdL3Z1inNPIt2xvKNlsU4hn54Z5Y6YbTDu9hHOvkcFAb35fU6hNovKOrtQmcvbNV9/Ntfv5xf4atDWOOTX6CSHZ08xujhPs51+f9zvf1YLIGoPPKvxVh0TSLAXzzUBFiXs7GJVB7vH5/PAXznd4+vx4a95h3qI/oYIpIdMkA1kC7kVLS3GhWI5bwj1fIaVKG/Ei5gXWOjhtcJbzFthaMQrwIcIRj0ppvO6yV95icu9j/YPDNySWp7w+kOr95R1RfGpfVlDVhS/2geJ5Umv2mn0rkxBvzvgdisndJXaVF1X5z5jdHGe2n/QnYo8+b2uaMivhowgjYcLnVqnrEpQezsieyVZ6ooETbdJO6ip+cORLpes6BL82/qg8VHbo45B/vch/YQeJX28QvEANR3sQhxh+TcMCEd4l8BKF7uID7KM05tRYlIHHXY63YIi2fXQyj5XSBbcMeewKLpttkJ2Syz33YJfDdJdSYkqHbYb3VHRJgTV8c0TAy67YHeK7htwOKWax5co7Do8Pfh1tKdx1g5j9o6TZeQyMo27FuW3vbYsbY/Op3AG06DMKionRlpgHzCEeMmLU5opRrCyS670RzppZeW5p/iT3jL3lB4O63QS6dzzh8SAtOqwGJK3bv+lGJTWbr++471wsVKMRJCEK5H+cLg/Qp+IDsdqs7HhKD7hMXyyrD/Li8RjRqimHhI7HP2vSDZn9brplySb0L9dgpURSwmSiBFhilrwB8OA9gZ29NkRO/669parW9e7XZDxwvgRu+SE7zgl+xG5p/HtRqJ3cdwSZwsbwTA1WT3jEdyPN0sWxvDGy+xovIzHosnwc9LePf9tywun0fMkWaFYZbB4oovRq8VyKYUBkMVXqVhBHSylQ0wanvla3+rQ1XbR8ZzstYOo2Mf7vjk8ftcGDWxdSdXx0cAVveHg1TZFtEOn8ntBBFs11V++vuLUQ5qz+U6d/oUjpGIdNjOQhJXNqn5YCS1Yy5PofLGEs6Js2yOKe2yyOLxtaGjbt7cNIURCEDdWfaQ6lurtRYbePCuItv1iUNxvE4Vdw2zQ0LZhdv2fxjHp5uAmdlBpopHXoJGU8e6BRc0yi+PztkaHTRRrW1m2hcfFLlEUzzD+DGczjEVCg9jEQZhFcdAL2DjD+DPiSWQzjM2I89g5RXdxfECS+CIWy1hTGmFs6EIbkv/pbtkfU3aPrZ+4c2Lizn07qufym/L5TTdtyuU2/We3HPeDsjtb3bGPSSfW31aX3LQpX/d9sL7fWYpRJPBbCJavYjrFjj0rT2GWCZjf6Ytffr8beXl/HYeyGwJiIK8FLDHbfo65xGz7YCSRqCQSkbbHI5eUU5X4sjj+zrU9aHnRlEnrd7YGptd0x2Jf/RbH9PAiovadckSnEsJ661OgPFuH9B4O6e202vIN0h9xHXSJh1wRP5Vqv1uI6Wn9Gxmrwzqrii1gqhEscJanuAlGas+s2/uzvetgS72NpHZ6aHbZstmh/wPq1seEeJxjYGRgYADi31ySEvH8Nl8ZuJlfAEUYalQ3NCLo/6+ZpzLdAnI5GJhAogAiBgraeJxjYGRgYA76nwUkXzAAAfNUBkYGVKALAFb4A3EAAAB4nGNgYGBgfjG0MAAMzihlAAAAAABOAJoA6AEKASwBTgFwAZoBxAHuAhoCnALoBJoEvATWBPIFDgUqBXoF0AX+BkQGlga4BwgHagfiCGoIpAi8CVAJmAoQCiwKVgqQCtYLGAtOC4gL6AwuDFR4nGNgZGBg0GVMYRBlAAEmIOYCQgaG/2A+AwAYygG+AHicbZE9TsMwGIbf9A/RSggEYmHxAgtq+jN2ZGj3Dt3T1GlTOXHkuBW9AyfgEByCgTNwCA7BW/NJlVBtyd/jx+8XKwmAa3whwnFE6Ib1OBq44O6Pm6Qb4Rb5QbiNHh6FO/RD4S6eMRHu4RaaT4halzR3eBVu4Apvwk36d+EW+UO4jXt8Cnfov4W7WOBHuIen6MXsCtvPU1vWc73emcSdxIkW2tW5LdUoHp7kTJfaJV6v1PKg6v167H2mMmcLNbWl18ZYVTm71amPN95Xk8EgEx+ntoDBDgUs+siRspaoMef7rukNEriziXNuwS7Hmoe9wggxv+e55IzJMqQTeNYV00scuNbY8+YxrUfGfcaMZb/CNPQe04bT0lThbEuT0sfYhK6K/23Amf3Lx+H24hcj4GScAAAAeJxtjuduwzAMhH2NnTqOk+6993TfSZFY24giGZTVon36eiRFf5SAiO/A05HBWtBXEvxfGdYwQIgIQ6wjxggJxkgxwRQb2MQWtrGDXexhHwc4xBGOcYJTnOEcF7jEFa5xg1vc4R4PeMQTnvGCV2R4C1Khy9xkkkxNnPRC03s97pHLvKgTYXJNmbKfZom9o8POEffsq0Qw28+ltcPe2uHS2rGvRjPBmSwE1+GMtI6l0GSU4JEsSM4XgudpQx9sTRf3K9rAyUr0962UryKprZwPpM0jyda5uP2qrVBjxSLPCmGUplixrdpBSKqsI2oO4gF9Udq8TJVOzDSpcEHGR4vSeJdaVsSkMl26OqoKa6jttQ0rLb6a5l3YjO2QqV01YXLlNy2XDR0JlkXojbJTb/5GDX3V+kPviIPgB9AUks0AAAA=)
|
|
@@ -10945,11 +10949,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10945
10949
|
--lumo-icons-upload: '\\ea2b';
|
|
10946
10950
|
--lumo-icons-user: '\\ea2c';
|
|
10947
10951
|
}
|
|
10948
|
-
`;
|
|
10952
|
+
`;De("font-icons",Lu);/**
|
|
10949
10953
|
* @license
|
|
10950
10954
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10951
10955
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10952
|
-
*/const
|
|
10956
|
+
*/const Vu=p`
|
|
10953
10957
|
:host {
|
|
10954
10958
|
/* Square */
|
|
10955
10959
|
--lumo-space-xs: 0.25rem;
|
|
@@ -10972,11 +10976,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10972
10976
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
10973
10977
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
10974
10978
|
}
|
|
10975
|
-
`;
|
|
10979
|
+
`;De("spacing-props",Vu);/**
|
|
10976
10980
|
* @license
|
|
10977
10981
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10978
10982
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10979
|
-
*/const
|
|
10983
|
+
*/const Fu=p`
|
|
10980
10984
|
:host {
|
|
10981
10985
|
/* Border radius */
|
|
10982
10986
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -11076,11 +11080,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11076
11080
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
11077
11081
|
--vaadin-input-field-value-font-weight: 500;
|
|
11078
11082
|
}
|
|
11079
|
-
`;
|
|
11083
|
+
`;De("style-props",Fu);/**
|
|
11080
11084
|
* @license
|
|
11081
11085
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11082
11086
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11083
|
-
*/const
|
|
11087
|
+
*/const Bu=p`
|
|
11084
11088
|
:host {
|
|
11085
11089
|
/* prettier-ignore */
|
|
11086
11090
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -11100,7 +11104,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11100
11104
|
--lumo-line-height-s: 1.375;
|
|
11101
11105
|
--lumo-line-height-m: 1.625;
|
|
11102
11106
|
}
|
|
11103
|
-
`,
|
|
11107
|
+
`,Ru=p`
|
|
11104
11108
|
body,
|
|
11105
11109
|
:host {
|
|
11106
11110
|
font-family: var(--lumo-font-family);
|
|
@@ -11192,11 +11196,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11192
11196
|
border-left: none;
|
|
11193
11197
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
11194
11198
|
}
|
|
11195
|
-
`;
|
|
11199
|
+
`;I("",Ru,{moduleId:"lumo-typography"});De("typography-props",Bu);/**
|
|
11196
11200
|
* @license
|
|
11197
11201
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11198
11202
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11199
|
-
*/const
|
|
11203
|
+
*/const $u=p`
|
|
11200
11204
|
:host {
|
|
11201
11205
|
--lumo-size-xs: 1.625rem;
|
|
11202
11206
|
--lumo-size-s: 1.875rem;
|
|
@@ -11211,7 +11215,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11211
11215
|
/* For backwards compatibility */
|
|
11212
11216
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
11213
11217
|
}
|
|
11214
|
-
`;
|
|
11218
|
+
`;De("sizing-props",$u);/**
|
|
11215
11219
|
* @license
|
|
11216
11220
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11217
11221
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -11242,11 +11246,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11242
11246
|
font-family: 'lumo-icons';
|
|
11243
11247
|
display: block;
|
|
11244
11248
|
}
|
|
11245
|
-
`;
|
|
11249
|
+
`;I("",io,{moduleId:"lumo-field-button"});/**
|
|
11246
11250
|
* @license
|
|
11247
11251
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
11248
11252
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11249
|
-
*/const
|
|
11253
|
+
*/const Hu=p`
|
|
11250
11254
|
:host {
|
|
11251
11255
|
font-size: var(--lumo-font-size-xxs);
|
|
11252
11256
|
line-height: 1;
|
|
@@ -11335,7 +11339,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11335
11339
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
11336
11340
|
pointer-events: none;
|
|
11337
11341
|
}
|
|
11338
|
-
`;
|
|
11342
|
+
`;I("vaadin-multi-select-combo-box-chip",[io,Hu],{moduleId:"lumo-multi-select-combo-box-chip"});I("vaadin-input-container",p`
|
|
11339
11343
|
:host {
|
|
11340
11344
|
background: var(--_background);
|
|
11341
11345
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -11597,7 +11601,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11597
11601
|
width: var(--lumo-icon-size-m);
|
|
11598
11602
|
height: var(--lumo-icon-size-m);
|
|
11599
11603
|
}
|
|
11600
|
-
`;
|
|
11604
|
+
`;I("vaadin-item",so,{moduleId:"lumo-item"});const ta=p`
|
|
11601
11605
|
:host {
|
|
11602
11606
|
transition: background-color 100ms;
|
|
11603
11607
|
overflow: hidden;
|
|
@@ -11609,11 +11613,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11609
11613
|
:host([focused]:not([disabled])) {
|
|
11610
11614
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
11611
11615
|
}
|
|
11612
|
-
`;
|
|
11616
|
+
`;I("vaadin-combo-box-item",[so,ta],{moduleId:"lumo-combo-box-item"});/**
|
|
11613
11617
|
* @license
|
|
11614
11618
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
11615
11619
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11616
|
-
*/const
|
|
11620
|
+
*/const ia=p`
|
|
11617
11621
|
[part~='loader'] {
|
|
11618
11622
|
box-sizing: border-box;
|
|
11619
11623
|
width: var(--lumo-icon-size-s);
|
|
@@ -11659,7 +11663,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11659
11663
|
* @license
|
|
11660
11664
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11661
11665
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11662
|
-
*/const
|
|
11666
|
+
*/const Gt=p`
|
|
11663
11667
|
:host {
|
|
11664
11668
|
top: var(--lumo-space-m);
|
|
11665
11669
|
right: var(--lumo-space-m);
|
|
@@ -11724,11 +11728,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11724
11728
|
opacity: 1;
|
|
11725
11729
|
}
|
|
11726
11730
|
}
|
|
11727
|
-
`;
|
|
11731
|
+
`;I("",Gt,{moduleId:"lumo-overlay"});/**
|
|
11728
11732
|
* @license
|
|
11729
11733
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11730
11734
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11731
|
-
*/const
|
|
11735
|
+
*/const Kt=p`
|
|
11732
11736
|
:host([opening]),
|
|
11733
11737
|
:host([closing]) {
|
|
11734
11738
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -11758,7 +11762,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11758
11762
|
opacity: 0;
|
|
11759
11763
|
}
|
|
11760
11764
|
}
|
|
11761
|
-
`;
|
|
11765
|
+
`;I("",Kt,{moduleId:"lumo-menu-overlay-core"});const qu=p`
|
|
11762
11766
|
/* Small viewport (bottom sheet) styles */
|
|
11763
11767
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
11764
11768
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -11820,7 +11824,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11820
11824
|
transform: translateY(150%);
|
|
11821
11825
|
}
|
|
11822
11826
|
}
|
|
11823
|
-
`,
|
|
11827
|
+
`,Uu=[Gt,Kt,qu];I("",Uu,{moduleId:"lumo-menu-overlay"});const sa=p`
|
|
11824
11828
|
[part='content'] {
|
|
11825
11829
|
padding: 0;
|
|
11826
11830
|
}
|
|
@@ -11841,7 +11845,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11841
11845
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
11842
11846
|
margin-bottom: var(--lumo-space-xs);
|
|
11843
11847
|
}
|
|
11844
|
-
`,
|
|
11848
|
+
`,oa=p`
|
|
11845
11849
|
[part~='loader'] {
|
|
11846
11850
|
position: absolute;
|
|
11847
11851
|
z-index: 1;
|
|
@@ -11849,7 +11853,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11849
11853
|
top: var(--lumo-space-s);
|
|
11850
11854
|
margin-inline: auto 0;
|
|
11851
11855
|
}
|
|
11852
|
-
`;
|
|
11856
|
+
`;I("vaadin-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
11853
11857
|
:host {
|
|
11854
11858
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
11855
11859
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -11858,7 +11862,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11858
11862
|
* @license
|
|
11859
11863
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11860
11864
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11861
|
-
*/const
|
|
11865
|
+
*/const Wu=p`
|
|
11862
11866
|
:host {
|
|
11863
11867
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
11864
11868
|
}
|
|
@@ -11918,16 +11922,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11918
11922
|
* @license
|
|
11919
11923
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11920
11924
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11921
|
-
*/const
|
|
11925
|
+
*/const ra=p`
|
|
11922
11926
|
[part='label'] {
|
|
11923
11927
|
align-self: flex-start;
|
|
11924
11928
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
11925
11929
|
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
11926
11930
|
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
11927
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
11928
11931
|
transition: color 0.2s;
|
|
11929
11932
|
line-height: 1;
|
|
11930
|
-
padding-
|
|
11933
|
+
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
|
|
11934
|
+
padding-inline-end: 1em;
|
|
11931
11935
|
padding-bottom: 0.5em;
|
|
11932
11936
|
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
11933
11937
|
negative margin to compensate */
|
|
@@ -12011,16 +12015,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12011
12015
|
|
|
12012
12016
|
/* RTL specific styles */
|
|
12013
12017
|
|
|
12014
|
-
:host([dir='rtl']) [part='label'] {
|
|
12015
|
-
margin-left: 0;
|
|
12016
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
12017
|
-
}
|
|
12018
|
-
|
|
12019
|
-
:host([dir='rtl']) [part='label'] {
|
|
12020
|
-
padding-left: 1em;
|
|
12021
|
-
padding-right: 0;
|
|
12022
|
-
}
|
|
12023
|
-
|
|
12024
12018
|
:host([dir='rtl']) [part='required-indicator']::after {
|
|
12025
12019
|
right: auto;
|
|
12026
12020
|
left: 0;
|
|
@@ -12030,11 +12024,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12030
12024
|
margin-left: 0;
|
|
12031
12025
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
12032
12026
|
}
|
|
12033
|
-
`;
|
|
12027
|
+
`;I("",ra,{moduleId:"lumo-required-field"});/**
|
|
12034
12028
|
* @license
|
|
12035
12029
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12036
12030
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12037
|
-
*/const
|
|
12031
|
+
*/const ju=p`
|
|
12038
12032
|
:host {
|
|
12039
12033
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
12040
12034
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -12182,27 +12176,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12182
12176
|
[part='clear-button']::before {
|
|
12183
12177
|
content: var(--lumo-icons-cross);
|
|
12184
12178
|
}
|
|
12185
|
-
`,
|
|
12179
|
+
`,na=[ra,io,Wu,ju];I("",na,{moduleId:"lumo-input-field-shared-styles"});/**
|
|
12186
12180
|
* @license
|
|
12187
12181
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12188
12182
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12189
|
-
*/const
|
|
12183
|
+
*/const Yu=p`
|
|
12190
12184
|
@media (any-hover: hover) {
|
|
12191
12185
|
:host(:hover[readonly]) {
|
|
12192
12186
|
background-color: transparent;
|
|
12193
12187
|
cursor: default;
|
|
12194
12188
|
}
|
|
12195
12189
|
}
|
|
12196
|
-
`;
|
|
12190
|
+
`;I("vaadin-multi-select-combo-box-item",[so,ta,Yu],{moduleId:"lumo-multi-select-combo-box-item"});I("vaadin-multi-select-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
12197
12191
|
:host {
|
|
12198
12192
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
12199
12193
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
12200
12194
|
}
|
|
12201
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"});
|
|
12195
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"});I("vaadin-multi-select-combo-box-container",p`
|
|
12202
12196
|
:host([auto-expand-vertically]) {
|
|
12203
12197
|
padding-block: var(--lumo-space-xs);
|
|
12204
12198
|
}
|
|
12205
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
12199
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const Gu=p`
|
|
12206
12200
|
:host([has-value]) {
|
|
12207
12201
|
padding-inline-start: 0;
|
|
12208
12202
|
}
|
|
@@ -12255,11 +12249,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12255
12249
|
color: var(--lumo-contrast-60pct);
|
|
12256
12250
|
cursor: var(--lumo-clickable-cursor);
|
|
12257
12251
|
}
|
|
12258
|
-
`;
|
|
12252
|
+
`;I("vaadin-multi-select-combo-box",[na,Gu],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
12259
12253
|
* @license
|
|
12260
12254
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12261
12255
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12262
|
-
*/const
|
|
12256
|
+
*/const Ku=p`
|
|
12263
12257
|
:host {
|
|
12264
12258
|
max-width: 100%;
|
|
12265
12259
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
@@ -12298,7 +12292,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12298
12292
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
12299
12293
|
width: auto;
|
|
12300
12294
|
}
|
|
12301
|
-
`,
|
|
12295
|
+
`,Xu=p`
|
|
12302
12296
|
:host {
|
|
12303
12297
|
display: inline-flex;
|
|
12304
12298
|
align-items: center;
|
|
@@ -12327,22 +12321,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12327
12321
|
* @license
|
|
12328
12322
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12329
12323
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12330
|
-
*/
|
|
12324
|
+
*/I("vaadin-multi-select-combo-box-chip",Xu,{moduleId:"vaadin-multi-select-combo-box-chip"});class Ju extends Oe(y){static get is(){return "vaadin-multi-select-combo-box-chip"}static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return b`
|
|
12331
12325
|
<div part="label">[[label]]</div>
|
|
12332
12326
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
12333
|
-
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}
|
|
12327
|
+
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}J(Ju);/**
|
|
12334
12328
|
* @license
|
|
12335
12329
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12336
12330
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12337
|
-
*/const
|
|
12331
|
+
*/const W=[];function ss(s,t,e=s.getAttribute("dir")){t?s.setAttribute("dir",t):e!=null&&s.removeAttribute("dir");}function os(){return document.documentElement.getAttribute("dir")}function Qu(){const s=os();W.forEach(t=>{ss(t,s);});}const Zu=new MutationObserver(Qu);Zu.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const Xt=s=>class extends s{static get properties(){return {dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:e=>e||"",toAttribute:e=>e===""?null:e}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),ss(this,os(),null));}attributeChangedCallback(e,i,o){if(super.attributeChangedCallback(e,i,o),e!=="dir")return;const r=os(),n=o===r&&W.indexOf(this)===-1,a=!o&&i&&W.indexOf(this)===-1;n||a?(this.__subscribe(),ss(this,r,o)):o!==r&&i===r&&this.__unsubscribe();}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=W.includes(this),this.__unsubscribe();}_valueToNodeAttribute(e,i,o){o==="dir"&&i===""&&!e.hasAttribute("dir")||super._valueToNodeAttribute(e,i,o);}_attributeToProperty(e,i,o){e==="dir"&&!i?this.dir="":super._attributeToProperty(e,i,o);}__subscribe(){W.includes(this)||W.push(this);}__unsubscribe(){W.includes(this)&&W.splice(W.indexOf(this),1);}};/**
|
|
12338
12332
|
* @license
|
|
12339
12333
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12340
12334
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12341
|
-
*/const
|
|
12342
|
-
* @license
|
|
12343
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12344
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12345
|
-
*/const Ju=p`
|
|
12335
|
+
*/const ep=p`
|
|
12346
12336
|
:host {
|
|
12347
12337
|
display: flex;
|
|
12348
12338
|
align-items: center;
|
|
@@ -12412,15 +12402,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12412
12402
|
* @license
|
|
12413
12403
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12414
12404
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12415
|
-
*/
|
|
12405
|
+
*/const tp=s=>class extends s{static get properties(){return {disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},invalid:{type:Boolean,reflectToAttribute:!0}}}ready(){super.ready(),this.addEventListener("pointerdown",e=>{e.target===this&&e.preventDefault();}),this.addEventListener("click",e=>{e.target===this&&this.shadowRoot.querySelector("slot:not([name])").assignedNodes({flatten:!0}).forEach(i=>i.focus&&i.focus());});}};/**
|
|
12406
|
+
* @license
|
|
12407
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12408
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12409
|
+
*/I("vaadin-input-container",ep,{moduleId:"vaadin-input-container-styles"});class aa extends tp(Oe(Xt(y))){static get is(){return "vaadin-input-container"}static get template(){return b`
|
|
12416
12410
|
<slot name="prefix"></slot>
|
|
12417
12411
|
<slot></slot>
|
|
12418
12412
|
<slot name="suffix"></slot>
|
|
12419
|
-
`}}
|
|
12413
|
+
`}}J(aa);/**
|
|
12420
12414
|
* @license
|
|
12421
12415
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12422
12416
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12423
|
-
*/
|
|
12417
|
+
*/I("vaadin-multi-select-combo-box-container",p`
|
|
12424
12418
|
#wrapper {
|
|
12425
12419
|
display: flex;
|
|
12426
12420
|
width: 100%;
|
|
@@ -12430,15 +12424,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12430
12424
|
:host([auto-expand-vertically]) #wrapper {
|
|
12431
12425
|
flex-wrap: wrap;
|
|
12432
12426
|
}
|
|
12433
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let
|
|
12427
|
+
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let _t;class ip extends aa{static get is(){return "vaadin-multi-select-combo-box-container"}static get template(){if(!_t){_t=super.template.cloneNode(!0);const t=_t.content,e=t.querySelectorAll("slot"),i=document.createElement("div");i.setAttribute("id","wrapper"),t.insertBefore(i,e[2]),i.appendChild(e[0]),i.appendChild(e[1]);}return _t}static get properties(){return {autoExpandVertically:{type:Boolean,reflectToAttribute:!0}}}}J(ip);/**
|
|
12434
12428
|
* @license
|
|
12435
12429
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12436
12430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12437
|
-
*/const
|
|
12431
|
+
*/const sp=s=>class extends s{static get properties(){return {index:{type:Number},item:{type:Object},label:{type:String},selected:{type:Boolean,value:!1,reflectToAttribute:!0},focused:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Function}}}static get observers(){return ["__rendererOrItemChanged(renderer, index, item, selected, focused)","__updateLabel(label, renderer)"]}static get observedAttributes(){return [...super.observedAttributes,"hidden"]}attributeChangedCallback(e,i,o){e==="hidden"&&o!==null?this.index=void 0:super.attributeChangedCallback(e,i,o);}connectedCallback(){super.connectedCallback(),this._owner=this.parentNode.owner;const e=this._owner.getAttribute("dir");e&&this.setAttribute("dir",e);}requestContentUpdate(){if(!this.renderer||this.hidden)return;const e={index:this.index,item:this.item,focused:this.focused,selected:this.selected};this.renderer(this,this._owner,e);}__rendererOrItemChanged(e,i,o){o===void 0||i===void 0||(this._oldRenderer!==e&&(this.innerHTML="",delete this._$litPart$),e&&(this._oldRenderer=e,this.requestContentUpdate()));}__updateLabel(e,i){i||(this.textContent=e);}};/**
|
|
12438
12432
|
* @license
|
|
12439
12433
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12440
12434
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12441
|
-
*/class
|
|
12435
|
+
*/class op extends sp(Oe(Xt(y))){static get is(){return "vaadin-multi-select-combo-box-item"}static get template(){return b`
|
|
12442
12436
|
<style>
|
|
12443
12437
|
:host {
|
|
12444
12438
|
display: block;
|
|
@@ -12452,67 +12446,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12452
12446
|
<div part="content">
|
|
12453
12447
|
<slot></slot>
|
|
12454
12448
|
</div>
|
|
12455
|
-
`}}
|
|
12449
|
+
`}}J(op);/**
|
|
12456
12450
|
* @license
|
|
12457
12451
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12458
12452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12459
|
-
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function
|
|
12453
|
+
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function rs(){let s=document.activeElement||document.body;for(;s.shadowRoot&&s.shadowRoot.activeElement;)s=s.shadowRoot.activeElement;return s}function ro(){return oo}function rp(s){const t=s.style;if(t.visibility==="hidden"||t.display==="none")return !0;const e=window.getComputedStyle(s);return e.visibility==="hidden"||e.display==="none"}function np(s,t){const e=Math.max(s.tabIndex,0),i=Math.max(t.tabIndex,0);return e===0||i===0?i>e:e>i}function ap(s,t){const e=[];for(;s.length>0&&t.length>0;)np(s[0],t[0])?e.push(t.shift()):e.push(s.shift());return e.concat(s,t)}function ns(s){const t=s.length;if(t<2)return s;const e=Math.ceil(t/2),i=ns(s.slice(0,e)),o=ns(s.slice(e));return ap(i,o)}function la(s){return s.matches('[tabindex="-1"]')?!1:s.matches("input, select, textarea, button, object")?s.matches(":not([disabled])"):s.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function da(s){return s.getRootNode().activeElement===s}function lp(s){if(!la(s))return -1;const t=s.getAttribute("tabindex")||0;return Number(t)}function ha(s,t){if(s.nodeType!==Node.ELEMENT_NODE||rp(s))return !1;const e=s,i=lp(e);let o=i>0;i>=0&&t.push(e);let r=[];return e.localName==="slot"?r=e.assignedNodes({flatten:!0}):r=(e.shadowRoot||e).children,[...r].forEach(n=>{o=ha(n,t)||o;}),o}function dp(s){const t=[];return ha(s,t)?ns(t):t}/**
|
|
12460
12454
|
* @license
|
|
12461
12455
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12462
12456
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12463
|
-
*/function
|
|
12457
|
+
*/function hp(s){const t=[];for(;s;){if(s.nodeType===Node.DOCUMENT_NODE){t.push(s);break}if(s.nodeType===Node.DOCUMENT_FRAGMENT_NODE){t.push(s),s=s.host;continue}if(s.assignedSlot){s=s.assignedSlot;continue}s=s.parentNode;}return t}function no(s){return s?new Set(s.split(" ")):new Set}function Jt(s){return s?[...s].join(" "):""}function ca(s,t,e){const i=no(s.getAttribute(t));i.add(e),s.setAttribute(t,Jt(i));}function cp(s,t,e){const i=no(s.getAttribute(t));if(i.delete(e),i.size===0){s.removeAttribute(t);return}s.setAttribute(t,Jt(i));}function up(s){return s.nodeType===Node.TEXT_NODE&&s.textContent.trim()===""}/**
|
|
12464
12458
|
* @license
|
|
12465
12459
|
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
12466
12460
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12467
|
-
*/function
|
|
12461
|
+
*/function pp(s,t){let e=null;const i=document.documentElement;function o(){e&&e.disconnect(),e=null;}function r(n=!1,a=1){o();const{left:l,top:d,width:h,height:c}=s.getBoundingClientRect();if(n||t(),!h||!c)return;const u=Math.floor(d),_=Math.floor(i.clientWidth-(l+h)),m=Math.floor(i.clientHeight-(d+c)),A=Math.floor(l),w={rootMargin:`${-u}px ${-_}px ${-m}px ${-A}px`,threshold:Math.max(0,Math.min(1,a))||1};let C=!0;function B(ne){let M=ne[0].intersectionRatio;if(M!==a){if(!C)return r();M===0&&(M=1e-7),r(!1,M);}C=!1;}e=new IntersectionObserver(B,w),e.observe(s);}return r(!0),o}/**
|
|
12468
12462
|
* @license
|
|
12469
12463
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12470
12464
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12471
|
-
*/const
|
|
12465
|
+
*/const yi={start:"top",end:"bottom"},xi={start:"left",end:"right"},rr=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.__overlay&&t.target.__overlay._updatePosition();});});}),_p=s=>class extends s{static get properties(){return {positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return ["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this);}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners();}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners();}__addUpdatePositionEventListeners(){window.visualViewport.addEventListener("resize",this._updatePosition),window.visualViewport.addEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes=hp(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach(e=>{e.addEventListener("scroll",this.__onScroll,!0);}),this.positionTarget&&(this.__observePositionTargetMove=pp(this.positionTarget,()=>{this._updatePosition();}));}__removeUpdatePositionEventListeners(){window.visualViewport.removeEventListener("resize",this._updatePosition),window.visualViewport.removeEventListener("scroll",this.__onScroll,!0),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach(e=>{e.removeEventListener("scroll",this.__onScroll,!0);}),this.__positionTargetAncestorRootNodes=null),this.__observePositionTargetMove&&(this.__observePositionTargetMove(),this.__observePositionTargetMove=null);}__overlayOpenedChanged(e,i){if(this.__removeUpdatePositionEventListeners(),i&&(i.__overlay=null,rr.unobserve(i),e&&(this.__addUpdatePositionEventListeners(),i.__overlay=this,rr.observe(i))),e){const o=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach(r=>{this.__margins[r]=parseInt(o[r],10);})),this._updatePosition(),requestAnimationFrame(()=>this._updatePosition());}}__positionSettingsChanged(){this._updatePosition();}__onScroll(e){e.target instanceof Node&&this.contains(e.target)||this._updatePosition();}_updatePosition(){if(!this.positionTarget||!this.opened||!this.__margins)return;const e=this.positionTarget.getBoundingClientRect();if(e.width===0&&e.height===0&&this.opened){this.opened=!1;return}const i=this.__shouldAlignStartVertically(e);this.style.justifyContent=i?"flex-start":"flex-end";const o=this.__isRTL,r=this.__shouldAlignStartHorizontally(e,o),n=!o&&r||o&&!r;this.style.alignItems=n?"flex-start":"flex-end";const a=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(e,a,this.noVerticalOverlap,yi,this,i),d=this.__calculatePositionInOneDimension(e,a,this.noHorizontalOverlap,xi,this,r);Object.assign(this.style,l,d),this.toggleAttribute("bottom-aligned",!i),this.toggleAttribute("top-aligned",i),this.toggleAttribute("end-aligned",!n),this.toggleAttribute("start-aligned",n);}__shouldAlignStartHorizontally(e,i){const o=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const r=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!i&&this.horizontalAlign==="start"||i&&this.horizontalAlign==="end";return this.__shouldAlignStart(e,o,r,this.__margins,n,this.noHorizontalOverlap,xi)}__shouldAlignStartVertically(e){const i=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const o=Math.min(window.innerHeight,document.documentElement.clientHeight),r=this.verticalAlign==="top";return this.__shouldAlignStart(e,i,o,this.__margins,r,this.noVerticalOverlap,yi)}__shouldAlignStart(e,i,o,r,n,a,l){const d=o-e[a?l.end:l.start]-r[l.end],h=e[a?l.start:l.end]-r[l.start],c=n?d:h,_=c>(n?h:d)||c>i;return n===_}__adjustBottomProperty(e,i,o){let r;if(e===i.end){if(i.end===yi.end){const n=Math.min(window.innerHeight,document.documentElement.clientHeight);if(o>n&&this.__oldViewportHeight){const a=this.__oldViewportHeight-n;r=o-a;}this.__oldViewportHeight=n;}if(i.end===xi.end){const n=Math.min(window.innerWidth,document.documentElement.clientWidth);if(o>n&&this.__oldViewportWidth){const a=this.__oldViewportWidth-n;r=o-a;}this.__oldViewportWidth=n;}}return r}__calculatePositionInOneDimension(e,i,o,r,n,a){const l=a?r.start:r.end,d=a?r.end:r.start,h=parseFloat(n.style[l]||getComputedStyle(n)[l]),c=this.__adjustBottomProperty(l,r,h),u=i[a?r.start:r.end]-e[o===a?r.end:r.start],_=c?`${c}px`:`${h+u*(a?-1:1)}px`;return {[l]:_,[d]:""}}};/**
|
|
12472
12466
|
* @license
|
|
12473
12467
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12474
12468
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12475
|
-
*/const
|
|
12469
|
+
*/const mp=s=>class extends _p(s){static get observers(){return ["_setOverlayWidth(positionTarget, opened)"]}constructor(){super(),this.requiredVerticalSpace=200;}connectedCallback(){super.connectedCallback();const e=this._comboBox,i=e&&e.getAttribute("dir");i&&this.setAttribute("dir",i);}_shouldCloseOnOutsideClick(e){const i=e.composedPath();return !i.includes(this.positionTarget)&&!i.includes(this)}_mouseDownListener(e){super._mouseDownListener(e),this._shouldCloseOnOutsideClick(e)&&!la(e.composedPath()[0])&&e.preventDefault();}_updateOverlayWidth(){const e=this.localName;this.style.setProperty(`--_${e}-default-width`,`${this.positionTarget.offsetWidth}px`);const i=getComputedStyle(this._comboBox).getPropertyValue(`--${e}-width`);i===""?this.style.removeProperty(`--${e}-width`):this.style.setProperty(`--${e}-width`,i);}_setOverlayWidth(e,i){e&&i&&(this._updateOverlayWidth(),this._updatePosition());}};/**
|
|
12476
12470
|
* @license
|
|
12477
12471
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12478
12472
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12479
|
-
*/const
|
|
12473
|
+
*/const Qt=s=>s.test(navigator.userAgent),as=s=>s.test(navigator.platform),fp=s=>s.test(navigator.vendor);Qt(/Android/u);Qt(/Chrome/u)&&fp(/Google Inc/u);Qt(/Firefox/u);const vp=as(/^iPad/u)||as(/^Mac/u)&&navigator.maxTouchPoints>1,gp=as(/^iPhone/u),bp=gp||vp,yp=Qt(/^((?!chrome|android).)*safari/iu),ls=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(s){return !1}})();/**
|
|
12480
12474
|
* @license
|
|
12481
12475
|
* Copyright (c) 2017 Anton Korzunov
|
|
12482
12476
|
* SPDX-License-Identifier: MIT
|
|
12483
|
-
*/let
|
|
12477
|
+
*/let ge=new WeakMap,mt=new WeakMap,ft={},Ci=0;const nr=s=>s&&s.nodeType===Node.ELEMENT_NODE,wi=(...s)=>{console.error(`Error: ${s.join(" ")}. Skip setting aria-hidden.`);},xp=(s,t)=>nr(s)?t.map(e=>{if(!nr(e))return wi(e,"is not a valid element"),null;let i=e;for(;i&&i!==s;){if(s.contains(i))return e;i=i.getRootNode().host;}return wi(e,"is not contained inside",s),null}).filter(e=>!!e):(wi(s,"is not a valid element"),[]),Cp=(s,t,e,i)=>{const o=xp(t,Array.isArray(s)?s:[s]);ft[e]||(ft[e]=new WeakMap);const r=ft[e],n=[],a=new Set,l=new Set(o),d=c=>{if(!c||a.has(c))return;a.add(c);const u=c.assignedSlot;u&&d(u),d(c.parentNode||c.host);};o.forEach(d);const h=c=>{if(!c||l.has(c))return;const u=c.shadowRoot;(u?[...c.children,...u.children]:[...c.children]).forEach(m=>{if(!["template","script","style"].includes(m.localName))if(a.has(m))h(m);else {const A=m.getAttribute(i),k=A!==null&&A!=="false",w=(ge.get(m)||0)+1,C=(r.get(m)||0)+1;ge.set(m,w),r.set(m,C),n.push(m),w===1&&k&&mt.set(m,!0),C===1&&m.setAttribute(e,"true"),k||m.setAttribute(i,"true");}});};return h(t),a.clear(),Ci+=1,()=>{n.forEach(c=>{const u=ge.get(c)-1,_=r.get(c)-1;ge.set(c,u),r.set(c,_),u||(mt.has(c)?mt.delete(c):c.removeAttribute(i)),_||c.removeAttribute(e);}),Ci-=1,Ci||(ge=new WeakMap,ge=new WeakMap,mt=new WeakMap,ft={});}},wp=(s,t=document.body,e="data-aria-hidden")=>{const i=Array.from(Array.isArray(s)?s:[s]);return t&&i.push(...Array.from(t.querySelectorAll("[aria-live]"))),Cp(i,t,e,"aria-hidden")};/**
|
|
12484
12478
|
* @license
|
|
12485
12479
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12486
12480
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12487
|
-
*/class
|
|
12481
|
+
*/class Ip{constructor(t,e){this.host=t,this.callback=typeof e=="function"?e:()=>t;}showModal(){const t=this.callback();this.__showOthers=wp(t);}close(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null);}}/**
|
|
12488
12482
|
* @license
|
|
12489
12483
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12490
12484
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12491
|
-
*/class
|
|
12485
|
+
*/class Ap{saveFocus(t){this.focusNode=t||rs();}restoreFocus(t){const e=this.focusNode;if(!e)return;const i=t?t.preventScroll:!1;rs()===document.body?setTimeout(()=>e.focus({preventScroll:i})):e.focus({preventScroll:i}),this.focusNode=null;}}/**
|
|
12492
12486
|
* @license
|
|
12493
12487
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12494
12488
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12495
|
-
*/const
|
|
12489
|
+
*/const Ii=[];class Ep{constructor(t){this.host=t,this.__trapNode=null,this.__onKeyDown=this.__onKeyDown.bind(this);}get __focusableElements(){return dp(this.__trapNode)}get __focusedElementIndex(){const t=this.__focusableElements;return t.indexOf(t.filter(da).pop())}hostConnected(){document.addEventListener("keydown",this.__onKeyDown);}hostDisconnected(){document.removeEventListener("keydown",this.__onKeyDown);}trapFocus(t){if(this.__trapNode=t,this.__focusableElements.length===0)throw this.__trapNode=null,new Error("The trap node should have at least one focusable descendant or be focusable itself.");Ii.push(this),this.__focusedElementIndex===-1&&this.__focusableElements[0].focus();}releaseFocus(){this.__trapNode=null,Ii.pop();}__onKeyDown(t){if(this.__trapNode&&this===Array.from(Ii).pop()&&t.key==="Tab"){t.preventDefault();const e=t.shiftKey;this.__focusNextElement(e);}}__focusNextElement(t=!1){const e=this.__focusableElements,i=t?-1:1,o=this.__focusedElementIndex,r=(e.length+o+i)%e.length,n=e[r];n.focus(),n.localName==="input"&&n.select();}}const ua=new WeakMap;function Sp(s,t){let e=t;for(;e;){if(ua.get(e)===s)return !0;e=Object.getPrototypeOf(e);}return !1}function L(s){return t=>{if(Sp(s,t))return t;const e=s(t);return ua.set(e,s),e}}/**
|
|
12496
12490
|
* @license
|
|
12497
12491
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12498
12492
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12499
|
-
*/const
|
|
12493
|
+
*/const Zt=L(s=>typeof s.prototype.addController=="function"?s:class extends s{constructor(){super(),this.__controllers=new Set;}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(e=>{e.hostConnected&&e.hostConnected();});}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(e=>{e.hostDisconnected&&e.hostDisconnected();});}addController(e){this.__controllers.add(e),this.$!==void 0&&this.isConnected&&e.hostConnected&&e.hostConnected();}removeController(e){this.__controllers.delete(e);}});/**
|
|
12500
12494
|
* @license
|
|
12501
12495
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12502
12496
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12503
|
-
*/const
|
|
12497
|
+
*/const kp=s=>class extends Zt(s){static get properties(){return {focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},restoreFocusNode:{type:HTMLElement}}}constructor(){super(),this.__ariaModalController=new Ip(this),this.__focusTrapController=new Ep(this),this.__focusRestorationController=new Ap;}ready(){super.ready(),this.addController(this.__ariaModalController),this.addController(this.__focusTrapController),this.addController(this.__focusRestorationController);}_resetFocus(){if(this.focusTrap&&(this.__ariaModalController.close(),this.__focusTrapController.releaseFocus()),this.restoreFocusOnClose&&this._shouldRestoreFocus()){const e=!ro();this.__focusRestorationController.restoreFocus({preventScroll:e});}}_saveFocus(){this.restoreFocusOnClose&&this.__focusRestorationController.saveFocus(this.restoreFocusNode);}_trapFocus(){this.focusTrap&&(this.__ariaModalController.showModal(),this.__focusTrapController.trapFocus(this.$.overlay));}_shouldRestoreFocus(){const e=rs();return e===document.body||this._deepContains(e)}_deepContains(e){if(this.contains(e))return !0;let i=e;const o=e.ownerDocument;for(;i&&i!==o&&i!==this;)i=i.parentNode||i.host;return i===this}};/**
|
|
12504
12498
|
* @license
|
|
12505
12499
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12506
12500
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12507
|
-
*/const
|
|
12501
|
+
*/const pa=()=>Array.from(document.body.children).filter(s=>s instanceof HTMLElement&&s._hasOverlayStackMixin&&!s.hasAttribute("closing")).sort((s,t)=>s.__zIndex-t.__zIndex||0),ds=()=>pa().filter(s=>s.$.overlay),Tp=(s,t=e=>!0)=>{const e=ds().filter(t);return s===e.pop()},ar=new WeakMap,Pp=s=>class extends s{constructor(){super(),this._hasOverlayStackMixin=!0;}get _last(){return Tp(this)}bringToFront(){let e="";const i=pa().filter(o=>o!==this).pop();i&&(e=i.__zIndex+1),this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex),ar.has(this)&&ar.get(this).bringToFront();}_enterModalState(){document.body.style.pointerEvents!=="none"&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),ds().forEach(e=>{e!==this&&(e.$.overlay.style.pointerEvents="none");});}_exitModalState(){this._previousDocumentPointerEvents!==void 0&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=ds();let i;for(;(i=e.pop())&&!(i!==this&&(i.$.overlay.style.removeProperty("pointer-events"),!i.modeless)););}};/**
|
|
12508
12502
|
* @license
|
|
12509
12503
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12510
12504
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12511
|
-
*/const
|
|
12505
|
+
*/const Op=s=>class extends kp(Pp(s)){static get properties(){return {opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0,sync:!0},owner:{type:Object,sync:!0},model:{type:Object,sync:!0},renderer:{type:Object,sync:!0},modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged",sync:!0},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged",sync:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!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),bp&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}ready(){super.ready(),this.addEventListener("click",()=>{}),this.$.backdrop.addEventListener("click",()=>{}),this.addEventListener("mouseup",()=>{document.activeElement===document.body&&this.$.overlay.getAttribute("tabindex")==="0"&&this.$.overlay.focus();});}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener));}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener);}requestContentUpdate(){this.renderer&&this.renderer.call(this.owner,this,this.owner,this.model);}close(e){const i=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),i.defaultPrevented||(this.opened=!1);}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,o=window.innerWidth>e,r=document.documentElement.clientHeight;o&&r>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",`${r-e}px`):this.style.setProperty("--vaadin-overlay-viewport-bottom","0");}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0);}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0);}_rendererOrDataChanged(e,i,o,r){const n=this._oldOwner!==i||this._oldModel!==o;this._oldModel=o,this._oldOwner=i;const a=this._oldRenderer!==e,l=this._oldRenderer!==void 0;this._oldRenderer=e;const d=this._oldOpened!==r;this._oldOpened=r,a&&l&&(this.innerHTML="",delete this._$litPart$),r&&e&&(a||d||n)&&this.requestContentUpdate();}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState());}_openedChanged(e,i){e?(this._saveFocus(),this._animatedOpening(),this.__scheduledOpen=requestAnimationFrame(()=>{setTimeout(()=>{this._trapFocus(),this.dispatchEvent(new CustomEvent("vaadin-overlay-open",{bubbles:!0}));});}),document.addEventListener("keydown",this._boundKeydownListener),this.modeless||this._addGlobalListeners()):i&&(this.__scheduledOpen&&(cancelAnimationFrame(this.__scheduledOpen),this.__scheduledOpen=null),this._resetFocus(),this._animatedClosing(),document.removeEventListener("keydown",this._boundKeydownListener),this.modeless||this._removeGlobalListeners());}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing");}_shouldAnimate(){const e=getComputedStyle(this),i=e.getPropertyValue("animation-name");return !(e.getPropertyValue("display")==="none")&&i&&i!=="none"}_enqueueAnimation(e,i){const o=`__${e}Handler`,r=n=>{n&&n.target!==this||(i(),this.removeEventListener("animationend",r),delete this[o]);};this[o]=r,this.addEventListener("animationend",r);}_flushAnimation(e){const i=`__${e}Handler`;typeof this[i]=="function"&&this[i]();}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening",""),this._shouldAnimate()?this._enqueueAnimation("opening",()=>{this._finishOpening();}):this._finishOpening();}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront();}_finishOpening(){this.removeAttribute("opening");}_finishClosing(){this._detachOverlay(),this.$.overlay.style.removeProperty("pointer-events"),this.removeAttribute("closing"),this.dispatchEvent(new CustomEvent("vaadin-overlay-closed"));}_animatedClosing(){this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder&&(this._exitModalState(),this.setAttribute("closing",""),this.dispatchEvent(new CustomEvent("vaadin-overlay-closing")),this._shouldAnimate()?this._enqueueAnimation("closing",()=>{this._finishClosing();}):this._finishClosing());}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder);}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0;}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0;}_shouldCloseOnOutsideClick(e){return this._last}_outsideClickListener(e){if(e.composedPath().includes(this.$.overlay)||this._mouseDownInside||this._mouseUpInside){this._mouseDownInside=!1,this._mouseUpInside=!1;return}if(!this._shouldCloseOnOutsideClick(e))return;const i=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}_keydownListener(e){if(this._last&&!(this.modeless&&!e.composedPath().includes(this.$.overlay))&&e.key==="Escape"){const i=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(i),this.opened&&!i.defaultPrevented&&this.close(e);}}};/**
|
|
12512
12506
|
* @license
|
|
12513
12507
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12514
12508
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12515
|
-
*/const
|
|
12509
|
+
*/const Dp=p`
|
|
12516
12510
|
:host {
|
|
12517
12511
|
z-index: 200;
|
|
12518
12512
|
position: fixed;
|
|
@@ -12575,7 +12569,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12575
12569
|
* @license
|
|
12576
12570
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12577
12571
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12578
|
-
*/const
|
|
12572
|
+
*/const zp=p`
|
|
12579
12573
|
#overlay {
|
|
12580
12574
|
width: var(
|
|
12581
12575
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -12588,25 +12582,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12588
12582
|
flex-direction: column;
|
|
12589
12583
|
height: 100%;
|
|
12590
12584
|
}
|
|
12591
|
-
`;
|
|
12585
|
+
`;I("vaadin-multi-select-combo-box-overlay",[Dp,zp],{moduleId:"vaadin-multi-select-combo-box-overlay-styles"});class Mp extends mp(Op(Xt(Oe(y)))){static get is(){return "vaadin-multi-select-combo-box-overlay"}static get template(){return b`
|
|
12592
12586
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
12593
12587
|
<div part="overlay" id="overlay">
|
|
12594
12588
|
<div part="loader"></div>
|
|
12595
12589
|
<div part="content" id="content"><slot></slot></div>
|
|
12596
12590
|
</div>
|
|
12597
|
-
`}}
|
|
12591
|
+
`}}J(Mp);/**
|
|
12598
12592
|
* @license
|
|
12599
12593
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12600
12594
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12601
|
-
*/const
|
|
12595
|
+
*/const se=class{toString(){return ""}};/**
|
|
12602
12596
|
* @license
|
|
12603
12597
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12604
12598
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12605
|
-
*/function
|
|
12599
|
+
*/function Mt(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
12606
12600
|
* @license
|
|
12607
12601
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12608
12602
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12609
|
-
*/let
|
|
12603
|
+
*/let Np=0;function _a(){return Np++}/**
|
|
12610
12604
|
* @license
|
|
12611
12605
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
12612
12606
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12614,7 +12608,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12614
12608
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12615
12609
|
* Code distributed by Google as part of the polymer project is also
|
|
12616
12610
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12617
|
-
*/let lr=0,
|
|
12611
|
+
*/let lr=0,ma=0;const we=[];let hs=!1;function Lp(){hs=!1;const s=we.length;for(let t=0;t<s;t++){const e=we[t];if(e)try{e();}catch(i){setTimeout(()=>{throw i});}}we.splice(0,s),ma+=s;}const Ct={after(s){return {run(t){return window.setTimeout(t,s)},cancel(t){window.clearTimeout(t);}}},run(s,t){return window.setTimeout(s,t)},cancel(s){window.clearTimeout(s);}},ot={run(s){return window.requestAnimationFrame(s)},cancel(s){window.cancelAnimationFrame(s);}},fa={run(s){return window.requestIdleCallback?window.requestIdleCallback(s):window.setTimeout(s,16)},cancel(s){window.cancelIdleCallback?window.cancelIdleCallback(s):window.clearTimeout(s);}},cs={run(s){hs||(hs=!0,queueMicrotask(()=>Lp())),we.push(s);const t=lr;return lr+=1,t},cancel(s){const t=s-ma;if(t>=0){if(!we[t])throw new Error(`invalid async handle: ${s}`);we[t]=null;}}};/**
|
|
12618
12612
|
@license
|
|
12619
12613
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
12620
12614
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12622,7 +12616,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
12622
12616
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12623
12617
|
Code distributed by Google as part of the polymer project is also
|
|
12624
12618
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12625
|
-
*/const
|
|
12619
|
+
*/const rt=new Set;class N{static debounce(t,e,i){return t instanceof N?t._cancelAsync():t=new N,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,rt.delete(this),this._callback();});}cancel(){this.isActive()&&(this._cancelAsync(),rt.delete(this));}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null);}flush(){this.isActive()&&(this.cancel(),this._callback());}isActive(){return this._timer!=null}}function va(s){rt.add(s);}function Vp(){const s=!!rt.size;return rt.forEach(t=>{try{t.flush();}catch(e){setTimeout(()=>{throw e});}}),s}const qe=()=>{let s;do s=Vp();while(s)};/**
|
|
12626
12620
|
* @license
|
|
12627
12621
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
12628
12622
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12630,19 +12624,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12630
12624
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12631
12625
|
* Code distributed by Google as part of the polymer project is also
|
|
12632
12626
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12633
|
-
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
12627
|
+
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),Fp=dr&&dr[1]>=8,hr=3,Bp={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const s=this._virtualCount;return Math.max(0,s-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(s){s=this._clamp(s,0,this._maxVirtualStart),this._virtualStartVal=s;},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(s){s%=this._physicalCount,s<0&&(s=this._physicalCount+s),this._physicalStartVal=s;},get _physicalEnd(){return (this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(s){this._physicalCountVal=s;},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return !!(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let s=this._firstVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;s=this._iterateItems((e,i)=>{if(t+=this._getPhysicalSizeIncrement(e),t>this._scrollPosition)return i})||0,this._firstVisibleIndexVal=s;}return s},get lastVisibleIndex(){let s=this._lastVisibleIndexVal;if(s==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems((e,i)=>{t<this._scrollBottom&&(s=i),t+=this._getPhysicalSizeIncrement(e);}),this._lastVisibleIndexVal=s;}return s},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const s=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let t=s-this._scrollPosition;const e=t>=0;if(this._scrollPosition=s,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t-=this._scrollOffset;const i=Math.round(t/this._physicalAverage);this._virtualStart+=i,this._physicalStart+=i,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update();}else if(this._physicalCount>0){const i=this._getReusables(e);e?(this._physicalTop=i.physicalTop,this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length):(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length),this._update(i.indexes,e?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),cs);}},_getReusables(s){let t,e,i;const o=[],r=this._hiddenContentSize*this._ratio,n=this._virtualStart,a=this._virtualEnd,l=this._physicalCount;let d=this._physicalTop+this._scrollOffset;const h=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,u=this._scrollBottom;for(s?(t=this._physicalStart,e=c-d):(t=this._physicalEnd,e=h-u);i=this._getPhysicalSizeIncrement(t),e-=i,!(o.length>=l||e<=r);)if(s){if(a+o.length+1>=this._virtualCount||d+i>=c-this._scrollOffset)break;o.push(t),d+=i,t=(t+1)%l;}else {if(n-o.length<=0||d+this._physicalSize-i<=u)break;o.push(t),d-=i,t=t===0?l-1:t-1;}return {indexes:o,physicalTop:d-this._scrollOffset}},_update(s,t){if(!(s&&s.length===0||this._physicalCount===0)){if(this._assignModels(s),this._updateMetrics(s),t)for(;t.length;){const e=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(e);}this._positionItems(),this._updateScrollerSize();}},_isClientFull(){return this._scrollBottom!==0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(s){const e=this._clamp(this._physicalCount+s,hr,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(this._physicalCount*.5);if(!(e<0)){if(e>0){const o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let r=0;r<e;r++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-o)/e,i=Math.round(this._physicalCount*.5);}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),fa):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),cs));}},_render(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){const s=this._getReusables(!0);this._physicalTop=s.physicalTop,this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length,this._update(s.indexes),this._update(),this._increasePoolIfNeeded(0);}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(hr));},_itemsChanged(s){s.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,ot));},_iterateItems(s,t){let e,i,o,r;if(arguments.length===2&&t){for(r=0;r<t.length;r++)if(e=t[r],i=this._computeVidx(e),(o=s.call(this,e,i))!=null)return o}else {for(e=this._physicalStart,i=this._virtualStart;e<this._physicalCount;e++,i++)if((o=s.call(this,e,i))!=null)return o;for(e=0;e<this._physicalStart;e++,i++)if((o=s.call(this,e,i))!=null)return o}},_computeVidx(s){return s>=this._physicalStart?this._virtualStart+(s-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+s},_positionItems(){this._adjustScrollPosition();let s=this._physicalTop;this._iterateItems(t=>{this.translate3d(0,`${s}px`,0,this._physicalItems[t]),s+=this._physicalSizes[t];});},_getPhysicalSizeIncrement(s){return this._physicalSizes[s]},_adjustScrollPosition(){const s=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(s!==0){this._physicalTop-=s;const t=this._scrollPosition;!Fp&&t>0&&this._resetScrollPosition(t-s);}},_resetScrollPosition(s){this.scrollTarget&&s>=0&&(this._scrollTop=s,this._scrollPosition=this._scrollTop);},_updateScrollerSize(s){const t=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=t,(s||this._scrollHeight===0||this._scrollPosition>=t-this._physicalSize||Math.abs(t-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${t}px`,this._scrollHeight=t);},scrollToIndex(s){if(typeof s!="number"||s<0||s>this.items.length-1||(qe(),this._physicalCount===0))return;s=this._clamp(s,0,this._virtualCount-1),(!this._isIndexRendered(s)||s>=this._maxVirtualStart)&&(this._virtualStart=s-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let t=this._physicalStart,e=this._virtualStart,i=0;const o=this._hiddenContentSize;for(;e<s&&i<=o;)i+=this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,e+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null;},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0;},_resizeHandler(){this._debounce("_render",()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1);},ot);},_isIndexRendered(s){return s>=this._virtualStart&&s<=this._virtualEnd},_getPhysicalIndex(s){return (this._physicalStart+(s-this._virtualStart))%this._physicalCount},_clamp(s,t,e){return Math.min(e,Math.max(t,s))},_debounce(s,t,e){this._debouncers||(this._debouncers={}),this._debouncers[s]=N.debounce(this._debouncers[s],e,t.bind(this)),va(this._debouncers[s]);}};/**
|
|
12634
12628
|
* @license
|
|
12635
12629
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12636
12630
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12637
|
-
*/const Np=1e5,Ii=1e3;class fa{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ii?(i=t,this._vidxOffset=0):(i=Ii,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),He(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition);}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){He();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,st,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),He(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),He(),this._debounce("_update",this._update,hs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Np)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,xt.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,xt.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,st,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,xt.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(fp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ii,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(fa.prototype,Mp);class Lp{constructor(t){this.__adapter=new fa(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
12631
|
+
*/const Rp=1e5,Ai=1e3;class ga{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:o,elementsContainer:r,reorderElements:n}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=o,this.elementsContainer=r||o,this.reorderElements=n,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver(()=>this._resizeHandler()),getComputedStyle(this.scrollTarget).overflow==="visible"&&(this.scrollTarget.style.overflow="auto"),getComputedStyle(this.scrollContainer).position==="static"&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",()=>this._scrollHandler()),new ResizeObserver(([{contentRect:l}])=>{const d=l.width===0&&l.height===0;!d&&this.__scrollTargetHidden&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition),this.__scrollTargetHidden=d;}).observe(this.scrollTarget),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",l=>this.__onWheel(l)),this.scrollTarget.addEventListener("virtualizer-element-focused",l=>this.__onElementFocused(l)),this.elementsContainer.addEventListener("focusin",()=>{this.scrollTarget.dispatchEvent(new CustomEvent("virtualizer-element-focused",{detail:{element:this.__getFocusedElement()}}));}),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",()=>{this.__mouseDown=!0;}),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements();}));}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}get _maxVirtualIndexOffset(){return this.size-this._virtualCount}__hasPlaceholders(){return this.__getVisibleElements().some(t=>t.__virtualizerPlaceholder)}scrollToIndex(t){if(typeof t!="number"||isNaN(t)||this.size===0||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this._maxVirtualIndexOffset):i<e?t<Ai?(i=t,this._vidxOffset=0):(i=Ai,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t);}flush(){this.scrollTarget.offsetHeight!==0&&(this._resizeHandler(),qe(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush());}hostConnected(){this.scrollTarget.offsetParent&&this.scrollTarget.scrollTop!==this._scrollPosition&&(this.scrollTarget.scrollTop=this._scrollPosition);}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach(o=>{o.__virtualIndex>=t&&o.__virtualIndex<=e&&(this.__updateElement(o,o.__virtualIndex,!0),i.push(o));}),this.__afterElementsUpdated(i);}_updateMetrics(t){qe();let e=0,i=0;const o=this._physicalAverageCount,r=this._physicalAverage;this._iterateItems((n,a)=>{i+=this._physicalSizes[n],this._physicalSizes[n]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[n])),e+=this._physicalSizes[n],this._physicalAverageCount+=this._physicalSizes[n]?1:0;},t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==o&&(this._physicalAverage=Math.round((r*o+e)/this._physicalAverageCount));}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;if(e.boxSizing==="border-box")return i;const o=parseFloat(e.paddingBottom)||0,r=parseFloat(e.paddingTop)||0,n=parseFloat(e.borderBottomWidth)||0,a=parseFloat(e.borderTopWidth)||0;return i+o+r+n+a}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.style.opacity="",t.__virtualizerPlaceholder=!1),!this.__preventElementUpdates&&(t.__lastUpdatedIndex!==e||i)&&(this.updateElement(t,e),t.__lastUpdatedIndex=e);}__afterElementsUpdated(t){t.forEach(e=>{const i=e.offsetHeight;if(i===0)e.style.paddingTop=`${this.__placeholderHeight}px`,e.style.opacity="0",e.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=N.debounce(this.__placeholderClearDebouncer,ot,()=>this._resizeHandler());else {this.__elementHeightQueue.push(i),this.__elementHeightQueue.shift();const o=this.__elementHeightQueue.filter(r=>r!==void 0);this.__placeholderHeight=Math.round(o.reduce((r,n)=>r+n,0)/o.length);}}),this.__pendingScrollToIndex!==void 0&&!this.__hasPlaceholders()&&this.scrollToIndex(this.__pendingScrollToIndex);}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find(i=>i.__virtualIndex===t);return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0;let e,i;if(t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),qe(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const o=this.__getIndexScrollOffset(e);i!==void 0&&o!==void 0&&(this._scrollTop+=i-o);}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame(()=>this._resizeHandler()),this._resizeHandler(),qe(),this._debounce("_update",this._update,cs);}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t;}get items(){return {length:Math.min(this.size,Rp)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return {items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=t.direction==="rtl",this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics();}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach(o=>{o.style.position="absolute",i.appendChild(o),this.__resizeObserver.observe(o);}),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems((i,o)=>{const r=this._physicalItems[i];r.hidden=o>=this.size,r.hidden?delete r.__lastUpdatedIndex:(r.__virtualIndex=o+(this._vidxOffset||0),this.__updateElement(r,r.__virtualIndex),e.push(r));},t),this.__afterElementsUpdated(e);}_isClientFull(){return setTimeout(()=>{this.__clientFull=!0;}),this.__clientFull||super._isClientFull()}translate3d(t,e,i,o){o.style.transform=`translateY(${e})`;}toggleScrollListener(){}__getFocusedElement(t=this.__getVisibleElements()){return t.find(e=>e.contains(this.elementsContainer.getRootNode().activeElement)||e.contains(this.scrollTarget.getRootNode().activeElement))}__nextFocusableSiblingMissing(t,e){return e.indexOf(t)===e.length-1&&this.size>t.__virtualIndex+1}__previousFocusableSiblingMissing(t,e){return e.indexOf(t)===0&&t.__virtualIndex>0}__onElementFocused(t){if(!this.reorderElements)return;const e=t.detail.element;if(!e)return;const i=this.__getVisibleElements();(this.__previousFocusableSiblingMissing(e,i)||this.__nextFocusableSiblingMissing(e,i))&&this.flush();const o=this.__getVisibleElements();this.__nextFocusableSiblingMissing(e,o)?(this._scrollTop+=Math.ceil(e.getBoundingClientRect().bottom)-Math.floor(this.scrollTarget.getBoundingClientRect().bottom-1),this.flush()):this.__previousFocusableSiblingMissing(e,o)&&(this._scrollTop-=Math.ceil(this.scrollTarget.getBoundingClientRect().top+1)-Math.floor(e.getBoundingClientRect().top),this.flush());}_scrollHandler(){if(this.scrollTarget.offsetHeight===0)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),this._physicalCount!==0){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler());}t&&(this.__fixInvalidItemPositioningDebouncer=N.debounce(this.__fixInvalidItemPositioningDebouncer,Ct.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),()=>this.__fixInvalidItemPositioning())),this.reorderElements&&(this.__scrollReorderDebouncer=N.debounce(this.__scrollReorderDebouncer,Ct.after(this.timeouts.SCROLL_REORDER),()=>this.__reorderElements())),this.__previousScrollTop=this._scrollTop,this._scrollTop===0&&this.firstVisibleIndex!==0&&Math.abs(t)>0&&this.scrollToIndex(0);}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=this.adjustedFirstVisibleIndex===0,o=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!o){const r=e,n=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(r?-1:1),this._scrollHandler(),this._ratio=n;}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame){this._deltaYAcc+=e,t.preventDefault();return}e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=N.debounce(this.__debouncerWheelAnimationFrame,ot,()=>{this._wheelAnimationFrame=!1;});const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=N.debounce(this._debouncerIgnoreNewWheel,Ct.after(this.timeouts.IGNORE_WHEEL),()=>{this._ignoreNewWheel=!1;})):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i;}_hasScrolledAncestor(t,e,i){if(t===this.scrollTarget||t===this.scrollTarget.getRootNode().host)return !1;if(this._canScroll(t,e,i)&&["auto","scroll"].indexOf(getComputedStyle(t).overflow)!==-1)return !0;if(t!==this&&t.parentElement)return this._hasScrolledAncestor(t.parentElement,e,i)}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const i=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,i)));}else super._increasePoolIfNeeded(t);}get _optPhysicalSize(){const t=super._optPhysicalSize;return t<=0||this.__hasPlaceholders()?t:t+this.__getItemHeightBuffer()}__getItemHeightBuffer(){if(this._physicalCount===0)return 0;const t=Math.ceil(this._viewportHeight*(this._maxPages-1)/2),e=Math.max(...this._physicalSizes);return e>Math.min(...this._physicalSizes)?Math.max(0,e-t):0}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter(t=>!t.hidden)}__reorderElements(){if(this.__mouseDown){this.__pendingReorder=!0;return}this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=this.__getFocusedElement(e)||e[0];if(!i)return;const o=i.__virtualIndex-t,r=e.indexOf(i)-o;if(r>0)for(let n=0;n<r;n++)this.elementsContainer.appendChild(e[n]);else if(r<0)for(let n=e.length+r;n<e.length;n++)this.elementsContainer.insertBefore(e[n],e[0]);if(yp){const{transform:n}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout(()=>{this.scrollTarget.style.transform=n;});}}_adjustVirtualIndexOffset(t){const e=this._maxVirtualIndexOffset;if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const i=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.clientHeight);this._vidxOffset=Math.round(i*e);}else {const i=this._vidxOffset,o=Ai,r=100;this._scrollTop===0?(this._vidxOffset=0,i!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<o&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex+(i-this._vidxOffset))),this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=e,i!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-o&&this._vidxOffset<e&&(this._vidxOffset+=Math.min(e-this._vidxOffset,r),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-i)));}}}Object.setPrototypeOf(ga.prototype,Bp);class $p{constructor(t){this.__adapter=new ga(t);}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t;}scrollToIndex(t){this.__adapter.scrollToIndex(t);}update(t=0,e=this.size-1){this.__adapter.update(t,e);}flush(){this.__adapter.flush();}hostConnected(){this.__adapter.hostConnected();}}/**
|
|
12638
12632
|
* @license
|
|
12639
12633
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12640
12634
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12641
|
-
*/const
|
|
12635
|
+
*/const Hp=s=>class extends s{static get properties(){return {items:{type:Array,sync:!0,observer:"__itemsChanged"},focusedIndex:{type:Number,sync:!0,observer:"__focusedIndexChanged"},loading:{type:Boolean,sync:!0,observer:"__loadingChanged"},opened:{type:Boolean,sync:!0,observer:"__openedChanged"},selectedItem:{type:Object,sync:!0,observer:"__selectedItemChanged"},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged"},itemIdPath:{type:String},owner:{type:Object},getItemLabel:{type:Object},renderer:{type:Object,sync:!0,observer:"__rendererChanged"},theme:{type:String}}}constructor(){super(),this.__boundOnItemClick=this.__onItemClick.bind(this);}get _viewportTotalPaddingBottom(){if(this._cachedViewportTotalPaddingBottom===void 0){const e=window.getComputedStyle(this.$.selector);this._cachedViewportTotalPaddingBottom=[e.paddingBottom,e.borderBottomWidth].map(i=>parseInt(i,10)).reduce((i,o)=>i+o);}return this._cachedViewportTotalPaddingBottom}ready(){super.ready(),this.setAttribute("role","listbox"),this.id=`${this.localName}-${_a()}`,this.__hostTagName=this.constructor.is.replace("-scroller",""),this.addEventListener("click",e=>e.stopPropagation()),this.__patchWheelOverScrolling();}requestContentUpdate(){this.__virtualizer&&(this.items&&(this.__virtualizer.size=this.items.length),this.opened&&this.__virtualizer.update());}scrollIntoView(e){if(!this.__virtualizer||!(this.opened&&e>=0))return;const i=this._visibleItemsCount();let o=e;e>this.__virtualizer.lastVisibleIndex-1?(this.__virtualizer.scrollToIndex(e),o=e-i+1):e>this.__virtualizer.firstVisibleIndex&&(o=this.__virtualizer.firstVisibleIndex),this.__virtualizer.scrollToIndex(Math.max(0,o));const r=[...this.children].find(d=>!d.hidden&&d.index===this.__virtualizer.lastVisibleIndex);if(!r||e!==r.index)return;const n=r.getBoundingClientRect(),a=this.getBoundingClientRect(),l=n.bottom-a.bottom+this._viewportTotalPaddingBottom;l>0&&(this.scrollTop+=l);}_isItemSelected(e,i,o){return e instanceof se?!1:o&&e!==void 0&&i!==void 0?Mt(o,e)===Mt(o,i):e===i}__initVirtualizer(){this.__virtualizer=new $p({createElements:this.__createElements.bind(this),updateElement:this._updateElement.bind(this),elementsContainer:this,scrollTarget:this,scrollContainer:this.$.selector,reorderElements:!0});}__itemsChanged(e){e&&this.__virtualizer&&this.requestContentUpdate();}__loadingChanged(){this.requestContentUpdate();}__openedChanged(e){e&&(this.__virtualizer||this.__initVirtualizer(),this.requestContentUpdate());}__selectedItemChanged(){this.requestContentUpdate();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.requestContentUpdate();}__focusedIndexChanged(e,i){e!==i&&this.requestContentUpdate(),e>=0&&!this.loading&&this.scrollIntoView(e);}__rendererChanged(e,i){(e||i)&&this.requestContentUpdate();}__createElements(e){return [...Array(e)].map(()=>{const i=document.createElement(`${this.__hostTagName}-item`);return i.addEventListener("click",this.__boundOnItemClick),i.tabIndex="-1",i.style.width="100%",i})}_updateElement(e,i){const o=this.items[i],r=this.focusedIndex,n=this._isItemSelected(o,this.selectedItem,this.itemIdPath);e.setProperties({item:o,index:i,label:this.getItemLabel(o),selected:n,renderer:this.renderer,focused:!this.loading&&r===i}),typeof this.itemClassNameGenerator=="function"?e.className=this.itemClassNameGenerator(o):e.className!==""&&(e.className=""),e.id=`${this.__hostTagName}-item-${i}`,e.setAttribute("role",i!==void 0?"option":!1),e.setAttribute("aria-selected",n.toString()),e.setAttribute("aria-posinset",i+1),e.setAttribute("aria-setsize",this.items.length),this.theme?e.setAttribute("theme",this.theme):e.removeAttribute("theme"),o instanceof se&&this.__requestItemByIndex(i);}__onItemClick(e){this.dispatchEvent(new CustomEvent("selection-changed",{detail:{item:e.currentTarget.item}}));}__patchWheelOverScrolling(){this.$.selector.addEventListener("wheel",e=>{const i=this.scrollTop===0,o=this.scrollHeight-this.scrollTop-this.clientHeight<=1;(i&&e.deltaY<0||o&&e.deltaY>0)&&e.preventDefault();});}__requestItemByIndex(e){requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("index-requested",{detail:{index:e}}));});}_visibleItemsCount(){return this.__virtualizer.scrollToIndex(this.__virtualizer.firstVisibleIndex),this.__virtualizer.size>0?this.__virtualizer.lastVisibleIndex-this.__virtualizer.firstVisibleIndex+1:0}};/**
|
|
12642
12636
|
* @license
|
|
12643
12637
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12644
12638
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12645
|
-
*/class
|
|
12639
|
+
*/class qp extends Hp(y){static get is(){return "vaadin-multi-select-combo-box-scroller"}static get template(){return b`
|
|
12646
12640
|
<style>
|
|
12647
12641
|
:host {
|
|
12648
12642
|
display: block;
|
|
@@ -12669,67 +12663,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12669
12663
|
<div id="selector">
|
|
12670
12664
|
<slot></slot>
|
|
12671
12665
|
</div>
|
|
12672
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof
|
|
12666
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof se||this.owner.readonly?!1:this.owner._findIndex(t,this.owner.selectedItems,i)>-1}_updateElement(t,e){super._updateElement(t,e),t.toggleAttribute("readonly",this.owner.readonly);}}J(qp);/**
|
|
12673
12667
|
* @license
|
|
12674
12668
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12675
12669
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12676
|
-
*/function
|
|
12670
|
+
*/function Nt(s,t,e=0){let i=t;for(const o of s.subCaches){const r=o.parentCacheIndex;if(i<=r)break;if(i<=r+o.flatSize)return Nt(o,i-r-1,e+1);i-=o.flatSize;}return {cache:s,item:s.items[i],index:i,page:Math.floor(i/s.pageSize),level:e}}function ba({getItemId:s},t,e,i=0,o=0){for(let r=0;r<t.items.length;r++){const n=t.items[r];if(n&&s(n)===s(e))return {cache:t,level:i,item:n,index:r,page:Math.floor(r/t.pageSize),subCache:t.getSubCache(r),flatIndex:o+t.getFlatIndex(r)}}for(const r of t.subCaches){const n=o+t.getFlatIndex(r.parentCacheIndex),a=ba({getItemId:s},r,e,i+1,n+1);if(a)return a}}function ya(s,[t,...e],i=0){t===1/0&&(t=s.size-1);const o=s.getFlatIndex(t),r=s.getSubCache(t);return r&&r.flatSize>0&&e.length?ya(r,e,i+o+1):i+o}/**
|
|
12677
12671
|
* @license
|
|
12678
12672
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12679
12673
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12680
|
-
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=
|
|
12674
|
+
*/class ao{constructor(t,e,i,o,r){v(this,"context");v(this,"pageSize");v(this,"items",[]);v(this,"pendingRequests",{});v(this,"__subCacheByIndex",{});v(this,"__size",0);v(this,"__flatSize",0);this.context=t,this.pageSize=e,this.size=i,this.parentCache=o,this.parentCacheIndex=r,this.__flatSize=i||0;}get parentItem(){return this.parentCache&&this.parentCache.items[this.parentCacheIndex]}get subCaches(){return Object.values(this.__subCacheByIndex)}get isLoading(){return Object.keys(this.pendingRequests).length>0?!0:this.subCaches.some(t=>t.isLoading)}get flatSize(){return this.__flatSize}get effectiveSize(){return console.warn("<vaadin-grid> The `effectiveSize` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.flatSize}get size(){return this.__size}set size(t){var i;if(this.__size!==t){if(this.__size=t,this.context.placeholder!==void 0){this.items.length=t||0;for(let o=0;o<t;o++)(i=this.items)[o]||(i[o]=this.context.placeholder);}Object.keys(this.pendingRequests).forEach(o=>{parseInt(o)*this.pageSize>=this.size&&delete this.pendingRequests[o];});}}recalculateFlatSize(){this.__flatSize=!this.parentItem||this.context.isExpanded(this.parentItem)?this.size+this.subCaches.reduce((t,e)=>(e.recalculateFlatSize(),t+e.flatSize),0):0;}setPage(t,e){const i=t*this.pageSize;e.forEach((o,r)=>{const n=i+r;(this.size===void 0||n<this.size)&&(this.items[n]=o);});}getSubCache(t){return this.__subCacheByIndex[t]}removeSubCache(t){delete this.__subCacheByIndex[t];}removeSubCaches(){this.__subCacheByIndex={};}createSubCache(t){const e=new ao(this.context,this.pageSize,0,this,t);return this.__subCacheByIndex[t]=e,e}getFlatIndex(t){const e=Math.max(0,Math.min(this.size-1,t));return this.subCaches.reduce((i,o)=>{const r=o.parentCacheIndex;return e>r?i+o.flatSize:i},e)}getItemForIndex(t){console.warn("<vaadin-grid> The `getItemForIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{item:e}=Nt(this,t);return e}getCacheAndIndex(t){console.warn("<vaadin-grid> The `getCacheAndIndex` method of ItemCache is deprecated and will be removed in Vaadin 25.");const{cache:e,index:i}=Nt(this,t);return {cache:e,scaledIndex:i}}updateSize(){console.warn("<vaadin-grid> The `updateSize` method of ItemCache is deprecated and will be removed in Vaadin 25."),this.recalculateFlatSize();}ensureSubCacheForScaledIndex(t){if(console.warn("<vaadin-grid> The `ensureSubCacheForScaledIndex` method of ItemCache is deprecated and will be removed in Vaadin 25."),!this.getSubCache(t)){const e=this.createSubCache(t);this.context.__controller.__loadCachePage(e,0);}}get grid(){return console.warn("<vaadin-grid> The `grid` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.context.__controller.host}get itemCaches(){return console.warn("<vaadin-grid> The `itemCaches` property of ItemCache is deprecated and will be removed in Vaadin 25."),this.__subCacheByIndex}}/**
|
|
12681
12675
|
* @license
|
|
12682
12676
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12683
12677
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12684
|
-
*/class
|
|
12678
|
+
*/class Up extends EventTarget{constructor(e,{size:i,pageSize:o,isExpanded:r,getItemId:n,isPlaceholder:a,placeholder:l,dataProvider:d,dataProviderParams:h}){super();v(this,"host");v(this,"dataProvider");v(this,"dataProviderParams");v(this,"pageSize");v(this,"isExpanded");v(this,"getItemId");v(this,"rootCache");v(this,"placeholder");v(this,"isPlaceholder");this.host=e,this.pageSize=o,this.getItemId=n,this.isExpanded=r,this.placeholder=l,this.isPlaceholder=a,this.dataProvider=d,this.dataProviderParams=h,this.rootCache=this.__createRootCache(i);}get flatSize(){return this.rootCache.flatSize}get __cacheContext(){return {isExpanded:this.isExpanded,placeholder:this.placeholder,__controller:this}}isLoading(){return this.rootCache.isLoading}setPageSize(e){this.pageSize=e,this.clearCache();}setDataProvider(e){this.dataProvider=e,this.clearCache();}recalculateFlatSize(){this.rootCache.recalculateFlatSize();}clearCache(){this.rootCache=this.__createRootCache(this.rootCache.size);}getFlatIndexContext(e){return Nt(this.rootCache,e)}getItemContext(e){return ba({getItemId:this.getItemId},this.rootCache,e)}getFlatIndexByPath(e){return ya(this.rootCache,e)}ensureFlatIndexLoaded(e){const{cache:i,page:o,item:r}=this.getFlatIndexContext(e);this.__isItemLoaded(r)||this.__loadCachePage(i,o);}ensureFlatIndexHierarchy(e){const{cache:i,item:o,index:r}=this.getFlatIndexContext(e);if(this.__isItemLoaded(o)&&this.isExpanded(o)&&!i.getSubCache(r)){const n=i.createSubCache(r);this.__loadCachePage(n,0);}}loadFirstPage(){this.__loadCachePage(this.rootCache,0);}__createRootCache(e){return new ao(this.__cacheContext,this.pageSize,e)}__loadCachePage(e,i){if(!this.dataProvider||e.pendingRequests[i])return;let o={page:i,pageSize:this.pageSize,parentItem:e.parentItem};this.dataProviderParams&&(o=H(H({},o),this.dataProviderParams()));const r=(n,a)=>{e.pendingRequests[i]===r&&(a!==void 0?e.size=a:o.parentItem&&(e.size=n.length),e.setPage(i,n),this.recalculateFlatSize(),this.dispatchEvent(new CustomEvent("page-received")),delete e.pendingRequests[i],this.dispatchEvent(new CustomEvent("page-loaded")));};e.pendingRequests[i]=r,this.dispatchEvent(new CustomEvent("page-requested")),this.dataProvider(o,r);}__isItemLoaded(e){return this.isPlaceholder?!this.isPlaceholder(e):this.placeholder?e!==this.placeholder:!!e}}/**
|
|
12685
12679
|
* @license
|
|
12686
12680
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12687
12681
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12688
|
-
*/const
|
|
12682
|
+
*/const Wp=s=>class extends s{static get properties(){return {pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},size:{type:Number,observer:"_sizeChanged",sync:!0},dataProvider:{type:Object,observer:"_dataProviderChanged",sync:!0},__dataProviderInitialized:{type:Boolean,value:!1},__previousDataProviderFilter:{type:String}}}static get observers(){return ["_dataProviderFilterChanged(filter)","_warnDataProviderValue(dataProvider, value)","_ensureFirstPage(opened)"]}constructor(){super(),this.__dataProviderController=new Up(this,{placeholder:new se,isPlaceholder:e=>e instanceof se,dataProviderParams:()=>({filter:this.filter})}),this.__dataProviderController.addEventListener("page-requested",this.__onDataProviderPageRequested.bind(this)),this.__dataProviderController.addEventListener("page-loaded",this.__onDataProviderPageLoaded.bind(this));}ready(){super.ready(),this._scroller.addEventListener("index-requested",e=>{if(!this._shouldFetchData())return;const i=e.detail.index;i!==void 0&&this.__dataProviderController.ensureFlatIndexLoaded(i);}),this.__dataProviderInitialized=!0,this.dataProvider&&this.__synchronizeControllerState();}_dataProviderFilterChanged(e){if(this.__previousDataProviderFilter===void 0&&e===""){this.__previousDataProviderFilter=e;return}this.__previousDataProviderFilter!==e&&(this.__previousDataProviderFilter=e,this.__keepOverlayOpened=!0,this.size=void 0,this.clearCache(),this.__keepOverlayOpened=!1);}_shouldFetchData(){return this.dataProvider?this.opened||this.filter&&this.filter.length:!1}_ensureFirstPage(e){!this._shouldFetchData()||!e||(this._forceNextRequest||this.size===void 0?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this.size>0&&this.__dataProviderController.ensureFlatIndexLoaded(0));}__onDataProviderPageRequested(){this.loading=!0;}__onDataProviderPageLoaded(){const{rootCache:e}=this.__dataProviderController;e.items=[...e.items],this.__synchronizeControllerState(),!this.opened&&!this._isInputFocused()&&this._commitValue();}clearCache(){this.dataProvider&&(this.__dataProviderController.clearCache(),this.__synchronizeControllerState(),this._shouldFetchData()?(this._forceNextRequest=!1,this.__dataProviderController.loadFirstPage()):this._forceNextRequest=!0);}_sizeChanged(e){const{rootCache:i}=this.__dataProviderController;i.size!==e&&(i.size=e,i.items=[...i.items],this.__synchronizeControllerState());}_filteredItemsChanged(e){if(super._filteredItemsChanged(e),this.dataProvider&&e){const{rootCache:i}=this.__dataProviderController;i.items!==e&&(i.items=e,this.__synchronizeControllerState());}}__synchronizeControllerState(){if(this.__dataProviderInitialized&&this.dataProvider){const{rootCache:e}=this.__dataProviderController;this.size=e.size,this.filteredItems=e.items,this.loading=this.__dataProviderController.isLoading();}}_pageSizeChanged(e,i){if(Math.floor(e)!==e||e<1)throw this.pageSize=i,new Error("`pageSize` value must be an integer > 0");this.__dataProviderController.setPageSize(e),this.clearCache();}_dataProviderChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.dataProvider=i;}),this.__dataProviderController.setDataProvider(e),this.clearCache();}_ensureItemsOrDataProvider(e){if(this.items!==void 0&&this.dataProvider!==void 0)throw e(),new Error("Using `items` and `dataProvider` together is not supported")}_warnDataProviderValue(e,i){if(e&&i!==""&&(this.selectedItem===void 0||this.selectedItem===null)){const o=this.__getItemIndexByValue(this.filteredItems,i);(o<0||!this._getItemLabel(this.filteredItems[o]))&&console.warn("Warning: unable to determine the label for the provided `value`. Nothing to display in the text field. This usually happens when setting an initial `value` before any items are returned from the `dataProvider` callback. Consider setting `selectedItem` instead of `value`");}}};/**
|
|
12689
12683
|
* @license
|
|
12690
12684
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12691
12685
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12692
|
-
*/const
|
|
12686
|
+
*/const xa=L(s=>class extends s{static get properties(){return {disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0,sync:!0}}}_disabledChanged(e){this._setAriaDisabled(e);}_setAriaDisabled(e){e?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled");}click(){this.disabled||super.click();}});/**
|
|
12693
12687
|
* @license
|
|
12694
12688
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12695
12689
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12696
|
-
*/const
|
|
12690
|
+
*/const Ca=L(s=>class extends s{get _keyboardActive(){return ro()}ready(){this.addEventListener("focusin",e=>{this._shouldSetFocus(e)&&this._setFocused(!0);}),this.addEventListener("focusout",e=>{this._shouldRemoveFocus(e)&&this._setFocused(!1);}),super.ready();}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1);}_setFocused(e){this.toggleAttribute("focused",e),this.toggleAttribute("focus-ring",e&&this._keyboardActive);}_shouldSetFocus(e){return !0}_shouldRemoveFocus(e){return !0}});/**
|
|
12697
12691
|
* @license
|
|
12698
12692
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12699
12693
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12700
|
-
*/const lo=
|
|
12694
|
+
*/const lo=L(s=>class extends s{ready(){super.ready(),this.addEventListener("keydown",e=>{this._onKeyDown(e);}),this.addEventListener("keyup",e=>{this._onKeyUp(e);});}_onKeyDown(e){switch(e.key){case"Enter":this._onEnter(e);break;case"Escape":this._onEscape(e);break}}_onKeyUp(e){}_onEnter(e){}_onEscape(e){}});/**
|
|
12701
12695
|
* @license
|
|
12702
12696
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12703
12697
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12704
|
-
*/const
|
|
12698
|
+
*/const jp=s=>class extends s{static get properties(){return {overlayClass:{type:String},_overlayElement:{type:Object}}}static get observers(){return ["__updateOverlayClassNames(overlayClass, _overlayElement)"]}__updateOverlayClassNames(e,i){if(!i||e===void 0)return;const{classList:o}=i;if(this.__initialClasses||(this.__initialClasses=new Set(o)),Array.isArray(this.__previousClasses)){const n=this.__previousClasses.filter(a=>!this.__initialClasses.has(a));n.length>0&&o.remove(...n);}const r=typeof e=="string"?e.split(" ").filter(Boolean):[];r.length>0&&o.add(...r),this.__previousClasses=r;}};/**
|
|
12705
12699
|
* @license
|
|
12706
12700
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12707
12701
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12708
|
-
*/function
|
|
12702
|
+
*/function wa(s){if(window.Vaadin&&window.Vaadin.templateRendererCallback){window.Vaadin.templateRendererCallback(s);return}s.querySelector("template")&&console.warn(`WARNING: <template> inside <${s.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`);}/**
|
|
12709
12703
|
* @license
|
|
12710
12704
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12711
12705
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12712
|
-
*/const ho=
|
|
12706
|
+
*/const ho=L(s=>class extends s{static get properties(){return {inputElement:{type:Object,readOnly:!0,observer:"_inputElementChanged",sync:!0},type:{type:String,readOnly:!0},value:{type:String,value:"",observer:"_valueChanged",notify:!0,sync:!0}}}constructor(){super(),this._boundOnInput=this._onInput.bind(this),this._boundOnChange=this._onChange.bind(this);}get _hasValue(){return this.value!=null&&this.value!==""}get _inputElementValueProperty(){return "value"}get _inputElementValue(){return this.inputElement?this.inputElement[this._inputElementValueProperty]:void 0}set _inputElementValue(e){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=e);}clear(){this.value="",this._inputElementValue="";}_addInputListeners(e){e.addEventListener("input",this._boundOnInput),e.addEventListener("change",this._boundOnChange);}_removeInputListeners(e){e.removeEventListener("input",this._boundOnInput),e.removeEventListener("change",this._boundOnChange);}_forwardInputValue(e){this.inputElement&&(this._inputElementValue=e!=null?e:"");}_inputElementChanged(e,i){e?this._addInputListeners(e):i&&this._removeInputListeners(i);}_onInput(e){const i=e.composedPath()[0];this.__userInput=e.isTrusted,this.value=i.value,this.__userInput=!1;}_onChange(e){}_toggleHasValue(e){this.toggleAttribute("has-value",e);}_valueChanged(e,i){this._toggleHasValue(this._hasValue),!(e===""&&i===void 0)&&(this.__userInput||this._forwardInputValue(e));}});/**
|
|
12713
12707
|
* @license
|
|
12714
12708
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12715
12709
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12716
|
-
*/const co=
|
|
12710
|
+
*/const co=L(s=>class extends s{static get properties(){return {invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1,sync:!0},manualValidation:{type:Boolean,value:!1},required:{type:Boolean,reflectToAttribute:!0,sync:!0}}}validate(){const e=this.checkValidity();return this._setInvalid(!e),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:e}})),e}checkValidity(){return !this.required||!!this.value}_setInvalid(e){this._shouldSetInvalid(e)&&(this.invalid=e);}_shouldSetInvalid(e){return !0}_requestValidation(){this.manualValidation||this.validate();}});/**
|
|
12717
12711
|
* @license
|
|
12718
12712
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12719
12713
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12720
|
-
*/class
|
|
12714
|
+
*/class Yp{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");}}/**
|
|
12721
12715
|
* @license
|
|
12722
12716
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12723
12717
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12724
|
-
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof ie?!1:t(e))}const Up=s=>class extends $p(Qt(co(ya(lo(ho(ba(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),xa(this),this.addController(new Hp(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&la(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!as&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?zt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?zt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{as&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof ie)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ro()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
12718
|
+
*/function cr(s){return s!=null}function ur(s,t){return s.findIndex(e=>e instanceof se?!1:t(e))}const Gp=s=>class extends jp(Zt(co(Ca(lo(ho(xa(s))))))){static get properties(){return {opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0,observer:"_openedChanged"},autoOpenDisabled:{type:Boolean,sync:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},renderer:{type:Object,sync:!0},items:{type:Array,sync:!0,observer:"_itemsChanged"},allowCustomValue:{type:Boolean,value:!1},filteredItems:{type:Array,observer:"_filteredItemsChanged",sync:!0},_lastCommittedValue:String,loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},_focusedIndex:{type:Number,observer:"_focusedIndexChanged",value:-1,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},selectedItem:{type:Object,notify:!0,sync:!0},itemClassNameGenerator:{type:Object},itemLabelPath:{type:String,value:"label",observer:"_itemLabelPathChanged",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},_toggleElement:{type:Object,observer:"_toggleElementChanged"},_dropdownItems:{type:Array,sync:!0},_closeOnBlurIsPrevented:Boolean,_scroller:{type:Object,sync:!0},_overlayOpened:{type:Boolean,sync:!0,observer:"_overlayOpenedChanged"},__keepOverlayOpened:{type:Boolean,sync:!0}}}static get observers(){return ["_selectedItemChanged(selectedItem, itemValuePath, itemLabelPath)","_openedOrItemsChanged(opened, _dropdownItems, loading, __keepOverlayOpened)","_updateScroller(_scroller, _dropdownItems, opened, loading, selectedItem, itemIdPath, _focusedIndex, renderer, _theme, itemClassNameGenerator)"]}constructor(){super(),this._boundOverlaySelectedItemChanged=this._overlaySelectedItemChanged.bind(this),this._boundOnClearButtonMouseDown=this.__onClearButtonMouseDown.bind(this),this._boundOnClick=this._onClick.bind(this),this._boundOnOverlayTouchAction=this._onOverlayTouchAction.bind(this),this._boundOnTouchend=this._onTouchend.bind(this);}get _tagNamePrefix(){return "vaadin-combo-box"}get _nativeInput(){return this.inputElement}_inputElementChanged(e){super._inputElementChanged(e);const i=this._nativeInput;i&&(i.autocomplete="off",i.autocapitalize="off",i.setAttribute("role","combobox"),i.setAttribute("aria-autocomplete","list"),i.setAttribute("aria-expanded",!!this.opened),i.setAttribute("spellcheck","false"),i.setAttribute("autocorrect","off"),this._revertInputValueToValue(),this.clearElement&&this.clearElement.addEventListener("mousedown",this._boundOnClearButtonMouseDown));}ready(){super.ready(),this._initOverlay(),this._initScroller(),this._lastCommittedValue=this.value,this.addEventListener("click",this._boundOnClick),this.addEventListener("touchend",this._boundOnTouchend);const e=()=>{requestAnimationFrame(()=>{this._overlayElement.bringToFront();});};this.addEventListener("mousedown",e),this.addEventListener("touchstart",e),wa(this),this.addController(new Yp(this));}disconnectedCallback(){super.disconnectedCallback(),this.close();}requestContentUpdate(){this._scroller&&(this._scroller.requestContentUpdate(),this._getItemElements().forEach(e=>{e.requestContentUpdate();}));}open(){!this.disabled&&!this.readonly&&(this.opened=!0);}close(){this.opened=!1;}_propertiesChanged(e,i,o){super._propertiesChanged(e,i,o),i.filter!==void 0&&this._filterChanged(i.filter);}updated(e){super.updated(e),e.has("filter")&&this._filterChanged(this.filter);}_initOverlay(){const e=this.$.overlay;e._comboBox=this,e.addEventListener("touchend",this._boundOnOverlayTouchAction),e.addEventListener("touchmove",this._boundOnOverlayTouchAction),e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("opened-changed",i=>{this._overlayOpened=i.detail.value;}),this._overlayElement=e;}_initScroller(e){const i=document.createElement(`${this._tagNamePrefix}-scroller`);i.owner=e||this,i.getItemLabel=this._getItemLabel.bind(this),i.addEventListener("selection-changed",this._boundOverlaySelectedItemChanged);const o=this._overlayElement;o.renderer=r=>{r.innerHTML||r.appendChild(i);},o.requestContentUpdate(),this._scroller=i;}_updateScroller(e,i,o,r,n,a,l,d,h,c){e&&(o&&(e.style.maxHeight=getComputedStyle(this).getPropertyValue(`--${this._tagNamePrefix}-overlay-max-height`)||"65vh"),e.setProperties({items:o?i:[],opened:o,loading:r,selectedItem:n,itemIdPath:a,focusedIndex:l,renderer:d,theme:h,itemClassNameGenerator:c}));}_openedOrItemsChanged(e,i,o,r){this._overlayOpened=e&&(r||o||!!(i&&i.length));}_overlayOpenedChanged(e,i){e?(this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-opened",{bubbles:!0,composed:!0})),this._onOpened()):i&&this._dropdownItems&&this._dropdownItems.length&&(this.close(),this.dispatchEvent(new CustomEvent("vaadin-combo-box-dropdown-closed",{bubbles:!0,composed:!0})));}_focusedIndexChanged(e,i){i!==void 0&&this._updateActiveDescendant(e);}_isInputFocused(){return this.inputElement&&da(this.inputElement)}_updateActiveDescendant(e){const i=this._nativeInput;if(!i)return;const o=this._getItemElements().find(r=>r.index===e);o?i.setAttribute("aria-activedescendant",o.id):i.removeAttribute("aria-activedescendant");}_openedChanged(e,i){if(i===void 0)return;e?!this._isInputFocused()&&!ls&&this.inputElement&&this.inputElement.focus():this._onClosed();const o=this._nativeInput;o&&(o.setAttribute("aria-expanded",!!e),e?o.setAttribute("aria-controls",this._scroller.id):o.removeAttribute("aria-controls"));}_onOverlayTouchAction(){this._closeOnBlurIsPrevented=!0,this.inputElement.blur(),this._closeOnBlurIsPrevented=!1;}_isClearButton(e){return e.composedPath()[0]===this.clearElement}__onClearButtonMouseDown(e){e.preventDefault(),this.inputElement.focus();}_onClearButtonClick(e){e.preventDefault(),this._onClearAction(),this.opened&&this.requestContentUpdate();}_onToggleButtonClick(e){e.preventDefault(),this.opened?this.close():this.open();}_onHostClick(e){this.autoOpenDisabled||(e.preventDefault(),this.open());}_onClick(e){this._isClearButton(e)?this._onClearButtonClick(e):e.composedPath().includes(this._toggleElement)?this._onToggleButtonClick(e):this._onHostClick(e);}_onKeyDown(e){super._onKeyDown(e),e.key==="ArrowDown"?(this._onArrowDown(),e.preventDefault()):e.key==="ArrowUp"&&(this._onArrowUp(),e.preventDefault());}_getItemLabel(e){let i=e&&this.itemLabelPath?Mt(this.itemLabelPath,e):void 0;return i==null&&(i=e?e.toString():""),i}_getItemValue(e){let i=e&&this.itemValuePath?Mt(this.itemValuePath,e):void 0;return i===void 0&&(i=e?e.toString():""),i}_onArrowDown(){if(this.opened){const e=this._dropdownItems;e&&(this._focusedIndex=Math.min(e.length-1,this._focusedIndex+1),this._prefillFocusedItemLabel());}else this.open();}_onArrowUp(){if(this.opened){if(this._focusedIndex>-1)this._focusedIndex=Math.max(0,this._focusedIndex-1);else {const e=this._dropdownItems;e&&(this._focusedIndex=e.length-1);}this._prefillFocusedItemLabel();}else this.open();}_prefillFocusedItemLabel(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this._inputElementValue=this._getItemLabel(e),this._markAllSelectionRange();}}_setSelectionRange(e,i){this._isInputFocused()&&this.inputElement.setSelectionRange&&this.inputElement.setSelectionRange(e,i);}_markAllSelectionRange(){this._inputElementValue!==void 0&&this._setSelectionRange(0,this._inputElementValue.length);}_clearSelectionRange(){if(this._inputElementValue!==void 0){const e=this._inputElementValue?this._inputElementValue.length:0;this._setSelectionRange(e,e);}}_closeOrCommit(){!this.opened&&!this.loading?this._commitValue():this.close();}_onEnter(e){if(!this._hasValidInputValue()){e.preventDefault(),e.stopPropagation();return}this.opened&&(e.preventDefault(),e.stopPropagation()),this._closeOrCommit();}_hasValidInputValue(){const e=this._focusedIndex<0&&this._inputElementValue!==""&&this._getItemLabel(this.selectedItem)!==this._inputElementValue;return this.allowCustomValue||!e}_onEscape(e){this.autoOpenDisabled&&(this.opened||this.value!==this._inputElementValue&&this._inputElementValue.length>0)?(e.stopPropagation(),this._focusedIndex=-1,this.cancel()):this.opened?(e.stopPropagation(),this._focusedIndex>-1?(this._focusedIndex=-1,this._revertInputValue()):this.cancel()):this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_toggleElementChanged(e){e&&(e.addEventListener("mousedown",i=>i.preventDefault()),e.addEventListener("click",()=>{ls&&!this._isInputFocused()&&document.activeElement.blur();}));}_onClearAction(){this.selectedItem=null,this.allowCustomValue&&(this.value=""),this._detectAndDispatchChange();}_clearFilter(){this.filter="";}cancel(){this._revertInputValueToValue(),this._lastCommittedValue=this.value,this._closeOrCommit();}_onOpened(){this._lastCommittedValue=this.value;}_onClosed(){(!this.loading||this.allowCustomValue)&&this._commitValue();}_commitValue(){if(this._focusedIndex>-1){const e=this._dropdownItems[this._focusedIndex];this.selectedItem!==e&&(this.selectedItem=e),this._inputElementValue=this._getItemLabel(this.selectedItem),this._focusedIndex=-1;}else if(this._inputElementValue===""||this._inputElementValue===void 0)this.selectedItem=null,this.allowCustomValue&&(this.value="");else {const e=[this.selectedItem,...this._dropdownItems||[]],i=e[this.__getItemIndexByLabel(e,this._inputElementValue)];if(this.allowCustomValue&&!i){const o=this._inputElementValue;this._lastCustomValue=o;const r=new CustomEvent("custom-value-set",{detail:o,composed:!0,cancelable:!0,bubbles:!0});this.dispatchEvent(r),r.defaultPrevented||(this.value=o);}else !this.allowCustomValue&&!this.opened&&i?this.value=this._getItemValue(i):this._revertInputValueToValue();}this._detectAndDispatchChange(),this._clearSelectionRange(),this._clearFilter();}_onInput(e){const i=this._inputElementValue,o={};this.filter===i?this._filterChanged(this.filter):o.filter=i,!this.opened&&!this._isClearButton(e)&&!this.autoOpenDisabled&&(o.opened=!0),this.setProperties(o);}_onChange(e){e.stopPropagation();}_itemLabelPathChanged(e){typeof e!="string"&&console.error("You should set itemLabelPath to a valid string");}_filterChanged(e){this._scrollIntoView(0),this._focusedIndex=-1,this.items?this.filteredItems=this._filterItems(this.items,e):this._filteredItemsChanged(this.filteredItems);}_revertInputValue(){this.filter!==""?this._inputElementValue=this.filter:this._revertInputValueToValue(),this._clearSelectionRange();}_revertInputValueToValue(){this.allowCustomValue&&!this.selectedItem?this._inputElementValue=this.value:this._inputElementValue=this._getItemLabel(this.selectedItem);}_selectedItemChanged(e){if(e==null)this.filteredItems&&(this.allowCustomValue||(this.value=""),this._toggleHasValue(this._hasValue),this._inputElementValue=this.value);else {const i=this._getItemValue(e);if(this.value!==i&&(this.value=i,this.value!==i))return;this._toggleHasValue(!0),this._inputElementValue=this._getItemLabel(e);}}_valueChanged(e,i){e===""&&i===void 0||(cr(e)?(this._getItemValue(this.selectedItem)!==e&&this._selectItemForValue(e),!this.selectedItem&&this.allowCustomValue&&(this._inputElementValue=e),this._toggleHasValue(this._hasValue)):this.selectedItem=null,this._clearFilter(),this._lastCommittedValue=void 0);}_detectAndDispatchChange(){document.hasFocus()&&this._requestValidation(),this.value!==this._lastCommittedValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this._lastCommittedValue=this.value);}_itemsChanged(e,i){this._ensureItemsOrDataProvider(()=>{this.items=i;}),e?this.filteredItems=e.slice(0):i&&(this.filteredItems=null);}_filteredItemsChanged(e){this._setDropdownItems(e);}_filterItems(e,i){return e&&e.filter(r=>(i=i?i.toString().toLowerCase():"",this._getItemLabel(r).toString().toLowerCase().indexOf(i)>-1))}_selectItemForValue(e){const i=this.__getItemIndexByValue(this.filteredItems,e),o=this.selectedItem;i>=0?this.selectedItem=this.filteredItems[i]:this.dataProvider&&this.selectedItem===void 0?this.selectedItem=void 0:this.selectedItem=null,this.selectedItem===null&&o===null&&this._selectedItemChanged(this.selectedItem);}_setDropdownItems(e){const i=this._dropdownItems;this._dropdownItems=e;const o=i?i[this._focusedIndex]:null,r=this.__getItemIndexByValue(e,this.value);(this.selectedItem===null||this.selectedItem===void 0)&&r>=0&&(this.selectedItem=e[r]);const n=this.__getItemIndexByValue(e,this._getItemValue(o));n>-1?this._focusedIndex=n:this._focusedIndex=this.__getItemIndexByLabel(e,this.filter);}_getItemElements(){return Array.from(this._scroller.querySelectorAll(`${this._tagNamePrefix}-item`))}_scrollIntoView(e){this._scroller&&this._scroller.scrollIntoView(e);}__getItemIndexByValue(e,i){return !e||!cr(i)?-1:ur(e,o=>this._getItemValue(o)===i)}__getItemIndexByLabel(e,i){return !e||!i?-1:ur(e,o=>this._getItemLabel(o).toString().toLowerCase()===i.toString().toLowerCase())}_overlaySelectedItemChanged(e){e.stopPropagation(),!(e.detail.item instanceof se)&&this.opened&&(this._focusedIndex=this.filteredItems.indexOf(e.detail.item),this.close());}_setFocused(e){if(super._setFocused(e),!e&&!this.readonly&&!this._closeOnBlurIsPrevented){if(!this.opened&&this.allowCustomValue&&this._inputElementValue===this._lastCustomValue){delete this._lastCustomValue;return}if(ro()){this._closeOrCommit();return}this.opened?this._overlayOpened||this.close():this._commitValue();}}_shouldRemoveFocus(e){return e.relatedTarget&&e.relatedTarget.localName===`${this._tagNamePrefix}-item`?!1:e.relatedTarget===this._overlayElement?(e.composedPath()[0].focus(),!1):!0}_onTouchend(e){!this.clearElement||e.composedPath()[0]!==this.clearElement||(e.preventDefault(),this._onClearAction());}};/**
|
|
12725
12719
|
* @license
|
|
12726
12720
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12727
12721
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12728
|
-
*/const
|
|
12722
|
+
*/const Kp=s=>class extends Wp(Gp(s)){static get properties(){return {filteredItems:{type:Array,notify:!0,sync:!0},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,notify:!0,sync:!0},size:{type:Number,notify:!0,observer:"_sizeChanged",sync:!0},selectedItems:{type:Array,value:()=>[]},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},lastFilter:{type:String,notify:!0,sync:!0},topGroup:{type:Array,observer:"_topGroupChanged",sync:!0},_target:{type:Object}}}static get observers(){return ["_readonlyChanged(readonly)"]}get clearElement(){return this.querySelector('[part="clear-button"]')}get _tagNamePrefix(){return "vaadin-multi-select-combo-box"}constructor(){super(),this.addEventListener("custom-value-set",this.__onCustomValueSet.bind(this));}open(){!this.disabled&&!(this.readonly&&this.selectedItems.length===0)&&(this.opened=!0);}ready(){super.ready(),this._target=this,this._toggleElement=this.querySelector(".toggle-button");}_updateOverlayWidth(){this.$.overlay._updateOverlayWidth();}_readonlyChanged(){this._setDropdownItems(this.filteredItems);}_setDropdownItems(e){if(this.readonly){super._setDropdownItems(this.selectedItems);return}if(this.filter||!this.selectedItemsOnTop){super._setDropdownItems(e);return}if(e&&e.length&&this.topGroup&&this.topGroup.length){const i=e.filter(o=>this._comboBox._findIndex(o,this.topGroup,this.itemIdPath)===-1);super._setDropdownItems(this.topGroup.concat(i));return}super._setDropdownItems(e);}_topGroupChanged(e){e&&this._setDropdownItems(this.filteredItems);}_initScroller(){const e=this.getRootNode().host;this._comboBox=e,super._initScroller(e);}_onEnter(e){if(this.opened){if(e.preventDefault(),e.stopPropagation(),this.readonly)this.close();else if(this._hasValidInputValue()){const i=this._dropdownItems[this._focusedIndex];this._commitValue(),this._focusedIndex=this._dropdownItems.indexOf(i);}return}super._onEnter(e);}_onEscape(e){if(this.readonly){e.stopPropagation(),this.opened&&this.close();return}super._onEscape(e);}_clearFilter(){(!this.keepFilter||!this.opened)&&super._clearFilter();}_revertInputValueToValue(){super._revertInputValueToValue(),this.filter="";}_commitValue(){this.lastFilter=this.filter,super._commitValue();}_onArrowDown(){this.readonly?this.opened||this.open():super._onArrowDown();}_onArrowUp(){this.readonly?this.opened||this.open():super._onArrowUp();}_setFocused(e){e||(this._ignoreCommitValue=!0),super._setFocused(e),!e&&this.readonly&&!this._closeOnBlurIsPrevented&&this.close();}_onClosed(){this._ignoreCommitValue=!0,super._onClosed();}_detectAndDispatchChange(){if(this._ignoreCommitValue){this._ignoreCommitValue=!1,this.clear(),this._inputElementValue="";return}super._detectAndDispatchChange();}_overlaySelectedItemChanged(e){e.stopPropagation(),!this.readonly&&(e.detail.item instanceof se||this.opened&&(this.lastFilter=this.filter,this.dispatchEvent(new CustomEvent("combo-box-item-selected",{detail:{item:e.detail.item}}))));}_shouldFetchData(){return this.readonly?!1:super._shouldFetchData()}clearCache(){this.readonly||super.clearCache();}__onCustomValueSet(e){this._ignoreCommitValue&&e.stopImmediatePropagation();}};/**
|
|
12729
12723
|
* @license
|
|
12730
12724
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12731
12725
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12732
|
-
*/class
|
|
12726
|
+
*/class Xp extends Kp(Oe(y)){static get is(){return "vaadin-multi-select-combo-box-internal"}static get template(){return b`
|
|
12733
12727
|
<style>
|
|
12734
12728
|
:host([opened]) {
|
|
12735
12729
|
pointer-events: auto;
|
|
@@ -12747,15 +12741,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12747
12741
|
no-vertical-overlap
|
|
12748
12742
|
restore-focus-node="[[inputElement]]"
|
|
12749
12743
|
></vaadin-multi-select-combo-box-overlay>
|
|
12750
|
-
`}}
|
|
12744
|
+
`}}J(Xp);/**
|
|
12751
12745
|
* @license
|
|
12752
12746
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12753
12747
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12754
|
-
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let
|
|
12748
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){an();};let Ei;const pr=new Set,Jp=s=>class extends Xt(s){static finalize(){super.finalize();const{is:e}=this;e&&!pr.has(e)&&(window.Vaadin.registrations.push(this),pr.add(e),window.Vaadin.developmentModeCallback&&(Ei=N.debounce(Ei,fa,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]();}),va(Ei)));}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.');}};/**
|
|
12755
12749
|
* @license
|
|
12756
12750
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12757
12751
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12758
|
-
*/const
|
|
12752
|
+
*/const Qp=p`
|
|
12759
12753
|
[part='clear-button'] {
|
|
12760
12754
|
display: none;
|
|
12761
12755
|
cursor: default;
|
|
@@ -12772,7 +12766,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12772
12766
|
* @license
|
|
12773
12767
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12774
12768
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12775
|
-
*/const
|
|
12769
|
+
*/const Zp=p`
|
|
12770
|
+
[class$='container'] {
|
|
12771
|
+
display: flex;
|
|
12772
|
+
flex-direction: column;
|
|
12773
|
+
min-width: 100%;
|
|
12774
|
+
max-width: 100%;
|
|
12775
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
12776
|
+
}
|
|
12777
|
+
`;/**
|
|
12778
|
+
* @license
|
|
12779
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12780
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12781
|
+
*/const e_=p`
|
|
12776
12782
|
:host {
|
|
12777
12783
|
display: inline-flex;
|
|
12778
12784
|
outline: none;
|
|
@@ -12810,125 +12816,113 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12810
12816
|
* @license
|
|
12811
12817
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12812
12818
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12813
|
-
*/const
|
|
12814
|
-
[class$='container'] {
|
|
12815
|
-
display: flex;
|
|
12816
|
-
flex-direction: column;
|
|
12817
|
-
min-width: 100%;
|
|
12818
|
-
max-width: 100%;
|
|
12819
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
12820
|
-
}
|
|
12821
|
-
`;/**
|
|
12822
|
-
* @license
|
|
12823
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12824
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12825
|
-
*/const Xp=[Gp,Kp,Yp];/**
|
|
12819
|
+
*/const t_=[e_,Zp,Qp];/**
|
|
12826
12820
|
* @license
|
|
12827
12821
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12828
12822
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12829
|
-
*/const
|
|
12823
|
+
*/const F=document.createElement("div");F.style.position="fixed";F.style.clip="rect(0px, 0px, 0px, 0px)";F.setAttribute("aria-live","polite");document.body.appendChild(F);let vt;function wt(s,t={}){const e=t.mode||"polite",i=t.timeout===void 0?150:t.timeout;e==="alert"?(F.removeAttribute("aria-live"),F.removeAttribute("role"),vt=N.debounce(vt,ot,()=>{F.setAttribute("role","alert");})):(vt&&vt.cancel(),F.removeAttribute("role"),F.setAttribute("aria-live",e)),F.textContent="",setTimeout(()=>{F.textContent=s;},i);}/**
|
|
12830
12824
|
* @license
|
|
12831
12825
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12832
12826
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12833
|
-
*/const
|
|
12827
|
+
*/const gt=new ResizeObserver(s=>{setTimeout(()=>{s.forEach(t=>{t.target.isConnected&&(t.target.resizables?t.target.resizables.forEach(e=>{e._onResize(t.contentRect);}):t.target._onResize(t.contentRect));});});}),i_=L(s=>class extends s{get _observeParent(){return !1}connectedCallback(){if(super.connectedCallback(),gt.observe(this),this._observeParent){const e=this.parentNode instanceof ShadowRoot?this.parentNode.host:this.parentNode;e.resizables||(e.resizables=new Set,gt.observe(e)),e.resizables.add(this),this.__parent=e;}}disconnectedCallback(){super.disconnectedCallback(),gt.unobserve(this);const e=this.__parent;if(this._observeParent&&e){const i=e.resizables;i&&(i.delete(this),i.size===0&>.unobserve(e)),this.__parent=null;}}_onResize(e){}});/**
|
|
12834
12828
|
* @license
|
|
12835
12829
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12836
12830
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12837
|
-
*/class
|
|
12831
|
+
*/class s_{constructor(t,e){this.slot=t,this.callback=e,this._storedNodes=[],this._connected=!1,this._scheduled=!1,this._boundSchedule=()=>{this._schedule();},this.connect(),this._schedule();}connect(){this.slot.addEventListener("slotchange",this._boundSchedule),this._connected=!0;}disconnect(){this.slot.removeEventListener("slotchange",this._boundSchedule),this._connected=!1;}_schedule(){this._scheduled||(this._scheduled=!0,queueMicrotask(()=>{this.flush();}));}flush(){this._connected&&(this._scheduled=!1,this._processNodes());}_processNodes(){const t=this.slot.assignedNodes({flatten:!0});let e=[];const i=[],o=[];t.length&&(e=t.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,n)=>{const a=t.indexOf(r);a===-1?i.push(r):a!==n&&o.push(r);}),(e.length||i.length||o.length)&&this.callback({addedNodes:e,currentNodes:t,movedNodes:o,removedNodes:i}),this._storedNodes=t;}}/**
|
|
12838
12832
|
* @license
|
|
12839
12833
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12840
12834
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12841
|
-
*/class
|
|
12835
|
+
*/class ei extends EventTarget{static generateId(t,e="default"){return `${e}-${t.localName}-${_a()}`}constructor(t,e,i,o={}){super();const{initializer:r,multiple:n,observe:a,useUniqueId:l,uniqueIdPrefix:d}=o;this.host=t,this.slotName=e,this.tagName=i,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof n=="boolean"?n:!1,this.slotInitializer=r,n&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(t,d||e));}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0);}initSingle(){let t=this.getSlotChild();t?(this.node=t,this.initAddedNode(t)):(t=this.attachDefaultNode(),this.initNode(t));}initMultiple(){const t=this.getSlotChildren();if(t.length===0){const e=this.attachDefaultNode();e&&(this.nodes=[e],this.initNode(e));}else this.nodes=t,t.forEach(e=>{this.initAddedNode(e);});}attachDefaultNode(){const{host:t,slotName:e,tagName:i}=this;let o=this.defaultNode;return !o&&i&&(o=document.createElement(i),o instanceof Element&&(e!==""&&o.setAttribute("slot",e),this.defaultNode=o)),o&&(this.node=o,t.appendChild(o)),o}getSlotChildren(){const{slotName:t}=this;return Array.from(this.host.childNodes).filter(e=>e.nodeType===Node.ELEMENT_NODE&&e.slot===t||e.nodeType===Node.TEXT_NODE&&e.textContent.trim()&&t==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(t){const{slotInitializer:e}=this;e&&e(t,this.host);}initCustomNode(t){}teardownNode(t){}initAddedNode(t){t!==this.defaultNode&&(this.initCustomNode(t),this.initNode(t));}observeSlot(){const{slotName:t}=this,e=t===""?"slot:not([name])":`slot[name=${t}]`,i=this.host.shadowRoot.querySelector(e);this.__slotObserver=new s_(i,({addedNodes:o,removedNodes:r})=>{const n=this.multiple?this.nodes:[this.node],a=o.filter(l=>!up(l)&&!n.includes(l));r.length&&(this.nodes=n.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l);})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...n,...a].filter(l=>l!==this.defaultNode),a.forEach(l=>{this.initAddedNode(l);})):(this.node&&this.node.remove(),this.node=a[0],this.initAddedNode(this.node)));});}}/**
|
|
12842
12836
|
* @license
|
|
12843
12837
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12844
12838
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12845
|
-
*/class
|
|
12839
|
+
*/class o_ extends ei{constructor(t){super(t,"tooltip"),this.setTarget(t);}initCustomNode(t){t.target=this.target,this.ariaTarget!==void 0&&(t.ariaTarget=this.ariaTarget),this.context!==void 0&&(t.context=this.context),this.manual!==void 0&&(t.manual=this.manual),this.opened!==void 0&&(t.opened=this.opened),this.position!==void 0&&(t._position=this.position),this.shouldShow!==void 0&&(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}}));}}/**
|
|
12846
12840
|
* @license
|
|
12847
12841
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12848
12842
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12849
|
-
*/const
|
|
12843
|
+
*/const r_=s=>class extends xa(s){static get properties(){return {tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged",sync:!0},_lastTabIndex:{type:Number}}}_disabledChanged(e,i){super._disabledChanged(e,i),!this.__shouldAllowFocusWhenDisabled()&&(e?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.setAttribute("tabindex","-1")):i&&(this._lastTabIndex!==void 0?this.setAttribute("tabindex",this._lastTabIndex):this.tabindex=void 0));}_tabindexChanged(e){this.__shouldAllowFocusWhenDisabled()||this.disabled&&e!==-1&&(this._lastTabIndex=e,this.setAttribute("tabindex","-1"));}focus(){(!this.disabled||this.__shouldAllowFocusWhenDisabled())&&super.focus();}__shouldAllowFocusWhenDisabled(){return !1}};/**
|
|
12850
12844
|
* @license
|
|
12851
12845
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12852
12846
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12853
|
-
*/const
|
|
12847
|
+
*/const n_=L(s=>class extends Ca(r_(s)){static get properties(){return {autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged",sync:!0},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this);}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","");});}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus();}blur(){this.focusElement&&this.focusElement.blur();}click(){this.focusElement&&!this.disabled&&this.focusElement.click();}_focusElementChanged(e,i){e?(e.disabled=this.disabled,this._addFocusListeners(e),this.__forwardTabIndex(this.tabindex)):i&&this._removeFocusListeners(i);}_addFocusListeners(e){e.addEventListener("blur",this._boundOnBlur),e.addEventListener("focus",this._boundOnFocus);}_removeFocusListeners(e){e.removeEventListener("blur",this._boundOnBlur),e.removeEventListener("focus",this._boundOnFocus);}_onFocus(e){e.stopPropagation(),this.dispatchEvent(new Event("focus"));}_onBlur(e){e.stopPropagation(),this.dispatchEvent(new Event("blur"));}_shouldSetFocus(e){return e.target===this.focusElement}_shouldRemoveFocus(e){return e.target===this.focusElement}_disabledChanged(e,i){super._disabledChanged(e,i),this.focusElement&&(this.focusElement.disabled=e),e&&this.blur();}_tabindexChanged(e){this.__forwardTabIndex(e);}__forwardTabIndex(e){e!==void 0&&this.focusElement&&(this.focusElement.tabIndex=e,e!==-1&&(this.tabindex=void 0)),this.disabled&&e&&(e!==-1&&(this._lastTabIndex=e),this.tabindex=void 0),e===void 0&&this.hasAttribute("tabindex")&&this.removeAttribute("tabindex");}});/**
|
|
12854
12848
|
* @license
|
|
12855
12849
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12856
12850
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12857
|
-
*/const
|
|
12851
|
+
*/const Si=new WeakMap;function a_(s){return Si.has(s)||Si.set(s,new Set),Si.get(s)}function l_(s,t){const e=document.createElement("style");e.textContent=s,t===document?document.head.appendChild(e):t.insertBefore(e,t.firstChild);}const d_=L(s=>class extends s{get slotStyles(){return []}connectedCallback(){super.connectedCallback(),this.__applySlotStyles();}__applySlotStyles(){const e=this.getRootNode(),i=a_(e);this.slotStyles.forEach(o=>{i.has(o)||(l_(o,e),i.add(o));});}});/**
|
|
12858
12852
|
* @license
|
|
12859
12853
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12860
12854
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12861
|
-
*/const
|
|
12855
|
+
*/const h_=s=>class extends ho(lo(s)){static get properties(){return {clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",e=>this._onClearButtonMouseDown(e)),this.clearElement.addEventListener("click",e=>this._onClearButtonClick(e)));}_onClearButtonClick(e){e.preventDefault(),this._onClearAction();}_onClearButtonMouseDown(e){e.preventDefault(),ls||this.inputElement.focus();}_onEscape(e){super._onEscape(e),this.clearButtonVisible&&this.value&&!this.readonly&&(e.stopPropagation(),this._onClearAction());}_onClearAction(){this._inputElementValue="",this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}));}};/**
|
|
12862
12856
|
* @license
|
|
12863
12857
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12864
12858
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12865
|
-
*/const
|
|
12859
|
+
*/const ki=new Map;function uo(s){return ki.has(s)||ki.set(s,new WeakMap),ki.get(s)}function Ia(s,t){s&&s.removeAttribute(t);}function Aa(s,t){if(!s||!t)return;const e=uo(t);if(e.has(s))return;const i=no(s.getAttribute(t));e.set(s,new Set(i));}function c_(s,t){if(!s||!t)return;const e=uo(t),i=e.get(s);!i||i.size===0?s.removeAttribute(t):ca(s,t,Jt(i)),e.delete(s);}function Ti(s,t,e={newId:null,oldId:null,fromUser:!1}){if(!s||!t)return;const{newId:i,oldId:o,fromUser:r}=e,n=uo(t),a=n.get(s);if(!r&&a){o&&a.delete(o),i&&a.add(i);return}r&&(a?i||n.delete(s):Aa(s,t),Ia(s,t)),cp(s,t,o);const l=i||Jt(a);l&&ca(s,t,l);}function u_(s,t){Aa(s,t),Ia(s,t);}/**
|
|
12866
12860
|
* @license
|
|
12867
12861
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12868
12862
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12869
|
-
*/class
|
|
12863
|
+
*/class p_{constructor(t){this.host=t,this.__required=!1;}setTarget(t){this.__target=t,this.__setAriaRequiredAttribute(this.__required),this.__setLabelIdToAriaAttribute(this.__labelId,this.__labelId),this.__labelIdFromUser!=null&&this.__setLabelIdToAriaAttribute(this.__labelIdFromUser,this.__labelIdFromUser,!0),this.__setErrorIdToAriaAttribute(this.__errorId),this.__setHelperIdToAriaAttribute(this.__helperId),this.setAriaLabel(this.__label);}setRequired(t){this.__setAriaRequiredAttribute(t),this.__required=t;}setAriaLabel(t){this.__setAriaLabelToAttribute(t),this.__label=t;}setLabelId(t,e=!1){const i=e?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(t,i,e),e?this.__labelIdFromUser=t:this.__labelId=t;}setErrorId(t){this.__setErrorIdToAriaAttribute(t,this.__errorId),this.__errorId=t;}setHelperId(t){this.__setHelperIdToAriaAttribute(t,this.__helperId),this.__helperId=t;}__setAriaLabelToAttribute(t){this.__target&&(t?(u_(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",t)):this.__label&&(c_(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")));}__setLabelIdToAriaAttribute(t,e,i){Ti(this.__target,"aria-labelledby",{newId:t,oldId:e,fromUser:i});}__setErrorIdToAriaAttribute(t,e){Ti(this.__target,"aria-describedby",{newId:t,oldId:e,fromUser:!1});}__setHelperIdToAriaAttribute(t,e){Ti(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")));}}/**
|
|
12870
12864
|
* @license
|
|
12871
12865
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12872
12866
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12873
|
-
*/class po extends
|
|
12867
|
+
*/class po extends ei{constructor(t,e,i,o={}){super(t,e,i,ze(H({},o),{useUniqueId:!0}));}initCustomNode(t){this.__updateNodeId(t),this.__notifyChange(t);}teardownNode(t){const e=this.getSlotChild();e&&e!==this.defaultNode?this.__notifyChange(e):(this.restoreDefaultNode(),this.updateDefaultNode(this.node));}attachDefaultNode(){const t=super.attachDefaultNode();return t&&this.__updateNodeId(t),t}restoreDefaultNode(){}updateDefaultNode(t){this.__notifyChange(t);}observeNode(t){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(e=>{e.forEach(i=>{const o=i.target,r=o===this.node;i.type==="attributes"?r&&this.__updateNodeId(o):(r||o.parentElement===this.node)&&this.__notifyChange(this.node);});}),this.__nodeObserver.observe(t,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0});}__hasContent(t){return t?t.nodeType===Node.ELEMENT_NODE&&(customElements.get(t.localName)||t.children.length>0)||t.textContent&&t.textContent.trim()!=="":!1}__notifyChange(t){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(t),node:t}}));}__updateNodeId(t){const e=!this.nodes||t===this.nodes[0];t.nodeType===Node.ELEMENT_NODE&&(!this.multiple||e)&&!t.id&&(t.id=this.defaultId);}}/**
|
|
12874
12868
|
* @license
|
|
12875
12869
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12876
12870
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12877
|
-
*/class
|
|
12871
|
+
*/class __ extends po{constructor(t){super(t,"error-message","div");}setErrorMessage(t){this.errorMessage=t,this.updateDefaultNode(this.node);}setInvalid(t){this.invalid=t,this.updateDefaultNode(this.node);}initAddedNode(t){t!==this.defaultNode&&this.initCustomNode(t);}initNode(t){this.updateDefaultNode(t);}initCustomNode(t){t.textContent&&!this.errorMessage&&(this.errorMessage=t.textContent.trim()),super.initCustomNode(t);}restoreDefaultNode(){this.attachDefaultNode();}updateDefaultNode(t){const{errorMessage:e,invalid:i}=this,o=!!(i&&e&&e.trim()!=="");t&&(t.textContent=o?e:"",t.hidden=!o,o&&wt(e,{mode:"assertive"})),super.updateDefaultNode(t);}}/**
|
|
12878
12872
|
* @license
|
|
12879
12873
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12880
12874
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12881
|
-
*/class
|
|
12875
|
+
*/class m_ extends po{constructor(t){super(t,"helper",null);}setHelperText(t){this.helperText=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{helperText:t}=this;if(t&&t.trim()!==""){this.tagName="div";const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.helperText),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
12882
12876
|
* @license
|
|
12883
12877
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12884
12878
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12885
|
-
*/class
|
|
12879
|
+
*/class f_ extends po{constructor(t){super(t,"label","label");}setLabel(t){this.label=t,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node);}restoreDefaultNode(){const{label:t}=this;if(t&&t.trim()!==""){const e=this.attachDefaultNode();this.observeNode(e);}}updateDefaultNode(t){t&&(t.textContent=this.label),super.updateDefaultNode(t);}initCustomNode(t){super.initCustomNode(t),this.observeNode(t);}}/**
|
|
12886
12880
|
* @license
|
|
12887
12881
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12888
12882
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12889
|
-
*/const
|
|
12883
|
+
*/const v_=L(s=>class extends Zt(s){static get properties(){return {label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new f_(this),this._labelController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-label",e.detail.hasContent);});}get _labelId(){const e=this._labelNode;return e&&e.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController);}_labelChanged(e){this._labelController.setLabel(e);}});/**
|
|
12890
12884
|
* @license
|
|
12891
12885
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12892
12886
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12893
|
-
*/const
|
|
12887
|
+
*/const g_=s=>class extends co(v_(Zt(s))){static get properties(){return {ariaTarget:{type:Object,observer:"_ariaTargetChanged"},errorMessage:{type:String,observer:"_errorMessageChanged"},helperText:{type:String,observer:"_helperTextChanged"},accessibleName:{type:String,observer:"_accessibleNameChanged"},accessibleNameRef:{type:String,observer:"_accessibleNameRefChanged"}}}static get observers(){return ["_invalidChanged(invalid)","_requiredChanged(required)"]}constructor(){super(),this._fieldAriaController=new p_(this),this._helperController=new m_(this),this._errorController=new __(this),this._errorController.addEventListener("slot-content-changed",e=>{this.toggleAttribute("has-error-message",e.detail.hasContent);}),this._labelController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.__labelChanged(i,o);}),this._helperController.addEventListener("slot-content-changed",e=>{const{hasContent:i,node:o}=e.detail;this.toggleAttribute("has-helper",i),this.__helperChanged(i,o);});}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController);}__helperChanged(e,i){e?this._fieldAriaController.setHelperId(i.id):this._fieldAriaController.setHelperId(null);}_accessibleNameChanged(e){this._fieldAriaController.setAriaLabel(e);}_accessibleNameRefChanged(e){this._fieldAriaController.setLabelId(e,!0);}__labelChanged(e,i){e?this._fieldAriaController.setLabelId(i.id):this._fieldAriaController.setLabelId(null);}_errorMessageChanged(e){this._errorController.setErrorMessage(e);}_helperTextChanged(e){this._helperController.setHelperText(e);}_ariaTargetChanged(e){e&&this._fieldAriaController.setTarget(e);}_requiredChanged(e){this._fieldAriaController.setRequired(e);}_invalidChanged(e){this._errorController.setInvalid(e),setTimeout(()=>{if(e){const i=this._errorNode;this._fieldAriaController.setErrorId(i&&i.id);}else this._fieldAriaController.setErrorId(null);});}};/**
|
|
12894
12888
|
* @license
|
|
12895
12889
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12896
12890
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12897
|
-
*/const
|
|
12891
|
+
*/const b_=L(s=>class extends s{static get properties(){return {stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return []}static get delegateProps(){return []}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver();}_stateTargetChanged(e){e&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated());}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`);}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`);}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(e=>{this._delegateAttribute(e,this[e]);});}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(e=>{this._delegateProperty(e,this[e]);});}_delegateAttrsChanged(...e){this.constructor.delegateAttrs.forEach((i,o)=>{this._delegateAttribute(i,e[o]);});}_delegatePropsChanged(...e){this.constructor.delegateProps.forEach((i,o)=>{this._delegateProperty(i,e[o]);});}_delegateAttribute(e,i){this.stateTarget&&(e==="invalid"&&this._delegateAttribute("aria-invalid",i?"true":!1),typeof i=="boolean"?this.stateTarget.toggleAttribute(e,i):i?this.stateTarget.setAttribute(e,i):this.stateTarget.removeAttribute(e));}_delegateProperty(e,i){this.stateTarget&&(this.stateTarget[e]=i);}});/**
|
|
12898
12892
|
* @license
|
|
12899
12893
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12900
12894
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12901
|
-
*/const
|
|
12895
|
+
*/const y_=L(s=>class extends b_(co(ho(s))){static get constraints(){return ["required"]}static get delegateAttrs(){return [...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver();}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(e=>this[e]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(e){return e.some(i=>this.__isValidConstraint(i))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`);}_constraintsChanged(e,...i){if(!e)return;const o=this._hasValidConstraints(i),r=this.__previousHasConstraints&&!o;(this._hasValue||this.invalid)&&o?this._requestValidation():r&&!this.manualValidation&&this._setInvalid(!1),this.__previousHasConstraints=o;}_onChange(e){e.stopPropagation(),this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:e},bubbles:e.bubbles,cancelable:e.cancelable}));}__isValidConstraint(e){return !!e||e===0}});/**
|
|
12902
12896
|
* @license
|
|
12903
12897
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12904
12898
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12905
|
-
*/const
|
|
12899
|
+
*/const x_=s=>class extends d_(n_(y_(g_(h_(lo(s)))))){static get properties(){return {allowedCharPattern:{type:String,observer:"_allowedCharPatternChanged"},autoselect:{type:Boolean,value:!1},name:{type:String,reflectToAttribute:!0},placeholder:{type:String,reflectToAttribute:!0},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},title:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return [...super.delegateAttrs,"name","type","placeholder","readonly","invalid","title"]}constructor(){super(),this._boundOnPaste=this._onPaste.bind(this),this._boundOnDrop=this._onDrop.bind(this),this._boundOnBeforeInput=this._onBeforeInput.bind(this);}get slotStyles(){return [`
|
|
12906
12900
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
12907
12901
|
font: inherit;
|
|
12908
12902
|
color: inherit;
|
|
12909
12903
|
}
|
|
12910
|
-
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=N.debounce(this._preventInputDebouncer,
|
|
12904
|
+
`]}_onFocus(e){super._onFocus(e),this.autoselect&&this.inputElement&&this.inputElement.select();}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("paste",this._boundOnPaste),e.addEventListener("drop",this._boundOnDrop),e.addEventListener("beforeinput",this._boundOnBeforeInput);}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("paste",this._boundOnPaste),e.removeEventListener("drop",this._boundOnDrop),e.removeEventListener("beforeinput",this._boundOnBeforeInput);}_onKeyDown(e){super._onKeyDown(e),this.allowedCharPattern&&!this.__shouldAcceptKey(e)&&e.target===this.inputElement&&(e.preventDefault(),this._markInputPrevented());}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=N.debounce(this._preventInputDebouncer,Ct.after(200),()=>{this.removeAttribute("input-prevented");});}__shouldAcceptKey(e){return e.metaKey||e.ctrlKey||!e.key||e.key.length!==1||this.__allowedCharRegExp.test(e.key)}_onPaste(e){if(this.allowedCharPattern){const i=e.clipboardData.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onDrop(e){if(this.allowedCharPattern){const i=e.dataTransfer.getData("text");this.__allowedTextRegExp.test(i)||(e.preventDefault(),this._markInputPrevented());}}_onBeforeInput(e){this.allowedCharPattern&&e.data&&!this.__allowedTextRegExp.test(e.data)&&(e.preventDefault(),this._markInputPrevented());}_allowedCharPatternChanged(e){if(e)try{this.__allowedCharRegExp=new RegExp(`^${e}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${e}*$`,"u");}catch(i){console.error(i);}}};/**
|
|
12911
12905
|
* @license
|
|
12912
12906
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12913
12907
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12914
|
-
*/class
|
|
12908
|
+
*/class C_ extends ei{constructor(t,e,i={}){const{uniqueIdPrefix:o}=i;super(t,"input","input",{initializer:(r,n)=>{n.value&&(r.value=n.value),n.type&&r.setAttribute("type",n.type),r.id=this.defaultId,typeof e=="function"&&e(r);},useUniqueId:!0,uniqueIdPrefix:o});}}/**
|
|
12915
12909
|
* @license
|
|
12916
12910
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12917
12911
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12918
|
-
*/class
|
|
12912
|
+
*/class w_{constructor(t,e){this.input=t,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),e.addEventListener("slot-content-changed",i=>{this.__initLabel(i.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);}}/**
|
|
12919
12913
|
* @license
|
|
12920
12914
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12921
12915
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12922
|
-
*/const
|
|
12916
|
+
*/const I_=s=>class extends x_(i_(s)){static get properties(){return {autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged",sync:!0},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged",sync:!0},autoOpenDisabled:{type:Boolean,sync:!0},clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1,sync:!0},items:{type:Array,sync:!0},itemClassNameGenerator:{type:Object,observer:"__itemClassNameGeneratorChanged",sync:!0},itemLabelPath:{type:String,value:"label",sync:!0},itemValuePath:{type:String,value:"value",sync:!0},itemIdPath:{type:String,sync:!0},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},keepFilter:{type:Boolean,value:!1},loading:{type:Boolean,value:!1,reflectToAttribute:!0,sync:!0},overlayClass:{type:String,sync:!0},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0,sync:!0},selectedItems:{type:Array,value:()=>[],notify:!0,sync:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0,sync:!0},size:{type:Number,sync:!0},pageSize:{type:Number,value:50,observer:"_pageSizeChanged",sync:!0},dataProvider:{type:Object,sync:!0},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,observer:"_placeholderChanged",sync:!0},renderer:{type:Function,sync:!0},filter:{type:String,value:"",notify:!0,sync:!0},filteredItems:{type:Array,sync:!0},selectedItemsOnTop:{type:Boolean,value:!1,sync:!0},value:{type:String},_overflowItems:{type:Array,value:()=>[],sync:!0},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String,sync:!0},_topGroup:{type:Array}}}static get observers(){return ["_selectedItemsChanged(selectedItems)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return [...super.slotStyles,`
|
|
12923
12917
|
${e}[has-value] input::placeholder {
|
|
12924
12918
|
color: transparent !important;
|
|
12925
12919
|
forced-color-adjust: none;
|
|
12926
12920
|
}
|
|
12927
|
-
`]}get clearElement(){return this.$.clearButton}get _chips(){return [...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new
|
|
12921
|
+
`]}get clearElement(){return this.$.clearButton}get _chips(){return [...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new C_(this,e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e;})),this.addController(new w_(this.inputElement,this._labelController)),this._tooltipController=new o_(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow(e=>!e.opened),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new ei(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",i=>this._preventBlur(i)),this._overflow=e;}}),this.addController(this._overflowController),this.__updateChips(),wa(this);}checkValidity(){return this.required&&!this.readonly?this._hasValue:!0}clear(){this.__updateSelection([]),wt(this.i18n.cleared);}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache();}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate();}_disabledChanged(e,i){super._disabledChanged(e,i),(e||i)&&this.__updateChips();}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e);}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this._requestValidation());}_onResize(){this.__updateChips();}_delegateAttribute(e,i){if(this.stateTarget){if(e==="required"){this._delegateAttribute("aria-required",i?"true":!1);return}super._delegateAttribute(e,i);}}_autoExpandHorizontallyChanged(e,i){(e||i)&&this.__updateChips();}_autoExpandVerticallyChanged(e,i){(e||i)&&this.__updateChips();}_clearButtonVisibleChanged(e,i){(e||i)&&this.__updateChips();}_onFilteredItemsChanged(e){const{value:i}=e.detail;(Array.isArray(i)||i==null)&&(this.filteredItems=i);}_readonlyChanged(e,i){(e||i)&&this.__updateChips(),this.dataProvider&&this.clearCache();}__itemClassNameGeneratorChanged(e,i){(e||i)&&this.__updateChips();}_pageSizeChanged(e,i){(Math.floor(e)!==e||e<=0)&&(this.pageSize=i,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize;}_placeholderChanged(e){const i=this.__tmpA11yPlaceholder;i!==e&&(this.__savedPlaceholder=e,i&&(this.placeholder=i));}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const i=this._mergeItemLabels(e);this.__tmpA11yPlaceholder===void 0&&(this.__savedPlaceholder=this.placeholder),this.__tmpA11yPlaceholder=i,this.placeholder=i;}else this.__tmpA11yPlaceholder!==void 0&&(delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder);this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox._updateOverlayWidth();}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map(i=>this._getItemLabel(i)).join(", ")}_findIndex(e,i,o){if(o&&e){for(let r=0;r<i.length;r++)if(i[r]&&i[r][o]===e[o])return r;return -1}return i.indexOf(e)}__clearInternalValue(e=!1){!this.keepFilter||e?(this.filter="",this.$.comboBox.clear()):(this.$.comboBox.clear(),this._inputElementValue=this.filter);}__announceItem(e,i,o){const r=i?"selected":"deselected",n=this.i18n.total.replace("{count}",o||0);wt(`${e} ${this.i18n[r]} ${n}`);}__removeItem(e){const i=[...this.selectedItems];i.splice(i.indexOf(e),1),this.__updateSelection(i);const o=this._getItemLabel(e);this.__announceItem(o,!1,i.length);}__selectItem(e){const i=[...this.selectedItems],o=this._findIndex(e,i,this.itemIdPath),r=this._getItemLabel(e);let n=!1;if(o!==-1){const a=this._lastFilter;if(a&&a.toLowerCase()===r.toLowerCase()){this.__clearInternalValue();return}i.splice(o,1);}else i.push(e),n=!0;this.__updateSelection(i),this.__clearInternalValue(),this.__announceItem(r,n,i.length);}__updateSelection(e){this.selectedItems=e,this._requestValidation(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}));}__updateTopGroup(e,i,o){e?(!o||this.__needToSyncTopGroup())&&(this._topGroup=[...i]):this._topGroup=[];}__needToSyncTopGroup(){return this.itemIdPath?this._topGroup&&this._topGroup.some(e=>{const i=this.selectedItems[this._findIndex(e,this.selectedItems,this.itemIdPath)];return i&&e!==i}):!1}__createChip(e){const i=document.createElement("vaadin-multi-select-combo-box-chip");i.setAttribute("slot","chip"),i.item=e,i.disabled=this.disabled,i.readonly=this.readonly;const o=this._getItemLabel(e);return i.label=o,i.setAttribute("title",o),typeof this.itemClassNameGenerator=="function"&&(i.className=this.itemClassNameGenerator(e)),i.addEventListener("item-removed",r=>this._onItemRemoved(r)),i.addEventListener("mousedown",r=>this._preventBlur(r)),i}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const i=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),r=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",i),e.setAttribute("hidden",""),e.style.visibility="",r}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach(a=>{a.remove();});const e=[...this.selectedItems],i=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let r=i-o;e.length>1&&(r-=this.__getOverflowWidth());const n=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const a=[];for(let h=e.length-1,c=null;h>=0;h--){const u=this.__createChip(e[h]);this.insertBefore(u,c),c=u,a.unshift(u);}const l=[],d=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&d<o){for(;a.length>1;){a.pop().remove(),l.unshift(e.pop());const c=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=c)break}a.length===1&&(a[0].style.maxWidth=`${Math.max(n,r)}px`);}this._overflowItems=l;return}for(let a=e.length-1,l=null;a>=0;a--){const d=this.__createChip(e[a]);if(this.insertBefore(d,l),!this.autoExpandVertically){if(this.$.chips.clientWidth>r&&(r<n||l!==null)){d.remove();break}d.style.maxWidth=`${r}px`;}e.pop(),l=d;}this._overflowItems=e;}__updateOverflowChip(e,i,o,r){if(e){const n=i.length;e.label=`${n}`,e.setAttribute("count",`${n}`),e.setAttribute("title",this._mergeItemLabels(i)),e.toggleAttribute("hidden",n===0),e.disabled=o,e.readonly=r;}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear();}_onClearButtonClick(e){e.stopPropagation(),this.clear();}_onChange(e){e.stopPropagation();}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[]);}_onKeyDown(e){super._onKeyDown(e);const i=this._chips;if(!this.readonly&&i.length>0)switch(e.key){case"Backspace":this._onBackSpace(i);break;case"ArrowLeft":this._onArrowLeft(i,e);break;case"ArrowRight":this._onArrowRight(i,e);break;default:this._focusedChipIndex=-1;break}}_onArrowLeft(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===e.length-1?r=-1:o>-1&&(r=o+1):o===-1?r=e.length-1:o>0&&(r=o-1),r!==void 0&&(this._focusedChipIndex=r);}_onArrowRight(e,i){if(this.inputElement.selectionStart!==0)return;const o=this._focusedChipIndex;o!==-1&&i.preventDefault();let r;this.__isRTL?o===-1?r=e.length-1:o>0&&(r=o-1):o===e.length-1?r=-1:o>-1&&(r=o+1),r!==void 0&&(this._focusedChipIndex=r);}_onBackSpace(e){if(this.inputElement.selectionStart!==0)return;const i=this._focusedChipIndex;i===-1?this._focusedChipIndex=e.length-1:(this.__removeItem(e[i].item),this._focusedChipIndex=-1);}_focusedChipIndexChanged(e,i){if(e>-1||i>-1){const o=this._chips;if(o.forEach((r,n)=>{r.toggleAttribute("focused",n===e);}),e>-1){const r=o[e].item,n=this._getItemLabel(r);wt(`${n} ${this.i18n.focused}`);}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e);}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item);}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearInternalValue(!0),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}));}_onItemRemoved(e){this.__removeItem(e.detail.item);}_preventBlur(e){e.preventDefault();}};/**
|
|
12928
12922
|
* @license
|
|
12929
12923
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12930
12924
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12931
|
-
*/
|
|
12925
|
+
*/I("vaadin-multi-select-combo-box",[t_,Ku],{moduleId:"vaadin-multi-select-combo-box-styles"});class A_ extends I_(Oe(Jp(y))){static get is(){return "vaadin-multi-select-combo-box"}static get template(){return b`
|
|
12932
12926
|
<div class="vaadin-multi-select-combo-box-container">
|
|
12933
12927
|
<div part="label">
|
|
12934
12928
|
<slot name="label"></slot>
|
|
@@ -12999,7 +12993,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12999
12993
|
</div>
|
|
13000
12994
|
|
|
13001
12995
|
<slot name="tooltip"></slot>
|
|
13002
|
-
`}}
|
|
12996
|
+
`}}J(A_);f("vaadin-notification-card",p`
|
|
13003
12997
|
:host {
|
|
13004
12998
|
position: relative;
|
|
13005
12999
|
margin: var(--lumo-space-s);
|
|
@@ -13217,11 +13211,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13217
13211
|
* @license
|
|
13218
13212
|
* Copyright 2020 Google LLC
|
|
13219
13213
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13220
|
-
*/const
|
|
13214
|
+
*/const E_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
13221
13215
|
* @license
|
|
13222
13216
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13223
13217
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13224
|
-
*/class
|
|
13218
|
+
*/class S_ extends On(E(X(y))){static get template(){return b`
|
|
13225
13219
|
<style>
|
|
13226
13220
|
:host {
|
|
13227
13221
|
position: fixed;
|
|
@@ -13288,7 +13282,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13288
13282
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
13289
13283
|
</div>
|
|
13290
13284
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
13291
|
-
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class
|
|
13285
|
+
`}static get is(){return "vaadin-notification-container"}static get properties(){return {opened:{type:Boolean,value:!1,observer:"_openedChanged"}}}constructor(){super(),this._boundVaadinOverlayClose=this._onVaadinOverlayClose.bind(this),$s&&(this._boundIosResizeListener=()=>this._detectIosNavbar());}_openedChanged(t){t?(document.body.appendChild(this),document.addEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))):(document.body.removeChild(this),document.removeEventListener("vaadin-overlay-close",this._boundVaadinOverlayClose),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener));}_detectIosNavbar(){const t=window.innerHeight,i=window.innerWidth>t,o=document.documentElement.clientHeight;i&&o>t?this.style.bottom=`${o-t}px`:this.style.bottom="0";}_onVaadinOverlayClose(t){const e=t.detail.sourceEvent;e&&e.composedPath().indexOf(this)>=0&&t.preventDefault();}}class k_ extends E(y){static get template(){return b`
|
|
13292
13286
|
<style>
|
|
13293
13287
|
:host {
|
|
13294
13288
|
display: block;
|
|
@@ -13310,14 +13304,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13310
13304
|
<slot></slot>
|
|
13311
13305
|
</div>
|
|
13312
13306
|
</div>
|
|
13313
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class
|
|
13307
|
+
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class Y extends Yt(Sr(X(y))){static get template(){return b`
|
|
13314
13308
|
<style>
|
|
13315
13309
|
:host {
|
|
13316
13310
|
display: none !important;
|
|
13317
13311
|
}
|
|
13318
13312
|
</style>
|
|
13319
13313
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
13320
|
-
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return
|
|
13314
|
+
`}static get is(){return "vaadin-notification"}static get properties(){return {duration:{type:Number,value:5e3},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},position:{type:String,value:"bottom-start",observer:"_positionChanged"},renderer:Function}}static get observers(){return ["_durationChanged(duration, opened)","_rendererChanged(renderer, opened, _overlayElement)"]}static show(t,e){return E_(t)?Y._createAndShowNotification(i=>{Er(t,i);},e):Y._createAndShowNotification(i=>{i.innerText=t;},e)}static _createAndShowNotification(t,e){const i=document.createElement(Y.is);return e&&Number.isFinite(e.duration)&&(i.duration=e.duration),e&&e.position&&(i.position=e.position),e&&e.theme&&i.setAttribute("theme",e.theme),i.renderer=t,document.body.appendChild(i),i.opened=!0,i.addEventListener("opened-changed",o=>{o.detail.value||i.remove();}),i}get _container(){return Y._container||(Y._container=document.createElement("vaadin-notification-container"),document.body.appendChild(Y._container)),Y._container}get _card(){return this._overlayElement}ready(){super.ready(),this._overlayElement=this.shadowRoot.querySelector("vaadin-notification-card"),eo(this);}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{this.isConnected||(this.opened=!1);});}requestContentUpdate(){this.renderer&&this.renderer(this._card,this);}_rendererChanged(t,e,i){if(!i)return;const o=this._oldRenderer!==t;this._oldRenderer=t,o&&(i.innerHTML="",delete i._$litPart$),e&&(this._didAnimateNotificationAppend||this._animatedAppendNotificationCard(),this.requestContentUpdate());}open(){this.opened=!0;}close(){this.opened=!1;}_openedChanged(t){t?(this._container.opened=!0,this._animatedAppendNotificationCard()):this._card&&this._closeNotificationCard();}__cleanUpOpeningClosingState(){this._card.removeAttribute("opening"),this._card.removeAttribute("closing"),this._card.removeEventListener("animationend",this.__animationEndListener);}_animatedAppendNotificationCard(){this._card?(this.__cleanUpOpeningClosingState(),this._card.setAttribute("opening",""),this._appendNotificationCard(),this.__animationEndListener=()=>this.__cleanUpOpeningClosingState(),this._card.addEventListener("animationend",this.__animationEndListener),this._didAnimateNotificationAppend=!0):this._didAnimateNotificationAppend=!1;}_appendNotificationCard(){if(this._card){if(!this._container.shadowRoot.querySelector(`slot[name="${this.position}"]`)){console.warn(`Invalid alignment parameter provided: position=${this.position}`);return}this._container.bringToFront(),this._card.slot=this.position,this._container.firstElementChild&&/top/u.test(this.position)?this._container.insertBefore(this._card,this._container.firstElementChild):this._container.appendChild(this._card);}}_removeNotificationCard(){this._card.parentNode&&this._card.parentNode.removeChild(this._card),this._card.removeAttribute("closing"),this._container.opened=!!this._container.firstElementChild,this.dispatchEvent(new CustomEvent("closed"));}_closeNotificationCard(){this._durationTimeoutId&&clearTimeout(this._durationTimeoutId),this._animatedRemoveNotificationCard();}_animatedRemoveNotificationCard(){this.__cleanUpOpeningClosingState(),this._card.setAttribute("closing","");const t=getComputedStyle(this._card).getPropertyValue("animation-name");t&&t!=="none"?(this.__animationEndListener=()=>{this._removeNotificationCard(),this.__cleanUpOpeningClosingState();},this._card.addEventListener("animationend",this.__animationEndListener)):this._removeNotificationCard();}_positionChanged(){this.opened&&this._animatedAppendNotificationCard();}_durationChanged(t,e){e&&(clearTimeout(this._durationTimeoutId),t>0&&(this._durationTimeoutId=setTimeout(()=>this.close(),t)));}}x(S_);x(k_);x(Y);const Ea=p`
|
|
13321
13315
|
:host {
|
|
13322
13316
|
-webkit-tap-highlight-color: transparent;
|
|
13323
13317
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -13331,11 +13325,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13331
13325
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
13332
13326
|
background-color: var(--lumo-contrast-10pct);
|
|
13333
13327
|
}
|
|
13334
|
-
`;f("vaadin-list-box",
|
|
13328
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
13335
13329
|
* @license
|
|
13336
13330
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13337
13331
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13338
|
-
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",
|
|
13332
|
+
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const T_=p`
|
|
13339
13333
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
13340
13334
|
text-align: start;
|
|
13341
13335
|
}
|
|
@@ -13378,7 +13372,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13378
13372
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
13379
13373
|
--_lumo-selected-item-padding: 0;
|
|
13380
13374
|
}
|
|
13381
|
-
`;f("vaadin-select",[
|
|
13375
|
+
`;f("vaadin-select",[Pe,T_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
13382
13376
|
:host {
|
|
13383
13377
|
font-family: var(--lumo-font-family);
|
|
13384
13378
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -13397,7 +13391,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13397
13391
|
::slotted(*:hover) {
|
|
13398
13392
|
background-color: transparent;
|
|
13399
13393
|
}
|
|
13400
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
13394
|
+
`,{moduleId:"lumo-select-value-button"});const P_=p`
|
|
13401
13395
|
:host {
|
|
13402
13396
|
--_lumo-item-selected-icon-display: block;
|
|
13403
13397
|
}
|
|
@@ -13433,15 +13427,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13433
13427
|
:host([theme~='align-center']) {
|
|
13434
13428
|
text-align: center;
|
|
13435
13429
|
}
|
|
13436
|
-
`;f("vaadin-select-overlay",[
|
|
13430
|
+
`;f("vaadin-select-overlay",[Bs,P_],{moduleId:"lumo-select-overlay"});/**
|
|
13437
13431
|
* @license
|
|
13438
13432
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13439
13433
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13440
|
-
*/const
|
|
13434
|
+
*/const O_=s=>class extends ks(fe(s)){static get properties(){return {_hasVaadinItemMixin:{value:!0},selected:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_selectedChanged"},_value:String}}get _activeKeys(){return ["Enter"," "]}get value(){return this._value!==void 0?this._value:this.textContent.trim()}set value(e){this._value=e;}ready(){super.ready();const e=this.getAttribute("value");e!==null&&(this.value=e);}focus(){this.disabled||(super.focus(),this._setFocused(!0));}_shouldSetActive(e){return !this.disabled&&!(e.type==="keydown"&&e.defaultPrevented)}_selectedChanged(e){this.setAttribute("aria-selected",e);}_disabledChanged(e){super._disabledChanged(e),e&&(this.selected=!1,this.blur());}_onKeyDown(e){super._onKeyDown(e),this._activeKeys.includes(e.key)&&!e.defaultPrevented&&(e.preventDefault(),this.click());}};/**
|
|
13441
13435
|
* @license
|
|
13442
13436
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13443
13437
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13444
|
-
*/class
|
|
13438
|
+
*/class D_ extends O_(E($(y))){static get is(){return "vaadin-select-item"}static get template(){return b`
|
|
13445
13439
|
<style>
|
|
13446
13440
|
:host {
|
|
13447
13441
|
display: inline-block;
|
|
@@ -13455,23 +13449,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13455
13449
|
<div part="content">
|
|
13456
13450
|
<slot></slot>
|
|
13457
13451
|
</div>
|
|
13458
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}
|
|
13452
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(D_);/**
|
|
13459
13453
|
* @license
|
|
13460
13454
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
13461
13455
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13462
|
-
*/function
|
|
13456
|
+
*/function z_(s,t){const{scrollLeft:e}=s;return t!=="rtl"?e:s.scrollWidth-s.clientWidth+e}function M_(s,t,e){t!=="rtl"?s.scrollLeft=e:s.scrollLeft=s.clientWidth-s.scrollWidth+e;}/**
|
|
13463
13457
|
* @license
|
|
13464
13458
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
13465
13459
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13466
|
-
*/const
|
|
13460
|
+
*/const N_=s=>class extends me(s){get focused(){return (this._getItems()||[]).find(Os)}get _vertical(){return !0}focus(){const e=this._getItems();if(Array.isArray(e)){const i=this._getAvailableIndex(e,0,null,o=>!Wi(o));i>=0&&this._focus(i);}}_getItems(){return Array.from(this.children)}_onKeyDown(e){if(super._onKeyDown(e),e.metaKey||e.ctrlKey)return;const{key:i}=e,o=this._getItems()||[],r=o.indexOf(this.focused);let n,a;const d=!this._vertical&&this.getAttribute("dir")==="rtl"?-1:1;this.__isPrevKey(i)?(a=-d,n=r-d):this.__isNextKey(i)?(a=d,n=r+d):i==="Home"?(a=1,n=0):i==="End"&&(a=-1,n=o.length-1),n=this._getAvailableIndex(o,n,a,h=>!Wi(h)),n>=0&&(e.preventDefault(),this._focus(n,!0));}__isPrevKey(e){return this._vertical?e==="ArrowUp":e==="ArrowLeft"}__isNextKey(e){return this._vertical?e==="ArrowDown":e==="ArrowRight"}_focus(e,i=!1){const o=this._getItems();this._focusItem(o[e],i);}_focusItem(e){e&&(e.focus(),e.setAttribute("focus-ring",""));}_getAvailableIndex(e,i,o,r){const n=e.length;let a=i;for(let l=0;typeof a=="number"&&l<n;l+=1,a+=o||1){a<0?a=n-1:a>=n&&(a=0);const d=e[a];if(!d.hasAttribute("disabled")&&this.__isMatchingItem(d,r))return a}return -1}__isMatchingItem(e,i){return typeof i=="function"?i(e):!0}};/**
|
|
13467
13461
|
* @license
|
|
13468
13462
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13469
13463
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13470
|
-
*/const
|
|
13464
|
+
*/const L_=s=>class extends N_(s){static get properties(){return {disabled:{type:Boolean,value:!1,reflectToAttribute:!0},selected:{type:Number,reflectToAttribute:!0,notify:!0},orientation:{type:String,reflectToAttribute:!0,value:""},items:{type:Array,readOnly:!0,notify:!0},_searchBuf:{type:String,value:""}}}static get observers(){return ["_enhanceItems(items, orientation, selected, disabled)"]}get _isRTL(){return !this._vertical&&this.getAttribute("dir")==="rtl"}get _scrollerElement(){return console.warn(`Please implement the '_scrollerElement' property in <${this.localName}>`),this}get _vertical(){return this.orientation!=="horizontal"}focus(){this._observer&&this._observer.flush();const e=Array.isArray(this.items)?this.items:[],i=this._getAvailableIndex(e,0,null,o=>o.tabIndex===0&&!Wi(o));i>=0?this._focus(i):super.focus();}ready(){super.ready(),this.addEventListener("click",i=>this._onClick(i));const e=this.shadowRoot.querySelector("slot:not([name])");this._observer=new ws(e,()=>{this._setItems(this._filterItems(cn(this)));});}_getItems(){return this.items}_enhanceItems(e,i,o,r){if(!r&&e){this.setAttribute("aria-orientation",i||"vertical"),e.forEach(a=>{i?a.setAttribute("orientation",i):a.removeAttribute("orientation");}),this._setFocusable(o<0||!o?0:o);const n=e[o];e.forEach(a=>{a.selected=a===n;}),n&&!n.disabled&&this._scrollToItem(o);}}_filterItems(e){return e.filter(i=>i._hasVaadinItemMixin)}_onClick(e){if(e.metaKey||e.shiftKey||e.ctrlKey||e.defaultPrevented)return;const i=this._filterItems(e.composedPath())[0];let o;i&&!i.disabled&&(o=this.items.indexOf(i))>=0&&(this.selected=o);}_searchKey(e,i){this._searchReset=z.debounce(this._searchReset,te.after(500),()=>{this._searchBuf="";}),this._searchBuf+=i.toLowerCase(),this.items.some(r=>this.__isMatchingKey(r))||(this._searchBuf=i.toLowerCase());const o=this._searchBuf.length===1?e+1:e;return this._getAvailableIndex(this.items,o,1,r=>this.__isMatchingKey(r)&&getComputedStyle(r).display!=="none")}__isMatchingKey(e){return e.textContent.replace(/[^\p{L}\p{Nd}]/gu,"").toLowerCase().startsWith(this._searchBuf)}_onKeyDown(e){if(e.metaKey||e.ctrlKey)return;const i=e.key,o=this.items.indexOf(this.focused);if(/[\p{L}\p{Nd}]/u.test(i)&&i.length===1){const r=this._searchKey(o,i);r>=0&&this._focus(r);return}super._onKeyDown(e);}_isItemHidden(e){return getComputedStyle(e).display==="none"}_setFocusable(e){e=this._getAvailableIndex(this.items,e,1);const i=this.items[e];this.items.forEach(o=>{o.tabIndex=o===i?0:-1;});}_focus(e){this.items.forEach((i,o)=>{i.focused=o===e;}),this._setFocusable(e),this._scrollToItem(e),super._focus(e);}_scrollToItem(e){const i=this.items[e];if(!i)return;const o=this._vertical?["top","bottom"]:this._isRTL?["right","left"]:["left","right"],r=this._scrollerElement.getBoundingClientRect(),n=(this.items[e+1]||i).getBoundingClientRect(),a=(this.items[e-1]||i).getBoundingClientRect();let l=0;!this._isRTL&&n[o[1]]>=r[o[1]]||this._isRTL&&n[o[1]]<=r[o[1]]?l=n[o[1]]-r[o[1]]:(!this._isRTL&&a[o[0]]<=r[o[0]]||this._isRTL&&a[o[0]]>=r[o[0]])&&(l=a[o[0]]-r[o[0]]),this._scroll(l);}_scroll(e){if(this._vertical)this._scrollerElement.scrollTop+=e;else {const i=this.getAttribute("dir")||"ltr",o=z_(this._scrollerElement,i)+e;M_(this._scrollerElement,i,o);}}};/**
|
|
13471
13465
|
* @license
|
|
13472
13466
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13473
13467
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13474
|
-
*/class
|
|
13468
|
+
*/class V_ extends L_(E($(oe(y)))){static get is(){return "vaadin-select-list-box"}static get template(){return b`
|
|
13475
13469
|
<style>
|
|
13476
13470
|
:host {
|
|
13477
13471
|
display: flex;
|
|
@@ -13491,15 +13485,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13491
13485
|
<div part="items">
|
|
13492
13486
|
<slot></slot>
|
|
13493
13487
|
</div>
|
|
13494
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}
|
|
13488
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(V_);/**
|
|
13495
13489
|
* @license
|
|
13496
13490
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13497
13491
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13498
|
-
*/const
|
|
13492
|
+
*/const F_=s=>class extends qs(Hs($(s))){static get observers(){return ["_updateOverlayWidth(opened, owner)"]}ready(){super.ready(),this.restoreFocusOnClose=!0;}_getMenuElement(){return Array.from(this.children).find(e=>e.localName!=="style")}_updateOverlayWidth(e,i){if(e&&i){const o="--vaadin-select-overlay-width",r=getComputedStyle(i).getPropertyValue(o);r===""?this.style.removeProperty(o):this.style.setProperty(o,r);}}};/**
|
|
13499
13493
|
* @license
|
|
13500
13494
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13501
13495
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13502
|
-
*/const
|
|
13496
|
+
*/const B_=p`
|
|
13503
13497
|
:host {
|
|
13504
13498
|
align-items: flex-start;
|
|
13505
13499
|
justify-content: flex-start;
|
|
@@ -13514,18 +13508,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13514
13508
|
outline: 3px solid;
|
|
13515
13509
|
}
|
|
13516
13510
|
}
|
|
13517
|
-
`;f("vaadin-select-overlay",[
|
|
13511
|
+
`;f("vaadin-select-overlay",[Rs,B_],{moduleId:"vaadin-select-overlay-styles"});class R_ extends F_(E(y)){static get is(){return "vaadin-select-overlay"}static get template(){return b`
|
|
13518
13512
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
13519
13513
|
<div part="overlay" id="overlay" tabindex="0">
|
|
13520
13514
|
<div part="content" id="content">
|
|
13521
13515
|
<slot></slot>
|
|
13522
13516
|
</div>
|
|
13523
13517
|
</div>
|
|
13524
|
-
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}
|
|
13518
|
+
`}ready(){super.ready(),this.owner=this.__dataHost,this.owner._overlayElement=this;}requestContentUpdate(){if(super.requestContentUpdate(),this.owner){const t=this._getMenuElement();this.owner._assignMenuElement(t);}}}x(R_);/**
|
|
13525
13519
|
* @license
|
|
13526
13520
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13527
13521
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13528
|
-
*/const
|
|
13522
|
+
*/const $_=p`
|
|
13529
13523
|
:host {
|
|
13530
13524
|
display: inline-block;
|
|
13531
13525
|
position: relative;
|
|
@@ -13571,17 +13565,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13571
13565
|
* @license
|
|
13572
13566
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13573
13567
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13574
|
-
*/f("vaadin-select-value-button",
|
|
13568
|
+
*/f("vaadin-select-value-button",$_,{moduleId:"vaadin-select-value-button-styles"});class H_ extends Us(E(y)){static get is(){return "vaadin-select-value-button"}static get template(){return b`
|
|
13575
13569
|
<div class="vaadin-button-container">
|
|
13576
13570
|
<span part="label">
|
|
13577
13571
|
<slot></slot>
|
|
13578
13572
|
</span>
|
|
13579
13573
|
</div>
|
|
13580
|
-
`}}
|
|
13574
|
+
`}}x(H_);/**
|
|
13581
13575
|
* @license
|
|
13582
13576
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
13583
13577
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13584
|
-
*/const
|
|
13578
|
+
*/const q_=p`
|
|
13585
13579
|
.sr-only {
|
|
13586
13580
|
border: 0 !important;
|
|
13587
13581
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -13599,15 +13593,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13599
13593
|
* @license
|
|
13600
13594
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
13601
13595
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13602
|
-
*/class
|
|
13596
|
+
*/class U_ extends G{constructor(t){super(t,"value","vaadin-select-value-button",{initializer:(e,i)=>{i._setFocusElement(e),i.ariaTarget=e,i.stateTarget=e,e.setAttribute("aria-haspopup","listbox");}});}}/**
|
|
13603
13597
|
* @license
|
|
13604
13598
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13605
13599
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13606
|
-
*/const
|
|
13600
|
+
*/const W_=s=>class extends Yt(Ht(Ds(me(qt(s))))){static get properties(){return {items:{type:Array,observer:"__itemsChanged"},opened:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0,sync:!0},renderer:{type:Object},value:{type:String,value:"",notify:!0,observer:"_valueChanged"},name:{type:String},placeholder:{type:String},readonly:{type:Boolean,value:!1,reflectToAttribute:!0},noVerticalOverlap:{type:Boolean,value:!1},_phone:Boolean,_phoneMediaQuery:{value:"(max-width: 450px), (max-height: 450px)"},_inputContainer:Object,_items:Object}}static get delegateAttrs(){return [...super.delegateAttrs,"invalid"]}static get observers(){return ["_updateAriaExpanded(opened, focusElement)","_updateSelectedItem(value, _items, placeholder)","_openedChanged(opened, _overlayElement, _inputContainer)"]}constructor(){super(),this._itemId=`value-${this.localName}-${Rt()}`,this._srLabelController=new Cn(this),this._srLabelController.slotName="sr-label";}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1;}ready(){super.ready(),this._inputContainer=this.shadowRoot.querySelector('[part~="input-field"]'),this._valueButtonController=new U_(this),this.addController(this._valueButtonController),this.addController(this._srLabelController),this.addController(new Ks(this._phoneMediaQuery,e=>{this._phone=e;})),this._tooltipController=new _e(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.focusElement),this.addController(this._tooltipController);}requestContentUpdate(){this._overlayElement&&(this._overlayElement.requestContentUpdate(),this._menuElement&&this._menuElement.items&&this._updateSelectedItem(this.value,this._menuElement.items));}_requiredChanged(e){super._requiredChanged(e),e===!1&&this.validate();}__itemsChanged(e,i){(e||i)&&this.requestContentUpdate();}_assignMenuElement(e){e&&e!==this.__lastMenuElement&&(this._menuElement=e,this.__initMenuItems(e),e.addEventListener("items-changed",()=>{this.__initMenuItems(e);}),e.addEventListener("selected-changed",()=>this.__updateValueButton()),e.addEventListener("keydown",i=>this._onKeyDownInside(i),!0),e.addEventListener("click",i=>{const o=i.composedPath().find(r=>r._hasVaadinItemMixin);this.__dispatchChangePending=!!(o&&o.value!==void 0&&o.value!==this.value),this.opened=!1;},!0),this.__lastMenuElement=e);}__initMenuItems(e){e.items&&(this._items=e.items);}_valueChanged(e,i){this.toggleAttribute("has-value",!!e),i!==void 0&&!this.__dispatchChangePending&&this.validate();}_onClick(e){this.disabled||(e.preventDefault(),this.opened=!this.readonly);}_onToggleMouseDown(e){e.preventDefault();}_onKeyDown(e){if(e.target===this.focusElement&&!this.readonly&&!this.disabled&&!this.opened){if(/^(Enter|SpaceBar|\s|ArrowDown|Down|ArrowUp|Up)$/u.test(e.key))e.preventDefault(),this.opened=!0;else if(/[\p{L}\p{Nd}]/u.test(e.key)&&e.key.length===1){const i=this._menuElement.selected,o=i!==void 0?i:-1,r=this._menuElement._searchKey(o,e.key);r>=0&&(this.__dispatchChangePending=!0,this._updateAriaLive(!0),this._menuElement.selected=r);}}}_onKeyDownInside(e){/^(Tab)$/u.test(e.key)&&(this.opened=!1);}_openedChanged(e,i,o){if(!(!i||!o)){if(e){if(this.disabled||this.readonly){this.opened=!1;return}this._updateAriaLive(!1),i.style.setProperty("--vaadin-select-text-field-width",`${o.offsetWidth}px`);const r=this.hasAttribute("focus-ring");this._openedWithFocusRing=r,r&&this.removeAttribute("focus-ring");}else this.__oldOpened&&(this._openedWithFocusRing&&this.setAttribute("focus-ring",""),!this.__dispatchChangePending&&!this._keyboardActive&&this.validate());this.__oldOpened=e;}}_updateAriaExpanded(e,i){i&&i.setAttribute("aria-expanded",e?"true":"false");}_updateAriaLive(e){this.focusElement&&(e?this.focusElement.setAttribute("aria-live","polite"):this.focusElement.removeAttribute("aria-live"));}__attachSelectedItem(e){let i;const o=e.getAttribute("label");o?i=this.__createItemElement({label:o}):i=e.cloneNode(!0),i._sourceItem=e,this.__appendValueItemElement(i,this.focusElement),i.selected=!0;}__createItemElement(e){const i=document.createElement(e.component||"vaadin-select-item");return e.label&&(i.textContent=e.label),e.value&&(i.value=e.value),e.disabled&&(i.disabled=e.disabled),e.className&&(i.className=e.className),i}__appendValueItemElement(e,i){i.appendChild(e),e.removeAttribute("tabindex"),e.removeAttribute("aria-selected"),e.removeAttribute("role"),e.removeAttribute("focused"),e.removeAttribute("focus-ring"),e.removeAttribute("active"),e.setAttribute("id",this._itemId);}_accessibleNameChanged(e){this._srLabelController.setLabel(e),this._setCustomAriaLabelledBy(e?this._srLabelController.defaultId:null);}_accessibleNameRefChanged(e){this._setCustomAriaLabelledBy(e);}_setCustomAriaLabelledBy(e){const i=this._getLabelIdWithItemId(e);this._fieldAriaController.setLabelId(i,!0);}_getLabelIdWithItemId(e){const o=(this._items?this._items[this._menuElement.selected]:!1)||this.placeholder?this._itemId:"";return e?`${e} ${o}`.trim():null}__updateValueButton(){const e=this.focusElement;if(!e)return;e.innerHTML="";const i=this._items[this._menuElement.selected];if(e.removeAttribute("placeholder"),this._hasContent(i))this.__attachSelectedItem(i);else if(this.placeholder){const r=this.__createItemElement({label:this.placeholder});this.__appendValueItemElement(r,e),e.setAttribute("placeholder","");}!this._valueChanging&&i&&(this._selectedChanging=!0,this.value=i.value||"",this.__dispatchChangePending&&this.__dispatchChange(),delete this._selectedChanging);const o=i||this.placeholder?{newId:this._itemId}:{oldId:this._itemId};xt(e,"aria-labelledby",o),(this.accessibleName||this.accessibleNameRef)&&this._setCustomAriaLabelledBy(this.accessibleNameRef||this._srLabelController.defaultId);}_hasContent(e){if(!e)return !1;const i=!!(e.hasAttribute("label")?e.getAttribute("label"):e.textContent.trim()),o=e.childElementCount>0;return i||o}_updateSelectedItem(e,i){if(i){const o=e==null?e:e.toString();this._menuElement.selected=i.reduce((r,n,a)=>r===void 0&&n.value===o?a:r,void 0),this._selectedChanging||(this._valueChanging=!0,this.__updateValueButton(),delete this._valueChanging);}}_shouldRemoveFocus(){return !this.opened}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&this.validate();}checkValidity(){return !this.required||this.readonly||!!this.value}__defaultRenderer(e,i){if(!this.items||this.items.length===0){e.textContent="";return}let o=e.firstElementChild;o||(o=document.createElement("vaadin-select-list-box"),e.appendChild(o)),o.textContent="",this.items.forEach(r=>{o.appendChild(this.__createItemElement(r));});}__dispatchChange(){return Me(this,null,function*(){this.updateComplete&&(yield this.updateComplete),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.__dispatchChangePending=!1;})}};/**
|
|
13607
13601
|
* @license
|
|
13608
13602
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13609
13603
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13610
|
-
*/f("vaadin-select",[
|
|
13604
|
+
*/f("vaadin-select",[$n,Hn,q_],{moduleId:"vaadin-select-styles"});class j_ extends W_(X(E(y))){static get is(){return "vaadin-select"}static get template(){return b`
|
|
13611
13605
|
<style>
|
|
13612
13606
|
:host {
|
|
13613
13607
|
position: relative;
|
|
@@ -13660,7 +13654,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13660
13654
|
<div class="sr-only">
|
|
13661
13655
|
<slot name="sr-label"></slot>
|
|
13662
13656
|
</div>
|
|
13663
|
-
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}
|
|
13657
|
+
`}static get observers(){return ["_rendererChanged(renderer, _overlayElement)"]}ready(){super.ready(),eo(this);}_rendererChanged(t,e){e&&(e.renderer=t||this.__defaultRenderer,this.requestContentUpdate());}_onOverlayOpen(){this._menuElement&&this._menuElement.focus();}}x(j_);
|
|
13664
13658
|
|
|
13665
13659
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
13666
13660
|
const GeneralInputStyle0 = generalInputCss;
|