@everymatrix/player-account-controller-nd 1.53.12 → 1.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/{GeneralLogout-3tCkYOBy.js → GeneralLogout-BtWyed39.js} +1131 -1094
- package/components/GeneralLogout-DfI2_eQe.cjs +8 -0
- package/components/{PlayerAccountBettingHistory-DAOgOPGf.js → PlayerAccountBettingHistory-jlr-NObV.js} +35 -34
- package/components/PlayerAccountBettingHistory-ldAp8-yN.cjs +1 -0
- package/components/{PlayerAccountBiometrics-sCg1trpD.js → PlayerAccountBiometrics-C54a7r-9.js} +1 -1
- package/components/PlayerAccountBiometrics-Cft2jzuJ.cjs +1 -0
- package/components/{PlayerAccountClosureNd-De5JqWgf.js → PlayerAccountClosureNd-BDFuLumd.js} +1 -1
- package/components/PlayerAccountClosureNd-BOdzF3ZS.cjs +1 -0
- package/components/PlayerAccountControllerNd-BZinIfCX.cjs +1 -0
- package/components/{PlayerAccountControllerNd-COEYGY9w.js → PlayerAccountControllerNd-C-2tav1W.js} +417 -400
- package/components/{PlayerAccountGamingLimits-CqTz7Ici.js → PlayerAccountGamingLimits-11hMW47h.js} +3 -3
- package/components/PlayerAccountGamingLimits-EQC_UZag.cjs +1 -0
- package/components/PlayerAccountGamingLimitsConfirmationModal-Ciz1fSFW.cjs +1 -0
- package/components/{PlayerAccountGamingLimitsConfirmationModal-BjoIf8Bc.js → PlayerAccountGamingLimitsConfirmationModal-D-CsaFkg.js} +1 -1
- package/components/{PlayerAccountGamingLimitsGroupEdit-DAdNIZpE.js → PlayerAccountGamingLimitsGroupEdit-CGnoaPKg.js} +16 -16
- package/components/PlayerAccountGamingLimitsGroupEdit-CLjUmEQv.cjs +10 -0
- package/components/{PlayerAccountGamingLimitsHistory2Nd-DhHA1RpB.js → PlayerAccountGamingLimitsHistory2Nd-BEobV_rb.js} +133 -122
- package/components/PlayerAccountGamingLimitsHistory2Nd-ieMEHssX.cjs +1 -0
- package/components/PlayerAccountGamingLimitsInfoCard-Au2vobro.cjs +1 -0
- package/components/{PlayerAccountGamingLimitsInfoCard-Dm4s5EwR.js → PlayerAccountGamingLimitsInfoCard-BKjqkeZR.js} +4 -4
- package/components/PlayerAccountGamingLimitsPage2Gm16Nd-C_v3NfIe.cjs +21 -0
- package/components/{PlayerAccountGamingLimitsPage2Gm16Nd-DKULeWa-.js → PlayerAccountGamingLimitsPage2Gm16Nd-S0iDe8or.js} +874 -843
- package/components/PlayerAccountGamingLimitsPopup-BtbGIQFb.cjs +1 -0
- package/components/{PlayerAccountGamingLimitsPopup-Df_x-yrG.js → PlayerAccountGamingLimitsPopup-gmuszZSb.js} +1 -1
- package/components/{PlayerAccountGamingLimitsWrapper2Nd-DQ3dr7To.js → PlayerAccountGamingLimitsWrapper2Nd-DLlx2k_P.js} +117 -111
- package/components/PlayerAccountGamingLimitsWrapper2Nd-_Ze6bW4r.cjs +1 -0
- package/components/{PlayerAccountGeneralConfirmationModal-Nvr-pqYF.js → PlayerAccountGeneralConfirmationModal-B_nnNCCl.js} +1 -1
- package/components/PlayerAccountGeneralConfirmationModal-xMxALug3.cjs +1 -0
- package/components/PlayerAccountMenuNd-B8H3so10.cjs +1 -0
- package/components/{PlayerAccountMenuNd-z4P33Khe.js → PlayerAccountMenuNd-t6hDlobb.js} +69 -68
- package/components/{PlayerAccountModal-BvKEdvD_.js → PlayerAccountModal-0zGW_PaL.js} +1 -1
- package/components/PlayerAccountModal-BitbPM3Z.cjs +1 -0
- package/components/{PlayerAccountNotifications-BFv2Nw_e.js → PlayerAccountNotifications-CnakmgwG.js} +1 -1
- package/components/PlayerAccountNotifications-DDu6ZWkh.cjs +1 -0
- package/components/PlayerAccountSelfExclusionNd-B5wR57a_.cjs +3828 -0
- package/components/{PlayerAccountSelfExclusionNd-D0XYPrl9.js → PlayerAccountSelfExclusionNd-D1bSwsQ2.js} +1572 -1488
- package/components/{PlayerAccountTimeout-rttX6IYz.js → PlayerAccountTimeout-BrmadDVi.js} +4 -4
- package/components/PlayerAccountTimeout-E-jDJfAE.cjs +1 -0
- package/components/PlayerActiveBonuses-BVQwAh2z.cjs +1 -0
- package/components/{PlayerActiveBonuses-LfCU2WnE.js → PlayerActiveBonuses-DuRJuBww.js} +120 -119
- package/components/{PlayerBonusCard-CbzYE1Iz.js → PlayerBonusCard-Cs7krVbC.js} +2 -2
- package/components/PlayerBonusCard-UTTIEBwb.cjs +1 -0
- package/components/PlayerBonusHistory-DDWO5PPl.cjs +1 -0
- package/components/{PlayerBonusHistory-D61Y7LPQ.js → PlayerBonusHistory-Dw5CWQDm.js} +53 -53
- package/components/{PlayerChangePassword-CtlTmVcf.js → PlayerChangePassword-BkjAcj4x.js} +1 -1
- package/components/PlayerChangePassword-XpKJjnFu.cjs +3 -0
- package/components/{PlayerDeposit-_rTfbSEr.js → PlayerDeposit-D5fEWazq.js} +1 -1
- package/components/PlayerDeposit-Do7vb_4b.cjs +1 -0
- package/components/PlayerGamingHistory-CJOG_M6n.cjs +1 -0
- package/components/{PlayerGamingHistory-szc4XDy6.js → PlayerGamingHistory-DaDCBXVi.js} +388 -375
- package/components/{PlayerPendingWithdrawals-BhEz708_.js → PlayerPendingWithdrawals--vyYysmT.js} +1 -1
- package/components/PlayerPendingWithdrawals-Bu2MOezw.cjs +1 -0
- package/components/{PlayerProfileInfo-BbyV3TvC.js → PlayerProfileInfo-CjhfS-zh.js} +549 -532
- package/components/PlayerProfileInfo-lMeb2jBi.cjs +1 -0
- package/components/{PlayerRealityCheck-DMRjX5t_.js → PlayerRealityCheck-BVS-ZwGk.js} +191 -175
- package/components/PlayerRealityCheck-CA0P_3BC.cjs +1 -0
- package/components/PlayerTransactionHistory-CvZcvyBx.cjs +1 -0
- package/components/{PlayerTransactionHistory-C4ne-FLe.js → PlayerTransactionHistory-Dd5Xk8dK.js} +1 -1
- package/components/PlayerWithdrawal-DxLwjX7x.cjs +1 -0
- package/components/{PlayerWithdrawal-Bn5jvB2N.js → PlayerWithdrawal-ZUk_jlsP.js} +1 -1
- package/es2015/player-account-controller-nd.cjs +1 -0
- package/es2015/player-account-controller-nd.js +16 -0
- package/package.json +33 -12
- package/stencil/active-mixin-59dfae2a-1hMz67mM.cjs +1519 -0
- package/stencil/{active-mixin-59dfae2a-BphP4pp5.js → active-mixin-59dfae2a-CJN1Jc-g.js} +776 -745
- package/stencil/app-globals-0f993ce5-sCt45RkC.cjs +1 -0
- package/stencil/{checkbox-group-input_9-CMFoK7_E.js → checkbox-group-input_9-DQoOMgN8.js} +1942 -1873
- package/stencil/checkbox-group-input_9-DiXERGqn.cjs +4193 -0
- package/stencil/{general-input-DnFPstQP.js → general-input-bzWxIJkt.js} +1 -1
- package/stencil/general-input-fzGwoSoE.cjs +1 -0
- package/stencil/index-062e829b-CpXLBOEz.cjs +1 -0
- package/stencil/{index-062e829b-DAFsZs6D.js → index-062e829b-DPj_pEuI.js} +236 -220
- package/stencil/index-Dyvby5gX.cjs +1 -0
- package/stencil/locale-B5abSHU_.cjs +1 -0
- package/stencil/password-input_2-DvDzz75b.cjs +1248 -0
- package/stencil/{password-input_2-Bb9Q6Fe0.js → password-input_2-Dx1lICIg.js} +154 -136
- package/stencil/player-change-password-gm2-98dcb7bc-CCEw2GA2.cjs +1 -0
- package/stencil/{player-change-password-gm2-98dcb7bc-gLcZhl3S.js → player-change-password-gm2-98dcb7bc-F9HM0T8d.js} +1 -1
- package/stencil/player-change-password-gm2-Cer2RaBb.cjs +1 -0
- package/stencil/player-change-password-gm2-Do4_2F3u.js +25 -0
- package/stencil/{toggle-checkbox-input-CCLW6-uK.js → toggle-checkbox-input-BCrxxTpc.js} +1 -1
- package/stencil/toggle-checkbox-input-BYoIi-jG.cjs +1 -0
- package/stencil/tooltipIcon-ee9760a8-Bd9l1O5C.cjs +1 -0
- package/esnext/player-account-controller-nd.js +0 -14
- package/stencil/player-change-password-gm2-sVfmFhoT.js +0 -7
|
@@ -0,0 +1,1519 @@
|
|
|
1
|
+
"use strict";var yn=Object.defineProperty,bn=Object.defineProperties;var vn=Object.getOwnPropertyDescriptors;var ai=Object.getOwnPropertySymbols;var wn=Object.prototype.hasOwnProperty,An=Object.prototype.propertyIsEnumerable;var li=(i,e,t)=>e in i?yn(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,We=(i,e)=>{for(var t in e||(e={}))wn.call(e,t)&&li(i,t,e[t]);if(ai)for(var t of ai(e))An.call(e,t)&&li(i,t,e[t]);return i},Ke=(i,e)=>bn(i,vn(e));var Je=(i,e,t)=>new Promise((n,s)=>{var r=l=>{try{a(t.next(l))}catch(d){s(d)}},o=l=>{try{a(t.throw(l))}catch(d){s(d)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(i,e)).next())});/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
4
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
5
|
+
*/function Lt(i){const e=customElements.get(i.is);if(!e)customElements.define(i.is,i);else{const t=e.version;t&&i.version&&t===i.version?console.warn(`The component ${i.is} has been loaded twice`):console.error(`Tried to define ${i.is} version ${i.version} when version ${e.version} is already in use. Something will probably break.`)}}/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
8
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
9
|
+
*/class En extends HTMLElement{static get is(){return"vaadin-lumo-styles"}static get version(){return"24.2.9"}}Lt(En);/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2019 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const Ce=window,Rt=Ce.ShadowRoot&&(Ce.ShadyCSS===void 0||Ce.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zt=Symbol(),di=new WeakMap;class Ht{constructor(e,t,n){if(this._$cssResult$=!0,n!==zt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Rt&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=di.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&di.set(t,e))}return e}toString(){return this.cssText}}const Cn=i=>new Ht(typeof i=="string"?i:i+"",void 0,zt),$=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((n,s,r)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[r+1],i[0]);return new Ht(t,i,zt)},xn=(i,e)=>{Rt?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),s=Ce.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)})},ui=Rt?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Cn(t)})(i):i;/**
|
|
14
|
+
* @license
|
|
15
|
+
* Copyright 2017 Google LLC
|
|
16
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
+
*/var Ge;const Te=window,ci=Te.trustedTypes,Pn=ci?ci.emptyScript:"",hi=Te.reactiveElementPolyfillSupport,gt={toAttribute(i,e){switch(e){case Boolean:i=i?Pn:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(n){t=null}}return t}},ss=(i,e)=>e!==i&&(e==e||i==i),Xe={attribute:!0,type:String,converter:gt,reflect:!1,hasChanged:ss},yt="finalized";class B extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const s=this._$Ep(n,t);s!==void 0&&(this._$Ev.set(s,n),e.push(s))}),e}static createProperty(e,t=Xe){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,n,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||Xe}static finalize(){if(this.hasOwnProperty(yt))return!1;this[yt]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of n)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const s of n)t.unshift(ui(s))}else e!==void 0&&t.push(ui(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return xn(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=Xe){var s;const r=this.constructor._$Ep(e,n);if(r!==void 0&&n.reflect===!0){const o=(((s=n.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?n.converter:gt).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var n;const s=this.constructor,r=s._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:gt;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let s=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||ss)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}_$Ej(){return Je(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach((s,r)=>this[r]=s),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(n)):this._$Ek()}catch(s){throw t=!1,this._$Ek(),s}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var s;return(s=n.hostUpdated)===null||s===void 0?void 0:s.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}B[yt]=!0,B.elementProperties=new Map,B.elementStyles=[],B.shadowRootOptions={mode:"open"},hi==null||hi({ReactiveElement:B}),((Ge=Te.reactiveElementVersions)!==null&&Ge!==void 0?Ge:Te.reactiveElementVersions=[]).push("1.6.3");/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2017 Google LLC
|
|
20
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
+
*/var Ze;const Ne=window,W=Ne.trustedTypes,fi=W?W.createPolicy("lit-html",{createHTML:i=>i}):void 0,bt="$lit$",S=`lit$${(Math.random()+"").slice(9)}$`,ns="?"+S,$n=`<${ns}>`,z=document,le=()=>z.createComment(""),de=i=>i===null||typeof i!="object"&&typeof i!="function",rs=Array.isArray,Sn=i=>rs(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",Qe=`[
|
|
22
|
+
\f\r]`,ee=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,pi=/-->/g,_i=/>/g,M=RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^
|
|
23
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),mi=/'/g,gi=/"/g,os=/^(?:script|style|textarea|title)$/i,K=Symbol.for("lit-noChange"),g=Symbol.for("lit-nothing"),yi=new WeakMap,I=z.createTreeWalker(z,129,null,!1);function as(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return fi!==void 0?fi.createHTML(e):e}const Tn=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":"",o=ee;for(let a=0;a<t;a++){const l=i[a];let d,u,c=-1,h=0;for(;h<l.length&&(o.lastIndex=h,u=o.exec(l),u!==null);)h=o.lastIndex,o===ee?u[1]==="!--"?o=pi:u[1]!==void 0?o=_i:u[2]!==void 0?(os.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=M):u[3]!==void 0&&(o=M):o===M?u[0]===">"?(o=s!=null?s:ee,c=-1):u[1]===void 0?c=-2:(c=o.lastIndex-u[2].length,d=u[1],o=u[3]===void 0?M:u[3]==='"'?gi:mi):o===gi||o===mi?o=M:o===pi||o===_i?o=ee:(o=M,s=void 0);const f=o===M&&i[a+1].startsWith("/>")?" ":"";r+=o===ee?l+$n:c>=0?(n.push(d),l.slice(0,c)+bt+l.slice(c)+S+f):l+S+(c===-2?(n.push(void 0),a):f)}return[as(i,r+(i[t]||"<?>")+(e===2?"</svg>":"")),n]};class ue{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,u]=Tn(e,t);if(this.el=ue.createElement(d,n),I.currentNode=this.el.content,t===2){const c=this.el.content,h=c.firstChild;h.remove(),c.append(...h.childNodes)}for(;(s=I.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const h of s.getAttributeNames())if(h.endsWith(bt)||h.startsWith(S)){const f=u[o++];if(c.push(h),f!==void 0){const _=s.getAttribute(f.toLowerCase()+bt).split(S),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:m[2],strings:_,ctor:m[1]==="."?On:m[1]==="?"?kn:m[1]==="@"?In:Re})}else l.push({type:6,index:r})}for(const h of c)s.removeAttribute(h)}if(os.test(s.tagName)){const c=s.textContent.split(S),h=c.length-1;if(h>0){s.textContent=W?W.emptyScript:"";for(let f=0;f<h;f++)s.append(c[f],le()),I.nextNode(),l.push({type:2,index:++r});s.append(c[h],le())}}}else if(s.nodeType===8)if(s.data===ns)l.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(S,c+1))!==-1;)l.push({type:7,index:r}),c+=S.length-1}r++}}static createElement(e,t){const n=z.createElement("template");return n.innerHTML=e,n}}function J(i,e,t=i,n){var s,r,o,a;if(e===K)return e;let l=n!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[n]:t._$Cl;const d=de(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==d&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),d===void 0?l=void 0:(l=new d(i),l._$AT(i,t,n)),n!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[n]=l:t._$Cl=l),l!==void 0&&(e=J(i,l._$AS(i,e.values),l,n)),e}class Nn{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:z).importNode(n,!0);I.currentNode=r;let o=I.nextNode(),a=0,l=0,d=s[0];for(;d!==void 0;){if(a===d.index){let u;d.type===2?u=new ve(o,o.nextSibling,this,e):d.type===1?u=new d.ctor(o,d.name,d.strings,this,e):d.type===6&&(u=new Dn(o,this,e)),this._$AV.push(u),d=s[++l]}a!==(d==null?void 0:d.index)&&(o=I.nextNode(),a++)}return I.currentNode=z,r}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class ve{constructor(e,t,n,s){var r;this.type=2,this._$AH=g,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cp=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=J(this,e,t),de(e)?e===g||e==null||e===""?(this._$AH!==g&&this._$AR(),this._$AH=g):e!==this._$AH&&e!==K&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):Sn(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==g&&de(this._$AH)?this._$AA.nextSibling.data=e:this.$(z.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=ue.createElement(as(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(n);else{const o=new Nn(r,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}_$AC(e){let t=yi.get(e.strings);return t===void 0&&yi.set(e.strings,t=new ue(e)),t}T(e){rs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const r of e)s===t.length?t.push(n=new ve(this.k(le()),this.k(le()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class Re{constructor(e,t,n,s,r){this.type=1,this._$AH=g,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=g}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,s){const r=this.strings;let o=!1;if(r===void 0)e=J(this,e,t,0),o=!de(e)||e!==this._$AH&&e!==K,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=J(this,a[n+l],t,l),d===K&&(d=this._$AH[l]),o||(o=!de(d)||d!==this._$AH[l]),d===g?e=g:e!==g&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!s&&this.j(e)}j(e){e===g?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class On extends Re{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===g?void 0:e}}const Mn=W?W.emptyScript:"";class kn extends Re{constructor(){super(...arguments),this.type=4}j(e){e&&e!==g?this.element.setAttribute(this.name,Mn):this.element.removeAttribute(this.name)}}class In extends Re{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){var n;if((e=(n=J(this,e,t,0))!==null&&n!==void 0?n:g)===K)return;const s=this._$AH,r=e===g&&s!==g||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==g&&(s===g||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class Dn{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){J(this,e)}}const bi=Ne.litHtmlPolyfillSupport;bi==null||bi(ue,ve),((Ze=Ne.litHtmlVersions)!==null&&Ze!==void 0?Ze:Ne.litHtmlVersions=[]).push("2.8.0");const Ln=(i,e,t)=>{var n,s;const r=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let o=r._$litPart$;if(o===void 0){const a=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new ve(e.insertBefore(le(),a),a,void 0,t!=null?t:{})}return o._$AI(i),o};/**
|
|
24
|
+
* @license
|
|
25
|
+
* Copyright 2017 Google LLC
|
|
26
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
+
*/var et,tt;class xe extends B{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Ln(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return K}}xe.finalized=!0,xe._$litElement$=!0,(et=globalThis.litElementHydrateSupport)===null||et===void 0||et.call(globalThis,{LitElement:xe});const vi=globalThis.litElementPolyfillSupport;vi==null||vi({LitElement:xe});((tt=globalThis.litElementVersions)!==null&&tt!==void 0?tt:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
28
|
+
* @license
|
|
29
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
30
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
31
|
+
*/const Rn=i=>class extends i{static get properties(){return{_theme:{type:String,readOnly:!0}}}static get observedAttributes(){return[...super.observedAttributes,"theme"]}attributeChangedCallback(t,n,s){super.attributeChangedCallback(t,n,s),t==="theme"&&this._set_theme(s)}};/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
34
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
35
|
+
*/const ls=[];function ds(i){return i&&Object.prototype.hasOwnProperty.call(i,"__themes")}function zn(i){return ds(customElements.get(i))}function Hn(i=[]){return[i].flat(1/0).filter(e=>e instanceof Ht?!0:(console.warn("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`."),!1))}function ze(i,e,t={}){i&&zn(i)&&console.warn(`The custom element definition for "${i}"
|
|
36
|
+
was finalized before a style module was registered.
|
|
37
|
+
Make sure to add component specific style modules before
|
|
38
|
+
importing the corresponding custom element.`),e=Hn(e),window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.registerStyles(i,e,t):ls.push({themeFor:i,styles:e,include:t.include,moduleId:t.moduleId})}function vt(){return window.Vaadin&&window.Vaadin.styleModules?window.Vaadin.styleModules.getAllThemes():ls}function Un(i,e){return(i||"").split(" ").some(t=>new RegExp(`^${t.split("*").join(".*")}$`,"u").test(e))}function Fn(i=""){let e=0;return i.startsWith("lumo-")||i.startsWith("material-")?e=1:i.startsWith("vaadin-")&&(e=2),e}function us(i){const e=[];return i.include&&[].concat(i.include).forEach(t=>{const n=vt().find(s=>s.moduleId===t);n?e.push(...us(n),...n.styles):console.warn(`Included moduleId ${t} not found in style registry`)},i.styles),e}function Bn(i,e){const t=document.createElement("style");t.innerHTML=i.map(n=>n.cssText).join(`
|
|
39
|
+
`),e.content.appendChild(t)}function Vn(i){const e=`${i}-default-theme`,t=vt().filter(n=>n.moduleId!==e&&Un(n.themeFor,i)).map(n=>Ke(We({},n),{styles:[...us(n),...n.styles],includePriority:Fn(n.moduleId)})).sort((n,s)=>s.includePriority-n.includePriority);return t.length>0?t:vt().filter(n=>n.moduleId===e)}const cs=i=>class extends Rn(i){static finalize(){if(super.finalize(),this.elementStyles)return;const t=this.prototype._template;!t||ds(this)||Bn(this.getStylesForThis(),t)}static finalizeStyles(t){const n=this.getStylesForThis();return t?[...super.finalizeStyles(t),...n]:n}static getStylesForThis(){const t=Object.getPrototypeOf(this.prototype),n=(t?t.constructor.__themes:[])||[];this.__themes=[...n,...Vn(this.is)];const s=this.__themes.flatMap(r=>r.styles);return s.filter((r,o)=>o===s.lastIndexOf(r))}};/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
42
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
43
|
+
*/const hs=(i,...e)=>{const t=document.createElement("style");t.id=i,t.textContent=e.map(n=>n.toString()).join(`
|
|
44
|
+
`).replace(":host","html"),document.head.insertAdjacentElement("afterbegin",t)},He=(i,...e)=>{hs(`lumo-${i}`,e)};/**
|
|
45
|
+
* @license
|
|
46
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
47
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
48
|
+
*/const jn=$`
|
|
49
|
+
:host {
|
|
50
|
+
/* Base (background) */
|
|
51
|
+
--lumo-base-color: #fff;
|
|
52
|
+
|
|
53
|
+
/* Tint */
|
|
54
|
+
--lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
|
|
55
|
+
--lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
|
|
56
|
+
--lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
|
|
57
|
+
--lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
|
|
58
|
+
--lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
|
|
59
|
+
--lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
|
|
60
|
+
--lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
|
|
61
|
+
--lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
|
|
62
|
+
--lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
|
|
63
|
+
--lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
|
|
64
|
+
--lumo-tint: #fff;
|
|
65
|
+
|
|
66
|
+
/* Shade */
|
|
67
|
+
--lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
|
|
68
|
+
--lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
|
|
69
|
+
--lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
|
|
70
|
+
--lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
|
|
71
|
+
--lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
|
|
72
|
+
--lumo-shade-50pct: hsla(214, 45%, 20%, 0.52);
|
|
73
|
+
--lumo-shade-60pct: hsla(214, 43%, 19%, 0.6);
|
|
74
|
+
--lumo-shade-70pct: hsla(214, 42%, 18%, 0.69);
|
|
75
|
+
--lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
|
|
76
|
+
--lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
|
|
77
|
+
--lumo-shade: hsl(214, 35%, 15%);
|
|
78
|
+
|
|
79
|
+
/* Contrast */
|
|
80
|
+
--lumo-contrast-5pct: var(--lumo-shade-5pct);
|
|
81
|
+
--lumo-contrast-10pct: var(--lumo-shade-10pct);
|
|
82
|
+
--lumo-contrast-20pct: var(--lumo-shade-20pct);
|
|
83
|
+
--lumo-contrast-30pct: var(--lumo-shade-30pct);
|
|
84
|
+
--lumo-contrast-40pct: var(--lumo-shade-40pct);
|
|
85
|
+
--lumo-contrast-50pct: var(--lumo-shade-50pct);
|
|
86
|
+
--lumo-contrast-60pct: var(--lumo-shade-60pct);
|
|
87
|
+
--lumo-contrast-70pct: var(--lumo-shade-70pct);
|
|
88
|
+
--lumo-contrast-80pct: var(--lumo-shade-80pct);
|
|
89
|
+
--lumo-contrast-90pct: var(--lumo-shade-90pct);
|
|
90
|
+
--lumo-contrast: var(--lumo-shade);
|
|
91
|
+
|
|
92
|
+
/* Text */
|
|
93
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
94
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
95
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
96
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
97
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
98
|
+
|
|
99
|
+
/* Primary */
|
|
100
|
+
--lumo-primary-color: hsl(214, 100%, 48%);
|
|
101
|
+
--lumo-primary-color-50pct: hsla(214, 100%, 49%, 0.76);
|
|
102
|
+
--lumo-primary-color-10pct: hsla(214, 100%, 60%, 0.13);
|
|
103
|
+
--lumo-primary-text-color: hsl(214, 100%, 43%);
|
|
104
|
+
--lumo-primary-contrast-color: #fff;
|
|
105
|
+
|
|
106
|
+
/* Error */
|
|
107
|
+
--lumo-error-color: hsl(3, 85%, 48%);
|
|
108
|
+
--lumo-error-color-50pct: hsla(3, 85%, 49%, 0.5);
|
|
109
|
+
--lumo-error-color-10pct: hsla(3, 85%, 49%, 0.1);
|
|
110
|
+
--lumo-error-text-color: hsl(3, 89%, 42%);
|
|
111
|
+
--lumo-error-contrast-color: #fff;
|
|
112
|
+
|
|
113
|
+
/* Success */
|
|
114
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
115
|
+
--lumo-success-color-50pct: hsla(145, 72%, 31%, 0.5);
|
|
116
|
+
--lumo-success-color-10pct: hsla(145, 72%, 31%, 0.1);
|
|
117
|
+
--lumo-success-text-color: hsl(145, 85%, 25%);
|
|
118
|
+
--lumo-success-contrast-color: #fff;
|
|
119
|
+
|
|
120
|
+
/* Warning */
|
|
121
|
+
--lumo-warning-color: hsl(48, 100%, 50%);
|
|
122
|
+
--lumo-warning-color-10pct: hsla(48, 100%, 50%, 0.25);
|
|
123
|
+
--lumo-warning-text-color: hsl(32, 100%, 30%);
|
|
124
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* forced-colors mode adjustments */
|
|
128
|
+
@media (forced-colors: active) {
|
|
129
|
+
html {
|
|
130
|
+
--lumo-disabled-text-color: GrayText;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
`;He("color-props",jn);const qn=$`
|
|
134
|
+
[theme~='dark'] {
|
|
135
|
+
/* Base (background) */
|
|
136
|
+
--lumo-base-color: hsl(214, 35%, 21%);
|
|
137
|
+
|
|
138
|
+
/* Tint */
|
|
139
|
+
--lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
|
|
140
|
+
--lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
|
|
141
|
+
--lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
|
|
142
|
+
--lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
|
|
143
|
+
--lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
|
|
144
|
+
--lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
|
|
145
|
+
--lumo-tint-60pct: hsla(214, 82%, 90%, 0.58);
|
|
146
|
+
--lumo-tint-70pct: hsla(214, 87%, 92%, 0.69);
|
|
147
|
+
--lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
|
|
148
|
+
--lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
|
|
149
|
+
--lumo-tint: hsl(214, 100%, 98%);
|
|
150
|
+
|
|
151
|
+
/* Shade */
|
|
152
|
+
--lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
|
|
153
|
+
--lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
|
|
154
|
+
--lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
|
|
155
|
+
--lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
|
|
156
|
+
--lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
|
|
157
|
+
--lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
|
|
158
|
+
--lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
|
|
159
|
+
--lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
|
|
160
|
+
--lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
|
|
161
|
+
--lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
|
|
162
|
+
--lumo-shade: hsl(214, 33%, 13%);
|
|
163
|
+
|
|
164
|
+
/* Contrast */
|
|
165
|
+
--lumo-contrast-5pct: var(--lumo-tint-5pct);
|
|
166
|
+
--lumo-contrast-10pct: var(--lumo-tint-10pct);
|
|
167
|
+
--lumo-contrast-20pct: var(--lumo-tint-20pct);
|
|
168
|
+
--lumo-contrast-30pct: var(--lumo-tint-30pct);
|
|
169
|
+
--lumo-contrast-40pct: var(--lumo-tint-40pct);
|
|
170
|
+
--lumo-contrast-50pct: var(--lumo-tint-50pct);
|
|
171
|
+
--lumo-contrast-60pct: var(--lumo-tint-60pct);
|
|
172
|
+
--lumo-contrast-70pct: var(--lumo-tint-70pct);
|
|
173
|
+
--lumo-contrast-80pct: var(--lumo-tint-80pct);
|
|
174
|
+
--lumo-contrast-90pct: var(--lumo-tint-90pct);
|
|
175
|
+
--lumo-contrast: var(--lumo-tint);
|
|
176
|
+
|
|
177
|
+
/* Text */
|
|
178
|
+
--lumo-header-text-color: var(--lumo-contrast);
|
|
179
|
+
--lumo-body-text-color: var(--lumo-contrast-90pct);
|
|
180
|
+
--lumo-secondary-text-color: var(--lumo-contrast-70pct);
|
|
181
|
+
--lumo-tertiary-text-color: var(--lumo-contrast-50pct);
|
|
182
|
+
--lumo-disabled-text-color: var(--lumo-contrast-30pct);
|
|
183
|
+
|
|
184
|
+
/* Primary */
|
|
185
|
+
--lumo-primary-color: hsl(214, 90%, 48%);
|
|
186
|
+
--lumo-primary-color-50pct: hsla(214, 90%, 70%, 0.69);
|
|
187
|
+
--lumo-primary-color-10pct: hsla(214, 90%, 55%, 0.13);
|
|
188
|
+
--lumo-primary-text-color: hsl(214, 90%, 77%);
|
|
189
|
+
--lumo-primary-contrast-color: #fff;
|
|
190
|
+
|
|
191
|
+
/* Error */
|
|
192
|
+
--lumo-error-color: hsl(3, 79%, 49%);
|
|
193
|
+
--lumo-error-color-50pct: hsla(3, 75%, 62%, 0.5);
|
|
194
|
+
--lumo-error-color-10pct: hsla(3, 75%, 62%, 0.14);
|
|
195
|
+
--lumo-error-text-color: hsl(3, 100%, 80%);
|
|
196
|
+
|
|
197
|
+
/* Success */
|
|
198
|
+
--lumo-success-color: hsl(145, 72%, 30%);
|
|
199
|
+
--lumo-success-color-50pct: hsla(145, 92%, 51%, 0.5);
|
|
200
|
+
--lumo-success-color-10pct: hsla(145, 92%, 51%, 0.1);
|
|
201
|
+
--lumo-success-text-color: hsl(145, 85%, 46%);
|
|
202
|
+
|
|
203
|
+
/* Warning */
|
|
204
|
+
--lumo-warning-color: hsl(43, 100%, 48%);
|
|
205
|
+
--lumo-warning-color-10pct: hsla(40, 100%, 50%, 0.2);
|
|
206
|
+
--lumo-warning-text-color: hsl(45, 100%, 60%);
|
|
207
|
+
--lumo-warning-contrast-color: var(--lumo-shade-90pct);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
html {
|
|
211
|
+
color: var(--lumo-body-text-color);
|
|
212
|
+
background-color: var(--lumo-base-color);
|
|
213
|
+
color-scheme: light;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
[theme~='dark'] {
|
|
217
|
+
color: var(--lumo-body-text-color);
|
|
218
|
+
background-color: var(--lumo-base-color);
|
|
219
|
+
color-scheme: dark;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
h1,
|
|
223
|
+
h2,
|
|
224
|
+
h3,
|
|
225
|
+
h4,
|
|
226
|
+
h5,
|
|
227
|
+
h6 {
|
|
228
|
+
color: var(--lumo-header-text-color);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
a:where(:any-link) {
|
|
232
|
+
color: var(--lumo-primary-text-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
a:not(:any-link) {
|
|
236
|
+
color: var(--lumo-disabled-text-color);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
blockquote {
|
|
240
|
+
color: var(--lumo-secondary-text-color);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
code,
|
|
244
|
+
pre {
|
|
245
|
+
background-color: var(--lumo-contrast-10pct);
|
|
246
|
+
border-radius: var(--lumo-border-radius-m);
|
|
247
|
+
}
|
|
248
|
+
`;ze("",qn,{moduleId:"lumo-color"});/**
|
|
249
|
+
* @license
|
|
250
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
251
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
252
|
+
*/const Yn=$`
|
|
253
|
+
:host {
|
|
254
|
+
--lumo-size-xs: 1.625rem;
|
|
255
|
+
--lumo-size-s: 1.875rem;
|
|
256
|
+
--lumo-size-m: 2.25rem;
|
|
257
|
+
--lumo-size-l: 2.75rem;
|
|
258
|
+
--lumo-size-xl: 3.5rem;
|
|
259
|
+
|
|
260
|
+
/* Icons */
|
|
261
|
+
--lumo-icon-size-s: 1.25em;
|
|
262
|
+
--lumo-icon-size-m: 1.5em;
|
|
263
|
+
--lumo-icon-size-l: 2.25em;
|
|
264
|
+
/* For backwards compatibility */
|
|
265
|
+
--lumo-icon-size: var(--lumo-icon-size-m);
|
|
266
|
+
}
|
|
267
|
+
`;He("sizing-props",Yn);/**
|
|
268
|
+
* @license
|
|
269
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
270
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
271
|
+
*/const Wn=$`
|
|
272
|
+
:host {
|
|
273
|
+
/* Border radius */
|
|
274
|
+
--lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
|
|
275
|
+
--lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
|
|
276
|
+
--lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
|
|
277
|
+
|
|
278
|
+
/* Shadow */
|
|
279
|
+
--lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
|
|
280
|
+
--lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
|
|
281
|
+
--lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
|
|
282
|
+
--lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
|
|
283
|
+
--lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);
|
|
284
|
+
|
|
285
|
+
/* Clickable element cursor */
|
|
286
|
+
--lumo-clickable-cursor: default;
|
|
287
|
+
}
|
|
288
|
+
`;$`
|
|
289
|
+
html {
|
|
290
|
+
--vaadin-checkbox-size: calc(var(--lumo-size-m) / 2);
|
|
291
|
+
--vaadin-radio-button-size: calc(var(--lumo-size-m) / 2);
|
|
292
|
+
--vaadin-input-field-border-radius: var(--lumo-border-radius-m);
|
|
293
|
+
}
|
|
294
|
+
`;He("style-props",Wn);/**
|
|
295
|
+
* @license
|
|
296
|
+
* Copyright (c) 2017 - 2023 Vaadin Ltd.
|
|
297
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
298
|
+
*/const Kn=$`
|
|
299
|
+
:host {
|
|
300
|
+
/* prettier-ignore */
|
|
301
|
+
--lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
|
|
302
|
+
|
|
303
|
+
/* Font sizes */
|
|
304
|
+
--lumo-font-size-xxs: 0.75rem;
|
|
305
|
+
--lumo-font-size-xs: 0.8125rem;
|
|
306
|
+
--lumo-font-size-s: 0.875rem;
|
|
307
|
+
--lumo-font-size-m: 1rem;
|
|
308
|
+
--lumo-font-size-l: 1.125rem;
|
|
309
|
+
--lumo-font-size-xl: 1.375rem;
|
|
310
|
+
--lumo-font-size-xxl: 1.75rem;
|
|
311
|
+
--lumo-font-size-xxxl: 2.5rem;
|
|
312
|
+
|
|
313
|
+
/* Line heights */
|
|
314
|
+
--lumo-line-height-xs: 1.25;
|
|
315
|
+
--lumo-line-height-s: 1.375;
|
|
316
|
+
--lumo-line-height-m: 1.625;
|
|
317
|
+
}
|
|
318
|
+
`,Jn=$`
|
|
319
|
+
body,
|
|
320
|
+
:host {
|
|
321
|
+
font-family: var(--lumo-font-family);
|
|
322
|
+
font-size: var(--lumo-font-size-m);
|
|
323
|
+
line-height: var(--lumo-line-height-m);
|
|
324
|
+
-webkit-text-size-adjust: 100%;
|
|
325
|
+
-webkit-font-smoothing: antialiased;
|
|
326
|
+
-moz-osx-font-smoothing: grayscale;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
small,
|
|
330
|
+
[theme~='font-size-s'] {
|
|
331
|
+
font-size: var(--lumo-font-size-s);
|
|
332
|
+
line-height: var(--lumo-line-height-s);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
[theme~='font-size-xs'] {
|
|
336
|
+
font-size: var(--lumo-font-size-xs);
|
|
337
|
+
line-height: var(--lumo-line-height-xs);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
341
|
+
font-weight: 600;
|
|
342
|
+
line-height: var(--lumo-line-height-xs);
|
|
343
|
+
margin-block: 0;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
:where(h1) {
|
|
347
|
+
font-size: var(--lumo-font-size-xxxl);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
:where(h2) {
|
|
351
|
+
font-size: var(--lumo-font-size-xxl);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
:where(h3) {
|
|
355
|
+
font-size: var(--lumo-font-size-xl);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:where(h4) {
|
|
359
|
+
font-size: var(--lumo-font-size-l);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
:where(h5) {
|
|
363
|
+
font-size: var(--lumo-font-size-m);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
:where(h6) {
|
|
367
|
+
font-size: var(--lumo-font-size-xs);
|
|
368
|
+
text-transform: uppercase;
|
|
369
|
+
letter-spacing: 0.03em;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
p,
|
|
373
|
+
blockquote {
|
|
374
|
+
margin-top: 0.5em;
|
|
375
|
+
margin-bottom: 0.75em;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
a {
|
|
379
|
+
text-decoration: none;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
a:where(:any-link):hover {
|
|
383
|
+
text-decoration: underline;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
hr {
|
|
387
|
+
display: block;
|
|
388
|
+
align-self: stretch;
|
|
389
|
+
height: 1px;
|
|
390
|
+
border: 0;
|
|
391
|
+
padding: 0;
|
|
392
|
+
margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
|
|
393
|
+
background-color: var(--lumo-contrast-10pct);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
blockquote {
|
|
397
|
+
border-left: 2px solid var(--lumo-contrast-30pct);
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
b,
|
|
401
|
+
strong {
|
|
402
|
+
font-weight: 600;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/* RTL specific styles */
|
|
406
|
+
blockquote[dir='rtl'] {
|
|
407
|
+
border-left: none;
|
|
408
|
+
border-right: 2px solid var(--lumo-contrast-30pct);
|
|
409
|
+
}
|
|
410
|
+
`;ze("",Jn,{moduleId:"lumo-typography"});He("typography-props",Kn);ze("vaadin-input-container",$`
|
|
411
|
+
:host {
|
|
412
|
+
background-color: var(--lumo-contrast-10pct);
|
|
413
|
+
padding: 0 calc(0.375em + var(--_input-container-radius) / 4 - 1px);
|
|
414
|
+
font-weight: 500;
|
|
415
|
+
line-height: 1;
|
|
416
|
+
position: relative;
|
|
417
|
+
cursor: text;
|
|
418
|
+
box-sizing: border-box;
|
|
419
|
+
border-radius:
|
|
420
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius#syntax */
|
|
421
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
422
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
423
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius))
|
|
424
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius));
|
|
425
|
+
/* Fallback */
|
|
426
|
+
--_input-container-radius: var(--vaadin-input-field-border-radius, var(--lumo-border-radius-m));
|
|
427
|
+
/* Default field border color */
|
|
428
|
+
--_input-border-color: var(--vaadin-input-field-border-color, var(--lumo-contrast-50pct));
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
:host([dir='rtl']) {
|
|
432
|
+
border-radius:
|
|
433
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
434
|
+
var(--vaadin-input-field-top-end-radius, var(--_input-container-radius))
|
|
435
|
+
var(--vaadin-input-field-top-start-radius, var(--_input-container-radius))
|
|
436
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_input-container-radius))
|
|
437
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_input-container-radius));
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/* Used for hover and activation effects */
|
|
441
|
+
:host::after {
|
|
442
|
+
content: '';
|
|
443
|
+
position: absolute;
|
|
444
|
+
inset: 0;
|
|
445
|
+
border-radius: inherit;
|
|
446
|
+
pointer-events: none;
|
|
447
|
+
background-color: var(--lumo-contrast-50pct);
|
|
448
|
+
opacity: 0;
|
|
449
|
+
transition: transform 0.15s, opacity 0.2s;
|
|
450
|
+
transform-origin: 100% 0;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
::slotted(:not([slot$='fix'])) {
|
|
454
|
+
cursor: inherit;
|
|
455
|
+
min-height: var(--lumo-text-field-size, var(--lumo-size-m));
|
|
456
|
+
padding: 0 0.25em;
|
|
457
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
|
|
458
|
+
-webkit-mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
459
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Read-only */
|
|
463
|
+
:host([readonly]) {
|
|
464
|
+
color: var(--lumo-secondary-text-color);
|
|
465
|
+
background-color: transparent;
|
|
466
|
+
cursor: default;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
:host([readonly])::after {
|
|
470
|
+
background-color: transparent;
|
|
471
|
+
opacity: 1;
|
|
472
|
+
border: 1px dashed var(--lumo-contrast-30pct);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
/* Disabled */
|
|
476
|
+
:host([disabled]) {
|
|
477
|
+
background-color: var(--lumo-contrast-5pct);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
:host([disabled]) ::slotted(*) {
|
|
481
|
+
color: var(--lumo-disabled-text-color);
|
|
482
|
+
-webkit-text-fill-color: var(--lumo-disabled-text-color);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/* Invalid */
|
|
486
|
+
:host([invalid]) {
|
|
487
|
+
background-color: var(--lumo-error-color-10pct);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
:host([invalid])::after {
|
|
491
|
+
background-color: var(--lumo-error-color-50pct);
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
/* Slotted icons */
|
|
495
|
+
::slotted(vaadin-icon) {
|
|
496
|
+
color: var(--lumo-contrast-60pct);
|
|
497
|
+
width: var(--lumo-icon-size-m);
|
|
498
|
+
height: var(--lumo-icon-size-m);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
/* Vaadin icons are based on a 16x16 grid (unlike Lumo and Material icons with 24x24), so they look too big by default */
|
|
502
|
+
::slotted(vaadin-icon[icon^='vaadin:']) {
|
|
503
|
+
padding: 0.25em;
|
|
504
|
+
box-sizing: border-box !important;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/* Text align */
|
|
508
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
509
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent, #000 1.25em);
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
@-moz-document url-prefix() {
|
|
513
|
+
:host([dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
514
|
+
mask-image: var(--_lumo-text-field-overflow-mask-image);
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
519
|
+
text-align: start;
|
|
520
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
:host([theme~='align-center']) ::slotted(:not([slot$='fix'])) {
|
|
524
|
+
text-align: center;
|
|
525
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
529
|
+
text-align: end;
|
|
530
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@-moz-document url-prefix() {
|
|
534
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
535
|
+
:host([theme~='align-right']) ::slotted(:not([slot$='fix'])) {
|
|
536
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
@-moz-document url-prefix() {
|
|
541
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
542
|
+
:host([theme~='align-left']) ::slotted(:not([slot$='fix'])) {
|
|
543
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
/* RTL specific styles */
|
|
548
|
+
:host([dir='rtl'])::after {
|
|
549
|
+
transform-origin: 0% 0;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
553
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
:host([theme~='align-center'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
557
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
561
|
+
--_lumo-text-field-overflow-mask-image: none;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
@-moz-document url-prefix() {
|
|
565
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
566
|
+
:host([theme~='align-right'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
567
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to right, transparent 0.25em, #000 1.5em);
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@-moz-document url-prefix() {
|
|
572
|
+
/* Firefox is smart enough to align overflowing text to right */
|
|
573
|
+
:host([theme~='align-left'][dir='rtl']) ::slotted(:not([slot$='fix'])) {
|
|
574
|
+
--_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent 0.25em, #000 1.5em);
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
`,{moduleId:"lumo-input-container"});/**
|
|
578
|
+
@license
|
|
579
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
580
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
581
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
582
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
583
|
+
Code distributed by Google as part of the polymer project is also
|
|
584
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
585
|
+
*/window.JSCompiler_renameProperty=function(i,e){return i};/**
|
|
586
|
+
@license
|
|
587
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
588
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
589
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
590
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
591
|
+
Code distributed by Google as part of the polymer project is also
|
|
592
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
593
|
+
*/let Gn=/(url\()([^)]*)(\))/g,Xn=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,Ae,E;function ae(i,e){if(i&&Xn.test(i)||i==="//")return i;if(Ae===void 0){Ae=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",Ae=t.href==="http://a/c%20d"}catch(t){}}if(e||(e=document.baseURI||window.location.href),Ae)try{return new URL(i,e).href}catch(t){return i}return E||(E=document.implementation.createHTMLDocument("temp"),E.base=E.createElement("base"),E.head.appendChild(E.base),E.anchor=E.createElement("a"),E.body.appendChild(E.anchor)),E.base.href=e,E.anchor.href=i,E.anchor.href||i}function Ut(i,e){return i.replace(Gn,function(t,n,s,r){return n+"'"+ae(s.replace(/["']/g,""),e)+"'"+r})}function Ft(i){return i.substring(0,i.lastIndexOf("/")+1)}/**
|
|
594
|
+
@license
|
|
595
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
596
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
597
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
598
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
599
|
+
Code distributed by Google as part of the polymer project is also
|
|
600
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
601
|
+
*/const fs=!window.ShadyDOM||!window.ShadyDOM.inUse,Zn=fs&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const i=new CSSStyleSheet;i.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[i],e.shadowRoot.adoptedStyleSheets[0]===i}catch(i){return!1}})();let Qn=window.Polymer&&window.Polymer.rootPath||Ft(document.baseURI||window.location.href),Oe=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,Me=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,er=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,ps=window.Polymer&&window.Polymer.legacyOptimizations||!1,_s=window.Polymer&&window.Polymer.legacyWarnings||!1,tr=window.Polymer&&window.Polymer.syncInitialRender||!1,wt=window.Polymer&&window.Polymer.legacyUndefined||!1,ir=window.Polymer&&window.Polymer.orderedComputed||!1,wi=window.Polymer&&window.Polymer.removeNestedTemplates||!1,sr=window.Polymer&&window.Polymer.fastDomIf||!1,nr=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,rr=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;/**
|
|
602
|
+
@license
|
|
603
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
604
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
605
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
606
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
607
|
+
Code distributed by Google as part of the polymer project is also
|
|
608
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
609
|
+
*/let or=0;const b=function(i){let e=i.__mixinApplications;e||(e=new WeakMap,i.__mixinApplications=e);let t=or++;function n(s){let r=s.__mixinSet;if(r&&r[t])return s;let o=e,a=o.get(s);if(!a){a=i(s),o.set(s,a);let l=Object.create(a.__mixinSet||r||null);l[t]=!0,a.__mixinSet=l}return a}return n};/**
|
|
610
|
+
@license
|
|
611
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
612
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
613
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
614
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
615
|
+
Code distributed by Google as part of the polymer project is also
|
|
616
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
617
|
+
*/let Bt={},ms={};function Ai(i,e){Bt[i]=ms[i.toLowerCase()]=e}function Ei(i){return Bt[i]||ms[i.toLowerCase()]}function ar(i){i.querySelector("style")&&console.warn("dom-module %s has style outside template",i.id)}class ce extends HTMLElement{static get observedAttributes(){return["id"]}static import(e,t){if(e){let n=Ei(e);return n&&t?n.querySelector(t):n}return null}attributeChangedCallback(e,t,n,s){t!==n&&this.register()}get assetpath(){if(!this.__assetpath){const e=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,t=ae(this.getAttribute("assetpath")||"",e.baseURI);this.__assetpath=Ft(t)}return this.__assetpath}register(e){if(e=e||this.id,e){if(Me&&Ei(e)!==void 0)throw Ai(e,null),new Error(`strictTemplatePolicy: dom-module ${e} re-registered`);this.id=e,Ai(e,this),ar(this)}}}ce.prototype.modules=Bt;customElements.define("dom-module",ce);/**
|
|
618
|
+
@license
|
|
619
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
620
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
621
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
622
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
623
|
+
Code distributed by Google as part of the polymer project is also
|
|
624
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
625
|
+
*/const lr="link[rel=import][type~=css]",dr="include",Ci="shady-unscoped";function gs(i){return ce.import(i)}function xi(i){let e=i.body?i.body:i;const t=Ut(e.textContent,i.baseURI),n=document.createElement("style");return n.textContent=t,n}function ur(i){const e=i.trim().split(/\s+/),t=[];for(let n=0;n<e.length;n++)t.push(...cr(e[n]));return t}function cr(i){const e=gs(i);if(!e)return console.warn("Could not find style data in module named",i),[];if(e._styles===void 0){const t=[];t.push(...bs(e));const n=e.querySelector("template");n&&t.push(...ys(n,e.assetpath)),e._styles=t}return e._styles}function ys(i,e){if(!i._styles){const t=[],n=i.content.querySelectorAll("style");for(let s=0;s<n.length;s++){let r=n[s],o=r.getAttribute(dr);o&&t.push(...ur(o).filter(function(a,l,d){return d.indexOf(a)===l})),e&&(r.textContent=Ut(r.textContent,e)),t.push(r)}i._styles=t}return i._styles}function hr(i){let e=gs(i);return e?bs(e):[]}function bs(i){const e=[],t=i.querySelectorAll(lr);for(let n=0;n<t.length;n++){let s=t[n];if(s.import){const r=s.import,o=s.hasAttribute(Ci);if(o&&!r._unscopedStyle){const a=xi(r);a.setAttribute(Ci,""),r._unscopedStyle=a}else r._style||(r._style=xi(r));e.push(o?r._unscopedStyle:r._style)}}return e}/**
|
|
626
|
+
@license
|
|
627
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
628
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
629
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
630
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
631
|
+
Code distributed by Google as part of the polymer project is also
|
|
632
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
633
|
+
*/const N=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?i=>ShadyDOM.patch(i):i=>i;/**
|
|
634
|
+
@license
|
|
635
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
636
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
637
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
638
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
639
|
+
Code distributed by Google as part of the polymer project is also
|
|
640
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
641
|
+
*/function At(i){return i.indexOf(".")>=0}function U(i){let e=i.indexOf(".");return e===-1?i:i.slice(0,e)}function vs(i,e){return i.indexOf(e+".")===0}function he(i,e){return e.indexOf(i+".")===0}function fe(i,e,t){return e+t.slice(i.length)}function fr(i,e){return i===e||vs(i,e)||he(i,e)}function re(i){if(Array.isArray(i)){let e=[];for(let t=0;t<i.length;t++){let n=i[t].toString().split(".");for(let s=0;s<n.length;s++)e.push(n[s])}return e.join(".")}else return i}function ws(i){return Array.isArray(i)?re(i).split("."):i.toString().split(".")}function v(i,e,t){let n=i,s=ws(e);for(let r=0;r<s.length;r++){if(!n)return;let o=s[r];n=n[o]}return t&&(t.path=s.join(".")),n}function Pi(i,e,t){let n=i,s=ws(e),r=s[s.length-1];if(s.length>1){for(let o=0;o<s.length-1;o++){let a=s[o];if(n=n[a],!n)return}n[r]=t}else n[e]=t;return s.join(".")}/**
|
|
642
|
+
@license
|
|
643
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
644
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
645
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
646
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
647
|
+
Code distributed by Google as part of the polymer project is also
|
|
648
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
649
|
+
*/const ke={},pr=/-[a-z]/g,_r=/([A-Z])/g;function As(i){return ke[i]||(ke[i]=i.indexOf("-")<0?i:i.replace(pr,e=>e[1].toUpperCase()))}function Ue(i){return ke[i]||(ke[i]=i.replace(_r,"-$1").toLowerCase())}/**
|
|
650
|
+
@license
|
|
651
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
652
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
653
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
654
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
655
|
+
Code distributed by Google as part of the polymer project is also
|
|
656
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
657
|
+
*/let mr=0,Es=0,j=[],gr=0,Et=!1,Cs=document.createTextNode("");new window.MutationObserver(yr).observe(Cs,{characterData:!0});function yr(){Et=!1;const i=j.length;for(let e=0;e<i;e++){let t=j[e];if(t)try{t()}catch(n){setTimeout(()=>{throw n})}}j.splice(0,i),Es+=i}const br={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},xs={run(i){return Et||(Et=!0,Cs.textContent=gr++),j.push(i),mr++},cancel(i){const e=i-Es;if(e>=0){if(!j[e])throw new Error("invalid async handle: "+i);j[e]=null}}};/**
|
|
658
|
+
@license
|
|
659
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
660
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
661
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
662
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
663
|
+
Code distributed by Google as part of the polymer project is also
|
|
664
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
665
|
+
*/const vr=xs,Ps=b(i=>{class e extends i{static createProperties(n){const s=this.prototype;for(let r in n)r in s||s._createPropertyAccessor(r)}static attributeNameForProperty(n){return n.toLowerCase()}static typeForProperty(n){}_createPropertyAccessor(n,s){this._addPropertyToAttributeMap(n),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[n]||(this.__dataHasAccessor[n]=!0,this._definePropertyAccessor(n,s))}_addPropertyToAttributeMap(n){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let s=this.__dataAttributes[n];return s||(s=this.constructor.attributeNameForProperty(n),this.__dataAttributes[s]=n),s}_definePropertyAccessor(n,s){Object.defineProperty(this,n,{get(){return this.__data[n]},set:s?function(){}:function(r){this._setPendingProperty(n,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 n in this.__dataHasAccessor)this.hasOwnProperty(n)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[n]=this[n],delete this[n])}_initializeInstanceProperties(n){Object.assign(this,n)}_setProperty(n,s){this._setPendingProperty(n,s)&&this._invalidateProperties()}_getProperty(n){return this.__data[n]}_setPendingProperty(n,s,r){let o=this.__data[n],a=this._shouldPropertyChange(n,s,o);return a&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(n in this.__dataOld)&&(this.__dataOld[n]=o),this.__data[n]=s,this.__dataPending[n]=s),a}_isPropertyPending(n){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(n))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,vr.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 n=this.__data,s=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(n,s,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(n,s,r)),this.__dataCounter--}_shouldPropertiesChange(n,s,r){return!!s}_propertiesChanged(n,s,r){}_shouldPropertyChange(n,s,r){return r!==s&&(r===r||s===s)}attributeChangedCallback(n,s,r,o){s!==r&&this._attributeToProperty(n,r),super.attributeChangedCallback&&super.attributeChangedCallback(n,s,r,o)}_attributeToProperty(n,s,r){if(!this.__serializing){const o=this.__dataAttributes,a=o&&o[n]||n;this[a]=this._deserializeValue(s,r||this.constructor.typeForProperty(a))}}_propertyToAttribute(n,s,r){this.__serializing=!0,r=arguments.length<3?this[n]:r,this._valueToNodeAttribute(this,r,s||this.constructor.attributeNameForProperty(n)),this.__serializing=!1}_valueToNodeAttribute(n,s,r){const o=this._serializeValue(s);(r==="class"||r==="name"||r==="slot")&&(n=N(n)),o===void 0?n.removeAttribute(r):n.setAttribute(r,o===""&&window.trustedTypes?window.trustedTypes.emptyScript:o)}_serializeValue(n){switch(typeof n){case"boolean":return n?"":void 0;default:return n!=null?n.toString():void 0}}_deserializeValue(n,s){switch(s){case Boolean:return n!==null;case Number:return Number(n);default:return n}}}return e});/**
|
|
666
|
+
@license
|
|
667
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
668
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
669
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
670
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
671
|
+
Code distributed by Google as part of the polymer project is also
|
|
672
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
673
|
+
*/const $s={};let Ee=HTMLElement.prototype;for(;Ee;){let i=Object.getOwnPropertyNames(Ee);for(let e=0;e<i.length;e++)$s[i[e]]=!0;Ee=Object.getPrototypeOf(Ee)}const wr=window.trustedTypes?i=>trustedTypes.isHTML(i)||trustedTypes.isScript(i)||trustedTypes.isScriptURL(i):()=>!1;function Ar(i,e){if(!$s[e]){let t=i[e];t!==void 0&&(i.__data?i._setPendingProperty(e,t):(i.__dataProto?i.hasOwnProperty(JSCompiler_renameProperty("__dataProto",i))||(i.__dataProto=Object.create(i.__dataProto)):i.__dataProto={},i.__dataProto[e]=t))}}const Er=b(i=>{const e=Ps(i);class t extends e{static createPropertiesForAttributes(){let s=this.observedAttributes;for(let r=0;r<s.length;r++)this.prototype._createPropertyAccessor(As(s[r]))}static attributeNameForProperty(s){return Ue(s)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(s){for(let r in s)this._setProperty(r,s[r])}_ensureAttribute(s,r){const o=this;o.hasAttribute(s)||this._valueToNodeAttribute(o,r,s)}_serializeValue(s){switch(typeof s){case"object":if(s instanceof Date)return s.toString();if(s){if(wr(s))return s;try{return JSON.stringify(s)}catch(r){return""}}default:return super._serializeValue(s)}}_deserializeValue(s,r){let o;switch(r){case Object:try{o=JSON.parse(s)}catch(a){o=s}break;case Array:try{o=JSON.parse(s)}catch(a){o=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${s}`)}break;case Date:o=isNaN(s)?String(s):Number(s),o=new Date(o);break;default:o=super._deserializeValue(s,r);break}return o}_definePropertyAccessor(s,r){Ar(this,s),super._definePropertyAccessor(s,r)}_hasAccessor(s){return this.__dataHasAccessor&&this.__dataHasAccessor[s]}_isPropertyPending(s){return!!(this.__dataPending&&s in this.__dataPending)}}return t});/**
|
|
674
|
+
@license
|
|
675
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
676
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
677
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
678
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
679
|
+
Code distributed by Google as part of the polymer project is also
|
|
680
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
681
|
+
*/const Cr={"dom-if":!0,"dom-repeat":!0};let $i=!1,Si=!1;function xr(){if(!$i){$i=!0;const i=document.createElement("textarea");i.placeholder="a",Si=i.placeholder===i.textContent}return Si}function Pr(i){xr()&&i.localName==="textarea"&&i.placeholder&&i.placeholder===i.textContent&&(i.textContent=null)}const $r=(()=>{const i=window.trustedTypes&&window.trustedTypes.createPolicy("polymer-template-event-attribute-policy",{createScript:e=>e});return(e,t,n)=>{const s=t.getAttribute(n);if(i&&n.startsWith("on-")){e.setAttribute(n,i.createScript(s,n));return}e.setAttribute(n,s)}})();function Sr(i){let e=i.getAttribute("is");if(e&&Cr[e]){let t=i;for(t.removeAttribute("is"),i=t.ownerDocument.createElement(e),t.parentNode.replaceChild(i,t),i.appendChild(t);t.attributes.length;){const{name:n}=t.attributes[0];$r(i,t,n),t.removeAttribute(n)}}return i}function Ss(i,e){let t=e.parentInfo&&Ss(i,e.parentInfo);if(t){for(let n=t.firstChild,s=0;n;n=n.nextSibling)if(e.parentIndex===s++)return n}else return i}function Tr(i,e,t,n){n.id&&(e[n.id]=t)}function Nr(i,e,t){if(t.events&&t.events.length)for(let n=0,s=t.events,r;n<s.length&&(r=s[n]);n++)i._addMethodEventListenerToNode(e,r.name,r.value,i)}function Or(i,e,t,n){t.templateInfo&&(e._templateInfo=t.templateInfo,e._parentTemplateInfo=n)}function Mr(i,e,t){return i=i._methodHost||i,function(s){i[t]?i[t](s,s.detail):console.warn("listener method `"+t+"` not defined")}}const kr=b(i=>{class e extends i{static _parseTemplate(n,s){if(!n._templateInfo){let r=n._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=!!s,r.stripWhiteSpace=s&&s.stripWhiteSpace||n.hasAttribute&&n.hasAttribute("strip-whitespace"),this._parseTemplateContent(n,r,{parent:null})}return n._templateInfo}static _parseTemplateContent(n,s,r){return this._parseTemplateNode(n.content,s,r)}static _parseTemplateNode(n,s,r){let o=!1,a=n;return a.localName=="template"&&!a.hasAttribute("preserve-content")?o=this._parseTemplateNestedTemplate(a,s,r)||o:a.localName==="slot"&&(s.hasInsertionPoint=!0),Pr(a),a.firstChild&&this._parseTemplateChildNodes(a,s,r),a.hasAttributes&&a.hasAttributes()&&(o=this._parseTemplateNodeAttributes(a,s,r)||o),o||r.noted}static _parseTemplateChildNodes(n,s,r){if(!(n.localName==="script"||n.localName==="style"))for(let o=n.firstChild,a=0,l;o;o=l){if(o.localName=="template"&&(o=Sr(o)),l=o.nextSibling,o.nodeType===Node.TEXT_NODE){let u=l;for(;u&&u.nodeType===Node.TEXT_NODE;)o.textContent+=u.textContent,l=u.nextSibling,n.removeChild(u),u=l;if(s.stripWhiteSpace&&!o.textContent.trim()){n.removeChild(o);continue}}let d={parentIndex:a,parentInfo:r};this._parseTemplateNode(o,s,d)&&(d.infoIndex=s.nodeInfoList.push(d)-1),o.parentNode&&a++}}static _parseTemplateNestedTemplate(n,s,r){let o=n,a=this._parseTemplate(o,s);return(a.content=o.content.ownerDocument.createDocumentFragment()).appendChild(o.content),r.templateInfo=a,!0}static _parseTemplateNodeAttributes(n,s,r){let o=!1,a=Array.from(n.attributes);for(let l=a.length-1,d;d=a[l];l--)o=this._parseTemplateNodeAttribute(n,s,r,d.name,d.value)||o;return o}static _parseTemplateNodeAttribute(n,s,r,o,a){return o.slice(0,3)==="on-"?(n.removeAttribute(o),r.events=r.events||[],r.events.push({name:o.slice(3),value:a}),!0):o==="id"?(r.id=a,!0):!1}static _contentForTemplate(n){let s=n._templateInfo;return s&&s.content||n.content}_stampTemplate(n,s){n&&!n.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),s=s||this.constructor._parseTemplate(n);let r=s.nodeInfoList,o=s.content||n.content,a=document.importNode(o,!0);a.__noInsertionPoint=!s.hasInsertionPoint;let l=a.nodeList=new Array(r.length);a.$={};for(let d=0,u=r.length,c;d<u&&(c=r[d]);d++){let h=l[d]=Ss(a,c);Tr(this,a.$,h,c),Or(this,h,c,s),Nr(this,h,c)}return a=a,a}_addMethodEventListenerToNode(n,s,r,o){o=o||n;let a=Mr(o,s,r);return this._addEventListenerToNode(n,s,a),a}_addEventListenerToNode(n,s,r){n.addEventListener(s,r)}_removeEventListenerFromNode(n,s,r){n.removeEventListener(s,r)}}return e});/**
|
|
682
|
+
* @fileoverview
|
|
683
|
+
* @suppress {checkPrototypalTypes}
|
|
684
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
685
|
+
* This code may only be used under the BSD style license found at
|
|
686
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
687
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
688
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
689
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
690
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
691
|
+
*/let pe=0;const _e=[],p={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ts="__computeInfo",Ir=/[A-Z]/;function it(i,e,t){let n=i[e];if(!n)n=i[e]={};else if(!i.hasOwnProperty(e)&&(n=i[e]=Object.create(i[e]),t))for(let s in n){let r=n[s],o=n[s]=Array(r.length);for(let a=0;a<r.length;a++)o[a]=r[a]}return n}function oe(i,e,t,n,s,r){if(e){let o=!1;const a=pe++;for(let l in t){let d=s?U(l):l,u=e[d];if(u)for(let c=0,h=u.length,f;c<h&&(f=u[c]);c++)(!f.info||f.info.lastRun!==a)&&(!s||Vt(l,f.trigger))&&(f.info&&(f.info.lastRun=a),f.fn(i,l,t,n,f.info,s,r),o=!0)}return o}return!1}function Dr(i,e,t,n,s,r,o,a){let l=!1,d=o?U(n):n,u=e[d];if(u)for(let c=0,h=u.length,f;c<h&&(f=u[c]);c++)(!f.info||f.info.lastRun!==t)&&(!o||Vt(n,f.trigger))&&(f.info&&(f.info.lastRun=t),f.fn(i,n,s,r,f.info,o,a),l=!0);return l}function Vt(i,e){if(e){let t=e.name;return t==i||!!(e.structured&&vs(t,i))||!!(e.wildcard&&he(t,i))}else return!0}function Ti(i,e,t,n,s){let r=typeof s.method=="string"?i[s.method]:s.method,o=s.property;r?r.call(i,i.__data[o],n[o]):s.dynamicFn||console.warn("observer method `"+s.method+"` not defined")}function Lr(i,e,t,n,s){let r=i[p.NOTIFY],o,a=pe++;for(let d in e)e[d]&&(r&&Dr(i,r,a,d,t,n,s)||s&&Rr(i,d,t))&&(o=!0);let l;o&&(l=i.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function Rr(i,e,t){let n=U(e);if(n!==e){let s=Ue(n)+"-changed";return Ns(i,s,t[e],e),!0}return!1}function Ns(i,e,t,n){let s={value:t,queueProperty:!0};n&&(s.path=n),N(i).dispatchEvent(new CustomEvent(e,{detail:s}))}function zr(i,e,t,n,s,r){let a=(r?U(e):e)!=e?e:null,l=a?v(i,a):i.__data[e];a&&l===void 0&&(l=t[e]),Ns(i,s.eventName,l,a)}function Hr(i,e,t,n,s){let r,o=i.detail,a=o&&o.path;a?(n=fe(t,n,a),r=o&&o.value):r=i.currentTarget[t],r=s?!r:r,(!e[p.READ_ONLY]||!e[p.READ_ONLY][n])&&e._setPendingPropertyOrPath(n,r,!0,!!a)&&(!o||!o.queueProperty)&&e._invalidateProperties()}function Ur(i,e,t,n,s){let r=i.__data[e];Oe&&(r=Oe(r,s.attrName,"attribute",i)),i._propertyToAttribute(e,s.attrName,r)}function Fr(i,e,t,n){let s=i[p.COMPUTE];if(s)if(ir){pe++;const r=Vr(i),o=[];for(let l in e)Ni(l,s,o,r,n);let a;for(;a=o.shift();)Os(i,"",e,t,a)&&Ni(a.methodInfo,s,o,r,n);Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),i.__dataPending=null}else{let r=e;for(;oe(i,s,r,t,n);)Object.assign(t,i.__dataOld),Object.assign(e,i.__dataPending),r=i.__dataPending,i.__dataPending=null}}const Br=(i,e,t)=>{let n=0,s=e.length-1,r=-1;for(;n<=s;){const o=n+s>>1,a=t.get(e[o].methodInfo)-t.get(i.methodInfo);if(a<0)n=o+1;else if(a>0)s=o-1;else{r=o;break}}r<0&&(r=s+1),e.splice(r,0,i)},Ni=(i,e,t,n,s)=>{const r=s?U(i):i,o=e[r];if(o)for(let a=0;a<o.length;a++){const l=o[a];l.info.lastRun!==pe&&(!s||Vt(i,l.trigger))&&(l.info.lastRun=pe,Br(l.info,t,n))}};function Vr(i){let e=i.constructor.__orderedComputedDeps;if(!e){e=new Map;const t=i[p.COMPUTE];let{counts:n,ready:s,total:r}=jr(i),o;for(;o=s.shift();){e.set(o,e.size);const a=t[o];a&&a.forEach(l=>{const d=l.info.methodInfo;--r,--n[d]===0&&s.push(d)})}r!==0&&console.warn(`Computed graph for ${i.localName} incomplete; circular?`),i.constructor.__orderedComputedDeps=e}return e}function jr(i){const e=i[Ts],t={},n=i[p.COMPUTE],s=[];let r=0;for(let o in e){const a=e[o];r+=t[o]=a.args.filter(l=>!l.literal).length+(a.dynamicFn?1:0)}for(let o in n)e[o]||s.push(o);return{counts:t,ready:s,total:r}}function Os(i,e,t,n,s){let r=Ct(i,e,t,n,s);if(r===_e)return!1;let o=s.methodInfo;return i.__dataHasAccessor&&i.__dataHasAccessor[o]?i._setPendingProperty(o,r,!0):(i[o]=r,!1)}function qr(i,e,t){let n=i.__dataLinkedPaths;if(n){let s;for(let r in n){let o=n[r];he(r,e)?(s=fe(r,o,e),i._setPendingPropertyOrPath(s,t,!0,!0)):he(o,e)&&(s=fe(o,r,e),i._setPendingPropertyOrPath(s,t,!0,!0))}}}function st(i,e,t,n,s,r,o){t.bindings=t.bindings||[];let a={kind:n,target:s,parts:r,literal:o,isCompound:r.length!==1};if(t.bindings.push(a),Gr(a)){let{event:d,negate:u}=a.parts[0];a.listenerEvent=d||Ue(s)+"-changed",a.listenerNegate=u}let l=e.nodeInfoList.length;for(let d=0;d<a.parts.length;d++){let u=a.parts[d];u.compoundIndex=d,Yr(i,e,a,u,l)}}function Yr(i,e,t,n,s){if(!n.literal)if(t.kind==="attribute"&&t.target[0]==="-")console.warn("Cannot set attribute "+t.target+' because "-" is not a valid attribute starting character');else{let r=n.dependencies,o={index:s,binding:t,part:n,evaluator:i};for(let a=0;a<r.length;a++){let l=r[a];typeof l=="string"&&(l=ks(l),l.wildcard=!0),i._addTemplatePropertyEffect(e,l.rootProperty,{fn:Wr,info:o,trigger:l})}}}function Wr(i,e,t,n,s,r,o){let a=o[s.index],l=s.binding,d=s.part;if(r&&d.source&&e.length>d.source.length&&l.kind=="property"&&!l.isCompound&&a.__isPropertyEffectsClient&&a.__dataHasAccessor&&a.__dataHasAccessor[l.target]){let u=t[e];e=fe(d.source,l.target,e),a._setPendingPropertyOrPath(e,u,!1,!0)&&i._enqueueClient(a)}else{let u=s.evaluator._evaluateBinding(i,d,e,t,n,r);u!==_e&&Kr(i,a,l,d,u)}}function Kr(i,e,t,n,s){if(s=Jr(e,s,t,n),Oe&&(s=Oe(s,t.target,t.kind,e)),t.kind=="attribute")i._valueToNodeAttribute(e,s,t.target);else{let r=t.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[r]?(!e[p.READ_ONLY]||!e[p.READ_ONLY][r])&&e._setPendingProperty(r,s)&&i._enqueueClient(e):i._setUnmanagedPropertyToNode(e,r,s)}}function Jr(i,e,t,n){if(t.isCompound){let s=i.__dataCompoundStorage[t.target];s[n.compoundIndex]=e,e=s.join("")}return t.kind!=="attribute"&&(t.target==="textContent"||t.target==="value"&&(i.localName==="input"||i.localName==="textarea"))&&(e=e==null?"":e),e}function Gr(i){return!!i.target&&i.kind!="attribute"&&i.kind!="text"&&!i.isCompound&&i.parts[0].mode==="{"}function Xr(i,e){let{nodeList:t,nodeInfoList:n}=e;if(n.length)for(let s=0;s<n.length;s++){let r=n[s],o=t[s],a=r.bindings;if(a)for(let l=0;l<a.length;l++){let d=a[l];Zr(o,d),Qr(o,i,d)}o.__dataHost=i}}function Zr(i,e){if(e.isCompound){let t=i.__dataCompoundStorage||(i.__dataCompoundStorage={}),n=e.parts,s=new Array(n.length);for(let o=0;o<n.length;o++)s[o]=n[o].literal;let r=e.target;t[r]=s,e.literal&&e.kind=="property"&&(r==="className"&&(i=N(i)),i[r]=e.literal)}}function Qr(i,e,t){if(t.listenerEvent){let n=t.parts[0];i.addEventListener(t.listenerEvent,function(s){Hr(s,e,t.target,n.source,n.negate)})}}function Oi(i,e,t,n,s,r){r=e.static||r&&(typeof r!="object"||r[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:s,dynamicFn:r};for(let a=0,l;a<e.args.length&&(l=e.args[a]);a++)l.literal||i._addPropertyEffect(l.rootProperty,t,{fn:n,info:o,trigger:l});return r&&i._addPropertyEffect(e.methodName,t,{fn:n,info:o}),o}function Ct(i,e,t,n,s){let r=i._methodHost||i,o=r[s.methodName];if(o){let a=i._marshalArgs(s.args,e,t);return a===_e?_e:o.apply(r,a)}else s.dynamicFn||console.warn("method `"+s.methodName+"` not defined")}const eo=[],Ms="(?:[a-zA-Z_$][\\w.:$\\-*]*)",to="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",io="(?:'(?:[^'\\\\]|\\\\.)*')",so='(?:"(?:[^"\\\\]|\\\\.)*")',no="(?:"+io+"|"+so+")",Mi="(?:("+Ms+"|"+to+"|"+no+")\\s*)",ro="(?:"+Mi+"(?:,\\s*"+Mi+")*)",oo="(?:\\(\\s*(?:"+ro+"?)\\)\\s*)",ao="("+Ms+"\\s*"+oo+"?)",lo="(\\[\\[|{{)\\s*",uo="(?:]]|}})",co="(?:(!)\\s*)?",ho=lo+co+ao+uo,ki=new RegExp(ho,"g");function Ii(i){let e="";for(let t=0;t<i.length;t++){let n=i[t].literal;e+=n||""}return e}function nt(i){let e=i.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let n={methodName:e[1],static:!0,args:eo};if(e[2].trim()){let s=e[2].replace(/\\,/g,",").split(",");return fo(s,n)}else return n}return null}function fo(i,e){return e.args=i.map(function(t){let n=ks(t);return n.literal||(e.static=!1),n},this),e}function ks(i){let e=i.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),t={name:e,value:"",literal:!1},n=e[0];switch(n==="-"&&(n=e[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':t.value=e.slice(1,-1),t.literal=!0;break;case"#":t.value=Number(e),t.literal=!0;break}return t.literal||(t.rootProperty=U(e),t.structured=At(e),t.structured&&(t.wildcard=e.slice(-2)==".*",t.wildcard&&(t.name=e.slice(0,-2)))),t}function Di(i,e,t){let n=v(i,t);return n===void 0&&(n=e[t]),n}function Is(i,e,t,n){const s={indexSplices:n};wt&&!i._overrideLegacyUndefined&&(e.splices=s),i.notifyPath(t+".splices",s),i.notifyPath(t+".length",e.length),wt&&!i._overrideLegacyUndefined&&(s.indexSplices=[])}function te(i,e,t,n,s,r){Is(i,e,t,[{index:n,addedCount:s,removed:r,object:e,type:"splice"}])}function po(i){return i[0].toUpperCase()+i.substring(1)}const Ds=b(i=>{const e=kr(Er(i));class t extends e{constructor(){super(),this.__isPropertyEffectsClient=!0}get PROPERTY_EFFECT_TYPES(){return p}_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(ie.length){let s=ie[ie.length-1];s._enqueueClient(this),this.__dataHost=s}}_initializeProtoProperties(s){this.__data=Object.create(s),this.__dataPending=Object.create(s),this.__dataOld={}}_initializeInstanceProperties(s){let r=this[p.READ_ONLY];for(let o in s)(!r||!r[o])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[o]=this.__dataPending[o]=s[o])}_addPropertyEffect(s,r,o){this._createPropertyAccessor(s,r==p.READ_ONLY);let a=it(this,r,!0)[s];a||(a=this[r][s]=[]),a.push(o)}_removePropertyEffect(s,r,o){let a=it(this,r,!0)[s],l=a.indexOf(o);l>=0&&a.splice(l,1)}_hasPropertyEffect(s,r){let o=this[r];return!!(o&&o[s])}_hasReadOnlyEffect(s){return this._hasPropertyEffect(s,p.READ_ONLY)}_hasNotifyEffect(s){return this._hasPropertyEffect(s,p.NOTIFY)}_hasReflectEffect(s){return this._hasPropertyEffect(s,p.REFLECT)}_hasComputedEffect(s){return this._hasPropertyEffect(s,p.COMPUTE)}_setPendingPropertyOrPath(s,r,o,a){if(a||U(Array.isArray(s)?s[0]:s)!==s){if(!a){let l=v(this,s);if(s=Pi(this,s,r),!s||!super._shouldPropertyChange(s,r,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(s,r,o))return qr(this,s,r),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[s])return this._setPendingProperty(s,r,o);this[s]=r}return!1}_setUnmanagedPropertyToNode(s,r,o){(o!==s[r]||typeof o=="object")&&(r==="className"&&(s=N(s)),s[r]=o)}_setPendingProperty(s,r,o){let a=this.__dataHasPaths&&At(s),l=a?this.__dataTemp:this.__data;return this._shouldPropertyChange(s,r,l[s])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),s in this.__dataOld||(this.__dataOld[s]=this.__data[s]),a?this.__dataTemp[s]=r:this.__data[s]=r,this.__dataPending[s]=r,(a||this[p.NOTIFY]&&this[p.NOTIFY][s])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[s]=o),!0):!1}_setProperty(s,r){this._setPendingProperty(s,r,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(s){this.__dataPendingClients=this.__dataPendingClients||[],s!==this&&this.__dataPendingClients.push(s)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let s=this.__dataPendingClients;if(s){this.__dataPendingClients=null;for(let r=0;r<s.length;r++){let o=s[r];o.__dataEnabled?o.__dataPending&&o._flushProperties():o._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(s,r){for(let o in s)(r||!this[p.READ_ONLY]||!this[p.READ_ONLY][o])&&this._setPendingPropertyOrPath(o,s[o],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(s,r,o){let a=this.__dataHasPaths;this.__dataHasPaths=!1;let l;Fr(this,r,o,a),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(r,o,a),this._flushClients(),oe(this,this[p.REFLECT],r,o,a),oe(this,this[p.OBSERVE],r,o,a),l&&Lr(this,l,r,o,a),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(s,r,o){this[p.PROPAGATE]&&oe(this,this[p.PROPAGATE],s,r,o),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,s,r,o)}_runEffectsForTemplate(s,r,o,a){const l=(d,u)=>{oe(this,s.propertyEffects,d,o,u,s.nodeList);for(let c=s.firstChild;c;c=c.nextSibling)this._runEffectsForTemplate(c,d,o,u)};s.runEffects?s.runEffects(l,r,a):l(r,a)}linkPaths(s,r){s=re(s),r=re(r),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[s]=r}unlinkPaths(s){s=re(s),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[s]}notifySplices(s,r){let o={path:""},a=v(this,s,o);Is(this,a,o.path,r)}get(s,r){return v(r||this,s)}set(s,r,o){o?Pi(o,s,r):(!this[p.READ_ONLY]||!this[p.READ_ONLY][s])&&this._setPendingPropertyOrPath(s,r,!0)&&this._invalidateProperties()}push(s,...r){let o={path:""},a=v(this,s,o),l=a.length,d=a.push(...r);return r.length&&te(this,a,o.path,l,r.length,[]),d}pop(s){let r={path:""},o=v(this,s,r),a=!!o.length,l=o.pop();return a&&te(this,o,r.path,o.length,0,[l]),l}splice(s,r,o,...a){let l={path:""},d=v(this,s,l);r<0?r=d.length-Math.floor(-r):r&&(r=Math.floor(r));let u;return arguments.length===2?u=d.splice(r):u=d.splice(r,o,...a),(a.length||u.length)&&te(this,d,l.path,r,a.length,u),u}shift(s){let r={path:""},o=v(this,s,r),a=!!o.length,l=o.shift();return a&&te(this,o,r.path,0,0,[l]),l}unshift(s,...r){let o={path:""},a=v(this,s,o),l=a.unshift(...r);return r.length&&te(this,a,o.path,0,r.length,[]),l}notifyPath(s,r){let o;if(arguments.length==1){let a={path:""};r=v(this,s,a),o=a.path}else Array.isArray(s)?o=re(s):o=s;this._setPendingPropertyOrPath(o,r,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(s,r){this._addPropertyEffect(s,p.READ_ONLY),r&&(this["_set"+po(s)]=function(o){this._setProperty(s,o)})}_createPropertyObserver(s,r,o){let a={property:s,method:r,dynamicFn:!!o};this._addPropertyEffect(s,p.OBSERVE,{fn:Ti,info:a,trigger:{name:s}}),o&&this._addPropertyEffect(r,p.OBSERVE,{fn:Ti,info:a,trigger:{name:r}})}_createMethodObserver(s,r){let o=nt(s);if(!o)throw new Error("Malformed observer expression '"+s+"'");Oi(this,o,p.OBSERVE,Ct,null,r)}_createNotifyingProperty(s){this._addPropertyEffect(s,p.NOTIFY,{fn:zr,info:{eventName:Ue(s)+"-changed",property:s}})}_createReflectedProperty(s){let r=this.constructor.attributeNameForProperty(s);r[0]==="-"?console.warn("Property "+s+" 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(s,p.REFLECT,{fn:Ur,info:{attrName:r}})}_createComputedProperty(s,r,o){let a=nt(r);if(!a)throw new Error("Malformed computed expression '"+r+"'");const l=Oi(this,a,p.COMPUTE,Os,s,o);it(this,Ts)[s]=l}_marshalArgs(s,r,o){const a=this.__data,l=[];for(let d=0,u=s.length;d<u;d++){let{name:c,structured:h,wildcard:f,value:_,literal:m}=s[d];if(!m)if(f){const C=he(c,r),w=Di(a,o,C?r:c);_={path:C?r:c,value:w,base:C?v(a,c):w}}else _=h?Di(a,o,c):a[c];if(wt&&!this._overrideLegacyUndefined&&_===void 0&&s.length>1)return _e;l[d]=_}return l}static addPropertyEffect(s,r,o){this.prototype._addPropertyEffect(s,r,o)}static createPropertyObserver(s,r,o){this.prototype._createPropertyObserver(s,r,o)}static createMethodObserver(s,r){this.prototype._createMethodObserver(s,r)}static createNotifyingProperty(s){this.prototype._createNotifyingProperty(s)}static createReadOnlyProperty(s,r){this.prototype._createReadOnlyProperty(s,r)}static createReflectedProperty(s){this.prototype._createReflectedProperty(s)}static createComputedProperty(s,r,o){this.prototype._createComputedProperty(s,r,o)}static bindTemplate(s){return this.prototype._bindTemplate(s)}_bindTemplate(s,r){let o=this.constructor._parseTemplate(s),a=this.__preBoundTemplateInfo==o;if(!a)for(let l in o.propertyEffects)this._createPropertyAccessor(l);if(r)if(o=Object.create(o),o.wasPreBound=a,!this.__templateInfo)this.__templateInfo=o;else{const l=s._parentTemplateInfo||this.__templateInfo,d=l.lastChild;o.parent=l,l.lastChild=o,o.previousSibling=d,d?d.nextSibling=o:l.firstChild=o}else this.__preBoundTemplateInfo=o;return o}static _addTemplatePropertyEffect(s,r,o){let a=s.hostProps=s.hostProps||{};a[r]=!0;let l=s.propertyEffects=s.propertyEffects||{};(l[r]=l[r]||[]).push(o)}_stampTemplate(s,r){r=r||this._bindTemplate(s,!0),ie.push(this);let o=super._stampTemplate(s,r);if(ie.pop(),r.nodeList=o.nodeList,!r.wasPreBound){let a=r.childNodes=[];for(let l=o.firstChild;l;l=l.nextSibling)a.push(l)}return o.templateInfo=r,Xr(this,r),this.__dataClientsReady&&(this._runEffectsForTemplate(r,this.__data,null,!1),this._flushClients()),o}_removeBoundDom(s){const r=s.templateInfo,{previousSibling:o,nextSibling:a,parent:l}=r;o?o.nextSibling=a:l&&(l.firstChild=a),a?a.previousSibling=o:l&&(l.lastChild=o),r.nextSibling=r.previousSibling=null;let d=r.childNodes;for(let u=0;u<d.length;u++){let c=d[u];N(N(c).parentNode).removeChild(c)}}static _parseTemplateNode(s,r,o){let a=e._parseTemplateNode.call(this,s,r,o);if(s.nodeType===Node.TEXT_NODE){let l=this._parseBindings(s.textContent,r);l&&(s.textContent=Ii(l)||" ",st(this,r,o,"text","textContent",l),a=!0)}return a}static _parseTemplateNodeAttribute(s,r,o,a,l){let d=this._parseBindings(l,r);if(d){let u=a,c="property";Ir.test(a)?c="attribute":a[a.length-1]=="$"&&(a=a.slice(0,-1),c="attribute");let h=Ii(d);return h&&c=="attribute"&&(a=="class"&&s.hasAttribute("class")&&(h+=" "+s.getAttribute(a)),s.setAttribute(a,h)),c=="attribute"&&u=="disable-upgrade$"&&s.setAttribute(a,""),s.localName==="input"&&u==="value"&&s.setAttribute(u,""),s.removeAttribute(u),c==="property"&&(a=As(a)),st(this,r,o,c,a,d,h),!0}else return e._parseTemplateNodeAttribute.call(this,s,r,o,a,l)}static _parseTemplateNestedTemplate(s,r,o){let a=e._parseTemplateNestedTemplate.call(this,s,r,o);const l=s.parentNode,d=o.templateInfo,u=l.localName==="dom-if",c=l.localName==="dom-repeat";wi&&(u||c)&&(l.removeChild(s),o=o.parentInfo,o.templateInfo=d,o.noted=!0,a=!1);let h=d.hostProps;if(sr&&u)h&&(r.hostProps=Object.assign(r.hostProps||{},h),wi||(o.parentInfo.noted=!0));else{let f="{";for(let _ in h){let m=[{mode:f,source:_,dependencies:[_],hostProp:!0}];st(this,r,o,"property","_host_"+_,m)}}return a}static _parseBindings(s,r){let o=[],a=0,l;for(;(l=ki.exec(s))!==null;){l.index>a&&o.push({literal:s.slice(a,l.index)});let d=l[1][0],u=!!l[2],c=l[3].trim(),h=!1,f="",_=-1;d=="{"&&(_=c.indexOf("::"))>0&&(f=c.substring(_+2),c=c.substring(0,_),h=!0);let m=nt(c),C=[];if(m){let{args:w,methodName:A}=m;for(let Ye=0;Ye<w.length;Ye++){let oi=w[Ye];oi.literal||C.push(oi)}let F=r.dynamicFns;(F&&F[A]||m.static)&&(C.push(A),m.dynamicFn=!0)}else C.push(c);o.push({source:c,mode:d,negate:u,customEvent:h,signature:m,dependencies:C,event:f}),a=ki.lastIndex}if(a&&a<s.length){let d=s.substring(a);d&&o.push({literal:d})}return o.length?o:null}static _evaluateBinding(s,r,o,a,l,d){let u;return r.signature?u=Ct(s,o,a,l,r.signature):o!=r.source?u=v(s,r.source):d&&At(o)?u=v(s,o):u=s.__data[o],r.negate&&(u=!u),u}}return t}),ie=[];/**
|
|
692
|
+
@license
|
|
693
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
694
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
695
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
696
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
697
|
+
Code distributed by Google as part of the polymer project is also
|
|
698
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
699
|
+
*/function _o(i){const e={};for(let t in i){const n=i[t];e[t]=typeof n=="function"?{type:n}:n}return e}const mo=b(i=>{const e=Ps(i);function t(r){const o=Object.getPrototypeOf(r);return o.prototype instanceof s?o:null}function n(r){if(!r.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",r))){let o=null;if(r.hasOwnProperty(JSCompiler_renameProperty("properties",r))){const a=r.properties;a&&(o=_o(a))}r.__ownProperties=o}return r.__ownProperties}class s extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){const o=this._properties;this.__observedAttributes=o?Object.keys(o).map(a=>this.prototype._addPropertyToAttributeMap(a)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const o=t(this);o&&o.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const o=n(this);o&&this.createProperties(o)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const o=t(this);this.__properties=Object.assign({},o&&o._properties,n(this))}return this.__properties}static typeForProperty(o){const a=this._properties[o];return a&&a.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return s});/**
|
|
700
|
+
* @fileoverview
|
|
701
|
+
* @suppress {checkPrototypalTypes}
|
|
702
|
+
* @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
703
|
+
* This code may only be used under the BSD style license found at
|
|
704
|
+
* http://polymer.github.io/LICENSE.txt The complete set of authors may be found
|
|
705
|
+
* at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
|
|
706
|
+
* be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
|
|
707
|
+
* Google as part of the polymer project is also subject to an additional IP
|
|
708
|
+
* rights grant found at http://polymer.github.io/PATENTS.txt
|
|
709
|
+
*/const go="3.5.2",Li=window.ShadyCSS&&window.ShadyCSS.cssBuild,yo=b(i=>{const e=mo(Ds(i));function t(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let d=l._properties;for(let u in d){let c=d[u];"value"in c&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[u]=c)}}return l.__propertyDefaults}function n(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function s(l,d,u,c){u.computed&&(u.readOnly=!0),u.computed&&(l._hasReadOnlyEffect(d)?console.warn(`Cannot redefine computed property '${d}'.`):l._createComputedProperty(d,u.computed,c)),u.readOnly&&!l._hasReadOnlyEffect(d)?l._createReadOnlyProperty(d,!u.computed):u.readOnly===!1&&l._hasReadOnlyEffect(d)&&console.warn(`Cannot make readOnly property '${d}' non-readOnly.`),u.reflectToAttribute&&!l._hasReflectEffect(d)?l._createReflectedProperty(d):u.reflectToAttribute===!1&&l._hasReflectEffect(d)&&console.warn(`Cannot make reflected property '${d}' non-reflected.`),u.notify&&!l._hasNotifyEffect(d)?l._createNotifyingProperty(d):u.notify===!1&&l._hasNotifyEffect(d)&&console.warn(`Cannot make notify property '${d}' non-notify.`),u.observer&&l._createPropertyObserver(d,u.observer,c[u.observer]),l._addPropertyToAttributeMap(d)}function r(l,d,u,c){if(!Li){const h=d.content.querySelectorAll("style"),f=ys(d),_=hr(u),m=d.content.firstElementChild;for(let w=0;w<_.length;w++){let A=_[w];A.textContent=l._processStyleText(A.textContent,c),d.content.insertBefore(A,m)}let C=0;for(let w=0;w<f.length;w++){let A=f[w],F=h[C];F!==A?(A=A.cloneNode(!0),F.parentNode.insertBefore(A,F)):C++,A.textContent=l._processStyleText(A.textContent,c)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(d,u),rr&&Li&&Zn){const h=d.content.querySelectorAll("style");if(h){let f="";Array.from(h).forEach(_=>{f+=_.textContent,_.parentNode.removeChild(_)}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(f)}}}function o(l){let d=null;if(l&&(!Me||er)&&(d=ce.import(l,"template"),Me&&!d))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return d}class a extends e{static get polymerElementVersion(){return go}static _finalizeClass(){e._finalizeClass.call(this);const d=n(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):ps||(d=d.cloneNode(!0))),this.prototype._template=d}static createProperties(d){for(let u in d)s(this.prototype,u,d[u],d)}static createObservers(d,u){const c=this.prototype;for(let h=0;h<d.length;h++)c._createMethodObserver(d[h],u)}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))&&o(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=Ft(d.url);else{const u=ce.import(this.is);this._importPath=u&&u.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=Qn,this.importPath=this.constructor.importPath;let d=t(this.constructor);if(d)for(let u in d){let c=d[u];if(this._canApplyPropertyDefault(u)){let h=typeof c.value=="function"?c.value.call(this):c.value;this._hasAccessor(u)?this._setPendingProperty(u,h,!0):this[u]=h}}}_canApplyPropertyDefault(d){return!this.hasOwnProperty(d)}static _processStyleText(d,u){return Ut(d,u)}static _finalizeTemplate(d){const u=this.prototype._template;if(u&&!u.__polymerFinalized){u.__polymerFinalized=!0;const c=this.importPath,h=c?ae(c):"";r(this,u,d,h),this.prototype._bindTemplate(u)}}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 u=N(this);if(u.attachShadow)return d?(u.shadowRoot||(u.attachShadow({mode:"open",shadyUpgradeFragment:d}),u.shadowRoot.appendChild(d),this.constructor._styleSheet&&(u.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),tr&&window.ShadyDOM&&window.ShadyDOM.flushInitial(u.shadowRoot),u.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,u){return!u&&this.importPath&&(u=ae(this.importPath)),ae(d,u)}static _parseTemplateContent(d,u,c){return u.dynamicFns=u.dynamicFns||this._properties,e._parseTemplateContent.call(this,d,u,c)}static _addTemplatePropertyEffect(d,u,c){return _s&&!(u in this._properties)&&!(c.info.part.signature&&c.info.part.signature.static)&&!c.info.part.hostProp&&!d.nestedTemplate&&console.warn(`Property '${u}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,d,u,c)}}return a});/**
|
|
710
|
+
@license
|
|
711
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
712
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
713
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
714
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
715
|
+
Code distributed by Google as part of the polymer project is also
|
|
716
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
717
|
+
*/const Ri=window.trustedTypes&&trustedTypes.createPolicy("polymer-html-literal",{createHTML:i=>i});class Ls{constructor(e,t){Hs(e,t);const n=t.reduce((s,r,o)=>s+Rs(r)+e[o+1],e[0]);this.value=n.toString()}toString(){return this.value}}function Rs(i){if(i instanceof Ls)return i.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${i}`)}function bo(i){if(i instanceof HTMLTemplateElement)return i.innerHTML;if(i instanceof Ls)return Rs(i);throw new Error(`non-template value passed to Polymer's html function: ${i}`)}const zs=function(e,...t){Hs(e,t);const n=document.createElement("template");let s=t.reduce((r,o,a)=>r+bo(o)+e[a+1],e[0]);return Ri&&(s=Ri.createHTML(s)),n.innerHTML=s,n},Hs=(i,e)=>{if(!Array.isArray(i)||!Array.isArray(i.raw)||e.length!==i.length-1)throw new TypeError("Invalid call to the html template tag")};/**
|
|
718
|
+
@license
|
|
719
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
720
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
721
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
722
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
723
|
+
Code distributed by Google as part of the polymer project is also
|
|
724
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
725
|
+
*/const Us=yo(HTMLElement);/**
|
|
726
|
+
* @license
|
|
727
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
728
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
729
|
+
*/const x=[];function xt(i,e,t=i.getAttribute("dir")){e?i.setAttribute("dir",e):t!=null&&i.removeAttribute("dir")}function Pt(){return document.documentElement.getAttribute("dir")}function vo(){const i=Pt();x.forEach(e=>{xt(e,i)})}const wo=new MutationObserver(vo);wo.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});const jt=i=>class extends i{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0,converter:{fromAttribute:t=>t||"",toAttribute:t=>t===""?null:t}}}}get __isRTL(){return this.getAttribute("dir")==="rtl"}connectedCallback(){super.connectedCallback(),(!this.hasAttribute("dir")||this.__restoreSubscription)&&(this.__subscribe(),xt(this,Pt(),null))}attributeChangedCallback(t,n,s){if(super.attributeChangedCallback(t,n,s),t!=="dir")return;const r=Pt(),o=s===r&&x.indexOf(this)===-1,a=!s&&n&&x.indexOf(this)===-1;o||a?(this.__subscribe(),xt(this,r,s)):s!==r&&n===r&&this.__unsubscribe()}disconnectedCallback(){super.disconnectedCallback(),this.__restoreSubscription=x.includes(this),this.__unsubscribe()}_valueToNodeAttribute(t,n,s){s==="dir"&&n===""&&!t.hasAttribute("dir")||super._valueToNodeAttribute(t,n,s)}_attributeToProperty(t,n,s){t==="dir"&&!n?this.dir="":super._attributeToProperty(t,n,s)}__subscribe(){x.includes(this)||x.push(this)}__unsubscribe(){x.includes(this)&&x.splice(x.indexOf(this),1)}};/**
|
|
730
|
+
* @license
|
|
731
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
732
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
733
|
+
*/class Ao extends cs(jt(Us)){static get is(){return"vaadin-input-container"}static get template(){return zs`
|
|
734
|
+
<style>
|
|
735
|
+
:host {
|
|
736
|
+
display: flex;
|
|
737
|
+
align-items: center;
|
|
738
|
+
flex: 0 1 auto;
|
|
739
|
+
border-radius:
|
|
740
|
+
/* See https://developer.mozilla.org/en-US/docs/Web/CSS/border-radius */
|
|
741
|
+
var(--vaadin-input-field-top-start-radius, var(--__border-radius))
|
|
742
|
+
var(--vaadin-input-field-top-end-radius, var(--__border-radius))
|
|
743
|
+
var(--vaadin-input-field-bottom-end-radius, var(--__border-radius))
|
|
744
|
+
var(--vaadin-input-field-bottom-start-radius, var(--__border-radius));
|
|
745
|
+
--_border-radius: var(--vaadin-input-field-border-radius, 0px);
|
|
746
|
+
--_input-border-width: var(--vaadin-input-field-border-width, 0);
|
|
747
|
+
--_input-border-color: var(--vaadin-input-field-border-color, transparent);
|
|
748
|
+
box-shadow: inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
:host([dir='rtl']) {
|
|
752
|
+
border-radius:
|
|
753
|
+
/* Don't use logical props, see https://github.com/vaadin/vaadin-time-picker/issues/145 */
|
|
754
|
+
var(--vaadin-input-field-top-end-radius, var(--_border-radius))
|
|
755
|
+
var(--vaadin-input-field-top-start-radius, var(--_border-radius))
|
|
756
|
+
var(--vaadin-input-field-bottom-start-radius, var(--_border-radius))
|
|
757
|
+
var(--vaadin-input-field-bottom-end-radius, var(--_border-radius));
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
:host([hidden]) {
|
|
761
|
+
display: none !important;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
/* Reset the native input styles */
|
|
765
|
+
::slotted(input) {
|
|
766
|
+
-webkit-appearance: none;
|
|
767
|
+
-moz-appearance: none;
|
|
768
|
+
flex: auto;
|
|
769
|
+
white-space: nowrap;
|
|
770
|
+
overflow: hidden;
|
|
771
|
+
width: 100%;
|
|
772
|
+
height: 100%;
|
|
773
|
+
outline: none;
|
|
774
|
+
margin: 0;
|
|
775
|
+
padding: 0;
|
|
776
|
+
border: 0;
|
|
777
|
+
border-radius: 0;
|
|
778
|
+
min-width: 0;
|
|
779
|
+
font: inherit;
|
|
780
|
+
line-height: normal;
|
|
781
|
+
color: inherit;
|
|
782
|
+
background-color: transparent;
|
|
783
|
+
/* Disable default invalid style in Firefox */
|
|
784
|
+
box-shadow: none;
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
::slotted(*) {
|
|
788
|
+
flex: none;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
::slotted(:is(input, textarea))::placeholder {
|
|
792
|
+
/* Use ::slotted(input:placeholder-shown) in themes to style the placeholder. */
|
|
793
|
+
/* because ::slotted(...)::placeholder does not work in Safari. */
|
|
794
|
+
font: inherit;
|
|
795
|
+
color: inherit;
|
|
796
|
+
/* Override default opacity in Firefox */
|
|
797
|
+
opacity: 1;
|
|
798
|
+
}
|
|
799
|
+
</style>
|
|
800
|
+
<slot name="prefix"></slot>
|
|
801
|
+
<slot></slot>
|
|
802
|
+
<slot name="suffix"></slot>
|
|
803
|
+
`}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(t=>t.focus&&t.focus())})}}Lt(Ao);const Eo=/\/\*[\*!]\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,Pe=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Co(){function i(){return!0}return Fs(i)}function xo(){try{return Po()?!0:$o()?Pe?!So():!Co():!1}catch(i){return!1}}function Po(){return localStorage.getItem("vaadin.developmentmode.force")}function $o(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function So(){return!!(Pe&&Object.keys(Pe).map(e=>Pe[e]).filter(e=>e.productionMode).length>0)}function Fs(i,e){if(typeof i!="function")return;const t=Eo.exec(i.toString());if(t)try{i=new Function(t[1])}catch(n){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",n)}return i(e)}window.Vaadin=window.Vaadin||{};const zi=function(i,e){if(window.Vaadin.developmentMode)return Fs(i,e)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=xo());function To(){/*! vaadin-dev-mode:start
|
|
804
|
+
(function () {
|
|
805
|
+
'use strict';
|
|
806
|
+
|
|
807
|
+
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
|
808
|
+
return typeof obj;
|
|
809
|
+
} : function (obj) {
|
|
810
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
var classCallCheck = function (instance, Constructor) {
|
|
814
|
+
if (!(instance instanceof Constructor)) {
|
|
815
|
+
throw new TypeError("Cannot call a class as a function");
|
|
816
|
+
}
|
|
817
|
+
};
|
|
818
|
+
|
|
819
|
+
var createClass = function () {
|
|
820
|
+
function defineProperties(target, props) {
|
|
821
|
+
for (var i = 0; i < props.length; i++) {
|
|
822
|
+
var descriptor = props[i];
|
|
823
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
824
|
+
descriptor.configurable = true;
|
|
825
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
826
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
return function (Constructor, protoProps, staticProps) {
|
|
831
|
+
if (protoProps) defineProperties(Constructor.prototype, protoProps);
|
|
832
|
+
if (staticProps) defineProperties(Constructor, staticProps);
|
|
833
|
+
return Constructor;
|
|
834
|
+
};
|
|
835
|
+
}();
|
|
836
|
+
|
|
837
|
+
var getPolymerVersion = function getPolymerVersion() {
|
|
838
|
+
return window.Polymer && window.Polymer.version;
|
|
839
|
+
};
|
|
840
|
+
|
|
841
|
+
var StatisticsGatherer = function () {
|
|
842
|
+
function StatisticsGatherer(logger) {
|
|
843
|
+
classCallCheck(this, StatisticsGatherer);
|
|
844
|
+
|
|
845
|
+
this.now = new Date().getTime();
|
|
846
|
+
this.logger = logger;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
createClass(StatisticsGatherer, [{
|
|
850
|
+
key: 'frameworkVersionDetectors',
|
|
851
|
+
value: function frameworkVersionDetectors() {
|
|
852
|
+
return {
|
|
853
|
+
'Flow': function Flow() {
|
|
854
|
+
if (window.Vaadin && window.Vaadin.Flow && window.Vaadin.Flow.clients) {
|
|
855
|
+
var flowVersions = Object.keys(window.Vaadin.Flow.clients).map(function (key) {
|
|
856
|
+
return window.Vaadin.Flow.clients[key];
|
|
857
|
+
}).filter(function (client) {
|
|
858
|
+
return client.getVersionInfo;
|
|
859
|
+
}).map(function (client) {
|
|
860
|
+
return client.getVersionInfo().flow;
|
|
861
|
+
});
|
|
862
|
+
if (flowVersions.length > 0) {
|
|
863
|
+
return flowVersions[0];
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
},
|
|
867
|
+
'Vaadin Framework': function VaadinFramework() {
|
|
868
|
+
if (window.vaadin && window.vaadin.clients) {
|
|
869
|
+
var frameworkVersions = Object.values(window.vaadin.clients).filter(function (client) {
|
|
870
|
+
return client.getVersionInfo;
|
|
871
|
+
}).map(function (client) {
|
|
872
|
+
return client.getVersionInfo().vaadinVersion;
|
|
873
|
+
});
|
|
874
|
+
if (frameworkVersions.length > 0) {
|
|
875
|
+
return frameworkVersions[0];
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
'AngularJs': function AngularJs() {
|
|
880
|
+
if (window.angular && window.angular.version && window.angular.version) {
|
|
881
|
+
return window.angular.version.full;
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
'Angular': function Angular() {
|
|
885
|
+
if (window.ng) {
|
|
886
|
+
var tags = document.querySelectorAll("[ng-version]");
|
|
887
|
+
if (tags.length > 0) {
|
|
888
|
+
return tags[0].getAttribute("ng-version");
|
|
889
|
+
}
|
|
890
|
+
return "Unknown";
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
'Backbone.js': function BackboneJs() {
|
|
894
|
+
if (window.Backbone) {
|
|
895
|
+
return window.Backbone.VERSION;
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
'React': function React() {
|
|
899
|
+
var reactSelector = '[data-reactroot], [data-reactid]';
|
|
900
|
+
if (!!document.querySelector(reactSelector)) {
|
|
901
|
+
// React does not publish the version by default
|
|
902
|
+
return "unknown";
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
'Ember': function Ember() {
|
|
906
|
+
if (window.Em && window.Em.VERSION) {
|
|
907
|
+
return window.Em.VERSION;
|
|
908
|
+
} else if (window.Ember && window.Ember.VERSION) {
|
|
909
|
+
return window.Ember.VERSION;
|
|
910
|
+
}
|
|
911
|
+
},
|
|
912
|
+
'jQuery': function (_jQuery) {
|
|
913
|
+
function jQuery() {
|
|
914
|
+
return _jQuery.apply(this, arguments);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
jQuery.toString = function () {
|
|
918
|
+
return _jQuery.toString();
|
|
919
|
+
};
|
|
920
|
+
|
|
921
|
+
return jQuery;
|
|
922
|
+
}(function () {
|
|
923
|
+
if (typeof jQuery === 'function' && jQuery.prototype.jquery !== undefined) {
|
|
924
|
+
return jQuery.prototype.jquery;
|
|
925
|
+
}
|
|
926
|
+
}),
|
|
927
|
+
'Polymer': function Polymer() {
|
|
928
|
+
var version = getPolymerVersion();
|
|
929
|
+
if (version) {
|
|
930
|
+
return version;
|
|
931
|
+
}
|
|
932
|
+
},
|
|
933
|
+
'LitElement': function LitElement() {
|
|
934
|
+
var version = window.litElementVersions && window.litElementVersions[0];
|
|
935
|
+
if (version) {
|
|
936
|
+
return version;
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
'LitHtml': function LitHtml() {
|
|
940
|
+
var version = window.litHtmlVersions && window.litHtmlVersions[0];
|
|
941
|
+
if (version) {
|
|
942
|
+
return version;
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
'Vue.js': function VueJs() {
|
|
946
|
+
if (window.Vue) {
|
|
947
|
+
return window.Vue.version;
|
|
948
|
+
}
|
|
949
|
+
}
|
|
950
|
+
};
|
|
951
|
+
}
|
|
952
|
+
}, {
|
|
953
|
+
key: 'getUsedVaadinElements',
|
|
954
|
+
value: function getUsedVaadinElements(elements) {
|
|
955
|
+
var version = getPolymerVersion();
|
|
956
|
+
var elementClasses = void 0;
|
|
957
|
+
// NOTE: In case you edit the code here, YOU MUST UPDATE any statistics reporting code in Flow.
|
|
958
|
+
// Check all locations calling the method getEntries() in
|
|
959
|
+
// https://github.com/vaadin/flow/blob/master/flow-server/src/main/java/com/vaadin/flow/internal/UsageStatistics.java#L106
|
|
960
|
+
// Currently it is only used by BootstrapHandler.
|
|
961
|
+
if (version && version.indexOf('2') === 0) {
|
|
962
|
+
// Polymer 2: components classes are stored in window.Vaadin
|
|
963
|
+
elementClasses = Object.keys(window.Vaadin).map(function (c) {
|
|
964
|
+
return window.Vaadin[c];
|
|
965
|
+
}).filter(function (c) {
|
|
966
|
+
return c.is;
|
|
967
|
+
});
|
|
968
|
+
} else {
|
|
969
|
+
// Polymer 3: components classes are stored in window.Vaadin.registrations
|
|
970
|
+
elementClasses = window.Vaadin.registrations || [];
|
|
971
|
+
}
|
|
972
|
+
elementClasses.forEach(function (klass) {
|
|
973
|
+
var version = klass.version ? klass.version : "0.0.0";
|
|
974
|
+
elements[klass.is] = { version: version };
|
|
975
|
+
});
|
|
976
|
+
}
|
|
977
|
+
}, {
|
|
978
|
+
key: 'getUsedVaadinThemes',
|
|
979
|
+
value: function getUsedVaadinThemes(themes) {
|
|
980
|
+
['Lumo', 'Material'].forEach(function (themeName) {
|
|
981
|
+
var theme;
|
|
982
|
+
var version = getPolymerVersion();
|
|
983
|
+
if (version && version.indexOf('2') === 0) {
|
|
984
|
+
// Polymer 2: themes are stored in window.Vaadin
|
|
985
|
+
theme = window.Vaadin[themeName];
|
|
986
|
+
} else {
|
|
987
|
+
// Polymer 3: themes are stored in custom element registry
|
|
988
|
+
theme = customElements.get('vaadin-' + themeName.toLowerCase() + '-styles');
|
|
989
|
+
}
|
|
990
|
+
if (theme && theme.version) {
|
|
991
|
+
themes[themeName] = { version: theme.version };
|
|
992
|
+
}
|
|
993
|
+
});
|
|
994
|
+
}
|
|
995
|
+
}, {
|
|
996
|
+
key: 'getFrameworks',
|
|
997
|
+
value: function getFrameworks(frameworks) {
|
|
998
|
+
var detectors = this.frameworkVersionDetectors();
|
|
999
|
+
Object.keys(detectors).forEach(function (framework) {
|
|
1000
|
+
var detector = detectors[framework];
|
|
1001
|
+
try {
|
|
1002
|
+
var version = detector();
|
|
1003
|
+
if (version) {
|
|
1004
|
+
frameworks[framework] = { version: version };
|
|
1005
|
+
}
|
|
1006
|
+
} catch (e) {}
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
}, {
|
|
1010
|
+
key: 'gather',
|
|
1011
|
+
value: function gather(storage) {
|
|
1012
|
+
var storedStats = storage.read();
|
|
1013
|
+
var gatheredStats = {};
|
|
1014
|
+
var types = ["elements", "frameworks", "themes"];
|
|
1015
|
+
|
|
1016
|
+
types.forEach(function (type) {
|
|
1017
|
+
gatheredStats[type] = {};
|
|
1018
|
+
if (!storedStats[type]) {
|
|
1019
|
+
storedStats[type] = {};
|
|
1020
|
+
}
|
|
1021
|
+
});
|
|
1022
|
+
|
|
1023
|
+
var previousStats = JSON.stringify(storedStats);
|
|
1024
|
+
|
|
1025
|
+
this.getUsedVaadinElements(gatheredStats.elements);
|
|
1026
|
+
this.getFrameworks(gatheredStats.frameworks);
|
|
1027
|
+
this.getUsedVaadinThemes(gatheredStats.themes);
|
|
1028
|
+
|
|
1029
|
+
var now = this.now;
|
|
1030
|
+
types.forEach(function (type) {
|
|
1031
|
+
var keys = Object.keys(gatheredStats[type]);
|
|
1032
|
+
keys.forEach(function (key) {
|
|
1033
|
+
if (!storedStats[type][key] || _typeof(storedStats[type][key]) != _typeof({})) {
|
|
1034
|
+
storedStats[type][key] = { firstUsed: now };
|
|
1035
|
+
}
|
|
1036
|
+
// Discards any previously logged version number
|
|
1037
|
+
storedStats[type][key].version = gatheredStats[type][key].version;
|
|
1038
|
+
storedStats[type][key].lastUsed = now;
|
|
1039
|
+
});
|
|
1040
|
+
});
|
|
1041
|
+
|
|
1042
|
+
var newStats = JSON.stringify(storedStats);
|
|
1043
|
+
storage.write(newStats);
|
|
1044
|
+
if (newStats != previousStats && Object.keys(storedStats).length > 0) {
|
|
1045
|
+
this.logger.debug("New stats: " + newStats);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
}]);
|
|
1049
|
+
return StatisticsGatherer;
|
|
1050
|
+
}();
|
|
1051
|
+
|
|
1052
|
+
var StatisticsStorage = function () {
|
|
1053
|
+
function StatisticsStorage(key) {
|
|
1054
|
+
classCallCheck(this, StatisticsStorage);
|
|
1055
|
+
|
|
1056
|
+
this.key = key;
|
|
1057
|
+
}
|
|
1058
|
+
|
|
1059
|
+
createClass(StatisticsStorage, [{
|
|
1060
|
+
key: 'read',
|
|
1061
|
+
value: function read() {
|
|
1062
|
+
var localStorageStatsString = localStorage.getItem(this.key);
|
|
1063
|
+
try {
|
|
1064
|
+
return JSON.parse(localStorageStatsString ? localStorageStatsString : '{}');
|
|
1065
|
+
} catch (e) {
|
|
1066
|
+
return {};
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
}, {
|
|
1070
|
+
key: 'write',
|
|
1071
|
+
value: function write(data) {
|
|
1072
|
+
localStorage.setItem(this.key, data);
|
|
1073
|
+
}
|
|
1074
|
+
}, {
|
|
1075
|
+
key: 'clear',
|
|
1076
|
+
value: function clear() {
|
|
1077
|
+
localStorage.removeItem(this.key);
|
|
1078
|
+
}
|
|
1079
|
+
}, {
|
|
1080
|
+
key: 'isEmpty',
|
|
1081
|
+
value: function isEmpty() {
|
|
1082
|
+
var storedStats = this.read();
|
|
1083
|
+
var empty = true;
|
|
1084
|
+
Object.keys(storedStats).forEach(function (key) {
|
|
1085
|
+
if (Object.keys(storedStats[key]).length > 0) {
|
|
1086
|
+
empty = false;
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
|
|
1090
|
+
return empty;
|
|
1091
|
+
}
|
|
1092
|
+
}]);
|
|
1093
|
+
return StatisticsStorage;
|
|
1094
|
+
}();
|
|
1095
|
+
|
|
1096
|
+
var StatisticsSender = function () {
|
|
1097
|
+
function StatisticsSender(url, logger) {
|
|
1098
|
+
classCallCheck(this, StatisticsSender);
|
|
1099
|
+
|
|
1100
|
+
this.url = url;
|
|
1101
|
+
this.logger = logger;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
createClass(StatisticsSender, [{
|
|
1105
|
+
key: 'send',
|
|
1106
|
+
value: function send(data, errorHandler) {
|
|
1107
|
+
var logger = this.logger;
|
|
1108
|
+
|
|
1109
|
+
if (navigator.onLine === false) {
|
|
1110
|
+
logger.debug("Offline, can't send");
|
|
1111
|
+
errorHandler();
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
logger.debug("Sending data to " + this.url);
|
|
1115
|
+
|
|
1116
|
+
var req = new XMLHttpRequest();
|
|
1117
|
+
req.withCredentials = true;
|
|
1118
|
+
req.addEventListener("load", function () {
|
|
1119
|
+
// Stats sent, nothing more to do
|
|
1120
|
+
logger.debug("Response: " + req.responseText);
|
|
1121
|
+
});
|
|
1122
|
+
req.addEventListener("error", function () {
|
|
1123
|
+
logger.debug("Send failed");
|
|
1124
|
+
errorHandler();
|
|
1125
|
+
});
|
|
1126
|
+
req.addEventListener("abort", function () {
|
|
1127
|
+
logger.debug("Send aborted");
|
|
1128
|
+
errorHandler();
|
|
1129
|
+
});
|
|
1130
|
+
req.open("POST", this.url);
|
|
1131
|
+
req.setRequestHeader("Content-Type", "application/json");
|
|
1132
|
+
req.send(data);
|
|
1133
|
+
}
|
|
1134
|
+
}]);
|
|
1135
|
+
return StatisticsSender;
|
|
1136
|
+
}();
|
|
1137
|
+
|
|
1138
|
+
var StatisticsLogger = function () {
|
|
1139
|
+
function StatisticsLogger(id) {
|
|
1140
|
+
classCallCheck(this, StatisticsLogger);
|
|
1141
|
+
|
|
1142
|
+
this.id = id;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
createClass(StatisticsLogger, [{
|
|
1146
|
+
key: '_isDebug',
|
|
1147
|
+
value: function _isDebug() {
|
|
1148
|
+
return localStorage.getItem("vaadin." + this.id + ".debug");
|
|
1149
|
+
}
|
|
1150
|
+
}, {
|
|
1151
|
+
key: 'debug',
|
|
1152
|
+
value: function debug(msg) {
|
|
1153
|
+
if (this._isDebug()) {
|
|
1154
|
+
console.info(this.id + ": " + msg);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}]);
|
|
1158
|
+
return StatisticsLogger;
|
|
1159
|
+
}();
|
|
1160
|
+
|
|
1161
|
+
var UsageStatistics = function () {
|
|
1162
|
+
function UsageStatistics() {
|
|
1163
|
+
classCallCheck(this, UsageStatistics);
|
|
1164
|
+
|
|
1165
|
+
this.now = new Date();
|
|
1166
|
+
this.timeNow = this.now.getTime();
|
|
1167
|
+
this.gatherDelay = 10; // Delay between loading this file and gathering stats
|
|
1168
|
+
this.initialDelay = 24 * 60 * 60;
|
|
1169
|
+
|
|
1170
|
+
this.logger = new StatisticsLogger("statistics");
|
|
1171
|
+
this.storage = new StatisticsStorage("vaadin.statistics.basket");
|
|
1172
|
+
this.gatherer = new StatisticsGatherer(this.logger);
|
|
1173
|
+
this.sender = new StatisticsSender("https://tools.vaadin.com/usage-stats/submit", this.logger);
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
createClass(UsageStatistics, [{
|
|
1177
|
+
key: 'maybeGatherAndSend',
|
|
1178
|
+
value: function maybeGatherAndSend() {
|
|
1179
|
+
var _this = this;
|
|
1180
|
+
|
|
1181
|
+
if (localStorage.getItem(UsageStatistics.optOutKey)) {
|
|
1182
|
+
return;
|
|
1183
|
+
}
|
|
1184
|
+
this.gatherer.gather(this.storage);
|
|
1185
|
+
setTimeout(function () {
|
|
1186
|
+
_this.maybeSend();
|
|
1187
|
+
}, this.gatherDelay * 1000);
|
|
1188
|
+
}
|
|
1189
|
+
}, {
|
|
1190
|
+
key: 'lottery',
|
|
1191
|
+
value: function lottery() {
|
|
1192
|
+
return true;
|
|
1193
|
+
}
|
|
1194
|
+
}, {
|
|
1195
|
+
key: 'currentMonth',
|
|
1196
|
+
value: function currentMonth() {
|
|
1197
|
+
return this.now.getYear() * 12 + this.now.getMonth();
|
|
1198
|
+
}
|
|
1199
|
+
}, {
|
|
1200
|
+
key: 'maybeSend',
|
|
1201
|
+
value: function maybeSend() {
|
|
1202
|
+
var firstUse = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
1203
|
+
var monthProcessed = Number(localStorage.getItem(UsageStatistics.monthProcessedKey));
|
|
1204
|
+
|
|
1205
|
+
if (!firstUse) {
|
|
1206
|
+
// Use a grace period to avoid interfering with tests, incognito mode etc
|
|
1207
|
+
firstUse = this.timeNow;
|
|
1208
|
+
localStorage.setItem(UsageStatistics.firstUseKey, firstUse);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
if (this.timeNow < firstUse + this.initialDelay * 1000) {
|
|
1212
|
+
this.logger.debug("No statistics will be sent until the initial delay of " + this.initialDelay + "s has passed");
|
|
1213
|
+
return;
|
|
1214
|
+
}
|
|
1215
|
+
if (this.currentMonth() <= monthProcessed) {
|
|
1216
|
+
this.logger.debug("This month has already been processed");
|
|
1217
|
+
return;
|
|
1218
|
+
}
|
|
1219
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, this.currentMonth());
|
|
1220
|
+
// Use random sampling
|
|
1221
|
+
if (this.lottery()) {
|
|
1222
|
+
this.logger.debug("Congratulations, we have a winner!");
|
|
1223
|
+
} else {
|
|
1224
|
+
this.logger.debug("Sorry, no stats from you this time");
|
|
1225
|
+
return;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
this.send();
|
|
1229
|
+
}
|
|
1230
|
+
}, {
|
|
1231
|
+
key: 'send',
|
|
1232
|
+
value: function send() {
|
|
1233
|
+
// Ensure we have the latest data
|
|
1234
|
+
this.gatherer.gather(this.storage);
|
|
1235
|
+
|
|
1236
|
+
// Read, send and clean up
|
|
1237
|
+
var data = this.storage.read();
|
|
1238
|
+
data["firstUse"] = Number(localStorage.getItem(UsageStatistics.firstUseKey));
|
|
1239
|
+
data["usageStatisticsVersion"] = UsageStatistics.version;
|
|
1240
|
+
var info = 'This request contains usage statistics gathered from the application running in development mode. \n\nStatistics gathering is automatically disabled and excluded from production builds.\n\nFor details and to opt-out, see https://github.com/vaadin/vaadin-usage-statistics.\n\n\n\n';
|
|
1241
|
+
var self = this;
|
|
1242
|
+
this.sender.send(info + JSON.stringify(data), function () {
|
|
1243
|
+
// Revert the 'month processed' flag
|
|
1244
|
+
localStorage.setItem(UsageStatistics.monthProcessedKey, self.currentMonth() - 1);
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
}], [{
|
|
1248
|
+
key: 'version',
|
|
1249
|
+
get: function get$1() {
|
|
1250
|
+
return '2.1.2';
|
|
1251
|
+
}
|
|
1252
|
+
}, {
|
|
1253
|
+
key: 'firstUseKey',
|
|
1254
|
+
get: function get$1() {
|
|
1255
|
+
return 'vaadin.statistics.firstuse';
|
|
1256
|
+
}
|
|
1257
|
+
}, {
|
|
1258
|
+
key: 'monthProcessedKey',
|
|
1259
|
+
get: function get$1() {
|
|
1260
|
+
return 'vaadin.statistics.monthProcessed';
|
|
1261
|
+
}
|
|
1262
|
+
}, {
|
|
1263
|
+
key: 'optOutKey',
|
|
1264
|
+
get: function get$1() {
|
|
1265
|
+
return 'vaadin.statistics.optout';
|
|
1266
|
+
}
|
|
1267
|
+
}]);
|
|
1268
|
+
return UsageStatistics;
|
|
1269
|
+
}();
|
|
1270
|
+
|
|
1271
|
+
try {
|
|
1272
|
+
window.Vaadin = window.Vaadin || {};
|
|
1273
|
+
window.Vaadin.usageStatsChecker = window.Vaadin.usageStatsChecker || new UsageStatistics();
|
|
1274
|
+
window.Vaadin.usageStatsChecker.maybeGatherAndSend();
|
|
1275
|
+
} catch (e) {
|
|
1276
|
+
// Intentionally ignored as this is not a problem in the app being developed
|
|
1277
|
+
}
|
|
1278
|
+
|
|
1279
|
+
}());
|
|
1280
|
+
|
|
1281
|
+
vaadin-dev-mode:end **/}const No=function(){if(typeof zi=="function")return zi(To)};/**
|
|
1282
|
+
* @license
|
|
1283
|
+
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1284
|
+
* This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1285
|
+
* The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1286
|
+
* The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1287
|
+
* Code distributed by Google as part of the polymer project is also
|
|
1288
|
+
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1289
|
+
*/let Hi=0,Bs=0;const q=[];let $t=!1;function Oo(){$t=!1;const i=q.length;for(let e=0;e<i;e++){const t=q[e];if(t)try{t()}catch(n){setTimeout(()=>{throw n})}}q.splice(0,i),Bs+=i}const Vs={after(i){return{run(e){return window.setTimeout(e,i)},cancel(e){window.clearTimeout(e)}}},run(i,e){return window.setTimeout(i,e)},cancel(i){window.clearTimeout(i)}},Mo={run(i){return window.requestAnimationFrame(i)},cancel(i){window.cancelAnimationFrame(i)}},js={run(i){return window.requestIdleCallback?window.requestIdleCallback(i):window.setTimeout(i,16)},cancel(i){window.cancelIdleCallback?window.cancelIdleCallback(i):window.clearTimeout(i)}},qs={run(i){$t||($t=!0,queueMicrotask(()=>Oo())),q.push(i);const e=Hi;return Hi+=1,e},cancel(i){const e=i-Bs;if(e>=0){if(!q[e])throw new Error(`invalid async handle: ${i}`);q[e]=null}}};/**
|
|
1290
|
+
@license
|
|
1291
|
+
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
1292
|
+
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
|
1293
|
+
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
|
1294
|
+
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
|
1295
|
+
Code distributed by Google as part of the polymer project is also
|
|
1296
|
+
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
|
1297
|
+
*/const me=new Set;class G{static debounce(e,t,n){return e instanceof G?e._cancelAsync():e=new G,e.setConfig(t,n),e}constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(e,t){this._asyncModule=e,this._callback=t,this._timer=this._asyncModule.run(()=>{this._timer=null,me.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),me.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 Ys(i){me.add(i)}function ko(){const i=!!me.size;return me.forEach(e=>{try{e.flush()}catch(t){setTimeout(()=>{throw t})}}),i}const Io=()=>{let i;do i=ko();while(i)};/**
|
|
1298
|
+
* @license
|
|
1299
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1300
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1301
|
+
*/window.Vaadin||(window.Vaadin={});window.Vaadin.registrations||(window.Vaadin.registrations=[]);window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={});window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){No()};let rt;const Ui=new Set,Do=i=>class extends jt(i){static get version(){return"24.2.9"}static finalize(){super.finalize();const{is:t}=this;t&&!Ui.has(t)&&(window.Vaadin.registrations.push(this),Ui.add(t),window.Vaadin.developmentModeCallback&&(rt=G.debounce(rt,js,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),Ys(rt)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};/**
|
|
1302
|
+
* @license
|
|
1303
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1304
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1305
|
+
*/function Lo(i){const e=[];for(;i;){if(i.nodeType===Node.DOCUMENT_NODE){e.push(i);break}if(i.nodeType===Node.DOCUMENT_FRAGMENT_NODE){e.push(i),i=i.host;continue}if(i.assignedSlot){i=i.assignedSlot;continue}i=i.parentNode}return e}function qt(i){return i?new Set(i.split(" ")):new Set}function Fe(i){return i?[...i].join(" "):""}function Ws(i,e,t){const n=qt(i.getAttribute(e));n.add(t),i.setAttribute(e,Fe(n))}function Ro(i,e,t){const n=qt(i.getAttribute(e));if(n.delete(t),n.size===0){i.removeAttribute(e);return}i.setAttribute(e,Fe(n))}function zo(i){return i.nodeType===Node.TEXT_NODE&&i.textContent.trim()===""}/**
|
|
1306
|
+
* @license
|
|
1307
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
1308
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1309
|
+
*/class Ks{constructor(e,t){this.slot=e,this.callback=t,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 e=this.slot.assignedNodes({flatten:!0});let t=[];const n=[],s=[];e.length&&(t=e.filter(r=>!this._storedNodes.includes(r))),this._storedNodes.length&&this._storedNodes.forEach((r,o)=>{const a=e.indexOf(r);a===-1?n.push(r):a!==o&&s.push(r)}),(t.length||n.length||s.length)&&this.callback({addedNodes:t,movedNodes:s,removedNodes:n}),this._storedNodes=e}}/**
|
|
1310
|
+
* @license
|
|
1311
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1312
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1313
|
+
*/let Ho=0;function Js(){return Ho++}/**
|
|
1314
|
+
* @license
|
|
1315
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1316
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1317
|
+
*/class Be extends EventTarget{static generateId(e,t){return`${t||"default"}-${e.localName}-${Js()}`}constructor(e,t,n,s={}){super();const{initializer:r,multiple:o,observe:a,useUniqueId:l}=s;this.host=e,this.slotName=t,this.tagName=n,this.observe=typeof a=="boolean"?a:!0,this.multiple=typeof o=="boolean"?o:!1,this.slotInitializer=r,o&&(this.nodes=[]),l&&(this.defaultId=this.constructor.generateId(e,t))}hostConnected(){this.initialized||(this.multiple?this.initMultiple():this.initSingle(),this.observe&&this.observeSlot(),this.initialized=!0)}initSingle(){let e=this.getSlotChild();e?(this.node=e,this.initAddedNode(e)):(e=this.attachDefaultNode(),this.initNode(e))}initMultiple(){const e=this.getSlotChildren();if(e.length===0){const t=this.attachDefaultNode();t&&(this.nodes=[t],this.initNode(t))}else this.nodes=e,e.forEach(t=>{this.initAddedNode(t)})}attachDefaultNode(){const{host:e,slotName:t,tagName:n}=this;let s=this.defaultNode;return!s&&n&&(s=document.createElement(n),s instanceof Element&&(t!==""&&s.setAttribute("slot",t),this.node=s,this.defaultNode=s)),s&&e.appendChild(s),s}getSlotChildren(){const{slotName:e}=this;return Array.from(this.host.childNodes).filter(t=>t.nodeType===Node.ELEMENT_NODE&&t.slot===e||t.nodeType===Node.TEXT_NODE&&t.textContent.trim()&&e==="")}getSlotChild(){return this.getSlotChildren()[0]}initNode(e){const{slotInitializer:t}=this;t&&t(e,this.host)}initCustomNode(e){}teardownNode(e){}initAddedNode(e){e!==this.defaultNode&&(this.initCustomNode(e),this.initNode(e))}observeSlot(){const{slotName:e}=this,t=e===""?"slot:not([name])":`slot[name=${e}]`,n=this.host.shadowRoot.querySelector(t);this.__slotObserver=new Ks(n,({addedNodes:s,removedNodes:r})=>{const o=this.multiple?this.nodes:[this.node],a=s.filter(l=>!zo(l)&&!o.includes(l));r.length&&(this.nodes=o.filter(l=>!r.includes(l)),r.forEach(l=>{this.teardownNode(l)})),a&&a.length>0&&(this.multiple?(this.defaultNode&&this.defaultNode.remove(),this.nodes=[...o,...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)))})}}/**
|
|
1318
|
+
* @license
|
|
1319
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
1320
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1321
|
+
*/class Uo extends Be{constructor(e){super(e,"tooltip"),this.setTarget(e)}initCustomNode(e){e.target=this.target,this.ariaTarget!==void 0&&(e.ariaTarget=this.ariaTarget),this.context!==void 0&&(e.context=this.context),this.manual!==void 0&&(e.manual=this.manual),this.opened!==void 0&&(e.opened=this.opened),this.position!==void 0&&(e._position=this.position),this.shouldShow!==void 0&&(e.shouldShow=this.shouldShow),this.__notifyChange()}teardownNode(){this.__notifyChange()}setAriaTarget(e){this.ariaTarget=e;const t=this.node;t&&(t.ariaTarget=e)}setContext(e){this.context=e;const t=this.node;t&&(t.context=e)}setManual(e){this.manual=e;const t=this.node;t&&(t.manual=e)}setOpened(e){this.opened=e;const t=this.node;t&&(t.opened=e)}setPosition(e){this.position=e;const t=this.node;t&&(t._position=e)}setShouldShow(e){this.shouldShow=e;const t=this.node;t&&(t.shouldShow=e)}setTarget(e){this.target=e;const t=this.node;t&&(t.target=e)}__notifyChange(){this.dispatchEvent(new CustomEvent("tooltip-changed",{detail:{node:this.node}}))}}/**
|
|
1322
|
+
* @license
|
|
1323
|
+
* Copyright 2019 Google LLC
|
|
1324
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1325
|
+
*/const $e=window,Yt=$e.ShadowRoot&&($e.ShadyCSS===void 0||$e.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Wt=Symbol(),Fi=new WeakMap;class Gs{constructor(e,t,n){if(this._$cssResult$=!0,n!==Wt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Yt&&e===void 0){const n=t!==void 0&&t.length===1;n&&(e=Fi.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Fi.set(t,e))}return e}toString(){return this.cssText}}const Fo=i=>new Gs(typeof i=="string"?i:i+"",void 0,Wt),Kt=(i,...e)=>{const t=i.length===1?i[0]:e.reduce((n,s,r)=>n+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+i[r+1],i[0]);return new Gs(t,i,Wt)},Bo=(i,e)=>{Yt?i.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet):e.forEach(t=>{const n=document.createElement("style"),s=$e.litNonce;s!==void 0&&n.setAttribute("nonce",s),n.textContent=t.cssText,i.appendChild(n)})},Bi=Yt?i=>i:i=>i instanceof CSSStyleSheet?(e=>{let t="";for(const n of e.cssRules)t+=n.cssText;return Fo(t)})(i):i;/**
|
|
1326
|
+
* @license
|
|
1327
|
+
* Copyright 2017 Google LLC
|
|
1328
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1329
|
+
*/var ot;const Ie=window,Vi=Ie.trustedTypes,Vo=Vi?Vi.emptyScript:"",ji=Ie.reactiveElementPolyfillSupport,St={toAttribute(i,e){switch(e){case Boolean:i=i?Vo:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,e){let t=i;switch(e){case Boolean:t=i!==null;break;case Number:t=i===null?null:Number(i);break;case Object:case Array:try{t=JSON.parse(i)}catch(n){t=null}}return t}},Xs=(i,e)=>e!==i&&(e==e||i==i),at={attribute:!0,type:String,converter:St,reflect:!1,hasChanged:Xs},Tt="finalized";class V extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(e){var t;this.finalize(),((t=this.h)!==null&&t!==void 0?t:this.h=[]).push(e)}static get observedAttributes(){this.finalize();const e=[];return this.elementProperties.forEach((t,n)=>{const s=this._$Ep(n,t);s!==void 0&&(this._$Ev.set(s,n),e.push(s))}),e}static createProperty(e,t=at){if(t.state&&(t.attribute=!1),this.finalize(),this.elementProperties.set(e,t),!t.noAccessor&&!this.prototype.hasOwnProperty(e)){const n=typeof e=="symbol"?Symbol():"__"+e,s=this.getPropertyDescriptor(e,n,t);s!==void 0&&Object.defineProperty(this.prototype,e,s)}}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(s){const r=this[e];this[t]=s,this.requestUpdate(e,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)||at}static finalize(){if(this.hasOwnProperty(Tt))return!1;this[Tt]=!0;const e=Object.getPrototypeOf(this);if(e.finalize(),e.h!==void 0&&(this.h=[...e.h]),this.elementProperties=new Map(e.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,n=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const s of n)this.createProperty(s,t[s])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const n=new Set(e.flat(1/0).reverse());for(const s of n)t.unshift(Bi(s))}else e!==void 0&&t.push(Bi(e));return t}static _$Ep(e,t){const n=t.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.toLowerCase():void 0}_$Eu(){var e;this._$E_=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(e=this.constructor.h)===null||e===void 0||e.forEach(t=>t(this))}addController(e){var t,n;((t=this._$ES)!==null&&t!==void 0?t:this._$ES=[]).push(e),this.renderRoot!==void 0&&this.isConnected&&((n=e.hostConnected)===null||n===void 0||n.call(e))}removeController(e){var t;(t=this._$ES)===null||t===void 0||t.splice(this._$ES.indexOf(e)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((e,t)=>{this.hasOwnProperty(t)&&(this._$Ei.set(t,this[t]),delete this[t])})}createRenderRoot(){var e;const t=(e=this.shadowRoot)!==null&&e!==void 0?e:this.attachShadow(this.constructor.shadowRootOptions);return Bo(t,this.constructor.elementStyles),t}connectedCallback(){var e;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostConnected)===null||n===void 0?void 0:n.call(t)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$ES)===null||e===void 0||e.forEach(t=>{var n;return(n=t.hostDisconnected)===null||n===void 0?void 0:n.call(t)})}attributeChangedCallback(e,t,n){this._$AK(e,n)}_$EO(e,t,n=at){var s;const r=this.constructor._$Ep(e,n);if(r!==void 0&&n.reflect===!0){const o=(((s=n.converter)===null||s===void 0?void 0:s.toAttribute)!==void 0?n.converter:St).toAttribute(t,n.type);this._$El=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(e,t){var n;const s=this.constructor,r=s._$Ev.get(e);if(r!==void 0&&this._$El!==r){const o=s.getPropertyOptions(r),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((n=o.converter)===null||n===void 0?void 0:n.fromAttribute)!==void 0?o.converter:St;this._$El=r,this[r]=a.fromAttribute(t,o.type),this._$El=null}}requestUpdate(e,t,n){let s=!0;e!==void 0&&(((n=n||this.constructor.getPropertyOptions(e)).hasChanged||Xs)(this[e],t)?(this._$AL.has(e)||this._$AL.set(e,t),n.reflect===!0&&this._$El!==e&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(e,n))):s=!1),!this.isUpdatePending&&s&&(this._$E_=this._$Ej())}_$Ej(){return Je(this,null,function*(){this.isUpdatePending=!0;try{yield this._$E_}catch(t){Promise.reject(t)}const e=this.scheduleUpdate();return e!=null&&(yield e),!this.isUpdatePending})}scheduleUpdate(){return this.performUpdate()}performUpdate(){var e;if(!this.isUpdatePending)return;this._$Ei&&(this._$Ei.forEach((s,r)=>this[r]=s),this._$Ei=void 0);let t=!1;const n=this._$AL;try{t=this.shouldUpdate(n),t?(this.willUpdate(n),(e=this._$ES)===null||e===void 0||e.forEach(s=>{var r;return(r=s.hostUpdate)===null||r===void 0?void 0:r.call(s)}),this.update(n)):this._$Ek()}catch(s){throw t=!1,this._$Ek(),s}t&&this._$AE(n)}willUpdate(e){}_$AE(e){var t;(t=this._$ES)===null||t===void 0||t.forEach(n=>{var s;return(s=n.hostUpdated)===null||s===void 0?void 0:s.call(n)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(e){return!0}update(e){this._$EC!==void 0&&(this._$EC.forEach((t,n)=>this._$EO(n,this[n],t)),this._$EC=void 0),this._$Ek()}updated(e){}firstUpdated(e){}}V[Tt]=!0,V.elementProperties=new Map,V.elementStyles=[],V.shadowRootOptions={mode:"open"},ji==null||ji({ReactiveElement:V}),((ot=Ie.reactiveElementVersions)!==null&&ot!==void 0?ot:Ie.reactiveElementVersions=[]).push("1.6.3");/**
|
|
1330
|
+
* @license
|
|
1331
|
+
* Copyright 2017 Google LLC
|
|
1332
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1333
|
+
*/var lt;const De=window,X=De.trustedTypes,qi=X?X.createPolicy("lit-html",{createHTML:i=>i}):void 0,Nt="$lit$",T=`lit$${(Math.random()+"").slice(9)}$`,Zs="?"+T,jo=`<${Zs}>`,H=document,ge=()=>H.createComment(""),ye=i=>i===null||typeof i!="object"&&typeof i!="function",Qs=Array.isArray,qo=i=>Qs(i)||typeof(i==null?void 0:i[Symbol.iterator])=="function",dt=`[
|
|
1334
|
+
\f\r]`,se=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Yi=/-->/g,Wi=/>/g,k=RegExp(`>|${dt}(?:([^\\s"'>=/]+)(${dt}*=${dt}*(?:[^
|
|
1335
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ki=/'/g,Ji=/"/g,en=/^(?:script|style|textarea|title)$/i,Z=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Gi=new WeakMap,D=H.createTreeWalker(H,129,null,!1);function tn(i,e){if(!Array.isArray(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return qi!==void 0?qi.createHTML(e):e}const Yo=(i,e)=>{const t=i.length-1,n=[];let s,r=e===2?"<svg>":"",o=se;for(let a=0;a<t;a++){const l=i[a];let d,u,c=-1,h=0;for(;h<l.length&&(o.lastIndex=h,u=o.exec(l),u!==null);)h=o.lastIndex,o===se?u[1]==="!--"?o=Yi:u[1]!==void 0?o=Wi:u[2]!==void 0?(en.test(u[2])&&(s=RegExp("</"+u[2],"g")),o=k):u[3]!==void 0&&(o=k):o===k?u[0]===">"?(o=s!=null?s:se,c=-1):u[1]===void 0?c=-2:(c=o.lastIndex-u[2].length,d=u[1],o=u[3]===void 0?k:u[3]==='"'?Ji:Ki):o===Ji||o===Ki?o=k:o===Yi||o===Wi?o=se:(o=k,s=void 0);const f=o===k&&i[a+1].startsWith("/>")?" ":"";r+=o===se?l+jo:c>=0?(n.push(d),l.slice(0,c)+Nt+l.slice(c)+T+f):l+T+(c===-2?(n.push(void 0),a):f)}return[tn(i,r+(i[t]||"<?>")+(e===2?"</svg>":"")),n]};class be{constructor({strings:e,_$litType$:t},n){let s;this.parts=[];let r=0,o=0;const a=e.length-1,l=this.parts,[d,u]=Yo(e,t);if(this.el=be.createElement(d,n),D.currentNode=this.el.content,t===2){const c=this.el.content,h=c.firstChild;h.remove(),c.append(...h.childNodes)}for(;(s=D.nextNode())!==null&&l.length<a;){if(s.nodeType===1){if(s.hasAttributes()){const c=[];for(const h of s.getAttributeNames())if(h.endsWith(Nt)||h.startsWith(T)){const f=u[o++];if(c.push(h),f!==void 0){const _=s.getAttribute(f.toLowerCase()+Nt).split(T),m=/([.?@])?(.*)/.exec(f);l.push({type:1,index:r,name:m[2],strings:_,ctor:m[1]==="."?Ko:m[1]==="?"?Go:m[1]==="@"?Xo:Ve})}else l.push({type:6,index:r})}for(const h of c)s.removeAttribute(h)}if(en.test(s.tagName)){const c=s.textContent.split(T),h=c.length-1;if(h>0){s.textContent=X?X.emptyScript:"";for(let f=0;f<h;f++)s.append(c[f],ge()),D.nextNode(),l.push({type:2,index:++r});s.append(c[h],ge())}}}else if(s.nodeType===8)if(s.data===Zs)l.push({type:2,index:r});else{let c=-1;for(;(c=s.data.indexOf(T,c+1))!==-1;)l.push({type:7,index:r}),c+=T.length-1}r++}}static createElement(e,t){const n=H.createElement("template");return n.innerHTML=e,n}}function Q(i,e,t=i,n){var s,r,o,a;if(e===Z)return e;let l=n!==void 0?(s=t._$Co)===null||s===void 0?void 0:s[n]:t._$Cl;const d=ye(e)?void 0:e._$litDirective$;return(l==null?void 0:l.constructor)!==d&&((r=l==null?void 0:l._$AO)===null||r===void 0||r.call(l,!1),d===void 0?l=void 0:(l=new d(i),l._$AT(i,t,n)),n!==void 0?((o=(a=t)._$Co)!==null&&o!==void 0?o:a._$Co=[])[n]=l:t._$Cl=l),l!==void 0&&(e=Q(i,l._$AS(i,e.values),l,n)),e}class Wo{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var t;const{el:{content:n},parts:s}=this._$AD,r=((t=e==null?void 0:e.creationScope)!==null&&t!==void 0?t:H).importNode(n,!0);D.currentNode=r;let o=D.nextNode(),a=0,l=0,d=s[0];for(;d!==void 0;){if(a===d.index){let u;d.type===2?u=new we(o,o.nextSibling,this,e):d.type===1?u=new d.ctor(o,d.name,d.strings,this,e):d.type===6&&(u=new Zo(o,this,e)),this._$AV.push(u),d=s[++l]}a!==(d==null?void 0:d.index)&&(o=D.nextNode(),a++)}return D.currentNode=H,r}v(e){let t=0;for(const n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,t),t+=n.strings.length-2):n._$AI(e[t])),t++}}class we{constructor(e,t,n,s){var r;this.type=2,this._$AH=y,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=n,this.options=s,this._$Cp=(r=s==null?void 0:s.isConnected)===null||r===void 0||r}get _$AU(){var e,t;return(t=(e=this._$AM)===null||e===void 0?void 0:e._$AU)!==null&&t!==void 0?t:this._$Cp}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=Q(this,e,t),ye(e)?e===y||e==null||e===""?(this._$AH!==y&&this._$AR(),this._$AH=y):e!==this._$AH&&e!==Z&&this._(e):e._$litType$!==void 0?this.g(e):e.nodeType!==void 0?this.$(e):qo(e)?this.T(e):this._(e)}k(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}$(e){this._$AH!==e&&(this._$AR(),this._$AH=this.k(e))}_(e){this._$AH!==y&&ye(this._$AH)?this._$AA.nextSibling.data=e:this.$(H.createTextNode(e)),this._$AH=e}g(e){var t;const{values:n,_$litType$:s}=e,r=typeof s=="number"?this._$AC(e):(s.el===void 0&&(s.el=be.createElement(tn(s.h,s.h[0]),this.options)),s);if(((t=this._$AH)===null||t===void 0?void 0:t._$AD)===r)this._$AH.v(n);else{const o=new Wo(r,this),a=o.u(this.options);o.v(n),this.$(a),this._$AH=o}}_$AC(e){let t=Gi.get(e.strings);return t===void 0&&Gi.set(e.strings,t=new be(e)),t}T(e){Qs(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let n,s=0;for(const r of e)s===t.length?t.push(n=new we(this.k(ge()),this.k(ge()),this,this.options)):n=t[s],n._$AI(r),s++;s<t.length&&(this._$AR(n&&n._$AB.nextSibling,s),t.length=s)}_$AR(e=this._$AA.nextSibling,t){var n;for((n=this._$AP)===null||n===void 0||n.call(this,!1,!0,t);e&&e!==this._$AB;){const s=e.nextSibling;e.remove(),e=s}}setConnected(e){var t;this._$AM===void 0&&(this._$Cp=e,(t=this._$AP)===null||t===void 0||t.call(this,e))}}class Ve{constructor(e,t,n,s,r){this.type=1,this._$AH=y,this._$AN=void 0,this.element=e,this.name=t,this._$AM=s,this.options=r,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=y}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,n,s){const r=this.strings;let o=!1;if(r===void 0)e=Q(this,e,t,0),o=!ye(e)||e!==this._$AH&&e!==Z,o&&(this._$AH=e);else{const a=e;let l,d;for(e=r[0],l=0;l<r.length-1;l++)d=Q(this,a[n+l],t,l),d===Z&&(d=this._$AH[l]),o||(o=!ye(d)||d!==this._$AH[l]),d===y?e=y:e!==y&&(e+=(d!=null?d:"")+r[l+1]),this._$AH[l]=d}o&&!s&&this.j(e)}j(e){e===y?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Ko extends Ve{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===y?void 0:e}}const Jo=X?X.emptyScript:"";class Go extends Ve{constructor(){super(...arguments),this.type=4}j(e){e&&e!==y?this.element.setAttribute(this.name,Jo):this.element.removeAttribute(this.name)}}class Xo extends Ve{constructor(e,t,n,s,r){super(e,t,n,s,r),this.type=5}_$AI(e,t=this){var n;if((e=(n=Q(this,e,t,0))!==null&&n!==void 0?n:y)===Z)return;const s=this._$AH,r=e===y&&s!==y||e.capture!==s.capture||e.once!==s.once||e.passive!==s.passive,o=e!==y&&(s===y||r);r&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,n;typeof this._$AH=="function"?this._$AH.call((n=(t=this.options)===null||t===void 0?void 0:t.host)!==null&&n!==void 0?n:this.element,e):this._$AH.handleEvent(e)}}class Zo{constructor(e,t,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){Q(this,e)}}const Xi=De.litHtmlPolyfillSupport;Xi==null||Xi(be,we),((lt=De.litHtmlVersions)!==null&<!==void 0?lt:De.litHtmlVersions=[]).push("2.8.0");const Qo=(i,e,t)=>{var n,s;const r=(n=t==null?void 0:t.renderBefore)!==null&&n!==void 0?n:e;let o=r._$litPart$;if(o===void 0){const a=(s=t==null?void 0:t.renderBefore)!==null&&s!==void 0?s:null;r._$litPart$=o=new we(e.insertBefore(ge(),a),a,void 0,t!=null?t:{})}return o._$AI(i),o};/**
|
|
1336
|
+
* @license
|
|
1337
|
+
* Copyright 2017 Google LLC
|
|
1338
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1339
|
+
*/var ut,ct;class Se extends V{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var e,t;const n=super.createRenderRoot();return(e=(t=this.renderOptions).renderBefore)!==null&&e!==void 0||(t.renderBefore=n.firstChild),n}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qo(t,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)===null||e===void 0||e.setConnected(!1)}render(){return Z}}Se.finalized=!0,Se._$litElement$=!0,(ut=globalThis.litElementHydrateSupport)===null||ut===void 0||ut.call(globalThis,{LitElement:Se});const Zi=globalThis.litElementPolyfillSupport;Zi==null||Zi({LitElement:Se});((ct=globalThis.litElementVersions)!==null&&ct!==void 0?ct:globalThis.litElementVersions=[]).push("3.3.3");/**
|
|
1340
|
+
* @license
|
|
1341
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
1342
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1343
|
+
*/const ea=Kt`
|
|
1344
|
+
[part='clear-button'] {
|
|
1345
|
+
display: none;
|
|
1346
|
+
cursor: default;
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
[part='clear-button']::before {
|
|
1350
|
+
content: '\\2715';
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
:host([clear-button-visible][has-value]:not([disabled]):not([readonly])) [part='clear-button'] {
|
|
1354
|
+
display: block;
|
|
1355
|
+
}
|
|
1356
|
+
`;/**
|
|
1357
|
+
* @license
|
|
1358
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
1359
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1360
|
+
*/const ta=Kt`
|
|
1361
|
+
:host {
|
|
1362
|
+
display: inline-flex;
|
|
1363
|
+
outline: none;
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
:host::before {
|
|
1367
|
+
content: '\\2003';
|
|
1368
|
+
width: 0;
|
|
1369
|
+
display: inline-block;
|
|
1370
|
+
/* Size and position this element on the same vertical position as the input-field element
|
|
1371
|
+
to make vertical align for the host element work as expected */
|
|
1372
|
+
}
|
|
1373
|
+
|
|
1374
|
+
:host([hidden]) {
|
|
1375
|
+
display: none !important;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
:host(:not([has-label])) [part='label'] {
|
|
1379
|
+
display: none;
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
@media (forced-colors: active) {
|
|
1383
|
+
:host(:not([readonly])) [part='input-field'] {
|
|
1384
|
+
outline: 1px solid;
|
|
1385
|
+
outline-offset: -1px;
|
|
1386
|
+
}
|
|
1387
|
+
:host([focused]) [part='input-field'] {
|
|
1388
|
+
outline-width: 2px;
|
|
1389
|
+
}
|
|
1390
|
+
:host([disabled]) [part='input-field'] {
|
|
1391
|
+
outline-color: GrayText;
|
|
1392
|
+
}
|
|
1393
|
+
}
|
|
1394
|
+
`;/**
|
|
1395
|
+
* @license
|
|
1396
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
1397
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1398
|
+
*/const ia=Kt`
|
|
1399
|
+
[class$='container'] {
|
|
1400
|
+
display: flex;
|
|
1401
|
+
flex-direction: column;
|
|
1402
|
+
min-width: 100%;
|
|
1403
|
+
max-width: 100%;
|
|
1404
|
+
width: var(--vaadin-field-default-width, 12em);
|
|
1405
|
+
}
|
|
1406
|
+
`;/**
|
|
1407
|
+
* @license
|
|
1408
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd..
|
|
1409
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1410
|
+
*/const sa=[ta,ia,ea];/**
|
|
1411
|
+
* @license
|
|
1412
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1413
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1414
|
+
*/class na extends Be{constructor(e,t){super(e,"input","input",{initializer:(n,s)=>{s.value&&(n.value=s.value),s.type&&n.setAttribute("type",s.type),n.id=this.defaultId,typeof t=="function"&&t(n)},useUniqueId:!0})}}/**
|
|
1415
|
+
* @license
|
|
1416
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1417
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1418
|
+
*/let Jt=!1;window.addEventListener("keydown",()=>{Jt=!0},{capture:!0});window.addEventListener("mousedown",()=>{Jt=!1},{capture:!0});function ra(){let i=document.activeElement||document.body;for(;i.shadowRoot&&i.shadowRoot.activeElement;)i=i.shadowRoot.activeElement;return i}function oa(){return Jt}function aa(i){const e=i.style;if(e.visibility==="hidden"||e.display==="none")return!0;const t=window.getComputedStyle(i);return t.visibility==="hidden"||t.display==="none"}function la(i,e){const t=Math.max(i.tabIndex,0),n=Math.max(e.tabIndex,0);return t===0||n===0?n>t:t>n}function da(i,e){const t=[];for(;i.length>0&&e.length>0;)la(i[0],e[0])?t.push(e.shift()):t.push(i.shift());return t.concat(i,e)}function Ot(i){const e=i.length;if(e<2)return i;const t=Math.ceil(e/2),n=Ot(i.slice(0,t)),s=Ot(i.slice(t));return da(n,s)}function ua(i){return i.matches('[tabindex="-1"]')?!1:i.matches("input, select, textarea, button, object")?i.matches(":not([disabled])"):i.matches("a[href], area[href], iframe, [tabindex], [contentEditable]")}function ca(i){return i.getRootNode().activeElement===i}function ha(i){if(!ua(i))return-1;const e=i.getAttribute("tabindex")||0;return Number(e)}function sn(i,e){if(i.nodeType!==Node.ELEMENT_NODE||aa(i))return!1;const t=i,n=ha(t);let s=n>0;n>=0&&e.push(t);let r=[];return t.localName==="slot"?r=t.assignedNodes({flatten:!0}):r=(t.shadowRoot||t).children,[...r].forEach(o=>{s=sn(o,e)||s}),s}function fa(i){const e=[];return sn(i,e)?Ot(e):e}/**
|
|
1419
|
+
* @license
|
|
1420
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1421
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1422
|
+
*/const nn=b(i=>class extends i{get _keyboardActive(){return oa()}ready(){this.addEventListener("focusin",t=>{this._shouldSetFocus(t)&&this._setFocused(!0)}),this.addEventListener("focusout",t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)}),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}});/**
|
|
1423
|
+
* @license
|
|
1424
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1425
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1426
|
+
*/const Gt=b(i=>class extends i{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}});/**
|
|
1427
|
+
* @license
|
|
1428
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1429
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1430
|
+
*/const rn=i=>class extends Gt(i){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,n){super._disabledChanged(t,n),t?(this.tabindex!==void 0&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):n&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&t!==-1&&(this._lastTabIndex=t,this.tabindex=-1)}};/**
|
|
1431
|
+
* @license
|
|
1432
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1433
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1434
|
+
*/const on=b(i=>class extends nn(rn(i)){static get properties(){return{autofocus:{type:Boolean},focusElement:{type:Object,readOnly:!0,observer:"_focusElementChanged"},_lastTabIndex:{value:0}}}constructor(){super(),this._boundOnBlur=this._onBlur.bind(this),this._boundOnFocus=this._onFocus.bind(this)}ready(){super.ready(),this.autofocus&&!this.disabled&&requestAnimationFrame(()=>{this.focus(),this.setAttribute("focus-ring","")})}focus(){this.focusElement&&!this.disabled&&this.focusElement.focus()}blur(){this.focusElement&&this.focusElement.blur()}click(){this.focusElement&&!this.disabled&&this.focusElement.click()}_focusElementChanged(t,n){t?(t.disabled=this.disabled,this._addFocusListeners(t),this.__forwardTabIndex(this.tabindex)):n&&this._removeFocusListeners(n)}_addFocusListeners(t){t.addEventListener("blur",this._boundOnBlur),t.addEventListener("focus",this._boundOnFocus)}_removeFocusListeners(t){t.removeEventListener("blur",this._boundOnBlur),t.removeEventListener("focus",this._boundOnFocus)}_onFocus(t){t.stopPropagation(),this.dispatchEvent(new Event("focus"))}_onBlur(t){t.stopPropagation(),this.dispatchEvent(new Event("blur"))}_shouldSetFocus(t){return t.target===this.focusElement}_shouldRemoveFocus(t){return t.target===this.focusElement}_disabledChanged(t,n){super._disabledChanged(t,n),this.focusElement&&(this.focusElement.disabled=t),t&&this.blur()}_tabindexChanged(t){this.__forwardTabIndex(t)}__forwardTabIndex(t){t!==void 0&&this.focusElement&&(this.focusElement.tabIndex=t,t!==-1&&(this.tabindex=void 0)),this.disabled&&t&&(t!==-1&&(this._lastTabIndex=t),this.tabindex=void 0)}});/**
|
|
1435
|
+
* @license
|
|
1436
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1437
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1438
|
+
*/const je=b(i=>class extends i{ready(){super.ready(),this.addEventListener("keydown",t=>{this._onKeyDown(t)}),this.addEventListener("keyup",t=>{this._onKeyUp(t)})}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t);break}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}});/**
|
|
1439
|
+
* @license
|
|
1440
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1441
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1442
|
+
*/const ht=new WeakMap;function pa(i){return ht.has(i)||ht.set(i,new Set),ht.get(i)}function _a(i,e){const t=document.createElement("style");t.textContent=i,e===document?document.head.appendChild(t):e.insertBefore(t,e.firstChild)}const ma=b(i=>class extends i{get slotStyles(){return{}}connectedCallback(){super.connectedCallback(),this.__applySlotStyles()}__applySlotStyles(){const t=this.getRootNode(),n=pa(t);this.slotStyles.forEach(s=>{n.has(s)||(_a(s,t),n.add(s))})}});/**
|
|
1443
|
+
* @license
|
|
1444
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1445
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1446
|
+
*/const qe=i=>i.test(navigator.userAgent),Mt=i=>i.test(navigator.platform),ga=i=>i.test(navigator.vendor);qe(/Android/u);qe(/Chrome/u)&&ga(/Google Inc/u);const ya=qe(/Firefox/u),ba=Mt(/^iPad/u)||Mt(/^Mac/u)&&navigator.maxTouchPoints>1,va=Mt(/^iPhone/u),wa=va||ba,Aa=qe(/^((?!chrome|android).)*safari/iu),an=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(i){return!1}})();/**
|
|
1447
|
+
* @license
|
|
1448
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1449
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1450
|
+
*/const Xt=b(i=>class extends i{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(t){this.inputElement&&(this.inputElement[this._inputElementValueProperty]=t)}clear(){this._hasInputValue=!1,this.value="",this._inputElementValue=""}_addInputListeners(t){t.addEventListener("input",this._boundOnInput),t.addEventListener("change",this._boundOnChange)}_removeInputListeners(t){t.removeEventListener("input",this._boundOnInput),t.removeEventListener("change",this._boundOnChange)}_forwardInputValue(t){this.inputElement&&(this._inputElementValue=t!=null?t:"")}_inputElementChanged(t,n){t?this._addInputListeners(t):n&&this._removeInputListeners(n)}_hasInputValueChanged(t,n){(t||n)&&this.dispatchEvent(new CustomEvent("has-input-value-changed"))}__onInput(t){this._setHasInputValue(t),this._onInput(t)}_onInput(t){const n=t.composedPath()[0];this.__userInput=t.isTrusted,this.value=n.value,this.__userInput=!1}_onChange(t){}_toggleHasValue(t){this.toggleAttribute("has-value",t)}_valueChanged(t,n){this._toggleHasValue(this._hasValue),!(t===""&&n===void 0)&&(this.__userInput||this._forwardInputValue(t))}_setHasInputValue(t){const n=t.composedPath()[0];this._hasInputValue=n.value.length>0}});/**
|
|
1451
|
+
* @license
|
|
1452
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1453
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1454
|
+
*/const Ea=i=>class extends Xt(je(i)){static get properties(){return{clearButtonVisible:{type:Boolean,reflectToAttribute:!0,value:!1}}}get clearElement(){return console.warn(`Please implement the 'clearElement' property in <${this.localName}>`),null}ready(){super.ready(),this.clearElement&&(this.clearElement.addEventListener("mousedown",t=>this._onClearButtonMouseDown(t)),this.clearElement.addEventListener("click",t=>this._onClearButtonClick(t)))}_onClearButtonClick(t){t.preventDefault(),this._onClearAction()}_onClearButtonMouseDown(t){t.preventDefault(),an||this.inputElement.focus()}_onEscape(t){super._onEscape(t),this.clearButtonVisible&&this.value&&(t.stopPropagation(),this._onClearAction())}_onClearAction(){this.clear(),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.inputElement.dispatchEvent(new Event("change",{bubbles:!0}))}};/**
|
|
1455
|
+
* @license
|
|
1456
|
+
* Copyright (c) 2023 Vaadin Ltd.
|
|
1457
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1458
|
+
*/const ft=new Map;function Zt(i){return ft.has(i)||ft.set(i,new WeakMap),ft.get(i)}function ln(i,e){i&&i.removeAttribute(e)}function dn(i,e){if(!i||!e)return;const t=Zt(e);if(t.has(i))return;const n=qt(i.getAttribute(e));t.set(i,new Set(n))}function Ca(i,e){if(!i)return;const t=Zt(e),n=t.get(i);!n||n.size===0?i.removeAttribute(e):Ws(i,e,Fe(n)),t.delete(i)}function pt(i,e,t={newId:null,oldId:null,fromUser:!1}){if(!i||!e)return;const{newId:n,oldId:s,fromUser:r}=t,o=Zt(e),a=o.get(i);if(!r&&a){s&&a.delete(s),n&&a.add(n);return}r&&(a?n||o.delete(i):dn(i,e),ln(i,e)),Ro(i,e,s);const l=n||Fe(a);l&&Ws(i,e,l)}function xa(i,e){dn(i,e),ln(i,e)}/**
|
|
1459
|
+
* @license
|
|
1460
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1461
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1462
|
+
*/class Pa{constructor(e){this.host=e,this.__required=!1}setTarget(e){this.__target=e,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(e){this.__setAriaRequiredAttribute(e),this.__required=e}setAriaLabel(e){this.__setAriaLabelToAttribute(e),this.__label=e}setLabelId(e,t=!1){const n=t?this.__labelIdFromUser:this.__labelId;this.__setLabelIdToAriaAttribute(e,n,t),t?this.__labelIdFromUser=e:this.__labelId=e}setErrorId(e){this.__setErrorIdToAriaAttribute(e,this.__errorId),this.__errorId=e}setHelperId(e){this.__setHelperIdToAriaAttribute(e,this.__helperId),this.__helperId=e}__setAriaLabelToAttribute(e){this.__target&&(e?(xa(this.__target,"aria-labelledby"),this.__target.setAttribute("aria-label",e)):this.__label&&(Ca(this.__target,"aria-labelledby"),this.__target.removeAttribute("aria-label")))}__setLabelIdToAriaAttribute(e,t,n){pt(this.__target,"aria-labelledby",{newId:e,oldId:t,fromUser:n})}__setErrorIdToAriaAttribute(e,t){pt(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setHelperIdToAriaAttribute(e,t){pt(this.__target,"aria-describedby",{newId:e,oldId:t,fromUser:!1})}__setAriaRequiredAttribute(e){this.__target&&(["input","textarea"].includes(this.__target.localName)||(e?this.__target.setAttribute("aria-required","true"):this.__target.removeAttribute("aria-required")))}}/**
|
|
1463
|
+
* @license
|
|
1464
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1465
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1466
|
+
*/const Qt=b(i=>typeof i.prototype.addController=="function"?i:class extends i{constructor(){super(),this.__controllers=new Set}connectedCallback(){super.connectedCallback(),this.__controllers.forEach(t=>{t.hostConnected&&t.hostConnected()})}disconnectedCallback(){super.disconnectedCallback(),this.__controllers.forEach(t=>{t.hostDisconnected&&t.hostDisconnected()})}addController(t){this.__controllers.add(t),this.$!==void 0&&this.isConnected&&t.hostConnected&&t.hostConnected()}removeController(t){this.__controllers.delete(t)}});/**
|
|
1467
|
+
* @license
|
|
1468
|
+
* Copyright (c) 2022 - 2023 Vaadin Ltd.
|
|
1469
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1470
|
+
*/class ei extends Be{constructor(e,t,n,s={}){super(e,t,n,Ke(We({},s),{useUniqueId:!0}))}initCustomNode(e){this.__updateNodeId(e),this.__notifyChange(e)}teardownNode(e){const t=this.getSlotChild();t&&t!==this.defaultNode?this.__notifyChange(t):(this.restoreDefaultNode(),this.updateDefaultNode(this.node))}attachDefaultNode(){const e=super.attachDefaultNode();return e&&this.__updateNodeId(e),e}restoreDefaultNode(){}updateDefaultNode(e){this.__notifyChange(e)}observeNode(e){this.__nodeObserver&&this.__nodeObserver.disconnect(),this.__nodeObserver=new MutationObserver(t=>{t.forEach(n=>{const s=n.target,r=s===this.node;n.type==="attributes"?r&&this.__updateNodeId(s):(r||s.parentElement===this.node)&&this.__notifyChange(this.node)})}),this.__nodeObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0,subtree:!0,characterData:!0})}__hasContent(e){return e?e.nodeType===Node.ELEMENT_NODE&&(customElements.get(e.localName)||e.children.length>0)||e.textContent&&e.textContent.trim()!=="":!1}__notifyChange(e){this.dispatchEvent(new CustomEvent("slot-content-changed",{detail:{hasContent:this.__hasContent(e),node:e}}))}__updateNodeId(e){const t=!this.nodes||e===this.nodes[0];e.nodeType===Node.ELEMENT_NODE&&(!this.multiple||t)&&!e.id&&(e.id=this.defaultId)}}/**
|
|
1471
|
+
* @license
|
|
1472
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1473
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1474
|
+
*/class $a extends ei{constructor(e){super(e,"error-message","div")}setErrorMessage(e){this.errorMessage=e,this.updateDefaultNode(this.node)}setInvalid(e){this.invalid=e,this.updateDefaultNode(this.node)}initAddedNode(e){e!==this.defaultNode&&this.initCustomNode(e)}initNode(e){this.updateDefaultNode(e)}initCustomNode(e){e.textContent&&!this.errorMessage&&(this.errorMessage=e.textContent.trim()),super.initCustomNode(e)}restoreDefaultNode(){this.attachDefaultNode()}updateDefaultNode(e){const{errorMessage:t,invalid:n}=this,s=!!(n&&t&&t.trim()!=="");e&&(e.textContent=s?t:"",e.hidden=!s,s?e.setAttribute("role","alert"):e.removeAttribute("role")),super.updateDefaultNode(e)}}/**
|
|
1475
|
+
* @license
|
|
1476
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1477
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1478
|
+
*/class Sa extends ei{constructor(e){super(e,"helper",null)}setHelperText(e){this.helperText=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{helperText:e}=this;if(e&&e.trim()!==""){this.tagName="div";const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(e){e&&(e.textContent=this.helperText),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}/**
|
|
1479
|
+
* @license
|
|
1480
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1481
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1482
|
+
*/class Ta extends ei{constructor(e){super(e,"label","label")}setLabel(e){this.label=e,this.getSlotChild()||this.restoreDefaultNode(),this.node===this.defaultNode&&this.updateDefaultNode(this.node)}restoreDefaultNode(){const{label:e}=this;if(e&&e.trim()!==""){const t=this.attachDefaultNode();this.observeNode(t)}}updateDefaultNode(e){e&&(e.textContent=this.label),super.updateDefaultNode(e)}initCustomNode(e){super.initCustomNode(e),this.observeNode(e)}}/**
|
|
1483
|
+
* @license
|
|
1484
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1485
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1486
|
+
*/const un=b(i=>class extends Qt(i){static get properties(){return{label:{type:String,observer:"_labelChanged"}}}constructor(){super(),this._labelController=new Ta(this),this._labelController.addEventListener("slot-content-changed",t=>{this.toggleAttribute("has-label",t.detail.hasContent)})}get _labelId(){const t=this._labelNode;return t&&t.id}get _labelNode(){return this._labelController.node}ready(){super.ready(),this.addController(this._labelController)}_labelChanged(t){this._labelController.setLabel(t)}});/**
|
|
1487
|
+
* @license
|
|
1488
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1489
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1490
|
+
*/const ti=b(i=>class extends i{static get properties(){return{invalid:{type:Boolean,reflectToAttribute:!0,notify:!0,value:!1},required:{type:Boolean,reflectToAttribute:!0}}}validate(){const t=this.checkValidity();return this._setInvalid(!t),this.dispatchEvent(new CustomEvent("validated",{detail:{valid:t}})),t}checkValidity(){return!this.required||!!this.value}_setInvalid(t){this._shouldSetInvalid(t)&&(this.invalid=t)}_shouldSetInvalid(t){return!0}});/**
|
|
1491
|
+
* @license
|
|
1492
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1493
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1494
|
+
*/const cn=i=>class extends ti(un(Qt(i))){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 Pa(this),this._helperController=new Sa(this),this._errorController=new $a(this),this._errorController.addEventListener("slot-content-changed",t=>{this.toggleAttribute("has-error-message",t.detail.hasContent)}),this._labelController.addEventListener("slot-content-changed",t=>{const{hasContent:n,node:s}=t.detail;this.__labelChanged(n,s)}),this._helperController.addEventListener("slot-content-changed",t=>{const{hasContent:n,node:s}=t.detail;this.toggleAttribute("has-helper",n),this.__helperChanged(n,s)})}get _errorNode(){return this._errorController.node}get _helperNode(){return this._helperController.node}ready(){super.ready(),this.addController(this._fieldAriaController),this.addController(this._helperController),this.addController(this._errorController)}__helperChanged(t,n){t?this._fieldAriaController.setHelperId(n.id):this._fieldAriaController.setHelperId(null)}_accessibleNameChanged(t){this._fieldAriaController.setAriaLabel(t)}_accessibleNameRefChanged(t){this._fieldAriaController.setLabelId(t,!0)}__labelChanged(t,n){t?this._fieldAriaController.setLabelId(n.id):this._fieldAriaController.setLabelId(null)}_errorMessageChanged(t){this._errorController.setErrorMessage(t)}_helperTextChanged(t){this._helperController.setHelperText(t)}_ariaTargetChanged(t){t&&this._fieldAriaController.setTarget(t)}_requiredChanged(t){this._fieldAriaController.setRequired(t)}_invalidChanged(t){this._errorController.setInvalid(t),setTimeout(()=>{if(t){const n=this._errorNode;this._fieldAriaController.setErrorId(n&&n.id)}else this._fieldAriaController.setErrorId(null)})}};/**
|
|
1495
|
+
* @license
|
|
1496
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1497
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1498
|
+
*/const hn=b(i=>class extends i{static get properties(){return{stateTarget:{type:Object,observer:"_stateTargetChanged"}}}static get delegateAttrs(){return[]}static get delegateProps(){return[]}ready(){super.ready(),this._createDelegateAttrsObserver(),this._createDelegatePropsObserver()}_stateTargetChanged(t){t&&(this._ensureAttrsDelegated(),this._ensurePropsDelegated())}_createDelegateAttrsObserver(){this._createMethodObserver(`_delegateAttrsChanged(${this.constructor.delegateAttrs.join(", ")})`)}_createDelegatePropsObserver(){this._createMethodObserver(`_delegatePropsChanged(${this.constructor.delegateProps.join(", ")})`)}_ensureAttrsDelegated(){this.constructor.delegateAttrs.forEach(t=>{this._delegateAttribute(t,this[t])})}_ensurePropsDelegated(){this.constructor.delegateProps.forEach(t=>{this._delegateProperty(t,this[t])})}_delegateAttrsChanged(...t){this.constructor.delegateAttrs.forEach((n,s)=>{this._delegateAttribute(n,t[s])})}_delegatePropsChanged(...t){this.constructor.delegateProps.forEach((n,s)=>{this._delegateProperty(n,t[s])})}_delegateAttribute(t,n){this.stateTarget&&(t==="invalid"&&this._delegateAttribute("aria-invalid",n?"true":!1),typeof n=="boolean"?this.stateTarget.toggleAttribute(t,n):n?this.stateTarget.setAttribute(t,n):this.stateTarget.removeAttribute(t))}_delegateProperty(t,n){this.stateTarget&&(this.stateTarget[t]=n)}});/**
|
|
1499
|
+
* @license
|
|
1500
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1501
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1502
|
+
*/const fn=b(i=>class extends hn(ti(Xt(i))){static get constraints(){return["required"]}static get delegateAttrs(){return[...super.delegateAttrs,"required"]}ready(){super.ready(),this._createConstraintsObserver()}checkValidity(){return this.inputElement&&this._hasValidConstraints(this.constructor.constraints.map(t=>this[t]))?this.inputElement.checkValidity():!this.invalid}_hasValidConstraints(t){return t.some(n=>this.__isValidConstraint(n))}_createConstraintsObserver(){this._createMethodObserver(`_constraintsChanged(stateTarget, ${this.constructor.constraints.join(", ")})`)}_constraintsChanged(t,...n){if(!t)return;const s=this._hasValidConstraints(n),r=this.__previousHasConstraints&&!s;(this._hasValue||this.invalid)&&s?this.validate():r&&this._setInvalid(!1),this.__previousHasConstraints=s}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}__isValidConstraint(t){return!!t||t===0}});/**
|
|
1503
|
+
* @license
|
|
1504
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1505
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1506
|
+
*/const Na=i=>class extends ma(on(fn(cn(Ea(je(i)))))){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[`
|
|
1507
|
+
:is(input[slot='input'], textarea[slot='textarea'])::placeholder {
|
|
1508
|
+
font: inherit;
|
|
1509
|
+
color: inherit;
|
|
1510
|
+
}
|
|
1511
|
+
`]}_onFocus(t){super._onFocus(t),this.autoselect&&this.inputElement&&this.inputElement.select()}_onChange(t){t.stopPropagation(),this.validate(),this.dispatchEvent(new CustomEvent("change",{detail:{sourceEvent:t},bubbles:t.bubbles,cancelable:t.cancelable}))}_addInputListeners(t){super._addInputListeners(t),t.addEventListener("paste",this._boundOnPaste),t.addEventListener("drop",this._boundOnDrop),t.addEventListener("beforeinput",this._boundOnBeforeInput)}_removeInputListeners(t){super._removeInputListeners(t),t.removeEventListener("paste",this._boundOnPaste),t.removeEventListener("drop",this._boundOnDrop),t.removeEventListener("beforeinput",this._boundOnBeforeInput)}_onKeyDown(t){super._onKeyDown(t),this.allowedCharPattern&&!this.__shouldAcceptKey(t)&&(t.preventDefault(),this._markInputPrevented())}_markInputPrevented(){this.setAttribute("input-prevented",""),this._preventInputDebouncer=G.debounce(this._preventInputDebouncer,Vs.after(200),()=>{this.removeAttribute("input-prevented")})}__shouldAcceptKey(t){return t.metaKey||t.ctrlKey||!t.key||t.key.length!==1||this.__allowedCharRegExp.test(t.key)}_onPaste(t){if(this.allowedCharPattern){const n=t.clipboardData.getData("text");this.__allowedTextRegExp.test(n)||(t.preventDefault(),this._markInputPrevented())}}_onDrop(t){if(this.allowedCharPattern){const n=t.dataTransfer.getData("text");this.__allowedTextRegExp.test(n)||(t.preventDefault(),this._markInputPrevented())}}_onBeforeInput(t){this.allowedCharPattern&&t.data&&!this.__allowedTextRegExp.test(t.data)&&(t.preventDefault(),this._markInputPrevented())}_allowedCharPatternChanged(t){if(t)try{this.__allowedCharRegExp=new RegExp(`^${t}$`,"u"),this.__allowedTextRegExp=new RegExp(`^${t}*$`,"u")}catch(n){console.error(n)}}};/**
|
|
1512
|
+
* @license
|
|
1513
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1514
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1515
|
+
*/class Oa{constructor(e,t){this.input=e,this.__preventDuplicateLabelClick=this.__preventDuplicateLabelClick.bind(this),t.addEventListener("slot-content-changed",n=>{this.__initLabel(n.detail.node)}),this.__initLabel(t.node)}__initLabel(e){e&&(e.addEventListener("click",this.__preventDuplicateLabelClick),this.input&&e.setAttribute("for",this.input.id))}__preventDuplicateLabelClick(){const e=t=>{t.stopImmediatePropagation(),this.input.removeEventListener("click",e)};this.input.addEventListener("click",e)}}const Ma=i=>i,pn=typeof document.head.style.touchAction=="string",kt="__polymerGestures",_t="__polymerGesturesHandled",It="__polymerGesturesTouchAction",Qi=25,es=5,ka=2,Ia=["mousedown","mousemove","mouseup","click"],Da=[0,1,4,2],La=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(i){return!1}}();function ii(i){return Ia.indexOf(i)>-1}let Ra=!1;(function(){try{const i=Object.defineProperty({},"passive",{get(){Ra=!0}});window.addEventListener("test",null,i),window.removeEventListener("test",null,i)}catch(i){}})();function za(i){ii(i)}const Ha=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),Ua={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function R(i){const e=i.type;if(!ii(e))return!1;if(e==="mousemove"){let n=i.buttons===void 0?1:i.buttons;return i instanceof window.MouseEvent&&!La&&(n=Da[i.which]||0),!!(n&1)}return(i.button===void 0?0:i.button)===0}function Fa(i){if(i.type==="click"){if(i.detail===0)return!0;const e=O(i);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const t=e.getBoundingClientRect(),n=i.pageX,s=i.pageY;return!(n>=t.left&&n<=t.right&&s>=t.top&&s<=t.bottom)}return!1}const P={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Ba(i){let e="auto";const t=mn(i);for(let n=0,s;n<t.length;n++)if(s=t[n],s[It]){e=s[It];break}return e}function _n(i,e,t){i.movefn=e,i.upfn=t,document.addEventListener("mousemove",e),document.addEventListener("mouseup",t)}function Y(i){document.removeEventListener("mousemove",i.movefn),document.removeEventListener("mouseup",i.upfn),i.movefn=null,i.upfn=null}const mn=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:i=>i.composedPath&&i.composedPath()||[],si={},L=[];function Va(i,e){let t=document.elementFromPoint(i,e),n=t;for(;n&&n.shadowRoot&&!window.ShadyDOM;){const s=n;if(n=n.shadowRoot.elementFromPoint(i,e),s===n)break;n&&(t=n)}return t}function O(i){const e=mn(i);return e.length>0?e[0]:i.target}function ja(i){const e=i.type,n=i.currentTarget[kt];if(!n)return;const s=n[e];if(!s)return;if(!i[_t]&&(i[_t]={},e.startsWith("touch"))){const o=i.changedTouches[0];if(e==="touchstart"&&i.touches.length===1&&(P.touch.id=o.identifier),P.touch.id!==o.identifier)return;pn||(e==="touchstart"||e==="touchmove")&&qa(i)}const r=i[_t];if(!r.skip){for(let o=0,a;o<L.length;o++)a=L[o],s[a.name]&&!r[a.name]&&a.flow&&a.flow.start.indexOf(i.type)>-1&&a.reset&&a.reset();for(let o=0,a;o<L.length;o++)a=L[o],s[a.name]&&!r[a.name]&&(r[a.name]=!0,a[e](i))}}function qa(i){const e=i.changedTouches[0],t=i.type;if(t==="touchstart")P.touch.x=e.clientX,P.touch.y=e.clientY,P.touch.scrollDecided=!1;else if(t==="touchmove"){if(P.touch.scrollDecided)return;P.touch.scrollDecided=!0;const n=Ba(i);let s=!1;const r=Math.abs(P.touch.x-e.clientX),o=Math.abs(P.touch.y-e.clientY);i.cancelable&&(n==="none"?s=!0:n==="pan-x"?s=o>r:n==="pan-y"&&(s=r>o)),s?i.preventDefault():Le("track")}}function Dt(i,e,t){return si[e]?(Ya(i,e,t),!0):!1}function Ya(i,e,t){const n=si[e],s=n.deps,r=n.name;let o=i[kt];o||(i[kt]=o={});for(let a=0,l,d;a<s.length;a++)l=s[a],!(Ha&&ii(l)&&l!=="click")&&(d=o[l],d||(o[l]=d={_count:0}),d._count===0&&i.addEventListener(l,ja,za(l)),d[r]=(d[r]||0)+1,d._count=(d._count||0)+1);i.addEventListener(e,t),n.touchAction&&gn(i,n.touchAction)}function ni(i){L.push(i),i.emits.forEach(e=>{si[e]=i})}function Wa(i){for(let e=0,t;e<L.length;e++){t=L[e];for(let n=0,s;n<t.emits.length;n++)if(s=t.emits[n],s===i)return t}return null}function gn(i,e){pn&&i instanceof HTMLElement&&qs.run(()=>{i.style.touchAction=e}),i[It]=e}function ri(i,e,t){const n=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(n.detail=t,Ma(i).dispatchEvent(n),n.defaultPrevented){const s=t.preventer||t.sourceEvent;s&&s.preventDefault&&s.preventDefault()}}function Le(i){const e=Wa(i);e.info&&(e.info.prevent=!0)}ni({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){Y(this.info)},mousedown(i){if(!R(i))return;const e=O(i),t=this,n=r=>{R(r)||(ne("up",e,r),Y(t.info))},s=r=>{R(r)&&ne("up",e,r),Y(t.info)};_n(this.info,n,s),ne("down",e,i)},touchstart(i){ne("down",O(i),i.changedTouches[0],i)},touchend(i){ne("up",O(i),i.changedTouches[0],i)}});function ne(i,e,t,n){e&&ri(e,i,{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:n,prevent(s){return Le(s)}})}ni({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(i){this.moves.length>ka&&this.moves.shift(),this.moves.push(i)},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,Y(this.info)},mousedown(i){if(!R(i))return;const e=O(i),t=this,n=r=>{const o=r.clientX,a=r.clientY;ts(t.info,o,a)&&(t.info.state=t.info.started?r.type==="mouseup"?"end":"track":"start",t.info.state==="start"&&Le("tap"),t.info.addMove({x:o,y:a}),R(r)||(t.info.state="end",Y(t.info)),e&&mt(t.info,e,r),t.info.started=!0)},s=r=>{t.info.started&&n(r),Y(t.info)};_n(this.info,n,s),this.info.x=i.clientX,this.info.y=i.clientY},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(i){const e=O(i),t=i.changedTouches[0],n=t.clientX,s=t.clientY;ts(this.info,n,s)&&(this.info.state==="start"&&Le("tap"),this.info.addMove({x:n,y:s}),mt(this.info,e,t),this.info.state="track",this.info.started=!0)},touchend(i){const e=O(i),t=i.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:t.clientX,y:t.clientY}),mt(this.info,e,t))}});function ts(i,e,t){if(i.prevent)return!1;if(i.started)return!0;const n=Math.abs(i.x-e),s=Math.abs(i.y-t);return n>=es||s>=es}function mt(i,e,t){if(!e)return;const n=i.moves[i.moves.length-2],s=i.moves[i.moves.length-1],r=s.x-i.x,o=s.y-i.y;let a,l=0;n&&(a=s.x-n.x,l=s.y-n.y),ri(e,"track",{state:i.state,x:t.clientX,y:t.clientY,dx:r,dy:o,ddx:a,ddy:l,sourceEvent:t,hover(){return Va(t.clientX,t.clientY)}})}ni({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(i){R(i)&&(this.info.x=i.clientX,this.info.y=i.clientY)},click(i){R(i)&&is(this.info,i)},touchstart(i){const e=i.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(i){is(this.info,i.changedTouches[0],i)}});function is(i,e,t){const n=Math.abs(e.clientX-i.x),s=Math.abs(e.clientY-i.y),r=O(t||e);!r||Ua[r.localName]&&r.hasAttribute("disabled")||(isNaN(n)||isNaN(s)||n<=Qi&&s<=Qi||Fa(e))&&(i.prevent||ri(r,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:t}))}/**
|
|
1516
|
+
* @license
|
|
1517
|
+
* Copyright (c) 2021 - 2023 Vaadin Ltd.
|
|
1518
|
+
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
1519
|
+
*/const Ka=i=>class extends Gt(je(i)){get _activeKeys(){return[" "]}ready(){super.ready(),Dt(this,"down",t=>{this._shouldSetActive(t)&&this._setActive(!0)}),Dt(this,"up",()=>{this._setActive(!1)})}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",n=>{this._activeKeys.includes(n.key)&&this._setActive(!1)},{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}};exports.ActiveMixin=Ka;exports.ControllerMixin=Qt;exports.Debouncer=G;exports.DelegateFocusMixin=on;exports.DelegateStateMixin=hn;exports.DirMixin=jt;exports.DisabledMixin=Gt;exports.ElementMixin=Do;exports.FieldMixin=cn;exports.FocusMixin=nn;exports.InputConstraintsMixin=fn;exports.InputControlMixin=Na;exports.InputController=na;exports.InputMixin=Xt;exports.KeyboardMixin=je;exports.LabelMixin=un;exports.LabelledInputController=Oa;exports.PolymerElement=Us;exports.PropertyEffects=Ds;exports.SlotController=Be;exports.SlotObserver=Ks;exports.TabindexMixin=rn;exports.ThemableMixin=cs;exports.TooltipController=Uo;exports.ValidateMixin=ti;exports.addGlobalThemeStyles=hs;exports.addListener=Dt;exports.animationFrame=Mo;exports.dedupingMixin=b;exports.defineCustomElement=Lt;exports.enqueueDebouncer=Ys;exports.flush=Io;exports.generateUniqueId=Js;exports.getAncestorRootNodes=Lo;exports.getDeepActiveElement=ra;exports.getFocusableElements=fa;exports.html=zs;exports.i$3=$;exports.idlePeriod=js;exports.inputFieldShared=sa;exports.isElementFocused=ca;exports.isFirefox=ya;exports.isIOS=wa;exports.isSafari=Aa;exports.isTouch=an;exports.legacyOptimizations=ps;exports.legacyWarnings=_s;exports.matches=fr;exports.microTask=qs;exports.microTask$1=xs;exports.registerStyles=ze;exports.setTouchAction=gn;exports.strictTemplatePolicy=Me;exports.suppressTemplateNotifications=nr;exports.timeOut=Vs;exports.timeOut$1=br;exports.translate=fe;exports.useShadow=fs;exports.wrap$1=N;
|