@telperion/elements 5.3.1 → 5.4.1

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.
@@ -1,86 +1,10 @@
1
- this.TelperionElements=this.TelperionElements||{},function(t){"use strict";function e(t,e,s,i){var o,n=arguments.length,r=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,s,i);else for(var c=t.length-1;c>=0;c--)(o=t[c])&&(r=(n<3?o(r):n>3?o(e,s,r):o(e,s))||r);return n>3&&r&&Object.defineProperty(e,s,r),r}function s(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
2
- /**
3
- * @license
4
- * Copyright 2019 Google LLC
5
- * SPDX-License-Identifier: BSD-3-Clause
6
- */
7
- const i=globalThis,o=i.ShadowRoot&&(void 0===i.ShadyCSS||i.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),r=new WeakMap;let c=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(o&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=r.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&r.set(e,t))}return t}toString(){return this.cssText}};const l=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[i+1],t[0]);return new c(s,t,n)},a=o?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new c("string"==typeof t?t:t+"",void 0,n))(e)})(t):t,{is:h,defineProperty:d,getOwnPropertyDescriptor:p,getOwnPropertyNames:u,getOwnPropertySymbols:f,getPrototypeOf:g}=Object,v=globalThis,m=v.trustedTypes,y=m?m.emptyScript:"",b=v.reactiveElementPolyfillSupport,S=(t,e)=>t,$={toAttribute(t,e){switch(e){case Boolean:t=t?y:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},w=(t,e)=>!h(t,e),_={attribute:!0,type:String,converter:$,reflect:!1,useDefault:!1,hasChanged:w};
8
- /**
9
- * @license
10
- * Copyright 2017 Google LLC
11
- * SPDX-License-Identifier: BSD-3-Clause
12
- */Symbol.metadata??=Symbol("metadata"),v.litPropertyMetadata??=new WeakMap;let E=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=_){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),i=this.getPropertyDescriptor(t,s,e);void 0!==i&&d(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){const{get:i,set:o}=p(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:i,set(e){const n=i?.call(this);o?.call(this,e),this.requestUpdate(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??_}static _$Ei(){if(this.hasOwnProperty(S("elementProperties")))return;const t=g(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(S("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(S("properties"))){const t=this.properties,e=[...u(t),...f(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(o)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=i.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(void 0!==i&&!0===s.reflect){const o=(void 0!==s.converter?.toAttribute?s.converter:$).toAttribute(e,s.type);this._$Em=t,null==o?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){const s=this.constructor,i=s._$Eh.get(t);if(void 0!==i&&this._$Em!==i){const t=s.getPropertyOptions(i),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:$;this._$Em=i;const n=o.fromAttribute(e,t.type);this[i]=n??this._$Ej?.get(i)??n,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??w)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),!0!==o||void 0!==n)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===i&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,i=this[e];!0!==t||this._$AL.has(e)||void 0===i||this.C(e,void 0,s,i)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}};E.elementStyles=[],E.shadowRootOptions={mode:"open"},E[S("elementProperties")]=new Map,E[S("finalized")]=new Map,b?.({ReactiveElement:E}),(v.reactiveElementVersions??=[]).push("2.1.1");
13
- /**
14
- * @license
15
- * Copyright 2017 Google LLC
16
- * SPDX-License-Identifier: BSD-3-Clause
17
- */
18
- const C=globalThis,A=C.trustedTypes,x=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,O="$lit$",N=`lit$${Math.random().toFixed(9).slice(2)}$`,k="?"+N,T=`<${k}>`,P=document,R=()=>P.createComment(""),I=t=>null===t||"object"!=typeof t&&"function"!=typeof t,M=Array.isArray,L="[ \t\n\f\r]",U=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,V=/-->/g,W=/>/g,j=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),H=/'/g,q=/"/g,D=/^(?:script|style|textarea|title)$/i,B=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),z=Symbol.for("lit-noChange"),F=Symbol.for("lit-nothing"),G=new WeakMap,J=P.createTreeWalker(P,129);function K(t,e){if(!M(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==x?x.createHTML(e):e}const Z=(t,e)=>{const s=t.length-1,i=[];let o,n=2===e?"<svg>":3===e?"<math>":"",r=U;for(let e=0;e<s;e++){const s=t[e];let c,l,a=-1,h=0;for(;h<s.length&&(r.lastIndex=h,l=r.exec(s),null!==l);)h=r.lastIndex,r===U?"!--"===l[1]?r=V:void 0!==l[1]?r=W:void 0!==l[2]?(D.test(l[2])&&(o=RegExp("</"+l[2],"g")),r=j):void 0!==l[3]&&(r=j):r===j?">"===l[0]?(r=o??U,a=-1):void 0===l[1]?a=-2:(a=r.lastIndex-l[2].length,c=l[1],r=void 0===l[3]?j:'"'===l[3]?q:H):r===q||r===H?r=j:r===V||r===W?r=U:(r=j,o=void 0);const d=r===j&&t[e+1].startsWith("/>")?" ":"";n+=r===U?s+T:a>=0?(i.push(c),s.slice(0,a)+O+s.slice(a)+N+d):s+N+(-2===a?e:d)}return[K(t,n+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),i]};class X{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0;const r=t.length-1,c=this.parts,[l,a]=Z(t,e);if(this.el=X.createElement(l,s),J.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(i=J.nextNode())&&c.length<r;){if(1===i.nodeType){if(i.hasAttributes())for(const t of i.getAttributeNames())if(t.endsWith(O)){const e=a[n++],s=i.getAttribute(t).split(N),r=/([.?@])?(.*)/.exec(e);c.push({type:1,index:o,name:r[2],strings:s,ctor:"."===r[1]?st:"?"===r[1]?it:"@"===r[1]?ot:et}),i.removeAttribute(t)}else t.startsWith(N)&&(c.push({type:6,index:o}),i.removeAttribute(t));if(D.test(i.tagName)){const t=i.textContent.split(N),e=t.length-1;if(e>0){i.textContent=A?A.emptyScript:"";for(let s=0;s<e;s++)i.append(t[s],R()),J.nextNode(),c.push({type:2,index:++o});i.append(t[e],R())}}}else if(8===i.nodeType)if(i.data===k)c.push({type:2,index:o});else{let t=-1;for(;-1!==(t=i.data.indexOf(N,t+1));)c.push({type:7,index:o}),t+=N.length-1}o++}}static createElement(t,e){const s=P.createElement("template");return s.innerHTML=t,s}}function Y(t,e,s=t,i){if(e===z)return e;let o=void 0!==i?s._$Co?.[i]:s._$Cl;const n=I(e)?void 0:e._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),void 0===n?o=void 0:(o=new n(t),o._$AT(t,s,i)),void 0!==i?(s._$Co??=[])[i]=o:s._$Cl=o),void 0!==o&&(e=Y(t,o._$AS(t,e.values),o,i)),e}class Q{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??P).importNode(e,!0);J.currentNode=i;let o=J.nextNode(),n=0,r=0,c=s[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new tt(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new nt(o,this,t)),this._$AV.push(e),c=s[++r]}n!==c?.index&&(o=J.nextNode(),n++)}return J.currentNode=P,i}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class tt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=F,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Y(this,t,e),I(t)?t===F||null==t||""===t?(this._$AH!==F&&this._$AR(),this._$AH=F):t!==this._$AH&&t!==z&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>M(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==F&&I(this._$AH)?this._$AA.nextSibling.data=t:this.T(P.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=X.createElement(K(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{const t=new Q(i,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=G.get(t.strings);return void 0===e&&G.set(t.strings,e=new X(t)),e}k(t){M(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,i=0;for(const o of t)i===e.length?e.push(s=new tt(this.O(R()),this.O(R()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class et{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=F,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=F}_$AI(t,e=this,s,i){const o=this.strings;let n=!1;if(void 0===o)t=Y(this,t,e,0),n=!I(t)||t!==this._$AH&&t!==z,n&&(this._$AH=t);else{const i=t;let r,c;for(t=o[0],r=0;r<o.length-1;r++)c=Y(this,i[s+r],e,r),c===z&&(c=this._$AH[r]),n||=!I(c)||c!==this._$AH[r],c===F?t=F:t!==F&&(t+=(c??"")+o[r+1]),this._$AH[r]=c}n&&!i&&this.j(t)}j(t){t===F?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class st extends et{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===F?void 0:t}}class it extends et{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==F)}}class ot extends et{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=Y(this,t,e,0)??F)===z)return;const s=this._$AH,i=t===F&&s!==F||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==F&&(s===F||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class nt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){Y(this,t)}}const rt=C.litHtmlPolyfillSupport;rt?.(X,tt),(C.litHtmlVersions??=[]).push("3.3.1");const ct=globalThis;
19
- /**
20
- * @license
21
- * Copyright 2017 Google LLC
22
- * SPDX-License-Identifier: BSD-3-Clause
23
- */let lt=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const i=s?.renderBefore??e;let o=i._$litPart$;if(void 0===o){const t=s?.renderBefore??null;i._$litPart$=o=new tt(e.insertBefore(R(),t),t,void 0,s??{})}return o._$AI(t),o})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return z}};lt._$litElement$=!0,lt.finalized=!0,ct.litElementHydrateSupport?.({LitElement:lt});const at=ct.litElementPolyfillSupport;at?.({LitElement:lt}),(ct.litElementVersions??=[]).push("4.2.1");
24
- /**
25
- * @license
26
- * Copyright 2017 Google LLC
27
- * SPDX-License-Identifier: BSD-3-Clause
28
- */
29
- const ht=t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},dt={attribute:!0,type:String,converter:$,reflect:!1,hasChanged:w},pt=(t=dt,e,s)=>{const{kind:i,metadata:o}=s;let n=globalThis.litPropertyMetadata.get(o);if(void 0===n&&globalThis.litPropertyMetadata.set(o,n=new Map),"setter"===i&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),"accessor"===i){const{name:i}=s;return{set(s){const o=e.get.call(this);e.set.call(this,s),this.requestUpdate(i,o,t)},init(e){return void 0!==e&&this.C(i,void 0,t,e),e}}}if("setter"===i){const{name:i}=s;return function(s){const o=this[i];e.call(this,s),this.requestUpdate(i,o,t)}}throw Error("Unsupported decorator location: "+i)};
30
- /**
31
- * @license
32
- * Copyright 2017 Google LLC
33
- * SPDX-License-Identifier: BSD-3-Clause
34
- */function ut(t){return(e,s)=>"object"==typeof s?pt(t,e,s):((t,e,s)=>{const i=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),i?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
35
- /**
36
- * @license
37
- * Copyright 2017 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */function ft(t){return ut({...t,state:!0,attribute:!1})}const gt={};const vt={popInline:"center",targetInline:"center",popBlock:"bottom",targetBlock:"top"},mt=new Set(["start","center","end"]),yt=new Set(["top","middle","bottom"]),bt={start:["end","start"],center:["center","center"],end:["start","end"]},St={top:["bottom","top"],middle:["middle","middle"],bottom:["top","bottom"]};function $t(t){const e=t.trim().split(/\s+to\s+/);if(1===e.length){const t=e[0];return mt.has(t)?bt[t]:null}return 2===e.length&&mt.has(e[0])&&mt.has(e[1])?[e[0],e[1]]:null}function wt(t){const e=t.trim().split(/\s+to\s+/);if(1===e.length){const t=e[0];return yt.has(t)?St[t]:null}return 2===e.length&&yt.has(e[0])&&yt.has(e[1])?[e[0],e[1]]:null}let _t=class extends lt{constructor(){var t;super(...arguments),this.mode="auto",this.target=null,this.position=null,this.trigger="click",this.#t=((t="tp-popover")in gt||(gt[t]=function*(t){let e=0;for(;;)yield`${t}-${e++}`}(t)),gt[t].next().value),this.#e=null,this.#s=!1,this.#i=[]}static{this.styles=(()=>{const t=l`
40
- tp-popover {
41
- --tp-popover-inline-position: attr(data-ti type(*));
42
- --tp-popover-block-position: attr(data-tb type(*));
43
- inset: auto;
44
- translate: var(--tp-popover-translate-x, 0) var(--tp-popover-translate-y, 0);
45
- position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
46
-
47
- &[data-tb="middle"] {
48
- --tp-popover-block-position: center;
49
- }
50
-
51
- &[data-pi="start"],
52
- &[data-pi="center"] {
53
- inset-inline-start: anchor(var(--tp-popover-inline-position));
54
- }
55
-
56
- &[data-pi="center"] {
57
- --tp-popover-translate-x: -50%;
58
- }
59
-
60
- &[data-pi="end"] {
61
- inset-inline-end: anchor(var(--tp-popover-inline-position));
62
- }
63
-
64
- &[data-pb="top"],
65
- &[data-pb="middle"] {
66
- inset-block-start: anchor(var(--tp-popover-block-position));
67
- }
68
-
69
- &[data-pb="middle"] {
70
- --tp-popover-translate-y: -50%;
71
- }
72
-
73
- &[data-pb="bottom"] {
74
- inset-block-end: anchor(var(--tp-popover-block-position));
75
- }
76
- }
77
- `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}#t;#e;get anchorElement(){return this.#e}get anchorName(){return`--${this.#t}`}#s;#i;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#o(),this.#n(),this.#r(),this.#c()}disconnectedCallback(){super.disconnectedCallback(),this.#l(),this.#a()}updated(t){t.has("mode")&&this.#o(),t.has("target")&&(this.#n(),this.#c()),t.has("position")&&this.#r(),t.has("trigger")&&this.#c()}render(){return B``}#o(){const t="manual"===this.mode?"manual":"auto";this.getAttribute("popover")!==t&&this.setAttribute("popover",t)}#h(){const t=this.target;if(t)try{const e=this.getRootNode().querySelector(t);if(e instanceof HTMLElement)return e;console.warn(`<tp-popover>: target "${t}" did not resolve to an HTMLElement; using parentElement.`)}catch{console.warn(`<tp-popover>: invalid target selector "${t}"; using parentElement.`)}const e=this.parentElement;if(e instanceof HTMLElement)return e;const s=this.getRootNode();return s instanceof ShadowRoot&&s.host instanceof HTMLElement?s.host:null}#n(){const t=this.#h();t!==this.#e?(this.#a(),this.#e=t,t&&this.#d(t)):t&&this.#d(t)}#d(t){const e=`--${this.#t}`,s=t.style.getPropertyValue("anchor-name").trim();if(s&&s!==e)return this.style.setProperty("position-anchor",s),void(this.#s=!1);t.style.setProperty("anchor-name",e),this.style.setProperty("position-anchor",e),this.#s=!0}#a(){if(this.#e&&this.#s){const t=`--${this.#t}`;this.#e.style.getPropertyValue("anchor-name").trim()===t&&this.#e.style.removeProperty("anchor-name")}this.#e=null,this.#s=!1,this.style.removeProperty("position-anchor")}#r(){let t=function(t){if(!t)return null;const e=t.trim().toLowerCase();if(!e)return null;if(!e.includes("/")){const t=$t(e);if(t){const[e,s]=St.middle;return{popInline:t[0],targetInline:t[1],popBlock:e,targetBlock:s}}const s=wt(e);if(s){const[t,e]=bt.center;return{popInline:t,targetInline:e,popBlock:s[0],targetBlock:s[1]}}return null}const s=e.split("/");if(2!==s.length)return null;const i=$t(s[0]),o=wt(s[1]);return i&&o?{popInline:i[0],targetInline:i[1],popBlock:o[0],targetBlock:o[1]}:null}(this.position);this.position&&!t&&console.warn(`<tp-popover>: invalid position "${this.position}"; using default.`),t??=vt,this.dataset.pi=t.popInline,this.dataset.ti=t.targetInline,this.dataset.pb=t.popBlock,this.dataset.tb=t.targetBlock}#l(){for(const t of this.#i)t();this.#i=[]}#c(){this.#l();const t=this.#e;if(t){if("click"===this.trigger){const e=t=>{if(!t.composedPath().includes(this))try{this.togglePopover()}catch{}};return t.addEventListener("click",e),void this.#i.push(()=>t.removeEventListener("click",e))}if("hover"===this.trigger){let e=null;const s=()=>{null!==e&&(clearTimeout(e),e=null)},i=()=>{s();try{this.showPopover()}catch{}},o=()=>{s(),e=setTimeout(()=>{try{this.hidePopover()}catch{}},120)};t.addEventListener("pointerenter",i),t.addEventListener("pointerleave",o),t.addEventListener("focusin",i),t.addEventListener("focusout",o),this.addEventListener("pointerenter",s),this.addEventListener("pointerleave",o),this.addEventListener("focusin",s),this.addEventListener("focusout",o),this.#i.push(()=>{s(),t.removeEventListener("pointerenter",i),t.removeEventListener("pointerleave",o),t.removeEventListener("focusin",i),t.removeEventListener("focusout",o),this.removeEventListener("pointerenter",s),this.removeEventListener("pointerleave",o),this.removeEventListener("focusin",s),this.removeEventListener("focusout",o)})}}}};e([ut({reflect:!0}),s("design:type",String)],_t.prototype,"mode",void 0),e([ut({reflect:!0}),s("design:type",Object)],_t.prototype,"target",void 0),e([ut({reflect:!0}),s("design:type",Object)],_t.prototype,"position",void 0),e([ut({reflect:!0}),s("design:type",String)],_t.prototype,"trigger",void 0),_t=e([ht("tp-popover")],_t);
1
+ this.TelperionElements=this.TelperionElements||{},function(t){"use strict";function e(t,e,s,o){var r,i=arguments.length,n=i<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,s):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,s,o);else for(var c=t.length-1;c>=0;c--)(r=t[c])&&(n=(i<3?r(n):i>3?r(e,s,n):r(e,s))||n);return i>3&&n&&Object.defineProperty(e,s,n),n}function s(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}"function"==typeof SuppressedError&&SuppressedError;
78
2
  /**
79
3
  * @license
80
4
  * Copyright 2021 Google LLC
81
5
  * SPDX-License-Identifier: BSD-3-Clause
82
6
  */
83
- let Et=class extends Event{constructor(t,e,s,i){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=s,this.subscribe=i??!1}};
7
+ let o=class extends Event{constructor(t,e,s,o){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e,this.callback=s,this.subscribe=o??!1}};
84
8
  /**
85
9
  * @license
86
10
  * Copyright 2021 Google LLC
@@ -91,7 +15,7 @@ let Et=class extends Event{constructor(t,e,s,i){super("context-request",{bubbles
91
15
  * Copyright 2021 Google LLC
92
16
  * SPDX-License-Identifier: BSD-3-Clause
93
17
  */
94
- let Ct=class{constructor(t,e,s,i){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=e,this.callback=s,this.subscribe=i??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new Et(this.context,this.host,this.t,this.subscribe))}},At=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:e}]of this.subscriptions)t(this.o,e)},void 0!==t&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:i}=this.subscriptions.get(t);t(this.value,i)}clearCallbacks(){this.subscriptions.clear()}},xt=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}},Ot=class extends At{constructor(t,e,s){super(void 0!==e.context?e.initialValue:s),this.onContextRequest=t=>{if(t.context!==this.context)return;const e=t.contextTarget??t.composedPath()[0];e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context)return;if((t.contextTarget??t.composedPath()[0])===this.host)return;const e=new Set;for(const[t,{consumerHost:s}]of this.subscriptions)e.has(t)||(e.add(t),s.dispatchEvent(new Et(this.context,s,t,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new xt(this.context,this.host))}};
18
+ let r=class{constructor(t,e,s,o){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(t,e)=>{this.unsubscribe&&(this.unsubscribe!==e&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=t,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(t,e)),this.unsubscribe=e},this.host=t,void 0!==e.context){const t=e;this.context=t.context,this.callback=t.callback,this.subscribe=t.subscribe??!1}else this.context=e,this.callback=s,this.subscribe=o??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new o(this.context,this.host,this.t,this.subscribe))}},i=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,e=!1){const s=e||!Object.is(t,this.o);this.o=t,s&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(const[t,{disposer:e}]of this.subscriptions)t(this.o,e)},void 0!==t&&(this.value=t)}addCallback(t,e,s){if(!s)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:e});const{disposer:o}=this.subscriptions.get(t);t(this.value,o)}clearCallbacks(){this.subscriptions.clear()}},n=class extends Event{constructor(t,e){super("context-provider",{bubbles:!0,composed:!0}),this.context=t,this.contextTarget=e}},c=class extends i{constructor(t,e,s){super(void 0!==e.context?e.initialValue:s),this.onContextRequest=t=>{if(t.context!==this.context)return;const e=t.contextTarget??t.composedPath()[0];e!==this.host&&(t.stopPropagation(),this.addCallback(t.callback,e,t.subscribe))},this.onProviderRequest=t=>{if(t.context!==this.context)return;if((t.contextTarget??t.composedPath()[0])===this.host)return;const e=new Set;for(const[t,{consumerHost:s}]of this.subscriptions)e.has(t)||(e.add(t),s.dispatchEvent(new o(this.context,s,t,!0)));t.stopPropagation()},this.host=t,void 0!==e.context?this.context=e.context:this.context=e,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new n(this.context,this.host))}};
95
19
  /**
96
20
  * @license
97
21
  * Copyright 2021 Google LLC
@@ -102,7 +26,7 @@ let Ct=class{constructor(t,e,s,i){if(this.subscribe=!1,this.provided=!1,this.val
102
26
  * Copyright 2022 Google LLC
103
27
  * SPDX-License-Identifier: BSD-3-Clause
104
28
  */
105
- function Nt({context:t,subscribe:e}){return(s,i)=>{"object"==typeof i?i.addInitializer(function(){new Ct(this,{context:t,callback:t=>{s.set.call(this,t)},subscribe:e})}):s.constructor.addInitializer(s=>{new Ct(s,{context:t,callback:t=>{s[i]=t},subscribe:e})})}}var kt=Object.defineProperty,Tt=(t,e,s)=>(((t,e,s)=>{e in t?kt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(t,"symbol"!=typeof e?e+"":e,s),s),Pt=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},Rt=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},It=(t,e,s)=>(((t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)})(t,e,"access private method"),s);
29
+ function l({context:t,subscribe:e}){return(s,o)=>{"object"==typeof o?o.addInitializer(function(){new r(this,{context:t,callback:t=>{s.set.call(this,t)},subscribe:e})}):s.constructor.addInitializer(s=>{new r(s,{context:t,callback:t=>{s[o]=t},subscribe:e})})}}var a=Object.defineProperty,h=(t,e,s)=>(((t,e,s)=>{e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s})(t,"symbol"!=typeof e?e+"":e,s),s),d=(t,e)=>{if(Object(e)!==e)throw TypeError('Cannot use the "in" operator on this value');return t.has(e)},p=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},u=(t,e,s)=>(((t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)})(t,e,"access private method"),s);
106
30
  /**
107
31
  * @license
108
32
  * Copyright Google LLC All Rights Reserved.
@@ -110,21 +34,21 @@ function Nt({context:t,subscribe:e}){return(s,i)=>{"object"==typeof i?i.addIniti
110
34
  * Use of this source code is governed by an MIT-style license that can be
111
35
  * found in the LICENSE file at https://angular.io/license
112
36
  */
113
- function Mt(t,e){return Object.is(t,e)}
37
+ function f(t,e){return Object.is(t,e)}
114
38
  /**
115
39
  * @license
116
40
  * Copyright Google LLC All Rights Reserved.
117
41
  *
118
42
  * Use of this source code is governed by an MIT-style license that can be
119
43
  * found in the LICENSE file at https://angular.io/license
120
- */let Lt=null,Ut=!1,Vt=1;const Wt=Symbol("SIGNAL");function jt(t){const e=Lt;return Lt=t,e}const Ht={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function qt(t){if(Ut)throw new Error("undefined"!=typeof ngDevMode&&ngDevMode?"Assertion error: signal read during notification phase":"");if(null===Lt)return;Lt.consumerOnSignalRead(t);const e=Lt.nextProducerIndex++;if(Kt(Lt),e<Lt.producerNode.length&&Lt.producerNode[e]!==t&&Jt(Lt)){Gt(Lt.producerNode[e],Lt.producerIndexOfThis[e])}Lt.producerNode[e]!==t&&(Lt.producerNode[e]=t,Lt.producerIndexOfThis[e]=Jt(Lt)?Ft(t,Lt,e):0),Lt.producerLastReadVersion[e]=t.version}function Dt(t){if(t.dirty||t.lastCleanEpoch!==Vt){if(!t.producerMustRecompute(t)&&!function(t){Kt(t);for(let e=0;e<t.producerNode.length;e++){const s=t.producerNode[e],i=t.producerLastReadVersion[e];if(i!==s.version)return!0;if(Dt(s),i!==s.version)return!0}return!1}(t))return t.dirty=!1,void(t.lastCleanEpoch=Vt);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=Vt}}function Bt(t){if(void 0===t.liveConsumerNode)return;const e=Ut;Ut=!0;try{for(const e of t.liveConsumerNode)e.dirty||zt(e)}finally{Ut=e}}function zt(t){var e;t.dirty=!0,Bt(t),null==(e=t.consumerMarkedDirty)||e.call(t.wrapper??t)}function Ft(t,e,s){var i;if(Zt(t),Kt(t),0===t.liveConsumerNode.length){null==(i=t.watched)||i.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)t.producerIndexOfThis[e]=Ft(t.producerNode[e],t,e)}return t.liveConsumerIndexOfThis.push(s),t.liveConsumerNode.push(e)-1}function Gt(t,e){var s;if(Zt(t),Kt(t),"undefined"!=typeof ngDevMode&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(1===t.liveConsumerNode.length){null==(s=t.unwatched)||s.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)Gt(t.producerNode[e],t.producerIndexOfThis[e])}const i=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[i],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[i],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){const s=t.liveConsumerIndexOfThis[e],i=t.liveConsumerNode[e];Kt(i),i.producerIndexOfThis[s]=e}}function Jt(t){var e;return t.consumerIsAlwaysLive||((null==(e=null==t?void 0:t.liveConsumerNode)?void 0:e.length)??0)>0}function Kt(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function Zt(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}
44
+ */let m=null,v=!1,g=1;const y=Symbol("SIGNAL");function b(t){const e=m;return m=t,e}const S={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function $(t){if(v)throw new Error("undefined"!=typeof ngDevMode&&ngDevMode?"Assertion error: signal read during notification phase":"");if(null===m)return;m.consumerOnSignalRead(t);const e=m.nextProducerIndex++;if(O(m),e<m.producerNode.length&&m.producerNode[e]!==t&&x(m)){C(m.producerNode[e],m.producerIndexOfThis[e])}m.producerNode[e]!==t&&(m.producerNode[e]=t,m.producerIndexOfThis[e]=x(m)?A(t,m,e):0),m.producerLastReadVersion[e]=t.version}function w(t){if(t.dirty||t.lastCleanEpoch!==g){if(!t.producerMustRecompute(t)&&!function(t){O(t);for(let e=0;e<t.producerNode.length;e++){const s=t.producerNode[e],o=t.producerLastReadVersion[e];if(o!==s.version)return!0;if(w(s),o!==s.version)return!0}return!1}(t))return t.dirty=!1,void(t.lastCleanEpoch=g);t.producerRecomputeValue(t),t.dirty=!1,t.lastCleanEpoch=g}}function _(t){if(void 0===t.liveConsumerNode)return;const e=v;v=!0;try{for(const e of t.liveConsumerNode)e.dirty||E(e)}finally{v=e}}function E(t){var e;t.dirty=!0,_(t),null==(e=t.consumerMarkedDirty)||e.call(t.wrapper??t)}function A(t,e,s){var o;if(N(t),O(t),0===t.liveConsumerNode.length){null==(o=t.watched)||o.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)t.producerIndexOfThis[e]=A(t.producerNode[e],t,e)}return t.liveConsumerIndexOfThis.push(s),t.liveConsumerNode.push(e)-1}function C(t,e){var s;if(N(t),O(t),"undefined"!=typeof ngDevMode&&ngDevMode&&e>=t.liveConsumerNode.length)throw new Error(`Assertion error: active consumer index ${e} is out of bounds of ${t.liveConsumerNode.length} consumers)`);if(1===t.liveConsumerNode.length){null==(s=t.unwatched)||s.call(t.wrapper);for(let e=0;e<t.producerNode.length;e++)C(t.producerNode[e],t.producerIndexOfThis[e])}const o=t.liveConsumerNode.length-1;if(t.liveConsumerNode[e]=t.liveConsumerNode[o],t.liveConsumerIndexOfThis[e]=t.liveConsumerIndexOfThis[o],t.liveConsumerNode.length--,t.liveConsumerIndexOfThis.length--,e<t.liveConsumerNode.length){const s=t.liveConsumerIndexOfThis[e],o=t.liveConsumerNode[e];O(o),o.producerIndexOfThis[s]=e}}function x(t){var e;return t.consumerIsAlwaysLive||((null==(e=null==t?void 0:t.liveConsumerNode)?void 0:e.length)??0)>0}function O(t){t.producerNode??(t.producerNode=[]),t.producerIndexOfThis??(t.producerIndexOfThis=[]),t.producerLastReadVersion??(t.producerLastReadVersion=[])}function N(t){t.liveConsumerNode??(t.liveConsumerNode=[]),t.liveConsumerIndexOfThis??(t.liveConsumerIndexOfThis=[])}
121
45
  /**
122
46
  * @license
123
47
  * Copyright Google LLC All Rights Reserved.
124
48
  *
125
49
  * Use of this source code is governed by an MIT-style license that can be
126
50
  * found in the LICENSE file at https://angular.io/license
127
- */function Xt(t){if(Dt(t),qt(t),t.value===te)throw t.error;return t.value}const Yt=Symbol("UNSET"),Qt=Symbol("COMPUTING"),te=Symbol("ERRORED"),ee=(()=>({...Ht,value:Yt,dirty:!0,error:null,equal:Mt,producerMustRecompute:t=>t.value===Yt||t.value===Qt,producerRecomputeValue(t){if(t.value===Qt)throw new Error("Detected cycle in computations.");const e=t.value;t.value=Qt;const s=function(t){return t&&(t.nextProducerIndex=0),jt(t)}(t);let i,o=!1;try{i=t.computation.call(t.wrapper);o=e!==Yt&&e!==te&&t.equal.call(t.wrapper,e,i)}catch(e){i=te,t.error=e}finally{!function(t,e){if(jt(e),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(Jt(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)Gt(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(t,s)}o?t.value=e:(t.value=i,t.version++)}}))();let se=
51
+ */function k(t){if(w(t),$(t),t.value===R)throw t.error;return t.value}const T=Symbol("UNSET"),P=Symbol("COMPUTING"),R=Symbol("ERRORED"),I=(()=>({...S,value:T,dirty:!0,error:null,equal:f,producerMustRecompute:t=>t.value===T||t.value===P,producerRecomputeValue(t){if(t.value===P)throw new Error("Detected cycle in computations.");const e=t.value;t.value=P;const s=function(t){return t&&(t.nextProducerIndex=0),b(t)}(t);let o,r=!1;try{o=t.computation.call(t.wrapper);r=e!==T&&e!==R&&t.equal.call(t.wrapper,e,o)}catch(e){o=R,t.error=e}finally{!function(t,e){if(b(e),t&&void 0!==t.producerNode&&void 0!==t.producerIndexOfThis&&void 0!==t.producerLastReadVersion){if(x(t))for(let e=t.nextProducerIndex;e<t.producerNode.length;e++)C(t.producerNode[e],t.producerIndexOfThis[e]);for(;t.producerNode.length>t.nextProducerIndex;)t.producerNode.pop(),t.producerLastReadVersion.pop(),t.producerIndexOfThis.pop()}}(t,s)}r?t.value=e:(t.value=o,t.version++)}}))();let M=
128
52
  /**
129
53
  * @license
130
54
  * Copyright Google LLC All Rights Reserved.
@@ -132,7 +56,7 @@ function Mt(t,e){return Object.is(t,e)}
132
56
  * Use of this source code is governed by an MIT-style license that can be
133
57
  * found in the LICENSE file at https://angular.io/license
134
58
  */
135
- function(){throw new Error};function ie(){return qt(this),this.value}function oe(t,e){!1===(null==Lt?void 0:Lt.consumerAllowSignalWrites)&&se(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,function(t){t.version++,Vt++,Bt(t)}
59
+ function(){throw new Error};function L(){return $(this),this.value}function U(t,e){!1===(null==m?void 0:m.consumerAllowSignalWrites)&&M(),t.equal.call(t.wrapper,t.value,e)||(t.value=e,function(t){t.version++,g++,_(t)}
136
60
  /**
137
61
  * @license
138
62
  * Copyright 2024 Bloomberg Finance L.P.
@@ -148,7 +72,7 @@ function(){throw new Error};function ie(){return qt(this),this.value}function oe
148
72
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149
73
  * See the License for the specific language governing permissions and
150
74
  * limitations under the License.
151
- */(t))}const ne=(()=>({...Ht,equal:Mt,value:void 0}))();const re=Symbol("node");var ce;(t=>{var e,s,i,o;e=re,s=new WeakSet,t.isState=t=>"object"==typeof t&&Pt(s,t),t.State=class{constructor(i,o={}){Rt(this,s),Tt(this,e);const n=
75
+ */(t))}const V=(()=>({...S,equal:f,value:void 0}))();const W=Symbol("node");var j;(t=>{var e,s,o,r;e=W,s=new WeakSet,t.isState=t=>"object"==typeof t&&d(s,t),t.State=class{constructor(o,r={}){p(this,s),h(this,e);const i=
152
76
  /**
153
77
  * @license
154
78
  * Copyright Google LLC All Rights Reserved.
@@ -156,24 +80,105 @@ function(){throw new Error};function ie(){return qt(this),this.value}function oe
156
80
  * Use of this source code is governed by an MIT-style license that can be
157
81
  * found in the LICENSE file at https://angular.io/license
158
82
  */
159
- function(t){const e=Object.create(ne);e.value=t;const s=()=>(qt(e),e.value);return s[Wt]=e,s}(i),r=n[Wt];if(this[re]=r,r.wrapper=this,o){const e=o.equals;e&&(r.equal=e),r.watched=o[t.subtle.watched],r.unwatched=o[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return ie.call(this[re])}set(e){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(Ut)throw new Error("Writes to signals not permitted during Watcher callback");oe(this[re],e)}};i=re,o=new WeakSet,t.isComputed=t=>"object"==typeof t&&Pt(o,t),t.Computed=class{constructor(e,s){Rt(this,o),Tt(this,i);const n=function(t){const e=Object.create(ee);e.computation=t;const s=()=>Xt(e);return s[Wt]=e,s}(e),r=n[Wt];if(r.consumerAllowSignalWrites=!0,this[re]=r,r.wrapper=this,s){const e=s.equals;e&&(r.equal=e),r.watched=s[t.subtle.watched],r.unwatched=s[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return Xt(this[re])}},(e=>{var s,i,o,n;e.untrack=function(t){let e,s=null;try{s=jt(null),e=t()}finally{jt(s)}return e},e.introspectSources=function(e){var s;if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return(null==(s=e[re].producerNode)?void 0:s.map(t=>t.wrapper))??[]},e.introspectSinks=function(e){var s;if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called introspectSinks without a Signal argument");return(null==(s=e[re].liveConsumerNode)?void 0:s.map(t=>t.wrapper))??[]},e.hasSinks=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called hasSinks without a Signal argument");const s=e[re].liveConsumerNode;return!!s&&s.length>0},e.hasSources=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called hasSources without a Computed or Watcher argument");const s=e[re].producerNode;return!!s&&s.length>0};s=re,i=new WeakSet,o=new WeakSet,n=function(e){for(const s of e)if(!(0,t.isComputed)(s)&&!(0,t.isState)(s))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=t=>Pt(i,t),e.Watcher=class{constructor(t){Rt(this,i),Rt(this,o),Tt(this,s);let e=Object.create(Ht);e.wrapper=this,e.consumerMarkedDirty=t,e.consumerIsAlwaysLive=!0,e.consumerAllowSignalWrites=!1,e.producerNode=[],this[re]=e}watch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");It(this,o,n).call(this,e);const s=this[re];s.dirty=!1;const i=jt(s);for(const t of e)qt(t[re]);jt(i)}unwatch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");It(this,o,n).call(this,e);const s=this[re];Kt(s);for(let t=s.producerNode.length-1;t>=0;t--)if(e.includes(s.producerNode[t].wrapper)){Gt(s.producerNode[t],s.producerIndexOfThis[t]);const e=s.producerNode.length-1;if(s.producerNode[t]=s.producerNode[e],s.producerIndexOfThis[t]=s.producerIndexOfThis[e],s.producerNode.length--,s.producerIndexOfThis.length--,s.nextProducerIndex--,t<s.producerNode.length){const e=s.producerIndexOfThis[t],i=s.producerNode[t];Zt(i),i.liveConsumerIndexOfThis[e]=t}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[re].producerNode.filter(t=>t.dirty).map(t=>t.wrapper)}},e.currentComputed=function(){var t;return null==(t=Lt)?void 0:t.wrapper},e.watched=Symbol("watched"),e.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(ce||(ce={}));
83
+ function(t){const e=Object.create(V);e.value=t;const s=()=>($(e),e.value);return s[y]=e,s}(o),n=i[y];if(this[W]=n,n.wrapper=this,r){const e=r.equals;e&&(n.equal=e),n.watched=r[t.subtle.watched],n.unwatched=r[t.subtle.unwatched]}}get(){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return L.call(this[W])}set(e){if(!(0,t.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(v)throw new Error("Writes to signals not permitted during Watcher callback");U(this[W],e)}};o=W,r=new WeakSet,t.isComputed=t=>"object"==typeof t&&d(r,t),t.Computed=class{constructor(e,s){p(this,r),h(this,o);const i=function(t){const e=Object.create(I);e.computation=t;const s=()=>k(e);return s[y]=e,s}(e),n=i[y];if(n.consumerAllowSignalWrites=!0,this[W]=n,n.wrapper=this,s){const e=s.equals;e&&(n.equal=e),n.watched=s[t.subtle.watched],n.unwatched=s[t.subtle.unwatched]}}get(){if(!(0,t.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return k(this[W])}},(e=>{var s,o,r,i;e.untrack=function(t){let e,s=null;try{s=b(null),e=t()}finally{b(s)}return e},e.introspectSources=function(e){var s;if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called introspectSources without a Computed or Watcher argument");return(null==(s=e[W].producerNode)?void 0:s.map(t=>t.wrapper))??[]},e.introspectSinks=function(e){var s;if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called introspectSinks without a Signal argument");return(null==(s=e[W].liveConsumerNode)?void 0:s.map(t=>t.wrapper))??[]},e.hasSinks=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isState)(e))throw new TypeError("Called hasSinks without a Signal argument");const s=e[W].liveConsumerNode;return!!s&&s.length>0},e.hasSources=function(e){if(!(0,t.isComputed)(e)&&!(0,t.isWatcher)(e))throw new TypeError("Called hasSources without a Computed or Watcher argument");const s=e[W].producerNode;return!!s&&s.length>0};s=W,o=new WeakSet,r=new WeakSet,i=function(e){for(const s of e)if(!(0,t.isComputed)(s)&&!(0,t.isState)(s))throw new TypeError("Called watch/unwatch without a Computed or State argument")},t.isWatcher=t=>d(o,t),e.Watcher=class{constructor(t){p(this,o),p(this,r),h(this,s);let e=Object.create(S);e.wrapper=this,e.consumerMarkedDirty=t,e.consumerIsAlwaysLive=!0,e.consumerAllowSignalWrites=!1,e.producerNode=[],this[W]=e}watch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");u(this,r,i).call(this,e);const s=this[W];s.dirty=!1;const o=b(s);for(const t of e)$(t[W]);b(o)}unwatch(...e){if(!(0,t.isWatcher)(this))throw new TypeError("Called unwatch without Watcher receiver");u(this,r,i).call(this,e);const s=this[W];O(s);for(let t=s.producerNode.length-1;t>=0;t--)if(e.includes(s.producerNode[t].wrapper)){C(s.producerNode[t],s.producerIndexOfThis[t]);const e=s.producerNode.length-1;if(s.producerNode[t]=s.producerNode[e],s.producerIndexOfThis[t]=s.producerIndexOfThis[e],s.producerNode.length--,s.producerIndexOfThis.length--,s.nextProducerIndex--,t<s.producerNode.length){const e=s.producerIndexOfThis[t],o=s.producerNode[t];N(o),o.liveConsumerIndexOfThis[e]=t}}}getPending(){if(!(0,t.isWatcher)(this))throw new TypeError("Called getPending without Watcher receiver");return this[W].producerNode.filter(t=>t.dirty).map(t=>t.wrapper)}},e.currentComputed=function(){var t;return null==(t=m)?void 0:t.wrapper},e.watched=Symbol("watched"),e.unwatched=Symbol("unwatched")})(t.subtle||(t.subtle={}))})(j||(j={}));
160
84
  /**
161
85
  * @license
162
86
  * Copyright 2023 Google LLC
163
87
  * SPDX-License-Identifier: BSD-3-Clause
164
88
  */
165
- let le=!1;const ae=new ce.subtle.Watcher(()=>{le||(le=!0,queueMicrotask(()=>{le=!1;for(const t of ae.getPending())t.get();ae.watch()}))}),he=Symbol("SignalWatcherBrand"),de=new FinalizationRegistry(t=>{t.unwatch(...ce.subtle.introspectSources(t))}),pe=new WeakMap;
89
+ let q=!1;const H=new j.subtle.Watcher(()=>{q||(q=!0,queueMicrotask(()=>{q=!1;for(const t of H.getPending())t.get();H.watch()}))}),D=Symbol("SignalWatcherBrand"),B=new FinalizationRegistry(t=>{t.unwatch(...j.subtle.introspectSources(t))}),z=new WeakMap;function F(t){return!0===t[D]?(console.warn("SignalWatcher should not be applied to the same class more than once."),t):class extends t{constructor(){super(...arguments),this._$St=new Map,this._$So=new j.State(0),this._$Si=!1}_$Sl(){var t,e;const s=[],o=[];this._$St.forEach((t,e)=>{((null==t?void 0:t.beforeUpdate)?s:o).push(e)});const r=null===(t=this.h)||void 0===t?void 0:t.getPending().filter(t=>t!==this._$Su&&!this._$St.has(t));s.forEach(t=>t.get()),null===(e=this._$Su)||void 0===e||e.get(),r.forEach(t=>t.get()),o.forEach(t=>t.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(void 0!==this.h)return;this._$Su=new j.Computed(()=>{this._$So.get(),super.performUpdate()});const t=this.h=new j.subtle.Watcher(function(){const t=z.get(this);void 0!==t&&(!1===t._$Si&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});z.set(t,this),B.register(this,t),t.watch(this._$Su),t.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(void 0===this.h)return;let t=!1;this.h.unwatch(...j.subtle.introspectSources(this.h).filter(e=>{var s;const o=!0!==(null===(s=this._$St.get(e))||void 0===s?void 0:s.manualDispose);return o&&this._$St.delete(e),t||(t=!o),o})),t||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(t,e){var s;this._$S_();const o=new j.Computed(()=>{t()});return this.h.watch(o),this._$St.set(o,e),null!==(s=null==e?void 0:e.beforeUpdate)&&void 0!==s&&s?j.subtle.untrack(()=>o.get()):this.updateComplete.then(()=>j.subtle.untrack(()=>o.get())),()=>{this._$St.delete(o),this.h.unwatch(o),!1===this.isConnected&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{!1===this.isConnected&&this._$Sp()})}}}
90
+ /**
91
+ * @license
92
+ * Copyright 2017 Google LLC
93
+ * SPDX-License-Identifier: BSD-3-Clause
94
+ */const G=globalThis,J=G.trustedTypes,K=J?J.createPolicy("lit-html",{createHTML:t=>t}):void 0,Z="$lit$",X=`lit$${Math.random().toFixed(9).slice(2)}$`,Y="?"+X,Q=`<${Y}>`,tt=document,et=()=>tt.createComment(""),st=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ot=Array.isArray,rt="[ \t\n\f\r]",it=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,nt=/-->/g,ct=/>/g,lt=RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),at=/'/g,ht=/"/g,dt=/^(?:script|style|textarea|title)$/i,pt=(t=>(e,...s)=>({_$litType$:t,strings:e,values:s}))(1),ut=Symbol.for("lit-noChange"),ft=Symbol.for("lit-nothing"),mt=new WeakMap,vt=tt.createTreeWalker(tt,129);function gt(t,e){if(!ot(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==K?K.createHTML(e):e}const yt=(t,e)=>{const s=t.length-1,o=[];let r,i=2===e?"<svg>":3===e?"<math>":"",n=it;for(let e=0;e<s;e++){const s=t[e];let c,l,a=-1,h=0;for(;h<s.length&&(n.lastIndex=h,l=n.exec(s),null!==l);)h=n.lastIndex,n===it?"!--"===l[1]?n=nt:void 0!==l[1]?n=ct:void 0!==l[2]?(dt.test(l[2])&&(r=RegExp("</"+l[2],"g")),n=lt):void 0!==l[3]&&(n=lt):n===lt?">"===l[0]?(n=r??it,a=-1):void 0===l[1]?a=-2:(a=n.lastIndex-l[2].length,c=l[1],n=void 0===l[3]?lt:'"'===l[3]?ht:at):n===ht||n===at?n=lt:n===nt||n===ct?n=it:(n=lt,r=void 0);const d=n===lt&&t[e+1].startsWith("/>")?" ":"";i+=n===it?s+Q:a>=0?(o.push(c),s.slice(0,a)+Z+s.slice(a)+X+d):s+X+(-2===a?e:d)}return[gt(t,i+(t[s]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),o]};class bt{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let r=0,i=0;const n=t.length-1,c=this.parts,[l,a]=yt(t,e);if(this.el=bt.createElement(l,s),vt.currentNode=this.el.content,2===e||3===e){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(o=vt.nextNode())&&c.length<n;){if(1===o.nodeType){if(o.hasAttributes())for(const t of o.getAttributeNames())if(t.endsWith(Z)){const e=a[i++],s=o.getAttribute(t).split(X),n=/([.?@])?(.*)/.exec(e);c.push({type:1,index:r,name:n[2],strings:s,ctor:"."===n[1]?Et:"?"===n[1]?At:"@"===n[1]?Ct:_t}),o.removeAttribute(t)}else t.startsWith(X)&&(c.push({type:6,index:r}),o.removeAttribute(t));if(dt.test(o.tagName)){const t=o.textContent.split(X),e=t.length-1;if(e>0){o.textContent=J?J.emptyScript:"";for(let s=0;s<e;s++)o.append(t[s],et()),vt.nextNode(),c.push({type:2,index:++r});o.append(t[e],et())}}}else if(8===o.nodeType)if(o.data===Y)c.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(X,t+1));)c.push({type:7,index:r}),t+=X.length-1}r++}}static createElement(t,e){const s=tt.createElement("template");return s.innerHTML=t,s}}function St(t,e,s=t,o){if(e===ut)return e;let r=void 0!==o?s._$Co?.[o]:s._$Cl;const i=st(e)?void 0:e._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),void 0===i?r=void 0:(r=new i(t),r._$AT(t,s,o)),void 0!==o?(s._$Co??=[])[o]=r:s._$Cl=r),void 0!==r&&(e=St(t,r._$AS(t,e.values),r,o)),e}class $t{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){const{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??tt).importNode(e,!0);vt.currentNode=o;let r=vt.nextNode(),i=0,n=0,c=s[0];for(;void 0!==c;){if(i===c.index){let e;2===c.type?e=new wt(r,r.nextSibling,this,t):1===c.type?e=new c.ctor(r,c.name,c.strings,this,t):6===c.type&&(e=new xt(r,this,t)),this._$AV.push(e),c=s[++n]}i!==c?.index&&(r=vt.nextNode(),i++)}return vt.currentNode=tt,o}p(t){let e=0;for(const s of this._$AV)void 0!==s&&(void 0!==s.strings?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}}class wt{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=ft,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=St(this,t,e),st(t)?t===ft||null==t||""===t?(this._$AH!==ft&&this._$AR(),this._$AH=ft):t!==this._$AH&&t!==ut&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>ot(t)||"function"==typeof t?.[Symbol.iterator])(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==ft&&st(this._$AH)?this._$AA.nextSibling.data=t:this.T(tt.createTextNode(t)),this._$AH=t}$(t){const{values:e,_$litType$:s}=t,o="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=bt.createElement(gt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{const t=new $t(o,this),s=t.u(this.options);t.p(e),this.T(s),this._$AH=t}}_$AC(t){let e=mt.get(t.strings);return void 0===e&&mt.set(t.strings,e=new bt(t)),e}k(t){ot(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let s,o=0;for(const r of t)o===e.length?e.push(s=new wt(this.O(et()),this.O(et()),this,this.options)):s=e[o],s._$AI(r),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class _t{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,r){this.type=1,this._$AH=ft,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=ft}_$AI(t,e=this,s,o){const r=this.strings;let i=!1;if(void 0===r)t=St(this,t,e,0),i=!st(t)||t!==this._$AH&&t!==ut,i&&(this._$AH=t);else{const o=t;let n,c;for(t=r[0],n=0;n<r.length-1;n++)c=St(this,o[s+n],e,n),c===ut&&(c=this._$AH[n]),i||=!st(c)||c!==this._$AH[n],c===ft?t=ft:t!==ft&&(t+=(c??"")+r[n+1]),this._$AH[n]=c}i&&!o&&this.j(t)}j(t){t===ft?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class Et extends _t{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ft?void 0:t}}class At extends _t{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==ft)}}class Ct extends _t{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){if((t=St(this,t,e,0)??ft)===ut)return;const s=this._$AH,o=t===ft&&s!==ft||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==ft&&(s===ft||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class xt{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){St(this,t)}}const Ot=G.litHtmlPolyfillSupport;Ot?.(bt,wt),(G.litHtmlVersions??=[]).push("3.3.1");
166
95
  /**
167
96
  * @license
168
97
  * Copyright 2023 Google LLC
169
98
  * SPDX-License-Identifier: BSD-3-Clause
170
99
  */
171
- let ue=!1;const fe=new ce.subtle.Watcher(async()=>{ue||(ue=!0,queueMicrotask(()=>{ue=!1;for(const t of fe.getPending())t.get();fe.watch()}))});
100
+ let Nt=!1;const kt=new j.subtle.Watcher(async()=>{Nt||(Nt=!0,queueMicrotask(()=>{Nt=!1;for(const t of kt.getPending())t.get();kt.watch()}))});
172
101
  /**
173
102
  * @license
174
103
  * Copyright 2023 Google LLC
175
104
  * SPDX-License-Identifier: BSD-3-Clause
176
- */ce.State,ce.Computed;const ge=(t,e)=>new ce.State(t,e);const ve=Symbol("tp-select");class me{#p;#u;#f=!1;constructor(t,e={}){const{attributes:s=!0,childList:i=!0,characterData:o=!0}=e;this.#p=t,this.clone=t.cloneNode(!0),this.#u=new MutationObserver(t=>this.#g(t)),this.#u.observe(t,{attributes:s,childList:i,characterData:o,subtree:!0})}disconnect(){this.#f||(this.#f=!0,this.#u.disconnect())}#g(t){for(const e of t){const t=this.#v(e.target);if(!t)continue;const s=this.#m(t);if(s)switch(e.type){case"attributes":this.#y(e,s);break;case"characterData":s.nodeValue=e.target.nodeValue;break;case"childList":this.#b(e.target,s)}}}#y(t,e){const s=t.attributeName;if(!s)return;const i=t.attributeNamespace??null,o=t.target,n=i?o.getAttributeNS(i,s):o.getAttribute(s);null===n?i?e.removeAttributeNS(i,s):e.removeAttribute(s):i?e.setAttributeNS(i,s,n):e.setAttribute(s,n)}#b(t,e){for(;e.firstChild;)e.removeChild(e.firstChild);for(const s of Array.from(t.childNodes))e.appendChild(s.cloneNode(!0))}#v(t){if(t===this.#p)return[];const e=[];let s=t;for(;s&&s!==this.#p;){const t=s.parentNode;if(!t)return null;e.push(Array.prototype.indexOf.call(t.childNodes,s)),s=t}return s===this.#p?e.reverse():null}#m(t){let e=this.clone;for(const s of t){const t=e.childNodes[s];if(!t)return null;e=t}return e}}const ye=function(t){return!0===t[he]?(console.warn("SignalWatcher should not be applied to the same class more than once."),t):class extends t{constructor(){super(...arguments),this._$St=new Map,this._$So=new ce.State(0),this._$Si=!1}_$Sl(){var t,e;const s=[],i=[];this._$St.forEach((t,e)=>{((null==t?void 0:t.beforeUpdate)?s:i).push(e)});const o=null===(t=this.h)||void 0===t?void 0:t.getPending().filter(t=>t!==this._$Su&&!this._$St.has(t));s.forEach(t=>t.get()),null===(e=this._$Su)||void 0===e||e.get(),o.forEach(t=>t.get()),i.forEach(t=>t.get())}_$Sv(){this.isUpdatePending||queueMicrotask(()=>{this.isUpdatePending||this._$Sl()})}_$S_(){if(void 0!==this.h)return;this._$Su=new ce.Computed(()=>{this._$So.get(),super.performUpdate()});const t=this.h=new ce.subtle.Watcher(function(){const t=pe.get(this);void 0!==t&&(!1===t._$Si&&(new Set(this.getPending()).has(t._$Su)?t.requestUpdate():t._$Sv()),this.watch())});pe.set(t,this),de.register(this,t),t.watch(this._$Su),t.watch(...Array.from(this._$St).map(([t])=>t))}_$Sp(){if(void 0===this.h)return;let t=!1;this.h.unwatch(...ce.subtle.introspectSources(this.h).filter(e=>{var s;const i=!0!==(null===(s=this._$St.get(e))||void 0===s?void 0:s.manualDispose);return i&&this._$St.delete(e),t||(t=!i),i})),t||(this._$Su=void 0,this.h=void 0,this._$St.clear())}updateEffect(t,e){var s;this._$S_();const i=new ce.Computed(()=>{t()});return this.h.watch(i),this._$St.set(i,e),null!==(s=null==e?void 0:e.beforeUpdate)&&void 0!==s&&s?ce.subtle.untrack(()=>i.get()):this.updateComplete.then(()=>ce.subtle.untrack(()=>i.get())),()=>{this._$St.delete(i),this.h.unwatch(i),!1===this.isConnected&&this._$Sp()}}performUpdate(){this.isUpdatePending&&(this._$S_(),this._$Si=!0,this._$So.set(this._$So.get()+1),this._$Si=!1,this._$Sl())}connectedCallback(){super.connectedCallback(),this.requestUpdate()}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{!1===this.isConnected&&this._$Sp()})}}}(lt),be=Symbol("select:register-option"),Se=Symbol("select:unregister-option"),$e=Symbol("option:should-register-to-select");var we,_e;t.SelectedContentElement=class extends ye{static{this.styles=(()=>{const t=l`
105
+ */j.State,j.Computed;const Tt=(t,e)=>new j.State(t,e),Pt=globalThis,Rt=Pt.ShadowRoot&&(void 0===Pt.ShadyCSS||Pt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,It=Symbol(),Mt=new WeakMap;
106
+ /**
107
+ * @license
108
+ * Copyright 2019 Google LLC
109
+ * SPDX-License-Identifier: BSD-3-Clause
110
+ */let Lt=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==It)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(Rt&&void 0===t){const s=void 0!==e&&1===e.length;s&&(t=Mt.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Mt.set(e,t))}return t}toString(){return this.cssText}};const Ut=(t,...e)=>{const s=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(s)+t[o+1],t[0]);return new Lt(s,t,It)},Vt=Rt?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return(t=>new Lt("string"==typeof t?t:t+"",void 0,It))(e)})(t):t,{is:Wt,defineProperty:jt,getOwnPropertyDescriptor:qt,getOwnPropertyNames:Ht,getOwnPropertySymbols:Dt,getPrototypeOf:Bt}=Object,zt=globalThis,Ft=zt.trustedTypes,Gt=Ft?Ft.emptyScript:"",Jt=zt.reactiveElementPolyfillSupport,Kt=(t,e)=>t,Zt={toAttribute(t,e){switch(e){case Boolean:t=t?Gt:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=null!==t;break;case Number:s=null===t?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch(t){s=null}}return s}},Xt=(t,e)=>!Wt(t,e),Yt={attribute:!0,type:String,converter:Zt,reflect:!1,useDefault:!1,hasChanged:Xt};
111
+ /**
112
+ * @license
113
+ * Copyright 2017 Google LLC
114
+ * SPDX-License-Identifier: BSD-3-Clause
115
+ */Symbol.metadata??=Symbol("metadata"),zt.litPropertyMetadata??=new WeakMap;class Qt extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Yt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){const s=Symbol(),o=this.getPropertyDescriptor(t,s,e);void 0!==o&&jt(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){const{get:o,set:r}=qt(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:o,set(e){const i=o?.call(this);r?.call(this,e),this.requestUpdate(t,i,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Yt}static _$Ei(){if(this.hasOwnProperty(Kt("elementProperties")))return;const t=Bt(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Kt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Kt("properties"))){const t=this.properties,e=[...Ht(t),...Dt(t)];for(const s of e)this.createProperty(s,t[s])}const t=this[Symbol.metadata];if(null!==t){const e=litPropertyMetadata.get(t);if(void 0!==e)for(const[t,s]of e)this.elementProperties.set(t,s)}this._$Eh=new Map;for(const[t,e]of this.elementProperties){const s=this._$Eu(t,e);void 0!==s&&this._$Eh.set(s,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const s=new Set(t.flat(1/0).reverse());for(const t of s)e.unshift(Vt(t))}else void 0!==t&&e.push(Vt(t));return e}static _$Eu(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,e=this.constructor.elementProperties;for(const s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(Rt)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const s of e){const e=document.createElement("style"),o=Pt.litNonce;void 0!==o&&e.setAttribute("nonce",o),e.textContent=s.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){const s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(void 0!==o&&!0===s.reflect){const r=(void 0!==s.converter?.toAttribute?s.converter:Zt).toAttribute(e,s.type);this._$Em=t,null==r?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){const s=this.constructor,o=s._$Eh.get(t);if(void 0!==o&&this._$Em!==o){const t=s.getPropertyOptions(o),r="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:Zt;this._$Em=o;const i=r.fromAttribute(e,t.type);this[o]=i??this._$Ej?.get(o)??i,this._$Em=null}}requestUpdate(t,e,s){if(void 0!==t){const o=this.constructor,r=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Xt)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:r},i){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),!0!==r||void 0!==i)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),!0===o&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[e,s]of t){const{wrapped:t}=s,o=this[e];!0!==t||this._$AL.has(e)||void 0===o||this.C(e,void 0,s,o)}}let t=!1;const e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}Qt.elementStyles=[],Qt.shadowRootOptions={mode:"open"},Qt[Kt("elementProperties")]=new Map,Qt[Kt("finalized")]=new Map,Jt?.({ReactiveElement:Qt}),(zt.reactiveElementVersions??=[]).push("2.1.1");
116
+ /**
117
+ * @license
118
+ * Copyright 2017 Google LLC
119
+ * SPDX-License-Identifier: BSD-3-Clause
120
+ */
121
+ const te=globalThis;class ee extends Qt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,s)=>{const o=s?.renderBefore??e;let r=o._$litPart$;if(void 0===r){const t=s?.renderBefore??null;o._$litPart$=r=new wt(e.insertBefore(et(),t),t,void 0,s??{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return ut}}ee._$litElement$=!0,ee.finalized=!0,te.litElementHydrateSupport?.({LitElement:ee});const se=te.litElementPolyfillSupport;se?.({LitElement:ee}),(te.litElementVersions??=[]).push("4.2.1");
122
+ /**
123
+ * @license
124
+ * Copyright 2017 Google LLC
125
+ * SPDX-License-Identifier: BSD-3-Clause
126
+ */
127
+ const oe=t=>(e,s)=>{void 0!==s?s.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)},re={attribute:!0,type:String,converter:Zt,reflect:!1,hasChanged:Xt},ie=(t=re,e,s)=>{const{kind:o,metadata:r}=s;let i=globalThis.litPropertyMetadata.get(r);if(void 0===i&&globalThis.litPropertyMetadata.set(r,i=new Map),"setter"===o&&((t=Object.create(t)).wrapped=!0),i.set(s.name,t),"accessor"===o){const{name:o}=s;return{set(s){const r=e.get.call(this);e.set.call(this,s),this.requestUpdate(o,r,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if("setter"===o){const{name:o}=s;return function(s){const r=this[o];e.call(this,s),this.requestUpdate(o,r,t)}}throw Error("Unsupported decorator location: "+o)};
128
+ /**
129
+ * @license
130
+ * Copyright 2017 Google LLC
131
+ * SPDX-License-Identifier: BSD-3-Clause
132
+ */function ne(t){return(e,s)=>"object"==typeof s?ie(t,e,s):((t,e,s)=>{const o=e.hasOwnProperty(s);return e.constructor.createProperty(s,t),o?Object.getOwnPropertyDescriptor(e,s):void 0})(t,e,s)}
133
+ /**
134
+ * @license
135
+ * Copyright 2017 Google LLC
136
+ * SPDX-License-Identifier: BSD-3-Clause
137
+ */function ce(t){return ne({...t,state:!0,attribute:!1})}function le(){}const ae=Symbol("tp-select");class he{#t;#e;#s=!1;constructor(t,e={}){const{attributes:s=!0,childList:o=!0,characterData:r=!0}=e;this.#t=t,this.clone=t.cloneNode(!0),this.#e=new MutationObserver(t=>this.#o(t)),this.#e.observe(t,{attributes:s,childList:o,characterData:r,subtree:!0})}disconnect(){this.#s||(this.#s=!0,this.#e.disconnect())}#o(t){for(const e of t){const t=this.#r(e.target);if(!t)continue;const s=this.#i(t);if(s)switch(e.type){case"attributes":this.#n(e,s);break;case"characterData":s.nodeValue=e.target.nodeValue;break;case"childList":this.#c(e.target,s)}}}#n(t,e){const s=t.attributeName;if(!s)return;const o=t.attributeNamespace??null,r=t.target,i=o?r.getAttributeNS(o,s):r.getAttribute(s);null===i?o?e.removeAttributeNS(o,s):e.removeAttribute(s):o?e.setAttributeNS(o,s,i):e.setAttribute(s,i)}#c(t,e){for(;e.firstChild;)e.removeChild(e.firstChild);for(const s of Array.from(t.childNodes))e.appendChild(s.cloneNode(!0))}#r(t){if(t===this.#t)return[];const e=[];let s=t;for(;s&&s!==this.#t;){const t=s.parentNode;if(!t)return null;e.push(Array.prototype.indexOf.call(t.childNodes,s)),s=t}return s===this.#t?e.reverse():null}#i(t){let e=this.clone;for(const s of t){const t=e.childNodes[s];if(!t)return null;e=t}return e}}class de extends ee{constructor(){super(...arguments),this.color="contrast",this.shade=500,this.mixer="none"}static{this.rootStyles=(()=>{const t=Ut`
138
+ @layer properties {
139
+ :root {
140
+ --tp-color-white: hsl(0 0% 100%);
141
+ --tp-color-black: hsl(0 0% 0%);
142
+ --tp-color-contrast: var(--tp-color-black);
143
+ --tp-color-primary: hsl(220 90% 56%);
144
+ --tp-color-secondary: hsl(340 82% 52%);
145
+ --tp-color-tertiary: hsl(50 100% 50%);
146
+ --tp-color-quaternary: hsl(120 100% 40%);
147
+ --tp-color-success: hsl(140 70% 40%);
148
+ --tp-color-danger: hsl(0 70% 50%);
149
+ --tp-color-warning: hsl(45 100% 50%);
150
+ --tp-color-neutral: color-mix(in xyz, var(--tp-color-white) 50%, var(--tp-color-black) 50%);
151
+ }
152
+ }
153
+ `;var e;return document.adoptedStyleSheets=(e=[...document.adoptedStyleSheets,t.styleSheet],[...new Set(e)]),t})()}static{this.shadedElementStyles=Ut`
154
+ --tp-element-color: var(--tp-color-primary);
155
+ --tp-shade-attr: attr(shade type(<number>));
156
+ --tp-shade-mixer-type: attr(mixer type(*));
157
+ --tp-shade-mixer-color: if(
158
+ style(--tp-shade-mixer-type: black): var(--tp-color-black);
159
+ else: var(--tp-color-white)
160
+ );
161
+ --tp-shade-mixer-percent: if(
162
+ style(--tp-shade-mixer-type: black): calc(100% - ((var(--tp-shade-attr) - 500) / 500 * 100%));
163
+ else: calc(100% - ((500 - var(--tp-shade-attr)) / 500 * 100%))
164
+ );
165
+ --tp-calc-element-color: color-mix(in xyz, var(--tp-element-color) var(--tp-shade-mixer-percent), var(--tp-shade-mixer-color) calc(100% - var(--tp-shade-mixer-percent)));
166
+ --tp-calc-contrast-color: contrast-color(var(--tp-calc-element-color));
167
+ --tp-contrast-color: if(
168
+ style(--tp-calc-contrast-color: white): var(--tp-color-white);
169
+ else: var(--tp-color-black);
170
+ );
171
+
172
+ &[color="contrast"] { --tp-element-color: var(--tp-color-contrast); }
173
+ &[color="primary"] { --tp-element-color: var(--tp-color-primary); }
174
+ &[color="secondary"] { --tp-element-color: var(--tp-color-secondary); }
175
+ &[color="tertiary"] { --tp-element-color: var(--tp-color-tertiary); }
176
+ &[color="quaternary"] { --tp-element-color: var(--tp-color-quaternary); }
177
+ &[color="success"] { --tp-element-color: var(--tp-color-success); }
178
+ &[color="danger"] { --tp-element-color: var(--tp-color-danger); }
179
+ &[color="warning"] { --tp-element-color: var(--tp-color-warning); }
180
+ &[color="neutral"] { --tp-element-color: var(--tp-color-neutral); }
181
+ `}willUpdate(t){t.has("shade")&&(this.mixer=500===this.shade?"none":this.shade>500?"black":"white")}}e([ne({type:String,reflect:!0}),s("design:type",String)],de.prototype,"color",void 0),e([ne({type:Number,reflect:!0,converter(t,e){const s=Number(t);return isNaN(s)?500:function(t,e,s){return Math.max(Math.min(e,s),t)}(0,1e3,s)}}),s("design:type",Number)],de.prototype,"shade",void 0),e([ne({type:String,reflect:!0}),s("design:type",String)],de.prototype,"mixer",void 0);const pe=F(ee),ue=F(de),fe=Symbol("select:register-option"),me=Symbol("select:unregister-option"),ve=Symbol("option:should-register-to-select");var ge;t.SelectedContentElement=class extends pe{static{this.styles=(()=>{const t=Ut`
177
182
  tp-selected-content {
178
183
  display: inline-block;
179
184
 
@@ -187,7 +192,7 @@ let ue=!1;const fe=new ce.subtle.Watcher(async()=>{ue||(ue=!0,queueMicrotask(()=
187
192
  }
188
193
  }
189
194
  }
190
- `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}#S=new WeakMap;createRenderRoot(){return this}render(){const t=this.select?.placeholder??"",e=this.select?.selectedOptions.get().map(t=>t.deref()).filter(Boolean)??[],s=this.#$(e);return e.length?s.map(t=>B`${t}`):B`<slot name="placeholder"><span part="placeholder">${t}</span></slot>`}#$(t){return t.map(t=>{let e=this.#S.get(t);return e||(e=new me(t),this.#S.set(t,e),e.clone.setAttribute("part","selected-content-option"),e.clone[$e]=!1),e.clone})}},e([Nt({context:ve,subscribe:!0}),ft(),s("design:type",Function)],t.SelectedContentElement.prototype,"select",void 0),t.SelectedContentElement=e([ht("tp-selected-content")],t.SelectedContentElement),t.OptionElement=class extends ye{constructor(){super(...arguments),this[we]=!0,this.value=""}static{we=$e}static{this.styles=(()=>{const t=l`
195
+ `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}#l=new WeakMap;createRenderRoot(){return this}render(){const t=this.select?.placeholder??"",e=this.select?.selectedOptions.get().map(t=>t.deref()).filter(Boolean)??[],s=this.#a(e);return e.length?s.map(t=>pt`${t}`):pt`<slot name="placeholder"><span part="placeholder">${t}</span></slot>`}#a(t){return t.map(t=>{let e=this.#l.get(t);return e||(e=new he(t),this.#l.set(t,e),e.clone.setAttribute("part","selected-content-option"),e.clone[ve]=!1),e.clone})}},e([l({context:ae,subscribe:!0}),ce(),s("design:type",Function)],t.SelectedContentElement.prototype,"select",void 0),t.SelectedContentElement=e([oe("tp-selected-content")],t.SelectedContentElement),t.OptionElement=class extends pe{constructor(){super(...arguments),this[ge]=!0,this.value=""}static{ge=ve}static{this.styles=(()=>{const t=Ut`
191
196
  tp-option:not([part="selected-content-option"]) {
192
197
  display: block;
193
198
  cursor: pointer;
@@ -206,50 +211,97 @@ let ue=!1;const fe=new ce.subtle.Watcher(async()=>{ue||(ue=!0,queueMicrotask(()=
206
211
  }
207
212
  }
208
213
  }
209
- `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}connectedCallback(){super.connectedCallback(),this[$e]&&this.select?.[be](this)}disconnectedCallback(){super.disconnectedCallback(),this[$e]&&this.select?.[Se](this)}willUpdate(t){if(!this[$e])return;const e=this.select?.selectedOptions.get().some(t=>t.deref()===this)??!1;this.toggleAttribute("selected",e)}createRenderRoot(){return this}render(){return B``}},e([Nt({context:ve,subscribe:!0}),ft(),s("design:type",Function)],t.OptionElement.prototype,"select",void 0),e([ut({type:String,reflect:!0}),s("design:type",Object)],t.OptionElement.prototype,"value",void 0),t.OptionElement=e([ht("tp-option")],t.OptionElement);class Ee extends Event{constructor(t,e){super("change",{bubbles:!0,composed:!1,cancelable:!1,...e}),this.value=t.value,this.selectedOptions=t.selectedOptions}}function Ce(){}t.SelectElement=class extends ye{static{_e=this}static{this.formAssociated=!0}static{this.ALLOWED_OPTION_ELEMENTS=[t.OptionElement]}static{this.styles=l`
210
- :host {
211
- position: relative;
212
- display: inline-flex;
213
- height: fit-content;
214
+ `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}connectedCallback(){super.connectedCallback(),this[ve]&&this.select?.[fe](this)}disconnectedCallback(){super.disconnectedCallback(),this[ve]&&this.select?.[me](this)}willUpdate(t){if(!this[ve])return;const e=this.select?.selectedOptions.get().some(t=>t.deref()===this)??!1;this.toggleAttribute("selected",e)}createRenderRoot(){return this}render(){return pt``}},e([l({context:ae,subscribe:!0}),ce(),s("design:type",Function)],t.OptionElement.prototype,"select",void 0),e([ne({type:String,reflect:!0}),s("design:type",Object)],t.OptionElement.prototype,"value",void 0),t.OptionElement=e([oe("tp-option")],t.OptionElement);class ye extends Event{constructor(t,e){super("change",{bubbles:!0,composed:!1,cancelable:!1,...e}),this.value=t.value,this.selectedOptions=t.selectedOptions}}const be={};const Se={popInline:"center",targetInline:"center",popBlock:"bottom",targetBlock:"top"},$e=new Set(["start","center","end"]),we=new Set(["top","middle","bottom"]),_e={start:["end","start"],center:["center","center"],end:["start","end"]},Ee={top:["bottom","top"],middle:["middle","middle"],bottom:["top","bottom"]};function Ae(t){const e=t.trim().split(/\s+to\s+/);if(1===e.length){const t=e[0];return $e.has(t)?_e[t]:null}return 2===e.length&&$e.has(e[0])&&$e.has(e[1])?[e[0],e[1]]:null}function Ce(t){const e=t.trim().split(/\s+to\s+/);if(1===e.length){const t=e[0];return we.has(t)?Ee[t]:null}return 2===e.length&&we.has(e[0])&&we.has(e[1])?[e[0],e[1]]:null}let xe=class extends ee{constructor(){var t;super(...arguments),this.mode="auto",this.target=null,this.position=null,this.trigger="click",this.#h=((t="tp-popover")in be||(be[t]=function*(t){let e=0;for(;;)yield`${t}-${e++}`}(t)),be[t].next().value),this.#d=null,this.#p=!1,this.#u=[]}static{this.styles=(()=>{const t=Ut`
215
+ tp-popover {
216
+ --tp-popover-inline-position: attr(data-ti type(*));
217
+ --tp-popover-block-position: attr(data-tb type(*));
218
+ inset: auto;
219
+ translate: var(--tp-popover-translate-x, 0) var(--tp-popover-translate-y, 0);
220
+ position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
214
221
 
222
+ &[data-tb="middle"] {
223
+ --tp-popover-block-position: center;
224
+ }
225
+
226
+ &[data-pi="start"],
227
+ &[data-pi="center"] {
228
+ inset-inline-start: anchor(var(--tp-popover-inline-position));
229
+ }
230
+
231
+ &[data-pi="center"] {
232
+ --tp-popover-translate-x: -50%;
233
+ }
234
+
235
+ &[data-pi="end"] {
236
+ inset-inline-end: anchor(var(--tp-popover-inline-position));
237
+ }
238
+
239
+ &[data-pb="top"],
240
+ &[data-pb="middle"] {
241
+ inset-block-start: anchor(var(--tp-popover-block-position));
242
+ }
243
+
244
+ &[data-pb="middle"] {
245
+ --tp-popover-translate-y: -50%;
246
+ }
247
+
248
+ &[data-pb="bottom"] {
249
+ inset-block-end: anchor(var(--tp-popover-block-position));
250
+ }
251
+ }
252
+ `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,t.styleSheet],t})()}#h;#d;get anchorElement(){return this.#d}get anchorName(){return`--${this.#h}`}#p;#u;createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.#f(),this.#m(),this.#v(),this.#g()}disconnectedCallback(){super.disconnectedCallback(),this.#y(),this.#b()}updated(t){t.has("mode")&&this.#f(),t.has("target")&&(this.#m(),this.#g()),t.has("position")&&this.#v(),t.has("trigger")&&this.#g()}render(){return pt``}#f(){const t="manual"===this.mode?"manual":"auto";this.getAttribute("popover")!==t&&this.setAttribute("popover",t)}#S(){const t=this.target;if(t)try{const e=this.getRootNode().querySelector(t);if(e instanceof HTMLElement)return e;console.warn(`<tp-popover>: target "${t}" did not resolve to an HTMLElement; using parentElement.`)}catch{console.warn(`<tp-popover>: invalid target selector "${t}"; using parentElement.`)}const e=this.parentElement;if(e instanceof HTMLElement)return e;const s=this.getRootNode();return s instanceof ShadowRoot&&s.host instanceof HTMLElement?s.host:null}#m(){const t=this.#S();t!==this.#d?(this.#b(),this.#d=t,t&&this.#$(t)):t&&this.#$(t)}#$(t){const e=`--${this.#h}`,s=t.style.getPropertyValue("anchor-name").trim();if(s&&s!==e)return this.style.setProperty("position-anchor",s),void(this.#p=!1);t.style.setProperty("anchor-name",e),this.style.setProperty("position-anchor",e),this.#p=!0}#b(){if(this.#d&&this.#p){const t=`--${this.#h}`;this.#d.style.getPropertyValue("anchor-name").trim()===t&&this.#d.style.removeProperty("anchor-name")}this.#d=null,this.#p=!1,this.style.removeProperty("position-anchor")}#v(){let t=function(t){if(!t)return null;const e=t.trim().toLowerCase();if(!e)return null;if(!e.includes("/")){const t=Ae(e);if(t){const[e,s]=Ee.middle;return{popInline:t[0],targetInline:t[1],popBlock:e,targetBlock:s}}const s=Ce(e);if(s){const[t,e]=_e.center;return{popInline:t,targetInline:e,popBlock:s[0],targetBlock:s[1]}}return null}const s=e.split("/");if(2!==s.length)return null;const o=Ae(s[0]),r=Ce(s[1]);return o&&r?{popInline:o[0],targetInline:o[1],popBlock:r[0],targetBlock:r[1]}:null}(this.position);this.position&&!t&&console.warn(`<tp-popover>: invalid position "${this.position}"; using default.`),t??=Se,this.dataset.pi=t.popInline,this.dataset.ti=t.targetInline,this.dataset.pb=t.popBlock,this.dataset.tb=t.targetBlock}#y(){for(const t of this.#u)t();this.#u=[]}#g(){this.#y();const t=this.#d;if(t){if("click"===this.trigger){const e=t=>{if(!t.composedPath().includes(this))try{this.togglePopover()}catch{}};return t.addEventListener("click",e),void this.#u.push(()=>t.removeEventListener("click",e))}if("hover"===this.trigger){let e=null;const s=()=>{null!==e&&(clearTimeout(e),e=null)},o=()=>{s();try{this.showPopover()}catch{}},r=()=>{s(),e=setTimeout(()=>{try{this.hidePopover()}catch{}},120)};t.addEventListener("pointerenter",o),t.addEventListener("pointerleave",r),t.addEventListener("focusin",o),t.addEventListener("focusout",r),this.addEventListener("pointerenter",s),this.addEventListener("pointerleave",r),this.addEventListener("focusin",s),this.addEventListener("focusout",r),this.#u.push(()=>{s(),t.removeEventListener("pointerenter",o),t.removeEventListener("pointerleave",r),t.removeEventListener("focusin",o),t.removeEventListener("focusout",r),this.removeEventListener("pointerenter",s),this.removeEventListener("pointerleave",r),this.removeEventListener("focusin",s),this.removeEventListener("focusout",r)})}}}};var Oe;e([ne({reflect:!0}),s("design:type",String)],xe.prototype,"mode",void 0),e([ne({reflect:!0}),s("design:type",Object)],xe.prototype,"target",void 0),e([ne({reflect:!0}),s("design:type",Object)],xe.prototype,"position",void 0),e([ne({reflect:!0}),s("design:type",String)],xe.prototype,"trigger",void 0),xe=e([oe("tp-popover")],xe),t.SelectElement=class extends ue{static{Oe=this}static{this.formAssociated=!0}static{this.ALLOWED_OPTION_ELEMENTS=[t.OptionElement]}static{this.styles=(()=>{const t=Ut`
253
+ ${de.shadedElementStyles}
215
254
  --tp-select-option-color: white;
216
- --tp-select-selection-color: #0078d4;
255
+ --tp-select-selection-color: var(--tp-calc-element-color);
217
256
  --tp-select-highlight-percent: 20%;
218
- --tp-select-selection-contrast-color: white;
219
- }
257
+ --tp-select-selection-contrast-color: var(--tp-calc-contrast-color);
258
+ `,e=Ut`
259
+ @layer base {
260
+ :host {
261
+ ${t}
262
+ position: relative;
263
+ display: inline-flex;
264
+ height: fit-content;
265
+ }
220
266
 
221
- :host([disabled]) {
222
- pointer-events: none;
223
- opacity: 0.6;
224
- }
267
+ :host([disabled]) {
268
+ pointer-events: none;
269
+ opacity: 0.6;
270
+ }
225
271
 
226
- :host([open]) {
227
- [pseudo="indicator"] {
228
- transform: rotateX(180deg);
229
- }
230
- }
272
+ :host([open]) {
273
+ [pseudo="indicator"] {
274
+ transform: rotateX(180deg);
275
+ }
276
+ }
231
277
 
232
- [pseudo="button"] {
233
- background: white;
234
- cursor: pointer;
235
- display: inline-flex;
236
- align-items: center;
237
- padding: 0.25em 0.5em;
278
+ [pseudo="button"] {
279
+ background: white;
280
+ cursor: pointer;
281
+ display: inline-flex;
282
+ align-items: center;
283
+ padding: 0.25em 0.5em;
238
284
 
239
- tp-selected-content {
240
- margin-inline-end: 0.5em;
241
- }
242
- }
285
+ tp-selected-content {
286
+ margin-inline-end: 0.5em;
287
+ }
288
+ }
243
289
 
244
- [pseudo="indicator"] {
245
- margin-inline-start: auto;
246
- }
290
+ [pseudo="indicator"] {
291
+ margin-inline-start: auto;
292
+ }
247
293
 
248
- tp-popover {
249
- border: none;
250
- padding: 0;
251
- }
252
- `}#w;get#_(){return this.shadowRoot?.querySelector("tp-popover")}#E;get value(){return this.#E.get()}set value(t){!function(t=Ce){new Promise((e,s)=>{setTimeout(()=>{try{const s=t();e(s)}catch(t){s(t)}},0)})}(()=>{const e=t.split(",").map(t=>t.trim()),s=Array.from(this.#w);this.selectedOptions.set(e.map(t=>s.find(e=>e.value===t)).filter(Boolean).map(t=>new WeakRef(t)))})}#C;get placeholder(){return this.#C.get()}set placeholder(t){this.#A(this.#C,"placeholder",t)}#x;#O;#N;constructor(){super(),this.#w=new Set,this.self=this,this.selectedOptions=ge([]),this.#E=((t,e)=>new ce.Computed(t,e))(()=>this.selectedOptions.get().map(t=>t.deref()?.value??"").filter(Boolean).join(",")),this.#C=ge("Select an option"),this.max=1,this.name=null,this.disabled=!1,this.required=!1,this.open=!1,this.#O="",this.#N=null,this.#x=this.attachInternals()}get internals(){return this.#x}get form(){return this.#x.form}get validity(){return this.#x.validity}get validationMessage(){return this.#x.validationMessage}get willValidate(){return this.#x.willValidate}checkValidity(){return this.#x.checkValidity()}reportValidity(){return this.#x.reportValidity()}createRenderRoot(){const e=super.createRenderRoot();return e.adoptedStyleSheets=[...e.adoptedStyleSheets,_t.styles.styleSheet,t.SelectedContentElement.styles.styleSheet,t.OptionElement.styles.styleSheet],e}connectedCallback(){super.connectedCallback(),this.#O=this.value}disconnectedCallback(){super.disconnectedCallback()}render(){return B`
294
+ tp-popover {
295
+ border: none;
296
+ padding: 0;
297
+ }
298
+ }`,s=Ut`
299
+ @layer base {
300
+ tp-select {
301
+ ${t}
302
+ }
303
+ }
304
+ `;return document.adoptedStyleSheets=[...document.adoptedStyleSheets,s.styleSheet],e})()}#w;get#_(){return this.shadowRoot?.querySelector("tp-popover")}#E;get value(){return this.#E.get()}set value(t){!function(t=le){new Promise((e,s)=>{setTimeout(()=>{try{const s=t();e(s)}catch(t){s(t)}},0)})}(()=>{const e=t?.split(",").map(t=>t.trim())??[],s=Array.from(this.#w);this.selectedOptions.set(e.map(t=>s.find(e=>e.value===t)).filter(Boolean).map(t=>new WeakRef(t)))})}#A;get placeholder(){return this.#A.get()}set placeholder(t){this.#C(this.#A,"placeholder",t)}#x;#O;#N;constructor(){super(),this.#w=new Set,this.self=this,this.selectedOptions=Tt([]),this.#E=((t,e)=>new j.Computed(t,e))(()=>this.selectedOptions.get().map(t=>t.deref()?.value??"").filter(Boolean).join(",")),this.#A=Tt("Select an option"),this.max=1,this.min=0,this.name=null,this.disabled=!1,this.required=!1,this.open=!1,this.#O="",this.#N=null,this.#x=this.attachInternals()}get internals(){return this.#x}get form(){return this.#x.form}get validity(){return this.#x.validity}get validationMessage(){return this.#x.validationMessage}get willValidate(){return this.#x.willValidate}checkValidity(){return this.#x.checkValidity()}reportValidity(){return this.#x.reportValidity()}createRenderRoot(){const e=super.createRenderRoot();return e.adoptedStyleSheets=[...e.adoptedStyleSheets,xe.styles.styleSheet,t.SelectedContentElement.styles.styleSheet,t.OptionElement.styles.styleSheet],e}connectedCallback(){super.connectedCallback(),this.#O=this.value}disconnectedCallback(){super.disconnectedCallback()}render(){return pt`
253
305
  <div pseudo="button" part="button">
254
306
  <slot name="button">
255
307
  <tp-selected-content part="selected-content"></tp-selected-content>
@@ -268,11 +320,11 @@ let ue=!1;const fe=new ce.subtle.Watcher(async()=>{ue||(ue=!0,queueMicrotask(()=
268
320
  <slot></slot>
269
321
  </slot>
270
322
  </tp-popover>
271
- `}updated(t){if(super.updated(t),t.has("max")&&Number.isFinite(this.max)){const t=this.selectedOptions.get();t.length>this.max&&this.selectedOptions.set(t.slice(t.length-this.max))}}willUpdate(t){this.#P(),this.#R()}formResetCallback(){this.value=this.#O}formDisabledCallback(t){this.disabled=t}formStateRestoreCallback(t){if(null!=t)if("string"!=typeof t){if(t instanceof FormData){const e=[];t.forEach(t=>{"string"==typeof t&&e.push(t)}),this.value=e.join(",")}}else this.value=t;else this.value=""}#P(){const t=""===this.value?[]:this.value.split(",");if(1===this.max)this.#x.setFormValue(t[0]??"");else{const e=new FormData,s=this.name??"";for(const i of t)e.append(s,i);this.#x.setFormValue(e)}this.required&&0===t.length?this.#x.setValidity({valueMissing:!0},"Please select an option."):this.#x.setValidity({})}#R(){const t=this.value;if(t===this.#N)return;const e=null===this.#N;if(this.#N=t,e)return;const s=this.selectedOptions.get().map(t=>t.deref()).filter(Boolean);this.dispatchEvent(new Ee({value:t,selectedOptions:s}))}selectOption(t){const e=this.selectedOptions.get();if(e.find(e=>e.deref()===t))return;const s=[...e,new WeakRef(t)],i=s.length>this.max?s.slice(s.length-this.max):s;this.selectedOptions.set(i)}deselectOption(t){const e=this.selectedOptions.get().find(e=>e.deref()===t);e&&this.selectedOptions.set(this.selectedOptions.get().filter(t=>t!==e))}toggleOption(t){this.selectedOptions.get().find(e=>e.deref()===t)?this.deselectOption(t):this.selectOption(t)}togglePopover(){return this.#_.togglePopover()}hidePopover(){this.#_.hidePopover()}showPopover(){this.#_.showPopover()}[be](t){this.#w.add(t)}[Se](t){this.#w.delete(t);const e=this.selectedOptions.get(),s=e.find(e=>e.deref()===t);s&&this.selectedOptions.set(e.filter(t=>t!==s))}#k(t){if(this.disabled)return;const e=function(t,e){const s=t.indexOf(e);return s<0?[]:t.slice(0,s)}(t.composedPath(),this).find(t=>_e.ALLOWED_OPTION_ELEMENTS.some(e=>t instanceof e));if(!e)return;this.toggleOption(e);if(this.selectedOptions.get().length>=this.max){const t=this.shadowRoot?.querySelector("tp-popover");t?.hidePopover()}}#T(t){this.open="open"===t.newState}#A(t,e,s){const i=t.get();i!==s&&(t.set(s),this.requestUpdate(e,i))}},e([
323
+ `}updated(t){if(super.updated(t),t.has("max")&&Number.isFinite(this.max)){const t=this.selectedOptions.get();t.length>this.max&&this.selectedOptions.set(t.slice(t.length-this.max))}}willUpdate(t){this.#P(),this.#R()}formResetCallback(){this.value=this.#O}formDisabledCallback(t){this.disabled=t}formStateRestoreCallback(t){if(null!=t)if("string"!=typeof t){if(t instanceof FormData){const e=[];t.forEach(t=>{"string"==typeof t&&e.push(t)}),this.value=e.join(",")}}else this.value=t;else this.value=""}#P(){const t=""===this.value?[]:this.value.split(",");if(1===this.max)this.#x.setFormValue(t[0]??"");else{const e=new FormData,s=this.name??"";for(const o of t)e.append(s,o);this.#x.setFormValue(e)}this.required&&0===t.length?this.#x.setValidity({valueMissing:!0},"Please select an option."):this.#x.setValidity({})}#R(){const t=this.value;if(t===this.#N)return;const e=null===this.#N;if(this.#N=t,e)return;const s=this.selectedOptions.get().map(t=>t.deref()).filter(Boolean);this.dispatchEvent(new ye({value:t,selectedOptions:s}))}selectOption(t){const e=this.selectedOptions.get();if(e.find(e=>e.deref()===t))return;const s=[...e,new WeakRef(t)],o=s.length>this.max?s.slice(s.length-this.max):s;this.selectedOptions.set(o)}deselectOption(t){const e=this.selectedOptions.get(),s=e.find(e=>e.deref()===t);s&&(e.length<=this.min||this.selectedOptions.set(e.filter(t=>t!==s)))}toggleOption(t){this.selectedOptions.get().find(e=>e.deref()===t)?this.deselectOption(t):this.selectOption(t)}togglePopover(){return this.#_.togglePopover()}hidePopover(){this.#_.hidePopover()}showPopover(){this.#_.showPopover()}[fe](t){this.#w.add(t)}[me](t){this.#w.delete(t);const e=this.selectedOptions.get(),s=e.find(e=>e.deref()===t);s&&this.selectedOptions.set(e.filter(t=>t!==s))}#k(t){if(this.disabled)return;const e=function(t,e){const s=t.indexOf(e);return s<0?[]:t.slice(0,s)}(t.composedPath(),this).find(t=>Oe.ALLOWED_OPTION_ELEMENTS.some(e=>t instanceof e));if(!e)return;this.toggleOption(e);if(this.selectedOptions.get().length>=this.max){const t=this.shadowRoot?.querySelector("tp-popover");t?.hidePopover()}}#T(t){this.open="open"===t.newState}#C(t,e,s){const o=t.get();o!==s&&(t.set(s),this.requestUpdate(e,o))}},e([
272
324
  /**
273
325
  * @license
274
326
  * Copyright 2017 Google LLC
275
327
  * SPDX-License-Identifier: BSD-3-Clause
276
328
  */
277
- function({context:t}){return(e,s)=>{const i=new WeakMap;if("object"==typeof s)return{get(){return e.get.call(this)},set(t){return i.get(this).setValue(t),e.set.call(this,t)},init(e){return i.set(this,new Ot(this,{context:t,initialValue:e})),e}};{e.constructor.addInitializer(e=>{i.set(e,new Ot(e,{context:t}))});const o=Object.getOwnPropertyDescriptor(e,s);let n;if(void 0===o){const t=new WeakMap;n={get(){return t.get(this)},set(e){i.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=o.set;n={...o,set(e){i.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,n)}}}({context:ve}),s("design:type",t.SelectElement)],t.SelectElement.prototype,"self",void 0),e([ut({type:String,reflect:!0,noAccessor:!0}),s("design:type",String),s("design:paramtypes",[String])],t.SelectElement.prototype,"value",null),e([ut({type:String,reflect:!0,noAccessor:!0}),s("design:type",String),s("design:paramtypes",[String])],t.SelectElement.prototype,"placeholder",null),e([ut({reflect:!0,converter:{fromAttribute:t=>{if(null==t||""===t)return 1;const e=String(t).trim().toLowerCase();if("infinite"===e)return Number.POSITIVE_INFINITY;const s=Number(e);return Number.isFinite(s)&&s>=1?Math.floor(s):1},toAttribute:t=>Number.isFinite(t)?String(t):"infinite"}}),s("design:type",Number)],t.SelectElement.prototype,"max",void 0),e([ut({type:String,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"name",void 0),e([ut({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"disabled",void 0),e([ut({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"required",void 0),e([ut({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"open",void 0),t.SelectElement=_e=e([ht("tp-select"),s("design:paramtypes",[])],t.SelectElement),t.SelectChangeEvent=Ee}(this.TelperionElements.Select=this.TelperionElements.Select||{});
329
+ function({context:t}){return(e,s)=>{const o=new WeakMap;if("object"==typeof s)return{get(){return e.get.call(this)},set(t){return o.get(this).setValue(t),e.set.call(this,t)},init(e){return o.set(this,new c(this,{context:t,initialValue:e})),e}};{e.constructor.addInitializer(e=>{o.set(e,new c(e,{context:t}))});const r=Object.getOwnPropertyDescriptor(e,s);let i;if(void 0===r){const t=new WeakMap;i={get(){return t.get(this)},set(e){o.get(this).setValue(e),t.set(this,e)},configurable:!0,enumerable:!0}}else{const t=r.set;i={...r,set(e){o.get(this).setValue(e),t?.call(this,e)}}}return void Object.defineProperty(e,s,i)}}}({context:ae}),s("design:type",t.SelectElement)],t.SelectElement.prototype,"self",void 0),e([ne({type:String,reflect:!0,noAccessor:!0}),s("design:type",Object),s("design:paramtypes",[Object])],t.SelectElement.prototype,"value",null),e([ne({type:String,reflect:!0,noAccessor:!0}),s("design:type",String),s("design:paramtypes",[String])],t.SelectElement.prototype,"placeholder",null),e([ne({reflect:!0,converter:{fromAttribute:t=>{if(null==t||""===t)return 1;const e=String(t).trim().toLowerCase();if("infinite"===e)return Number.POSITIVE_INFINITY;const s=Number(e);return Number.isFinite(s)&&s>=1?Math.floor(s):1},toAttribute:t=>Number.isFinite(t)?String(t):"infinite"}}),s("design:type",Number)],t.SelectElement.prototype,"max",void 0),e([ne({type:Number,reflect:!0,converter:{fromAttribute:t=>{if(null==t||""===t)return 0;const e=Number(String(t).trim());return Number.isFinite(e)&&e>=0?Math.floor(e):0},toAttribute:t=>String(t)}}),s("design:type",Number)],t.SelectElement.prototype,"min",void 0),e([ne({type:String,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"name",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"disabled",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"required",void 0),e([ne({type:Boolean,reflect:!0}),s("design:type",Object)],t.SelectElement.prototype,"open",void 0),t.SelectElement=Oe=e([oe("tp-select"),s("design:paramtypes",[])],t.SelectElement),t.SelectChangeEvent=ye}(this.TelperionElements.Select=this.TelperionElements.Select||{});
278
330
  //# sourceMappingURL=index.js.map