@everymatrix/pam-forgot-password 1.73.1 → 1.73.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/checkbox-group-input_15.cjs.entry.js +388 -394
- package/dist/esm/checkbox-group-input_15.entry.js +388 -394
- package/dist/pam-forgot-password/checkbox-group-input_15.entry.js +128 -133
- package/package.json +1 -1
- package/dist/collection/components/pam-forgot-password/pam-forgot-password.stories.js +0 -42
- package/dist/types/components/pam-forgot-password/pam-forgot-password.stories.d.ts +0 -5
|
@@ -6109,33 +6109,33 @@ const EmailInput = class {
|
|
|
6109
6109
|
};
|
|
6110
6110
|
EmailInput.style = EmailInputStyle0;
|
|
6111
6111
|
|
|
6112
|
-
var
|
|
6112
|
+
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());});/**
|
|
6113
6113
|
* @license
|
|
6114
6114
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
6115
6115
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6116
|
-
*/function
|
|
6116
|
+
*/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.`);}}/**
|
|
6117
6117
|
* @license
|
|
6118
6118
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6119
6119
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6120
|
-
*/let
|
|
6120
|
+
*/let Da=class extends HTMLElement{static get is(){return "vaadin-lumo-styles"}};x(Da);/**
|
|
6121
6121
|
* @license
|
|
6122
6122
|
* Copyright 2019 Google LLC
|
|
6123
6123
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6124
|
-
*/const
|
|
6124
|
+
*/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;/**
|
|
6125
6125
|
* @license
|
|
6126
6126
|
* Copyright 2017 Google LLC
|
|
6127
6127
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6128
|
-
*/const{is:
|
|
6128
|
+
*/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");/**
|
|
6129
6129
|
* @license
|
|
6130
6130
|
* Copyright 2017 Google LLC
|
|
6131
6131
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6132
|
-
*/const
|
|
6133
|
-
\f\r]`,
|
|
6134
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Co=/'/g,wo=/"/g,Ir=/^(?:script|style|textarea|title)$/i,
|
|
6132
|
+
*/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=`[
|
|
6133
|
+
\f\r]`,Ne=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,yo=/-->/g,xo=/>/g,ae=RegExp(`>|${si}(?:([^\\s"'>=/]+)(${si}*=${si}*(?:[^
|
|
6134
|
+
\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};/**
|
|
6135
6135
|
* @license
|
|
6136
6136
|
* Copyright 2017 Google LLC
|
|
6137
6137
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6138
|
-
*/const
|
|
6138
|
+
*/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");/**
|
|
6139
6139
|
* @license
|
|
6140
6140
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6141
6141
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -6143,17 +6143,17 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6143
6143
|
* @license
|
|
6144
6144
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6145
6145
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6146
|
-
*/const kr=[],
|
|
6147
|
-
`)}const
|
|
6146
|
+
*/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(`
|
|
6147
|
+
`)}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))}};/**
|
|
6148
6148
|
* @license
|
|
6149
6149
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6150
6150
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6151
|
-
*/const
|
|
6152
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
6151
|
+
*/const sl=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
6152
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},ke=(s,...t)=>{sl(`lumo-${s}`,t);};/**
|
|
6153
6153
|
* @license
|
|
6154
6154
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6155
6155
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6156
|
-
*/const
|
|
6156
|
+
*/const ol=p`
|
|
6157
6157
|
:host {
|
|
6158
6158
|
/* Base (background) */
|
|
6159
6159
|
--lumo-base-color: #fff;
|
|
@@ -6238,7 +6238,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6238
6238
|
--lumo-disabled-text-color: GrayText;
|
|
6239
6239
|
}
|
|
6240
6240
|
}
|
|
6241
|
-
`;
|
|
6241
|
+
`;ke("color-props",ol);const rl=p`
|
|
6242
6242
|
[theme~='dark'] {
|
|
6243
6243
|
/* Base (background) */
|
|
6244
6244
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -6356,11 +6356,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6356
6356
|
pre code {
|
|
6357
6357
|
background: transparent;
|
|
6358
6358
|
}
|
|
6359
|
-
`;f("",
|
|
6359
|
+
`;f("",rl,{moduleId:"lumo-color"});/**
|
|
6360
6360
|
* @license
|
|
6361
6361
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6362
6362
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6363
|
-
*/const
|
|
6363
|
+
*/const nl=p`
|
|
6364
6364
|
@font-face {
|
|
6365
6365
|
font-family: 'lumo-icons';
|
|
6366
6366
|
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==)
|
|
@@ -6413,11 +6413,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6413
6413
|
--lumo-icons-upload: '\\ea29';
|
|
6414
6414
|
--lumo-icons-user: '\\ea2a';
|
|
6415
6415
|
}
|
|
6416
|
-
`;
|
|
6416
|
+
`;ke("font-icons",nl);/**
|
|
6417
6417
|
* @license
|
|
6418
6418
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6419
6419
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6420
|
-
*/const
|
|
6420
|
+
*/const al=p`
|
|
6421
6421
|
:host {
|
|
6422
6422
|
--lumo-size-xs: 1.625rem;
|
|
6423
6423
|
--lumo-size-s: 1.875rem;
|
|
@@ -6432,11 +6432,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6432
6432
|
/* For backwards compatibility */
|
|
6433
6433
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
6434
6434
|
}
|
|
6435
|
-
`;
|
|
6435
|
+
`;ke("sizing-props",al);/**
|
|
6436
6436
|
* @license
|
|
6437
6437
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6438
6438
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6439
|
-
*/const
|
|
6439
|
+
*/const ll=p`
|
|
6440
6440
|
:host {
|
|
6441
6441
|
/* Square */
|
|
6442
6442
|
--lumo-space-xs: 0.25rem;
|
|
@@ -6459,11 +6459,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6459
6459
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
6460
6460
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
6461
6461
|
}
|
|
6462
|
-
`;
|
|
6462
|
+
`;ke("spacing-props",ll);/**
|
|
6463
6463
|
* @license
|
|
6464
6464
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6465
6465
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6466
|
-
*/const
|
|
6466
|
+
*/const dl=p`
|
|
6467
6467
|
:host {
|
|
6468
6468
|
/* Border radius */
|
|
6469
6469
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -6563,11 +6563,11 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6563
6563
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
6564
6564
|
--vaadin-input-field-value-font-weight: 500;
|
|
6565
6565
|
}
|
|
6566
|
-
`;
|
|
6566
|
+
`;ke("style-props",dl);/**
|
|
6567
6567
|
* @license
|
|
6568
6568
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
6569
6569
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6570
|
-
*/const
|
|
6570
|
+
*/const hl=p`
|
|
6571
6571
|
:host {
|
|
6572
6572
|
/* prettier-ignore */
|
|
6573
6573
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -6587,7 +6587,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6587
6587
|
--lumo-line-height-s: 1.375;
|
|
6588
6588
|
--lumo-line-height-m: 1.625;
|
|
6589
6589
|
}
|
|
6590
|
-
`,
|
|
6590
|
+
`,cl=p`
|
|
6591
6591
|
body,
|
|
6592
6592
|
:host {
|
|
6593
6593
|
font-family: var(--lumo-font-family);
|
|
@@ -6679,7 +6679,7 @@ var Aa=Object.defineProperty,Ea=Object.defineProperties;var Sa=Object.getOwnProp
|
|
|
6679
6679
|
border-left: none;
|
|
6680
6680
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
6681
6681
|
}
|
|
6682
|
-
`;f("",
|
|
6682
|
+
`;f("",cl,{moduleId:"lumo-typography"});ke("typography-props",hl);f("vaadin-checkbox",p`
|
|
6683
6683
|
:host {
|
|
6684
6684
|
color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
|
|
6685
6685
|
font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
|
|
@@ -6999,7 +6999,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
6999
6999
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7000
7000
|
Code distributed by Google as part of the polymer project is also
|
|
7001
7001
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7002
|
-
*/let
|
|
7002
|
+
*/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)}/**
|
|
7003
7003
|
@license
|
|
7004
7004
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7005
7005
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7007,7 +7007,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7007
7007
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7008
7008
|
Code distributed by Google as part of the polymer project is also
|
|
7009
7009
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7010
|
-
*/const Mr=!window.ShadyDOM||!window.ShadyDOM.inUse;const
|
|
7010
|
+
*/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;/**
|
|
7011
7011
|
@license
|
|
7012
7012
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7013
7013
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7015,7 +7015,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7015
7015
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7016
7016
|
Code distributed by Google as part of the polymer project is also
|
|
7017
7017
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7018
|
-
*/let
|
|
7018
|
+
*/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};/**
|
|
7019
7019
|
@license
|
|
7020
7020
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7021
7021
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7023,7 +7023,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7023
7023
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7024
7024
|
Code distributed by Google as part of the polymer project is also
|
|
7025
7025
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7026
|
-
*/let
|
|
7026
|
+
*/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);/**
|
|
7027
7027
|
@license
|
|
7028
7028
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7029
7029
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7031,7 +7031,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7031
7031
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7032
7032
|
Code distributed by Google as part of the polymer project is also
|
|
7033
7033
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7034
|
-
*/const
|
|
7034
|
+
*/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}/**
|
|
7035
7035
|
@license
|
|
7036
7036
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7037
7037
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7047,7 +7047,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7047
7047
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7048
7048
|
Code distributed by Google as part of the polymer project is also
|
|
7049
7049
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7050
|
-
*/function
|
|
7050
|
+
*/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(".")}/**
|
|
7051
7051
|
@license
|
|
7052
7052
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7053
7053
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7055,7 +7055,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7055
7055
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7056
7056
|
Code distributed by Google as part of the polymer project is also
|
|
7057
7057
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7058
|
-
*/const
|
|
7058
|
+
*/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())}/**
|
|
7059
7059
|
@license
|
|
7060
7060
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7061
7061
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7063,7 +7063,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7063
7063
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7064
7064
|
Code distributed by Google as part of the polymer project is also
|
|
7065
7065
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7066
|
-
*/let
|
|
7066
|
+
*/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;}}};/**
|
|
7067
7067
|
@license
|
|
7068
7068
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7069
7069
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7071,7 +7071,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7071
7071
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7072
7072
|
Code distributed by Google as part of the polymer project is also
|
|
7073
7073
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7074
|
-
*/const
|
|
7074
|
+
*/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});/**
|
|
7075
7075
|
@license
|
|
7076
7076
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7077
7077
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7079,7 +7079,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7079
7079
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7080
7080
|
Code distributed by Google as part of the polymer project is also
|
|
7081
7081
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7082
|
-
*/const Gr={};let
|
|
7082
|
+
*/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});/**
|
|
7083
7083
|
@license
|
|
7084
7084
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7085
7085
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7087,7 +7087,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7087
7087
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7088
7088
|
Code distributed by Google as part of the polymer project is also
|
|
7089
7089
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7090
|
-
*/const
|
|
7090
|
+
*/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});/**
|
|
7091
7091
|
* @fileoverview
|
|
7092
7092
|
* @suppress {checkPrototypalTypes}
|
|
7093
7093
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -7097,7 +7097,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7097
7097
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
7098
7098
|
* Google as part of the polymer project is also subject to an additional IP
|
|
7099
7099
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7100
|
-
*/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=[];/**
|
|
7100
|
+
*/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=[];/**
|
|
7101
7101
|
@license
|
|
7102
7102
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7103
7103
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7113,7 +7113,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7113
7113
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7114
7114
|
Code distributed by Google as part of the polymer project is also
|
|
7115
7115
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7116
|
-
*/function
|
|
7116
|
+
*/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});/**
|
|
7117
7117
|
* @fileoverview
|
|
7118
7118
|
* @suppress {checkPrototypalTypes}
|
|
7119
7119
|
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
@@ -7123,7 +7123,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7123
7123
|
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
7124
7124
|
* Google as part of the polymer project is also subject to an additional IP
|
|
7125
7125
|
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7126
|
-
*/const
|
|
7126
|
+
*/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});/**
|
|
7127
7127
|
@license
|
|
7128
7128
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7129
7129
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7131,7 +7131,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7131
7131
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7132
7132
|
Code distributed by Google as part of the polymer project is also
|
|
7133
7133
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7134
|
-
*/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
|
|
7134
|
+
*/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")};/**
|
|
7135
7135
|
@license
|
|
7136
7136
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7137
7137
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7139,7 +7139,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7139
7139
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7140
7140
|
Code distributed by Google as part of the polymer project is also
|
|
7141
7141
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7142
|
-
*/const
|
|
7142
|
+
*/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
|
|
7143
7143
|
(function () {
|
|
7144
7144
|
'use strict';
|
|
7145
7145
|
|
|
@@ -7617,7 +7617,7 @@ try {
|
|
|
7617
7617
|
|
|
7618
7618
|
}());
|
|
7619
7619
|
|
|
7620
|
-
vaadin-dev-mode:end **/}const an=function(){if(typeof
|
|
7620
|
+
vaadin-dev-mode:end **/}const an=function(){if(typeof qo=="function")return qo(Rd)};/**
|
|
7621
7621
|
* @license
|
|
7622
7622
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7623
7623
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7625,7 +7625,7 @@ try {
|
|
|
7625
7625
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7626
7626
|
* Code distributed by Google as part of the polymer project is also
|
|
7627
7627
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7628
|
-
*/let
|
|
7628
|
+
*/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;}}};/**
|
|
7629
7629
|
@license
|
|
7630
7630
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7631
7631
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7633,35 +7633,35 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7633
7633
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7634
7634
|
Code distributed by Google as part of the polymer project is also
|
|
7635
7635
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7636
|
-
*/const
|
|
7636
|
+
*/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)};/**
|
|
7637
7637
|
* @license
|
|
7638
7638
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7639
7639
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7640
|
-
*/const U=[];function
|
|
7640
|
+
*/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);}};/**
|
|
7641
7641
|
* @license
|
|
7642
7642
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7643
7643
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7644
|
-
*/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
|
|
7644
|
+
*/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.');}};/**
|
|
7645
7645
|
* @license
|
|
7646
7646
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7647
7647
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7648
|
-
*/function
|
|
7648
|
+
*/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()===""}/**
|
|
7649
7649
|
* @license
|
|
7650
7650
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7651
7651
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7652
|
-
*/let
|
|
7652
|
+
*/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;}};/**
|
|
7653
7653
|
* @license
|
|
7654
7654
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7655
7655
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7656
|
-
*/let
|
|
7656
|
+
*/let Gd=0;function Rt(){return Gd++}/**
|
|
7657
7657
|
* @license
|
|
7658
7658
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7659
7659
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7660
|
-
*/let
|
|
7660
|
+
*/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)));});}};/**
|
|
7661
7661
|
* @license
|
|
7662
7662
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7663
7663
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7664
|
-
*/let
|
|
7664
|
+
*/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}}));}};/**
|
|
7665
7665
|
@license
|
|
7666
7666
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
7667
7667
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -7669,107 +7669,107 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
7669
7669
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
7670
7670
|
Code distributed by Google as part of the polymer project is also
|
|
7671
7671
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
7672
|
-
*/const
|
|
7672
|
+
*/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}));}/**
|
|
7673
7673
|
* @license
|
|
7674
7674
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7675
7675
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7676
|
-
*/const
|
|
7676
|
+
*/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();}});/**
|
|
7677
7677
|
* @license
|
|
7678
7678
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7679
7679
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7680
|
-
*/const
|
|
7680
|
+
*/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){}});/**
|
|
7681
7681
|
* @license
|
|
7682
7682
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7683
7683
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7684
|
-
*/const
|
|
7684
|
+
*/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);}};/**
|
|
7685
7685
|
* @license
|
|
7686
7686
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7687
7687
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7688
|
-
*/let
|
|
7688
|
+
*/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}/**
|
|
7689
7689
|
* @license
|
|
7690
7690
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7691
7691
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7692
|
-
*/const
|
|
7692
|
+
*/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}});/**
|
|
7693
7693
|
* @license
|
|
7694
7694
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7695
7695
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7696
|
-
*/const bn=s=>class extends
|
|
7696
|
+
*/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);}};/**
|
|
7697
7697
|
* @license
|
|
7698
7698
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7699
7699
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7700
|
-
*/const
|
|
7700
|
+
*/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);}});/**
|
|
7701
7701
|
* @license
|
|
7702
7702
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7703
7703
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7704
|
-
*/const
|
|
7704
|
+
*/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);}});/**
|
|
7705
7705
|
* @license
|
|
7706
7706
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7707
7707
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7708
|
-
*/const
|
|
7708
|
+
*/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;}});/**
|
|
7709
7709
|
* @license
|
|
7710
7710
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7711
7711
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7712
|
-
*/const
|
|
7712
|
+
*/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;}});/**
|
|
7713
7713
|
* @license
|
|
7714
7714
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
7715
7715
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7716
|
-
*/const
|
|
7716
|
+
*/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);}/**
|
|
7717
7717
|
* @license
|
|
7718
7718
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7719
7719
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7720
|
-
*/let
|
|
7720
|
+
*/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")));}};/**
|
|
7721
7721
|
* @license
|
|
7722
7722
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7723
7723
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7724
|
-
*/const
|
|
7724
|
+
*/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);}});/**
|
|
7725
7725
|
* @license
|
|
7726
7726
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7727
7727
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7728
|
-
*/const
|
|
7728
|
+
*/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);}/**
|
|
7729
7729
|
* @license
|
|
7730
7730
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
7731
7731
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7732
|
-
*/let
|
|
7732
|
+
*/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);}};/**
|
|
7733
7733
|
* @license
|
|
7734
7734
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7735
7735
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7736
|
-
*/let
|
|
7736
|
+
*/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);}};/**
|
|
7737
7737
|
* @license
|
|
7738
7738
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7739
7739
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7740
|
-
*/let
|
|
7740
|
+
*/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);}};/**
|
|
7741
7741
|
* @license
|
|
7742
7742
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7743
7743
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7744
|
-
*/let Cn=class extends
|
|
7744
|
+
*/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);}};/**
|
|
7745
7745
|
* @license
|
|
7746
7746
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7747
7747
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7748
|
-
*/const
|
|
7748
|
+
*/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);}});/**
|
|
7749
7749
|
* @license
|
|
7750
7750
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7751
7751
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7752
|
-
*/const
|
|
7752
|
+
*/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}});/**
|
|
7753
7753
|
* @license
|
|
7754
7754
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7755
7755
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7756
|
-
*/const
|
|
7756
|
+
*/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);});}};/**
|
|
7757
7757
|
* @license
|
|
7758
7758
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7759
7759
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7760
|
-
*/let Ut=class extends
|
|
7760
|
+
*/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});}};/**
|
|
7761
7761
|
* @license
|
|
7762
7762
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
7763
7763
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7764
|
-
*/let
|
|
7764
|
+
*/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);}};/**
|
|
7765
7765
|
* @license
|
|
7766
7766
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7767
7767
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7768
|
-
*/const
|
|
7768
|
+
*/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();}};/**
|
|
7769
7769
|
* @license
|
|
7770
7770
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7771
7771
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7772
|
-
*/const
|
|
7772
|
+
*/const Ih=p`
|
|
7773
7773
|
:host {
|
|
7774
7774
|
display: inline-block;
|
|
7775
7775
|
}
|
|
@@ -7861,7 +7861,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7861
7861
|
* @license
|
|
7862
7862
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7863
7863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7864
|
-
*/f("vaadin-checkbox",
|
|
7864
|
+
*/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`
|
|
7865
7865
|
<div class="vaadin-checkbox-container">
|
|
7866
7866
|
<div part="checkbox" aria-hidden="true"></div>
|
|
7867
7867
|
<slot name="input"></slot>
|
|
@@ -7877,7 +7877,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7877
7877
|
</div>
|
|
7878
7878
|
</div>
|
|
7879
7879
|
<slot name="tooltip"></slot>
|
|
7880
|
-
`}ready(){super.ready(),this._tooltipController=new
|
|
7880
|
+
`}ready(){super.ready(),this._tooltipController=new _e(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController);}}x(Ah);/**
|
|
7881
7881
|
* @license
|
|
7882
7882
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7883
7883
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -7941,7 +7941,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
7941
7941
|
* @license
|
|
7942
7942
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
7943
7943
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
7944
|
-
*/const
|
|
7944
|
+
*/const Ls=p`
|
|
7945
7945
|
[part='label'] {
|
|
7946
7946
|
align-self: flex-start;
|
|
7947
7947
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
@@ -8053,7 +8053,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8053
8053
|
margin-left: 0;
|
|
8054
8054
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
8055
8055
|
}
|
|
8056
|
-
`;f("",
|
|
8056
|
+
`;f("",Ls,{moduleId:"lumo-required-field"});const Eh=p`
|
|
8057
8057
|
:host {
|
|
8058
8058
|
color: var(--lumo-body-text-color);
|
|
8059
8059
|
font-size: var(--lumo-font-size-m);
|
|
@@ -8096,15 +8096,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8096
8096
|
color: var(--lumo-secondary-text-color);
|
|
8097
8097
|
}
|
|
8098
8098
|
}
|
|
8099
|
-
`;f("vaadin-checkbox-group",[
|
|
8099
|
+
`;f("vaadin-checkbox-group",[Ls,wn,Eh],{moduleId:"lumo-checkbox-group"});/**
|
|
8100
8100
|
* @license
|
|
8101
8101
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8102
8102
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8103
|
-
*/const
|
|
8103
|
+
*/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();}};/**
|
|
8104
8104
|
* @license
|
|
8105
8105
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8106
8106
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8107
|
-
*/const
|
|
8107
|
+
*/const kh=p`
|
|
8108
8108
|
:host {
|
|
8109
8109
|
display: inline-flex;
|
|
8110
8110
|
}
|
|
@@ -8137,7 +8137,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8137
8137
|
* @license
|
|
8138
8138
|
* Copyright (c) 2018 - 2024 Vaadin Ltd.
|
|
8139
8139
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8140
|
-
*/f("vaadin-checkbox-group",
|
|
8140
|
+
*/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`
|
|
8141
8141
|
<div class="vaadin-group-field-container">
|
|
8142
8142
|
<div part="label">
|
|
8143
8143
|
<slot name="label"></slot>
|
|
@@ -8158,11 +8158,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8158
8158
|
</div>
|
|
8159
8159
|
|
|
8160
8160
|
<slot name="tooltip"></slot>
|
|
8161
|
-
`}}
|
|
8161
|
+
`}}x(Th);/**
|
|
8162
8162
|
* @license
|
|
8163
8163
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
8164
8164
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8165
|
-
*/const
|
|
8165
|
+
*/const Vs=p`
|
|
8166
8166
|
:host {
|
|
8167
8167
|
top: var(--lumo-space-m);
|
|
8168
8168
|
right: var(--lumo-space-m);
|
|
@@ -8227,11 +8227,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8227
8227
|
opacity: 1;
|
|
8228
8228
|
}
|
|
8229
8229
|
}
|
|
8230
|
-
`;f("",
|
|
8230
|
+
`;f("",Vs,{moduleId:"lumo-overlay"});/**
|
|
8231
8231
|
* @license
|
|
8232
8232
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
8233
8233
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
8234
|
-
*/const
|
|
8234
|
+
*/const Fs=p`
|
|
8235
8235
|
:host([opening]),
|
|
8236
8236
|
:host([closing]) {
|
|
8237
8237
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -8261,7 +8261,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8261
8261
|
opacity: 0;
|
|
8262
8262
|
}
|
|
8263
8263
|
}
|
|
8264
|
-
`;f("",
|
|
8264
|
+
`;f("",Fs,{moduleId:"lumo-menu-overlay-core"});const Ph=p`
|
|
8265
8265
|
/* Small viewport (bottom sheet) styles */
|
|
8266
8266
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
8267
8267
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -8323,7 +8323,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8323
8323
|
transform: translateY(150%);
|
|
8324
8324
|
}
|
|
8325
8325
|
}
|
|
8326
|
-
`,
|
|
8326
|
+
`,Bs=[Vs,Fs,Ph];f("",Bs,{moduleId:"lumo-menu-overlay"});const Oh=p`
|
|
8327
8327
|
[part='overlay'] {
|
|
8328
8328
|
/*
|
|
8329
8329
|
Width:
|
|
@@ -8368,7 +8368,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
8368
8368
|
max-height: 70vh;
|
|
8369
8369
|
}
|
|
8370
8370
|
}
|
|
8371
|
-
`;f("vaadin-date-picker-overlay",[
|
|
8371
|
+
`;f("vaadin-date-picker-overlay",[Bs,Oh],{moduleId:"lumo-date-picker-overlay"});const In=p`
|
|
8372
8372
|
:host {
|
|
8373
8373
|
/* Sizing */
|
|
8374
8374
|
--lumo-button-size: var(--lumo-size-m);
|
|
@@ -9178,7 +9178,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9178
9178
|
* @license
|
|
9179
9179
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9180
9180
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9181
|
-
*/const
|
|
9181
|
+
*/const Dh=p`
|
|
9182
9182
|
:host {
|
|
9183
9183
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
9184
9184
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -9309,7 +9309,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9309
9309
|
[part='clear-button']::before {
|
|
9310
9310
|
content: var(--lumo-icons-cross);
|
|
9311
9311
|
}
|
|
9312
|
-
`,
|
|
9312
|
+
`,Pe=[Ls,An,wn,Dh];f("",Pe,{moduleId:"lumo-input-field-shared-styles"});const zh=p`
|
|
9313
9313
|
[part='toggle-button']::before {
|
|
9314
9314
|
content: var(--lumo-icons-calendar);
|
|
9315
9315
|
}
|
|
@@ -9331,15 +9331,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9331
9331
|
:host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
|
|
9332
9332
|
--_lumo-text-field-overflow-mask-image: none;
|
|
9333
9333
|
}
|
|
9334
|
-
`;f("vaadin-date-picker",[
|
|
9334
|
+
`;f("vaadin-date-picker",[Pe,zh],{moduleId:"lumo-date-picker"});/**
|
|
9335
9335
|
* @license
|
|
9336
9336
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9337
9337
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9338
|
-
*/const
|
|
9338
|
+
*/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());});}};/**
|
|
9339
9339
|
* @license
|
|
9340
9340
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9341
9341
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9342
|
-
*/const
|
|
9342
|
+
*/const Nh=p`
|
|
9343
9343
|
:host {
|
|
9344
9344
|
display: flex;
|
|
9345
9345
|
align-items: center;
|
|
@@ -9408,15 +9408,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9408
9408
|
* @license
|
|
9409
9409
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9410
9410
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9411
|
-
*/f("vaadin-input-container",
|
|
9411
|
+
*/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`
|
|
9412
9412
|
<slot name="prefix"></slot>
|
|
9413
9413
|
<slot></slot>
|
|
9414
9414
|
<slot name="suffix"></slot>
|
|
9415
|
-
`}};
|
|
9415
|
+
`}};x(Lh);/**
|
|
9416
9416
|
* @license
|
|
9417
9417
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9418
9418
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9419
|
-
*/const
|
|
9419
|
+
*/const Rs=p`
|
|
9420
9420
|
:host {
|
|
9421
9421
|
z-index: 200;
|
|
9422
9422
|
position: fixed;
|
|
@@ -9483,55 +9483,55 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9483
9483
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9484
9484
|
Code distributed by Google as part of the polymer project is also
|
|
9485
9485
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9486
|
-
*/let
|
|
9486
|
+
*/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]);}/**
|
|
9487
9487
|
* @license
|
|
9488
9488
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9489
9489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9490
|
-
*/const
|
|
9490
|
+
*/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}})();/**
|
|
9491
9491
|
* @license
|
|
9492
9492
|
* Copyright (c) 2017 Anton Korzunov
|
|
9493
9493
|
* SPDX-License-Identifier: MIT
|
|
9494
|
-
*/let
|
|
9494
|
+
*/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")};/**
|
|
9495
9495
|
* @license
|
|
9496
9496
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9497
9497
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9498
|
-
*/let
|
|
9498
|
+
*/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);}};/**
|
|
9499
9499
|
* @license
|
|
9500
9500
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9501
9501
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9502
|
-
*/let
|
|
9502
|
+
*/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;}};/**
|
|
9503
9503
|
* @license
|
|
9504
9504
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9505
9505
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9506
|
-
*/const
|
|
9506
|
+
*/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();}};/**
|
|
9507
9507
|
* @license
|
|
9508
9508
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9509
9509
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9510
|
-
*/const
|
|
9510
|
+
*/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}};/**
|
|
9511
9511
|
* @license
|
|
9512
9512
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9513
9513
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9514
|
-
*/const
|
|
9514
|
+
*/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)););}};/**
|
|
9515
9515
|
* @license
|
|
9516
9516
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9517
9517
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9518
|
-
*/const Hs=s=>class extends
|
|
9518
|
+
*/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);}}};/**
|
|
9519
9519
|
* @license
|
|
9520
9520
|
* Copyright (c) 2024 Vaadin Ltd.
|
|
9521
9521
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9522
|
-
*/function
|
|
9522
|
+
*/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}/**
|
|
9523
9523
|
* @license
|
|
9524
9524
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9525
9525
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9526
|
-
*/const
|
|
9526
|
+
*/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]:""}}};/**
|
|
9527
9527
|
* @license
|
|
9528
9528
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
9529
9529
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9530
|
-
*/const
|
|
9530
|
+
*/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();}};/**
|
|
9531
9531
|
* @license
|
|
9532
9532
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9533
9533
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9534
|
-
*/const
|
|
9534
|
+
*/const ec=p`
|
|
9535
9535
|
[part='overlay'] {
|
|
9536
9536
|
display: flex;
|
|
9537
9537
|
flex: auto;
|
|
@@ -9550,18 +9550,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9550
9550
|
* @license
|
|
9551
9551
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9552
9552
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9553
|
-
*/f("vaadin-date-picker-overlay",[
|
|
9553
|
+
*/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`
|
|
9554
9554
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
9555
9555
|
<div part="overlay" id="overlay">
|
|
9556
9556
|
<div part="content" id="content">
|
|
9557
9557
|
<slot></slot>
|
|
9558
9558
|
</div>
|
|
9559
9559
|
</div>
|
|
9560
|
-
`}}
|
|
9560
|
+
`}}x(tc);/**
|
|
9561
9561
|
* @license
|
|
9562
9562
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9563
9563
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9564
|
-
*/const
|
|
9564
|
+
*/const Dn=p`
|
|
9565
9565
|
:host {
|
|
9566
9566
|
display: inline-block;
|
|
9567
9567
|
position: relative;
|
|
@@ -9621,7 +9621,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9621
9621
|
outline-color: GrayText;
|
|
9622
9622
|
}
|
|
9623
9623
|
}
|
|
9624
|
-
`,
|
|
9624
|
+
`,ic=s=>s`
|
|
9625
9625
|
<div class="vaadin-button-container">
|
|
9626
9626
|
<span part="prefix" aria-hidden="true">
|
|
9627
9627
|
<slot name="prefix"></slot>
|
|
@@ -9638,15 +9638,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9638
9638
|
* @license
|
|
9639
9639
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9640
9640
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9641
|
-
*/const
|
|
9641
|
+
*/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());}};/**
|
|
9642
9642
|
* @license
|
|
9643
9643
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
9644
9644
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9645
|
-
*/f("vaadin-button",
|
|
9645
|
+
*/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);/**
|
|
9646
9646
|
* @license
|
|
9647
9647
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9648
9648
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9649
|
-
*/function
|
|
9649
|
+
*/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()}):""}/**
|
|
9650
9650
|
@license
|
|
9651
9651
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9652
9652
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9654,7 +9654,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9654
9654
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9655
9655
|
Code distributed by Google as part of the polymer project is also
|
|
9656
9656
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9657
|
-
*/let
|
|
9657
|
+
*/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};/**
|
|
9658
9658
|
@license
|
|
9659
9659
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9660
9660
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9662,11 +9662,11 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9662
9662
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9663
9663
|
Code distributed by Google as part of the polymer project is also
|
|
9664
9664
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9665
|
-
*/const js=function(){let s,t;do s=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=
|
|
9665
|
+
*/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)};/**
|
|
9666
9666
|
* @license
|
|
9667
9667
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9668
9668
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9669
|
-
*/const
|
|
9669
|
+
*/const Nn=document.createElement("template");Nn.innerHTML=`
|
|
9670
9670
|
<style>
|
|
9671
9671
|
:host {
|
|
9672
9672
|
display: block;
|
|
@@ -9716,11 +9716,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9716
9716
|
<div class="buffer"></div>
|
|
9717
9717
|
<div id="fullHeight"></div>
|
|
9718
9718
|
</div>
|
|
9719
|
-
`;class
|
|
9719
|
+
`;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}}/**
|
|
9720
9720
|
* @license
|
|
9721
9721
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9722
9722
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9723
|
-
*/const
|
|
9723
|
+
*/const Vn=document.createElement("template");Vn.innerHTML=`
|
|
9724
9724
|
<style>
|
|
9725
9725
|
:host {
|
|
9726
9726
|
--vaadin-infinite-scroller-item-height: 270px;
|
|
@@ -9732,11 +9732,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9732
9732
|
height: 100%;
|
|
9733
9733
|
}
|
|
9734
9734
|
</style>
|
|
9735
|
-
`;class
|
|
9735
|
+
`;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);/**
|
|
9736
9736
|
* @license
|
|
9737
9737
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9738
9738
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9739
|
-
*/const
|
|
9739
|
+
*/const Fn=document.createElement("template");Fn.innerHTML=`
|
|
9740
9740
|
<style>
|
|
9741
9741
|
:host {
|
|
9742
9742
|
--vaadin-infinite-scroller-item-height: 80px;
|
|
@@ -9770,15 +9770,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9770
9770
|
border-left-color: #000;
|
|
9771
9771
|
}
|
|
9772
9772
|
</style>
|
|
9773
|
-
`;class
|
|
9773
|
+
`;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);/**
|
|
9774
9774
|
* @license
|
|
9775
9775
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9776
9776
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9777
|
-
*/const
|
|
9777
|
+
*/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());}};/**
|
|
9778
9778
|
* @license
|
|
9779
9779
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9780
9780
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9781
|
-
*/class
|
|
9781
|
+
*/class _c extends E(pc(y)){static get is(){return "vaadin-date-picker-year"}static get template(){return b`
|
|
9782
9782
|
<style>
|
|
9783
9783
|
:host {
|
|
9784
9784
|
display: block;
|
|
@@ -9787,7 +9787,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9787
9787
|
</style>
|
|
9788
9788
|
<div part="year-number">[[year]]</div>
|
|
9789
9789
|
<div part="year-separator" aria-hidden="true"></div>
|
|
9790
|
-
`}}
|
|
9790
|
+
`}}x(_c);/**
|
|
9791
9791
|
@license
|
|
9792
9792
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9793
9793
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9795,7 +9795,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9795
9795
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9796
9796
|
Code distributed by Google as part of the polymer project is also
|
|
9797
9797
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9798
|
-
*/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=
|
|
9798
|
+
*/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;/**
|
|
9799
9799
|
@license
|
|
9800
9800
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9801
9801
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9803,7 +9803,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9803
9803
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9804
9804
|
Code distributed by Google as part of the polymer project is also
|
|
9805
9805
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9806
|
-
*/let
|
|
9806
|
+
*/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}/**
|
|
9807
9807
|
@license
|
|
9808
9808
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9809
9809
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9811,7 +9811,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9811
9811
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9812
9812
|
Code distributed by Google as part of the polymer project is also
|
|
9813
9813
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9814
|
-
*/let Zo=!1;function
|
|
9814
|
+
*/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}/**
|
|
9815
9815
|
@license
|
|
9816
9816
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
9817
9817
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -9819,15 +9819,15 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
9819
9819
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
9820
9820
|
Code distributed by Google as part of the polymer project is also
|
|
9821
9821
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
9822
|
-
*/const
|
|
9822
|
+
*/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);/**
|
|
9823
9823
|
* @license
|
|
9824
9824
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9825
9825
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9826
|
-
*/const
|
|
9826
|
+
*/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}};/**
|
|
9827
9827
|
* @license
|
|
9828
9828
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9829
9829
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9830
|
-
*/const
|
|
9830
|
+
*/const Dc=p`
|
|
9831
9831
|
:host {
|
|
9832
9832
|
display: block;
|
|
9833
9833
|
}
|
|
@@ -9887,7 +9887,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9887
9887
|
* @license
|
|
9888
9888
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9889
9889
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9890
|
-
*/f("vaadin-month-calendar",
|
|
9890
|
+
*/f("vaadin-month-calendar",Dc,{moduleId:"vaadin-month-calendar-styles"});class zc extends Oc(E(y)){static get template(){return b`
|
|
9891
9891
|
<div part="month-header" id="month-header" aria-hidden="true">[[_getTitle(month, i18n)]]</div>
|
|
9892
9892
|
<table
|
|
9893
9893
|
id="monthGrid"
|
|
@@ -9929,7 +9929,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9929
9929
|
</template>
|
|
9930
9930
|
</tbody>
|
|
9931
9931
|
</table>
|
|
9932
|
-
`}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>
|
|
9932
|
+
`}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);/**
|
|
9933
9933
|
* @license
|
|
9934
9934
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
9935
9935
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -9937,11 +9937,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
9937
9937
|
* @license
|
|
9938
9938
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9939
9939
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9940
|
-
*/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}};/**
|
|
9940
|
+
*/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}};/**
|
|
9941
9941
|
* @license
|
|
9942
9942
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
9943
9943
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9944
|
-
*/const
|
|
9944
|
+
*/const Nc=p`
|
|
9945
9945
|
:host {
|
|
9946
9946
|
display: flex;
|
|
9947
9947
|
flex-direction: column;
|
|
@@ -10005,7 +10005,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10005
10005
|
* @license
|
|
10006
10006
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10007
10007
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10008
|
-
*/f("vaadin-date-picker-overlay-content",
|
|
10008
|
+
*/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`
|
|
10009
10009
|
<div part="overlay-header" on-touchend="_preventDefault" aria-hidden="true">
|
|
10010
10010
|
<div part="label">[[_formatDisplayed(selectedDate, i18n, label)]]</div>
|
|
10011
10011
|
<div part="clear-button" hidden$="[[!selectedDate]]"></div>
|
|
@@ -10025,32 +10025,32 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10025
10025
|
<slot name="today-button"></slot>
|
|
10026
10026
|
<slot name="cancel-button"></slot>
|
|
10027
10027
|
</div>
|
|
10028
|
-
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}
|
|
10028
|
+
`}static get is(){return "vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers();}}x(Lc);/**
|
|
10029
10029
|
* @license
|
|
10030
10030
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10031
10031
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10032
|
-
*/const
|
|
10032
|
+
*/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));});}});/**
|
|
10033
10033
|
* @license
|
|
10034
10034
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10035
10035
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10036
|
-
*/const
|
|
10036
|
+
*/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}));}};/**
|
|
10037
10037
|
* @license
|
|
10038
10038
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10039
10039
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10040
|
-
*/const Xs=
|
|
10040
|
+
*/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}});/**
|
|
10041
10041
|
* @license
|
|
10042
10042
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10043
10043
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10044
|
-
*/const Js=s=>class extends
|
|
10044
|
+
*/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 [`
|
|
10045
10045
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
10046
10046
|
font: inherit;
|
|
10047
10047
|
color: inherit;
|
|
10048
10048
|
}
|
|
10049
|
-
`]}_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,
|
|
10049
|
+
`]}_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);}}};/**
|
|
10050
10050
|
* @license
|
|
10051
10051
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10052
10052
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10053
|
-
*/const
|
|
10053
|
+
*/const Rc=p`
|
|
10054
10054
|
[part='clear-button'] {
|
|
10055
10055
|
display: none;
|
|
10056
10056
|
cursor: default;
|
|
@@ -10067,7 +10067,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10067
10067
|
* @license
|
|
10068
10068
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10069
10069
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10070
|
-
*/const
|
|
10070
|
+
*/const $n=p`
|
|
10071
10071
|
:host {
|
|
10072
10072
|
display: inline-flex;
|
|
10073
10073
|
outline: none;
|
|
@@ -10105,7 +10105,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10105
10105
|
* @license
|
|
10106
10106
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10107
10107
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10108
|
-
*/const
|
|
10108
|
+
*/const Hn=p`
|
|
10109
10109
|
[class$='container'] {
|
|
10110
10110
|
display: flex;
|
|
10111
10111
|
flex-direction: column;
|
|
@@ -10117,23 +10117,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10117
10117
|
* @license
|
|
10118
10118
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
10119
10119
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10120
|
-
*/const Qs=[
|
|
10120
|
+
*/const Qs=[$n,Hn,Rc];/**
|
|
10121
10121
|
* @license
|
|
10122
10122
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10123
10123
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10124
|
-
*/const
|
|
10124
|
+
*/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;}};/**
|
|
10125
10125
|
* @license
|
|
10126
10126
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10127
10127
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10128
|
-
*/let
|
|
10128
|
+
*/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");}};/**
|
|
10129
10129
|
* @license
|
|
10130
10130
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10131
10131
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10132
|
-
*/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)}};/**
|
|
10132
|
+
*/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)}};/**
|
|
10133
10133
|
* @license
|
|
10134
10134
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10135
10135
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10136
|
-
*/const
|
|
10136
|
+
*/const Hc=p`
|
|
10137
10137
|
:host([opened]) {
|
|
10138
10138
|
pointer-events: auto;
|
|
10139
10139
|
}
|
|
@@ -10150,7 +10150,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10150
10150
|
* @license
|
|
10151
10151
|
* Copyright (c) 2016 - 2024 Vaadin Ltd.
|
|
10152
10152
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10153
|
-
*/f("vaadin-date-picker",[Qs,
|
|
10153
|
+
*/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`
|
|
10154
10154
|
<div class="vaadin-date-picker-container">
|
|
10155
10155
|
<div part="label">
|
|
10156
10156
|
<slot name="label"></slot>
|
|
@@ -10192,23 +10192,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10192
10192
|
></vaadin-date-picker-overlay>
|
|
10193
10193
|
|
|
10194
10194
|
<slot name="tooltip"></slot>
|
|
10195
|
-
`}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
|
|
10195
|
+
`}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);/**
|
|
10196
10196
|
* @license
|
|
10197
10197
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10198
10198
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10199
|
-
*/f("vaadin-text-field",
|
|
10199
|
+
*/f("vaadin-text-field",Pe,{moduleId:"lumo-text-field-styles"});/**
|
|
10200
10200
|
* @license
|
|
10201
10201
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10202
10202
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10203
|
-
*/const
|
|
10203
|
+
*/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();}};/**
|
|
10204
10204
|
* @license
|
|
10205
10205
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10206
10206
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10207
|
-
*/const
|
|
10207
|
+
*/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));}};/**
|
|
10208
10208
|
* @license
|
|
10209
10209
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
10210
10210
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10211
|
-
*/f("vaadin-text-field",Qs,{moduleId:"vaadin-text-field-styles"});class Un extends
|
|
10211
|
+
*/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`
|
|
10212
10212
|
<div class="vaadin-field-container">
|
|
10213
10213
|
<div part="label">
|
|
10214
10214
|
<slot name="label"></slot>
|
|
@@ -10237,11 +10237,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10237
10237
|
</div>
|
|
10238
10238
|
</div>
|
|
10239
10239
|
<slot name="tooltip"></slot>
|
|
10240
|
-
`}static get properties(){return {maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new
|
|
10240
|
+
`}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);/**
|
|
10241
10241
|
* @license
|
|
10242
10242
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10243
10243
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10244
|
-
*/const
|
|
10244
|
+
*/const jc=p`
|
|
10245
10245
|
:host {
|
|
10246
10246
|
position: absolute;
|
|
10247
10247
|
right: 0;
|
|
@@ -10254,11 +10254,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10254
10254
|
background: transparent;
|
|
10255
10255
|
outline: none;
|
|
10256
10256
|
}
|
|
10257
|
-
`;f("vaadin-password-field-button",[In,
|
|
10257
|
+
`;f("vaadin-password-field-button",[In,jc],{moduleId:"lumo-password-field-button"});/**
|
|
10258
10258
|
* @license
|
|
10259
10259
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10260
10260
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10261
|
-
*/const
|
|
10261
|
+
*/const Yc=p`
|
|
10262
10262
|
[part='reveal-button']::before {
|
|
10263
10263
|
content: var(--lumo-icons-eye);
|
|
10264
10264
|
}
|
|
@@ -10276,27 +10276,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10276
10276
|
[part='reveal-button'][hidden] {
|
|
10277
10277
|
display: none !important;
|
|
10278
10278
|
}
|
|
10279
|
-
`;f("vaadin-password-field",[
|
|
10279
|
+
`;f("vaadin-password-field",[Pe,Yc],{moduleId:"lumo-password-field"});/**
|
|
10280
10280
|
* @license
|
|
10281
10281
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10282
10282
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10283
|
-
*/f("vaadin-password-field-button",
|
|
10283
|
+
*/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);/**
|
|
10284
10284
|
* @license
|
|
10285
10285
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10286
10286
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10287
|
-
*/const
|
|
10287
|
+
*/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,`
|
|
10288
10288
|
${e} [slot="input"]::-ms-reveal {
|
|
10289
10289
|
display: none;
|
|
10290
10290
|
}
|
|
10291
|
-
`]}get _revealNode(){return this._revealButtonController&&this._revealButtonController.node}ready(){super.ready(),this._revealPart=this.shadowRoot.querySelector('[part="reveal-button"]'),this._revealButtonController=new
|
|
10291
|
+
`]}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);}};/**
|
|
10292
10292
|
* @license
|
|
10293
10293
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10294
10294
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10295
|
-
*/const
|
|
10295
|
+
*/const Xc=b`
|
|
10296
10296
|
<div part="reveal-button" slot="suffix">
|
|
10297
10297
|
<slot name="reveal"></slot>
|
|
10298
10298
|
</div>
|
|
10299
|
-
`;let
|
|
10299
|
+
`;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`
|
|
10300
10300
|
:host {
|
|
10301
10301
|
display: flex;
|
|
10302
10302
|
align-items: center;
|
|
@@ -10380,7 +10380,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10380
10380
|
width: var(--lumo-icon-size-m);
|
|
10381
10381
|
height: var(--lumo-icon-size-m);
|
|
10382
10382
|
}
|
|
10383
|
-
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const
|
|
10383
|
+
`;f("vaadin-item",Zs,{moduleId:"lumo-item"});const Qc=p`
|
|
10384
10384
|
:host {
|
|
10385
10385
|
transition: background-color 100ms;
|
|
10386
10386
|
overflow: hidden;
|
|
@@ -10392,11 +10392,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10392
10392
|
:host([focused]:not([disabled])) {
|
|
10393
10393
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
10394
10394
|
}
|
|
10395
|
-
`;f("vaadin-combo-box-item",[Zs,
|
|
10395
|
+
`;f("vaadin-combo-box-item",[Zs,Qc],{moduleId:"lumo-combo-box-item"});/**
|
|
10396
10396
|
* @license
|
|
10397
10397
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
10398
10398
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10399
|
-
*/const
|
|
10399
|
+
*/const Zc=p`
|
|
10400
10400
|
[part~='loader'] {
|
|
10401
10401
|
box-sizing: border-box;
|
|
10402
10402
|
width: var(--lumo-icon-size-s);
|
|
@@ -10438,7 +10438,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10438
10438
|
transform: rotate(360deg);
|
|
10439
10439
|
}
|
|
10440
10440
|
}
|
|
10441
|
-
`,
|
|
10441
|
+
`,eu=p`
|
|
10442
10442
|
[part='content'] {
|
|
10443
10443
|
padding: 0;
|
|
10444
10444
|
}
|
|
@@ -10459,7 +10459,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10459
10459
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
10460
10460
|
margin-bottom: var(--lumo-space-xs);
|
|
10461
10461
|
}
|
|
10462
|
-
`,
|
|
10462
|
+
`,tu=p`
|
|
10463
10463
|
[part~='loader'] {
|
|
10464
10464
|
position: absolute;
|
|
10465
10465
|
z-index: 1;
|
|
@@ -10467,24 +10467,24 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10467
10467
|
top: var(--lumo-space-s);
|
|
10468
10468
|
margin-inline: auto 0;
|
|
10469
10469
|
}
|
|
10470
|
-
`;f("vaadin-combo-box-overlay",[
|
|
10470
|
+
`;f("vaadin-combo-box-overlay",[Vs,Fs,eu,Zc,tu,p`
|
|
10471
10471
|
:host {
|
|
10472
10472
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
10473
10473
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
10474
10474
|
}
|
|
10475
|
-
`],{moduleId:"lumo-combo-box-overlay"});const
|
|
10475
|
+
`],{moduleId:"lumo-combo-box-overlay"});const iu=p`
|
|
10476
10476
|
[part='toggle-button']::before {
|
|
10477
10477
|
content: var(--lumo-icons-dropdown);
|
|
10478
10478
|
}
|
|
10479
|
-
`;f("vaadin-combo-box",[
|
|
10479
|
+
`;f("vaadin-combo-box",[Pe,iu],{moduleId:"lumo-combo-box"});/**
|
|
10480
10480
|
* @license
|
|
10481
10481
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10482
10482
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10483
|
-
*/const
|
|
10483
|
+
*/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);}};/**
|
|
10484
10484
|
* @license
|
|
10485
10485
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10486
10486
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10487
|
-
*/class
|
|
10487
|
+
*/class ou extends su(E($(y))){static get template(){return b`
|
|
10488
10488
|
<style>
|
|
10489
10489
|
:host {
|
|
10490
10490
|
display: block;
|
|
@@ -10498,15 +10498,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10498
10498
|
<div part="content">
|
|
10499
10499
|
<slot></slot>
|
|
10500
10500
|
</div>
|
|
10501
|
-
`}static get is(){return "vaadin-combo-box-item"}}
|
|
10501
|
+
`}static get is(){return "vaadin-combo-box-item"}}x(ou);/**
|
|
10502
10502
|
* @license
|
|
10503
10503
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10504
10504
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10505
|
-
*/const
|
|
10505
|
+
*/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());}};/**
|
|
10506
10506
|
* @license
|
|
10507
10507
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10508
10508
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10509
|
-
*/const
|
|
10509
|
+
*/const nu=p`
|
|
10510
10510
|
#overlay {
|
|
10511
10511
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
|
10512
10512
|
}
|
|
@@ -10516,17 +10516,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10516
10516
|
flex-direction: column;
|
|
10517
10517
|
height: 100%;
|
|
10518
10518
|
}
|
|
10519
|
-
`;f("vaadin-combo-box-overlay",[
|
|
10519
|
+
`;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`
|
|
10520
10520
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
10521
10521
|
<div part="overlay" id="overlay">
|
|
10522
10522
|
<div part="loader"></div>
|
|
10523
10523
|
<div part="content" id="content"><slot></slot></div>
|
|
10524
10524
|
</div>
|
|
10525
|
-
`}}
|
|
10525
|
+
`}}x(au);/**
|
|
10526
10526
|
* @license
|
|
10527
10527
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
10528
10528
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10529
|
-
*/function
|
|
10529
|
+
*/function Ot(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
10530
10530
|
* @license
|
|
10531
10531
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
10532
10532
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -10534,23 +10534,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10534
10534
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
10535
10535
|
* Code distributed by Google as part of the polymer project is also
|
|
10536
10536
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
10537
|
-
*/const tr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
10537
|
+
*/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]);}};/**
|
|
10538
10538
|
* @license
|
|
10539
10539
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10540
10540
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10541
|
-
*/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();}};/**
|
|
10541
|
+
*/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();}};/**
|
|
10542
10542
|
* @license
|
|
10543
10543
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10544
10544
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10545
|
-
*/const
|
|
10545
|
+
*/const Se=class{toString(){return ""}};/**
|
|
10546
10546
|
* @license
|
|
10547
10547
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10548
10548
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10549
|
-
*/const
|
|
10549
|
+
*/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}};/**
|
|
10550
10550
|
* @license
|
|
10551
10551
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10552
10552
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10553
|
-
*/class
|
|
10553
|
+
*/class pu extends uu(y){static get is(){return "vaadin-combo-box-scroller"}static get template(){return b`
|
|
10554
10554
|
<style>
|
|
10555
10555
|
:host {
|
|
10556
10556
|
display: block;
|
|
@@ -10577,27 +10577,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10577
10577
|
<div id="selector">
|
|
10578
10578
|
<slot></slot>
|
|
10579
10579
|
</div>
|
|
10580
|
-
`}}
|
|
10580
|
+
`}}x(pu);/**
|
|
10581
10581
|
* @license
|
|
10582
10582
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10583
10583
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10584
|
-
*/const
|
|
10584
|
+
*/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"]}};/**
|
|
10585
10585
|
* @license
|
|
10586
10586
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10587
10587
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10588
|
-
*/function
|
|
10588
|
+
*/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}/**
|
|
10589
10589
|
* @license
|
|
10590
10590
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10591
10591
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10592
|
-
*/let
|
|
10592
|
+
*/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}};/**
|
|
10593
10593
|
* @license
|
|
10594
10594
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10595
10595
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10596
|
-
*/let
|
|
10596
|
+
*/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}};/**
|
|
10597
10597
|
* @license
|
|
10598
10598
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10599
10599
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10600
|
-
*/const
|
|
10600
|
+
*/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`");}}};/**
|
|
10601
10601
|
* @license
|
|
10602
10602
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
10603
10603
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -10605,11 +10605,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10605
10605
|
* @license
|
|
10606
10606
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10607
10607
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10608
|
-
*/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());}};/**
|
|
10608
|
+
*/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());}};/**
|
|
10609
10609
|
* @license
|
|
10610
10610
|
* Copyright (c) 2015 - 2024 Vaadin Ltd.
|
|
10611
10611
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10612
|
-
*/f("vaadin-combo-box",Qs,{moduleId:"vaadin-combo-box-styles"});class
|
|
10612
|
+
*/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`
|
|
10613
10613
|
<style>
|
|
10614
10614
|
:host([opened]) {
|
|
10615
10615
|
pointer-events: auto;
|
|
@@ -10654,33 +10654,37 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10654
10654
|
></vaadin-combo-box-overlay>
|
|
10655
10655
|
|
|
10656
10656
|
<slot name="tooltip"></slot>
|
|
10657
|
-
`}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
|
|
10657
|
+
`}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);/**
|
|
10658
10658
|
* @license
|
|
10659
10659
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
10660
10660
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10661
|
-
*/window.Vaadin||(window.Vaadin={});var yr;(yr=window.Vaadin).featureFlags||(yr.featureFlags={});function
|
|
10661
|
+
*/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.`);}}/**
|
|
10662
10662
|
* @license
|
|
10663
10663
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10664
10664
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10665
|
-
*/class
|
|
10665
|
+
*/class xu extends HTMLElement{static get is(){return "vaadin-lumo-styles"}}J(xu);/**
|
|
10666
|
+
* @license
|
|
10667
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
10668
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10669
|
+
*/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));}/**
|
|
10666
10670
|
* @license
|
|
10667
10671
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10668
10672
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10669
|
-
*/const
|
|
10673
|
+
*/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);}};/**
|
|
10670
10674
|
* @license
|
|
10671
10675
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10672
10676
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10673
|
-
*/const
|
|
10674
|
-
`)}const
|
|
10677
|
+
*/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(`
|
|
10678
|
+
`)}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))}};/**
|
|
10675
10679
|
* @license
|
|
10676
10680
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10677
10681
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10678
|
-
*/const
|
|
10679
|
-
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},
|
|
10682
|
+
*/const zu=(s,...t)=>{const e=document.createElement("style");e.id=s,e.textContent=t.map(i=>i.toString()).join(`
|
|
10683
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",e);},De=(s,...t)=>{zu(`lumo-${s}`,t);};/**
|
|
10680
10684
|
* @license
|
|
10681
10685
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10682
10686
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10683
|
-
*/const
|
|
10687
|
+
*/const Mu=p`
|
|
10684
10688
|
:host {
|
|
10685
10689
|
/* Base (background) */
|
|
10686
10690
|
--lumo-base-color: #fff;
|
|
@@ -10765,7 +10769,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10765
10769
|
--lumo-disabled-text-color: GrayText;
|
|
10766
10770
|
}
|
|
10767
10771
|
}
|
|
10768
|
-
`;
|
|
10772
|
+
`;De("color-props",Mu);const Nu=p`
|
|
10769
10773
|
[theme~='dark'] {
|
|
10770
10774
|
/* Base (background) */
|
|
10771
10775
|
--lumo-base-color: hsl(214, 35%, 21%);
|
|
@@ -10883,11 +10887,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10883
10887
|
pre code {
|
|
10884
10888
|
background: transparent;
|
|
10885
10889
|
}
|
|
10886
|
-
`;
|
|
10890
|
+
`;I("",Nu,{moduleId:"lumo-color"});/**
|
|
10887
10891
|
* @license
|
|
10888
10892
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10889
10893
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10890
|
-
*/const
|
|
10894
|
+
*/const Lu=p`
|
|
10891
10895
|
@font-face {
|
|
10892
10896
|
font-family: 'lumo-icons';
|
|
10893
10897
|
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=)
|
|
@@ -10942,11 +10946,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10942
10946
|
--lumo-icons-upload: '\\ea2b';
|
|
10943
10947
|
--lumo-icons-user: '\\ea2c';
|
|
10944
10948
|
}
|
|
10945
|
-
`;
|
|
10949
|
+
`;De("font-icons",Lu);/**
|
|
10946
10950
|
* @license
|
|
10947
10951
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10948
10952
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10949
|
-
*/const
|
|
10953
|
+
*/const Vu=p`
|
|
10950
10954
|
:host {
|
|
10951
10955
|
/* Square */
|
|
10952
10956
|
--lumo-space-xs: 0.25rem;
|
|
@@ -10969,11 +10973,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
10969
10973
|
--lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
|
|
10970
10974
|
--lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
|
|
10971
10975
|
}
|
|
10972
|
-
`;
|
|
10976
|
+
`;De("spacing-props",Vu);/**
|
|
10973
10977
|
* @license
|
|
10974
10978
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
10975
10979
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
10976
|
-
*/const
|
|
10980
|
+
*/const Fu=p`
|
|
10977
10981
|
:host {
|
|
10978
10982
|
/* Border radius */
|
|
10979
10983
|
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
@@ -11073,11 +11077,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11073
11077
|
--vaadin-input-field-value-font-size: var(--lumo-font-size-m);
|
|
11074
11078
|
--vaadin-input-field-value-font-weight: 500;
|
|
11075
11079
|
}
|
|
11076
|
-
`;
|
|
11080
|
+
`;De("style-props",Fu);/**
|
|
11077
11081
|
* @license
|
|
11078
11082
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11079
11083
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11080
|
-
*/const
|
|
11084
|
+
*/const Bu=p`
|
|
11081
11085
|
:host {
|
|
11082
11086
|
/* prettier-ignore */
|
|
11083
11087
|
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
@@ -11097,7 +11101,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11097
11101
|
--lumo-line-height-s: 1.375;
|
|
11098
11102
|
--lumo-line-height-m: 1.625;
|
|
11099
11103
|
}
|
|
11100
|
-
`,
|
|
11104
|
+
`,Ru=p`
|
|
11101
11105
|
body,
|
|
11102
11106
|
:host {
|
|
11103
11107
|
font-family: var(--lumo-font-family);
|
|
@@ -11189,11 +11193,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11189
11193
|
border-left: none;
|
|
11190
11194
|
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
11191
11195
|
}
|
|
11192
|
-
`;
|
|
11196
|
+
`;I("",Ru,{moduleId:"lumo-typography"});De("typography-props",Bu);/**
|
|
11193
11197
|
* @license
|
|
11194
11198
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11195
11199
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11196
|
-
*/const
|
|
11200
|
+
*/const $u=p`
|
|
11197
11201
|
:host {
|
|
11198
11202
|
--lumo-size-xs: 1.625rem;
|
|
11199
11203
|
--lumo-size-s: 1.875rem;
|
|
@@ -11208,7 +11212,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11208
11212
|
/* For backwards compatibility */
|
|
11209
11213
|
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
11210
11214
|
}
|
|
11211
|
-
`;
|
|
11215
|
+
`;De("sizing-props",$u);/**
|
|
11212
11216
|
* @license
|
|
11213
11217
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11214
11218
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
@@ -11239,11 +11243,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11239
11243
|
font-family: 'lumo-icons';
|
|
11240
11244
|
display: block;
|
|
11241
11245
|
}
|
|
11242
|
-
`;
|
|
11246
|
+
`;I("",io,{moduleId:"lumo-field-button"});/**
|
|
11243
11247
|
* @license
|
|
11244
11248
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
11245
11249
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11246
|
-
*/const
|
|
11250
|
+
*/const Hu=p`
|
|
11247
11251
|
:host {
|
|
11248
11252
|
font-size: var(--lumo-font-size-xxs);
|
|
11249
11253
|
line-height: 1;
|
|
@@ -11332,7 +11336,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11332
11336
|
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
11333
11337
|
pointer-events: none;
|
|
11334
11338
|
}
|
|
11335
|
-
`;
|
|
11339
|
+
`;I("vaadin-multi-select-combo-box-chip",[io,Hu],{moduleId:"lumo-multi-select-combo-box-chip"});I("vaadin-input-container",p`
|
|
11336
11340
|
:host {
|
|
11337
11341
|
background: var(--_background);
|
|
11338
11342
|
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
@@ -11594,7 +11598,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11594
11598
|
width: var(--lumo-icon-size-m);
|
|
11595
11599
|
height: var(--lumo-icon-size-m);
|
|
11596
11600
|
}
|
|
11597
|
-
`;
|
|
11601
|
+
`;I("vaadin-item",so,{moduleId:"lumo-item"});const ta=p`
|
|
11598
11602
|
:host {
|
|
11599
11603
|
transition: background-color 100ms;
|
|
11600
11604
|
overflow: hidden;
|
|
@@ -11606,11 +11610,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11606
11610
|
:host([focused]:not([disabled])) {
|
|
11607
11611
|
box-shadow: inset 0 0 0 var(--_focus-ring-width) var(--_focus-ring-color);
|
|
11608
11612
|
}
|
|
11609
|
-
`;
|
|
11613
|
+
`;I("vaadin-combo-box-item",[so,ta],{moduleId:"lumo-combo-box-item"});/**
|
|
11610
11614
|
* @license
|
|
11611
11615
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
11612
11616
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11613
|
-
*/const
|
|
11617
|
+
*/const ia=p`
|
|
11614
11618
|
[part~='loader'] {
|
|
11615
11619
|
box-sizing: border-box;
|
|
11616
11620
|
width: var(--lumo-icon-size-s);
|
|
@@ -11656,7 +11660,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11656
11660
|
* @license
|
|
11657
11661
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11658
11662
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11659
|
-
*/const
|
|
11663
|
+
*/const Gt=p`
|
|
11660
11664
|
:host {
|
|
11661
11665
|
top: var(--lumo-space-m);
|
|
11662
11666
|
right: var(--lumo-space-m);
|
|
@@ -11721,11 +11725,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11721
11725
|
opacity: 1;
|
|
11722
11726
|
}
|
|
11723
11727
|
}
|
|
11724
|
-
`;
|
|
11728
|
+
`;I("",Gt,{moduleId:"lumo-overlay"});/**
|
|
11725
11729
|
* @license
|
|
11726
11730
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11727
11731
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11728
|
-
*/const
|
|
11732
|
+
*/const Kt=p`
|
|
11729
11733
|
:host([opening]),
|
|
11730
11734
|
:host([closing]) {
|
|
11731
11735
|
animation: 0.14s lumo-overlay-dummy-animation;
|
|
@@ -11755,7 +11759,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11755
11759
|
opacity: 0;
|
|
11756
11760
|
}
|
|
11757
11761
|
}
|
|
11758
|
-
`;
|
|
11762
|
+
`;I("",Kt,{moduleId:"lumo-menu-overlay-core"});const qu=p`
|
|
11759
11763
|
/* Small viewport (bottom sheet) styles */
|
|
11760
11764
|
/* Use direct media queries instead of the state attributes ([phone] and [fullscreen]) provided by the elements */
|
|
11761
11765
|
@media (max-width: 450px), (max-height: 450px) {
|
|
@@ -11817,7 +11821,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11817
11821
|
transform: translateY(150%);
|
|
11818
11822
|
}
|
|
11819
11823
|
}
|
|
11820
|
-
`,
|
|
11824
|
+
`,Uu=[Gt,Kt,qu];I("",Uu,{moduleId:"lumo-menu-overlay"});const sa=p`
|
|
11821
11825
|
[part='content'] {
|
|
11822
11826
|
padding: 0;
|
|
11823
11827
|
}
|
|
@@ -11838,7 +11842,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11838
11842
|
:host([bottom-aligned]) [part~='overlay'] {
|
|
11839
11843
|
margin-bottom: var(--lumo-space-xs);
|
|
11840
11844
|
}
|
|
11841
|
-
`,
|
|
11845
|
+
`,oa=p`
|
|
11842
11846
|
[part~='loader'] {
|
|
11843
11847
|
position: absolute;
|
|
11844
11848
|
z-index: 1;
|
|
@@ -11846,7 +11850,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11846
11850
|
top: var(--lumo-space-s);
|
|
11847
11851
|
margin-inline: auto 0;
|
|
11848
11852
|
}
|
|
11849
|
-
`;
|
|
11853
|
+
`;I("vaadin-combo-box-overlay",[Gt,Kt,sa,ia,oa,p`
|
|
11850
11854
|
:host {
|
|
11851
11855
|
--_vaadin-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
11852
11856
|
--_vaadin-combo-box-items-container-border-style: solid;
|
|
@@ -11855,7 +11859,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11855
11859
|
* @license
|
|
11856
11860
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11857
11861
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11858
|
-
*/const
|
|
11862
|
+
*/const Wu=p`
|
|
11859
11863
|
:host {
|
|
11860
11864
|
--_helper-spacing: var(--vaadin-input-field-helper-spacing, 0.4em);
|
|
11861
11865
|
}
|
|
@@ -11915,16 +11919,16 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
11915
11919
|
* @license
|
|
11916
11920
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
11917
11921
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
11918
|
-
*/const
|
|
11922
|
+
*/const ra=p`
|
|
11919
11923
|
[part='label'] {
|
|
11920
11924
|
align-self: flex-start;
|
|
11921
11925
|
color: var(--vaadin-input-field-label-color, var(--lumo-secondary-text-color));
|
|
11922
11926
|
font-weight: var(--vaadin-input-field-label-font-weight, 500);
|
|
11923
11927
|
font-size: var(--vaadin-input-field-label-font-size, var(--lumo-font-size-s));
|
|
11924
|
-
margin-left: calc(var(--lumo-border-radius-m) / 4);
|
|
11925
11928
|
transition: color 0.2s;
|
|
11926
11929
|
line-height: 1;
|
|
11927
|
-
padding-
|
|
11930
|
+
padding-inline-start: calc(var(--lumo-border-radius-m) / 4);
|
|
11931
|
+
padding-inline-end: 1em;
|
|
11928
11932
|
padding-bottom: 0.5em;
|
|
11929
11933
|
/* As a workaround for diacritics being cut off, add a top padding and a
|
|
11930
11934
|
negative margin to compensate */
|
|
@@ -12008,16 +12012,6 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12008
12012
|
|
|
12009
12013
|
/* RTL specific styles */
|
|
12010
12014
|
|
|
12011
|
-
:host([dir='rtl']) [part='label'] {
|
|
12012
|
-
margin-left: 0;
|
|
12013
|
-
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
12014
|
-
}
|
|
12015
|
-
|
|
12016
|
-
:host([dir='rtl']) [part='label'] {
|
|
12017
|
-
padding-left: 1em;
|
|
12018
|
-
padding-right: 0;
|
|
12019
|
-
}
|
|
12020
|
-
|
|
12021
12015
|
:host([dir='rtl']) [part='required-indicator']::after {
|
|
12022
12016
|
right: auto;
|
|
12023
12017
|
left: 0;
|
|
@@ -12027,11 +12021,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12027
12021
|
margin-left: 0;
|
|
12028
12022
|
margin-right: calc(var(--lumo-border-radius-m) / 4);
|
|
12029
12023
|
}
|
|
12030
|
-
`;
|
|
12024
|
+
`;I("",ra,{moduleId:"lumo-required-field"});/**
|
|
12031
12025
|
* @license
|
|
12032
12026
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12033
12027
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12034
|
-
*/const
|
|
12028
|
+
*/const ju=p`
|
|
12035
12029
|
:host {
|
|
12036
12030
|
--lumo-text-field-size: var(--lumo-size-m);
|
|
12037
12031
|
color: var(--vaadin-input-field-value-color, var(--lumo-body-text-color));
|
|
@@ -12179,27 +12173,27 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12179
12173
|
[part='clear-button']::before {
|
|
12180
12174
|
content: var(--lumo-icons-cross);
|
|
12181
12175
|
}
|
|
12182
|
-
`,
|
|
12176
|
+
`,na=[ra,io,Wu,ju];I("",na,{moduleId:"lumo-input-field-shared-styles"});/**
|
|
12183
12177
|
* @license
|
|
12184
12178
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12185
12179
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12186
|
-
*/const
|
|
12180
|
+
*/const Yu=p`
|
|
12187
12181
|
@media (any-hover: hover) {
|
|
12188
12182
|
:host(:hover[readonly]) {
|
|
12189
12183
|
background-color: transparent;
|
|
12190
12184
|
cursor: default;
|
|
12191
12185
|
}
|
|
12192
12186
|
}
|
|
12193
|
-
`;
|
|
12187
|
+
`;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`
|
|
12194
12188
|
:host {
|
|
12195
12189
|
--_vaadin-multi-select-combo-box-items-container-border-width: var(--lumo-space-xs);
|
|
12196
12190
|
--_vaadin-multi-select-combo-box-items-container-border-style: solid;
|
|
12197
12191
|
}
|
|
12198
|
-
`],{moduleId:"lumo-multi-select-combo-box-overlay"});
|
|
12192
|
+
`],{moduleId:"lumo-multi-select-combo-box-overlay"});I("vaadin-multi-select-combo-box-container",p`
|
|
12199
12193
|
:host([auto-expand-vertically]) {
|
|
12200
12194
|
padding-block: var(--lumo-space-xs);
|
|
12201
12195
|
}
|
|
12202
|
-
`,{moduleId:"lumo-multi-select-combo-box-container"});const
|
|
12196
|
+
`,{moduleId:"lumo-multi-select-combo-box-container"});const Gu=p`
|
|
12203
12197
|
:host([has-value]) {
|
|
12204
12198
|
padding-inline-start: 0;
|
|
12205
12199
|
}
|
|
@@ -12252,11 +12246,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12252
12246
|
color: var(--lumo-contrast-60pct);
|
|
12253
12247
|
cursor: var(--lumo-clickable-cursor);
|
|
12254
12248
|
}
|
|
12255
|
-
`;
|
|
12249
|
+
`;I("vaadin-multi-select-combo-box",[na,Gu],{moduleId:"lumo-multi-select-combo-box"});/**
|
|
12256
12250
|
* @license
|
|
12257
12251
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12258
12252
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12259
|
-
*/const
|
|
12253
|
+
*/const Ku=p`
|
|
12260
12254
|
:host {
|
|
12261
12255
|
max-width: 100%;
|
|
12262
12256
|
--input-min-width: var(--vaadin-multi-select-combo-box-input-min-width, 4em);
|
|
@@ -12295,7 +12289,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12295
12289
|
:host([auto-expand-horizontally]) [class$='container'] {
|
|
12296
12290
|
width: auto;
|
|
12297
12291
|
}
|
|
12298
|
-
`,
|
|
12292
|
+
`,Xu=p`
|
|
12299
12293
|
:host {
|
|
12300
12294
|
display: inline-flex;
|
|
12301
12295
|
align-items: center;
|
|
@@ -12324,22 +12318,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12324
12318
|
* @license
|
|
12325
12319
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12326
12320
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12327
|
-
*/
|
|
12321
|
+
*/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`
|
|
12328
12322
|
<div part="label">[[label]]</div>
|
|
12329
12323
|
<div part="remove-button" on-click="_onRemoveClick"></div>
|
|
12330
|
-
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}
|
|
12324
|
+
`}_onRemoveClick(t){t.stopPropagation(),this.dispatchEvent(new CustomEvent("item-removed",{detail:{item:this.item},bubbles:!0,composed:!0}));}}J(Ju);/**
|
|
12331
12325
|
* @license
|
|
12332
12326
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12333
12327
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12334
|
-
*/const
|
|
12328
|
+
*/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);}};/**
|
|
12335
12329
|
* @license
|
|
12336
12330
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12337
12331
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12338
|
-
*/const
|
|
12339
|
-
* @license
|
|
12340
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12341
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12342
|
-
*/const Ju=p`
|
|
12332
|
+
*/const ep=p`
|
|
12343
12333
|
:host {
|
|
12344
12334
|
display: flex;
|
|
12345
12335
|
align-items: center;
|
|
@@ -12409,15 +12399,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12409
12399
|
* @license
|
|
12410
12400
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12411
12401
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12412
|
-
*/
|
|
12402
|
+
*/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());});}};/**
|
|
12403
|
+
* @license
|
|
12404
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12405
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12406
|
+
*/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`
|
|
12413
12407
|
<slot name="prefix"></slot>
|
|
12414
12408
|
<slot></slot>
|
|
12415
12409
|
<slot name="suffix"></slot>
|
|
12416
|
-
`}}
|
|
12410
|
+
`}}J(aa);/**
|
|
12417
12411
|
* @license
|
|
12418
12412
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12419
12413
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12420
|
-
*/
|
|
12414
|
+
*/I("vaadin-multi-select-combo-box-container",p`
|
|
12421
12415
|
#wrapper {
|
|
12422
12416
|
display: flex;
|
|
12423
12417
|
width: 100%;
|
|
@@ -12427,15 +12421,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12427
12421
|
:host([auto-expand-vertically]) #wrapper {
|
|
12428
12422
|
flex-wrap: wrap;
|
|
12429
12423
|
}
|
|
12430
|
-
`,{moduleId:"vaadin-multi-select-combo-box-container-styles"});let
|
|
12424
|
+
`,{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);/**
|
|
12431
12425
|
* @license
|
|
12432
12426
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12433
12427
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12434
|
-
*/const
|
|
12428
|
+
*/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);}};/**
|
|
12435
12429
|
* @license
|
|
12436
12430
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12437
12431
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12438
|
-
*/class
|
|
12432
|
+
*/class op extends sp(Oe(Xt(y))){static get is(){return "vaadin-multi-select-combo-box-item"}static get template(){return b`
|
|
12439
12433
|
<style>
|
|
12440
12434
|
:host {
|
|
12441
12435
|
display: block;
|
|
@@ -12449,67 +12443,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12449
12443
|
<div part="content">
|
|
12450
12444
|
<slot></slot>
|
|
12451
12445
|
</div>
|
|
12452
|
-
`}}
|
|
12446
|
+
`}}J(op);/**
|
|
12453
12447
|
* @license
|
|
12454
12448
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12455
12449
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12456
|
-
*/let oo=!1;window.addEventListener("keydown",()=>{oo=!0;},{capture:!0});window.addEventListener("mousedown",()=>{oo=!1;},{capture:!0});function
|
|
12450
|
+
*/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}/**
|
|
12457
12451
|
* @license
|
|
12458
12452
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12459
12453
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12460
|
-
*/function
|
|
12454
|
+
*/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()===""}/**
|
|
12461
12455
|
* @license
|
|
12462
12456
|
* Copyright (c) 2024 - 2025 Vaadin Ltd.
|
|
12463
12457
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12464
|
-
*/function
|
|
12458
|
+
*/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}/**
|
|
12465
12459
|
* @license
|
|
12466
12460
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12467
12461
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12468
|
-
*/const
|
|
12462
|
+
*/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]:""}}};/**
|
|
12469
12463
|
* @license
|
|
12470
12464
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12471
12465
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12472
|
-
*/const
|
|
12466
|
+
*/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());}};/**
|
|
12473
12467
|
* @license
|
|
12474
12468
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12475
12469
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12476
|
-
*/const
|
|
12470
|
+
*/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}})();/**
|
|
12477
12471
|
* @license
|
|
12478
12472
|
* Copyright (c) 2017 Anton Korzunov
|
|
12479
12473
|
* SPDX-License-Identifier: MIT
|
|
12480
|
-
*/let
|
|
12474
|
+
*/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")};/**
|
|
12481
12475
|
* @license
|
|
12482
12476
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12483
12477
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12484
|
-
*/class
|
|
12478
|
+
*/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);}}/**
|
|
12485
12479
|
* @license
|
|
12486
12480
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12487
12481
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12488
|
-
*/class
|
|
12482
|
+
*/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;}}/**
|
|
12489
12483
|
* @license
|
|
12490
12484
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12491
12485
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12492
|
-
*/const
|
|
12486
|
+
*/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}}/**
|
|
12493
12487
|
* @license
|
|
12494
12488
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12495
12489
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12496
|
-
*/const
|
|
12490
|
+
*/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);}});/**
|
|
12497
12491
|
* @license
|
|
12498
12492
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12499
12493
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12500
|
-
*/const
|
|
12494
|
+
*/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}};/**
|
|
12501
12495
|
* @license
|
|
12502
12496
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12503
12497
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12504
|
-
*/const
|
|
12498
|
+
*/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)););}};/**
|
|
12505
12499
|
* @license
|
|
12506
12500
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12507
12501
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12508
|
-
*/const
|
|
12502
|
+
*/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);}}};/**
|
|
12509
12503
|
* @license
|
|
12510
12504
|
* Copyright (c) 2017 - 2025 Vaadin Ltd.
|
|
12511
12505
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12512
|
-
*/const
|
|
12506
|
+
*/const Dp=p`
|
|
12513
12507
|
:host {
|
|
12514
12508
|
z-index: 200;
|
|
12515
12509
|
position: fixed;
|
|
@@ -12572,7 +12566,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12572
12566
|
* @license
|
|
12573
12567
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12574
12568
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12575
|
-
*/const
|
|
12569
|
+
*/const zp=p`
|
|
12576
12570
|
#overlay {
|
|
12577
12571
|
width: var(
|
|
12578
12572
|
--vaadin-multi-select-combo-box-overlay-width,
|
|
@@ -12585,25 +12579,25 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12585
12579
|
flex-direction: column;
|
|
12586
12580
|
height: 100%;
|
|
12587
12581
|
}
|
|
12588
|
-
`;
|
|
12582
|
+
`;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`
|
|
12589
12583
|
<div id="backdrop" part="backdrop" hidden></div>
|
|
12590
12584
|
<div part="overlay" id="overlay">
|
|
12591
12585
|
<div part="loader"></div>
|
|
12592
12586
|
<div part="content" id="content"><slot></slot></div>
|
|
12593
12587
|
</div>
|
|
12594
|
-
`}}
|
|
12588
|
+
`}}J(Mp);/**
|
|
12595
12589
|
* @license
|
|
12596
12590
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12597
12591
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12598
|
-
*/const
|
|
12592
|
+
*/const se=class{toString(){return ""}};/**
|
|
12599
12593
|
* @license
|
|
12600
12594
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12601
12595
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12602
|
-
*/function
|
|
12596
|
+
*/function Mt(s,t){return s.split(".").reduce((e,i)=>e?e[i]:void 0,t)}/**
|
|
12603
12597
|
* @license
|
|
12604
12598
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12605
12599
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12606
|
-
*/let
|
|
12600
|
+
*/let Np=0;function _a(){return Np++}/**
|
|
12607
12601
|
* @license
|
|
12608
12602
|
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
12609
12603
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12611,7 +12605,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12611
12605
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12612
12606
|
* Code distributed by Google as part of the polymer project is also
|
|
12613
12607
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12614
|
-
*/let lr=0,
|
|
12608
|
+
*/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;}}};/**
|
|
12615
12609
|
@license
|
|
12616
12610
|
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
12617
12611
|
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12619,7 +12613,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
|
12619
12613
|
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12620
12614
|
Code distributed by Google as part of the polymer project is also
|
|
12621
12615
|
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12622
|
-
*/const
|
|
12616
|
+
*/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)};/**
|
|
12623
12617
|
* @license
|
|
12624
12618
|
* Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
|
12625
12619
|
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
@@ -12627,19 +12621,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12627
12621
|
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
12628
12622
|
* Code distributed by Google as part of the polymer project is also
|
|
12629
12623
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
12630
|
-
*/const dr=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),
|
|
12624
|
+
*/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]);}};/**
|
|
12631
12625
|
* @license
|
|
12632
12626
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12633
12627
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12634
|
-
*/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();}}/**
|
|
12628
|
+
*/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();}}/**
|
|
12635
12629
|
* @license
|
|
12636
12630
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12637
12631
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12638
|
-
*/const
|
|
12632
|
+
*/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}};/**
|
|
12639
12633
|
* @license
|
|
12640
12634
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12641
12635
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12642
|
-
*/class
|
|
12636
|
+
*/class qp extends Hp(y){static get is(){return "vaadin-multi-select-combo-box-scroller"}static get template(){return b`
|
|
12643
12637
|
<style>
|
|
12644
12638
|
:host {
|
|
12645
12639
|
display: block;
|
|
@@ -12666,67 +12660,67 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12666
12660
|
<div id="selector">
|
|
12667
12661
|
<slot></slot>
|
|
12668
12662
|
</div>
|
|
12669
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true");}_isItemSelected(t,e,i){return t instanceof
|
|
12663
|
+
`}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);/**
|
|
12670
12664
|
* @license
|
|
12671
12665
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12672
12666
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12673
|
-
*/function
|
|
12667
|
+
*/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}/**
|
|
12674
12668
|
* @license
|
|
12675
12669
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12676
12670
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12677
|
-
*/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}=
|
|
12671
|
+
*/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}}/**
|
|
12678
12672
|
* @license
|
|
12679
12673
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12680
12674
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12681
|
-
*/class
|
|
12675
|
+
*/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}}/**
|
|
12682
12676
|
* @license
|
|
12683
12677
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12684
12678
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12685
|
-
*/const
|
|
12679
|
+
*/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`");}}};/**
|
|
12686
12680
|
* @license
|
|
12687
12681
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12688
12682
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12689
|
-
*/const
|
|
12683
|
+
*/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();}});/**
|
|
12690
12684
|
* @license
|
|
12691
12685
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12692
12686
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12693
|
-
*/const
|
|
12687
|
+
*/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}});/**
|
|
12694
12688
|
* @license
|
|
12695
12689
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12696
12690
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12697
|
-
*/const lo=
|
|
12691
|
+
*/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){}});/**
|
|
12698
12692
|
* @license
|
|
12699
12693
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12700
12694
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12701
|
-
*/const
|
|
12695
|
+
*/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;}};/**
|
|
12702
12696
|
* @license
|
|
12703
12697
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12704
12698
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12705
|
-
*/function
|
|
12699
|
+
*/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.`);}/**
|
|
12706
12700
|
* @license
|
|
12707
12701
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12708
12702
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12709
|
-
*/const ho=
|
|
12703
|
+
*/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));}});/**
|
|
12710
12704
|
* @license
|
|
12711
12705
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12712
12706
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12713
|
-
*/const co=
|
|
12707
|
+
*/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();}});/**
|
|
12714
12708
|
* @license
|
|
12715
12709
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12716
12710
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12717
|
-
*/class
|
|
12711
|
+
*/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");}}/**
|
|
12718
12712
|
* @license
|
|
12719
12713
|
* Copyright (c) 2015 - 2025 Vaadin Ltd.
|
|
12720
12714
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12721
|
-
*/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());}};/**
|
|
12715
|
+
*/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());}};/**
|
|
12722
12716
|
* @license
|
|
12723
12717
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12724
12718
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12725
|
-
*/const
|
|
12719
|
+
*/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();}};/**
|
|
12726
12720
|
* @license
|
|
12727
12721
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12728
12722
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12729
|
-
*/class
|
|
12723
|
+
*/class Xp extends Kp(Oe(y)){static get is(){return "vaadin-multi-select-combo-box-internal"}static get template(){return b`
|
|
12730
12724
|
<style>
|
|
12731
12725
|
:host([opened]) {
|
|
12732
12726
|
pointer-events: auto;
|
|
@@ -12744,15 +12738,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12744
12738
|
no-vertical-overlap
|
|
12745
12739
|
restore-focus-node="[[inputElement]]"
|
|
12746
12740
|
></vaadin-multi-select-combo-box-overlay>
|
|
12747
|
-
`}}
|
|
12741
|
+
`}}J(Xp);/**
|
|
12748
12742
|
* @license
|
|
12749
12743
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12750
12744
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12751
|
-
*/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
|
|
12745
|
+
*/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.');}};/**
|
|
12752
12746
|
* @license
|
|
12753
12747
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12754
12748
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12755
|
-
*/const
|
|
12749
|
+
*/const Qp=p`
|
|
12756
12750
|
[part='clear-button'] {
|
|
12757
12751
|
display: none;
|
|
12758
12752
|
cursor: default;
|
|
@@ -12769,7 +12763,19 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12769
12763
|
* @license
|
|
12770
12764
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12771
12765
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12772
|
-
*/const
|
|
12766
|
+
*/const Zp=p`
|
|
12767
|
+
[class$='container'] {
|
|
12768
|
+
display: flex;
|
|
12769
|
+
flex-direction: column;
|
|
12770
|
+
min-width: 100%;
|
|
12771
|
+
max-width: 100%;
|
|
12772
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
12773
|
+
}
|
|
12774
|
+
`;/**
|
|
12775
|
+
* @license
|
|
12776
|
+
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12777
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12778
|
+
*/const e_=p`
|
|
12773
12779
|
:host {
|
|
12774
12780
|
display: inline-flex;
|
|
12775
12781
|
outline: none;
|
|
@@ -12807,125 +12813,113 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12807
12813
|
* @license
|
|
12808
12814
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12809
12815
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12810
|
-
*/const
|
|
12811
|
-
[class$='container'] {
|
|
12812
|
-
display: flex;
|
|
12813
|
-
flex-direction: column;
|
|
12814
|
-
min-width: 100%;
|
|
12815
|
-
max-width: 100%;
|
|
12816
|
-
width: var(--vaadin-field-default-width, 12em);
|
|
12817
|
-
}
|
|
12818
|
-
`;/**
|
|
12819
|
-
* @license
|
|
12820
|
-
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12821
|
-
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12822
|
-
*/const Xp=[Gp,Kp,Yp];/**
|
|
12816
|
+
*/const t_=[e_,Zp,Qp];/**
|
|
12823
12817
|
* @license
|
|
12824
12818
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12825
12819
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12826
|
-
*/const
|
|
12820
|
+
*/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);}/**
|
|
12827
12821
|
* @license
|
|
12828
12822
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12829
12823
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12830
|
-
*/const
|
|
12824
|
+
*/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){}});/**
|
|
12831
12825
|
* @license
|
|
12832
12826
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12833
12827
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12834
|
-
*/class
|
|
12828
|
+
*/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;}}/**
|
|
12835
12829
|
* @license
|
|
12836
12830
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12837
12831
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12838
|
-
*/class
|
|
12832
|
+
*/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)));});}}/**
|
|
12839
12833
|
* @license
|
|
12840
12834
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12841
12835
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12842
|
-
*/class
|
|
12836
|
+
*/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}}));}}/**
|
|
12843
12837
|
* @license
|
|
12844
12838
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12845
12839
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12846
|
-
*/const
|
|
12840
|
+
*/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}};/**
|
|
12847
12841
|
* @license
|
|
12848
12842
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12849
12843
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12850
|
-
*/const
|
|
12844
|
+
*/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");}});/**
|
|
12851
12845
|
* @license
|
|
12852
12846
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12853
12847
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12854
|
-
*/const
|
|
12848
|
+
*/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));});}});/**
|
|
12855
12849
|
* @license
|
|
12856
12850
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12857
12851
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12858
|
-
*/const
|
|
12852
|
+
*/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}));}};/**
|
|
12859
12853
|
* @license
|
|
12860
12854
|
* Copyright (c) 2023 - 2025 Vaadin Ltd.
|
|
12861
12855
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12862
|
-
*/const
|
|
12856
|
+
*/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);}/**
|
|
12863
12857
|
* @license
|
|
12864
12858
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12865
12859
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12866
|
-
*/class
|
|
12860
|
+
*/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")));}}/**
|
|
12867
12861
|
* @license
|
|
12868
12862
|
* Copyright (c) 2022 - 2025 Vaadin Ltd.
|
|
12869
12863
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12870
|
-
*/class po extends
|
|
12864
|
+
*/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);}}/**
|
|
12871
12865
|
* @license
|
|
12872
12866
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12873
12867
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12874
|
-
*/class
|
|
12868
|
+
*/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);}}/**
|
|
12875
12869
|
* @license
|
|
12876
12870
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12877
12871
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12878
|
-
*/class
|
|
12872
|
+
*/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);}}/**
|
|
12879
12873
|
* @license
|
|
12880
12874
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12881
12875
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12882
|
-
*/class
|
|
12876
|
+
*/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);}}/**
|
|
12883
12877
|
* @license
|
|
12884
12878
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12885
12879
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12886
|
-
*/const
|
|
12880
|
+
*/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);}});/**
|
|
12887
12881
|
* @license
|
|
12888
12882
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12889
12883
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12890
|
-
*/const
|
|
12884
|
+
*/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);});}};/**
|
|
12891
12885
|
* @license
|
|
12892
12886
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12893
12887
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12894
|
-
*/const
|
|
12888
|
+
*/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);}});/**
|
|
12895
12889
|
* @license
|
|
12896
12890
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12897
12891
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12898
|
-
*/const
|
|
12892
|
+
*/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}});/**
|
|
12899
12893
|
* @license
|
|
12900
12894
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12901
12895
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12902
|
-
*/const
|
|
12896
|
+
*/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 [`
|
|
12903
12897
|
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
12904
12898
|
font: inherit;
|
|
12905
12899
|
color: inherit;
|
|
12906
12900
|
}
|
|
12907
|
-
`]}_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,
|
|
12901
|
+
`]}_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);}}};/**
|
|
12908
12902
|
* @license
|
|
12909
12903
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12910
12904
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12911
|
-
*/class
|
|
12905
|
+
*/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});}}/**
|
|
12912
12906
|
* @license
|
|
12913
12907
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12914
12908
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12915
|
-
*/class
|
|
12909
|
+
*/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);}}/**
|
|
12916
12910
|
* @license
|
|
12917
12911
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12918
12912
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12919
|
-
*/const
|
|
12913
|
+
*/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,`
|
|
12920
12914
|
${e}[has-value] input::placeholder {
|
|
12921
12915
|
color: transparent !important;
|
|
12922
12916
|
forced-color-adjust: none;
|
|
12923
12917
|
}
|
|
12924
|
-
`]}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
|
|
12918
|
+
`]}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();}};/**
|
|
12925
12919
|
* @license
|
|
12926
12920
|
* Copyright (c) 2021 - 2025 Vaadin Ltd.
|
|
12927
12921
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
12928
|
-
*/
|
|
12922
|
+
*/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`
|
|
12929
12923
|
<div class="vaadin-multi-select-combo-box-container">
|
|
12930
12924
|
<div part="label">
|
|
12931
12925
|
<slot name="label"></slot>
|
|
@@ -12996,7 +12990,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
12996
12990
|
</div>
|
|
12997
12991
|
|
|
12998
12992
|
<slot name="tooltip"></slot>
|
|
12999
|
-
`}}
|
|
12993
|
+
`}}J(A_);f("vaadin-notification-card",p`
|
|
13000
12994
|
:host {
|
|
13001
12995
|
position: relative;
|
|
13002
12996
|
margin: var(--lumo-space-s);
|
|
@@ -13214,11 +13208,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13214
13208
|
* @license
|
|
13215
13209
|
* Copyright 2020 Google LLC
|
|
13216
13210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13217
|
-
*/const
|
|
13211
|
+
*/const E_=(s,t)=>(s==null?void 0:s._$litType$)!==void 0;/**
|
|
13218
13212
|
* @license
|
|
13219
13213
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13220
13214
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13221
|
-
*/class
|
|
13215
|
+
*/class S_ extends On(E(X(y))){static get template(){return b`
|
|
13222
13216
|
<style>
|
|
13223
13217
|
:host {
|
|
13224
13218
|
position: fixed;
|
|
@@ -13285,7 +13279,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13285
13279
|
<div region="bottom-end"><slot name="bottom-end"></slot></div>
|
|
13286
13280
|
</div>
|
|
13287
13281
|
<div region="bottom-stretch"><slot name="bottom-stretch"></slot></div>
|
|
13288
|
-
`}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
|
|
13282
|
+
`}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`
|
|
13289
13283
|
<style>
|
|
13290
13284
|
:host {
|
|
13291
13285
|
display: block;
|
|
@@ -13307,14 +13301,14 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13307
13301
|
<slot></slot>
|
|
13308
13302
|
</div>
|
|
13309
13303
|
</div>
|
|
13310
|
-
`}static get is(){return "vaadin-notification-card"}ready(){super.ready(),this.setAttribute("role","alert"),this.setAttribute("aria-live","polite");}}class
|
|
13304
|
+
`}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`
|
|
13311
13305
|
<style>
|
|
13312
13306
|
:host {
|
|
13313
13307
|
display: none !important;
|
|
13314
13308
|
}
|
|
13315
13309
|
</style>
|
|
13316
13310
|
<vaadin-notification-card theme$="[[_theme]]"> </vaadin-notification-card>
|
|
13317
|
-
`}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
|
|
13311
|
+
`}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`
|
|
13318
13312
|
:host {
|
|
13319
13313
|
-webkit-tap-highlight-color: transparent;
|
|
13320
13314
|
--_lumo-item-selected-icon-display: var(--_lumo-list-box-item-selected-icon-display, block);
|
|
@@ -13328,11 +13322,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13328
13322
|
margin: var(--lumo-space-s) var(--lumo-border-radius-m);
|
|
13329
13323
|
background-color: var(--lumo-contrast-10pct);
|
|
13330
13324
|
}
|
|
13331
|
-
`;f("vaadin-list-box",
|
|
13325
|
+
`;f("vaadin-list-box",Ea,{moduleId:"lumo-list-box"});/**
|
|
13332
13326
|
* @license
|
|
13333
13327
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13334
13328
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13335
|
-
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",
|
|
13329
|
+
*/f("vaadin-select-item",Zs,{moduleId:"lumo-select-item"});f("vaadin-select-list-box",Ea,{moduleId:"lumo-select-list-box"});const T_=p`
|
|
13336
13330
|
:host(:not([theme*='align'])) ::slotted([slot='value']) {
|
|
13337
13331
|
text-align: start;
|
|
13338
13332
|
}
|
|
@@ -13375,7 +13369,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13375
13369
|
--_lumo-selected-item-height: var(--lumo-size-s);
|
|
13376
13370
|
--_lumo-selected-item-padding: 0;
|
|
13377
13371
|
}
|
|
13378
|
-
`;f("vaadin-select",[
|
|
13372
|
+
`;f("vaadin-select",[Pe,T_],{moduleId:"lumo-select"});f("vaadin-select-value-button",p`
|
|
13379
13373
|
:host {
|
|
13380
13374
|
font-family: var(--lumo-font-family);
|
|
13381
13375
|
font-size: var(--vaadin-input-field-value-font-size, var(--lumo-font-size-m));
|
|
@@ -13394,7 +13388,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13394
13388
|
::slotted(*:hover) {
|
|
13395
13389
|
background-color: transparent;
|
|
13396
13390
|
}
|
|
13397
|
-
`,{moduleId:"lumo-select-value-button"});const
|
|
13391
|
+
`,{moduleId:"lumo-select-value-button"});const P_=p`
|
|
13398
13392
|
:host {
|
|
13399
13393
|
--_lumo-item-selected-icon-display: block;
|
|
13400
13394
|
}
|
|
@@ -13430,15 +13424,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13430
13424
|
:host([theme~='align-center']) {
|
|
13431
13425
|
text-align: center;
|
|
13432
13426
|
}
|
|
13433
|
-
`;f("vaadin-select-overlay",[
|
|
13427
|
+
`;f("vaadin-select-overlay",[Bs,P_],{moduleId:"lumo-select-overlay"});/**
|
|
13434
13428
|
* @license
|
|
13435
13429
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13436
13430
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13437
|
-
*/const
|
|
13431
|
+
*/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());}};/**
|
|
13438
13432
|
* @license
|
|
13439
13433
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13440
13434
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13441
|
-
*/class
|
|
13435
|
+
*/class D_ extends O_(E($(y))){static get is(){return "vaadin-select-item"}static get template(){return b`
|
|
13442
13436
|
<style>
|
|
13443
13437
|
:host {
|
|
13444
13438
|
display: inline-block;
|
|
@@ -13452,23 +13446,23 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13452
13446
|
<div part="content">
|
|
13453
13447
|
<slot></slot>
|
|
13454
13448
|
</div>
|
|
13455
|
-
`}ready(){super.ready(),this.setAttribute("role","option");}}
|
|
13449
|
+
`}ready(){super.ready(),this.setAttribute("role","option");}}x(D_);/**
|
|
13456
13450
|
* @license
|
|
13457
13451
|
* Copyright (c) 2021 - 2024 Vaadin Ltd.
|
|
13458
13452
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13459
|
-
*/function
|
|
13453
|
+
*/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;}/**
|
|
13460
13454
|
* @license
|
|
13461
13455
|
* Copyright (c) 2022 - 2024 Vaadin Ltd.
|
|
13462
13456
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13463
|
-
*/const
|
|
13457
|
+
*/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}};/**
|
|
13464
13458
|
* @license
|
|
13465
13459
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13466
13460
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13467
|
-
*/const
|
|
13461
|
+
*/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);}}};/**
|
|
13468
13462
|
* @license
|
|
13469
13463
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13470
13464
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13471
|
-
*/class
|
|
13465
|
+
*/class V_ extends L_(E($(oe(y)))){static get is(){return "vaadin-select-list-box"}static get template(){return b`
|
|
13472
13466
|
<style>
|
|
13473
13467
|
:host {
|
|
13474
13468
|
display: flex;
|
|
@@ -13488,15 +13482,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13488
13482
|
<div part="items">
|
|
13489
13483
|
<slot></slot>
|
|
13490
13484
|
</div>
|
|
13491
|
-
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}
|
|
13485
|
+
`}static get properties(){return {orientation:{readOnly:!0}}}get _scrollerElement(){return this.shadowRoot.querySelector('[part="items"]')}ready(){super.ready(),this.setAttribute("role","listbox");}}x(V_);/**
|
|
13492
13486
|
* @license
|
|
13493
13487
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13494
13488
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13495
|
-
*/const
|
|
13489
|
+
*/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);}}};/**
|
|
13496
13490
|
* @license
|
|
13497
13491
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13498
13492
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13499
|
-
*/const
|
|
13493
|
+
*/const B_=p`
|
|
13500
13494
|
:host {
|
|
13501
13495
|
align-items: flex-start;
|
|
13502
13496
|
justify-content: flex-start;
|
|
@@ -13511,18 +13505,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13511
13505
|
outline: 3px solid;
|
|
13512
13506
|
}
|
|
13513
13507
|
}
|
|
13514
|
-
`;f("vaadin-select-overlay",[
|
|
13508
|
+
`;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`
|
|
13515
13509
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
|
13516
13510
|
<div part="overlay" id="overlay" tabindex="0">
|
|
13517
13511
|
<div part="content" id="content">
|
|
13518
13512
|
<slot></slot>
|
|
13519
13513
|
</div>
|
|
13520
13514
|
</div>
|
|
13521
|
-
`}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);}}}
|
|
13515
|
+
`}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_);/**
|
|
13522
13516
|
* @license
|
|
13523
13517
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13524
13518
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13525
|
-
*/const
|
|
13519
|
+
*/const $_=p`
|
|
13526
13520
|
:host {
|
|
13527
13521
|
display: inline-block;
|
|
13528
13522
|
position: relative;
|
|
@@ -13568,17 +13562,17 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13568
13562
|
* @license
|
|
13569
13563
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13570
13564
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13571
|
-
*/f("vaadin-select-value-button",
|
|
13565
|
+
*/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`
|
|
13572
13566
|
<div class="vaadin-button-container">
|
|
13573
13567
|
<span part="label">
|
|
13574
13568
|
<slot></slot>
|
|
13575
13569
|
</span>
|
|
13576
13570
|
</div>
|
|
13577
|
-
`}}
|
|
13571
|
+
`}}x(H_);/**
|
|
13578
13572
|
* @license
|
|
13579
13573
|
* Copyright (c) 2021 - 2024 Vaadin Ltd..
|
|
13580
13574
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13581
|
-
*/const
|
|
13575
|
+
*/const q_=p`
|
|
13582
13576
|
.sr-only {
|
|
13583
13577
|
border: 0 !important;
|
|
13584
13578
|
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
@@ -13596,15 +13590,15 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13596
13590
|
* @license
|
|
13597
13591
|
* Copyright (c) 2023 - 2024 Vaadin Ltd.
|
|
13598
13592
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13599
|
-
*/class
|
|
13593
|
+
*/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");}});}}/**
|
|
13600
13594
|
* @license
|
|
13601
13595
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13602
13596
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13603
|
-
*/const
|
|
13597
|
+
*/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;})}};/**
|
|
13604
13598
|
* @license
|
|
13605
13599
|
* Copyright (c) 2017 - 2024 Vaadin Ltd.
|
|
13606
13600
|
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
13607
|
-
*/f("vaadin-select",[
|
|
13601
|
+
*/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`
|
|
13608
13602
|
<style>
|
|
13609
13603
|
:host {
|
|
13610
13604
|
position: relative;
|
|
@@ -13657,7 +13651,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
13657
13651
|
<div class="sr-only">
|
|
13658
13652
|
<slot name="sr-label"></slot>
|
|
13659
13653
|
</div>
|
|
13660
|
-
`}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();}}
|
|
13654
|
+
`}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_);
|
|
13661
13655
|
|
|
13662
13656
|
const generalInputCss = ":host{display:block;height:100%}";
|
|
13663
13657
|
const GeneralInputStyle0 = generalInputCss;
|