@aegis-framework/pandora 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -895,6 +895,8 @@ class StopwatchElement extends Component {
895
895
  | `object` / `array` | `@Property()` | Property-only -- no attribute sync, no render |
896
896
  | `function` | `@Property()` | Property-only -- no attribute sync, no render |
897
897
 
898
+ Numeric coercion covers ordinary decimal spellings, including a leading sign and trailing zeroes -- so `42`, `+1`, `-3.14`, and `1.0` all arrive as numbers. Strings with leading zeros (`007`), scientific or hex notation (`1e3`, `0xFF`), or non-finite words (`Infinity`) are preserved as strings, so significant values like ids and zip codes survive the round trip intact.
899
+
898
900
  **Setting attribute-friendly props from HTML:**
899
901
 
900
902
  ```html
@@ -1,8 +1,8 @@
1
- var mX=Object.defineProperty;var K0=(X,$)=>{for(var J in $)mX(X,J,{get:$[J],enumerable:!0,configurable:!0,set:(Z)=>$[J]=()=>Z})};var $2={};K0($2,{when:()=>yX,until:()=>vX,unsafeSVG:()=>fX,unsafeMathML:()=>TX,unsafeHTML:()=>KX,testing:()=>e0,templateContent:()=>RX,svg:()=>O2,styleMap:()=>EX,setCommittedValue:()=>f,setChildPartValue:()=>w,repeat:()=>AX,render:()=>K,removePart:()=>J0,ref:()=>DX,reactive:()=>r0,range:()=>LX,nothing:()=>O,noChange:()=>H,map:()=>_X,live:()=>HX,keyed:()=>OX,join:()=>UX,isTemplateResult:()=>U0,isSingleExpression:()=>$0,isPrimitive:()=>A0,isDirectiveResult:()=>n2,isCompiledTemplateResult:()=>I0,insertPart:()=>E,ifDefined:()=>FX,html:()=>M2,guard:()=>BX,getDirectiveClass:()=>a2,getCommittedValue:()=>n,directive:()=>_,createState:()=>o2,createRef:()=>SX,clearPart:()=>Z0,classMap:()=>GX,choose:()=>zX,cache:()=>QX,asyncReplace:()=>XX,asyncAppend:()=>JX,addTeardown:()=>r,addDecoratorEffect:()=>x,Watch:()=>w2,Util:()=>a0,Types:()=>i2,TemplateResultType:()=>r2,Subscribe:()=>g2,Style:()=>E2,State:()=>K2,Slot:()=>m2,ShadowComponent:()=>N2,Registry:()=>A,Register:()=>P2,QueryAll:()=>y2,Query:()=>v2,Property:()=>f2,PartType:()=>S,Listen:()=>d2,Emitter:()=>c2,Directive:()=>N,Computed:()=>u2,Component:()=>V,ClassList:()=>p2,Attribute:()=>T2,AsyncDirective:()=>v});var P=globalThis,j=(X)=>{if(!P.emitLitDebugLogEvents)return;P.dispatchEvent(new CustomEvent("lit-debug",{detail:X}))},dX=0,Q0;P.litIssuedWarnings??=new Set,Q0=(X,$)=>{if($+=X?` See https://lit.dev/msg/${X} for more information.`:"",!P.litIssuedWarnings.has($)&&!P.litIssuedWarnings.has(X))console.warn($),P.litIssuedWarnings.add($)},queueMicrotask(()=>{Q0("dev-mode","Lit is in dev mode. Not recommended for production!")});var R=P.ShadyDOM?.inUse&&P.ShadyDOM?.noPatch===!0?P.ShadyDOM.wrap:(X)=>X,H0=P.trustedTypes,Z2=H0?H0.createPolicy("lit-html",{createHTML:(X)=>X}):void 0,uX=(X)=>X,N0=(X,$,J)=>uX,pX=(X)=>{if(o!==N0)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");o=X},cX=()=>{o=N0},g0=(X,$,J)=>{return o(X,$,J)},v0="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,y0="?"+T,oX=`<${y0}>`,c=document,z0=()=>c.createComment(""),q0=(X)=>X===null||typeof X!="object"&&typeof X!="function",m0=Array.isArray,B2=(X)=>m0(X)||typeof X?.[Symbol.iterator]==="function",f0=`[
1
+ var mX=Object.defineProperty;var K0=(X,$)=>{for(var J in $)mX(X,J,{get:$[J],enumerable:!0,configurable:!0,set:(Z)=>$[J]=()=>Z})};var $2={};K0($2,{when:()=>yX,until:()=>vX,unsafeSVG:()=>fX,unsafeMathML:()=>TX,unsafeHTML:()=>KX,testing:()=>e0,templateContent:()=>RX,svg:()=>O2,styleMap:()=>wX,setCommittedValue:()=>f,setChildPartValue:()=>E,repeat:()=>AX,render:()=>K,removePart:()=>J0,ref:()=>DX,reactive:()=>r0,range:()=>SX,nothing:()=>O,noChange:()=>H,map:()=>_X,live:()=>HX,keyed:()=>OX,join:()=>UX,isTemplateResult:()=>U0,isSingleExpression:()=>$0,isPrimitive:()=>A0,isDirectiveResult:()=>n2,isCompiledTemplateResult:()=>I0,insertPart:()=>w,ifDefined:()=>FX,html:()=>M2,guard:()=>BX,getDirectiveClass:()=>a2,getCommittedValue:()=>n,directive:()=>_,createState:()=>o2,createRef:()=>LX,clearPart:()=>Z0,classMap:()=>GX,choose:()=>zX,cache:()=>QX,asyncReplace:()=>XX,asyncAppend:()=>JX,addTeardown:()=>r,addDecoratorEffect:()=>x,Watch:()=>E2,Util:()=>a0,Types:()=>i2,TemplateResultType:()=>r2,Subscribe:()=>g2,Style:()=>w2,State:()=>K2,Slot:()=>m2,ShadowComponent:()=>k2,Registry:()=>A,Register:()=>P2,QueryAll:()=>y2,Query:()=>v2,Property:()=>f2,PartType:()=>k,Listen:()=>d2,Emitter:()=>c2,Directive:()=>N,Computed:()=>u2,Component:()=>b,ClassList:()=>p2,Attribute:()=>T2,AsyncDirective:()=>v});var P=globalThis,j=(X)=>{if(!P.emitLitDebugLogEvents)return;P.dispatchEvent(new CustomEvent("lit-debug",{detail:X}))},dX=0,Q0;P.litIssuedWarnings??=new Set,Q0=(X,$)=>{if($+=X?` See https://lit.dev/msg/${X} for more information.`:"",!P.litIssuedWarnings.has($)&&!P.litIssuedWarnings.has(X))console.warn($),P.litIssuedWarnings.add($)},queueMicrotask(()=>{Q0("dev-mode","Lit is in dev mode. Not recommended for production!")});var R=P.ShadyDOM?.inUse&&P.ShadyDOM?.noPatch===!0?P.ShadyDOM.wrap:(X)=>X,H0=P.trustedTypes,Z2=H0?H0.createPolicy("lit-html",{createHTML:(X)=>X}):void 0,uX=(X)=>X,k0=(X,$,J)=>uX,pX=(X)=>{if(o!==k0)throw Error("Attempted to overwrite existing lit-html security policy. setSanitizeDOMValueFactory should be called at most once.");o=X},cX=()=>{o=k0},g0=(X,$,J)=>{return o(X,$,J)},v0="$lit$",T=`lit$${Math.random().toFixed(9).slice(2)}$`,y0="?"+T,oX=`<${y0}>`,c=document,z0=()=>c.createComment(""),q0=(X)=>X===null||typeof X!="object"&&typeof X!="function",m0=Array.isArray,B2=(X)=>m0(X)||typeof X?.[Symbol.iterator]==="function",f0=`[
2
2
  \f\r]`,lX=`[^
3
- \f\r"'\`<>=]`,iX=`[^\\s"'>=/]`,Y0=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y2=1,T0=2,sX=3,Q2=/-->/g,z2=/>/g,y=new RegExp(`>|${f0}(?:(${iX}+)(${f0}*=${f0}*(?:${lX}|("|')|))|$)`,"g"),rX=0,q2=1,nX=2,G2=3,C0=/'/g,h0=/"/g,F2=/^(?:script|style|textarea|title)$/i,U2=1,_0=2,L0=3,d0=1,S0=2,aX=3,tX=4,eX=5,u0=6,X1=7,p0=(X)=>($,...J)=>{if($.some((Z)=>Z===void 0))console.warn(`Some template strings are undefined.
3
+ \f\r"'\`<>=]`,iX=`[^\\s"'>=/]`,Y0=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Y2=1,T0=2,sX=3,Q2=/-->/g,z2=/>/g,y=new RegExp(`>|${f0}(?:(${iX}+)(${f0}*=${f0}*(?:${lX}|("|')|))|$)`,"g"),rX=0,q2=1,nX=2,G2=3,C0=/'/g,h0=/"/g,F2=/^(?:script|style|textarea|title)$/i,U2=1,_0=2,S0=3,d0=1,L0=2,aX=3,tX=4,eX=5,u0=6,X1=7,p0=(X)=>($,...J)=>{if($.some((Z)=>Z===void 0))console.warn(`Some template strings are undefined.
4
4
  This is probably caused by illegal octal escape sequences.`);if(J.some((Z)=>Z?._$litStatic$))Q0("",`Static values 'literal' or 'unsafeStatic' cannot be used as values to non-static templates.
5
- Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:X,strings:$,values:J}},M2=p0(U2),O2=p0(_0),N1=p0(L0),H=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),W2=new WeakMap,p=c.createTreeWalker(c,129),o=N0;function j2(X,$){if(!m0(X)||!X.hasOwnProperty("raw")){let J="invalid template strings array";throw J=`
5
+ Please use the static 'html' tag function. See https://lit.dev/docs/templates/expressions/#static-expressions`);return{["_$litType$"]:X,strings:$,values:J}},M2=p0(U2),O2=p0(_0),k1=p0(S0),H=Symbol.for("lit-noChange"),O=Symbol.for("lit-nothing"),W2=new WeakMap,p=c.createTreeWalker(c,129),o=k0;function j2(X,$){if(!m0(X)||!X.hasOwnProperty("raw")){let J="invalid template strings array";throw J=`
6
6
  Internal Error: expected template strings to be an array
7
7
  with a 'raw' field. Faking a template strings array by
8
8
  calling html or svg like an ordinary function is effectively
@@ -13,18 +13,18 @@ Please use the static 'html' tag function. See https://lit.dev/docs/templates/ex
13
13
  https://github.com/lit/lit/issues/new?template=bug_report.md
14
14
  and include information about your build tooling, if any.
15
15
  `.trim().replace(/\n */g,`
16
- `),Error(J)}return Z2!==void 0?Z2.createHTML($):$}var H2=(X,$)=>{let J=X.length-1,Z=[],Y=$===_0?"<svg>":$===L0?"<math>":"",Q,z=Y0;for(let G=0;G<J;G++){let B=X[G],F=-1,W,M=0,U;while(M<B.length){if(z.lastIndex=M,U=z.exec(B),U===null)break;if(M=z.lastIndex,z===Y0){if(U[Y2]==="!--")z=Q2;else if(U[Y2]!==void 0)z=z2;else if(U[T0]!==void 0){if(F2.test(U[T0]))Q=new RegExp(`</${U[T0]}`,"g");z=y}else if(U[sX]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(z===y)if(U[rX]===">")z=Q??Y0,F=-1;else if(U[q2]===void 0)F=-2;else F=z.lastIndex-U[nX].length,W=U[q2],z=U[G2]===void 0?y:U[G2]==='"'?h0:C0;else if(z===h0||z===C0)z=y;else if(z===Q2||z===z2)z=Y0;else z=y,Q=void 0}console.assert(F===-1||z===y||z===C0||z===h0,"unexpected parse state B");let L=z===y&&X[G+1].startsWith("/>")?" ":"";Y+=z===Y0?B+oX:F>=0?(Z.push(W),B.slice(0,F)+v0+B.slice(F))+T+L:B+T+(F===-2?G:L)}let q=Y+(X[J]||"<?>")+($===_0?"</svg>":$===L0?"</math>":"");return[j2(X,q),Z]};class G0{constructor({strings:X,["_$litType$"]:$},J){this.parts=[];let Z,Y=0,Q=0,z=X.length-1,q=this.parts,[G,B]=H2(X,$);if(this.el=G0.createElement(G,J),p.currentNode=this.el.content,$===_0||$===L0){let F=this.el.content.firstChild;F.replaceWith(...F.childNodes)}while((Z=p.nextNode())!==null&&q.length<z){if(Z.nodeType===1){{let F=Z.localName;if(/^(?:textarea|template)$/i.test(F)&&Z.innerHTML.includes(T)){let W=`Expressions are not supported inside \`${F}\` elements. See https://lit.dev/msg/expression-in-${F} for more information.`;if(F==="template")throw Error(W);else Q0("",W)}}if(Z.hasAttributes()){for(let F of Z.getAttributeNames())if(F.endsWith(v0)){let W=B[Q++],U=Z.getAttribute(F).split(T),L=/([.?@])?(.*)/.exec(W);q.push({type:d0,index:Y,name:L[2],strings:U,ctor:L[1]==="."?o0:L[1]==="?"?l0:L[1]==="@"?i0:t}),Z.removeAttribute(F)}else if(F.startsWith(T))q.push({type:u0,index:Y}),Z.removeAttribute(F)}if(F2.test(Z.tagName)){let F=Z.textContent.split(T),W=F.length-1;if(W>0){Z.textContent=H0?H0.emptyScript:"";for(let M=0;M<W;M++)Z.append(F[M],z0()),p.nextNode(),q.push({type:S0,index:++Y});Z.append(F[W],z0())}}}else if(Z.nodeType===8)if(Z.data===y0)q.push({type:S0,index:Y});else{let W=-1;while((W=Z.data.indexOf(T,W+1))!==-1)q.push({type:X1,index:Y}),W+=T.length-1}Y++}if(B.length!==Q)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+X.join("${...}")+"`");j&&j({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:X})}static createElement(X,$){let J=c.createElement("template");return J.innerHTML=X,J}}function l(X,$,J=X,Z){if($===H)return $;let Y=Z!==void 0?J.__directives?.[Z]:J.__directive,Q=q0($)?void 0:$._$litDirective$;if(Y?.constructor!==Q){if(Y?._$notifyDirectiveConnectionChanged?.(!1),Q===void 0)Y=void 0;else Y=new Q(X),Y._$initialize(X,J,Z);if(Z!==void 0)(J.__directives??=[])[Z]=Y;else J.__directive=Y}if(Y!==void 0)$=l(X,Y._$resolve(X,$.values),Y,Z);return $}class c0{constructor(X,$){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=X,this._$parent=$}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(X){let{el:{content:$},parts:J}=this._$template,Z=(X?.creationScope??c).importNode($,!0);p.currentNode=Z;let Y=p.nextNode(),Q=0,z=0,q=J[0];while(q!==void 0){if(Q===q.index){let G;if(q.type===S0)G=new a(Y,Y.nextSibling,this,X);else if(q.type===d0)G=new q.ctor(Y,q.name,q.strings,this,X);else if(q.type===u0)G=new s0(Y,this,X);this._$parts.push(G),q=J[++z]}if(Q!==q?.index)Y=p.nextNode(),Q++}return p.currentNode=c,Z}_update(X){let $=0;for(let J of this._$parts){if(J!==void 0)if(j&&j({kind:"set part",part:J,value:X[$],valueIndex:$,values:X,templateInstance:this}),J.strings!==void 0)J._$setValue(X,J,$),$+=J.strings.length-2;else J._$setValue(X[$]);$++}}}class a{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(X,$,J,Z){this.type=S0,this._$committedValue=O,this._$disconnectableChildren=void 0,this._$startNode=X,this._$endNode=$,this._$parent=J,this.options=Z,this.__isConnected=Z?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let X=R(this._$startNode).parentNode,$=this._$parent;if($!==void 0&&X?.nodeType===11)X=$.parentNode;return X}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(X,$=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(X=l(this,X,$),q0(X)){if(X===O||X==null||X===""){if(this._$committedValue!==O)j&&j({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=O}else if(X!==this._$committedValue&&X!==H)this._commitText(X)}else if(X._$litType$!==void 0)this._commitTemplateResult(X);else if(X.nodeType!==void 0){if(this.options?.host===X){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",X,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(X)}else if(B2(X))this._commitIterable(X);else this._commitText(X)}_insert(X){return R(R(this._$startNode).parentNode).insertBefore(X,this._$endNode)}_commitNode(X){if(this._$committedValue!==X){if(this._$clear(),o!==N0){let $=this._$startNode.parentNode?.nodeName;if($==="STYLE"||$==="SCRIPT"){let J="Forbidden";if($==="STYLE")J="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else J="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(J)}}j&&j({kind:"commit node",start:this._$startNode,parent:this._$parent,value:X,options:this.options}),this._$committedValue=this._insert(X)}}_commitText(X){if(this._$committedValue!==O&&q0(this._$committedValue)){let $=R(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=g0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}else{let $=c.createTextNode("");if(this._commitNode($),this._textSanitizer===void 0)this._textSanitizer=g0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}this._$committedValue=X}_commitTemplateResult(X){let{values:$,["_$litType$"]:J}=X,Z=typeof J==="number"?this._$getTemplate(X):(J.el===void 0&&(J.el=G0.createElement(j2(J.h,J.h[0]),this.options)),J);if(this._$committedValue?._$template===Z)j&&j({kind:"template updating",template:Z,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:$}),this._$committedValue._update($);else{let Y=new c0(Z,this),Q=Y._clone(this.options);j&&j({kind:"template instantiated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),Y._update($),j&&j({kind:"template instantiated and updated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),this._commitNode(Q),this._$committedValue=Y}}_$getTemplate(X){let $=W2.get(X.strings);if($===void 0)W2.set(X.strings,$=new G0(X));return $}_commitIterable(X){if(!m0(this._$committedValue))this._$committedValue=[],this._$clear();let $=this._$committedValue,J=0,Z;for(let Y of X){if(J===$.length)$.push(Z=new a(this._insert(z0()),this._insert(z0()),this,this.options));else Z=$[J];Z._$setValue(Y),J++}if(J<$.length)this._$clear(Z&&R(Z._$endNode).nextSibling,J),$.length=J}_$clear(X=R(this._$startNode).nextSibling,$){this._$notifyConnectionChanged?.(!1,!0,$);while(X!==this._$endNode){let J=R(X).nextSibling;R(X).remove(),X=J}}setConnected(X){if(this._$parent===void 0)this.__isConnected=X,this._$notifyConnectionChanged?.(X);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class t{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(X,$,J,Z,Y){if(this.type=d0,this._$committedValue=O,this._$disconnectableChildren=void 0,this.element=X,this.name=$,this._$parent=Z,this.options=Y,J.length>2||J[0]!==""||J[1]!=="")this._$committedValue=Array(J.length-1).fill(new String),this.strings=J;else this._$committedValue=O;this._sanitizer=void 0}_$setValue(X,$=this,J,Z){let Y=this.strings,Q=!1;if(Y===void 0){if(X=l(this,X,$,0),Q=!q0(X)||X!==this._$committedValue&&X!==H,Q)this._$committedValue=X}else{let z=X;X=Y[0];let q,G;for(q=0;q<Y.length-1;q++){if(G=l(this,z[J+q],$,q),G===H)G=this._$committedValue[q];if(Q||=!q0(G)||G!==this._$committedValue[q],G===O)X=O;else if(X!==O)X+=(G??"")+Y[q+1];this._$committedValue[q]=G}}if(Q&&!Z)this._commitValue(X)}_commitValue(X){if(X===O)R(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=o(this.element,this.name,"attribute");X=this._sanitizer(X??""),j&&j({kind:"commit attribute",element:this.element,name:this.name,value:X,options:this.options}),R(this.element).setAttribute(this.name,X??"")}}}class o0 extends t{constructor(){super(...arguments);this.type=aX}_commitValue(X){if(this._sanitizer===void 0)this._sanitizer=o(this.element,this.name,"property");X=this._sanitizer(X),j&&j({kind:"commit property",element:this.element,name:this.name,value:X,options:this.options}),this.element[this.name]=X===O?void 0:X}}class l0 extends t{constructor(){super(...arguments);this.type=tX}_commitValue(X){j&&j({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(X&&X!==O),options:this.options}),R(this.element).toggleAttribute(this.name,!!X&&X!==O)}}class i0 extends t{constructor(X,$,J,Z,Y){super(X,$,J,Z,Y);if(this.type=eX,this.strings!==void 0)throw Error(`A \`<${X.localName}>\` has a \`@${$}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(X,$=this){if(X=l(this,X,$,0)??O,X===H)return;let J=this._$committedValue,Z=X===O&&J!==O||X.capture!==J.capture||X.once!==J.once||X.passive!==J.passive,Y=X!==O&&(J===O||Z);if(j&&j({kind:"commit event listener",element:this.element,name:this.name,value:X,options:this.options,removeListener:Z,addListener:Y,oldListener:J}),Z)this.element.removeEventListener(this.name,this,J);if(Y)this.element.addEventListener(this.name,this,X);this._$committedValue=X}handleEvent(X){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,X);else this._$committedValue.handleEvent(X)}}class s0{constructor(X,$,J){this.element=X,this.type=u0,this._$disconnectableChildren=void 0,this._$parent=$,this.options=J}get _$isConnected(){return this._$parent._$isConnected}_$setValue(X){j&&j({kind:"commit to element binding",element:this.element,value:X,options:this.options}),l(this,X)}}var _2={_boundAttributeSuffix:v0,_marker:T,_markerMatch:y0,_HTML_RESULT:U2,_getTemplateHtml:H2,_TemplateInstance:c0,_isIterable:B2,_resolveDirective:l,_ChildPart:a,_AttributePart:t,_BooleanAttributePart:l0,_EventPart:i0,_PropertyPart:o0,_ElementPart:s0},$1=P.litHtmlPolyfillSupportDevMode;$1?.(G0,a);(P.litHtmlVersions??=[]).push("3.3.1");if(P.litHtmlVersions.length>1)queueMicrotask(()=>{Q0("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var K=(X,$,J)=>{if($==null)throw TypeError(`The container to render into may not be ${$}`);let Z=dX++,Y=J?.renderBefore??$,Q=Y._$litPart$;if(j&&j({kind:"begin render",id:Z,value:X,container:$,options:J,part:Q}),Q===void 0){let z=J?.renderBefore??null;Y._$litPart$=Q=new a($.insertBefore(z0(),z),z,void 0,J??{})}return Q._$setValue(X),j&&j({kind:"end render",id:Z,value:X,container:$,options:J,part:Q}),Q};K.setSanitizer=pX,K.createSanitizer=g0,K._testOnlyClearSanitizerFactoryDoNotCallOrElse=cX;var a0={};K0(a0,{resolveListenerTarget:()=>n0,reactive:()=>r0,parseAttributeValue:()=>C,isTemplateResult:()=>k0,deserializeCSS:()=>e,callAsync:()=>W0,addTeardown:()=>r,addDecoratorEffect:()=>x,WATCH_HANDLERS:()=>D,SUBSCRIBE_HANDLERS:()=>g,STYLE_METADATA:()=>B0,REACTIVE_FIELDS:()=>b,PROP_ATTRIBUTES:()=>I,LISTEN_HANDLERS:()=>m,DECORATOR_TEARDOWNS:()=>s,DECORATOR_EFFECTS:()=>i,ATTR_HANDLERS:()=>d});function W0(X,$,...J){try{let Z=X.apply($,J);return Z instanceof Promise?Z:Promise.resolve(Z)}catch(Z){return Promise.reject(Z)}}function k0(X){return X!==null&&typeof X==="object"&&"_$litType$"in X}function e(X,$="",J=0){let Z=Object.keys(X),Y="";for(let Q of Z){let z=X[Q];if(typeof z==="object"&&z!==null){if($&&!Q.startsWith("@"))if(Q.startsWith("&"))Y+=`${Q.replace(/&/g,$)} {
16
+ `),Error(J)}return Z2!==void 0?Z2.createHTML($):$}var H2=(X,$)=>{let J=X.length-1,Z=[],Y=$===_0?"<svg>":$===S0?"<math>":"",Q,z=Y0;for(let G=0;G<J;G++){let B=X[G],F=-1,W,M=0,U;while(M<B.length){if(z.lastIndex=M,U=z.exec(B),U===null)break;if(M=z.lastIndex,z===Y0){if(U[Y2]==="!--")z=Q2;else if(U[Y2]!==void 0)z=z2;else if(U[T0]!==void 0){if(F2.test(U[T0]))Q=new RegExp(`</${U[T0]}`,"g");z=y}else if(U[sX]!==void 0)throw Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions")}else if(z===y)if(U[rX]===">")z=Q??Y0,F=-1;else if(U[q2]===void 0)F=-2;else F=z.lastIndex-U[nX].length,W=U[q2],z=U[G2]===void 0?y:U[G2]==='"'?h0:C0;else if(z===h0||z===C0)z=y;else if(z===Q2||z===z2)z=Y0;else z=y,Q=void 0}console.assert(F===-1||z===y||z===C0||z===h0,"unexpected parse state B");let S=z===y&&X[G+1].startsWith("/>")?" ":"";Y+=z===Y0?B+oX:F>=0?(Z.push(W),B.slice(0,F)+v0+B.slice(F))+T+S:B+T+(F===-2?G:S)}let q=Y+(X[J]||"<?>")+($===_0?"</svg>":$===S0?"</math>":"");return[j2(X,q),Z]};class G0{constructor({strings:X,["_$litType$"]:$},J){this.parts=[];let Z,Y=0,Q=0,z=X.length-1,q=this.parts,[G,B]=H2(X,$);if(this.el=G0.createElement(G,J),p.currentNode=this.el.content,$===_0||$===S0){let F=this.el.content.firstChild;F.replaceWith(...F.childNodes)}while((Z=p.nextNode())!==null&&q.length<z){if(Z.nodeType===1){{let F=Z.localName;if(/^(?:textarea|template)$/i.test(F)&&Z.innerHTML.includes(T)){let W=`Expressions are not supported inside \`${F}\` elements. See https://lit.dev/msg/expression-in-${F} for more information.`;if(F==="template")throw Error(W);else Q0("",W)}}if(Z.hasAttributes()){for(let F of Z.getAttributeNames())if(F.endsWith(v0)){let W=B[Q++],U=Z.getAttribute(F).split(T),S=/([.?@])?(.*)/.exec(W);q.push({type:d0,index:Y,name:S[2],strings:U,ctor:S[1]==="."?o0:S[1]==="?"?l0:S[1]==="@"?i0:t}),Z.removeAttribute(F)}else if(F.startsWith(T))q.push({type:u0,index:Y}),Z.removeAttribute(F)}if(F2.test(Z.tagName)){let F=Z.textContent.split(T),W=F.length-1;if(W>0){Z.textContent=H0?H0.emptyScript:"";for(let M=0;M<W;M++)Z.append(F[M],z0()),p.nextNode(),q.push({type:L0,index:++Y});Z.append(F[W],z0())}}}else if(Z.nodeType===8)if(Z.data===y0)q.push({type:L0,index:Y});else{let W=-1;while((W=Z.data.indexOf(T,W+1))!==-1)q.push({type:X1,index:Y}),W+=T.length-1}Y++}if(B.length!==Q)throw Error('Detected duplicate attribute bindings. This occurs if your template has duplicate attributes on an element tag. For example "<input ?disabled=${true} ?disabled=${false}>" contains a duplicate "disabled" attribute. The error was detected in the following template: \n`'+X.join("${...}")+"`");j&&j({kind:"template prep",template:this,clonableTemplate:this.el,parts:this.parts,strings:X})}static createElement(X,$){let J=c.createElement("template");return J.innerHTML=X,J}}function l(X,$,J=X,Z){if($===H)return $;let Y=Z!==void 0?J.__directives?.[Z]:J.__directive,Q=q0($)?void 0:$._$litDirective$;if(Y?.constructor!==Q){if(Y?._$notifyDirectiveConnectionChanged?.(!1),Q===void 0)Y=void 0;else Y=new Q(X),Y._$initialize(X,J,Z);if(Z!==void 0)(J.__directives??=[])[Z]=Y;else J.__directive=Y}if(Y!==void 0)$=l(X,Y._$resolve(X,$.values),Y,Z);return $}class c0{constructor(X,$){this._$parts=[],this._$disconnectableChildren=void 0,this._$template=X,this._$parent=$}get parentNode(){return this._$parent.parentNode}get _$isConnected(){return this._$parent._$isConnected}_clone(X){let{el:{content:$},parts:J}=this._$template,Z=(X?.creationScope??c).importNode($,!0);p.currentNode=Z;let Y=p.nextNode(),Q=0,z=0,q=J[0];while(q!==void 0){if(Q===q.index){let G;if(q.type===L0)G=new a(Y,Y.nextSibling,this,X);else if(q.type===d0)G=new q.ctor(Y,q.name,q.strings,this,X);else if(q.type===u0)G=new s0(Y,this,X);this._$parts.push(G),q=J[++z]}if(Q!==q?.index)Y=p.nextNode(),Q++}return p.currentNode=c,Z}_update(X){let $=0;for(let J of this._$parts){if(J!==void 0)if(j&&j({kind:"set part",part:J,value:X[$],valueIndex:$,values:X,templateInstance:this}),J.strings!==void 0)J._$setValue(X,J,$),$+=J.strings.length-2;else J._$setValue(X[$]);$++}}}class a{get _$isConnected(){return this._$parent?._$isConnected??this.__isConnected}constructor(X,$,J,Z){this.type=L0,this._$committedValue=O,this._$disconnectableChildren=void 0,this._$startNode=X,this._$endNode=$,this._$parent=J,this.options=Z,this.__isConnected=Z?.isConnected??!0,this._textSanitizer=void 0}get parentNode(){let X=R(this._$startNode).parentNode,$=this._$parent;if($!==void 0&&X?.nodeType===11)X=$.parentNode;return X}get startNode(){return this._$startNode}get endNode(){return this._$endNode}_$setValue(X,$=this){if(this.parentNode===null)throw Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");if(X=l(this,X,$),q0(X)){if(X===O||X==null||X===""){if(this._$committedValue!==O)j&&j({kind:"commit nothing to child",start:this._$startNode,end:this._$endNode,parent:this._$parent,options:this.options}),this._$clear();this._$committedValue=O}else if(X!==this._$committedValue&&X!==H)this._commitText(X)}else if(X._$litType$!==void 0)this._commitTemplateResult(X);else if(X.nodeType!==void 0){if(this.options?.host===X){this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"),console.warn("Attempted to render the template host",X,"inside itself. This is almost always a mistake, and in dev mode ","we render some warning text. In production however, we'll ","render it, which will usually result in an error, and sometimes ","in the element disappearing from the DOM.");return}this._commitNode(X)}else if(B2(X))this._commitIterable(X);else this._commitText(X)}_insert(X){return R(R(this._$startNode).parentNode).insertBefore(X,this._$endNode)}_commitNode(X){if(this._$committedValue!==X){if(this._$clear(),o!==k0){let $=this._$startNode.parentNode?.nodeName;if($==="STYLE"||$==="SCRIPT"){let J="Forbidden";if($==="STYLE")J="Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets.";else J="Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.";throw Error(J)}}j&&j({kind:"commit node",start:this._$startNode,parent:this._$parent,value:X,options:this.options}),this._$committedValue=this._insert(X)}}_commitText(X){if(this._$committedValue!==O&&q0(this._$committedValue)){let $=R(this._$startNode).nextSibling;if(this._textSanitizer===void 0)this._textSanitizer=g0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}else{let $=c.createTextNode("");if(this._commitNode($),this._textSanitizer===void 0)this._textSanitizer=g0($,"data","property");X=this._textSanitizer(X),j&&j({kind:"commit text",node:$,value:X,options:this.options}),$.data=X}this._$committedValue=X}_commitTemplateResult(X){let{values:$,["_$litType$"]:J}=X,Z=typeof J==="number"?this._$getTemplate(X):(J.el===void 0&&(J.el=G0.createElement(j2(J.h,J.h[0]),this.options)),J);if(this._$committedValue?._$template===Z)j&&j({kind:"template updating",template:Z,instance:this._$committedValue,parts:this._$committedValue._$parts,options:this.options,values:$}),this._$committedValue._update($);else{let Y=new c0(Z,this),Q=Y._clone(this.options);j&&j({kind:"template instantiated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),Y._update($),j&&j({kind:"template instantiated and updated",template:Z,instance:Y,parts:Y._$parts,options:this.options,fragment:Q,values:$}),this._commitNode(Q),this._$committedValue=Y}}_$getTemplate(X){let $=W2.get(X.strings);if($===void 0)W2.set(X.strings,$=new G0(X));return $}_commitIterable(X){if(!m0(this._$committedValue))this._$committedValue=[],this._$clear();let $=this._$committedValue,J=0,Z;for(let Y of X){if(J===$.length)$.push(Z=new a(this._insert(z0()),this._insert(z0()),this,this.options));else Z=$[J];Z._$setValue(Y),J++}if(J<$.length)this._$clear(Z&&R(Z._$endNode).nextSibling,J),$.length=J}_$clear(X=R(this._$startNode).nextSibling,$){this._$notifyConnectionChanged?.(!1,!0,$);while(X!==this._$endNode){let J=R(X).nextSibling;R(X).remove(),X=J}}setConnected(X){if(this._$parent===void 0)this.__isConnected=X,this._$notifyConnectionChanged?.(X);else throw Error("part.setConnected() may only be called on a RootPart returned from render().")}}class t{get tagName(){return this.element.tagName}get _$isConnected(){return this._$parent._$isConnected}constructor(X,$,J,Z,Y){if(this.type=d0,this._$committedValue=O,this._$disconnectableChildren=void 0,this.element=X,this.name=$,this._$parent=Z,this.options=Y,J.length>2||J[0]!==""||J[1]!=="")this._$committedValue=Array(J.length-1).fill(new String),this.strings=J;else this._$committedValue=O;this._sanitizer=void 0}_$setValue(X,$=this,J,Z){let Y=this.strings,Q=!1;if(Y===void 0){if(X=l(this,X,$,0),Q=!q0(X)||X!==this._$committedValue&&X!==H,Q)this._$committedValue=X}else{let z=X;X=Y[0];let q,G;for(q=0;q<Y.length-1;q++){if(G=l(this,z[J+q],$,q),G===H)G=this._$committedValue[q];if(Q||=!q0(G)||G!==this._$committedValue[q],G===O)X=O;else if(X!==O)X+=(G??"")+Y[q+1];this._$committedValue[q]=G}}if(Q&&!Z)this._commitValue(X)}_commitValue(X){if(X===O)R(this.element).removeAttribute(this.name);else{if(this._sanitizer===void 0)this._sanitizer=o(this.element,this.name,"attribute");X=this._sanitizer(X??""),j&&j({kind:"commit attribute",element:this.element,name:this.name,value:X,options:this.options}),R(this.element).setAttribute(this.name,X??"")}}}class o0 extends t{constructor(){super(...arguments);this.type=aX}_commitValue(X){if(this._sanitizer===void 0)this._sanitizer=o(this.element,this.name,"property");X=this._sanitizer(X),j&&j({kind:"commit property",element:this.element,name:this.name,value:X,options:this.options}),this.element[this.name]=X===O?void 0:X}}class l0 extends t{constructor(){super(...arguments);this.type=tX}_commitValue(X){j&&j({kind:"commit boolean attribute",element:this.element,name:this.name,value:!!(X&&X!==O),options:this.options}),R(this.element).toggleAttribute(this.name,!!X&&X!==O)}}class i0 extends t{constructor(X,$,J,Z,Y){super(X,$,J,Z,Y);if(this.type=eX,this.strings!==void 0)throw Error(`A \`<${X.localName}>\` has a \`@${$}=...\` listener with invalid content. Event listeners in templates must have exactly one expression and no surrounding text.`)}_$setValue(X,$=this){if(X=l(this,X,$,0)??O,X===H)return;let J=this._$committedValue,Z=X===O&&J!==O||X.capture!==J.capture||X.once!==J.once||X.passive!==J.passive,Y=X!==O&&(J===O||Z);if(j&&j({kind:"commit event listener",element:this.element,name:this.name,value:X,options:this.options,removeListener:Z,addListener:Y,oldListener:J}),Z)this.element.removeEventListener(this.name,this,J);if(Y)this.element.addEventListener(this.name,this,X);this._$committedValue=X}handleEvent(X){if(typeof this._$committedValue==="function")this._$committedValue.call(this.options?.host??this.element,X);else this._$committedValue.handleEvent(X)}}class s0{constructor(X,$,J){this.element=X,this.type=u0,this._$disconnectableChildren=void 0,this._$parent=$,this.options=J}get _$isConnected(){return this._$parent._$isConnected}_$setValue(X){j&&j({kind:"commit to element binding",element:this.element,value:X,options:this.options}),l(this,X)}}var _2={_boundAttributeSuffix:v0,_marker:T,_markerMatch:y0,_HTML_RESULT:U2,_getTemplateHtml:H2,_TemplateInstance:c0,_isIterable:B2,_resolveDirective:l,_ChildPart:a,_AttributePart:t,_BooleanAttributePart:l0,_EventPart:i0,_PropertyPart:o0,_ElementPart:s0},$1=P.litHtmlPolyfillSupportDevMode;$1?.(G0,a);(P.litHtmlVersions??=[]).push("3.3.1");if(P.litHtmlVersions.length>1)queueMicrotask(()=>{Q0("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});var K=(X,$,J)=>{if($==null)throw TypeError(`The container to render into may not be ${$}`);let Z=dX++,Y=J?.renderBefore??$,Q=Y._$litPart$;if(j&&j({kind:"begin render",id:Z,value:X,container:$,options:J,part:Q}),Q===void 0){let z=J?.renderBefore??null;Y._$litPart$=Q=new a($.insertBefore(z0(),z),z,void 0,J??{})}return Q._$setValue(X),j&&j({kind:"end render",id:Z,value:X,container:$,options:J,part:Q}),Q};K.setSanitizer=pX,K.createSanitizer=g0,K._testOnlyClearSanitizerFactoryDoNotCallOrElse=cX;var a0={};K0(a0,{resolveListenerTarget:()=>n0,reactive:()=>r0,parseAttributeValue:()=>C,isTemplateResult:()=>N0,deserializeCSS:()=>e,callAsync:()=>W0,addTeardown:()=>r,addDecoratorEffect:()=>x,WATCH_HANDLERS:()=>D,SUBSCRIBE_HANDLERS:()=>g,STYLE_METADATA:()=>B0,REACTIVE_FIELDS:()=>V,PROP_ATTRIBUTES:()=>I,LISTEN_HANDLERS:()=>m,DECORATOR_TEARDOWNS:()=>s,DECORATOR_EFFECTS:()=>i,ATTR_HANDLERS:()=>d});function W0(X,$,...J){try{let Z=X.apply($,J);return Z instanceof Promise?Z:Promise.resolve(Z)}catch(Z){return Promise.reject(Z)}}function N0(X){return X!==null&&typeof X==="object"&&"_$litType$"in X}function e(X,$="",J=0){let Z=Object.keys(X),Y="";for(let Q of Z){let z=X[Q];if(typeof z==="object"&&z!==null){if($&&!Q.startsWith("@"))if(Q.startsWith("&"))Y+=`${Q.replace(/&/g,$)} {
17
17
  `;else if(Q===":host")Y+=`${$} {
18
18
  `;else Y+=`${$} ${Q} {
19
19
  `;else Y+=`${Q} {
20
20
  `;let q=Object.keys(z);for(let G of q){Y+="\t".repeat(J);let B=z[G];if(typeof B==="object"&&B!==null){let F={};F[G]=B,Y+=e(F,$,J+1)}else Y+=` ${G}: ${B};
21
21
  `}Y+=`}
22
22
  `}else Y+="\t".repeat(J),Y+=` ${Q}: ${z};
23
- `}return Y}var I=Symbol("pandora:propAttributes"),i=Symbol("pandora:decoratorEffects"),s=Symbol("pandora:decoratorTeardowns"),D=Symbol("pandora:watchHandlers"),b=Symbol("pandora:reactiveFields"),m=Symbol("pandora:listenHandlers"),B0=Symbol("pandora:styleMetadata"),d=Symbol("pandora:attrHandlers"),g=Symbol("pandora:subscribeHandlers");function x(X,$){if(!Object.hasOwn(X,i)){let J=X[i];X[i]=J?[...J]:[]}X[i].push($)}function r(X,$){if(!X[s])X[s]=[];X[s].push($)}var L2=new Map;function J1(X){let $=L2.get(X);if(!$)$=Symbol(`__pandora_reactive_${X}`),L2.set(X,$);return $}function r0(X,$,J={}){let Z=J1($),Y=J.equals??((Q,z)=>Q===z);if(J.initialValue!==void 0&&X[Z]===void 0)X[Z]=J.initialValue;Object.defineProperty(X,$,{get(){return X[Z]},set(Q){let z=X[Z];if(Y(z,Q))return;if(X[Z]=Q,J.onChange)J.onChange(Q,z);if(typeof Symbol.metadata<"u"){let G=X.constructor[Symbol.metadata]?.[D];if(G){for(let B of G)if(B.property===$){let F=X[B.methodName];if(typeof F==="function")F.call(X,Q,z)}}}if(typeof X.didChange==="function")X.didChange($,z,Q,"reactive");if(J.render!==!1&&typeof X._queueRender==="function")X._queueRender()},enumerable:!0,configurable:!0})}function C(X){if(X===null)return;if(X===""||X==="true")return!0;if(X==="false")return!1;if(!isNaN(Number(X)))return X.includes(".")?parseFloat(X):parseInt(X,10);return X}function n0(X,$,J){if($==="window")return window;if($==="document")return document;if($&&$!=="self")return J?J($):X.querySelector($);return X}class k extends HTMLElement{_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_style;_batching;_batchedChanges;static _tag;static _template;static _observedAttributes=[];static _styleSheet=null;static _sharedStyle={};static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static _subscribe;static _getGlobalState;static _applyCurrentImplementation;static _activateSubscription(X,$){if(!k._subscribe)return;let J=X;if(J[$.unsubKey])J[$.unsubKey](),J[$.unsubKey]=void 0;J[$.unsubKey]=k._subscribe($.stateKey,(Y)=>{let Q=J[$.valueKey];if(Q===Y)return;if(J[$.valueKey]=Y,X.didChange($.propertyKey,Q,Y,"consumer"),X.isReady)X._queueRender()});let Z=k._getGlobalState?.($.stateKey);if(Z!==void 0)J[$.valueKey]=Z}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let $=this[Symbol.metadata]?.[I];if($?.length)return[...new Set([...this._observedAttributes,...$])]}return this._observedAttributes}static set observedAttributes(X){this._observedAttributes=X}static get tag(){if(typeof this._tag>"u"){let X=this.name,$=X.match(/([A-Z])/g);if($!==null)for(let J of $)X=X.replace(J,`-${J}`.toLowerCase());this._tag=X.slice(1)}return this._tag}static set tag(X){this._tag=X}static get template(){return this._template}static set template(X){if(this._template=X,X!==void 0)document.querySelectorAll(this.tag).forEach(($)=>{if($ instanceof k&&$._isReady)$.forceRender()})}constructor(){super();this._children="",this._connected=!1,this._isReady=!1,this._hasBeenMounted=!1,this._initRenderDone=!1,this._renderId=0,this._renderQueued=!1,this._style={},this._batching=!1,this._batchedChanges=[]}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}get isFirstMount(){return!this._hasBeenMounted}static _registryRegister;static register(){if(k._registryRegister)k._registryRegister(this.tag,this);else window.customElements.define(this.tag,this)}get isBatching(){return this._batching}batch(X){this._batching=!0,this._batchedChanges=[];try{X()}finally{this._batching=!1;let $=this._batchedChanges;if(this._batchedChanges=[],$.length>0){let J=!1;for(let{property:Z,oldValue:Y,newValue:Q,shouldRender:z,source:q}of $){if(Y===Q)continue;if(z)J=!0;if(typeof Symbol.metadata<"u"){let B=this.constructor[Symbol.metadata]?.[D];if(B){for(let F of B)if(F.property===Z){let W=this[F.methodName];if(typeof W==="function")W.call(this,Q,Y)}}}this.didChange(Z,Y,Q,q)}if(J&&this._connected)this._queueRender()}}}_queueRender(){if(this._renderQueued||!this._connected)return;this._renderQueued=!0,queueMicrotask(()=>{if(this._renderQueued=!1,this._connected)this._render().catch((X)=>{let $=this.constructor.tag;if(k._onError)k._onError(X,this,$,"render");else{let J=this.id?`#${this.id}`:this.className?`.${this.className.split(/\s+/).join(".")}`:"";console.error(`[Pandora] Unhandled render error in <${$}${J}>:`,X,this)}})})}forceRender(){return this._render()}render(){}_applyLitRender(X){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");K(X,this,{host:this})}_applyStringRender(X){if(X===""){this.innerHTML="";return}let $=document.createElement("template");$.innerHTML=X;let J=$.content.querySelector("slot");if(J!==null){let Z=document.createElement("template");Z.innerHTML=this._children,J.replaceWith(Z.content),this.innerHTML="",this.appendChild($.content)}else if(this.innerHTML=X,this._children!==""&&X.indexOf(this._children)===-1)this.innerHTML+=this._children}async _render(){let X=++this._renderId,$=this.constructor,J=this.render;if($._template!==void 0)J=()=>{if(typeof $._template==="function")return $._template.call(this,this);return $._template};let Z=await W0(J,this);if(X!==this._renderId)return;if(Z===void 0||Z===null){this._detachListeners(),this._attachListeners(),await W0(this.didRender,this);return}let Y=k0(Z)||Z===O?"lit":"string";if(k._hasMiddleware?.("render")&&k._applyMiddleware)Z=k._applyMiddleware("render",this,Z,Y);if(k0(Z)||Z===O)this._applyLitRender(Z);else this._applyStringRender(Z.trim());this._detachListeners(),this._attachListeners(),await W0(this.didRender,this)}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=e(J._sharedStyle,J.tag)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
23
+ `}return Y}var I=Symbol("pandora:propAttributes"),i=Symbol("pandora:decoratorEffects"),s=Symbol("pandora:decoratorTeardowns"),D=Symbol("pandora:watchHandlers"),V=Symbol("pandora:reactiveFields"),m=Symbol("pandora:listenHandlers"),B0=Symbol("pandora:styleMetadata"),d=Symbol("pandora:attrHandlers"),g=Symbol("pandora:subscribeHandlers");function x(X,$){if(!Object.hasOwn(X,i)){let J=X[i];X[i]=J?[...J]:[]}X[i].push($)}function r(X,$){if(!X[s])X[s]=[];X[s].push($)}var S2=new Map;function J1(X){let $=S2.get(X);if(!$)$=Symbol(`__pandora_reactive_${X}`),S2.set(X,$);return $}function r0(X,$,J={}){let Z=J1($),Y=J.equals??((Q,z)=>Q===z);if(J.initialValue!==void 0&&X[Z]===void 0)X[Z]=J.initialValue;Object.defineProperty(X,$,{get(){return X[Z]},set(Q){let z=X[Z];if(Y(z,Q))return;if(X[Z]=Q,J.onChange)J.onChange(Q,z);if(typeof Symbol.metadata<"u"){let G=X.constructor[Symbol.metadata]?.[D];if(G){for(let B of G)if(B.property===$){let F=X[B.methodName];if(typeof F==="function")F.call(X,Q,z)}}}if(typeof X.didChange==="function")X.didChange($,z,Q,"reactive");if(J.render!==!1&&typeof X._queueRender==="function")X._queueRender()},enumerable:!0,configurable:!0})}function C(X){if(X===null)return;if(X===""||X==="true")return!0;if(X==="false")return!1;let $=X.trim();if(/^[+-]?(?:0|[1-9]\d*)(?:\.\d+)?$/.test($)){let J=Number($);if(Number.isFinite(J))return J}return X}function n0(X,$,J){if($==="window")return window;if($==="document")return document;if($&&$!=="self")return J?J($):X.querySelector($);return X}class L extends HTMLElement{_children;_connected;_isReady;_hasBeenMounted;_initRenderDone;_renderId;_renderQueued;_lastRenderType;_style;_batching;_batchedChanges;static _tag;static _template;static _observedAttributes=[];static _styleSheet=null;static _sharedStyle={};static _onMount;static _onUnmount;static _onError;static _applyMiddleware;static _hasMiddleware;static _subscribe;static _getGlobalState;static _applyCurrentImplementation;static _activateSubscription(X,$){if(!L._subscribe)return;let J=X;if(J[$.unsubKey])J[$.unsubKey](),J[$.unsubKey]=void 0;J[$.unsubKey]=L._subscribe($.stateKey,(Y)=>{let Q=J[$.valueKey];if(Q===Y)return;if(J[$.valueKey]=Y,X.didChange($.propertyKey,Q,Y,"consumer"),X.isReady)X._queueRender()});let Z=L._getGlobalState?.($.stateKey);if(Z!==void 0)J[$.valueKey]=Z}static get observedAttributes(){if(typeof Symbol.metadata<"u"){let $=this[Symbol.metadata]?.[I];if($?.length)return[...new Set([...this._observedAttributes,...$])]}return this._observedAttributes}static set observedAttributes(X){this._observedAttributes=X}static get tag(){if(typeof this._tag>"u"){let X=this.name,$=X.match(/([A-Z])/g);if($!==null)for(let J of $)X=X.replace(J,`-${J}`.toLowerCase());this._tag=X.slice(1)}return this._tag}static set tag(X){this._tag=X}static get template(){return this._template}static set template(X){if(this._template=X,X!==void 0)document.querySelectorAll(this.tag).forEach(($)=>{if($ instanceof L&&$._isReady)$.forceRender()})}constructor(){super();this._children="",this._connected=!1,this._isReady=!1,this._hasBeenMounted=!1,this._initRenderDone=!1,this._renderId=0,this._renderQueued=!1,this._style={},this._batching=!1,this._batchedChanges=[]}get slotContent(){return this._children}get isConnected(){return this._connected}get isReady(){return this._isReady}get isFirstMount(){return!this._hasBeenMounted}static _registryRegister;static register(){if(L._registryRegister)L._registryRegister(this.tag,this);else window.customElements.define(this.tag,this)}get isBatching(){return this._batching}batch(X){this._batching=!0,this._batchedChanges=[];try{X()}finally{this._batching=!1;let $=this._batchedChanges;if(this._batchedChanges=[],$.length>0){let J=!1;for(let{property:Z,oldValue:Y,newValue:Q,shouldRender:z,source:q}of $){if(Y===Q)continue;if(z)J=!0;if(typeof Symbol.metadata<"u"){let B=this.constructor[Symbol.metadata]?.[D];if(B){for(let F of B)if(F.property===Z){let W=this[F.methodName];if(typeof W==="function")W.call(this,Q,Y)}}}this.didChange(Z,Y,Q,q)}if(J&&this._initRenderDone&&this._connected)this._queueRender()}}}_queueRender(){if(this._renderQueued||!this._connected)return;this._renderQueued=!0,queueMicrotask(()=>{if(this._renderQueued=!1,this._connected)this._render().catch((X)=>{let $=this.constructor.tag;if(L._onError)L._onError(X,this,$,"render");else{let J=this.id?`#${this.id}`:this.className?`.${this.className.split(/\s+/).join(".")}`:"";console.error(`[Pandora] Unhandled render error in <${$}${J}>:`,X,this)}})})}forceRender(){return this._render()}render(){}_applyLitRender(X){if(!this.hasAttribute("data-lit-rendered"))this.innerHTML="",this.setAttribute("data-lit-rendered","");K(X,this,{host:this})}_applyStringRender(X){if(X===""){this.innerHTML="";return}let $=document.createElement("template");$.innerHTML=X;let J=$.content.querySelector("slot");if(J!==null){let Z=document.createElement("template");Z.innerHTML=this._children,J.replaceWith(Z.content),this.innerHTML="",this.appendChild($.content)}else if(this.innerHTML=X,this._children!==""&&X.indexOf(this._children)===-1)this.innerHTML+=this._children}_resetRenderRoot(){this.innerHTML="",this.removeAttribute("data-lit-rendered"),delete this._$litPart$}async _render(){let X=++this._renderId,$=this.constructor,J=this.render;if($._template!==void 0)J=()=>{if(typeof $._template==="function")return $._template.call(this,this);return $._template};let Z=await W0(J,this);if(X!==this._renderId)return;if(Z===void 0||Z===null){this._syncListenersAfterRender(),await W0(this.didRender,this);return}let Y=N0(Z)||Z===O?"lit":"string";if(L._hasMiddleware?.("render")&&L._applyMiddleware)Z=L._applyMiddleware("render",this,Z,Y);let Q=N0(Z)||Z===O,z=Q?"lit":"string";if(this._lastRenderType!==void 0&&this._lastRenderType!==z)this._resetRenderRoot();if(Q)this._applyLitRender(Z);else this._applyStringRender(Z.trim());this._lastRenderType=z,this._syncListenersAfterRender(),await W0(this.didRender,this)}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=e(J._sharedStyle,J.tag)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
24
24
  `)+`
25
- `+X;else Z=X,J._sharedStyle={},this._style={};if(J._styleSheet.replaceSync(Z),!document.adoptedStyleSheets.includes(J._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,J._styleSheet];return J._sharedStyle}on(X,$,J){return this.addEventListener(X,$,J),this}off(X,$,J){return this.removeEventListener(X,$,J),this}once(X,$,J){let Z=typeof J==="boolean"?{capture:J,once:!0}:{...J,once:!0};return this.addEventListener(X,$,Z),this}emit(X,$,J){let Z=new CustomEvent(X,{detail:$,bubbles:!0,cancelable:!0,composed:!0,...J});return this.dispatchEvent(Z)}query(X){return this.querySelector(X)}queryAll(X){return this.querySelectorAll(X)}_readyCallbacks;ready(X){if(this._isReady)queueMicrotask(X);else this._readyCallbacks??=[],this._readyCallbacks.push(X)}async willMount(){}async didMount(){}async didRender(){}async didReconnect(){}async willUnmount(){}async didUnmount(){}didChange(X,$,J,Z){}async connectedCallback(){let X=this.constructor,$=X.tag;try{if(this._connected=!0,this.dataset.component=$,k._applyCurrentImplementation?.(this,$),typeof Symbol.metadata<"u"){let Y=this.constructor[Symbol.metadata]?.[g];if(Y)for(let Q of Y)k._activateSubscription(this,Q)}let J=!this._hasBeenMounted;if(J)this._children=this.innerHTML.trim();if(J&&X._template===void 0){let Z=document.querySelector(`template#${$}`);if(Z)X._template=Z.innerHTML}if(J&&typeof Symbol.metadata<"u"){let Y=X[Symbol.metadata]?.[B0];if(Y)this.setStyle(Y,!0)}if(await this.willMount(),await this._render(),this._initRenderDone=!0,J)await this.didMount();else await this.didReconnect();if(this._hasBeenMounted=!0,this._isReady=!0,this._readyCallbacks){for(let Z of this._readyCallbacks)Z();this._readyCallbacks=void 0}k._onMount?.(this,$),this.emit("pandora:ready",{firstMount:J,tag:$},{bubbles:!0,composed:!0})}catch(J){if(k._onError)k._onError(J,this,$,"connectedCallback");else throw J}}async disconnectedCallback(){let X=this.constructor,$=X.tag;try{if(this.emit("pandora:unmount",{tag:$},{bubbles:!0,composed:!0}),typeof Symbol.metadata<"u"){let Z=X[Symbol.metadata]?.[g];if(Z){let Y=this;for(let Q of Z)if(Y[Q.unsubKey])Y[Q.unsubKey](),Y[Q.unsubKey]=void 0}}this._detachListeners(),await this.willUnmount(),await this.didUnmount(),this._connected=!1,this._isReady=!1,k._onUnmount?.(this,$)}catch(J){if(k._onError)k._onError(J,this,$,"disconnectedCallback");else throw J}}attributeChangedCallback(X,$,J){if(typeof Symbol.metadata>"u")return;let Y=this.constructor[Symbol.metadata],Q=Y?.[d];if(!Q)return;let z=this;for(let q of Q){if(q.attrName!==X)continue;if(z[q.settingKey])continue;let G=J!==null?C(J):void 0,B=z[q.valueKey];if(q.equals(B,G))continue;z[q.valueKey]=G;let F=Y?.[D];if(F){for(let W of F)if(W.property===q.propertyKey){let M=this[W.methodName];if(typeof M==="function")M.call(this,G,B)}}if(this.didChange(q.propertyKey,B,G,"prop-attribute"),q.shouldRender&&this._initRenderDone&&this._connected)this._queueRender()}}_activeListeners=[];_attachListeners(){if(typeof Symbol.metadata>"u")return;let $=this.constructor[Symbol.metadata]?.[m];if(!$)return;for(let J of $){let Z=this[J.methodName];if(typeof Z!=="function")continue;let Y=Z.bind(this),Q=J.options,z=n0(this,Q?.target,(B)=>this.query(B));if(!z)continue;let q={};if(Q?.capture)q.capture=!0;if(Q?.passive)q.passive=!0;let G;if(Q?.delegate){let B=Q.delegate,F=Q?.once;G=(W)=>{if(W.target?.closest(B)){if(Y(W),F)z.removeEventListener(J.event,G,q),this._activeListeners=this._activeListeners.filter((U)=>U.handler!==G)}}}else if(G=Y,Q?.once)q.once=!0;z.addEventListener(J.event,G,q),this._activeListeners.push({target:z,event:J.event,handler:G,options:q})}}_detachListeners(){for(let{target:X,event:$,handler:J,options:Z}of this._activeListeners)X.removeEventListener($,J,Z);this._activeListeners=[]}}var V=k;class S2 extends V{_shadowDOM;static _styleSheet=null;static _sharedStyle={};constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=e(J._sharedStyle)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
25
+ `+X;else Z=X,J._sharedStyle={},this._style={};if(J._styleSheet.replaceSync(Z),!document.adoptedStyleSheets.includes(J._styleSheet))document.adoptedStyleSheets=[...document.adoptedStyleSheets,J._styleSheet];return J._sharedStyle}on(X,$,J){return this.addEventListener(X,$,J),this}off(X,$,J){return this.removeEventListener(X,$,J),this}once(X,$,J){let Z=typeof J==="boolean"?{capture:J,once:!0}:{...J,once:!0};return this.addEventListener(X,$,Z),this}emit(X,$,J){let Z=new CustomEvent(X,{detail:$,bubbles:!0,cancelable:!0,composed:!0,...J});return this.dispatchEvent(Z)}query(X){return this.querySelector(X)}queryAll(X){return this.querySelectorAll(X)}_readyCallbacks;ready(X){if(this._isReady)queueMicrotask(X);else this._readyCallbacks??=[],this._readyCallbacks.push(X)}async willMount(){}async didMount(){}async didRender(){}async didReconnect(){}async willUnmount(){}async didUnmount(){}didChange(X,$,J,Z){}async connectedCallback(){let X=this.constructor,$=X.tag;try{if(this._connected=!0,this.dataset.component=$,L._applyCurrentImplementation?.(this,$),typeof Symbol.metadata<"u"){let Y=this.constructor[Symbol.metadata]?.[g];if(Y)for(let Q of Y)L._activateSubscription(this,Q)}let J=!this._hasBeenMounted;if(J)this._children=this.innerHTML.trim();if(J&&X._template===void 0){let Z=document.querySelector(`template#${$}`);if(Z)X._template=Z.innerHTML}if(J&&typeof Symbol.metadata<"u"&&!Object.hasOwn(X,"_styleMetaApplied")){let Y=X[Symbol.metadata]?.[B0];if(Y)X._styleMetaApplied=!0,this.setStyle(Y,!0)}if(await this.willMount(),await this._render(),this._initRenderDone=!0,J)await this.didMount();else await this.didReconnect();if(this._hasBeenMounted=!0,this._isReady=!0,this._readyCallbacks){for(let Z of this._readyCallbacks)Z();this._readyCallbacks=void 0}L._onMount?.(this,$),this.emit("pandora:ready",{firstMount:J,tag:$},{bubbles:!0,composed:!0})}catch(J){if(L._onError)L._onError(J,this,$,"connectedCallback");else throw J}}async disconnectedCallback(){let X=this.constructor,$=X.tag;try{if(this.emit("pandora:unmount",{tag:$},{bubbles:!0,composed:!0}),typeof Symbol.metadata<"u"){let Z=X[Symbol.metadata]?.[g];if(Z){let Y=this;for(let Q of Z)if(Y[Q.unsubKey])Y[Q.unsubKey](),Y[Q.unsubKey]=void 0}}this._detachListeners(),await this.willUnmount(),await this.didUnmount(),this._connected=!1,this._isReady=!1,L._onUnmount?.(this,$)}catch(J){if(L._onError)L._onError(J,this,$,"disconnectedCallback");else throw J}}attributeChangedCallback(X,$,J){if(typeof Symbol.metadata>"u")return;let Y=this.constructor[Symbol.metadata],Q=Y?.[d];if(!Q)return;let z=this;for(let q of Q){if(q.attrName!==X)continue;if(z[q.settingKey])continue;let G=J!==null?C(J):void 0,B=z[q.valueKey];if(q.equals(B,G))continue;z[q.valueKey]=G;let F=Y?.[D];if(F){for(let W of F)if(W.property===q.propertyKey){let M=this[W.methodName];if(typeof M==="function")M.call(this,G,B)}}if(this.didChange(q.propertyKey,B,G,"prop-attribute"),q.shouldRender&&this._initRenderDone&&this._connected)this._queueRender()}}_activeListeners=[];_listenersAttached=!1;_consumedOnceListeners=new Set;_listenerMetadata(){if(typeof Symbol.metadata>"u")return;return this.constructor[Symbol.metadata]?.[m]}static _isDynamicListenerTarget(X){return!!(X&&X!=="self"&&X!=="window"&&X!=="document")}_bindListener(X,$){let J=X.options;if(J?.once&&this._consumedOnceListeners.has($))return!1;let Z=this[X.methodName];if(typeof Z!=="function")return!1;let Y=L._isDynamicListenerTarget(J?.target),Q=n0(this,J?.target,(B)=>this.query(B));if(!Q)return!1;let z=Z.bind(this),q={};if(J?.capture)q.capture=!0;if(J?.passive)q.passive=!0;let G;if(J?.delegate){let B=J.delegate,F=J?.once;G=(W)=>{if(W.target?.closest(B)){if(F)this._consumedOnceListeners.add($),Q.removeEventListener(X.event,G,q),this._activeListeners=this._activeListeners.filter((U)=>U.handler!==G);z(W)}}}else if(J?.once)G=(B)=>{this._consumedOnceListeners.add($),this._activeListeners=this._activeListeners.filter((F)=>F.handler!==G),z(B)},q.once=!0;else G=z;return Q.addEventListener(X.event,G,q),this._activeListeners.push({target:Q,event:X.event,handler:G,options:q,dynamic:Y,index:$}),!0}_attachListeners(){let X=this._listenerMetadata();if(!X)return;X.forEach(($,J)=>this._bindListener($,J))}_refreshDynamicListeners(){let X=[];for(let J of this._activeListeners)if(J.dynamic)J.target.removeEventListener(J.event,J.handler,J.options);else X.push(J);this._activeListeners=X;let $=this._listenerMetadata();if(!$)return;$.forEach((J,Z)=>{if(L._isDynamicListenerTarget(J.options?.target))this._bindListener(J,Z)})}_syncListenersAfterRender(){if(this._listenersAttached)this._refreshDynamicListeners();else this._attachListeners(),this._listenersAttached=!0}_detachListeners(){for(let{target:X,event:$,handler:J,options:Z}of this._activeListeners)X.removeEventListener($,J,Z);this._activeListeners=[],this._listenersAttached=!1,this._consumedOnceListeners.clear()}}var b=L;class L2 extends b{_shadowDOM;static _styleSheet=null;static _sharedStyle={};constructor(){super();this._shadowDOM=this.attachShadow({mode:"open"})}setStyle(X,$=!1){let J=this.constructor;if(!J._styleSheet)J._styleSheet=new CSSStyleSheet;let Z="";if(typeof X==="object"){if(!Object.hasOwn(J,"_sharedStyle"))J._sharedStyle={};if(!$)J._sharedStyle={...J._sharedStyle,...X};else J._sharedStyle={...X};this._style=J._sharedStyle,Z=e(J._sharedStyle)}else if(typeof X==="string")if(!$)Z=Array.from(J._styleSheet.cssRules||[]).map((Q)=>Q.cssText).join(`
26
26
  `)+`
27
- `+X;else Z=X,J._sharedStyle={},this._style={};return J._styleSheet.replaceSync(Z),this._shadowDOM.adoptedStyleSheets=[J._styleSheet],J._sharedStyle}_applyLitRender(X){K(X,this._shadowDOM,{host:this})}_applyStringRender(X){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();if(X==="")return;let $=document.createElement("template");$.innerHTML=X,this._shadowDOM.appendChild($.content)}get shadowRoot(){return this._shadowDOM}set shadowRoot(X){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(X){return this._shadowDOM.querySelector(X)}queryAll(X){return this._shadowDOM.querySelectorAll(X)}}var N2=S2;var k2=Symbol("pandora:appliedImpl");class F0{static _debug=!1;static components={};static implementations={};static state={};static subscribers={};static mountCallbacks=new Set;static unmountCallbacks=new Set;static errorCallbacks=new Set;static aliases={};static lazyLoaders={};static lazyLoadPromises={};static middleware={render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,V._onMount=(X,$)=>this._notifyMount(X,$),V._onUnmount=(X,$)=>this._notifyUnmount(X,$),V._onError=(X,$,J,Z)=>this._notifyError(X,$,J,Z),V._applyMiddleware=(X,$,J,Z)=>this._applyMiddleware(X,$,J,Z),V._hasMiddleware=(X)=>this._hasMiddleware(X),V._subscribe=(X,$)=>this.subscribe(X,$),V._getGlobalState=(X)=>this.getState(X),V._applyCurrentImplementation=(X,$)=>{let J=this.implementations[$];if(!J)return;let Q=X[k2]??X.constructor;if(J===Q)return;this._applyImplementation(X,J,!1)}}static register(X,$){if(this._init(),typeof this.components[X]>"u")this.components[X]=$,this.implementations[X]=$,$.tag=X,window.customElements.define(X,$),this.components[X]._registered=!0,this.log(`Registered: <${X}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static define(X,$){this.register(X,$)}static getImplementation(X){return this.implementations[X]||this.components[X]}static _applyImplementation(X,$,J=!1){let Z=$.prototype,Y=Object.getOwnPropertyNames(Z),Q=X;X[k2]=$;for(let z of Y){if(z==="constructor")continue;let q=Object.getOwnPropertyDescriptor(Z,z);if(!q)continue;if(typeof q.value==="function")Q[z]=q.value.bind(X);else if(q.get||q.set)Object.defineProperty(Object.getPrototypeOf(X),z,q)}try{let z=customElements.get($.tag)??$,q=Reflect.construct($,[],z);for(let G of Object.keys(q))if(!(G in Q)||Q[G]===void 0)Q[G]=q[G]}catch(z){console.warn(`[Pandora] Could not construct temp instance of <${$.tag}> for default extraction:`,z)}if(typeof Symbol.metadata<"u"){let z=$[Symbol.metadata];if(z){let q=X.constructor;q[Symbol.metadata]=z}}if(typeof Symbol.metadata<"u"){let q=$[Symbol.metadata]?.[i];if(q?.length){let G=Q[s];if(G)for(let B of G)B();Q[s]=[];for(let B of q)B(X)}}}static evolve(X,$,J=!1){if(typeof this.components[X]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");this.implementations[X]=$,$._registered=!0;let Z=[];for(let[Y,Q]of Object.entries(this.aliases))if(Q===X)Z.push(Y),this.implementations[Y]=$;if(this.log(`Evolved: <${X}>`),J){let Y=[X,...Z];for(let Q of Y)document.querySelectorAll(Q).forEach((z)=>{if(z instanceof V&&z.isReady)this._applyImplementation(z,$,!0),z.forceRender()})}}static instances(X,$){if(typeof this.components[X]>"u")throw Error("No component with the provided tag has been registered.");if(typeof $==="function")document.querySelectorAll(X).forEach($);else return document.querySelectorAll(X)}static instantiate(X,$){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);if(!this.components[X]._registered)this.register(X,this.components[X]);let J=document.createElement(this.components[X].tag);for(let[Z,Y]of Object.entries($)){if(Y===void 0||Y===null)continue;if(J[Z]=Y,Object.getOwnPropertyDescriptor(J,Z)?.set!==void 0)continue;if(typeof Y==="boolean"){if(Y)J.setAttribute(Z,"")}else if(typeof Y==="string"||typeof Y==="number")J.setAttribute(Z,String(Y))}return J}static has(X){return typeof this.components[X]<"u"}static get(X){return this.components[X]}static setState(X,$){let J=this.state[X];if(this.state[X]=$,this.subscribers[X])this.subscribers[X].forEach((Z)=>{Z($,J)})}static getState(X){return this.state[X]}static hasState(X){return X in this.state}static deleteState(X){if(X in this.state){let $=this.state[X];if(delete this.state[X],this.subscribers[X])this.subscribers[X].forEach((J)=>{J(void 0,$)});return!0}return!1}static subscribe(X,$){if(!this.subscribers[X])this.subscribers[X]=new Set;return this.subscribers[X].add($),()=>{this.unsubscribe(X,$)}}static unsubscribe(X,$){if(this.subscribers[X])this.subscribers[X].delete($)}static getAllState(){return{...this.state}}static clearState(){let X=Object.keys(this.state);for(let $ of X)this.deleteState($)}static clearSubscriptions(){for(let X of Object.keys(this.subscribers))this.subscribers[X]=new Set}static clearMiddleware(){for(let X of Object.keys(this.middleware))this.middleware[X]=new Set}static get debug(){return this._debug}static set debug(X){this._debug=X}static log(X,$){if(this._debug)if($!==void 0)console.log(`[Pandora] ${X}`,$);else console.log(`[Pandora] ${X}`)}static list(){return Object.keys(this.components)}static stats(X){if(X){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);return{tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}}return this.list().map(($)=>({tag:$,instanceCount:document.querySelectorAll($).length,isRegistered:this.components[$]?._registered??!1,isLazy:$ in this.lazyLoaders}))}static onMount(X){return this._init(),this.mountCallbacks.add(X),()=>this.mountCallbacks.delete(X)}static onUnmount(X){return this._init(),this.unmountCallbacks.add(X),()=>this.unmountCallbacks.delete(X)}static _notifyMount(X,$){this.log(`Mounted: <${$}>`),this.mountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onMount callback:",Z)}})}static _notifyUnmount(X,$){this.log(`Unmounted: <${$}>`),this.unmountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onUnmount callback:",Z)}})}static onError(X){return this._init(),this.errorCallbacks.add(X),()=>this.errorCallbacks.delete(X)}static _notifyError(X,$,J,Z){if(this.log(`Error in <${J}> during ${Z}:`,X),this.errorCallbacks.size===0)throw X;this.errorCallbacks.forEach((Y)=>{try{Y(X,$,J,Z)}catch(Q){console.error("[Pandora] Error in onError callback:",Q)}})}static alias(X,$){if(!this.has($))throw Error(`Cannot create alias: no component with tag "${$}" has been registered.`);if(this.has(X))throw Error(`Cannot create alias: a component with tag "${X}" already exists.`);this.aliases[X]=$;let J=this.getImplementation($)??this.components[$],Z=class extends J{static _tag=X};this.components[X]=Z,this.implementations[X]=Z,window.customElements.define(X,Z),Z._registered=!0,this.log(`Created alias: <${X}> -> <${$}>`)}static getOriginalTag(X){return this.aliases[X]}static isAlias(X){return X in this.aliases}static lazy(X,$){if(this._init(),this.has(X))throw Error(`Cannot register lazy component: a component with tag "${X}" already exists.`);this.lazyLoaders[X]=$;let J=F0;class Z extends V{static _tag=X;_lazyLoaded=!1;async connectedCallback(){await J._loadLazyComponent(X);let Y=J.getImplementation(X);if(Y&&Y!==Z)F0._applyImplementation(this,Y,!1),this._lazyLoaded=!0;await super.connectedCallback()}}this.components[X]=Z,window.customElements.define(X,Z),this.log(`Registered lazy component: <${X}>`)}static async _loadLazyComponent(X){if(this.lazyLoadPromises[X])return this.lazyLoadPromises[X];if(!(X in this.lazyLoaders))return;let $=this.lazyLoaders[X];return this.log(`Loading lazy component: <${X}>`),this.lazyLoadPromises[X]=(async()=>{try{let J=await $(),Z="default"in J?J.default:J;delete this.lazyLoaders[X],this.implementations[X]=Z,Z._registered=!0,this.log(`Loaded lazy component: <${X}>`)}catch(J){throw console.error(`[Pandora] Failed to load lazy component <${X}>:`,J),J}finally{delete this.lazyLoadPromises[X]}})(),this.lazyLoadPromises[X]}static isLazy(X){return X in this.lazyLoaders}static async preload(X){if(this.isLazy(X))await this._loadLazyComponent(X)}static use(X,$){return this._init(),this.middleware[X].add($),()=>this.middleware[X].delete($)}static _applyMiddleware(X,$,J,Z){let Y=J;return this.middleware[X].forEach((Q)=>{try{Y=Q($,Y,Z)}catch(z){console.error(`[Pandora] Error in ${X} middleware:`,z)}}),Y}static _hasMiddleware(X){return this.middleware[X].size>0}}V._registryRegister=(X,$)=>F0.register(X,$);var A=F0;Symbol.metadata??=Symbol("Symbol.metadata");function P2(X,$){return function(J,Z){let Y=Z.metadata;if(Y?.[I]){if(!Object.hasOwn(J,"_observedAttributes"))J._observedAttributes=[];for(let Q of Y[I])if(!J._observedAttributes.includes(Q))J._observedAttributes.push(Q)}if(Y&&J[Symbol.metadata]===void 0)J[Symbol.metadata]=Y;if(J.tag=X,!$?.defer)A.register(X,J);return J}}function E2(X){return function($,J){let Z=J.metadata;return Z[B0]=X,$}}function w2(X){return function($,J){let Z=String(J.name),Y=J.metadata;if(!Object.hasOwn(Y,D)){let z=Y[D];Y[D]=z?[...z]:[]}Y[D].push({property:X,methodName:Z});let Q=!1;J.addInitializer(function(){if(Q)return;Q=!0;let z=Y[b];if(!z||!z.has(X)){let q=this?.constructor?.name??"<anonymous>";console.warn(`[Pandora] @Watch('${X}') on ${q}.${Z}(): '${X}' has no @State, @Attribute, or @Property decorator. Add one of those decorators to '${X}', or call reactive(this, '${X}') in the constructor — otherwise the watcher will never fire.`)}})}}function R2(X,$){if(typeof Symbol.metadata>"u")return[];let Z=X.constructor[Symbol.metadata]?.[D];if(!Z)return[];let Y=[];for(let Q of Z)if(Q.property===$){let z=X[Q.methodName];if(typeof z==="function")Y.push(z.bind(X))}return Y}var Z1=new Set(["hidden","title","slot","style","id","className","tabIndex","dir","lang","draggable","contentEditable","accessKey","innerHTML","outerHTML","textContent","innerText"]);function t0(X,$){if(Z1.has($))console.warn(`[Pandora] @${X}('${$}') conflicts with HTMLElement.${$}. This may cause unexpected behavior. Consider renaming to avoid the conflict.`)}function K2(X){return function($,J){let Z=String(J.name);t0("State",Z);let Y=X?.render!==!1,Q=Symbol(`__pandora_state_${Z}`),z,q=!1,G=J.metadata;if(!Object.hasOwn(G,b)){let B=G[b];G[b]=B?new Set(B):new Set}G[b].add(Z),x(G,(B)=>{if(D0(B,Z,Q,Y),q&&B[Q]===void 0)B[Q]=z}),J.addInitializer(function(){let B=this,F=B[Z];if(D0(B,Z,Q,Y),F!==void 0){if(B[Q]=F,!q)z=F,q=!0}})}}function D0(X,$,J,Z,Y="state",Q=(z,q)=>z===q){C2(X,$,J),Object.defineProperty(X,$,{get(){return X[J]},set(z){let q=X[J];if(Q(q,z))return;if(X[J]=z,X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===$);if(F){if(F.newValue=z,Z)F.shouldRender=!0}else B.push({property:$,oldValue:q,newValue:z,shouldRender:Z,source:Y});return}let G=R2(X,$);for(let B of G)B(z,q);if(X.didChange($,q,z,Y),Z&&X._initRenderDone&&X.isConnected)X._queueRender()},enumerable:!0,configurable:!0}),r(X,()=>{delete X[$]})}function f2(X){return function($,J){let Z=String(J.name);t0("Property",Z);let Y=Symbol(`__pandora_property_${Z}`),Q=X?.equals??((F,W)=>F===W),z=X?.attribute??!1,q,G=!1,B=J.metadata;if(!Object.hasOwn(B,b)){let F=B[b];B[b]=F?new Set(F):new Set}if(B[b].add(Z),z!==!1){let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(B,I)){let W=B[I];B[I]=W?[...W]:[]}if(!B[I].includes(z))B[I].push(z);h2(B,{attrName:z,propertyKey:Z,valueKey:Y,settingKey:F,shouldRender:!1,equals:Q}),x(B,(W)=>{if(V0(W,z,Z,Y,F,!1,Q),G&&W[Y]===void 0)if(W.hasAttribute(z))W[Y]=C(W.getAttribute(z));else W[Y]=q,b0(W,z,q)}),J.addInitializer(function(){let W=this,M=W[Z],U=W.hasAttribute(z),L=U?C(W.getAttribute(z)):void 0;if(V0(W,z,Z,Y,F,!1,Q),M!==void 0&&!G)q=M,G=!0;if(U)W[Y]=L;else if(M!==void 0)W[Y]=M,b0(W,z,M)})}else x(B,(F)=>{if(D0(F,Z,Y,!1,"property",Q),G&&F[Y]===void 0)F[Y]=q}),J.addInitializer(function(){let F=this,W=F[Z];if(D0(F,Z,Y,!1,"property",Q),W!==void 0){if(F[Y]=W,!G)q=W,G=!0}})}}function T2(X){return function($,J){let Z=String(J.name);t0("Attribute",Z);let Y,Q=!0;if(typeof X==="object")Y=Z,Q=X.render!==!1;else Y=X??Z;let z=Symbol(`__pandora_attr_${Z}`),q=J.metadata;if(!Object.hasOwn(q,b)){let F=q[b];q[b]=F?new Set(F):new Set}q[b].add(Z);let G,B=!1;{let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(q,I)){let W=q[I];q[I]=W?[...W]:[]}if(!q[I].includes(Y))q[I].push(Y);h2(q,{attrName:Y,propertyKey:Z,valueKey:z,settingKey:F,shouldRender:Q,equals:(W,M)=>W===M}),x(q,(W)=>{if(V0(W,Y,Z,z,F,Q),B&&W[z]===void 0)if(W.hasAttribute(Y))W[z]=C(W.getAttribute(Y));else W[z]=G,b0(W,Y,G)}),J.addInitializer(function(){let W=this,M=W[Z],U=W.hasAttribute(Y),L=U?C(W.getAttribute(Y)):void 0;if(V0(W,Y,Z,z,F,Q),M!==void 0&&!B)G=M,B=!0;if(U)W[z]=L;else if(M!==void 0)W[z]=M,b0(W,Y,M)})}}}function C2(X,$,J){let Z=Object.getOwnPropertyDescriptor(X,$);if(Z&&"value"in Z&&Z.value!==void 0&&X[J]===void 0)X[J]=Z.value}function h2(X,$){if(!Object.hasOwn(X,d)){let J=X[d];X[d]=J?[...J]:[]}X[d].push($)}function b0(X,$,J){if(typeof J==="boolean")if(J)X.setAttribute($,"");else X.removeAttribute($);else if(typeof J==="string"||typeof J==="number")X.setAttribute($,String(J))}function V0(X,$,J,Z,Y,Q=!0,z=(q,G)=>q===G){if(C2(X,J,Z),Object.defineProperty(X,J,{get(){if(X[Z]!==void 0)return X[Z];if(X.hasAttribute($))return C(X.getAttribute($));return},set(q){let G=X[Z];if(X[Z]=q,X[Y]=!0,q===void 0||q===null)X.removeAttribute($);else if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")if(typeof q==="boolean")if(q)X.setAttribute($,"");else X.removeAttribute($);else X.setAttribute($,String(q));if(X[Y]=!1,!z(G,q))if(X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===J);if(F){if(F.newValue=q,Q)F.shouldRender=!0}else B.push({property:J,oldValue:G,newValue:q,shouldRender:Q,source:"prop"})}else{let B=R2(X,J);for(let F of B)F(q,G);if(X.didChange(J,G,q,"prop"),Q&&X._initRenderDone&&X.isConnected)X._queueRender()}},enumerable:!0,configurable:!0}),X.isConnected&&X.hasAttribute($))X[Z]=C(X.getAttribute($));r(X,()=>{delete X[J]})}function g2(X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_unsub_${Z}`),Q=Symbol(`__pandora_value_${Z}`),z=J.metadata;if(!Object.hasOwn(z,b)){let q=z[b];z[b]=q?new Set(q):new Set}if(z[b].add(Z),!Object.hasOwn(z,g)){let q=z[g];z[g]=q?[...q]:[]}z[g].push({stateKey:X,propertyKey:Z,unsubKey:Y,valueKey:Q}),x(z,(q)=>{D2(q,X,Z,Y,Q)}),J.addInitializer(function(){D2(this,X,Z,Y,Q)})}}function D2(X,$,J,Z,Y){if(Object.defineProperty(X,J,{get(){return X[Y]},set(Q){let z=X[Y];if(z===Q)return;if(X[Y]=Q,A.setState($,Q),X.didChange(J,z,Q,"consumer"),X.isReady)X._queueRender()},enumerable:!0,configurable:!0}),X.isConnected)V._activateSubscription?.(X,{stateKey:$,propertyKey:J,unsubKey:Z,valueKey:Y});r(X,()=>{if(X[Z])X[Z](),X[Z]=void 0;delete X[J]})}function v2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{b2(Q,Z,X)}),J.addInitializer(function(){b2(this,Z,X)})}}function y2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{V2(Q,Z,X)}),J.addInitializer(function(){V2(this,Z,X)})}}function b2(X,$,J){Object.defineProperty(X,$,{get(){return X.query(J)},enumerable:!0,configurable:!0})}function V2(X,$,J){Object.defineProperty(X,$,{get(){return X.queryAll(J)},enumerable:!0,configurable:!0})}function m2(X){return function($,J){let Z=String(J.name),Y=X?`slot[name="${X}"]`:"slot:not([name])",Q=J.metadata;x(Q,(z)=>{A2(z,Z,Y)}),J.addInitializer(function(){A2(this,Z,Y)})}}function A2(X,$,J){Object.defineProperty(X,$,{get(){return(X._shadowDOM||X.shadowRoot)?.querySelector(J)??null},enumerable:!0,configurable:!0})}function d2(X,$){return function(J,Z){let Y=String(Z.name),Q=Z.metadata;if(!Object.hasOwn(Q,m)){let z=Q[m];Q[m]=z?[...z]:[]}Q[m].push({event:X,methodName:Y,options:$})}}function u2(...X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_computed_cache_${Z}`),Q=Symbol(`__pandora_computed_valid_${Z}`),z=J.metadata;for(let G of X){if(!Object.hasOwn(z,D)){let B=z[D];z[D]=B?[...B]:[]}z[D].push({property:G,methodName:`__invalidate_${Z}`})}let q=$;return x(z,(G)=>{I2(G,Z,Y,Q,q)}),J.addInitializer(function(){I2(this,Z,Y,Q,q)}),$}}function I2(X,$,J,Z,Y){X[`__invalidate_${$}`]=()=>{X[Z]=!1},Object.defineProperty(X,$,{get(){if(!X[Z])X[J]=Y.call(X),X[Z]=!0;return X[J]},enumerable:!0,configurable:!0})}function p2(X){return function($,J){let Z=J.metadata,Y=[],Q=[];for(let[q,G]of Object.entries(X))if(typeof G==="string"){if(Y.push({className:q,propertyName:G}),!Object.hasOwn(Z,D)){let F=Z[D];Z[D]=F?[...F]:[]}let B=`__classlist_${q}_${G}`;Z[D].push({property:G,methodName:B}),$.prototype[B]=function(){this.classList.toggle(q,!!this[G])}}else Q.push({className:q,conditionFn:G});if(Q.length>0){let q=$.prototype.didChange;$.prototype.didChange=function(G,B,F,W){q?.call(this,G,B,F,W);for(let{className:M,conditionFn:U}of Q)this.classList.toggle(M,U(this))}}let z=$.prototype.connectedCallback;return $.prototype.connectedCallback=async function(){await z?.call(this);for(let{className:q,propertyName:G}of Y)this.classList.toggle(q,!!this[G]);for(let{className:q,conditionFn:G}of Q)this.classList.toggle(q,G(this))},$}}function c2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{x2(Q,Z,X)}),J.addInitializer(function(){x2(this,Z,X)})}}function x2(X,$,J){Object.defineProperty(X,$,{value:(Z)=>{return X.emit(J,Z)},writable:!1,enumerable:!0,configurable:!0})}function o2(X,$){if($!==void 0&&!A.hasState(X))A.setState(X,$);return{key:X,get(){return A.getState(X)},set(J){A.setState(X,J)},subscribe(J){return A.subscribe(X,J)},has(){return A.hasState(X)},delete(){A.deleteState(X)}}}var e0={};K0(e0,{whenReady:()=>l2,resetRegistry:()=>Q1,mount:()=>z1,flush:()=>Y1});async function Y1(){await new Promise((X)=>queueMicrotask(X)),await new Promise((X)=>queueMicrotask(X))}function l2(X,$=5000){let J=X;if(J.isReady)return Promise.resolve();return new Promise((Z,Y)=>{let Q=setTimeout(()=>{Y(Error(`Component <${X.tagName.toLowerCase()}> did not become ready within ${$}ms`))},$),z=()=>{if(J.isReady)clearTimeout(Q),Z();else requestAnimationFrame(z)};requestAnimationFrame(z)})}function Q1(){A.clearState(),A.clearSubscriptions(),A.clearMiddleware()}async function z1(X,$,J){let Z=$??document.body,Y=document.createElement("div");Y.innerHTML=`<${X}>${J??""}</${X}>`;let Q=Y.firstElementChild;return Z.appendChild(Q),await l2(Q),Q}var i2={};var S={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_=(X)=>(...$)=>({["_$litDirective$"]:X,values:$});class N{constructor(X){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(X,$,J){this.__part=X,this._$parent=$,this.__attributeIndex=J}_$resolve(X,$){return this.update(X,$)}update(X,$){return this.render(...$)}}var{_ChildPart:q1}=_2,G1=!0,X0=G1&&window.ShadyDOM?.inUse&&window.ShadyDOM?.noPatch===!0?window.ShadyDOM.wrap:(X)=>X,A0=(X)=>X===null||typeof X!="object"&&typeof X!="function",r2={HTML:1,SVG:2,MATHML:3},U0=(X,$)=>$===void 0?X?._$litType$!==void 0:X?._$litType$===$,I0=(X)=>{return X?._$litType$?.h!=null},n2=(X)=>X?._$litDirective$!==void 0,a2=(X)=>X?._$litDirective$,$0=(X)=>X.strings===void 0,s2=()=>document.createComment(""),E=(X,$,J)=>{let Z=X0(X._$startNode).parentNode,Y=$===void 0?X._$endNode:$._$startNode;if(J===void 0){let Q=X0(Z).insertBefore(s2(),Y),z=X0(Z).insertBefore(s2(),Y);J=new q1(Q,z,X,X.options)}else{let Q=X0(J._$endNode).nextSibling,z=J._$parent,q=z!==X;if(q){J._$reparentDisconnectables?.(X),J._$parent=X;let G;if(J._$notifyConnectionChanged!==void 0&&(G=X._$isConnected)!==z._$isConnected)J._$notifyConnectionChanged(G)}if(Q!==Y||q){let G=J._$startNode;while(G!==Q){let B=X0(G).nextSibling;X0(Z).insertBefore(G,Y),G=B}}}return J},w=(X,$,J=X)=>{return X._$setValue($,J),X},W1={},f=(X,$=W1)=>X._$committedValue=$,n=(X)=>X._$committedValue,J0=(X)=>{X._$clear(),X._$startNode.remove()},Z0=(X)=>{X._$clear()};var B1=!0,M0=(X,$)=>{let J=X._$disconnectableChildren;if(J===void 0)return!1;for(let Z of J)Z._$notifyDirectiveConnectionChanged?.($,!1),M0(Z,$);return!0},x0=(X)=>{let $,J;do{if(($=X._$parent)===void 0)break;J=$._$disconnectableChildren,J.delete(X),X=$}while(J?.size===0)},t2=(X)=>{for(let $;$=X._$parent;X=$){let J=$._$disconnectableChildren;if(J===void 0)$._$disconnectableChildren=J=new Set;else if(J.has(X))break;J.add(X),M1($)}};function F1(X){if(this._$disconnectableChildren!==void 0)x0(this),this._$parent=X,t2(this);else this._$parent=X}function U1(X,$=!1,J=0){let Z=this._$committedValue,Y=this._$disconnectableChildren;if(Y===void 0||Y.size===0)return;if($){if(Array.isArray(Z))for(let Q=J;Q<Z.length;Q++)M0(Z[Q],!1),x0(Z[Q]);else if(Z!=null)M0(Z,!1),x0(Z)}else M0(this,X)}var M1=(X)=>{if(X.type==S.CHILD)X._$notifyConnectionChanged??=U1,X._$reparentDisconnectables??=F1};class v extends N{constructor(){super(...arguments);this._$disconnectableChildren=void 0}_$initialize(X,$,J){super._$initialize(X,$,J),t2(this),this.isConnected=X._$isConnected}["_$notifyDirectiveConnectionChanged"](X,$=!0){if(X!==this.isConnected)if(this.isConnected=X,X)this.reconnected?.();else this.disconnected?.();if($)M0(this,X),x0(this)}setValue(X){if($0(this.__part))this.__part._$setValue(X,this);else{if(B1&&this.__attributeIndex===void 0)throw Error("Expected this.__attributeIndex to be a number");let $=[...this.__part._$committedValue];$[this.__attributeIndex]=X,this.__part._$setValue($,this,0)}}disconnected(){}reconnected(){}}var e2=async(X,$)=>{for await(let J of X)if(await $(J)===!1)return};class O0{constructor(X){this._ref=X}disconnect(){this._ref=void 0}reconnect(X){this._ref=X}deref(){return this._ref}}class j0{constructor(){this._promise=void 0,this._resolve=void 0}get(){return this._promise}pause(){this._promise??=new Promise((X)=>this._resolve=X)}resume(){this._resolve?.(),this._promise=this._resolve=void 0}}class P0 extends v{constructor(){super(...arguments);this.__weakThis=new O0(this),this.__pauser=new j0}render(X,$){return H}update(X,[$,J]){if(!this.isConnected)this.disconnected();if($===this.__value)return H;this.__value=$;let Z=0,{__weakThis:Y,__pauser:Q}=this;return e2($,async(z)=>{while(Q.get())await Q.get();let q=Y.deref();if(q!==void 0){if(q.__value!==$)return!1;if(J!==void 0)z=J(z,Z);q.commitValue(z,Z),Z++}return!0}),H}commitValue(X,$){this.setValue(X)}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var XX=_(P0);class $X extends P0{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(X,$){return this.__childPart=X,super.update(X,$)}commitValue(X,$){if($===0)Z0(this.__childPart);let J=E(this.__childPart);w(J,X)}}var JX=_($X);var ZX=(X)=>I0(X)?X._$litType$.h:X.strings;class YX extends N{constructor(X){super(X);this._templateCache=new WeakMap}render(X){return[X]}update(X,[$]){let J=U0(this._value)?ZX(this._value):null,Z=U0($)?ZX($):null;if(J!==null&&(Z===null||J!==Z)){let Q=n(X).pop(),z=this._templateCache.get(J);if(z===void 0){let q=document.createDocumentFragment();z=K(O,q),z.setConnected(!1),this._templateCache.set(J,z)}f(z,[Q]),E(z,void 0,Q)}if(Z!==null){if(J===null||J!==Z){let Y=this._templateCache.get(Z);if(Y!==void 0){let z=n(Y).pop();Z0(X),E(X,void 0,z),f(X,[z])}}this._value=$}else this._value=void 0;return this.render($)}}var QX=_(YX);var zX=(X,$,J)=>{for(let Z of $)if(Z[0]===X){let Q=Z[1];return Q()}return J?.()};class qX extends N{constructor(X){super(X);if(X.type!==S.ATTRIBUTE||X.name!=="class"||X.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(X){return" "+Object.keys(X).filter(($)=>X[$]).join(" ")+" "}update(X,[$]){if(this._previousClasses===void 0){if(this._previousClasses=new Set,X.strings!==void 0)this._staticClasses=new Set(X.strings.join(" ").split(/\s/).filter((Z)=>Z!==""));for(let Z in $)if($[Z]&&!this._staticClasses?.has(Z))this._previousClasses.add(Z);return this.render($)}let J=X.element.classList;for(let Z of this._previousClasses)if(!(Z in $))J.remove(Z),this._previousClasses.delete(Z);for(let Z in $){let Y=!!$[Z];if(Y!==this._previousClasses.has(Z)&&!this._staticClasses?.has(Z))if(Y)J.add(Z),this._previousClasses.add(Z);else J.remove(Z),this._previousClasses.delete(Z)}return H}}var GX=_(qX);var O1={};class WX extends N{constructor(){super(...arguments);this._previousValue=O1}render(X,$){return $()}update(X,[$,J]){if(Array.isArray($)){if(Array.isArray(this._previousValue)&&this._previousValue.length===$.length&&$.every((Y,Q)=>Y===this._previousValue[Q]))return H}else if(this._previousValue===$)return H;return this._previousValue=Array.isArray($)?Array.from($):$,this.render($,J)}}var BX=_(WX);var FX=(X)=>X??O;function*UX(X,$){let J=typeof $==="function";if(X!==void 0){let Z=-1;for(let Y of X){if(Z>-1)yield J?$(Z):$;Z++,yield Y}}}class MX extends N{constructor(){super(...arguments);this.key=O}render(X,$){return this.key=X,$}update(X,[$,J]){if($!==this.key)f(X),this.key=$;return J}}var OX=_(MX);class jX extends N{constructor(X){super(X);if(!(X.type===S.PROPERTY||X.type===S.ATTRIBUTE||X.type===S.BOOLEAN_ATTRIBUTE))throw Error("The `live` directive is not allowed on child or event bindings");if(!$0(X))throw Error("`live` bindings can only contain a single expression")}render(X){return X}update(X,[$]){if($===H||$===O)return $;let{element:J,name:Z}=X;if(X.type===S.PROPERTY){if($===J[Z])return H}else if(X.type===S.BOOLEAN_ATTRIBUTE){if(!!$===J.hasAttribute(Z))return H}else if(X.type===S.ATTRIBUTE){if(J.getAttribute(Z)===String($))return H}return f(X),$}}var HX=_(jX);function*_X(X,$){if(X!==void 0){let J=0;for(let Z of X)yield $(Z,J++)}}function*LX(X,$,J=1){let Z=$===void 0?0:X;$??=X;for(let Y=Z;J>0?Y<$:$<Y;Y+=J)yield Y}var SX=()=>new NX;class NX{}var X2=new WeakMap;class kX extends v{render(X){return O}update(X,[$]){let J=$!==this._ref;if(J&&this._ref!==void 0)this._updateRefValue(void 0);if(J||this._lastElementForRef!==this._element)this._ref=$,this._context=X.options?.host,this._updateRefValue(this._element=X.element);return O}_updateRefValue(X){if(!this.isConnected)X=void 0;if(typeof this._ref==="function"){let $=this._context??globalThis,J=X2.get($);if(J===void 0)J=new WeakMap,X2.set($,J);if(J.get(this._ref)!==void 0)this._ref.call(this._context,void 0);if(J.set(this._ref,X),X!==void 0)this._ref.call(this._context,X)}else this._ref.value=X}get _lastElementForRef(){return typeof this._ref==="function"?X2.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){if(this._lastElementForRef===this._element)this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}var DX=_(kX);var bX=(X,$,J)=>{let Z=new Map;for(let Y=$;Y<=J;Y++)Z.set(X[Y],Y);return Z};class VX extends N{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(X,$,J){let Z;if(J===void 0)J=$;else if($!==void 0)Z=$;let Y=[],Q=[],z=0;for(let q of X)Y[z]=Z?Z(q,z):z,Q[z]=J(q,z),z++;return{values:Q,keys:Y}}render(X,$,J){return this._getValuesAndKeys(X,$,J).values}update(X,[$,J,Z]){let Y=n(X),{values:Q,keys:z}=this._getValuesAndKeys($,J,Z);if(!Array.isArray(Y))return this._itemKeys=z,Q;let q=this._itemKeys??=[],G=[],B,F,W=0,M=Y.length-1,U=0,L=Q.length-1;while(W<=M&&U<=L)if(Y[W]===null)W++;else if(Y[M]===null)M--;else if(q[W]===z[U])G[U]=w(Y[W],Q[U]),W++,U++;else if(q[M]===z[L])G[L]=w(Y[M],Q[L]),M--,L--;else if(q[W]===z[L])G[L]=w(Y[W],Q[L]),E(X,G[L+1],Y[W]),W++,L--;else if(q[M]===z[U])G[U]=w(Y[M],Q[U]),E(X,Y[W],Y[M]),M--,U++;else{if(B===void 0)B=bX(z,U,L),F=bX(q,W,M);if(!B.has(q[W]))J0(Y[W]),W++;else if(!B.has(q[M]))J0(Y[M]),M--;else{let h=F.get(z[U]),R0=h!==void 0?Y[h]:null;if(R0===null){let J2=E(X,Y[W]);w(J2,Q[U]),G[U]=J2}else G[U]=w(R0,Q[U]),E(X,Y[W],R0),Y[h]=null;U++}}while(U<=L){let h=E(X,G[L+1]);w(h,Q[U]),G[U++]=h}while(W<=M){let h=Y[W++];if(h!==null)J0(h)}return this._itemKeys=z,f(X,G),H}}var AX=_(VX);var IX="important",xX=" !"+IX,j1=0-xX.length;class PX extends N{constructor(X){super(X);if(X.type!==S.ATTRIBUTE||X.name!=="style"||X.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(X){return Object.keys(X).reduce(($,J)=>{let Z=X[J];if(Z==null)return $;return J=J.includes("-")?J:J.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),$+`${J}:${Z};`},"")}update(X,[$]){let{style:J}=X.element;if(this._previousStyleProperties===void 0)return this._previousStyleProperties=new Set(Object.keys($)),this.render($);for(let Z of this._previousStyleProperties)if($[Z]==null)if(this._previousStyleProperties.delete(Z),Z.includes("-"))J.removeProperty(Z);else J[Z]=null;for(let Z in $){let Y=$[Z];if(Y!=null){this._previousStyleProperties.add(Z);let Q=typeof Y==="string"&&Y.endsWith(xX);if(Z.includes("-")||Q)J.setProperty(Z,Q?Y.slice(0,j1):Y,Q?IX:"");else J[Z]=Y}}return H}}var EX=_(PX);class wX extends N{constructor(X){super(X);if(X.type!==S.CHILD)throw Error("templateContent can only be used in child bindings")}render(X){if(this._previousTemplate===X)return H;return this._previousTemplate=X,document.importNode(X.content,!0)}}var RX=_(wX);var H1=1;class u extends N{constructor(X){super(X);if(this._value=O,X.type!==S.CHILD)throw Error(`${this.constructor.directiveName}() can only be used in child bindings`)}render(X){if(X===O||X==null)return this._templateResult=void 0,this._value=X;if(X===H)return X;if(typeof X!="string")throw Error(`${this.constructor.directiveName}() called with a non-string value`);if(X===this._value)return this._templateResult;this._value=X;let $=[X];return $.raw=$,this._templateResult={["_$litType$"]:this.constructor.resultType,strings:$,values:[]}}}u.directiveName="unsafeHTML";u.resultType=H1;var KX=_(u);var _1=2;class E0 extends u{}E0.directiveName="unsafeSVG";E0.resultType=_1;var fX=_(E0);var L1=3;class w0 extends u{}w0.directiveName="unsafeMath";w0.resultType=L1;var TX=_(w0);var CX=(X)=>{return!A0(X)&&typeof X.then==="function"},hX=1073741823;class gX extends v{constructor(){super(...arguments);this.__lastRenderedIndex=hX,this.__values=[],this.__weakThis=new O0(this),this.__pauser=new j0}render(...X){return X.find(($)=>!CX($))??H}update(X,$){let J=this.__values,Z=J.length;this.__values=$;let Y=this.__weakThis,Q=this.__pauser;if(!this.isConnected)this.disconnected();for(let z=0;z<$.length;z++){if(z>this.__lastRenderedIndex)break;let q=$[z];if(!CX(q))return this.__lastRenderedIndex=z,q;if(z<Z&&q===J[z])continue;this.__lastRenderedIndex=hX,Z=0,Promise.resolve(q).then(async(G)=>{while(Q.get())await Q.get();let B=Y.deref();if(B!==void 0){let F=B.__values.indexOf(q);if(F>-1&&F<B.__lastRenderedIndex)B.__lastRenderedIndex=F,B.setValue(G)}})}return H}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var vX=_(gX);function yX(X,$,J){return X?$(X):J?.(X)}if(typeof window==="object")window.Pandora=$2;
27
+ `+X;else Z=X,J._sharedStyle={},this._style={};return J._styleSheet.replaceSync(Z),this._shadowDOM.adoptedStyleSheets=[J._styleSheet],J._sharedStyle}_applyLitRender(X){K(X,this._shadowDOM,{host:this})}_resetRenderRoot(){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();delete this._shadowDOM._$litPart$}_applyStringRender(X){while(this._shadowDOM.firstChild)this._shadowDOM.firstChild.remove();if(X==="")return;let $=document.createElement("template");$.innerHTML=X,this._shadowDOM.appendChild($.content)}get shadowRoot(){return this._shadowDOM}set shadowRoot(X){throw Error("ShadowComponent shadowRoot can not be overwritten.")}query(X){return this._shadowDOM.querySelector(X)}queryAll(X){return this._shadowDOM.querySelectorAll(X)}}var k2=L2;var N2=Symbol("pandora:appliedImpl");class F0{static _debug=!1;static components={};static implementations={};static state={};static subscribers={};static mountCallbacks=new Set;static unmountCallbacks=new Set;static errorCallbacks=new Set;static aliases={};static lazyLoaders={};static lazyLoadPromises={};static middleware={render:new Set};static _initialized=!1;static _init(){if(this._initialized)return;this._initialized=!0,b._onMount=(X,$)=>this._notifyMount(X,$),b._onUnmount=(X,$)=>this._notifyUnmount(X,$),b._onError=(X,$,J,Z)=>this._notifyError(X,$,J,Z),b._applyMiddleware=(X,$,J,Z)=>this._applyMiddleware(X,$,J,Z),b._hasMiddleware=(X)=>this._hasMiddleware(X),b._subscribe=(X,$)=>this.subscribe(X,$),b._getGlobalState=(X)=>this.getState(X),b._applyCurrentImplementation=(X,$)=>{let J=this.implementations[$];if(!J)return;let Q=X[N2]??X.constructor;if(J===Q)return;this._applyImplementation(X,J,!1)}}static register(X,$){if(this._init(),typeof this.components[X]>"u")this.components[X]=$,this.implementations[X]=$,$.tag=X,window.customElements.define(X,$),this.components[X]._registered=!0,this.log(`Registered: <${X}>`);else throw Error("A component with this tag has already been registered. Use the evolve() function to modify the component.")}static define(X,$){this.register(X,$)}static getImplementation(X){return this.implementations[X]||this.components[X]}static _applyImplementation(X,$,J=!1){let Z=$.prototype,Y=Object.getOwnPropertyNames(Z),Q=X;X[N2]=$;for(let z of Y){if(z==="constructor")continue;let q=Object.getOwnPropertyDescriptor(Z,z);if(!q)continue;if(typeof q.value==="function")Q[z]=q.value.bind(X);else if(q.get||q.set)Object.defineProperty(Object.getPrototypeOf(X),z,q)}try{let z=customElements.get(X.localName)??X.constructor??$,q=Reflect.construct($,[],z);for(let G of Object.keys(q))if(!(G in Q)||Q[G]===void 0)Q[G]=q[G]}catch(z){console.warn(`[Pandora] Could not construct temp instance of <${$.tag}> for default extraction:`,z)}if(typeof Symbol.metadata<"u"){let z=$[Symbol.metadata];if(z){let q=X.constructor;q[Symbol.metadata]=z}}if(typeof Symbol.metadata<"u"){let q=$[Symbol.metadata]?.[i];if(q?.length){let G=Q[s];if(G)for(let B of G)B();Q[s]=[];for(let B of q)B(X)}}X._detachListeners()}static evolve(X,$,J=!1){if(typeof this.components[X]>"u")throw Error("No component with this tag has been registered. Cannot Evolve.");this.implementations[X]=$,$._registered=!0;let Z=[];for(let[Y,Q]of Object.entries(this.aliases))if(Q===X)Z.push(Y),this.implementations[Y]=$;if(this.log(`Evolved: <${X}>`),J){let Y=[X,...Z];for(let Q of Y)document.querySelectorAll(Q).forEach((z)=>{if(z instanceof b&&z.isReady)this._applyImplementation(z,$,!0),z.forceRender()})}}static instances(X,$){if(typeof this.components[X]>"u")throw Error("No component with the provided tag has been registered.");if(typeof $==="function")document.querySelectorAll(X).forEach($);else return document.querySelectorAll(X)}static instantiate(X,$){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);if(!this.components[X]._registered)this.register(X,this.components[X]);let J=document.createElement(this.components[X].tag);for(let[Z,Y]of Object.entries($)){if(Y===void 0||Y===null)continue;if(J[Z]=Y,Object.getOwnPropertyDescriptor(J,Z)?.set!==void 0)continue;if(typeof Y==="boolean"){if(Y)J.setAttribute(Z,"")}else if(typeof Y==="string"||typeof Y==="number")J.setAttribute(Z,String(Y))}return J}static has(X){return typeof this.components[X]<"u"}static get(X){return this.components[X]}static setState(X,$){let J=this.state[X];if(this.state[X]=$,this.subscribers[X])this.subscribers[X].forEach((Z)=>{Z($,J)})}static getState(X){return this.state[X]}static hasState(X){return X in this.state}static deleteState(X){if(X in this.state){let $=this.state[X];if(delete this.state[X],this.subscribers[X])this.subscribers[X].forEach((J)=>{J(void 0,$)});return!0}return!1}static subscribe(X,$){if(!this.subscribers[X])this.subscribers[X]=new Set;return this.subscribers[X].add($),()=>{this.unsubscribe(X,$)}}static unsubscribe(X,$){if(this.subscribers[X])this.subscribers[X].delete($)}static getAllState(){return{...this.state}}static clearState(){let X=Object.keys(this.state);for(let $ of X)this.deleteState($)}static clearSubscriptions(){for(let X of Object.keys(this.subscribers))this.subscribers[X]=new Set}static clearMiddleware(){for(let X of Object.keys(this.middleware))this.middleware[X]=new Set}static get debug(){return this._debug}static set debug(X){this._debug=X}static log(X,$){if(this._debug)if($!==void 0)console.log(`[Pandora] ${X}`,$);else console.log(`[Pandora] ${X}`)}static list(){return Object.keys(this.components)}static stats(X){if(X){if(!this.has(X))throw Error(`No component with tag "${X}" has been registered.`);return{tag:X,instanceCount:document.querySelectorAll(X).length,isRegistered:this.components[X]?._registered??!1,isLazy:X in this.lazyLoaders}}return this.list().map(($)=>({tag:$,instanceCount:document.querySelectorAll($).length,isRegistered:this.components[$]?._registered??!1,isLazy:$ in this.lazyLoaders}))}static onMount(X){return this._init(),this.mountCallbacks.add(X),()=>this.mountCallbacks.delete(X)}static onUnmount(X){return this._init(),this.unmountCallbacks.add(X),()=>this.unmountCallbacks.delete(X)}static _notifyMount(X,$){this.log(`Mounted: <${$}>`),this.mountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onMount callback:",Z)}})}static _notifyUnmount(X,$){this.log(`Unmounted: <${$}>`),this.unmountCallbacks.forEach((J)=>{try{J(X,$)}catch(Z){console.error("[Pandora] Error in onUnmount callback:",Z)}})}static onError(X){return this._init(),this.errorCallbacks.add(X),()=>this.errorCallbacks.delete(X)}static _notifyError(X,$,J,Z){if(this.log(`Error in <${J}> during ${Z}:`,X),this.errorCallbacks.size===0)throw X;this.errorCallbacks.forEach((Y)=>{try{Y(X,$,J,Z)}catch(Q){console.error("[Pandora] Error in onError callback:",Q)}})}static alias(X,$){if(!this.has($))throw Error(`Cannot create alias: no component with tag "${$}" has been registered.`);if(this.has(X))throw Error(`Cannot create alias: a component with tag "${X}" already exists.`);this.aliases[X]=$;let J=this.getImplementation($)??this.components[$],Z=class extends J{static _tag=X};this.components[X]=Z,this.implementations[X]=Z,window.customElements.define(X,Z),Z._registered=!0,this.log(`Created alias: <${X}> -> <${$}>`)}static getOriginalTag(X){return this.aliases[X]}static isAlias(X){return X in this.aliases}static lazy(X,$){if(this._init(),this.has(X))throw Error(`Cannot register lazy component: a component with tag "${X}" already exists.`);this.lazyLoaders[X]=$;let J=F0;class Z extends b{static _tag=X;_lazyLoaded=!1;async connectedCallback(){await J._loadLazyComponent(X);let Y=J.getImplementation(X);if(Y&&Y!==Z)F0._applyImplementation(this,Y,!1),this._lazyLoaded=!0;await super.connectedCallback()}}this.components[X]=Z,window.customElements.define(X,Z),this.log(`Registered lazy component: <${X}>`)}static async _loadLazyComponent(X){if(this.lazyLoadPromises[X])return this.lazyLoadPromises[X];if(!(X in this.lazyLoaders))return;let $=this.lazyLoaders[X];return this.log(`Loading lazy component: <${X}>`),this.lazyLoadPromises[X]=(async()=>{try{let J=await $(),Z="default"in J?J.default:J;delete this.lazyLoaders[X],this.implementations[X]=Z,Z._registered=!0,this.log(`Loaded lazy component: <${X}>`)}catch(J){throw console.error(`[Pandora] Failed to load lazy component <${X}>:`,J),J}finally{delete this.lazyLoadPromises[X]}})(),this.lazyLoadPromises[X]}static isLazy(X){return X in this.lazyLoaders}static async preload(X){if(this.isLazy(X))await this._loadLazyComponent(X)}static use(X,$){return this._init(),this.middleware[X].add($),()=>this.middleware[X].delete($)}static _applyMiddleware(X,$,J,Z){let Y=J;return this.middleware[X].forEach((Q)=>{try{Y=Q($,Y,Z)}catch(z){console.error(`[Pandora] Error in ${X} middleware:`,z)}}),Y}static _hasMiddleware(X){return this.middleware[X].size>0}}b._registryRegister=(X,$)=>F0.register(X,$);var A=F0;Symbol.metadata??=Symbol("Symbol.metadata");function P2(X,$){return function(J,Z){let Y=Z.metadata;if(Y?.[I]){if(!Object.hasOwn(J,"_observedAttributes"))J._observedAttributes=[];for(let Q of Y[I])if(!J._observedAttributes.includes(Q))J._observedAttributes.push(Q)}if(Y&&J[Symbol.metadata]===void 0)J[Symbol.metadata]=Y;if(J.tag=X,!$?.defer)A.register(X,J);return J}}function w2(X){return function($,J){let Z=J.metadata;return Z[B0]=X,$}}function E2(X){return function($,J){let Z=String(J.name),Y=J.metadata;if(!Object.hasOwn(Y,D)){let z=Y[D];Y[D]=z?[...z]:[]}Y[D].push({property:X,methodName:Z});let Q=!1;J.addInitializer(function(){if(Q)return;Q=!0;let z=Y[V];if(!z||!z.has(X)){let q=this?.constructor?.name??"<anonymous>";console.warn(`[Pandora] @Watch('${X}') on ${q}.${Z}(): '${X}' has no @State, @Attribute, or @Property decorator. Add one of those decorators to '${X}', or call reactive(this, '${X}') in the constructor — otherwise the watcher will never fire.`)}})}}function R2(X,$){if(typeof Symbol.metadata>"u")return[];let Z=X.constructor[Symbol.metadata]?.[D];if(!Z)return[];let Y=[];for(let Q of Z)if(Q.property===$){let z=X[Q.methodName];if(typeof z==="function")Y.push(z.bind(X))}return Y}var Z1=new Set(["hidden","title","slot","style","id","className","tabIndex","dir","lang","draggable","contentEditable","accessKey","innerHTML","outerHTML","textContent","innerText"]);function t0(X,$){if(Z1.has($))console.warn(`[Pandora] @${X}('${$}') conflicts with HTMLElement.${$}. This may cause unexpected behavior. Consider renaming to avoid the conflict.`)}function K2(X){return function($,J){let Z=String(J.name);t0("State",Z);let Y=X?.render!==!1,Q=Symbol(`__pandora_state_${Z}`),z,q=!1,G=J.metadata;if(!Object.hasOwn(G,V)){let B=G[V];G[V]=B?new Set(B):new Set}G[V].add(Z),x(G,(B)=>{if(D0(B,Z,Q,Y),q&&B[Q]===void 0)B[Q]=z}),J.addInitializer(function(){let B=this,F=B[Z];if(D0(B,Z,Q,Y),F!==void 0){if(B[Q]=F,!q)z=F,q=!0}})}}function D0(X,$,J,Z,Y="state",Q=(z,q)=>z===q){C2(X,$,J),Object.defineProperty(X,$,{get(){return X[J]},set(z){let q=X[J];if(Q(q,z))return;if(X[J]=z,X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===$);if(F){if(F.newValue=z,Z)F.shouldRender=!0}else B.push({property:$,oldValue:q,newValue:z,shouldRender:Z,source:Y});return}let G=R2(X,$);for(let B of G)B(z,q);if(X.didChange($,q,z,Y),Z&&X._initRenderDone&&X.isConnected)X._queueRender()},enumerable:!0,configurable:!0}),r(X,()=>{delete X[$]})}function f2(X){return function($,J){let Z=String(J.name);t0("Property",Z);let Y=Symbol(`__pandora_property_${Z}`),Q=X?.equals??((F,W)=>F===W),z=X?.attribute??!1,q,G=!1,B=J.metadata;if(!Object.hasOwn(B,V)){let F=B[V];B[V]=F?new Set(F):new Set}if(B[V].add(Z),z!==!1){let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(B,I)){let W=B[I];B[I]=W?[...W]:[]}if(!B[I].includes(z))B[I].push(z);h2(B,{attrName:z,propertyKey:Z,valueKey:Y,settingKey:F,shouldRender:!1,equals:Q}),x(B,(W)=>{if(b0(W,z,Z,Y,F,!1,Q),G&&W[Y]===void 0)if(W.hasAttribute(z))W[Y]=C(W.getAttribute(z));else W[Y]=q,V0(W,z,q)}),J.addInitializer(function(){let W=this,M=W[Z],U=W.hasAttribute(z),S=U?C(W.getAttribute(z)):void 0;if(b0(W,z,Z,Y,F,!1,Q),M!==void 0&&!G)q=M,G=!0;if(U)W[Y]=S;else if(M!==void 0)W[Y]=M,V0(W,z,M)})}else x(B,(F)=>{if(D0(F,Z,Y,!1,"property",Q),G&&F[Y]===void 0)F[Y]=q}),J.addInitializer(function(){let F=this,W=F[Z];if(D0(F,Z,Y,!1,"property",Q),W!==void 0){if(F[Y]=W,!G)q=W,G=!0}})}}function T2(X){return function($,J){let Z=String(J.name);t0("Attribute",Z);let Y,Q=!0;if(typeof X==="object")Y=Z,Q=X.render!==!1;else Y=X??Z;let z=Symbol(`__pandora_attr_${Z}`),q=J.metadata;if(!Object.hasOwn(q,V)){let F=q[V];q[V]=F?new Set(F):new Set}q[V].add(Z);let G,B=!1;{let F=Symbol(`__pandora_propSetting_${Z}`);if(!Object.hasOwn(q,I)){let W=q[I];q[I]=W?[...W]:[]}if(!q[I].includes(Y))q[I].push(Y);h2(q,{attrName:Y,propertyKey:Z,valueKey:z,settingKey:F,shouldRender:Q,equals:(W,M)=>W===M}),x(q,(W)=>{if(b0(W,Y,Z,z,F,Q),B&&W[z]===void 0)if(W.hasAttribute(Y))W[z]=C(W.getAttribute(Y));else W[z]=G,V0(W,Y,G)}),J.addInitializer(function(){let W=this,M=W[Z],U=W.hasAttribute(Y),S=U?C(W.getAttribute(Y)):void 0;if(b0(W,Y,Z,z,F,Q),M!==void 0&&!B)G=M,B=!0;if(U)W[z]=S;else if(M!==void 0)W[z]=M,V0(W,Y,M)})}}}function C2(X,$,J){let Z=Object.getOwnPropertyDescriptor(X,$);if(Z&&"value"in Z&&Z.value!==void 0&&X[J]===void 0)X[J]=Z.value}function h2(X,$){if(!Object.hasOwn(X,d)){let J=X[d];X[d]=J?[...J]:[]}X[d].push($)}function V0(X,$,J){if(typeof J==="boolean")if(J)X.setAttribute($,"");else X.removeAttribute($);else if(typeof J==="string"||typeof J==="number")X.setAttribute($,String(J))}function b0(X,$,J,Z,Y,Q=!0,z=(q,G)=>q===G){if(C2(X,J,Z),Object.defineProperty(X,J,{get(){if(X[Z]!==void 0)return X[Z];if(X.hasAttribute($))return C(X.getAttribute($));return},set(q){let G=X[Z];if(X[Z]=q,X[Y]=!0,q===void 0||q===null)X.removeAttribute($);else if(typeof q==="string"||typeof q==="number"||typeof q==="boolean")if(typeof q==="boolean")if(q)X.setAttribute($,"");else X.removeAttribute($);else X.setAttribute($,String(q));if(X[Y]=!1,!z(G,q))if(X._batching){let B=X._batchedChanges,F=B.find((W)=>W.property===J);if(F){if(F.newValue=q,Q)F.shouldRender=!0}else B.push({property:J,oldValue:G,newValue:q,shouldRender:Q,source:"prop"})}else{let B=R2(X,J);for(let F of B)F(q,G);if(X.didChange(J,G,q,"prop"),Q&&X._initRenderDone&&X.isConnected)X._queueRender()}},enumerable:!0,configurable:!0}),X.isConnected&&X.hasAttribute($))X[Z]=C(X.getAttribute($));r(X,()=>{delete X[J]})}function g2(X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_unsub_${Z}`),Q=Symbol(`__pandora_value_${Z}`),z=J.metadata;if(!Object.hasOwn(z,V)){let q=z[V];z[V]=q?new Set(q):new Set}if(z[V].add(Z),!Object.hasOwn(z,g)){let q=z[g];z[g]=q?[...q]:[]}z[g].push({stateKey:X,propertyKey:Z,unsubKey:Y,valueKey:Q}),x(z,(q)=>{D2(q,X,Z,Y,Q)}),J.addInitializer(function(){D2(this,X,Z,Y,Q)})}}function D2(X,$,J,Z,Y){if(Object.defineProperty(X,J,{get(){return X[Y]},set(Q){let z=X[Y];if(z===Q)return;if(X[Y]=Q,A.setState($,Q),X.didChange(J,z,Q,"consumer"),X.isReady)X._queueRender()},enumerable:!0,configurable:!0}),X.isConnected)b._activateSubscription?.(X,{stateKey:$,propertyKey:J,unsubKey:Z,valueKey:Y});r(X,()=>{if(X[Z])X[Z](),X[Z]=void 0;delete X[J]})}function v2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{V2(Q,Z,X)}),J.addInitializer(function(){V2(this,Z,X)})}}function y2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{b2(Q,Z,X)}),J.addInitializer(function(){b2(this,Z,X)})}}function V2(X,$,J){Object.defineProperty(X,$,{get(){return X.query(J)},enumerable:!0,configurable:!0})}function b2(X,$,J){Object.defineProperty(X,$,{get(){return X.queryAll(J)},enumerable:!0,configurable:!0})}function m2(X){return function($,J){let Z=String(J.name),Y=X?`slot[name="${X}"]`:"slot:not([name])",Q=J.metadata;x(Q,(z)=>{A2(z,Z,Y)}),J.addInitializer(function(){A2(this,Z,Y)})}}function A2(X,$,J){Object.defineProperty(X,$,{get(){return(X._shadowDOM||X.shadowRoot)?.querySelector(J)??null},enumerable:!0,configurable:!0})}function d2(X,$){return function(J,Z){let Y=String(Z.name),Q=Z.metadata;if(!Object.hasOwn(Q,m)){let z=Q[m];Q[m]=z?[...z]:[]}Q[m].push({event:X,methodName:Y,options:$})}}function u2(...X){return function($,J){let Z=String(J.name),Y=Symbol(`__pandora_computed_cache_${Z}`),Q=Symbol(`__pandora_computed_valid_${Z}`),z=J.metadata;for(let G of X){if(!Object.hasOwn(z,D)){let B=z[D];z[D]=B?[...B]:[]}z[D].push({property:G,methodName:`__invalidate_${Z}`})}let q=$;return x(z,(G)=>{I2(G,Z,Y,Q,q)}),J.addInitializer(function(){I2(this,Z,Y,Q,q)}),$}}function I2(X,$,J,Z,Y){X[`__invalidate_${$}`]=()=>{X[Z]=!1},Object.defineProperty(X,$,{get(){if(!X[Z])X[J]=Y.call(X),X[Z]=!0;return X[J]},enumerable:!0,configurable:!0})}function p2(X){return function($,J){let Z=J.metadata,Y=[],Q=[];for(let[q,G]of Object.entries(X))if(typeof G==="string"){if(Y.push({className:q,propertyName:G}),!Object.hasOwn(Z,D)){let F=Z[D];Z[D]=F?[...F]:[]}let B=`__classlist_${q}_${G}`;Z[D].push({property:G,methodName:B}),$.prototype[B]=function(){this.classList.toggle(q,!!this[G])}}else Q.push({className:q,conditionFn:G});if(Q.length>0){let q=$.prototype.didChange;$.prototype.didChange=function(G,B,F,W){q?.call(this,G,B,F,W);for(let{className:M,conditionFn:U}of Q)this.classList.toggle(M,U(this))}}let z=$.prototype.connectedCallback;return $.prototype.connectedCallback=async function(){await z?.call(this);for(let{className:q,propertyName:G}of Y)this.classList.toggle(q,!!this[G]);for(let{className:q,conditionFn:G}of Q)this.classList.toggle(q,G(this))},$}}function c2(X){return function($,J){let Z=String(J.name),Y=J.metadata;x(Y,(Q)=>{x2(Q,Z,X)}),J.addInitializer(function(){x2(this,Z,X)})}}function x2(X,$,J){Object.defineProperty(X,$,{value:(Z)=>{return X.emit(J,Z)},writable:!1,enumerable:!0,configurable:!0})}function o2(X,$){if($!==void 0&&!A.hasState(X))A.setState(X,$);return{key:X,get(){return A.getState(X)},set(J){A.setState(X,J)},subscribe(J){return A.subscribe(X,J)},has(){return A.hasState(X)},delete(){A.deleteState(X)}}}var e0={};K0(e0,{whenReady:()=>l2,resetRegistry:()=>Q1,mount:()=>z1,flush:()=>Y1});async function Y1(){await new Promise((X)=>queueMicrotask(X)),await new Promise((X)=>queueMicrotask(X))}function l2(X,$=5000){let J=X;if(J.isReady)return Promise.resolve();return new Promise((Z,Y)=>{let Q=()=>{clearTimeout(q),clearInterval(G),X.removeEventListener("pandora:ready",z)},z=()=>{if(J.isReady)Q(),Z()},q=setTimeout(()=>{Q(),Y(Error(`Component <${X.tagName.toLowerCase()}> did not become ready within ${$}ms`))},$);X.addEventListener("pandora:ready",z);let G=setInterval(z,16)})}function Q1(){A.clearState(),A.clearSubscriptions(),A.clearMiddleware()}async function z1(X,$,J){let Z=$??document.body,Y=document.createElement("div");Y.innerHTML=`<${X}>${J??""}</${X}>`;let Q=Y.firstElementChild;return Z.appendChild(Q),await l2(Q),Q}var i2={};var k={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},_=(X)=>(...$)=>({["_$litDirective$"]:X,values:$});class N{constructor(X){}get _$isConnected(){return this._$parent._$isConnected}_$initialize(X,$,J){this.__part=X,this._$parent=$,this.__attributeIndex=J}_$resolve(X,$){return this.update(X,$)}update(X,$){return this.render(...$)}}var{_ChildPart:q1}=_2,G1=!0,X0=G1&&window.ShadyDOM?.inUse&&window.ShadyDOM?.noPatch===!0?window.ShadyDOM.wrap:(X)=>X,A0=(X)=>X===null||typeof X!="object"&&typeof X!="function",r2={HTML:1,SVG:2,MATHML:3},U0=(X,$)=>$===void 0?X?._$litType$!==void 0:X?._$litType$===$,I0=(X)=>{return X?._$litType$?.h!=null},n2=(X)=>X?._$litDirective$!==void 0,a2=(X)=>X?._$litDirective$,$0=(X)=>X.strings===void 0,s2=()=>document.createComment(""),w=(X,$,J)=>{let Z=X0(X._$startNode).parentNode,Y=$===void 0?X._$endNode:$._$startNode;if(J===void 0){let Q=X0(Z).insertBefore(s2(),Y),z=X0(Z).insertBefore(s2(),Y);J=new q1(Q,z,X,X.options)}else{let Q=X0(J._$endNode).nextSibling,z=J._$parent,q=z!==X;if(q){J._$reparentDisconnectables?.(X),J._$parent=X;let G;if(J._$notifyConnectionChanged!==void 0&&(G=X._$isConnected)!==z._$isConnected)J._$notifyConnectionChanged(G)}if(Q!==Y||q){let G=J._$startNode;while(G!==Q){let B=X0(G).nextSibling;X0(Z).insertBefore(G,Y),G=B}}}return J},E=(X,$,J=X)=>{return X._$setValue($,J),X},W1={},f=(X,$=W1)=>X._$committedValue=$,n=(X)=>X._$committedValue,J0=(X)=>{X._$clear(),X._$startNode.remove()},Z0=(X)=>{X._$clear()};var B1=!0,M0=(X,$)=>{let J=X._$disconnectableChildren;if(J===void 0)return!1;for(let Z of J)Z._$notifyDirectiveConnectionChanged?.($,!1),M0(Z,$);return!0},x0=(X)=>{let $,J;do{if(($=X._$parent)===void 0)break;J=$._$disconnectableChildren,J.delete(X),X=$}while(J?.size===0)},t2=(X)=>{for(let $;$=X._$parent;X=$){let J=$._$disconnectableChildren;if(J===void 0)$._$disconnectableChildren=J=new Set;else if(J.has(X))break;J.add(X),M1($)}};function F1(X){if(this._$disconnectableChildren!==void 0)x0(this),this._$parent=X,t2(this);else this._$parent=X}function U1(X,$=!1,J=0){let Z=this._$committedValue,Y=this._$disconnectableChildren;if(Y===void 0||Y.size===0)return;if($){if(Array.isArray(Z))for(let Q=J;Q<Z.length;Q++)M0(Z[Q],!1),x0(Z[Q]);else if(Z!=null)M0(Z,!1),x0(Z)}else M0(this,X)}var M1=(X)=>{if(X.type==k.CHILD)X._$notifyConnectionChanged??=U1,X._$reparentDisconnectables??=F1};class v extends N{constructor(){super(...arguments);this._$disconnectableChildren=void 0}_$initialize(X,$,J){super._$initialize(X,$,J),t2(this),this.isConnected=X._$isConnected}["_$notifyDirectiveConnectionChanged"](X,$=!0){if(X!==this.isConnected)if(this.isConnected=X,X)this.reconnected?.();else this.disconnected?.();if($)M0(this,X),x0(this)}setValue(X){if($0(this.__part))this.__part._$setValue(X,this);else{if(B1&&this.__attributeIndex===void 0)throw Error("Expected this.__attributeIndex to be a number");let $=[...this.__part._$committedValue];$[this.__attributeIndex]=X,this.__part._$setValue($,this,0)}}disconnected(){}reconnected(){}}var e2=async(X,$)=>{for await(let J of X)if(await $(J)===!1)return};class O0{constructor(X){this._ref=X}disconnect(){this._ref=void 0}reconnect(X){this._ref=X}deref(){return this._ref}}class j0{constructor(){this._promise=void 0,this._resolve=void 0}get(){return this._promise}pause(){this._promise??=new Promise((X)=>this._resolve=X)}resume(){this._resolve?.(),this._promise=this._resolve=void 0}}class P0 extends v{constructor(){super(...arguments);this.__weakThis=new O0(this),this.__pauser=new j0}render(X,$){return H}update(X,[$,J]){if(!this.isConnected)this.disconnected();if($===this.__value)return H;this.__value=$;let Z=0,{__weakThis:Y,__pauser:Q}=this;return e2($,async(z)=>{while(Q.get())await Q.get();let q=Y.deref();if(q!==void 0){if(q.__value!==$)return!1;if(J!==void 0)z=J(z,Z);q.commitValue(z,Z),Z++}return!0}),H}commitValue(X,$){this.setValue(X)}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var XX=_(P0);class $X extends P0{constructor(X){super(X);if(X.type!==k.CHILD)throw Error("asyncAppend can only be used in child expressions")}update(X,$){return this.__childPart=X,super.update(X,$)}commitValue(X,$){if($===0)Z0(this.__childPart);let J=w(this.__childPart);E(J,X)}}var JX=_($X);var ZX=(X)=>I0(X)?X._$litType$.h:X.strings;class YX extends N{constructor(X){super(X);this._templateCache=new WeakMap}render(X){return[X]}update(X,[$]){let J=U0(this._value)?ZX(this._value):null,Z=U0($)?ZX($):null;if(J!==null&&(Z===null||J!==Z)){let Q=n(X).pop(),z=this._templateCache.get(J);if(z===void 0){let q=document.createDocumentFragment();z=K(O,q),z.setConnected(!1),this._templateCache.set(J,z)}f(z,[Q]),w(z,void 0,Q)}if(Z!==null){if(J===null||J!==Z){let Y=this._templateCache.get(Z);if(Y!==void 0){let z=n(Y).pop();Z0(X),w(X,void 0,z),f(X,[z])}}this._value=$}else this._value=void 0;return this.render($)}}var QX=_(YX);var zX=(X,$,J)=>{for(let Z of $)if(Z[0]===X){let Q=Z[1];return Q()}return J?.()};class qX extends N{constructor(X){super(X);if(X.type!==k.ATTRIBUTE||X.name!=="class"||X.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(X){return" "+Object.keys(X).filter(($)=>X[$]).join(" ")+" "}update(X,[$]){if(this._previousClasses===void 0){if(this._previousClasses=new Set,X.strings!==void 0)this._staticClasses=new Set(X.strings.join(" ").split(/\s/).filter((Z)=>Z!==""));for(let Z in $)if($[Z]&&!this._staticClasses?.has(Z))this._previousClasses.add(Z);return this.render($)}let J=X.element.classList;for(let Z of this._previousClasses)if(!(Z in $))J.remove(Z),this._previousClasses.delete(Z);for(let Z in $){let Y=!!$[Z];if(Y!==this._previousClasses.has(Z)&&!this._staticClasses?.has(Z))if(Y)J.add(Z),this._previousClasses.add(Z);else J.remove(Z),this._previousClasses.delete(Z)}return H}}var GX=_(qX);var O1={};class WX extends N{constructor(){super(...arguments);this._previousValue=O1}render(X,$){return $()}update(X,[$,J]){if(Array.isArray($)){if(Array.isArray(this._previousValue)&&this._previousValue.length===$.length&&$.every((Y,Q)=>Y===this._previousValue[Q]))return H}else if(this._previousValue===$)return H;return this._previousValue=Array.isArray($)?Array.from($):$,this.render($,J)}}var BX=_(WX);var FX=(X)=>X??O;function*UX(X,$){let J=typeof $==="function";if(X!==void 0){let Z=-1;for(let Y of X){if(Z>-1)yield J?$(Z):$;Z++,yield Y}}}class MX extends N{constructor(){super(...arguments);this.key=O}render(X,$){return this.key=X,$}update(X,[$,J]){if($!==this.key)f(X),this.key=$;return J}}var OX=_(MX);class jX extends N{constructor(X){super(X);if(!(X.type===k.PROPERTY||X.type===k.ATTRIBUTE||X.type===k.BOOLEAN_ATTRIBUTE))throw Error("The `live` directive is not allowed on child or event bindings");if(!$0(X))throw Error("`live` bindings can only contain a single expression")}render(X){return X}update(X,[$]){if($===H||$===O)return $;let{element:J,name:Z}=X;if(X.type===k.PROPERTY){if($===J[Z])return H}else if(X.type===k.BOOLEAN_ATTRIBUTE){if(!!$===J.hasAttribute(Z))return H}else if(X.type===k.ATTRIBUTE){if(J.getAttribute(Z)===String($))return H}return f(X),$}}var HX=_(jX);function*_X(X,$){if(X!==void 0){let J=0;for(let Z of X)yield $(Z,J++)}}function*SX(X,$,J=1){let Z=$===void 0?0:X;$??=X;for(let Y=Z;J>0?Y<$:$<Y;Y+=J)yield Y}var LX=()=>new kX;class kX{}var X2=new WeakMap;class NX extends v{render(X){return O}update(X,[$]){let J=$!==this._ref;if(J&&this._ref!==void 0)this._updateRefValue(void 0);if(J||this._lastElementForRef!==this._element)this._ref=$,this._context=X.options?.host,this._updateRefValue(this._element=X.element);return O}_updateRefValue(X){if(!this.isConnected)X=void 0;if(typeof this._ref==="function"){let $=this._context??globalThis,J=X2.get($);if(J===void 0)J=new WeakMap,X2.set($,J);if(J.get(this._ref)!==void 0)this._ref.call(this._context,void 0);if(J.set(this._ref,X),X!==void 0)this._ref.call(this._context,X)}else this._ref.value=X}get _lastElementForRef(){return typeof this._ref==="function"?X2.get(this._context??globalThis)?.get(this._ref):this._ref?.value}disconnected(){if(this._lastElementForRef===this._element)this._updateRefValue(void 0)}reconnected(){this._updateRefValue(this._element)}}var DX=_(NX);var VX=(X,$,J)=>{let Z=new Map;for(let Y=$;Y<=J;Y++)Z.set(X[Y],Y);return Z};class bX extends N{constructor(X){super(X);if(X.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}_getValuesAndKeys(X,$,J){let Z;if(J===void 0)J=$;else if($!==void 0)Z=$;let Y=[],Q=[],z=0;for(let q of X)Y[z]=Z?Z(q,z):z,Q[z]=J(q,z),z++;return{values:Q,keys:Y}}render(X,$,J){return this._getValuesAndKeys(X,$,J).values}update(X,[$,J,Z]){let Y=n(X),{values:Q,keys:z}=this._getValuesAndKeys($,J,Z);if(!Array.isArray(Y))return this._itemKeys=z,Q;let q=this._itemKeys??=[],G=[],B,F,W=0,M=Y.length-1,U=0,S=Q.length-1;while(W<=M&&U<=S)if(Y[W]===null)W++;else if(Y[M]===null)M--;else if(q[W]===z[U])G[U]=E(Y[W],Q[U]),W++,U++;else if(q[M]===z[S])G[S]=E(Y[M],Q[S]),M--,S--;else if(q[W]===z[S])G[S]=E(Y[W],Q[S]),w(X,G[S+1],Y[W]),W++,S--;else if(q[M]===z[U])G[U]=E(Y[M],Q[U]),w(X,Y[W],Y[M]),M--,U++;else{if(B===void 0)B=VX(z,U,S),F=VX(q,W,M);if(!B.has(q[W]))J0(Y[W]),W++;else if(!B.has(q[M]))J0(Y[M]),M--;else{let h=F.get(z[U]),R0=h!==void 0?Y[h]:null;if(R0===null){let J2=w(X,Y[W]);E(J2,Q[U]),G[U]=J2}else G[U]=E(R0,Q[U]),w(X,Y[W],R0),Y[h]=null;U++}}while(U<=S){let h=w(X,G[S+1]);E(h,Q[U]),G[U++]=h}while(W<=M){let h=Y[W++];if(h!==null)J0(h)}return this._itemKeys=z,f(X,G),H}}var AX=_(bX);var IX="important",xX=" !"+IX,j1=0-xX.length;class PX extends N{constructor(X){super(X);if(X.type!==k.ATTRIBUTE||X.name!=="style"||X.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(X){return Object.keys(X).reduce(($,J)=>{let Z=X[J];if(Z==null)return $;return J=J.includes("-")?J:J.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase(),$+`${J}:${Z};`},"")}update(X,[$]){let{style:J}=X.element;if(this._previousStyleProperties===void 0)return this._previousStyleProperties=new Set(Object.keys($)),this.render($);for(let Z of this._previousStyleProperties)if($[Z]==null)if(this._previousStyleProperties.delete(Z),Z.includes("-"))J.removeProperty(Z);else J[Z]=null;for(let Z in $){let Y=$[Z];if(Y!=null){this._previousStyleProperties.add(Z);let Q=typeof Y==="string"&&Y.endsWith(xX);if(Z.includes("-")||Q)J.setProperty(Z,Q?Y.slice(0,j1):Y,Q?IX:"");else J[Z]=Y}}return H}}var wX=_(PX);class EX extends N{constructor(X){super(X);if(X.type!==k.CHILD)throw Error("templateContent can only be used in child bindings")}render(X){if(this._previousTemplate===X)return H;return this._previousTemplate=X,document.importNode(X.content,!0)}}var RX=_(EX);var H1=1;class u extends N{constructor(X){super(X);if(this._value=O,X.type!==k.CHILD)throw Error(`${this.constructor.directiveName}() can only be used in child bindings`)}render(X){if(X===O||X==null)return this._templateResult=void 0,this._value=X;if(X===H)return X;if(typeof X!="string")throw Error(`${this.constructor.directiveName}() called with a non-string value`);if(X===this._value)return this._templateResult;this._value=X;let $=[X];return $.raw=$,this._templateResult={["_$litType$"]:this.constructor.resultType,strings:$,values:[]}}}u.directiveName="unsafeHTML";u.resultType=H1;var KX=_(u);var _1=2;class w0 extends u{}w0.directiveName="unsafeSVG";w0.resultType=_1;var fX=_(w0);var S1=3;class E0 extends u{}E0.directiveName="unsafeMath";E0.resultType=S1;var TX=_(E0);var CX=(X)=>{return!A0(X)&&typeof X.then==="function"},hX=1073741823;class gX extends v{constructor(){super(...arguments);this.__lastRenderedIndex=hX,this.__values=[],this.__weakThis=new O0(this),this.__pauser=new j0}render(...X){return X.find(($)=>!CX($))??H}update(X,$){let J=this.__values,Z=J.length;this.__values=$;let Y=this.__weakThis,Q=this.__pauser;if(!this.isConnected)this.disconnected();for(let z=0;z<$.length;z++){if(z>this.__lastRenderedIndex)break;let q=$[z];if(!CX(q))return this.__lastRenderedIndex=z,q;if(z<Z&&q===J[z])continue;this.__lastRenderedIndex=hX,Z=0,Promise.resolve(q).then(async(G)=>{while(Q.get())await Q.get();let B=Y.deref();if(B!==void 0){let F=B.__values.indexOf(q);if(F>-1&&F<B.__lastRenderedIndex)B.__lastRenderedIndex=F,B.setValue(G)}})}return H}disconnected(){this.__weakThis.disconnect(),this.__pauser.pause()}reconnected(){this.__weakThis.reconnect(this),this.__pauser.resume()}}var vX=_(gX);function yX(X,$,J){return X?$(X):J?.(X)}if(typeof window==="object")window.Pandora=$2;
28
28
 
29
- //# debugId=8DCE45268A6AFE8964756E2164756E21
29
+ //# debugId=E279B458069099EA64756E2164756E21
30
30
  //# sourceMappingURL=pandora.browser.js.map