@fluid-topics/ft-button
Version:
A generic Fluid Topics tag
3 lines • 363 kB
JavaScript
"use strict";(()=>{var ud=Object.defineProperty;var D=(t,e)=>{for(var r in e)ud(t,r,{get:e[r],enumerable:!0})};if(!ShadowRoot.prototype.createElement){let t=window.HTMLElement,e=window.customElements.define,r=window.customElements.get,n=window.customElements,i=new WeakMap,a=new WeakMap,s=new WeakMap,l=new WeakMap;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(x,b){if(x=x.toLowerCase(),this._getDefinition(x)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${x}" has already been used with this registry`);if(this._definitionsByClass.get(b)!==void 0)throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");let S=b.prototype.attributeChangedCallback,R=new Set(b.observedAttributes||[]);m(b,R,S);let N={elementClass:b,connectedCallback:b.prototype.connectedCallback,disconnectedCallback:b.prototype.disconnectedCallback,adoptedCallback:b.prototype.adoptedCallback,attributeChangedCallback:S,formAssociated:b.formAssociated,formAssociatedCallback:b.prototype.formAssociatedCallback,formDisabledCallback:b.prototype.formDisabledCallback,formResetCallback:b.prototype.formResetCallback,formStateRestoreCallback:b.prototype.formStateRestoreCallback,observedAttributes:R};this._definitionsByTag.set(x,N),this._definitionsByClass.set(b,N);let Z=r.call(n,x);Z||(Z=f(x),e.call(n,x,Z)),this===window.customElements&&(s.set(b,N),N.standInClass=Z);let U=this._awaitingUpgrade.get(x);if(U){this._awaitingUpgrade.delete(x);for(let P of U)a.delete(P),y(P,N,!0)}let T=this._whenDefinedPromises.get(x);return T!==void 0&&(T.resolve(b),this._whenDefinedPromises.delete(x)),b}upgrade(){C.push(this),n.upgrade.apply(n,arguments),C.pop()}get(x){return this._definitionsByTag.get(x)?.elementClass}_getDefinition(x){return this._definitionsByTag.get(x)}whenDefined(x){let b=this._getDefinition(x);if(b!==void 0)return Promise.resolve(b.elementClass);let S=this._whenDefinedPromises.get(x);return S===void 0&&(S={},S.promise=new Promise(R=>S.resolve=R),this._whenDefinedPromises.set(x,S)),S.promise}_upgradeWhenDefined(x,b,S){let R=this._awaitingUpgrade.get(b);R||this._awaitingUpgrade.set(b,R=new Set),S?R.add(x):R.delete(x)}};let d;window.HTMLElement=function(){let b=d;if(b)return d=void 0,b;let S=s.get(this.constructor);if(!S)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return b=Reflect.construct(t,[],S.standInClass),Object.setPrototypeOf(b,this.constructor.prototype),i.set(b,S),b},window.HTMLElement.prototype=t.prototype;let p=x=>x===document||x instanceof ShadowRoot,h=x=>{let b=x.getRootNode();if(!p(b)){let S=C[C.length-1];if(S instanceof CustomElementRegistry)return S;b=S.getRootNode(),p(b)||(b=l.get(b)?.getRootNode()||document)}return b.customElements},f=x=>class{static get formAssociated(){return!0}constructor(){let S=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(S,HTMLElement.prototype);let R=h(S)||window.customElements,N=R._getDefinition(x);return N?y(S,N):a.set(S,R),S}connectedCallback(){let S=i.get(this);S?S.connectedCallback&&S.connectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,x,!0)}disconnectedCallback(){let S=i.get(this);S?S.disconnectedCallback&&S.disconnectedCallback.apply(this,arguments):a.get(this)._upgradeWhenDefined(this,x,!1)}adoptedCallback(){i.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){let S=i.get(this);S&&S.formAssociated&&S?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){let S=i.get(this);S?.formAssociated&&S?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){let S=i.get(this);S?.formAssociated&&S?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){let S=i.get(this);S?.formAssociated&&S?.formStateRestoreCallback?.apply(this,arguments)}},m=(x,b,S)=>{if(b.size===0||S===void 0)return;let R=x.prototype.setAttribute;R&&(x.prototype.setAttribute=function(U,T){let P=U.toLowerCase();if(b.has(P)){let M=this.getAttribute(P);R.call(this,P,T),S.call(this,P,M,T)}else R.call(this,P,T)});let N=x.prototype.removeAttribute;N&&(x.prototype.removeAttribute=function(U){let T=U.toLowerCase();if(b.has(T)){let P=this.getAttribute(T);N.call(this,T),S.call(this,T,P,null)}else N.call(this,T)});let Z=x.prototype.toggleAttribute;Z&&(x.prototype.toggleAttribute=function(U,T){let P=U.toLowerCase();if(b.has(P)){let M=this.getAttribute(P);Z.call(this,P,T);let Y=this.getAttribute(P);S.call(this,P,M,Y)}else Z.call(this,P,T)})},g=x=>{let b=Object.getPrototypeOf(x);if(b!==window.HTMLElement)return b===t?Object.setPrototypeOf(x,window.HTMLElement):g(b)},y=(x,b,S=!1)=>{Object.setPrototypeOf(x,b.elementClass.prototype),i.set(x,b),d=x;try{new b.elementClass}catch{g(b.elementClass),new b.elementClass}b.attributeChangedCallback&&b.observedAttributes.forEach(R=>{x.hasAttribute(R)&&b.attributeChangedCallback.call(x,R,null,x.getAttribute(R))}),S&&b.connectedCallback&&x.isConnected&&b.connectedCallback.call(x)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(x){let b=v.apply(this,arguments);return x.customElements&&(b.customElements=x.customElements),b};let C=[document],O=(x,b,S=void 0)=>{let R=(S?Object.getPrototypeOf(S):x.prototype)[b];x.prototype[b]=function(){C.push(this);let N=R.apply(S||this,arguments);return N!==void 0&&l.set(N,this),C.pop(),N}};O(ShadowRoot,"createElement",document),O(ShadowRoot,"importNode",document),O(Element,"insertAdjacentHTML");let w=(x,b)=>{let S=Object.getOwnPropertyDescriptor(x.prototype,b);Object.defineProperty(x.prototype,b,{...S,set(R){C.push(this),S.set.call(this,R),C.pop()}})};if(w(Element,"innerHTML"),w(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){let x=new WeakMap,b=HTMLElement.prototype.attachInternals,S=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...U){let T=b.call(this,...U);return x.set(T,this),T},S.forEach(U=>{let T=window.ElementInternals.prototype,P=T[U];T[U]=function(...M){let Y=x.get(this);if(i.get(Y).formAssociated===!0)return P?.call(this,...M);throw new DOMException(`Failed to execute ${P} on 'ElementInternals': The target element is not a form-associated custom element.`)}});class R extends Array{constructor(T){super(...T),this._elements=T}get value(){return this._elements.find(T=>T.checked===!0)?.value||""}}class N{constructor(T){let P=new Map;T.forEach((M,Y)=>{let Wo=M.getAttribute("name"),ma=P.get(Wo)||[];this[+Y]=M,ma.push(M),P.set(Wo,ma)}),this.length=T.length,P.forEach((M,Y)=>{M&&(M.length===1?this[Y]=M[0]:this[Y]=new R(M))})}namedItem(T){return this[T]}}let Z=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let U=Z.get.call(this,[]),T=[];for(let P of U){let M=i.get(P);(!M||M.formAssociated===!0)&&T.push(P)}return new N(T)}})}}try{window.customElements.define("custom-element",null)}catch{let e=window.customElements.define;window.customElements.define=(r,n,i)=>{var a;if(n!==null)try{e.bind(window.customElements)(r,n,i)}catch(s){!((a=s.message)===null||a===void 0)&&a.includes("this constructor has already been used")?window.customElements.define(r,class extends n{},i):console.info(r,n,i,s)}}}var tn={};D(tn,{CSSResult:()=>Pt,LitElement:()=>ke,ReactiveElement:()=>be,_$LE:()=>La,_$LH:()=>Jo,adoptStyles:()=>gr,css:()=>_,defaultConverter:()=>Nt,getCompatibleStyle:()=>eo,html:()=>$,isServer:()=>Nf,mathml:()=>Xo,noChange:()=>X,notEqual:()=>xr,nothing:()=>B,render:()=>Qo,supportsAdoptingStyleSheets:()=>mr,svg:()=>Yo,unsafeCSS:()=>yr});var Qr=globalThis,mr=Qr.ShadowRoot&&(Qr.ShadyCSS===void 0||Qr.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,zo=Symbol(),ya=new WeakMap,Pt=class{constructor(e,r,n){if(this._$cssResult$=!0,n!==zo)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=r}get styleSheet(){let e=this.o,r=this.t;if(mr&&e===void 0){let n=r!==void 0&&r.length===1;n&&(e=ya.get(r)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&ya.set(r,e))}return e}toString(){return this.cssText}},yr=t=>new Pt(typeof t=="string"?t:t+"",void 0,zo),_=(t,...e)=>{let r=t.length===1?t[0]:e.reduce(((n,i,a)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+t[a+1]),t[0]);return new Pt(r,t,zo)},gr=(t,e)=>{if(mr)t.adoptedStyleSheets=e.map((r=>r instanceof CSSStyleSheet?r:r.styleSheet));else for(let r of e){let n=document.createElement("style"),i=Qr.litNonce;i!==void 0&&n.setAttribute("nonce",i),n.textContent=r.cssText,t.appendChild(n)}},eo=mr?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let r="";for(let n of e.cssRules)r+=n.cssText;return yr(r)})(t):t;var{is:pd,defineProperty:fd,getOwnPropertyDescriptor:hd,getOwnPropertyNames:md,getOwnPropertySymbols:yd,getPrototypeOf:gd}=Object,to=globalThis,ga=to.trustedTypes,bd=ga?ga.emptyScript:"",xd=to.reactiveElementPolyfillSupport,br=(t,e)=>t,Nt={toAttribute(t,e){switch(e){case Boolean:t=t?bd:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=t!==null;break;case Number:r=t===null?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch{r=null}}return r}},xr=(t,e)=>!pd(t,e),ba={attribute:!0,type:String,converter:Nt,reflect:!1,useDefault:!1,hasChanged:xr};Symbol.metadata??=Symbol("metadata"),to.litPropertyMetadata??=new WeakMap;var be=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,r=ba){if(r.state&&(r.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((r=Object.create(r)).wrapped=!0),this.elementProperties.set(e,r),!r.noAccessor){let n=Symbol(),i=this.getPropertyDescriptor(e,n,r);i!==void 0&&fd(this.prototype,e,i)}}static getPropertyDescriptor(e,r,n){let{get:i,set:a}=hd(this.prototype,e)??{get(){return this[r]},set(s){this[r]=s}};return{get:i,set(s){let l=i?.call(this);a?.call(this,s),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??ba}static _$Ei(){if(this.hasOwnProperty(br("elementProperties")))return;let e=gd(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(br("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(br("properties"))){let r=this.properties,n=[...md(r),...yd(r)];for(let i of n)this.createProperty(i,r[i])}let e=this[Symbol.metadata];if(e!==null){let r=litPropertyMetadata.get(e);if(r!==void 0)for(let[n,i]of r)this.elementProperties.set(n,i)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let i=this._$Eu(r,n);i!==void 0&&this._$Eh.set(i,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let r=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let i of n)r.unshift(eo(i))}else e!==void 0&&r.push(eo(e));return r}static _$Eu(e,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof e=="string"?e.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((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(e.set(n,this[n]),delete this[n]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return gr(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,r,n){this._$AK(e,n)}_$ET(e,r){let n=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,n);if(i!==void 0&&n.reflect===!0){let a=(n.converter?.toAttribute!==void 0?n.converter:Nt).toAttribute(r,n.type);this._$Em=e,a==null?this.removeAttribute(i):this.setAttribute(i,a),this._$Em=null}}_$AK(e,r){let n=this.constructor,i=n._$Eh.get(e);if(i!==void 0&&this._$Em!==i){let a=n.getPropertyOptions(i),s=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:Nt;this._$Em=i,this[i]=s.fromAttribute(r,a.type)??this._$Ej?.get(i)??null,this._$Em=null}}requestUpdate(e,r,n){if(e!==void 0){let i=this.constructor,a=this[e];if(n??=i.getPropertyOptions(e),!((n.hasChanged??xr)(a,r)||n.useDefault&&n.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,n))))return;this.C(e,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,r,{useDefault:n,reflect:i,wrapped:a},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??r??this[e]),a!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(r=void 0),this._$AL.set(e,r)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,a]of this._$Ep)this[i]=a;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[i,a]of n){let{wrapped:s}=a,l=this[i];s!==!0||this._$AL.has(i)||l===void 0||this.C(i,void 0,a,l)}}let e=!1,r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),this._$EO?.forEach((n=>n.hostUpdate?.())),this.update(r)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(r)}willUpdate(e){}_$AE(e){this._$EO?.forEach((r=>r.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((r=>this._$ET(r,this[r]))),this._$EM()}updated(e){}firstUpdated(e){}};be.elementStyles=[],be.shadowRootOptions={mode:"open"},be[br("elementProperties")]=new Map,be[br("finalized")]=new Map,xd?.({ReactiveElement:be}),(to.reactiveElementVersions??=[]).push("2.1.0");var jo=globalThis,ro=jo.trustedTypes,xa=ro?ro.createPolicy("lit-html",{createHTML:t=>t}):void 0,Vo="$lit$",We=`lit$${Math.random().toFixed(9).slice(2)}$`,Ko="?"+We,vd=`<${Ko}>`,at=document,Sr=()=>at.createComment(""),Er=t=>t===null||typeof t!="object"&&typeof t!="function",Zo=Array.isArray,Aa=t=>Zo(t)||typeof t?.[Symbol.iterator]=="function",Go=`[
\f\r]`,vr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,va=/-->/g,Sa=/>/g,nt=RegExp(`>|${Go}(?:([^\\s"'>=/]+)(${Go}*=${Go}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ea=/'/g,Ca=/"/g,wa=/^(?:script|style|textarea|title)$/i,qo=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),$=qo(1),Yo=qo(2),Xo=qo(3),X=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),Oa=new WeakMap,it=at.createTreeWalker(at,129);function Ra(t,e){if(!Zo(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return xa!==void 0?xa.createHTML(e):e}var Ta=(t,e)=>{let r=t.length-1,n=[],i,a=e===2?"<svg>":e===3?"<math>":"",s=vr;for(let l=0;l<r;l++){let d=t[l],p,h,f=-1,m=0;for(;m<d.length&&(s.lastIndex=m,h=s.exec(d),h!==null);)m=s.lastIndex,s===vr?h[1]==="!--"?s=va:h[1]!==void 0?s=Sa:h[2]!==void 0?(wa.test(h[2])&&(i=RegExp("</"+h[2],"g")),s=nt):h[3]!==void 0&&(s=nt):s===nt?h[0]===">"?(s=i??vr,f=-1):h[1]===void 0?f=-2:(f=s.lastIndex-h[2].length,p=h[1],s=h[3]===void 0?nt:h[3]==='"'?Ca:Ea):s===Ca||s===Ea?s=nt:s===va||s===Sa?s=vr:(s=nt,i=void 0);let g=s===nt&&t[l+1].startsWith("/>")?" ":"";a+=s===vr?d+vd:f>=0?(n.push(p),d.slice(0,f)+Vo+d.slice(f)+We+g):d+We+(f===-2?l:g)}return[Ra(t,a+(t[r]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},Cr=class t{constructor({strings:e,_$litType$:r},n){let i;this.parts=[];let a=0,s=0,l=e.length-1,d=this.parts,[p,h]=Ta(e,r);if(this.el=t.createElement(p,n),it.currentNode=this.el.content,r===2||r===3){let f=this.el.content.firstChild;f.replaceWith(...f.childNodes)}for(;(i=it.nextNode())!==null&&d.length<l;){if(i.nodeType===1){if(i.hasAttributes())for(let f of i.getAttributeNames())if(f.endsWith(Vo)){let m=h[s++],g=i.getAttribute(f).split(We),y=/([.?@])?(.*)/.exec(m);d.push({type:1,index:a,name:y[2],strings:g,ctor:y[1]==="."?no:y[1]==="?"?io:y[1]==="@"?ao:ct}),i.removeAttribute(f)}else f.startsWith(We)&&(d.push({type:6,index:a}),i.removeAttribute(f));if(wa.test(i.tagName)){let f=i.textContent.split(We),m=f.length-1;if(m>0){i.textContent=ro?ro.emptyScript:"";for(let g=0;g<m;g++)i.append(f[g],Sr()),it.nextNode(),d.push({type:2,index:++a});i.append(f[m],Sr())}}}else if(i.nodeType===8)if(i.data===Ko)d.push({type:2,index:a});else{let f=-1;for(;(f=i.data.indexOf(We,f+1))!==-1;)d.push({type:7,index:a}),f+=We.length-1}a++}}static createElement(e,r){let n=at.createElement("template");return n.innerHTML=e,n}};function st(t,e,r=t,n){if(e===X)return e;let i=n!==void 0?r._$Co?.[n]:r._$Cl,a=Er(e)?void 0:e._$litDirective$;return i?.constructor!==a&&(i?._$AO?.(!1),a===void 0?i=void 0:(i=new a(t),i._$AT(t,r,n)),n!==void 0?(r._$Co??=[])[n]=i:r._$Cl=i),i!==void 0&&(e=st(t,i._$AS(t,e.values),i,n)),e}var oo=class{constructor(e,r){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=r}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:r},parts:n}=this._$AD,i=(e?.creationScope??at).importNode(r,!0);it.currentNode=i;let a=it.nextNode(),s=0,l=0,d=n[0];for(;d!==void 0;){if(s===d.index){let p;d.type===2?p=new It(a,a.nextSibling,this,e):d.type===1?p=new d.ctor(a,d.name,d.strings,this,e):d.type===6&&(p=new so(a,this,e)),this._$AV.push(p),d=n[++l]}s!==d?.index&&(a=it.nextNode(),s++)}return it.currentNode=at,i}p(e){let r=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,r),r+=n.strings.length-2):n._$AI(e[r])),r++}},It=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,r,n,i){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=e,this._$AB=r,this._$AM=n,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,r=this._$AM;return r!==void 0&&e?.nodeType===11&&(e=r.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,r=this){e=st(this,e,r),Er(e)?e===B||e==null||e===""?(this._$AH!==B&&this._$AR(),this._$AH=B):e!==this._$AH&&e!==X&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Aa(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==B&&Er(this._$AH)?this._$AA.nextSibling.data=e:this.T(at.createTextNode(e)),this._$AH=e}$(e){let{values:r,_$litType$:n}=e,i=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=Cr.createElement(Ra(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===i)this._$AH.p(r);else{let a=new oo(i,this),s=a.u(this.options);a.p(r),this.T(s),this._$AH=a}}_$AC(e){let r=Oa.get(e.strings);return r===void 0&&Oa.set(e.strings,r=new Cr(e)),r}k(e){Zo(this._$AH)||(this._$AH=[],this._$AR());let r=this._$AH,n,i=0;for(let a of e)i===r.length?r.push(n=new t(this.O(Sr()),this.O(Sr()),this,this.options)):n=r[i],n._$AI(a),i++;i<r.length&&(this._$AR(n&&n._$AB.nextSibling,i),r.length=i)}_$AR(e=this._$AA.nextSibling,r){for(this._$AP?.(!1,!0,r);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},ct=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,r,n,i,a){this.type=1,this._$AH=B,this._$AN=void 0,this.element=e,this.name=r,this._$AM=i,this.options=a,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=B}_$AI(e,r=this,n,i){let a=this.strings,s=!1;if(a===void 0)e=st(this,e,r,0),s=!Er(e)||e!==this._$AH&&e!==X,s&&(this._$AH=e);else{let l=e,d,p;for(e=a[0],d=0;d<a.length-1;d++)p=st(this,l[n+d],r,d),p===X&&(p=this._$AH[d]),s||=!Er(p)||p!==this._$AH[d],p===B?e=B:e!==B&&(e+=(p??"")+a[d+1]),this._$AH[d]=p}s&&!i&&this.j(e)}j(e){e===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},no=class extends ct{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===B?void 0:e}},io=class extends ct{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==B)}},ao=class extends ct{constructor(e,r,n,i,a){super(e,r,n,i,a),this.type=5}_$AI(e,r=this){if((e=st(this,e,r,0)??B)===X)return;let n=this._$AH,i=e===B&&n!==B||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,a=e!==B&&(n===B||i);i&&this.element.removeEventListener(this.name,this,n),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},so=class{constructor(e,r,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=r,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){st(this,e)}},Jo={M:Vo,P:We,A:Ko,C:1,L:Ta,R:oo,D:Aa,V:st,I:It,H:ct,N:io,U:ao,B:no,F:so},Sd=jo.litHtmlPolyfillSupport;Sd?.(Cr,It),(jo.litHtmlVersions??=[]).push("3.3.0");var Qo=(t,e,r)=>{let n=r?.renderBefore??e,i=n._$litPart$;if(i===void 0){let a=r?.renderBefore??null;n._$litPart$=i=new It(e.insertBefore(Sr(),a),a,void 0,r??{})}return i._$AI(t),i};var en=globalThis,ke=class extends be{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qo(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return X}};ke._$litElement$=!0,ke.finalized=!0,en.litElementHydrateSupport?.({LitElement:ke});var Ed=en.litElementPolyfillSupport;Ed?.({LitElement:ke});var La={_$AK:(t,e,r)=>{t._$AK(e,r)},_$AL:t=>t._$AL};(en.litElementVersions??=[]).push("4.2.0");var Nf=!1;var on={};D(on,{customElement:()=>Cd,eventOptions:()=>Ad,property:()=>E,query:()=>se,queryAll:()=>Rd,queryAssignedElements:()=>Ld,queryAssignedNodes:()=>rn,queryAsync:()=>Td,standardProperty:()=>_a,state:()=>G});var Cd=t=>(e,r)=>{r!==void 0?r.addInitializer((()=>{customElements.define(t,e)})):customElements.define(t,e)};var Od={attribute:!0,type:String,converter:Nt,reflect:!1,hasChanged:xr},_a=(t=Od,e,r)=>{let{kind:n,metadata:i}=r,a=globalThis.litPropertyMetadata.get(i);if(a===void 0&&globalThis.litPropertyMetadata.set(i,a=new Map),n==="setter"&&((t=Object.create(t)).wrapped=!0),a.set(r.name,t),n==="accessor"){let{name:s}=r;return{set(l){let d=e.get.call(this);e.set.call(this,l),this.requestUpdate(s,d,t)},init(l){return l!==void 0&&this.C(s,void 0,t,l),l}}}if(n==="setter"){let{name:s}=r;return function(l){let d=this[s];e.call(this,l),this.requestUpdate(s,d,t)}}throw Error("Unsupported decorator location: "+n)};function E(t){return(e,r)=>typeof r=="object"?_a(t,e,r):((n,i,a)=>{let s=i.hasOwnProperty(a);return i.constructor.createProperty(a,n),s?Object.getOwnPropertyDescriptor(i,a):void 0})(t,e,r)}function G(t){return E({...t,state:!0,attribute:!1})}function Ad(t){return(e,r)=>{let n=typeof e=="function"?e:e[r];Object.assign(n,t)}}var Ae=(t,e,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,r),r);function se(t,e){return(r,n,i)=>{let a=s=>s.renderRoot?.querySelector(t)??null;if(e){let{get:s,set:l}=typeof n=="object"?r:i??(()=>{let d=Symbol();return{get(){return this[d]},set(p){this[d]=p}}})();return Ae(r,n,{get(){let d=s.call(this);return d===void 0&&(d=a(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return Ae(r,n,{get(){return a(this)}})}}var wd;function Rd(t){return(e,r)=>Ae(e,r,{get(){return(this.renderRoot??(wd??=document.createDocumentFragment())).querySelectorAll(t)}})}function Td(t){return(e,r)=>Ae(e,r,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}function Ld(t){return(e,r)=>{let{slot:n,selector:i}=t??{},a="slot"+(n?`[name=${n}]`:":not([name])");return Ae(e,r,{get(){let s=this.renderRoot?.querySelector(a),l=s?.assignedElements(t)??[];return i===void 0?l:l.filter((d=>d.matches(i)))}})}}function rn(t){return(e,r)=>{let{slot:n}=t??{},i="slot"+(n?`[name=${n}]`:":not([name])");return Ae(e,r,{get(){return this.renderRoot?.querySelector(i)?.assignedNodes(t)??[]}})}}var nn={};D(nn,{repeat:()=>lo});var De={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},pe=t=>(...e)=>({_$litDirective$:t,values:e}),xe=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,r,n){this._$Ct=e,this._$AM=r,this._$Ci=n}_$AS(e,r){return this.update(e,r)}update(e,r){return this.render(...r)}};var{I:_d}=Jo;var Na=t=>t.strings===void 0,Pa=()=>document.createComment(""),kt=(t,e,r)=>{let n=t._$AA.parentNode,i=e===void 0?t._$AB:e._$AA;if(r===void 0){let a=n.insertBefore(Pa(),i),s=n.insertBefore(Pa(),i);r=new _d(a,s,t,t.options)}else{let a=r._$AB.nextSibling,s=r._$AM,l=s!==t;if(l){let d;r._$AQ?.(t),r._$AM=t,r._$AP!==void 0&&(d=t._$AU)!==s._$AU&&r._$AP(d)}if(a!==i||l){let d=r._$AA;for(;d!==a;){let p=d.nextSibling;n.insertBefore(d,i),d=p}}}return r},Ze=(t,e,r=t)=>(t._$AI(e,r),t),Pd={},Ia=(t,e=Pd)=>t._$AH=e,ka=t=>t._$AH,co=t=>{t._$AP?.(!1,!0);let e=t._$AA,r=t._$AB.nextSibling;for(;e!==r;){let n=e.nextSibling;e.remove(),e=n}};var Da=(t,e,r)=>{let n=new Map;for(let i=e;i<=r;i++)n.set(t[i],i);return n},lo=pe(class extends xe{constructor(t){if(super(t),t.type!==De.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,r){let n;r===void 0?r=e:e!==void 0&&(n=e);let i=[],a=[],s=0;for(let l of t)i[s]=n?n(l,s):s,a[s]=r(l,s),s++;return{values:a,keys:i}}render(t,e,r){return this.dt(t,e,r).values}update(t,[e,r,n]){let i=ka(t),{values:a,keys:s}=this.dt(e,r,n);if(!Array.isArray(i))return this.ut=s,a;let l=this.ut??=[],d=[],p,h,f=0,m=i.length-1,g=0,y=a.length-1;for(;f<=m&&g<=y;)if(i[f]===null)f++;else if(i[m]===null)m--;else if(l[f]===s[g])d[g]=Ze(i[f],a[g]),f++,g++;else if(l[m]===s[y])d[y]=Ze(i[m],a[y]),m--,y--;else if(l[f]===s[y])d[y]=Ze(i[f],a[y]),kt(t,d[y+1],i[f]),f++,y--;else if(l[m]===s[g])d[g]=Ze(i[m],a[g]),kt(t,i[f],i[m]),m--,g++;else if(p===void 0&&(p=Da(s,g,y),h=Da(l,f,m)),p.has(l[f]))if(p.has(l[m])){let v=h.get(s[g]),C=v!==void 0?i[v]:null;if(C===null){let O=kt(t,i[f]);Ze(O,a[g]),d[g]=O}else d[g]=Ze(C,a[g]),kt(t,i[f],C),i[v]=null;g++}else co(i[m]),m--;else co(i[f]),f++;for(;g<=y;){let v=kt(t,d[y+1]);Ze(v,a[g]),d[g++]=v}for(;f<=m;){let v=i[f++];v!==null&&co(v)}return this.ut=s,Ia(t,d),X}});var an={};D(an,{classMap:()=>Dt});var Dt=pe(class extends xe{constructor(t){if(super(t),t.type!==De.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((n=>n!==""))));for(let n in e)e[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(e)}let r=t.element.classList;for(let n of this.st)n in e||(r.remove(n),this.st.delete(n));for(let n in e){let i=!!e[n];i===this.st.has(n)||this.nt?.has(n)||(i?(r.add(n),this.st.add(n)):(r.remove(n),this.st.delete(n)))}return X}});var sn={};D(sn,{styleMap:()=>Id});var Ma="important",Nd=" !"+Ma,Id=pe(class extends xe{constructor(t){if(super(t),t.type!==De.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,r)=>{let n=t[r];return n==null?e:e+`${r=r.includes("-")?r:r.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`}),"")}update(t,[e]){let{style:r}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(let n of this.ft)e[n]==null&&(this.ft.delete(n),n.includes("-")?r.removeProperty(n):r[n]=null);for(let n in e){let i=e[n];if(i!=null){this.ft.add(n);let a=typeof i=="string"&&i.endsWith(Nd);n.includes("-")||a?r.setProperty(n,a?i.slice(0,-11):i,a?Ma:""):r[n]=i}}return X}});var ln={};D(ln,{UnsafeHTMLDirective:()=>Mt,unsafeHTML:()=>cn});var Mt=class extends xe{constructor(e){if(super(e),this.it=B,e.type!==De.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===B||e==null)return this._t=void 0,this.it=e;if(e===X)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let r=[e];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};Mt.directiveName="unsafeHTML",Mt.resultType=1;var cn=pe(Mt);var xn={};D(xn,{CacheRegistry:()=>Me,ClearCacheEvent:()=>wr});var un={};D(un,{CancelablePromise:()=>uo,CanceledPromiseError:()=>lt,cancelable:()=>dn});var lt=class extends Error{constructor(e,r,n){super(e),this.canceledPromiseResult=r,this.canceledPromiseError=n}},uo=class extends Promise{constructor(e){super((r,n)=>e(i=>{this.isCanceled?n(new lt("Promise has been canceled",i)):r(i)},i=>{this.isCanceled?n(new lt("Promise has been canceled",void 0,i)):n(i)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},dn=t=>new uo((e,r)=>t.then(e).catch(r));var bn={};D(bn,{FtNotificationEvent:()=>Ar,PostResizeEvent:()=>gn,PreResizeEvent:()=>yn,WithEventBus:()=>Ge,withEventBus:()=>mo});var mn={};D(mn,{applyMixinOnce:()=>ee,customElements:()=>te,dateReviver:()=>Bd,deepCopy:()=>we,deepEqual:()=>he,delay:()=>fo,eventPathContainsMatchingElement:()=>fn,everyDeep:()=>Ud,flatDeep:()=>Fa,forEachDeep:()=>$a,getComposedPathTo:()=>hn,hasChanged:()=>ze,ignoreComposingEvents:()=>Wd,last:()=>$d,minmax:()=>dt,parseDate:()=>Wa,randomId:()=>Hd,someDeep:()=>Ha,unslotText:()=>ho,waitFor:()=>Ba,waitUntil:()=>Md});var pn={};D(pn,{customElement:()=>Or,dateProperty:()=>Dd,isNumber:()=>Ua,jsonProperty:()=>fe,numberProperty:()=>po,optionalNumberProperty:()=>kd});var Or=t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)};function fe(t,e){return E({type:Object,converter:{fromAttribute:r=>{if(r==null)return we(t);try{return JSON.parse(r)}catch{return we(t)}},toAttribute:r=>JSON.stringify(r)},hasChanged:ze,...e??{}})}function kd(t){return po(t)}function po(t){return E({type:Object,converter:{fromAttribute:e=>{var r,n;if(e==null)return;let i=(r=t?.min)!==null&&r!==void 0?r:-1/0,a=(n=t?.max)!==null&&n!==void 0?n:1/0;return Ua(e)?dt(i,+e,a):void 0},toAttribute:e=>e==null?void 0:""+e},useDefault:!0,...t??{}})}function Ua(t){return!isNaN(parseFloat(t))}function Dd(t){return E({type:Object,converter:{fromAttribute:e=>{if(e==null)return;let r=new Date(Date.parse(e));if(!isNaN(r.valueOf()))return r},toAttribute:e=>e?.toISOString()},useDefault:!0,...t??{}})}var fo=t=>new Promise(e=>setTimeout(e,t));async function Md(t,e=10,r=2e4){await Ba(async()=>await t()||void 0,e,r)}async function Ba(t,e=10,r=2e4){let n=await t(),i=performance.now(),a=i;for(;n==null&&(!r||a-i<r);)await fo(e),n=await t(),a=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function Fa(t,e){return t.flatMap(r=>[r,...Fa(e(r),e)])}function $a(t,e,r){let n=(i,a)=>{var s;for(let l=0;l<i.length;l++){let d=i[l];if(!(((s=r(d,l,i,a))!==null&&s!==void 0?s:!0)&&n(e(d),[...a,d])))return!1}return!0};n(t,[])}function Ha(t,e,r){let n=!1;return $a(t,e,(i,a,s,l)=>(n=!!r(i,a,s,l),!n)),n}function Ud(t,e,r){return!Ha(t,e,(n,i,a,s)=>!r(n,i,a,s))}function Bd(...t){return(e,r)=>t.includes(e)?Wa(r):r}function Wa(t){return t.match(/^\d{4}-\d{2}-\d{2}$/)&&(t=t.replace(/-/g,"/")),t=t.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,(e,r,n,i)=>r+n+":"+i),new Date(t)}function Fd(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let r,n;if(Array.isArray(t)){if(r=t.length,r!=e.length)return!1;for(n=r;n--!==0;)if(!he(t[n],e[n]))return!1;return!0}if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;for(n of t.entries())if(!he(n[1],e.get(n[0])))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(n of t.entries())if(!e.has(n[0]))return!1;return!0}if(t.constructor===RegExp)return t.source===e.source&&t.flags===e.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===e.valueOf();let i=s=>Object.keys(s).filter(l=>s[l]!=null),a=i(t);if(r=a.length,r!==i(e).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=r;n--!==0;){let s=a[n];if(!he(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function he(t,e){try{return Fd(t,e)}catch{return!1}}function ze(t,e){return!he(t,e)}function fn(t,e,r=window.document.body){if(e.length>0){let n=t.composedPath();for(let i of n){if(i===r)return!1;if(i.matches&&e.some(a=>i.matches(a)))return!0}}return!1}function dt(t,e,r){return Math.min(Math.max(t,e),r)}function $d(t){return t[t.length-1]}function ho(t){return t instanceof HTMLSlotElement?t.assignedNodes().map(e=>ho(e)).join(""):t?.textContent||""}function hn(t){let e=[],r=n=>{n.stopPropagation(),e=n.composedPath()};return t.addEventListener("get-composed-path",r),t.dispatchEvent(new Event("get-composed-path",{composed:!0})),t.removeEventListener("get-composed-path",r),e}function we(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Hd(t,e){return(e??"")+(""+Math.floor(Math.random()*10**t)).padStart(t,"0")}function ee(t,e){let r=n=>n[t]===!0;return n=>{if(r(n))return n;let i=e(n);return i[t]=!0,i}}function Wd(){return function(t,e,r){let n=r.value;r.value=function(i,...a){if(i.isComposing||i.keyCode===229){i.stopPropagation();return}return n.apply(this,[i].concat(a))}}}function te(t){for(let[e,r]of Object.entries(t))Or(e)(r)}var Ar=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},yn=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},gn=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}},mo=ee(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(r,n,i){this.eventBus.addEventListener(r,n,i)}dispatchEvent(r){return this.eventBus.dispatchEvent(r)}removeEventListener(r,n,i){this.eventBus.removeEventListener(r,n,i)}}}),Ge=class extends mo(Object){};var wr=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},Me=class extends Ge{constructor(){super(...arguments),this.content={}}register(e,r,n=!1){var i;let a=this.content[e],s=(i=a?.status)!==null&&i!==void 0?i:"REGISTERED";this.content[e]={...a,loader:r,final:n,status:s}}registerFinal(e,r){this.register(e,r,!0)}clearAll(e=!0){return this.clearMatching(()=>!0,e)}clearMatching(e,r=!0){let n=Object.keys(this.content).filter(e).filter(i=>this.clear(i,!1)!=null);return r&&n.length>0&&this.dispatchEvent(new wr(n)),n}clear(e,r=!0){if(this.content[e]&&!this.content[e].final)return this.forceClear(e),r&&this.dispatchEvent(new wr([e])),e}forceClear(e){var r;let n=this.content[e];n&&(this.clearClearTimeout(e),(r=n.promise)===null||r===void 0||r.cancel(),this.content[e]={loader:n.loader,final:n.final,status:"REGISTERED"})}clearClearTimeout(e){var r,n,i;((r=this.content[e])===null||r===void 0?void 0:r.clearTimeout)!=null&&(window.clearTimeout((n=this.content[e])===null||n===void 0?void 0:n.clearTimeout),(i=this.content[e])===null||i===void 0||delete i.clearTimeout)}set(e,r,n=!1){this.forceClear(e);let i=async()=>r,a="RESOLVED";this.content[e]={loader:i,final:n,status:a,value:r}}setFinal(e,r){return this.set(e,r,!0)}async get(e,r,n){if(!this.isRegistered(e)){if(!r)throw new Error("Unknown cache key "+e);this.register(e,r)}let i=this.content[e];switch(i.status){case"ERROR":throw i.error;case"LOADING":return i.promise;case"RESOLVED":return i.value;case"REGISTERED":return r=r??i.loader,i.status="LOADING",i.promise=dn(r()),i.promise.then(a=>(i.status="RESOLVED",i.value=a,n!=null&&(this.clearClearTimeout(e),i.clearTimeout=window.setTimeout(()=>this.clear(e),n)),a)).catch(a=>{var s;throw!((s=i.promise)===null||s===void 0)&&s.isCanceled||(i.status="ERROR",i.error=a),a})}}isRegistered(e){return this.content[e]!=null}getNow(e){var r;return(r=this.content[e])===null||r===void 0?void 0:r.value}has(e){var r,n;return((r=this.content[e])===null||r===void 0?void 0:r.status)!==void 0&&((n=this.content[e])===null||n===void 0?void 0:n.status)!=="REGISTERED"}resolvedKeys(){return Object.keys(this.content).filter(e=>{var r;return((r=this.content[e])===null||r===void 0?void 0:r.status)==="RESOLVED"})}resolvedValues(){return this.resolvedKeys().map(e=>this.content[e].value)}keys(){return Object.keys(this.content)}};var On={};D(On,{ClusteringHelper:()=>Cn,formatHierarchicalValues:()=>En});var Sn={};D(Sn,{accessBreadcrumb:()=>jd,accessResult:()=>vn,accessResultId:()=>zd,accessResultUrl:()=>Gd});function vn(t){var e,r,n,i;return(i=(n=(r=(e=t?.map)!==null&&e!==void 0?e:t?.topic)!==null&&r!==void 0?r:t?.document)!==null&&n!==void 0?n:t?.htmlPackage)!==null&&i!==void 0?i:t?.htmlPackagePage}function zd(t){var e,r,n,i,a,s,l,d,p;return(d=(s=(i=(r=(e=t?.map)===null||e===void 0?void 0:e.mapId)!==null&&r!==void 0?r:(n=t?.topic)===null||n===void 0?void 0:n.tocId)!==null&&i!==void 0?i:(a=t?.document)===null||a===void 0?void 0:a.documentId)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.packageId)!==null&&d!==void 0?d:(p=t?.htmlPackagePage)===null||p===void 0?void 0:p.contentId}function Gd(t){var e,r,n,i,a,s,l,d,p;return(d=(s=(i=(r=(e=t?.map)===null||e===void 0?void 0:e.readerUrl)!==null&&r!==void 0?r:(n=t?.topic)===null||n===void 0?void 0:n.readerUrl)!==null&&i!==void 0?i:(a=t?.document)===null||a===void 0?void 0:a.viewerUrl)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.viewerUrl)!==null&&d!==void 0?d:(p=t?.htmlPackagePage)===null||p===void 0?void 0:p.viewerUrl}function jd(t){return t?.topic?[t.topic.mapTitle,...t.topic.breadcrumb]:t?.map?[t.map.title]:t?.document?[t.document.title]:t?.htmlPackage?[t.htmlPackage.title]:t?.htmlPackagePage?[t.htmlPackagePage.packageTitle,t.htmlPackagePage.title]:[]}function En(t,e){return e&&e>1&&t.length>=e?`... > ${t[t.length-1]}`:t.join(" > ")}var Cn=class t{constructor(e,r,n,i){this.allResults=e,this.selectedResult=r,this.clusteringMetadata=n,this.metadataDescriptors=i}static findResultWithMetadataValue(e,r,n){return e?.find(i=>{var a;return((a=this.extractResultMetadata({result:i}).find(s=>s.key==r))===null||a===void 0?void 0:a.value)==n})}static extractResultMetadata(e){var r,n;let i=(n=(r=vn(e.result))===null||r===void 0?void 0:r.metadata)!==null&&n!==void 0?n:[];return e.key==null?t.flattenMetadata(i,e.hierarchicalValueTruncatingLevel,e.dateFormatter):t.flattenMetadata(i.find(a=>a.key===e.key),e.hierarchicalValueTruncatingLevel,e.dateFormatter)}static flattenMetadata(e,r,n){if(Array.isArray(e))return e.map(a=>t.flattenMetadata(a,r,n)).filter(a=>a!=null);let i=e?.hierarchicalValues!=null&&e.hierarchicalValues.length>0;if(!(e==null||e.values.length==0&&!i))if(i){let a=[],s=[];return e.hierarchicalValues.forEach(l=>{a.push(En(l)),s.push(En(l,r))}),{key:e.key,label:e.label,value:a.join(", "),displayValue:s.join(", "),displayTooltipValue:a.join(", ")}}else{let a=e.values.join(", "),s=e.values.map(l=>n?n(l):l).join(", ");return{key:e.key,label:e.label,value:a,displayValue:s,displayTooltipValue:s}}}computeClustersItemsForMetadata(e,r,n="No value",i,a){var s,l;let d=t.extractResultMetadata({result:this.selectedResult,key:e,dateFormatter:a}),p=(s=d?.label)!==null&&s!==void 0?s:(l=this.getMetadataDescriptor(e))===null||l===void 0?void 0:l.label;return this.allResults.map(f=>t.extractResultMetadata({result:f,key:e,hierarchicalValueTruncatingLevel:i,dateFormatter:a})).map(f=>f??{key:e,label:p,value:void 0,displayValue:n}).filter(f=>f.value!=d?.value).filter((f,m,g)=>g.findIndex(y=>y.value===f.value)===m).map(f=>({result:this.findBestResultForMetadataValue(e,f.value),metadata:f})).sort((f,m)=>this.compareMetadata(f.metadata.value,m.metadata.value,e,r))}compareMetadata(e,r,n,i){if(e==null)return-1;if(r==null)return 1;let a=this.getMetadataDescriptor(n),s=a?.sortRule||"NONE",l=a?.reverseSort||!1;if(s=="ALPHABET"||s=="VERSION"){let d=e.localeCompare(r,i,{numeric:!0});return l?d*-1:d}return 0}getMetadataDescriptor(e){return this.metadataDescriptors.find(r=>e==r.key)}findBestResultForMetadataValue(e,r){let n=this.allResults.filter(d=>{var p;return((p=t.extractResultMetadata({result:d,key:e}))===null||p===void 0?void 0:p.value)==r}),a=[...t.extractResultMetadata({result:this.selectedResult}).filter(d=>this.clusteringMetadata.has(d.key)).filter(d=>d.key!==e)],s,l=-1;for(let d of n){let p=this.countMatchingMetadata(d,a);if(p>l&&(l=p,s=d,p===a.length))break}return s}countMatchingMetadata(e,r){return t.extractResultMetadata({result:e}).filter(n=>r.some(i=>i.key===n.key&&i.value===n.value)).length}};var An={};D(An,{Debouncer:()=>ce});var ce=class{constructor(e=0){this.timeout=e,this.callbacks=[]}run(e,r){return this.callbacks=[e],this.debounce(r)}queue(e,r){return this.callbacks.push(e),this.debounce(r)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(e){return this.promise==null&&(this.promise=new Promise((r,n)=>{this.resolvePromise=r,this.rejectPromise=n})),this.clearTimeout(),this._debounce=window.setTimeout(()=>this.runCallbacks(),e??this.timeout),this.promise}async runCallbacks(){var e,r;let n=[...this.callbacks];this.callbacks=[];let i=(e=this.rejectPromise)!==null&&e!==void 0?e:(()=>null),a=(r=this.resolvePromise)!==null&&r!==void 0?r:(()=>null);this.clearPromise();for(let s of n)try{await s()}catch(l){i(l);return}a(!0)}clearTimeout(){this._debounce!=null&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}};var Ln={};D(Ln,{designSystemVariables:()=>H});var Tn={};D(Tn,{DesignSystemFamily:()=>Rr,DesignSystemSize:()=>Tr,FtCssVariableFactory:()=>o,badge:()=>iu,banner:()=>nu,button:()=>Zd,card:()=>qd,chart:()=>vu,checkbox:()=>Xd,chip:()=>tu,chipChoice:()=>eu,chipGroup:()=>ru,collapsible:()=>bu,combobox:()=>yu,dateRangePicker:()=>Ru,drawer:()=>uu,floatingMenu:()=>mu,foundation:()=>c,link:()=>ou,modal:()=>du,notice:()=>Eu,notification:()=>Ou,pageDesigner:()=>Su,pageFooter:()=>cu,pageHeader:()=>su,pageLayout:()=>lu,popover:()=>gu,radio:()=>Jd,reorderableList:()=>wu,resolveFamilyClass:()=>wn,resolveSizeClass:()=>Rn,semantic:()=>u,setVariable:()=>oe,switch_:()=>xu,table:()=>Qd,tabs:()=>pu,textArea:()=>hu,textInput:()=>fu,titleBreadcrumb:()=>au,toggle:()=>Cu,tooltip:()=>Au,treeList:()=>Yd,typographies:()=>Vd,typographyBody1Medium:()=>Za,typographyBody1Regular:()=>Ka,typographyBody1Semibold:()=>qa,typographyBody2Medium:()=>Xa,typographyBody2MediumUnderline:()=>Ja,typographyBody2Regular:()=>Ya,typographyBody2Semibold:()=>Qa,typographyCaption1Medium:()=>es,typographyCaption1Semibold:()=>ts,typographyCaption2Bold:()=>ns,typographyCaption2Medium:()=>rs,typographyCaption2Semibold:()=>os,typographyDisplay:()=>za,typographyTitle1:()=>Ga,typographyTitle2:()=>ja,typographyTitle3:()=>Va,typographyVariants:()=>Kd});var qe=t=>typeof t=="string"?yr(t):t,o=class{static create(e,r,n,i){let a=l=>qe(l??i),s=_`var(${qe(e)}, ${a(i)})`;return s.name=e,s.description=r,s.category=n,s.defaultValue=i,s.defaultCssValue=a,s.set=l=>oe(s,l??a(i)),s.get=l=>_`var(${qe(e)}, ${a(l)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>i,s}static extend(e,r,n,i){let a=l=>n.get(l??i),s=_`var(${qe(e)}, ${a(i)})`;return s.name=e,s.description=r,s.category=n.category,s.fallbackVariable=n,s.defaultValue=i,s.defaultCssValue=a,s.set=l=>oe(s,l??a(i)),s.get=l=>_`var(${qe(e)}, ${a(l)})`,s.breadcrumb=()=>[n.name,...n.breadcrumb()],s.lastResortDefaultValue=()=>i??n.lastResortDefaultValue(),s}static external(e,r){let n=a=>e.defaultCssValue(a),i=_`var(${qe(e.name)}, ${n(e.defaultValue)})`;return i.name=e.name,i.category=e.category,i.fallbackVariable=e.fallbackVariable,i.defaultValue=e.defaultValue,i.context=r,i.defaultCssValue=n,i.set=a=>e.set(a),i.get=a=>_`var(${qe(e.name)}, ${n(a)})`,i.breadcrumb=()=>e.breadcrumb(),i.lastResortDefaultValue=()=>e.lastResortDefaultValue(),i}};function oe(t,e){return qe(`${t.name}: ${e}`)}var c={colorWhite:o.create("--ftds-color-white","","COLOR","#ffffff"),colorGray0:o.create("--ftds-color-gray-0","","COLOR","#71718e"),colorGray10:o.create("--ftds-color-gray-10","","COLOR","#fbfbfc"),colorGray20:o.create("--ftds-color-gray-20","","COLOR","#f2f2f5"),colorGray30:o.create("--ftds-color-gray-30","","COLOR","#e9e9ed"),colorGray40:o.create("--ftds-color-gray-40","","COLOR","#e0e0e6"),colorGray50:o.create("--ftds-color-gray-50","","COLOR","#cdcdd7"),colorGray60:o.create("--ftds-color-gray-60","","COLOR","#bbbbc9"),colorGray70:o.create("--ftds-color-gray-70","","COLOR","#a8a8ba"),colorGray80:o.create("--ftds-color-gray-80","","COLOR","#9696ab"),colorGray90:o.create("--ftds-color-gray-90","","COLOR","#83839d"),colorGray100:o.create("--ftds-color-gray-100","","COLOR","#62627c"),colorGray200:o.create("--ftds-color-gray-200","","COLOR","#545469"),colorGray300:o.create("--ftds-color-gray-300","","COLOR","#454557"),colorGray400:o.create("--ftds-color-gray-400","","COLOR","#363644"),colorGray500:o.create("--ftds-color-gray-500","","COLOR","#282832"),colorGray600:o.create("--ftds-color-gray-600","","COLOR","#19191f"),colorGray700:o.create("--ftds-color-gray-700","","COLOR","#0a0a0d"),colorBrand0:o.create("--ftds-color-brand-0","","COLOR","#9d207b"),colorBrand10:o.create("--ftds-color-brand-10","","COLOR","#f7edf4"),colorBrand20:o.create("--ftds-color-brand-20","","COLOR","#ebcfe4"),colorBrand30:o.create("--ftds-color-brand-30","","COLOR","#dfb2d3"),colorBrand40:o.create("--ftds-color-brand-40","","COLOR","#d395c2"),colorBrand50:o.create("--ftds-color-brand-50","","COLOR","#c778b1"),colorBrand60:o.create("--ftds-color-brand-60","","COLOR","#ba5ba1"),colorBrand70:o.create("--ftds-color-brand-70","","COLOR","#ae3e90"),colorBrand100:o.create("--ftds-color-brand-100","","COLOR","#8d1d6e"),colorBrand200:o.create("--ftds-color-brand-200","","COLOR","#78185e"),colorBrand300:o.create("--ftds-color-brand-300","","COLOR","#62144d"),colorBrand400:o.create("--ftds-color-brand-400","","COLOR","#4d103c"),colorBrand500:o.create("--ftds-color-brand-500","","COLOR","#380b2c"),colorBrand600:o.create("--ftds-color-brand-600","","COLOR","#23071b"),colorBrand700:o.create("--ftds-color-brand-700","","COLOR","#0d030b"),colorCyan0:o.create("--ftds-color-cyan-0","","COLOR","#0e98b4"),colorCyan10:o.create("--ftds-color-cyan-10","","COLOR","#ebf6f9"),colorCyan20:o.create("--ftds-color-cyan-20","","COLOR","#cbe9ef"),colorCyan30:o.create("--ftds-color-cyan-30","","COLOR","#acdbe5"),colorCyan40:o.create("--ftds-color-cyan-40","","COLOR","#8ccedb"),colorCyan50:o.create("--ftds-color-cyan-50","","COLOR","#6dc0d1"),colorCyan60:o.create("--ftds-color-cyan-60","","COLOR","#4db3c8"),colorCyan70:o.create("--ftds-color-cyan-70","","COLOR","#2ea5be"),colorCyan100:o.create("--ftds-color-cyan-100","","COLOR","#0c849c"),colorCyan200:o.create("--ftds-color-cyan-200","","COLOR","#0a7085"),colorCyan300:o.create("--ftds-color-cyan-300","","COLOR","#085c6d"),colorCyan400:o.create("--ftds-color-cyan-400","","COLOR","#074856"),colorCyan500:o.create("--ftds-color-cyan-500","","COLOR","#05343e"),colorCyan600:o.create("--ftds-color-cyan-600","","COLOR","#032127"),colorCyan700:o.create("--ftds-color-cyan-700","","COLOR","#010d0f"),colorGreen0:o.create("--ftds-color-green-0","","COLOR","#21a274"),colorGreen10:o.create("--ftds-color-green-10","","COLOR","#edf7f3"),colorGreen20:o.create("--ftds-color-green-20","","COLOR","#cfebe1"),colorGreen30:o.create("--ftds-color-green-30","","COLOR","#b2dfcf"),colorGreen40:o.create("--ftds-color-green-40","","COLOR","#95d3bd"),colorGreen50:o.create("--ftds-color-green-50","","COLOR","#78c7ab"),colorGreen60:o.create("--ftds-color-green-60","","COLOR","#5bba98"),colorGreen70:o.create("--ftds-color-green-70","","COLOR","#3eae86"),colorGreen100:o.create("--ftds-color-green-100","","COLOR","#1d8d65"),colorGreen200:o.create("--ftds-color-green-200","","COLOR","#187856"),colorGreen300:o.create("--ftds-color-green-300","","COLOR","#146246"),colorGreen400:o.create("--ftds-color-green-400","","COLOR","#104d37"),colorGreen500:o.create("--ftds-color-green-500","","COLOR","#0b3828"),colorGreen600:o.create("--ftds-color-green-600","","COLOR","#072319"),colorGreen700:o.create("--ftds-color-green-700","","COLOR","#030d0a"),colorOran