@fluid-topics/ft-ripple
Version:
A custom Fluid Topics ripple component
4 lines • 292 kB
JavaScript
"use strict";(()=>{var Vs=Object.create;var Tr=Object.defineProperty;var Ks=Object.getOwnPropertyDescriptor;var Zs=Object.getOwnPropertyNames;var qs=Object.getPrototypeOf,Ys=Object.prototype.hasOwnProperty;var Xs=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),D=(t,e)=>{for(var o in e)Tr(t,o,{get:e[o],enumerable:!0})},Js=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Zs(e))!Ys.call(t,a)&&a!==o&&Tr(t,a,{get:()=>e[a],enumerable:!(n=Ks(e,a))||n.enumerable});return t};var Qs=(t,e,o)=>(o=t!=null?Vs(qs(t)):{},Js(e||!t||!t.__esModule?Tr(o,"default",{value:t,enumerable:!0}):o,t));var Yi=Xs((_e,qi)=>{var Er=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof global<"u"&&global,Cr=function(){function t(){this.fetch=!1,this.DOMException=Er.DOMException}return t.prototype=Er,new t}();(function(t){var e=function(o){var n=typeof t<"u"&&t||typeof self<"u"&&self||typeof global<"u"&&global||{},a={searchParams:"URLSearchParams"in n,iterable:"Symbol"in n&&"iterator"in Symbol,blob:"FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in n,arrayBuffer:"ArrayBuffer"in n};function i(y){return y&&DataView.prototype.isPrototypeOf(y)}if(a.arrayBuffer)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(y){return y&&s.indexOf(Object.prototype.toString.call(y))>-1};function d(y){if(typeof y!="string"&&(y=String(y)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(y)||y==="")throw new TypeError('Invalid character in header field name: "'+y+'"');return y.toLowerCase()}function f(y){return typeof y!="string"&&(y=String(y)),y}function h(y){var v={next:function(){var T=y.shift();return{done:T===void 0,value:T}}};return a.iterable&&(v[Symbol.iterator]=function(){return v}),v}function p(y){this.map={},y instanceof p?y.forEach(function(v,T){this.append(T,v)},this):Array.isArray(y)?y.forEach(function(v){if(v.length!=2)throw new TypeError("Headers constructor: expected name/value pair to be length 2, found"+v.length);this.append(v[0],v[1])},this):y&&Object.getOwnPropertyNames(y).forEach(function(v){this.append(v,y[v])},this)}p.prototype.append=function(y,v){y=d(y),v=f(v);var T=this.map[y];this.map[y]=T?T+", "+v:v},p.prototype.delete=function(y){delete this.map[d(y)]},p.prototype.get=function(y){return y=d(y),this.has(y)?this.map[y]:null},p.prototype.has=function(y){return this.map.hasOwnProperty(d(y))},p.prototype.set=function(y,v){this.map[d(y)]=f(v)},p.prototype.forEach=function(y,v){for(var T in this.map)this.map.hasOwnProperty(T)&&y.call(v,this.map[T],T,this)},p.prototype.keys=function(){var y=[];return this.forEach(function(v,T){y.push(T)}),h(y)},p.prototype.values=function(){var y=[];return this.forEach(function(v){y.push(v)}),h(y)},p.prototype.entries=function(){var y=[];return this.forEach(function(v,T){y.push([T,v])}),h(y)},a.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(y){if(!y._noBody){if(y.bodyUsed)return Promise.reject(new TypeError("Already read"));y.bodyUsed=!0}}function b(y){return new Promise(function(v,T){y.onload=function(){v(y.result)},y.onerror=function(){T(y.error)}})}function g(y){var v=new FileReader,T=b(v);return v.readAsArrayBuffer(y),T}function O(y){var v=new FileReader,T=b(v),M=/charset=([A-Za-z0-9_-]+)/.exec(y.type),U=M?M[1]:"utf-8";return v.readAsText(y,U),T}function C(y){for(var v=new Uint8Array(y),T=new Array(v.length),M=0;M<v.length;M++)T[M]=String.fromCharCode(v[M]);return T.join("")}function A(y){if(y.slice)return y.slice(0);var v=new Uint8Array(y.byteLength);return v.set(new Uint8Array(y)),v.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(y){this.bodyUsed=this.bodyUsed,this._bodyInit=y,y?typeof y=="string"?this._bodyText=y:a.blob&&Blob.prototype.isPrototypeOf(y)?this._bodyBlob=y:a.formData&&FormData.prototype.isPrototypeOf(y)?this._bodyFormData=y:a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)?this._bodyText=y.toString():a.arrayBuffer&&a.blob&&i(y)?(this._bodyArrayBuffer=A(y.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(y)||l(y))?this._bodyArrayBuffer=A(y):this._bodyText=y=Object.prototype.toString.call(y):(this._noBody=!0,this._bodyText=""),this.headers.get("content-type")||(typeof y=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):a.searchParams&&URLSearchParams.prototype.isPrototypeOf(y)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},a.blob&&(this.blob=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))}),this.arrayBuffer=function(){if(this._bodyArrayBuffer){var y=m(this);return y||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else{if(a.blob)return this.blob().then(g);throw new Error("could not read as ArrayBuffer")}},this.text=function(){var y=m(this);if(y)return y;if(this._bodyBlob)return O(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a.formData&&(this.formData=function(){return this.text().then(R)}),this.json=function(){return this.text().then(JSON.parse)},this}var S=["CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE"];function x(y){var v=y.toUpperCase();return S.indexOf(v)>-1?v:y}function E(y,v){if(!(this instanceof E))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');v=v||{};var T=v.body;if(y instanceof E){if(y.bodyUsed)throw new TypeError("Already read");this.url=y.url,this.credentials=y.credentials,v.headers||(this.headers=new p(y.headers)),this.method=y.method,this.mode=y.mode,this.signal=y.signal,!T&&y._bodyInit!=null&&(T=y._bodyInit,y.bodyUsed=!0)}else this.url=String(y);if(this.credentials=v.credentials||this.credentials||"same-origin",(v.headers||!this.headers)&&(this.headers=new p(v.headers)),this.method=x(v.method||this.method||"GET"),this.mode=v.mode||this.mode||null,this.signal=v.signal||this.signal||function(){if("AbortController"in n){var N=new AbortController;return N.signal}}(),this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&T)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(T),(this.method==="GET"||this.method==="HEAD")&&(v.cache==="no-store"||v.cache==="no-cache")){var M=/([?&])_=[^&]*/;if(M.test(this.url))this.url=this.url.replace(M,"$1_="+new Date().getTime());else{var U=/\?/;this.url+=(U.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}E.prototype.clone=function(){return new E(this,{body:this._bodyInit})};function R(y){var v=new FormData;return y.trim().split("&").forEach(function(T){if(T){var M=T.split("="),U=M.shift().replace(/\+/g," "),N=M.join("=").replace(/\+/g," ");v.append(decodeURIComponent(U),decodeURIComponent(N))}}),v}function _(y){var v=new p,T=y.replace(/\r?\n[\t ]+/g," ");return T.split("\r").map(function(M){return M.indexOf(`
`)===0?M.substr(1,M.length):M}).forEach(function(M){var U=M.split(":"),N=U.shift().trim();if(N){var qt=U.join(":").trim();try{v.append(N,qt)}catch(Rr){console.warn("Response "+Rr.message)}}}),v}w.call(E.prototype);function F(y,v){if(!(this instanceof F))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');if(v||(v={}),this.type="default",this.status=v.status===void 0?200:v.status,this.status<200||this.status>599)throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].");this.ok=this.status>=200&&this.status<300,this.statusText=v.statusText===void 0?"":""+v.statusText,this.headers=new p(v.headers),this.url=v.url||"",this._initBody(y)}w.call(F.prototype),F.prototype.clone=function(){return new F(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},F.error=function(){var y=new F(null,{status:200,statusText:""});return y.ok=!1,y.status=0,y.type="error",y};var k=[301,302,303,307,308];F.redirect=function(y,v){if(k.indexOf(v)===-1)throw new RangeError("Invalid status code");return new F(null,{status:v,headers:{location:y}})},o.DOMException=n.DOMException;try{new o.DOMException}catch{o.DOMException=function(v,T){this.message=v,this.name=T;var M=Error(v);this.stack=M.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function I(y,v){return new Promise(function(T,M){var U=new E(y,v);if(U.signal&&U.signal.aborted)return M(new o.DOMException("Aborted","AbortError"));var N=new XMLHttpRequest;function qt(){N.abort()}N.onload=function(){var j={statusText:N.statusText,headers:_(N.getAllResponseHeaders()||"")};U.url.indexOf("file://")===0&&(N.status<200||N.status>599)?j.status=200:j.status=N.status,j.url="responseURL"in N?N.responseURL:j.headers.get("X-Request-URL");var Le="response"in N?N.response:N.responseText;setTimeout(function(){T(new F(Le,j))},0)},N.onerror=function(){setTimeout(function(){M(new TypeError("Network request failed"))},0)},N.ontimeout=function(){setTimeout(function(){M(new TypeError("Network request timed out"))},0)},N.onabort=function(){setTimeout(function(){M(new o.DOMException("Aborted","AbortError"))},0)};function Rr(j){try{return j===""&&n.location.href?n.location.href:j}catch{return j}}if(N.open(U.method,Rr(U.url),!0),U.credentials==="include"?N.withCredentials=!0:U.credentials==="omit"&&(N.withCredentials=!1),"responseType"in N&&(a.blob?N.responseType="blob":a.arrayBuffer&&(N.responseType="arraybuffer")),v&&typeof v.headers=="object"&&!(v.headers instanceof p||n.Headers&&v.headers instanceof n.Headers)){var Mn=[];Object.getOwnPropertyNames(v.headers).forEach(function(j){Mn.push(d(j)),N.setRequestHeader(j,f(v.headers[j]))}),U.headers.forEach(function(j,Le){Mn.indexOf(Le)===-1&&N.setRequestHeader(Le,j)})}else U.headers.forEach(function(j,Le){N.setRequestHeader(Le,j)});U.signal&&(U.signal.addEventListener("abort",qt),N.onreadystatechange=function(){N.readyState===4&&U.signal.removeEventListener("abort",qt)}),N.send(typeof U._bodyInit>"u"?null:U._bodyInit)})}return I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=p,n.Request=E,n.Response=F),o.Headers=p,o.Request=E,o.Response=F,o.fetch=I,o}({})})(Cr);Cr.fetch.ponyfill=!0;delete Cr.fetch.polyfill;var gt=Er.fetch?Er:Cr;_e=gt.fetch;_e.default=gt.fetch;_e.fetch=gt.fetch;_e.Headers=gt.Headers;_e.Request=gt.Request;_e.Response=gt.Response;qi.exports=_e});if(!ShadowRoot.prototype.createElement){let t=window.HTMLElement,e=window.customElements.define,o=window.customElements.get,n=window.customElements,a=new WeakMap,i=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(S,x){if(S=S.toLowerCase(),this._getDefinition(S)!==void 0)throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${S}" has already been used with this registry`);if(this._definitionsByClass.get(x)!==void 0)throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");let E=x.prototype.attributeChangedCallback,R=new Set(x.observedAttributes||[]);m(x,R,E);let _={elementClass:x,connectedCallback:x.prototype.connectedCallback,disconnectedCallback:x.prototype.disconnectedCallback,adoptedCallback:x.prototype.adoptedCallback,attributeChangedCallback:E,formAssociated:x.formAssociated,formAssociatedCallback:x.prototype.formAssociatedCallback,formDisabledCallback:x.prototype.formDisabledCallback,formResetCallback:x.prototype.formResetCallback,formStateRestoreCallback:x.prototype.formStateRestoreCallback,observedAttributes:R};this._definitionsByTag.set(S,_),this._definitionsByClass.set(x,_);let F=o.call(n,S);F||(F=p(S),e.call(n,S,F)),this===window.customElements&&(s.set(x,_),_.standInClass=F);let k=this._awaitingUpgrade.get(S);if(k){this._awaitingUpgrade.delete(S);for(let y of k)i.delete(y),g(y,_,!0)}let I=this._whenDefinedPromises.get(S);return I!==void 0&&(I.resolve(x),this._whenDefinedPromises.delete(S)),x}upgrade(){C.push(this),n.upgrade.apply(n,arguments),C.pop()}get(S){return this._definitionsByTag.get(S)?.elementClass}_getDefinition(S){return this._definitionsByTag.get(S)}whenDefined(S){let x=this._getDefinition(S);if(x!==void 0)return Promise.resolve(x.elementClass);let E=this._whenDefinedPromises.get(S);return E===void 0&&(E={},E.promise=new Promise(R=>E.resolve=R),this._whenDefinedPromises.set(S,E)),E.promise}_upgradeWhenDefined(S,x,E){let R=this._awaitingUpgrade.get(x);R||this._awaitingUpgrade.set(x,R=new Set),E?R.add(S):R.delete(S)}};let d;window.HTMLElement=function(){let x=d;if(x)return d=void 0,x;let E=s.get(this.constructor);if(!E)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return x=Reflect.construct(t,[],E.standInClass),Object.setPrototypeOf(x,this.constructor.prototype),a.set(x,E),x},window.HTMLElement.prototype=t.prototype;let f=S=>S===document||S instanceof ShadowRoot,h=S=>{let x=S.getRootNode();if(!f(x)){let E=C[C.length-1];if(E instanceof CustomElementRegistry)return E;x=E.getRootNode(),f(x)||(x=l.get(x)?.getRootNode()||document)}return x.customElements},p=S=>class{static get formAssociated(){return!0}constructor(){let E=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(E,HTMLElement.prototype);let R=h(E)||window.customElements,_=R._getDefinition(S);return _?g(E,_):i.set(E,R),E}connectedCallback(){let E=a.get(this);E?E.connectedCallback&&E.connectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,S,!0)}disconnectedCallback(){let E=a.get(this);E?E.disconnectedCallback&&E.disconnectedCallback.apply(this,arguments):i.get(this)._upgradeWhenDefined(this,S,!1)}adoptedCallback(){a.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){let E=a.get(this);E&&E.formAssociated&&E?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){let E=a.get(this);E?.formAssociated&&E?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){let E=a.get(this);E?.formAssociated&&E?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){let E=a.get(this);E?.formAssociated&&E?.formStateRestoreCallback?.apply(this,arguments)}},m=(S,x,E)=>{if(x.size===0||E===void 0)return;let R=S.prototype.setAttribute;R&&(S.prototype.setAttribute=function(k,I){let y=k.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);R.call(this,y,I),E.call(this,y,v,I)}else R.call(this,y,I)});let _=S.prototype.removeAttribute;_&&(S.prototype.removeAttribute=function(k){let I=k.toLowerCase();if(x.has(I)){let y=this.getAttribute(I);_.call(this,I),E.call(this,I,y,null)}else _.call(this,I)});let F=S.prototype.toggleAttribute;F&&(S.prototype.toggleAttribute=function(k,I){let y=k.toLowerCase();if(x.has(y)){let v=this.getAttribute(y);F.call(this,y,I);let T=this.getAttribute(y);E.call(this,y,v,T)}else F.call(this,y,I)})},b=S=>{let x=Object.getPrototypeOf(S);if(x!==window.HTMLElement)return x===t?Object.setPrototypeOf(S,window.HTMLElement):b(x)},g=(S,x,E=!1)=>{Object.setPrototypeOf(S,x.elementClass.prototype),a.set(S,x),d=S;try{new x.elementClass}catch{b(x.elementClass),new x.elementClass}x.attributeChangedCallback&&x.observedAttributes.forEach(R=>{S.hasAttribute(R)&&x.attributeChangedCallback.call(S,R,null,S.getAttribute(R))}),E&&x.connectedCallback&&S.isConnected&&x.connectedCallback.call(S)},O=Element.prototype.attachShadow;Element.prototype.attachShadow=function(S){let x=O.apply(this,arguments);return S.customElements&&(x.customElements=S.customElements),x};let C=[document],A=(S,x,E=void 0)=>{let R=(E?Object.getPrototypeOf(E):S.prototype)[x];S.prototype[x]=function(){C.push(this);let _=R.apply(E||this,arguments);return _!==void 0&&l.set(_,this),C.pop(),_}};A(ShadowRoot,"createElement",document),A(ShadowRoot,"importNode",document),A(Element,"insertAdjacentHTML");let w=(S,x)=>{let E=Object.getOwnPropertyDescriptor(S.prototype,x);Object.defineProperty(S.prototype,x,{...E,set(R){C.push(this),E.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 S=new WeakMap,x=HTMLElement.prototype.attachInternals,E=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...k){let I=x.call(this,...k);return S.set(I,this),I},E.forEach(k=>{let I=window.ElementInternals.prototype,y=I[k];I[k]=function(...v){let T=S.get(this);if(a.get(T).formAssociated===!0)return y?.call(this,...v);throw new DOMException(`Failed to execute ${y} on 'ElementInternals': The target element is not a form-associated custom element.`)}});class R extends Array{constructor(I){super(...I),this._elements=I}get value(){return this._elements.find(I=>I.checked===!0)?.value||""}}class _{constructor(I){let y=new Map;I.forEach((v,T)=>{let M=v.getAttribute("name"),U=y.get(M)||[];this[+T]=v,U.push(v),y.set(M,U)}),this.length=I.length,y.forEach((v,T)=>{v&&(v.length===1?this[T]=v[0]:this[T]=new R(v))})}namedItem(I){return this[I]}}let F=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){let k=F.get.call(this,[]),I=[];for(let y of k){let v=a.get(y);(!v||v.formAssociated===!0)&&I.push(y)}return new _(I)}})}}try{window.customElements.define("custom-element",null)}catch{let e=window.customElements.define;window.customElements.define=(o,n,a)=>{if(n!==null)try{e.bind(window.customElements)(o,n,a)}catch(i){console.info(o,n,a,i)}}}var Br={};D(Br,{CSSResult:()=>Qe,LitElement:()=>de,ReactiveElement:()=>re,_$LE:()=>Xn,_$LH:()=>Fr,adoptStyles:()=>Ct,css:()=>H,defaultConverter:()=>et,getCompatibleStyle:()=>Xt,html:()=>ve,isServer:()=>bu,mathml:()=>dc,noChange:()=>W,notEqual:()=>wt,nothing:()=>B,render:()=>Mr,supportsAdoptingStyleSheets:()=>Ot,svg:()=>lc,unsafeCSS:()=>Et});var Yt=globalThis,Ot=Yt.ShadowRoot&&(Yt.ShadyCSS===void 0||Yt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ir=Symbol(),Un=new WeakMap,Qe=class{constructor(e,o,n){if(this._$cssResult$=!0,n!==Ir)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=o}get styleSheet(){let e=this.o,o=this.t;if(Ot&&e===void 0){let n=o!==void 0&&o.length===1;n&&(e=Un.get(o)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),n&&Un.set(o,e))}return e}toString(){return this.cssText}},Et=t=>new Qe(typeof t=="string"?t:t+"",void 0,Ir),H=(t,...e)=>{let o=t.length===1?t[0]:e.reduce((n,a,i)=>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.")})(a)+t[i+1],t[0]);return new Qe(o,t,Ir)},Ct=(t,e)=>{if(Ot)t.adoptedStyleSheets=e.map(o=>o instanceof CSSStyleSheet?o:o.styleSheet);else for(let o of e){let n=document.createElement("style"),a=Yt.litNonce;a!==void 0&&n.setAttribute("nonce",a),n.textContent=o.cssText,t.appendChild(n)}},Xt=Ot?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let o="";for(let n of e.cssRules)o+=n.cssText;return Et(o)})(t):t;var{is:ec,defineProperty:tc,getOwnPropertyDescriptor:rc,getOwnPropertyNames:oc,getOwnPropertySymbols:nc,getPrototypeOf:ac}=Object,Jt=globalThis,Bn=Jt.trustedTypes,ic=Bn?Bn.emptyScript:"",sc=Jt.reactiveElementPolyfillSupport,At=(t,e)=>t,et={toAttribute(t,e){switch(e){case Boolean:t=t?ic:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let o=t;switch(e){case Boolean:o=t!==null;break;case Number:o=t===null?null:Number(t);break;case Object:case Array:try{o=JSON.parse(t)}catch{o=null}}return o}},wt=(t,e)=>!ec(t,e),$n={attribute:!0,type:String,converter:et,reflect:!1,useDefault:!1,hasChanged:wt};Symbol.metadata??=Symbol("metadata"),Jt.litPropertyMetadata??=new WeakMap;var re=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,o=$n){if(o.state&&(o.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((o=Object.create(o)).wrapped=!0),this.elementProperties.set(e,o),!o.noAccessor){let n=Symbol(),a=this.getPropertyDescriptor(e,n,o);a!==void 0&&tc(this.prototype,e,a)}}static getPropertyDescriptor(e,o,n){let{get:a,set:i}=rc(this.prototype,e)??{get(){return this[o]},set(s){this[o]=s}};return{get:a,set(s){let l=a?.call(this);i?.call(this,s),this.requestUpdate(e,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??$n}static _$Ei(){if(this.hasOwnProperty(At("elementProperties")))return;let e=ac(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(At("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(At("properties"))){let o=this.properties,n=[...oc(o),...nc(o)];for(let a of n)this.createProperty(a,o[a])}let e=this[Symbol.metadata];if(e!==null){let o=litPropertyMetadata.get(e);if(o!==void 0)for(let[n,a]of o)this.elementProperties.set(n,a)}this._$Eh=new Map;for(let[o,n]of this.elementProperties){let a=this._$Eu(o,n);a!==void 0&&this._$Eh.set(a,o)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let o=[];if(Array.isArray(e)){let n=new Set(e.flat(1/0).reverse());for(let a of n)o.unshift(Xt(a))}else e!==void 0&&o.push(Xt(e));return o}static _$Eu(e,o){let n=o.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,o=this.constructor.elementProperties;for(let n of o.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 Ct(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,o,n){this._$AK(e,n)}_$ET(e,o){let n=this.constructor.elementProperties.get(e),a=this.constructor._$Eu(e,n);if(a!==void 0&&n.reflect===!0){let i=(n.converter?.toAttribute!==void 0?n.converter:et).toAttribute(o,n.type);this._$Em=e,i==null?this.removeAttribute(a):this.setAttribute(a,i),this._$Em=null}}_$AK(e,o){let n=this.constructor,a=n._$Eh.get(e);if(a!==void 0&&this._$Em!==a){let i=n.getPropertyOptions(a),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:et;this._$Em=a,this[a]=s.fromAttribute(o,i.type)??this._$Ej?.get(a)??null,this._$Em=null}}requestUpdate(e,o,n){if(e!==void 0){let a=this.constructor,i=this[e];if(n??=a.getPropertyOptions(e),!((n.hasChanged??wt)(i,o)||n.useDefault&&n.reflect&&i===this._$Ej?.get(e)&&!this.hasAttribute(a._$Eu(e,n))))return;this.C(e,o,n)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,o,{useDefault:n,reflect:a,wrapped:i},s){n&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,s??o??this[e]),i!==!0||s!==void 0)||(this._$AL.has(e)||(this.hasUpdated||n||(o=void 0),this._$AL.set(e,o)),a===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(o){Promise.reject(o)}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[a,i]of this._$Ep)this[a]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[a,i]of n){let{wrapped:s}=i,l=this[a];s!==!0||this._$AL.has(a)||l===void 0||this.C(a,void 0,i,l)}}let e=!1,o=this._$AL;try{e=this.shouldUpdate(o),e?(this.willUpdate(o),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(o)):this._$EM()}catch(n){throw e=!1,this._$EM(),n}e&&this._$AE(o)}willUpdate(e){}_$AE(e){this._$EO?.forEach(o=>o.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(o=>this._$ET(o,this[o])),this._$EM()}updated(e){}firstUpdated(e){}};re.elementStyles=[],re.shadowRootOptions={mode:"open"},re[At("elementProperties")]=new Map,re[At("finalized")]=new Map,sc?.({ReactiveElement:re}),(Jt.reactiveElementVersions??=[]).push("2.1.0");var Lr=globalThis,Qt=Lr.trustedTypes,Hn=Qt?Qt.createPolicy("lit-html",{createHTML:t=>t}):void 0,Pr="$lit$",me=`lit$${Math.random().toFixed(9).slice(2)}$`,kr="?"+me,cc=`<${kr}>`,Ne=document,Tt=()=>Ne.createComment(""),It=t=>t===null||typeof t!="object"&&typeof t!="function",Nr=Array.isArray,Kn=t=>Nr(t)||typeof t?.[Symbol.iterator]=="function",_r=`[
\f\r]`,Rt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,zn=/-->/g,Wn=/>/g,Pe=RegExp(`>|${_r}(?:([^\\s"'>=/]+)(${_r}*=${_r}*(?:[^
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gn=/'/g,jn=/"/g,Zn=/^(?:script|style|textarea|title)$/i,Dr=t=>(e,...o)=>({_$litType$:t,strings:e,values:o}),ve=Dr(1),lc=Dr(2),dc=Dr(3),W=Symbol.for("lit-noChange"),B=Symbol.for("lit-nothing"),Vn=new WeakMap,ke=Ne.createTreeWalker(Ne,129);function qn(t,e){if(!Nr(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Hn!==void 0?Hn.createHTML(e):e}var Yn=(t,e)=>{let o=t.length-1,n=[],a,i=e===2?"<svg>":e===3?"<math>":"",s=Rt;for(let l=0;l<o;l++){let d=t[l],f,h,p=-1,m=0;for(;m<d.length&&(s.lastIndex=m,h=s.exec(d),h!==null);)m=s.lastIndex,s===Rt?h[1]==="!--"?s=zn:h[1]!==void 0?s=Wn:h[2]!==void 0?(Zn.test(h[2])&&(a=RegExp("</"+h[2],"g")),s=Pe):h[3]!==void 0&&(s=Pe):s===Pe?h[0]===">"?(s=a??Rt,p=-1):h[1]===void 0?p=-2:(p=s.lastIndex-h[2].length,f=h[1],s=h[3]===void 0?Pe:h[3]==='"'?jn:Gn):s===jn||s===Gn?s=Pe:s===zn||s===Wn?s=Rt:(s=Pe,a=void 0);let b=s===Pe&&t[l+1].startsWith("/>")?" ":"";i+=s===Rt?d+cc:p>=0?(n.push(f),d.slice(0,p)+Pr+d.slice(p)+me+b):d+me+(p===-2?l:b)}return[qn(t,i+(t[o]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),n]},_t=class t{constructor({strings:e,_$litType$:o},n){let a;this.parts=[];let i=0,s=0,l=e.length-1,d=this.parts,[f,h]=Yn(e,o);if(this.el=t.createElement(f,n),ke.currentNode=this.el.content,o===2||o===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(a=ke.nextNode())!==null&&d.length<l;){if(a.nodeType===1){if(a.hasAttributes())for(let p of a.getAttributeNames())if(p.endsWith(Pr)){let m=h[s++],b=a.getAttribute(p).split(me),g=/([.?@])?(.*)/.exec(m);d.push({type:1,index:i,name:g[2],strings:b,ctor:g[1]==="."?tr:g[1]==="?"?rr:g[1]==="@"?or:Fe}),a.removeAttribute(p)}else p.startsWith(me)&&(d.push({type:6,index:i}),a.removeAttribute(p));if(Zn.test(a.tagName)){let p=a.textContent.split(me),m=p.length-1;if(m>0){a.textContent=Qt?Qt.emptyScript:"";for(let b=0;b<m;b++)a.append(p[b],Tt()),ke.nextNode(),d.push({type:2,index:++i});a.append(p[m],Tt())}}}else if(a.nodeType===8)if(a.data===kr)d.push({type:2,index:i});else{let p=-1;for(;(p=a.data.indexOf(me,p+1))!==-1;)d.push({type:7,index:i}),p+=me.length-1}i++}}static createElement(e,o){let n=Ne.createElement("template");return n.innerHTML=e,n}};function De(t,e,o=t,n){if(e===W)return e;let a=n!==void 0?o._$Co?.[n]:o._$Cl,i=It(e)?void 0:e._$litDirective$;return a?.constructor!==i&&(a?._$AO?.(!1),i===void 0?a=void 0:(a=new i(t),a._$AT(t,o,n)),n!==void 0?(o._$Co??=[])[n]=a:o._$Cl=a),a!==void 0&&(e=De(t,a._$AS(t,e.values),a,n)),e}var er=class{constructor(e,o){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=o}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:o},parts:n}=this._$AD,a=(e?.creationScope??Ne).importNode(o,!0);ke.currentNode=a;let i=ke.nextNode(),s=0,l=0,d=n[0];for(;d!==void 0;){if(s===d.index){let f;d.type===2?f=new tt(i,i.nextSibling,this,e):d.type===1?f=new d.ctor(i,d.name,d.strings,this,e):d.type===6&&(f=new nr(i,this,e)),this._$AV.push(f),d=n[++l]}s!==d?.index&&(i=ke.nextNode(),s++)}return ke.currentNode=Ne,a}p(e){let o=0;for(let n of this._$AV)n!==void 0&&(n.strings!==void 0?(n._$AI(e,n,o),o+=n.strings.length-2):n._$AI(e[o])),o++}},tt=class t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,o,n,a){this.type=2,this._$AH=B,this._$AN=void 0,this._$AA=e,this._$AB=o,this._$AM=n,this.options=a,this._$Cv=a?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,o=this._$AM;return o!==void 0&&e?.nodeType===11&&(e=o.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,o=this){e=De(this,e,o),It(e)?e===B||e==null||e===""?(this._$AH!==B&&this._$AR(),this._$AH=B):e!==this._$AH&&e!==W&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Kn(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&&It(this._$AH)?this._$AA.nextSibling.data=e:this.T(Ne.createTextNode(e)),this._$AH=e}$(e){let{values:o,_$litType$:n}=e,a=typeof n=="number"?this._$AC(e):(n.el===void 0&&(n.el=_t.createElement(qn(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===a)this._$AH.p(o);else{let i=new er(a,this),s=i.u(this.options);i.p(o),this.T(s),this._$AH=i}}_$AC(e){let o=Vn.get(e.strings);return o===void 0&&Vn.set(e.strings,o=new _t(e)),o}k(e){Nr(this._$AH)||(this._$AH=[],this._$AR());let o=this._$AH,n,a=0;for(let i of e)a===o.length?o.push(n=new t(this.O(Tt()),this.O(Tt()),this,this.options)):n=o[a],n._$AI(i),a++;a<o.length&&(this._$AR(n&&n._$AB.nextSibling,a),o.length=a)}_$AR(e=this._$AA.nextSibling,o){for(this._$AP?.(!1,!0,o);e&&e!==this._$AB;){let n=e.nextSibling;e.remove(),e=n}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},Fe=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,o,n,a,i){this.type=1,this._$AH=B,this._$AN=void 0,this.element=e,this.name=o,this._$AM=a,this.options=i,n.length>2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=B}_$AI(e,o=this,n,a){let i=this.strings,s=!1;if(i===void 0)e=De(this,e,o,0),s=!It(e)||e!==this._$AH&&e!==W,s&&(this._$AH=e);else{let l=e,d,f;for(e=i[0],d=0;d<i.length-1;d++)f=De(this,l[n+d],o,d),f===W&&(f=this._$AH[d]),s||=!It(f)||f!==this._$AH[d],f===B?e=B:e!==B&&(e+=(f??"")+i[d+1]),this._$AH[d]=f}s&&!a&&this.j(e)}j(e){e===B?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},tr=class extends Fe{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===B?void 0:e}},rr=class extends Fe{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==B)}},or=class extends Fe{constructor(e,o,n,a,i){super(e,o,n,a,i),this.type=5}_$AI(e,o=this){if((e=De(this,e,o,0)??B)===W)return;let n=this._$AH,a=e===B&&n!==B||e.capture!==n.capture||e.once!==n.once||e.passive!==n.passive,i=e!==B&&(n===B||a);a&&this.element.removeEventListener(this.name,this,n),i&&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)}},nr=class{constructor(e,o,n){this.element=e,this.type=6,this._$AN=void 0,this._$AM=o,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(e){De(this,e)}},Fr={M:Pr,P:me,A:kr,C:1,L:Yn,R:er,D:Kn,V:De,I:tt,H:Fe,N:rr,U:or,B:tr,F:nr},uc=Lr.litHtmlPolyfillSupport;uc?.(_t,tt),(Lr.litHtmlVersions??=[]).push("3.3.0");var Mr=(t,e,o)=>{let n=o?.renderBefore??e,a=n._$litPart$;if(a===void 0){let i=o?.renderBefore??null;n._$litPart$=a=new tt(e.insertBefore(Tt(),i),i,void 0,o??{})}return a._$AI(t),a};var Ur=globalThis,de=class extends re{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 o=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Mr(o,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return W}};de._$litElement$=!0,de.finalized=!0,Ur.litElementHydrateSupport?.({LitElement:de});var fc=Ur.litElementPolyfillSupport;fc?.({LitElement:de});var Xn={_$AK:(t,e,o)=>{t._$AK(e,o)},_$AL:t=>t._$AL};(Ur.litElementVersions??=[]).push("4.2.0");var bu=!1;var $r={};D($r,{customElement:()=>pc,eventOptions:()=>yc,property:()=>P,query:()=>ar,queryAll:()=>gc,queryAssignedElements:()=>xc,queryAssignedNodes:()=>vc,queryAsync:()=>bc,standardProperty:()=>Jn,state:()=>V});var pc=t=>(e,o)=>{o!==void 0?o.addInitializer(()=>{customElements.define(t,e)}):customElements.define(t,e)};var hc={attribute:!0,type:String,converter:et,reflect:!1,hasChanged:wt},Jn=(t=hc,e,o)=>{let{kind:n,metadata:a}=o,i=globalThis.litPropertyMetadata.get(a);if(i===void 0&&globalThis.litPropertyMetadata.set(a,i=new Map),n==="setter"&&((t=Object.create(t)).wrapped=!0),i.set(o.name,t),n==="accessor"){let{name:s}=o;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}=o;return function(l){let d=this[s];e.call(this,l),this.requestUpdate(s,d,t)}}throw Error("Unsupported decorator location: "+n)};function P(t){return(e,o)=>typeof o=="object"?Jn(t,e,o):((n,a,i)=>{let s=a.hasOwnProperty(i);return a.constructor.createProperty(i,n),s?Object.getOwnPropertyDescriptor(a,i):void 0})(t,e,o)}function V(t){return P({...t,state:!0,attribute:!1})}function yc(t){return(e,o)=>{let n=typeof e=="function"?e:e[o];Object.assign(n,t)}}var se=(t,e,o)=>(o.configurable=!0,o.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,o),o);function ar(t,e){return(o,n,a)=>{let i=s=>s.renderRoot?.querySelector(t)??null;if(e){let{get:s,set:l}=typeof n=="object"?o:a??(()=>{let d=Symbol();return{get(){return this[d]},set(f){this[d]=f}}})();return se(o,n,{get(){let d=s.call(this);return d===void 0&&(d=i(this),(d!==null||this.hasUpdated)&&l.call(this,d)),d}})}return se(o,n,{get(){return i(this)}})}}var mc;function gc(t){return(e,o)=>se(e,o,{get(){return(this.renderRoot??(mc??=document.createDocumentFragment())).querySelectorAll(t)}})}function bc(t){return(e,o)=>se(e,o,{async get(){return await this.updateComplete,this.renderRoot?.querySelector(t)??null}})}function xc(t){return(e,o)=>{let{slot:n,selector:a}=t??{},i="slot"+(n?`[name=${n}]`:":not([name])");return se(e,o,{get(){let s=this.renderRoot?.querySelector(i),l=s?.assignedElements(t)??[];return a===void 0?l:l.filter(d=>d.matches(a))}})}}function vc(t){return(e,o)=>{let{slot:n}=t??{},a="slot"+(n?`[name=${n}]`:":not([name])");return se(e,o,{get(){return this.renderRoot?.querySelector(a)?.assignedNodes(t)??[]}})}}var Hr={};D(Hr,{repeat:()=>sr});var ue={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Q=t=>(...e)=>({_$litDirective$:t,values:e}),oe=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,o,n){this._$Ct=e,this._$AM=o,this._$Ci=n}_$AS(e,o){return this.update(e,o)}update(e,o){return this.render(...o)}};var{I:Sc}=Fr;var ea=t=>t.strings===void 0,Qn=()=>document.createComment(""),rt=(t,e,o)=>{let n=t._$AA.parentNode,a=e===void 0?t._$AB:e._$AA;if(o===void 0){let i=n.insertBefore(Qn(),a),s=n.insertBefore(Qn(),a);o=new Sc(i,s,t,t.options)}else{let i=o._$AB.nextSibling,s=o._$AM,l=s!==t;if(l){let d;o._$AQ?.(t),o._$AM=t,o._$AP!==void 0&&(d=t._$AU)!==s._$AU&&o._$AP(d)}if(i!==a||l){let d=o._$AA;for(;d!==i;){let f=d.nextSibling;n.insertBefore(d,a),d=f}}}return o},Se=(t,e,o=t)=>(t._$AI(e,o),t),Oc={},ta=(t,e=Oc)=>t._$AH=e,ra=t=>t._$AH,ir=t=>{t._$AP?.(!1,!0);let e=t._$AA,o=t._$AB.nextSibling;for(;e!==o;){let n=e.nextSibling;e.remove(),e=n}};var oa=(t,e,o)=>{let n=new Map;for(let a=e;a<=o;a++)n.set(t[a],a);return n},sr=Q(class extends oe{constructor(t){if(super(t),t.type!==ue.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,o){let n;o===void 0?o=e:e!==void 0&&(n=e);let a=[],i=[],s=0;for(let l of t)a[s]=n?n(l,s):s,i[s]=o(l,s),s++;return{values:i,keys:a}}render(t,e,o){return this.dt(t,e,o).values}update(t,[e,o,n]){let a=ra(t),{values:i,keys:s}=this.dt(e,o,n);if(!Array.isArray(a))return this.ut=s,i;let l=this.ut??=[],d=[],f,h,p=0,m=a.length-1,b=0,g=i.length-1;for(;p<=m&&b<=g;)if(a[p]===null)p++;else if(a[m]===null)m--;else if(l[p]===s[b])d[b]=Se(a[p],i[b]),p++,b++;else if(l[m]===s[g])d[g]=Se(a[m],i[g]),m--,g--;else if(l[p]===s[g])d[g]=Se(a[p],i[g]),rt(t,d[g+1],a[p]),p++,g--;else if(l[m]===s[b])d[b]=Se(a[m],i[b]),rt(t,a[p],a[m]),m--,b++;else if(f===void 0&&(f=oa(s,b,g),h=oa(l,p,m)),f.has(l[p]))if(f.has(l[m])){let O=h.get(s[b]),C=O!==void 0?a[O]:null;if(C===null){let A=rt(t,a[p]);Se(A,i[b]),d[b]=A}else d[b]=Se(C,i[b]),rt(t,a[p],C),a[O]=null;b++}else ir(a[m]),m--;else ir(a[p]),p++;for(;b<=g;){let O=rt(t,d[g+1]);Se(O,i[b]),d[b++]=O}for(;p<=m;){let O=a[p++];O!==null&&ir(O)}return this.ut=s,ta(t,d),W}});var Wr={};D(Wr,{classMap:()=>zr});var zr=Q(class extends oe{constructor(t){if(super(t),t.type!==ue.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 o=t.element.classList;for(let n of this.st)n in e||(o.remove(n),this.st.delete(n));for(let n in e){let a=!!e[n];a===this.st.has(n)||this.nt?.has(n)||(a?(o.add(n),this.st.add(n)):(o.remove(n),this.st.delete(n)))}return W}});var Gr={};D(Gr,{styleMap:()=>Cc});var na="important",Ec=" !"+na,Cc=Q(class extends oe{constructor(t){if(super(t),t.type!==ue.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,o)=>{let n=t[o];return n==null?e:e+`${o=o.includes("-")?o:o.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(t,[e]){let{style:o}=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("-")?o.removeProperty(n):o[n]=null);for(let n in e){let a=e[n];if(a!=null){this.ft.add(n);let i=typeof a=="string"&&a.endsWith(Ec);n.includes("-")||i?o.setProperty(n,i?a.slice(0,-11):a,i?na:""):o[n]=a}}return W}});var jr={};D(jr,{UnsafeHTMLDirective:()=>ot,unsafeHTML:()=>Ac});var ot=class extends oe{constructor(e){if(super(e),this.it=B,e.type!==ue.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===W)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 o=[e];return o.raw=o,this._t={_$litType$:this.constructor.resultType,strings:o,values:[]}}};ot.directiveName="unsafeHTML",ot.resultType=1;var Ac=Q(ot);var to={};D(to,{CacheRegistry:()=>eo,ClearCacheEvent:()=>Nt});var Kr={};D(Kr,{CancelablePromise:()=>cr,CanceledPromiseError:()=>Lt,cancelable:()=>Vr});var Lt=class extends Error{constructor(e,o,n){super(e),this.canceledPromiseResult=o,this.canceledPromiseError=n}},cr=class extends Promise{constructor(e){super((o,n)=>e(a=>{this.isCanceled?n(new Lt("Promise has been canceled",a)):o(a)},a=>{this.isCanceled?n(new Lt("Promise has been canceled",void 0,a)):n(a)})),this.isCanceled=!1}cancel(){this.isCanceled=!0}},Vr=t=>new cr((e,o)=>t.then(e).catch(o));var Qr={};D(Qr,{FtNotificationEvent:()=>kt,PostResizeEvent:()=>Jr,PreResizeEvent:()=>Xr,WithEventBus:()=>Be,withEventBus:()=>fa});var Yr={};D(Yr,{applyMixinOnce:()=>ee,dateReviver:()=>Tc,deepCopy:()=>qr,deepEqual:()=>Pt,delay:()=>aa,eventPathContainsMatchingElement:()=>_c,everyDeep:()=>Rc,flatDeep:()=>sa,forEachDeep:()=>ca,getComposedPathTo:()=>Zr,hasChanged:()=>Me,ignoreComposingEvents:()=>kc,last:()=>Lc,minmax:()=>Ue,parseDate:()=>da,randomId:()=>Pc,someDeep:()=>la,unslotText:()=>ua,waitFor:()=>ia,waitUntil:()=>wc});var aa=t=>new Promise(e=>setTimeout(e,t));async function wc(t,e=10,o=2e4){await ia(async()=>await t()||void 0,e,o)}async function ia(t,e=10,o=2e4){let n=await t(),a,i;for(a=i=performance.now();n==null&&(!o||i-a<o);)await aa(e),n=await t(),i=performance.now();if(n==null)throw new Error("Timeout exceeded");return n}function sa(t,e){return t.flatMap(o=>[o,...sa(e(o),e)])}function ca(t,e,o){let n=(a,i)=>{var s;for(let l=0;l<a.length;l++){let d=a[l];if(!(((s=o(d,l,a,i))!==null&&s!==void 0?s:!0)&&n(e(d),[...i,d])))return!1}return!0};n(t,[])}function la(t,e,o){let n=!1;return ca(t,e,(a,i,s,l)=>(n=!!o(a,i,s,l),!n)),n}function Rc(t,e,o){return!la(t,e,(n,a,i,s)=>!o(n,a,i,s))}function Tc(...t){return(e,o)=>t.includes(e)?da(o):o}function da(t){return t.match(/^\d{4}-\d{2}-\d{2}$/)&&(t=t.replace(/-/g,"/")),t=t.replace(" ","T").replace(/^(.+)(\+\d{2})(\d{2})$/,(e,o,n,a)=>o+n+":"+a),new Date(t)}function Ic(t,e){if(t===e)return!0;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(t.constructor!==e.constructor)return!1;let o,n,a;if(Array.isArray(t)){if(o=t.length,o!=e.length)return!1;for(n=o;n--!==0;)if(!Pt(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(!Pt(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);if(a=i(t),o=a.length,o!==i(e).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(e,a[n]))return!1;for(n=o;n--!==0;){let s=a[n];if(!Pt(t[s],e[s]))return!1}return!0}return t!==t&&e!==e||t==null&&e==null}function Pt(t,e){try{return Ic(t,e)}catch{return!1}}function Me(t,e){return!Pt(t,e)}function _c(t,e,o=window.document.body){if(e.length>0){let n=t.composedPath();for(let a of n){if(a===o)return!1;if(a.matches&&e.some(i=>a.matches(i)))return!0}}return!1}function Ue(t,e,o){return Math.min(Math.max(t,e),o)}function Lc(t){return t[t.length-1]}function ua(t){return t instanceof HTMLSlotElement?t.assignedNodes().map(e=>ua(e)).join(""):t?.textContent||""}function Zr(t){let e=[],o=n=>{n.stopPropagation(),e=n.composedPath()};return t.addEventListener("get-composed-path",o),t.dispatchEvent(new Event("get-composed-path",{composed:!0})),t.removeEventListener("get-composed-path",o),e}function qr(t){return typeof window.structuredClone=="function"?structuredClone(t):t!=null?JSON.parse(JSON.stringify(t)):t}function Pc(t,e){return(e??"")+(""+Math.floor(Math.random()*10**t)).padStart(t,"0")}function ee(t,e){let o=n=>n[t]===!0;return n=>{if(o(n))return n;let a=e(n);return a[t]=!0,a}}function kc(){return function(t,e,o){let n=o.value;o.value=function(a){if(!(a.isComposing||a.keyCode===229))return n.apply(this,[a])}}}var kt=class extends CustomEvent{constructor(e){super("ft-notification",{bubbles:!0,composed:!0,detail:e})}},Xr=class extends Event{constructor(){super("ft-pre-resize",{composed:!0,bubbles:!0})}},Jr=class extends Event{constructor(){super("ft-post-resize",{composed:!0,bubbles:!0})}},fa=ee(Symbol("withEventBus"),function(t,e){return class extends t{constructor(){super(...arguments),this.eventBus=e??document.createElement("span")}addEventListener(o,n,a){this.eventBus.addEventListener(o,n,a)}dispatchEvent(o){return this.eventBus.dispatchEvent(o)}removeEventListener(o,n,a){this.eventBus.removeEventListener(o,n,a)}}}),Be=class extends fa(Object){};var Nt=class extends CustomEvent{constructor(e){super("clear-cache",{detail:{clearedKeys:e}})}},eo=class extends Be{constructor(){super(...arguments),this.content={}}register(e,o,n=!1){var a;let i=this.content[e],s=(a=i?.status)!==null&&a!==void 0?a:"REGISTERED";this.content[e]={...i,loader:o,final:n,status:s}}registerFinal(e,o){this.register(e,o,!0)}clearAll(e=!0){return this.clearMatching(()=>!0,e)}clearMatching(e,o=!0){let n=Object.keys(this.content).filter(e).filter(a=>this.clear(a,!1)!=null);return o&&n.length>0&&this.dispatchEvent(new Nt(n)),n}clear(e,o=!0){if(this.content[e]&&!this.content[e].final)return this.forceClear(e),o&&this.dispatchEvent(new Nt([e])),e}forceClear(e){var o;let n=this.content[e];n&&(this.clearClearTimeout(e),(o=n.promise)===null||o===void 0||o.cancel(),this.content[e]={loader:n.loader,final:n.final,status:"REGISTERED"})}clearClearTimeout(e){var o,n,a;((o=this.content[e])===null||o===void 0?void 0:o.clearTimeout)!=null&&(window.clearTimeout((n=this.content[e])===null||n===void 0?void 0:n.clearTimeout),(a=this.content[e])===null||a===void 0||delete a.clearTimeout)}set(e,o,n=!1){this.forceClear(e);let a=async()=>o,i="RESOLVED";this.content[e]={loader:a,final:n,status:i,value:o}}setFinal(e,o){return this.set(e,o,!0)}async get(e,o,n){if(!this.isRegistered(e)){if(!o)throw new Error("Unknown cache key "+e);this.register(e,o)}let a=this.content[e];switch(a.status){case"ERROR":throw a.error;case"LOADING":return a.promise;case"RESOLVED":return a.value;case"REGISTERED":return o=o??a.loader,a.status="LOADING",a.promise=Vr(o()),a.promise.then(i=>(a.status="RESOLVED",a.value=i,n!=null&&(this.clearClearTimeout(e),a.clearTimeout=window.setTimeout(()=>this.clear(e),n)),i)).catch(i=>{var s;throw!((s=a.promise)===null||s===void 0)&&s.isCanceled||(a.status="ERROR",a.error=i),i})}}isRegistered(e){return this.content[e]!=null}getNow(e){var o;return(o=this.content[e])===null||o===void 0?void 0:o.value}has(e){var o,n;return((o=this.content[e])===null||o===void 0?void 0:o.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 o;return((o=this.content[e])===null||o===void 0?void 0:o.status)==="RESOLVED"})}resolvedValues(){return this.resolvedKeys().map(e=>this.content[e].value)}keys(){return Object.keys(this.content)}};var io={};D(io,{ClusteringHelper:()=>ao,formatHierarchicalValues:()=>no});var oo={};D(oo,{accessBreadcrumb:()=>Fc,accessResult:()=>ro,accessResultId:()=>Nc,accessResultUrl:()=>Dc});function ro(t){var e,o,n,a;return(a=(n=(o=(e=t?.map)!==null&&e!==void 0?e:t?.topic)!==null&&o!==void 0?o:t?.document)!==null&&n!==void 0?n:t?.htmlPackage)!==null&&a!==void 0?a:t?.htmlPackagePage}function Nc(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.mapId)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.tocId)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.documentId)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.packageId)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.contentId}function Dc(t){var e,o,n,a,i,s,l,d,f;return(d=(s=(a=(o=(e=t?.map)===null||e===void 0?void 0:e.readerUrl)!==null&&o!==void 0?o:(n=t?.topic)===null||n===void 0?void 0:n.readerUrl)!==null&&a!==void 0?a:(i=t?.document)===null||i===void 0?void 0:i.viewerUrl)!==null&&s!==void 0?s:(l=t?.htmlPackage)===null||l===void 0?void 0:l.viewerUrl)!==null&&d!==void 0?d:(f=t?.htmlPackagePage)===null||f===void 0?void 0:f.viewerUrl}function Fc(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 no(t,e){return e&&e>1&&t.length>=e?`... > ${t[t.length-1]}`:t.join(" > ")}var ao=class t{constructor(e,o,n,a){this.allResults=e,this.selectedResult=o,this.clusteringMetadata=n,this.metadataDescriptors=a}static findResultWithMetadataValue(e,o,n){return e?.find(a=>{var i;return((i=this.extractResultMetadata({result:a}).find(s=>s.key==o))===null||i===void 0?void 0:i.value)==n})}static extractResultMetadata(e){var o,n;let a=(n=(o=ro(e.result))===null||o===void 0?void 0:o.metadata)!==null&&n!==void 0?n:[];return e.key==null?t.flattenMetadata(a,e.hierarchicalValueTruncatingLevel,e.dateFormatter):t.flattenMetad