regor 1.4.1 → 1.4.2
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/dist/regor.es2015.cjs.js +23 -4
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +23 -4
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +23 -4
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +23 -4
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +23 -4
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +23 -4
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +23 -4
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +23 -4
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +23 -4
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
package/dist/regor.es2015.cjs.js
CHANGED
|
@@ -5774,6 +5774,23 @@ var tableDirectAllowed = /* @__PURE__ */ new Set([
|
|
|
5774
5774
|
"tfoot",
|
|
5775
5775
|
"tr"
|
|
5776
5776
|
]);
|
|
5777
|
+
var voidElements = /* @__PURE__ */ new Set([
|
|
5778
|
+
"area",
|
|
5779
|
+
"base",
|
|
5780
|
+
"br",
|
|
5781
|
+
"col",
|
|
5782
|
+
"embed",
|
|
5783
|
+
"hr",
|
|
5784
|
+
"img",
|
|
5785
|
+
"input",
|
|
5786
|
+
"link",
|
|
5787
|
+
"meta",
|
|
5788
|
+
"param",
|
|
5789
|
+
"source",
|
|
5790
|
+
"track",
|
|
5791
|
+
"wbr"
|
|
5792
|
+
]);
|
|
5793
|
+
var expandSelfClosingTag = (tagText, tagName) => `${tagText.slice(0, tagText.length - 2)}></${tagName}>`;
|
|
5777
5794
|
var preprocess = (template) => {
|
|
5778
5795
|
var _a;
|
|
5779
5796
|
let i = 0;
|
|
@@ -5843,15 +5860,17 @@ var preprocess = (template) => {
|
|
|
5843
5860
|
} else if ((parent == null ? void 0 : parent.effectiveTag) === "tr") {
|
|
5844
5861
|
replacementHost = tagName === "td" || tagName === "th" ? null : "td";
|
|
5845
5862
|
}
|
|
5863
|
+
const shouldExpandSelfClosing = selfClosing && !voidElements.has(replacementHost || tagName);
|
|
5846
5864
|
if (replacementHost) {
|
|
5847
5865
|
const isAlias = replacementHost === "trx" || replacementHost === "tdx" || replacementHost === "thx";
|
|
5866
|
+
const rewrittenTag = `${rawTag.slice(0, range.start)}${replacementHost} is="${isAlias ? `r-${tagName}` : `regor:${tagName}`}"${rawTag.slice(range.end)}`;
|
|
5848
5867
|
out.push(
|
|
5849
|
-
|
|
5868
|
+
shouldExpandSelfClosing ? expandSelfClosingTag(rewrittenTag, replacementHost) : rewrittenTag
|
|
5850
5869
|
);
|
|
5851
|
-
} else if (selfClosing && (parent == null ? void 0 : parent.effectiveTag) === "tr") {
|
|
5852
|
-
out.push(`${rawTag.slice(0, rawTag.length - 2)}></${tagName}>`);
|
|
5853
5870
|
} else {
|
|
5854
|
-
out.push(
|
|
5871
|
+
out.push(
|
|
5872
|
+
shouldExpandSelfClosing ? expandSelfClosingTag(rawTag, tagName) : rawTag
|
|
5873
|
+
);
|
|
5855
5874
|
}
|
|
5856
5875
|
if (!selfClosing) {
|
|
5857
5876
|
const effectiveTag = replacementHost === "trx" ? "tr" : replacementHost === "tdx" ? "td" : replacementHost === "thx" ? "th" : replacementHost || tagName;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var dt=Object.defineProperty,vr=Object.defineProperties,wr=Object.getOwnPropertyDescriptor,Sr=Object.getOwnPropertyDescriptors,Ar=Object.getOwnPropertyNames,zn=Object.getOwnPropertySymbols;var Kn=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable;var ht=Math.pow,cn=(n,e,t)=>e in n?dt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,yt=(n,e)=>{for(var t in e||(e={}))Kn.call(e,t)&&cn(n,t,e[t]);if(zn)for(var t of zn(e))Nr.call(e,t)&&cn(n,t,e[t]);return n},Wn=(n,e)=>vr(n,Sr(e));var Or=(n,e)=>{for(var t in e)dt(n,t,{get:e[t],enumerable:!0})},Mr=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ar(e))!Kn.call(n,r)&&r!==t&&dt(n,r,{get:()=>e[r],enumerable:!(o=wr(e,r))||o.enumerable});return n};var kr=n=>Mr(dt({},"__esModule",{value:!0}),n);var m=(n,e,t)=>cn(n,typeof e!="symbol"?e+"":e,t);var Gn=(n,e,t)=>new Promise((o,r)=>{var s=c=>{try{a(t.next(c))}catch(l){r(l)}},i=c=>{try{a(t.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((t=t.apply(n,e)).next())});var ai={};Or(ai,{ComponentHead:()=>We,ContextRegistry:()=>an,RegorConfig:()=>le,addUnbinder:()=>q,batch:()=>Rr,collectRefs:()=>Lt,computeMany:()=>yr,computeRef:()=>gr,computed:()=>hr,createApp:()=>pr,defineComponent:()=>mr,drainUnbind:()=>Qn,endBatch:()=>Fn,entangle:()=>Ye,flatten:()=>ae,getBindData:()=>Oe,html:()=>$n,isDeepRef:()=>He,isRaw:()=>Ze,isRef:()=>C,markRaw:()=>br,observe:()=>se,observeMany:()=>Cr,observerCount:()=>Er,onMounted:()=>dr,onUnmounted:()=>ne,pause:()=>Gt,persist:()=>Tr,raw:()=>xr,ref:()=>be,removeNode:()=>z,resume:()=>Jt,silence:()=>kt,sref:()=>ie,startBatch:()=>qn,toFragment:()=>$e,toJsonTemplate:()=>rt,trigger:()=>Y,unbind:()=>de,unref:()=>V,useScope:()=>Nt,warningHandler:()=>it,watchEffect:()=>Ve});module.exports=kr(ai);var ze=Symbol(":regor");var de=n=>{let e=[n];for(let t=0;t<e.length;++t){let o=e[t];Lr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Lr=n=>{let e=n[ze];if(!e)return;let t=e.unbinders;for(let o=0;o<t.length;++o)t[o]();t.length=0,n[ze]=void 0};var Ke=[],gt=!1,bt,Jn=()=>{if(gt=!1,bt=void 0,Ke.length!==0){for(let n=0;n<Ke.length;++n)de(Ke[n]);Ke.length=0}},z=n=>{n.remove(),Ke.push(n),gt||(gt=!0,bt=setTimeout(Jn,1))},Qn=()=>Gn(null,null,function*(){Ke.length===0&&!gt||(bt&&clearTimeout(bt),Jn())});var K=n=>typeof n=="function",W=n=>typeof n=="string",Xn=n=>typeof n=="undefined",fe=n=>n==null||typeof n=="undefined",X=n=>typeof n!="string"||!(n!=null&&n.trim()),Ir=Object.prototype.toString,un=n=>Ir.call(n),Ae=n=>un(n)==="[object Map]",ue=n=>un(n)==="[object Set]",ln=n=>un(n)==="[object Date]",st=n=>typeof n=="symbol",w=Array.isArray,I=n=>n!==null&&typeof n=="object";var Yn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:n=>`Component template cannot be found. selector: ${n} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:n=>`${n} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},j=(n,...e)=>{let t=Yn[n];return new Error(K(t)?t.call(Yn,...e):t)};var Tt=[],Zn=()=>{let n={onMounted:[],onUnmounted:[]};return Tt.push(n),n},Ue=n=>{let e=Tt[Tt.length-1];if(!e&&!n)throw j(2);return e},eo=n=>{let e=Ue();return n&&pn(n),Tt.pop(),e},fn=Symbol("csp"),pn=n=>{let e=n,t=e[fn];if(t){let o=Ue();if(t===o)return;o.onMounted.length>0&&t.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&t.onUnmounted.push(...o.onUnmounted);return}e[fn]=Ue()},xt=n=>n[fn];var Ne=n=>{var t,o;let e=(t=xt(n))==null?void 0:t.onUnmounted;e==null||e.forEach(r=>{r()}),(o=n.unmounted)==null||o.call(n)};var We=class{constructor(e,t,o,r,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"me");m(this,"emit",(e,t)=>{this.me.dispatchEvent(new CustomEvent(e,{detail:t}))});this.props=e,this.me=t,this.ctx=o,this.start=r,this.end=s}findContext(e,t=0){var r;if(t<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===t)return s;++o}}requireContext(e,t=0){let o=this.findContext(e,t);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${t}.`)}unmount(){let e=this.start.nextSibling,t=this.end;for(;e&&e!==t;)z(e),e=e.nextSibling;for(let o of this.ctx)Ne(o)}};var Oe=n=>{let e=n,t=e[ze];if(t)return t;let o={unbinders:[],data:{}};return e[ze]=o,o};var q=(n,e)=>{Oe(n).unbinders.push(e)};var to={8:n=>`Model binding requires a ref at ${n.outerHTML}`,7:n=>`Model binding is not supported on ${n.tagName} element at ${n.outerHTML}`,0:(n,e)=>`${n} binding expression is missing at ${e.outerHTML}`,1:(n,e,t)=>`invalid ${n} expression: ${e} at ${t.outerHTML}`,2:(n,e)=>`${n} requires object expression at ${e.outerHTML}`,3:(n,e)=>`${n} binder: key is empty on ${e.outerHTML}.`,4:(n,e,t,o)=>({msg:`Failed setting prop "${n}" on <${e.toLowerCase()}>: value ${t} is invalid.`,args:[o]}),5:(n,e)=>`${n} binding missing event type at ${e.outerHTML}`,6:(n,e)=>({msg:n,args:[e]})},H=(n,...e)=>{let t=to[n],o=K(t)?t.call(to,...e):t,r=it.warning;r&&(W(o)?r(o):r(o,...o.args))},it={warning:console.warn};var Et={},Ct={},no=1,oo=n=>{let e=(no++).toString();return Et[e]=n,Ct[e]=0,e},mn=n=>{Ct[n]+=1},dn=n=>{--Ct[n]===0&&(delete Et[n],delete Ct[n])},ro=n=>Et[n],hn=()=>no!==1&&Object.keys(Et).length>0,at="r-switch",Dr=n=>{let e=n.filter(o=>Be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(at))),t=new Set;return e.forEach(o=>{o.forEach(r=>r&&t.add(r))}),[...t]},Ge=(n,e)=>{if(!hn())return;let t=Dr(e);t.length!==0&&(t.forEach(mn),q(n,()=>{t.forEach(dn)}))};var Rt=()=>{},yn=(n,e,t,o)=>{let r=[];for(let s of n){let i=s.cloneNode(!0);t.insertBefore(i,o),r.push(i)}ke(e,r)},gn=Symbol("r-if"),so=Symbol("r-else"),io=n=>n[so]===1,vt=class{constructor(e){m(this,"i");m(this,"D");m(this,"K");m(this,"z");m(this,"W");m(this,"T");m(this,"R");this.i=e,this.D=e.o.p.if,this.K=Qe(e.o.p.if),this.z=e.o.p.else,this.W=e.o.p.elseif,this.T=e.o.p.for,this.R=e.o.p.pre}Ze(e,t){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(t))return!0;o=o.parentElement}return!1}N(e){let t=e.hasAttribute(this.D),o=Me(e,this.K);for(let r of o)this.b(r);return t}G(e){return e[gn]?!0:(e[gn]=!0,Me(e,this.K).forEach(t=>t[gn]=!0),!1)}b(e){if(e.hasAttribute(this.R)||this.G(e)||this.Ze(e,this.T))return;let t=e.getAttribute(this.D);if(!t){H(0,this.D,e);return}e.removeAttribute(this.D),this.O(e,t)}U(e,t,o){let r=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${t}${o!=null?o:""}`);s.insertBefore(i,e),Ge(i,r),r.forEach(c=>{z(c)}),e.remove(),t!=="if"&&(e[so]=1);let a=document.createComment(`__end__ :${t}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}de(e,t){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{yn(r,this.i,s,a)},unmount:()=>{Ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.i.m.M(r),u=l.value,f=this.de(o,t),p=Rt;return q(a,()=>{l.stop(),p(),p=Rt}),p=l.subscribe(t),[{mount:()=>{yn(s,this.i,i,c)},unmount:()=>{Ce(a,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}O(e,t){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${t} `),c=this.i.m.M(t),l=c.value,u=!1,f=this.i.m,p=f.k(),d=()=>{f.C(p,()=>{if(l()[0])u||(yn(r,this.i,s,a),u=!0),y.forEach(R=>{R.unmount(),R.isMounted=!1});else{Ce(i,a),u=!1;let R=!1;for(let E of y)!R&&E.isTrue()?(E.isMounted||(E.mount(),E.isMounted=!0),R=!0):(E.unmount(),E.isMounted=!1)}})},y=this.de(o,d),h=Rt;q(i,()=>{c.stop(),h(),h=Rt}),d(),h=c.subscribe(d)}};var Je=n=>{let e=ye(n)?n.content.childNodes:[n],t=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}t.push(r)}return t},ke=(n,e)=>{for(let t=0;t<e.length;++t){let o=e[t];o.nodeType===Node.ELEMENT_NODE&&(io(o)||n.H(o))}},Me=(n,e)=>{var o;let t=n.querySelectorAll(e);return(o=n.matches)!=null&&o.call(n,e)?[n,...t]:t},ye=n=>n instanceof HTMLTemplateElement,Be=n=>n.nodeType===Node.ELEMENT_NODE,ct=n=>n.nodeType===Node.ELEMENT_NODE,ao=n=>n instanceof HTMLSlotElement,Ee=n=>ye(n)?n.content.childNodes:n.childNodes,Ce=(n,e)=>{let t=n.nextSibling;for(;t!=null&&t!==e;){let o=t.nextSibling;z(t),t=o}},co=function(){return this()},Ur=function(n){return this(n)},Br=()=>{throw new Error("value is readonly.")},Pr={get:co,set:Ur,enumerable:!0,configurable:!1},Hr={get:co,set:Br,enumerable:!0,configurable:!1},Le=(n,e)=>{Object.defineProperty(n,"value",e?Hr:Pr)},uo=(n,e)=>{if(!n)return!1;if(n.startsWith("["))return n.substring(1,n.length-1);let t=e.length;return n.startsWith(e)?n.substring(t,n.length-t):!1},Qe=n=>`[${CSS.escape(n)}]`,wt=(n,e)=>(n.startsWith("@")&&(n=e.p.on+":"+n.slice(1)),n.includes("[")&&(n=n.replace(/[[\]]/g,e.p.dynamic)),n),bn=n=>{let e=Object.create(null);return t=>e[t]||(e[t]=n(t))},Vr=/-(\w)/g,$=bn(n=>n&&n.replace(Vr,(e,t)=>t?t.toUpperCase():"")),_r=/\B([A-Z])/g,Xe=bn(n=>n&&n.replace(_r,"-$1").toLowerCase()),ut=bn(n=>n&&n.charAt(0).toUpperCase()+n.slice(1));var St={mount:()=>{}};var At=n=>{var t,o;let e=(t=xt(n))==null?void 0:t.onMounted;e==null||e.forEach(r=>{r()}),(o=n.mounted)==null||o.call(n)};var Tn=Symbol("scope"),Nt=n=>{try{Zn();let e=n();pn(e);let t={context:e,unmount:()=>Ne(e),[Tn]:1};return t[Tn]=1,t}finally{eo()}},lo=n=>I(n)?Tn in n:!1;var Ot=Symbol("ref"),Z=Symbol("sref"),Mt=Symbol("raw");var C=n=>n!=null&&n[Z]===1;var xn={collectRefObj:!0,mount:({parseResult:n})=>({update:({values:e})=>{let t=n.context,o=e[0];if(I(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=t[s];a!==i&&(C(a)?a(i):t[s]=i)}}})};var ne=(n,e)=>{var t;(t=Ue(e))==null||t.onUnmounted.push(n)};var se=(n,e,t,o=!0)=>{if(!C(n))throw j(3,"observe");t&&e(n());let s=n(void 0,void 0,0,e);return o&&ne(s,!0),s};var Ye=(n,e)=>{if(n===e)return()=>{};let t=se(n,r=>e(r)),o=se(e,r=>n(r));return e(n()),()=>{t(),o()}};var Ze=n=>!!n&&n[Mt]===1;var He=n=>(n==null?void 0:n[Ot])===1;var pe=[],fo=n=>{var e;pe.length!==0&&((e=pe[pe.length-1])==null||e.add(n))},Ve=n=>{if(!n)return()=>{};let e={stop:()=>{}};return jr(n,e),ne(()=>e.stop(),!0),e.stop},jr=(n,e)=>{if(!n)return;let t=[],o=!1,r=()=>{for(let s of t)s();t=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),n(i=>t.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),Ve(n)});t.push(a)}}finally{pe.pop()}},kt=n=>{let e=pe.length,t=e>0&&pe[e-1];try{return t&&pe.push(null),n()}finally{t&&pe.pop()}},Lt=n=>{try{let e=new Set;return pe.push(e),{value:n(),refs:[...e]}}finally{pe.pop()}};var Y=(n,e,t)=>{if(!C(n))return;let o=n;if(o(void 0,e,1),!t)return;let r=o();if(r){if(w(r)||ue(r))for(let s of r)Y(s,e,!0);else if(Ae(r))for(let s of r)Y(s[0],e,!0),Y(s[1],e,!0);if(I(r))for(let s in r)Y(r[s],e,!0)}};function $r(n,e,t){Object.defineProperty(n,e,{value:t,enumerable:!1,writable:!0,configurable:!0})}var et=(n,e,t)=>{t.forEach(function(o){let r=n[o];$r(e,o,function(...i){let a=r.apply(this,i),c=this[Z];for(let l of c)Y(l);return a})})},It=(n,e)=>{Object.defineProperty(n,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var po=Array.prototype,Cn=Object.create(po),qr=["push","pop","shift","unshift","splice","sort","reverse"];et(po,Cn,qr);var mo=Map.prototype,Dt=Object.create(mo),Fr=["set","clear","delete"];It(Dt,"Map");et(mo,Dt,Fr);var ho=Set.prototype,Ut=Object.create(ho),zr=["add","clear","delete"];It(Ut,"Set");et(ho,Ut,zr);var ge={},ie=n=>{if(C(n)||Ze(n))return n;let e={auto:!0,_value:n},t=c=>I(c)?Z in c?!0:w(c)?(Object.setPrototypeOf(c,Cn),!0):ue(c)?(Object.setPrototypeOf(c,Ut),!0):Ae(c)?(Object.setPrototypeOf(c,Dt),!0):!1:!1,o=t(n),r=new Set,s=(c,l)=>{if(ge.stack&&ge.stack.length){ge.stack[ge.stack.length-1].add(a);return}r.size!==0&&kt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[Z];l||(c[Z]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||C(u)&&(u=u(),e._value===u)?u:(t(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(fo(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Z]=1,Le(a,!1),o&&i(n),a};var be=n=>{if(Ze(n))return n;let e;if(C(n)?(e=n,n=e()):e=ie(n),n instanceof Node||n instanceof Date||n instanceof RegExp||n instanceof Promise||n instanceof Error)return e;if(e[Ot]=1,w(n)){let t=n.length;for(let o=0;o<t;++o){let r=n[o];He(r)||(n[o]=be(r))}return e}if(!I(n))return e;for(let t of Object.entries(n)){let o=t[1];if(He(o))continue;let r=t[0];st(r)||(n[r]=null,n[r]=be(o))}return e};var yo=Symbol("modelBridge"),Bt=()=>{},Kr=n=>!!(n!=null&&n[yo]),Wr=n=>{n[yo]=1},Gr=n=>{let e=be(n());return Wr(e),e},go={collectRefObj:!0,mount:({parseResult:n,option:e})=>{if(typeof e!="string"||!e)return Bt;let t=$(e),o,r,s=Bt,i=()=>{s(),s=Bt,o=void 0,r=void 0},a=()=>{s(),s=Bt},c=(u,f)=>{o!==u&&(a(),s=Ye(u,f),o=u)},l=()=>{var d;let u=(d=n.refs[0])!=null?d:n.value()[0],f=n.context,p=f[t];if(!C(u)){if(r&&p===r){r(u);return}if(i(),C(p)){p(u);return}f[t]=u;return}if(Kr(u)){if(p===u)return;C(p)?c(u,p):f[t]=u;return}r||(r=Gr(u)),f[t]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Pt=class{constructor(e){m(this,"i");m(this,"ye");m(this,"he","");m(this,"ge",-1);this.i=e,this.ye=e.o.p.inherit}N(e){this.et(e)}tt(e){if(this.ge!==e.size){let t=[...e.keys()];this.he=[...t,...t.map(Xe)].join(","),this.ge=e.size}return this.he}nt(e){var t;for(let o=0;o<e.length;++o){let r=(t=e[o])==null?void 0:t.components;if(r)for(let s in r)return!0}return!1}et(e){var p;let t=this.i,o=t.m,r=t.o.be,s=t.o.j;if(r.size===0&&!this.nt(o.l))return;let i=o.J(),a=o.ot(),c=this.tt(r),l=[...c?[c]:[],...a,...a.map(Xe)].join(",");if(X(l))return;let u=e.querySelectorAll(l),f=(p=e.matches)!=null&&p.call(e,l)?[e,...u]:u;for(let d of f){if(d.hasAttribute(t.R))continue;let y=d.parentNode;if(!y)continue;let h=d.nextSibling,g=$(d.tagName).toUpperCase(),R=i[g],E=R!=null?R:s.get(g);if(!E)continue;let D=E.template;if(!D)continue;let G=d.parentElement;if(!G)continue;let M=new Comment(" begin component: "+d.tagName),_=new Comment(" end component: "+d.tagName);G.insertBefore(M,d),d.remove();let ce=t.o.p.context,ee=t.o.p.contextAlias,U=t.o.p.bind,b=(x,T)=>{let v={},F=x.hasAttribute(ce);return o.C(T,()=>{o.v(v),F?t.b(xn,x,ce):x.hasAttribute(ee)&&t.b(xn,x,ee);let B=E.props;if(!B||B.length===0)return;B=B.map($);let N=new Map(B.map(S=>[S.toLowerCase(),S]));for(let S of[...B,...B.map(Xe)]){let P=x.getAttribute(S);P!==null&&(v[$(S)]=P,x.removeAttribute(S))}let L=t._.xe(x,!1);for(let[S,P]of L.entries()){let[re,De]=P.Q;if(!De)continue;let Fe=N.get($(De).toLowerCase());Fe&&(re!=="."&&re!==":"&&re!==U||t.b(go,x,S,!0,Fe,P.X))}}),v},A=[...o.k()],J=()=>{var F;let x=b(d,A),T=new We(x,d,A,M,_),v=Nt(()=>{var B;return(B=E.context(T))!=null?B:{}}).context;if(T.autoProps){for(let[B,N]of Object.entries(x))if(B in v){let L=v[B];if(L===N)continue;if(C(L)){C(N)?T.entangle?q(M,Ye(N,L)):L(N()):L(N);continue}}else v[B]=N;(F=T.onAutoPropsAssigned)==null||F.call(T)}return{componentCtx:v,head:T}},{componentCtx:me,head:qe}=J(),Te=[...Ee(D)],k=Te.length,mt=d.childNodes.length===0,O=x=>{let T=x.parentElement;if(mt){for(let N of[...x.childNodes])T.insertBefore(N,x);return}let v=x.name;X(v)&&(v=x.getAttributeNames().filter(N=>N.startsWith("#"))[0],X(v)?v="default":v=v.substring(1));let F=d.querySelector(`template[name='${v}'], template[\\#${v}]`);!F&&v==="default"&&(F=d.querySelector("template:not([name])"),F&&F.getAttributeNames().filter(N=>N.startsWith("#")).length>0&&(F=null));let B=N=>{qe.enableSwitch&&o.C(A,()=>{o.v(me);let L=b(x,o.k());o.C(A,()=>{o.v(L);let S=o.k(),P=oo(S);for(let re of N)Be(re)&&(re.setAttribute(at,P),mn(P),q(re,()=>{dn(P)}))})})};if(F){let N=[...Ee(F)];for(let L of N)T.insertBefore(L,x);B(N)}else{if(v!=="default"){for(let L of[...Ee(x)])T.insertBefore(L,x);return}let N=[...Ee(d)].filter(L=>!ye(L));for(let L of N)T.insertBefore(L,x);B(N)}},Q=x=>{if(!Be(x))return;let T=x.querySelectorAll("slot");if(ao(x)){O(x),x.remove();return}for(let v of T)O(v),v.remove()};(()=>{for(let x=0;x<k;++x)Te[x]=Te[x].cloneNode(!0),y.insertBefore(Te[x],h),Q(Te[x])})(),G.insertBefore(_,h);let te=()=>{if(!E.inheritAttrs)return;let x=Te.filter(v=>v.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(v=>v.hasAttribute(this.ye)));let T=x[0];if(T)for(let v of d.getAttributeNames()){if(v===ce||v===ee)continue;let F=d.getAttribute(v);if(v==="class")T.classList.add(...F.split(" "));else if(v==="style"){let B=T.style,N=d.style;for(let L of N)B.setProperty(L,N.getPropertyValue(L))}else T.setAttribute(wt(v,t.o),F)}},xe=()=>{for(let x of d.getAttributeNames())!x.startsWith("@")&&!x.startsWith(t.o.p.on)&&d.removeAttribute(x)},Se=()=>{te(),xe(),o.v(me),t.Te(d,!1),me.$emit=qe.emit,ke(t,Te),q(d,()=>{Ne(me)}),q(M,()=>{de(d)}),At(me)};o.C(A,Se)}}};var En=class{constructor(e,t){m(this,"Q");m(this,"X");m(this,"Re",[]);this.Q=e,this.X=t}},Ht=class{constructor(e){m(this,"i");m(this,"Ce");m(this,"Ee");m(this,"Y");var o;this.i=e,this.Ce=e.o.rt(),this.Y=new Map;let t=new Map;for(let r of this.Ce){let s=(o=r[0])!=null?o:"",i=t.get(s);i?i.push(r):t.set(s,[r])}this.Ee=t}ve(e){let t=this.Y.get(e);if(t)return t;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);X(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let d=c[p];if(!l&&d==="camel"?l=!0:!u&&d==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=$(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.Y.set(e,f),f}xe(e,t){let o=new Map;if(!ct(e))return o;let r=this.Ee,s=(c,l)=>{var f;let u=r.get((f=l[0])!=null?f:"");if(u)for(let p=0;p<u.length;++p){if(!l.startsWith(u[p]))continue;let d=o.get(l);if(!d){let y=this.ve(l);d=new En(y.terms,y.flags),o.set(l,d)}d.Re.push(c);return}},i=c=>{var u;let l=c.attributes;if(!(!l||l.length===0))for(let f=0;f<l.length;++f){let p=(u=l.item(f))==null?void 0:u.name;p&&s(c,p)}};if(i(e),!t||!e.firstElementChild)return o;let a=e.querySelectorAll("*");for(let c of a)i(c);return o}};var bo=()=>{},Jr=(n,e)=>{for(let t of n){let o=t.cloneNode(!0);e.appendChild(o)}},Vt=class{constructor(e){m(this,"i");m(this,"L");m(this,"we");this.i=e,this.L=e.o.p.is,this.we=Qe(this.L)+", [is]"}N(e){let t=e.hasAttribute(this.L),o=Me(e,this.we);for(let r of o)this.b(r);return t}b(e){let t=e.getAttribute(this.L);if(!t){if(t=e.getAttribute("is"),!t)return;if(!t.startsWith("regor:")){if(!t.startsWith("r-"))return;let o=t.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.i.H(s);return}t=`'${t.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.L),this.O(e,t)}U(e,t){let o=Je(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${t!=null?t:""}`);r.insertBefore(s,e),Ge(s,o),o.forEach(a=>{z(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${t!=null?t:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}O(e,t){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${t} `),a=this.i.m.M(t),c=a.value,l=this.i.m,u=l.k(),f={name:""},p=ye(e)?o:[...o[0].childNodes],d=()=>{l.C(u,()=>{var E;let g=c()[0];if(I(g)&&(g.name?g=g.name:g=(E=Object.entries(l.J()).filter(D=>D[1]===g)[0])==null?void 0:E[0]),!W(g)||X(g)){Ce(s,i);return}if(f.name===g)return;Ce(s,i);let R=document.createElement(g);for(let D of e.getAttributeNames())D!==this.L&&R.setAttribute(D,e.getAttribute(D));Jr(p,R),r.insertBefore(R,i),this.i.H(R),f.name=g})},y=bo;q(s,()=>{a.stop(),y(),y=bo}),d(),y=a.subscribe(d)}};var V=n=>{let e=n;return e!=null&&e[Z]===1?e():e};var Qr=(n,e)=>{let[t,o]=e;K(o)?o(n,t):n.innerHTML=t==null?void 0:t.toString()},_t={mount:()=>({update:({el:n,values:e})=>{Qr(n,e)}})};var jt=class n{constructor(e){m(this,"Z");this.Z=e}static st(e,t){var d,y;let o=e.m,r=e.o,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.P,c=o.J();if(Object.keys(c).length>0||r.j.size>0)return;let l=e._,u=[],f=0,p=[];for(let h=t.length-1;h>=0;--h)p.push(t[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let R=h;if(R.tagName==="TEMPLATE"||R.tagName.includes("-"))return;let E=$(R.tagName).toUpperCase();if(r.j.has(E)||c[E])return;let D=R.attributes;for(let G=0;G<D.length;++G){let M=(d=D.item(G))==null?void 0:d.name;if(!M)continue;if(i.has(M))return;let{terms:_,flags:ce}=l.ve(M),[ee,U]=_,b=(y=a[M])!=null?y:a[ee];if(b){if(b===_t)return;u.push({nodeIndex:f,attrName:M,directive:b,option:U,flags:ce})}}++f}let g=h.childNodes;for(let R=g.length-1;R>=0;--R)p.push(g[R])}if(u.length!==0)return new n(u)}b(e,t){let o=[],r=[];for(let s=t.length-1;s>=0;--s)r.push(t[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.Z.length;++s){let i=this.Z[s],a=o[i.nodeIndex];a&&e.b(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Xr=(n,e)=>{let t=e.parentNode;if(t)for(let o=0;o<n.items.length;++o)t.insertBefore(n.items[o],e)},Yr=n=>{var a;let e=n.length,t=n.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=n[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||n[u]<l){t[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,n[o[i]]<l?r=i+1:s=i;l<n[o[r]]&&(r>0&&(t[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=t[s];return o},$t=class{static it(e){let{oldItems:t,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=t.length,u=o.length,f=new Array(u),p=new Set;for(let b=0;b<u;++b){let A=r(o[b]);if(A===void 0||p.has(A))return;p.add(A),f[b]=A}let d=new Array(u),y=0,h=l-1,g=u-1;for(;y<=h&&y<=g;){let b=t[y];if(r(b.value)!==f[y]||!s(b.value,o[y]))break;b.value=o[y],d[y]=b,++y}for(;y<=h&&y<=g;){let b=t[h];if(r(b.value)!==f[g]||!s(b.value,o[g]))break;b.value=o[g],d[g]=b,--h,--g}if(y>h){for(let b=g;b>=y;--b){let A=b+1<u?d[b+1].items[0]:c;d[b]=i(b,o[b],A)}return d}if(y>g){for(let b=y;b<=h;++b)a(t[b]);return d}let R=y,E=y,D=g-E+1,G=new Array(D).fill(0),M=new Map;for(let b=E;b<=g;++b)M.set(f[b],b);let _=!1,ce=0;for(let b=R;b<=h;++b){let A=t[b],J=M.get(r(A.value));if(J===void 0){a(A);continue}if(!s(A.value,o[J])){a(A);continue}A.value=o[J],d[J]=A,G[J-E]=b+1,J>=ce?ce=J:_=!0}let ee=_?Yr(G):[],U=ee.length-1;for(let b=D-1;b>=0;--b){let A=E+b,J=A+1<u?d[A+1].items[0]:c;if(G[b]===0){d[A]=i(A,o[A],J);continue}let me=d[A];_&&(U>=0&&ee[U]===b?--U:me&&Xr(me,J))}return d}};var lt=class{constructor(e){m(this,"x",[]);m(this,"V",new Map);m(this,"ee");this.ee=e}get w(){return this.x.length}te(e){let t=this.ee(e.value);t!==void 0&&this.V.set(t,e)}ne(e){var o;let t=this.ee((o=this.x[e])==null?void 0:o.value);t!==void 0&&this.V.delete(t)}static at(e,t){return{items:[],index:e,value:t,order:-1}}v(e){e.order=this.w,this.x.push(e),this.te(e)}ct(e,t){let o=this.w;for(let r=e;r<o;++r)this.x[r].order=r+1;t.order=e,this.x.splice(e,0,t),this.te(t)}I(e){return this.x[e]}oe(e,t){this.ne(e),this.x[e]=t,this.te(t),t.order=e}Se(e){this.ne(e),this.x.splice(e,1);let t=this.w;for(let o=e;o<t;++o)this.x[o].order=o}Ae(e){let t=this.w;for(let o=e;o<t;++o)this.ne(o);this.x.splice(e)}Gt(e){return this.V.has(e)}ut(e){var o;let t=this.V.get(e);return(o=t==null?void 0:t.order)!=null?o:-1}};var Rn=Symbol("r-for"),Zr=n=>-1,To=()=>{},Ft=class Ft{constructor(e){m(this,"i");m(this,"T");m(this,"re");m(this,"R");this.i=e,this.T=e.o.p.for,this.re=Qe(this.T),this.R=e.o.p.pre}N(e){let t=e.hasAttribute(this.T),o=Me(e,this.re);for(let r of o)this.pt(r);return t}G(e){return e[Rn]?!0:(e[Rn]=!0,Me(e,this.re).forEach(t=>t[Rn]=!0),!1)}pt(e){if(e.hasAttribute(this.R)||this.G(e))return;let t=e.getAttribute(this.T);if(!t){H(0,this.T,e);return}e.removeAttribute(this.T),this.lt(e,t)}Ne(e){return fe(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}lt(e,t){var mt;let o=this.ft(t);if(!(o!=null&&o.list)){H(1,this.T,t,e);return}let r=this.i.o.p.key,s=this.i.o.p.keyBind,i=(mt=e.getAttribute(r))!=null?mt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Je(e),c=jt.st(this.i,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${t}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ge(f,a),a.forEach(O=>{z(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let d=this.i,y=d.m,h=y.k(),R=h.length===1?[void 0,h[0]]:void 0,E=this.mt(i),D=(O,Q)=>E(O)===E(Q),G=(O,Q)=>O===Q,M=(O,Q,oe)=>{let te=o.createContext(Q,O),xe=lt.at(te.index,Q),Se=()=>{var F,B;let x=(B=(F=p.parentNode)!=null?F:f.parentNode)!=null?B:l,T=oe.previousSibling,v=[];for(let N=0;N<a.length;++N){let L=a[N].cloneNode(!0);x.insertBefore(L,oe),v.push(L)}for(c?c.b(d,v):ke(d,v),T=T.nextSibling;T!==oe;)xe.items.push(T),T=T.nextSibling};return R?(R[0]=te.ctx,y.C(R,Se)):y.C(h,()=>{y.v(te.ctx),Se()}),xe},_=(O,Q)=>{let oe=k.I(O).items,te=oe[oe.length-1].nextSibling;for(let xe of oe)z(xe);k.oe(O,M(O,Q,te))},ce=(O,Q)=>{k.v(M(O,Q,p))},ee=O=>{for(let Q of k.I(O).items)z(Q)},U=O=>{let Q=k.w;for(let oe=O;oe<Q;++oe)k.I(oe).index(oe)},b=O=>{let Q=f.parentNode,oe=p.parentNode;if(!Q||!oe)return;let te=k.w;K(O)&&(O=O());let xe=V(O[0]);if(w(xe)&&xe.length===0){Ce(f,p),k.Ae(0);return}let Se=[];for(let S of this.Ne(O[0]))Se.push(S);let x=$t.it({oldItems:k.x,newValues:Se,getKey:E,isSameValue:G,mountNewValue:(S,P,re)=>M(S,P,re),removeMountItem:S=>{for(let P=0;P<S.items.length;++P)z(S.items[P])},endAnchor:p});if(x){k.x=x,k.V.clear();for(let S=0;S<x.length;++S){let P=x[S];P.order=S,P.index(S);let re=E(P.value);re!==void 0&&k.V.set(re,P)}return}let T=0,v=Number.MAX_SAFE_INTEGER,F=te,B=this.i.o.forGrowThreshold,N=()=>k.w<F+B;for(let S of Se){let P=()=>{if(T<te){let re=k.I(T++);if(D(re.value,S)){if(G(re.value,S))return;_(T-1,S);return}let De=k.ut(E(S));if(De>=T&&De-T<10){if(--T,v=Math.min(v,T),ee(T),k.Se(T),--te,De>T+1)for(let Fe=T;Fe<De-1&&Fe<te&&!D(k.I(T).value,S);)++Fe,ee(T),k.Se(T),--te;P();return}N()?(k.ct(T-1,M(T,S,k.I(T-1).items[0])),v=Math.min(v,T-1),++te):_(T-1,S)}else ce(T++,S)};P()}let L=T;for(te=k.w;T<te;)ee(T++);k.Ae(L),U(v)},A=()=>{J.stop(),qe(),qe=To},J=y.M(o.list),me=J.value,qe=To,Te=0,k=new lt(E);for(let O of this.Ne(me()[0]))k.v(M(Te++,O,p));q(f,A),qe=J.subscribe(b)}ft(e){var c,l;let t=Ft.dt.exec(e);if(!t)return;let o=(t[1]+((c=t[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=t[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},d=V(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(d)){let h=0;for(let g of o)p[g]=d[h++]}else for(let h of o)p[h]=d[h];let y={ctx:p,index:Zr};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=ie(f)),y}}}mt(e){if(!e)return o=>o;let t=e.trim();if(!t)return o=>o;if(t.includes(".")){let o=this.yt(t),r=o.length>1?o.slice(1):void 0;return s=>{let i=V(s),a=this.Oe(i,o);return a!==void 0||!r?a:this.Oe(i,r)}}return o=>{var r;return V((r=V(o))==null?void 0:r[t])}}yt(e){return e.split(".").filter(t=>t.length>0)}Oe(e,t){var r;let o=e;for(let s of t)o=(r=V(o))==null?void 0:r[s];return V(o)}};m(Ft,"dt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var qt=Ft;var zt=class{constructor(e){m(this,"se",0);m(this,"ie",new Map);m(this,"m");m(this,"Me");m(this,"ke");m(this,"Le");m(this,"Ve");m(this,"_");m(this,"o");m(this,"R");m(this,"Ie");this.m=e,this.o=e.o,this.ke=new qt(this),this.Me=new vt(this),this.Le=new Vt(this),this.Ve=new Pt(this),this._=new Ht(this),this.R=this.o.p.pre,this.Ie=this.o.p.dynamic}ht(e){let t=ye(e)?[e]:e.querySelectorAll("template");for(let o of t){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);ke(this,i)}}H(e){++this.se;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Me.N(e)||this.ke.N(e)||this.Le.N(e))return;this.Ve.N(e),this.ht(e),this.Te(e,!0)}finally{--this.se,this.se===0&&this.gt()}}bt(e,t){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(t)}De(e,t){let o=this.bt(e,t);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${t}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,q(s,()=>{z(e)}),o.appendChild(e),!0}xt(e,t){this.ie.set(e,t)}gt(){let e=this.ie;if(e.size!==0){this.ie=new Map;for(let[t,o]of e.entries())this.De(t,o)}}Te(e,t){var s;let o=this._.xe(e,t),r=this.o.P;for(let[i,a]of o.entries()){let[c,l]=a.Q,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.Re;for(let p=0;p<f.length;++p){let d=f[p];this.b(u,d,i,!1,l,a.X)}}}b(e,t,o,r,s,i){if(t.hasAttribute(this.R))return;let a=t.getAttribute(o);t.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(at);if(f)return f;u=u.parentElement}return null};if(hn()){let l=c(t);if(l){this.m.C(ro(l),()=>{this.O(e,t,a,s,i)});return}}this.O(e,t,a,s,i)}Tt(e,t,o){return e!==St?!1:(X(o)||this.De(t,o)||this.xt(t,o),!0)}O(e,t,o,r,s){if(t.nodeType!==Node.ELEMENT_NODE||o==null||this.Tt(e,t,o))return;let i=this.Rt(r,e.once),a=this.Ct(e,o),c=this.Et(a,i);q(t,c.stop);let l=this.vt(t,o,a,i,r,s),u=this.wt(e,l,c);if(!u)return;let f=this.St(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}Rt(e,t){let o=uo(e,this.Ie);if(o)return this.m.M($(o),void 0,void 0,void 0,t)}Ct(e,t){return this.m.M(t,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Et(e,t){let o={stop:()=>{var r,s,i;e.stop(),t==null||t.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}vt(e,t,o,r,s,i){return{el:e,expr:t,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}wt(e,t,o){let r=e.mount(t);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}St(e,t,o,r,s){let i,a;return()=>{let c=t.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var xo="http://www.w3.org/1999/xlink",es={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function ts(n){return!!n||n===""}var ns=(n,e,t,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=$(o)),Kt(n,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=t==null?void 0:t[c])==null?void 0:a[0],f=l[0],p=l[1];Kt(n,f,p,u)}else if(I(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],d=t==null?void 0:t[c],y=d&&f in d?f:void 0;Kt(n,f,p,y)}else{let u=t==null?void 0:t[c],f=e[c++],p=e[c];Kt(n,f,p,u)}}},vn={mount:()=>({update:({el:n,values:e,previousValues:t,option:o,previousOption:r,flags:s})=>{ns(n,e,t,o,r,s)}})},Kt=(n,e,t,o)=>{if(o&&o!==e&&n.removeAttribute(o),fe(e)){H(3,"r-bind",n);return}if(!W(e)){H(6,`Attribute key is not string at ${n.outerHTML}`,e);return}if(e.startsWith("xlink:")){fe(t)?n.removeAttributeNS(xo,e.slice(6,e.length)):n.setAttributeNS(xo,e,t);return}let r=e in es;fe(t)||r&&!ts(t)?n.removeAttribute(e):n.setAttribute(e,r?"":t)};var os=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Co(n,s[c],i==null?void 0:i[c])}else Co(n,s,i)}},wn={mount:()=>({update:({el:n,values:e,previousValues:t})=>{os(n,e,t)}})},Co=(n,e,t)=>{let o=n.classList,r=W(e),s=W(t);if(e&&!r){if(t&&!s)for(let i in t)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?t!==e&&(s&&o.remove(...t.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):t&&s&&o.remove(...t.trim().split(/\s+/))};function rs(n,e){if(n.length!==e.length)return!1;let t=!0;for(let o=0;t&&o<n.length;o++)t=Re(n[o],e[o]);return t}function Re(n,e){if(n===e)return!0;let t=ln(n),o=ln(e);if(t||o)return t&&o?n.getTime()===e.getTime():!1;if(t=st(n),o=st(e),t||o)return n===e;if(t=w(n),o=w(e),t||o)return t&&o?rs(n,e):!1;if(t=I(n),o=I(e),t||o){if(!t||!o)return!1;let r=Object.keys(n).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in n){let a=Object.prototype.hasOwnProperty.call(n,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Re(n[i],e[i]))return!1}return!0}return String(n)===String(e)}function Wt(n,e){return n.findIndex(t=>Re(t,e))}var Eo=n=>{let e=parseFloat(n);return isNaN(e)?n:e};var Gt=n=>{if(!C(n))throw j(3,"pause");n(void 0,void 0,3)};var Jt=n=>{if(!C(n))throw j(3,"resume");n(void 0,void 0,4)};var vo={mount:({el:n,parseResult:e,flags:t})=>({update:({values:o})=>{ss(n,o[0])},unmount:is(n,e,t)})},ss=(n,e)=>{let t=No(n);if(t&&wo(n))w(e)?e=Wt(e,ve(n))>-1:ue(e)?e=e.has(ve(n)):e=ps(n,e),n.checked=e;else if(t&&So(n))n.checked=Re(e,ve(n));else if(t||Oo(n))Ao(n)?n.value!==(e==null?void 0:e.toString())&&(n.value=e):n.value!==e&&(n.value=e);else if(Mo(n)){let o=n.options,r=o.length,s=n.multiple;for(let i=0;i<r;i++){let a=o[i],c=ve(a);if(s)w(e)?a.selected=Wt(e,c)>-1:a.selected=e.has(c);else if(Re(ve(a),e)){n.selectedIndex!==i&&(n.selectedIndex=i);return}}!s&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}else H(7,n)},ft=n=>(C(n)&&(n=n()),K(n)&&(n=n()),n?W(n)?{trim:n.includes("trim"),lazy:n.includes("lazy"),number:n.includes("number"),int:n.includes("int")}:{trim:!!n.trim,lazy:!!n.lazy,number:!!n.number,int:!!n.int}:{trim:!1,lazy:!1,number:!1,int:!1}),wo=n=>n.type==="checkbox",So=n=>n.type==="radio",Ao=n=>n.type==="number"||n.type==="range",No=n=>n.tagName==="INPUT",Oo=n=>n.tagName==="TEXTAREA",Mo=n=>n.tagName==="SELECT",is=(n,e,t)=>{let o=e.value,r=ft(t==null?void 0:t.join(",")),s=ft(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,n),()=>{};let a=()=>e.refs[0],c=No(n);return c&&wo(n)?cs(n,a):c&&So(n)?ms(n,a):c||Oo(n)?as(n,i,a,o):Mo(n)?ds(n,a,o):(H(7,n),()=>{})},Ro=/[.,' ·٫]/,as=(n,e,t,o)=>{let s=e.lazy?"change":"input",i=Ao(n),a=()=>{!e.trim&&!ft(o()[1]).trim||(n.value=n.value.trim())},c=p=>{let d=p.target;d.composing=1},l=p=>{let d=p.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},u=()=>{n.removeEventListener(s,f),n.removeEventListener("change",a),n.removeEventListener("compositionstart",c),n.removeEventListener("compositionend",l),n.removeEventListener("change",l)},f=p=>{let d=t();if(!d)return;let y=p.target;if(!y||y.composing)return;let h=y.value,g=ft(o()[1]);if(i||g.number||g.int){if(g.int)h=parseInt(h);else{if(Ro.test(h[h.length-1])&&h.split(Ro).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(d()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),n.value=h}else g.trim&&(h=h.trim());d(h)};return n.addEventListener(s,f),n.addEventListener("change",a),n.addEventListener("compositionstart",c),n.addEventListener("compositionend",l),n.addEventListener("change",l),u},cs=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n),a=n.checked,c=s();if(w(c)){let l=Wt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else ue(c)?a?c.add(i):c.delete(i):s(fs(n,a))};return n.addEventListener(t,r),o},ve=n=>"_value"in n?n._value:n.value,ko="trueValue",us="falseValue",Lo="true-value",ls="false-value",fs=(n,e)=>{let t=e?ko:us;if(t in n)return n[t];let o=e?Lo:ls;return n.hasAttribute(o)?n.getAttribute(o):e},ps=(n,e)=>{if(ko in n)return Re(e,n.trueValue);let o=Lo;return n.hasAttribute(o)?Re(e,n.getAttribute(o)):Re(e,!0)},ms=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n);s(i)};return n.addEventListener(t,r),o},ds=(n,e,t)=>{let o="change",r=()=>{n.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=ft(t()[1]).number,l=Array.prototype.filter.call(n.options,u=>u.selected).map(u=>c?Eo(ve(u)):ve(u));if(n.multiple){let u=i();try{if(Gt(i),ue(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{Jt(i),Y(i)}}else i(l[0])};return n.addEventListener(o,s),r};var hs=["stop","prevent","capture","self","once","left","right","middle","passive"],ys=n=>{let e={};if(X(n))return;let t=n.split(",");for(let o of hs)e[o]=t.includes(o);return e},gs=(n,e,t,o,r)=>{var l,u;if(o){let f=e.value(),p=V(o.value()[0]);return W(p)?Sn(n,$(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(t){let f=e.value();return Sn(n,$(t),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),I(p))for(let d of Object.entries(p)){let y=d[0],h=()=>{let R=e.value()[f];return K(R)&&(R=R()),R=R[y],K(R)&&(R=R()),R},g=p[y+"_flags"];s.push(Sn(n,y,h,g))}else H(2,"r-on",n)}return i},An={isLazy:(n,e)=>e===-1&&n%2===0,isLazyKey:(n,e)=>e===0&&!n.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:n,parseResult:e,option:t,dynamicOption:o,flags:r})=>gs(n,e,t,o,r)},bs=(n,e)=>{if(n.startsWith("keydown")||n.startsWith("keyup")||n.startsWith("keypress")){e!=null||(e="");let t=[...n.split("."),...e.split(",")];n=t[0];let o=t[1],r=t.includes("ctrl"),s=t.includes("shift"),i=t.includes("alt"),a=t.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[n,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[n,c]}return[n,t=>!0]},Sn=(n,e,t,o)=>{if(X(e))return H(5,"r-on",n),()=>{};let r=ys(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=bs(e,o);let a=u=>{if(!i(u)||!t&&e==="submit"&&(r!=null&&r.prevent))return;let f=t(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{n.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==n)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return n.addEventListener(e,l,s),c};var Ts=(n,e,t,o)=>{if(t){o&&o.includes("camel")&&(t=$(t)),tt(n,t,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];tt(n,a,c)}else if(I(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];tt(n,c,l)}else{let a=e[s++],c=e[s];tt(n,a,c)}}},Io={mount:()=>({update:({el:n,values:e,option:t,flags:o})=>{Ts(n,e,t,o)}})};function xs(n){return!!n||n===""}var tt=(n,e,t)=>{if(fe(e)){H(3,":prop",n);return}if(e==="innerHTML"||e==="textContent"){let s=[...n.childNodes];setTimeout(()=>s.forEach(de),1),n[e]=t!=null?t:"";return}let o=n.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){n._value=t;let s=o==="OPTION"?n.getAttribute("value"):n.value,i=t!=null?t:"";s!==i&&(n.value=i),t==null&&n.removeAttribute(e);return}let r=!1;if(t===""||t==null){let s=typeof n[e];s==="boolean"?t=xs(t):t==null&&s==="string"?(t="",r=!0):s==="number"&&(t=0,r=!0)}try{n[e]=t}catch(s){r||H(4,e,o,t,s)}r&&n.removeAttribute(e)};var Do={once:!0,mount:({el:n,parseResult:e,expr:t})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(n):i?i==null||i(n):o.context[t]=n,()=>{if(s){let a=r.indexOf(n);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Cs=(n,e)=>{let t=Oe(n).data,o=t._ord;Xn(o)&&(o=t._ord=n.style.display),!!e[0]?n.style.display=o:n.style.display="none"},Uo={mount:()=>({update:({el:n,values:e})=>{Cs(n,e)}})};var Es=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Bo(n,s[c],i==null?void 0:i[c])}else Bo(n,s,i)}},Qt={mount:()=>({update:({el:n,values:e,previousValues:t})=>{Es(n,e,t)}})},Bo=(n,e,t)=>{let o=n.style,r=W(e);if(e&&!r){if(t&&!W(t))for(let s in t)e[s]==null&&On(o,s,"");for(let s in e)On(o,s,e[s])}else{let s=o.display;if(r?t!==e&&(o.cssText=e):t&&n.removeAttribute("style"),"_ord"in Oe(n).data)return;o.display=s}},Po=/\s*!important$/;function On(n,e,t){if(w(t))t.forEach(o=>{On(n,e,o)});else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{let o=Rs(n,e);Po.test(t)?n.setProperty(Xe(o),t.replace(Po,""),"important"):n[o]=t}}var Ho=["Webkit","Moz","ms"],Nn={};function Rs(n,e){let t=Nn[e];if(t)return t;let o=$(e);if(o!=="filter"&&o in n)return Nn[e]=o;o=ut(o);for(let r=0;r<Ho.length;r++){let s=Ho[r]+o;if(s in n)return Nn[e]=s}return e}var ae=n=>Vo(V(n)),Vo=(n,e=new WeakMap)=>{if(!n||!I(n))return n;if(w(n))return n.map(ae);if(ue(n)){let o=new Set;for(let r of n.keys())o.add(ae(r));return o}if(Ae(n)){let o=new Map;for(let r of n)o.set(ae(r[0]),ae(r[1]));return o}if(e.has(n))return V(e.get(n));let t=yt({},n);e.set(n,t);for(let o of Object.entries(t))t[o[0]]=Vo(V(o[1]),e);return t};var vs=(n,e)=>{var o;let t=e[0];n.textContent=ue(t)?JSON.stringify(ae([...t])):Ae(t)?JSON.stringify(ae([...t])):I(t)?JSON.stringify(ae(t)):(o=t==null?void 0:t.toString())!=null?o:""},_o={mount:()=>({update:({el:n,values:e})=>{vs(n,e)}})};var jo={mount:()=>({update:({el:n,values:e})=>{tt(n,"value",e[0])}})};var Ie=class Ie{constructor(e){m(this,"P",{});m(this,"p",{});m(this,"rt",()=>Object.keys(this.P).filter(e=>e.length===1||!e.startsWith(":")));m(this,"be",new Map);m(this,"j",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Nt()}static getDefault(){var e;return(e=Ie.Ue)!=null?e:Ie.Ue=new Ie}Nt(){let e={},t=globalThis;for(let o of Ie.At.split(","))e[o]=t[o];return e.ref=be,e.sref=ie,e.flatten=ae,e}addComponent(...e){for(let t of e){if(!t.defaultName){it.warning("Registered component's default name is not defined",t);continue}this.be.set(ut(t.defaultName),t),this.j.set(ut(t.defaultName).toLocaleUpperCase(),t)}}setDirectives(e){this.P={".":Io,":":vn,"@":An,[`${e}on`]:An,[`${e}bind`]:vn,[`${e}html`]:_t,[`${e}text`]:_o,[`${e}show`]:Uo,[`${e}model`]:vo,":style":Qt,[`${e}style`]:Qt,[`${e}bind:style`]:Qt,":class":wn,[`${e}bind:class`]:wn,":ref":Do,":value":jo,[`${e}teleport`]:St},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.P,this.p)}};m(Ie,"Ue"),m(Ie,"At","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var le=Ie;var Xt=(n,e)=>{if(!n)return;let o=(e!=null?e:le.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ss(n,o.pre,s))ws(i,o.text,r,s)},ws=(n,e,t,o)=>{var c;let r=n.textContent;if(!r)return;let s=t,i=r.split(s);if(i.length<=1)return;if(((c=n.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=$o(l,o);if(u&&X(i[0])&&X(i[2])){let f=n.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=$o(l,o);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}n.replaceWith(a)},Ss=(n,e,t)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)t.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Ee(s))r(a)}};return r(n),o},$o=(n,e)=>e.find(t=>n.startsWith(t.start)&&n.endsWith(t.end));var As=9,Ns=10,Os=13,Ms=32,we=46,Yt=44,ks=39,Ls=34,Zt=40,nt=41,en=91,Mn=93,kn=63,Is=59,qo=58,Fo=123,tn=125,_e=43,nn=45,Ln=96,zo=47,In=92,Ko=new Set([2,3]),Yo={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Ds=Wn(yt({"=>":2},Yo),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),Zo=Object.keys(Yo),Us=new Set(Zo),Un=new Set(["=>"]);Zo.forEach(n=>Un.add(n));var Wo={true:!0,false:!1,null:null},Bs="this",ot="Expected ",je="Unexpected ",Pn="Unclosed ",Ps=ot+":",Go=ot+"expression",Hs="missing }",Vs=je+"object property",_s=Pn+"(",Jo=ot+"comma",Qo=je+"token ",js=je+"period",Dn=ot+"expression after ",$s="missing unaryOp argument",qs=Pn+"[",Fs=ot+"exponent (",zs="Variable names cannot start with a number (",Ks=Pn+'quote after "',pt=n=>n>=48&&n<=57,Xo=n=>Ds[n],Bn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get B(){return this.u.charAt(this.e)}get y(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}$(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ae(e){return this.$(e)||pt(e)}r(e){return new Error(`${e} at character ${this.e}`)}h(){let e=this.y,t=this.u,o=this.e;for(;e===Ms||e===As||e===Ns||e===Os;)e=t.charCodeAt(++o);this.e=o}parse(){let e=this.ce();return e.length===1?e[0]:{type:0,body:e}}ce(e){let t=[];for(;this.e<this.u.length;){let o=this.y;if(o===Is||o===Yt)this.e++;else{let r=this.S();if(r)t.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.r(je+'"'+this.B+'"')}}}return t}S(){var t;let e=(t=this.Ot())!=null?t:this.Pe();return this.h(),this.Mt(e)}ue(){this.h();let e=this.u,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.ae(e.charCodeAt(t+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}Pe(){let e,t,o,r,s,i,a,c;if(s=this.q(),!s||(t=this.ue(),!t))return s;if(r={value:t,prec:Xo(t),right_a:Un.has(t)},i=this.q(),!i)throw this.r(Dn+t);let l=[s,r,i];for(;t=this.ue();){o=Xo(t),r={value:t,prec:o,right_a:Un.has(t)},c=t;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),t=l.pop().value,s=l.pop(),e=this.Be(t,s,i),l.push(e);if(e=this.q(),!e)throw this.r(Dn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Be(l[a-1].value,l[a-2],e),a-=2;return e}q(){let e;if(this.h(),e=this.kt(),e)return this.pe(e);let t=this.y;if(pt(t)||t===we)return this.Lt();if(t===ks||t===Ls)e=this.Vt();else if(t===en)e=this.It();else{let o=this.Dt();if(o){let r=this.q();if(!r)throw this.r($s);return this.pe({type:7,operator:o,argument:r})}this.$(t)?(e=this.le(),e.name in Wo?e={type:4,value:Wo[e.name],raw:e.name}:e.name===Bs&&(e={type:5})):t===Zt&&(e=this.Ut())}return e?(e=this.F(e),this.pe(e)):!1}Be(e,t,o){if(e==="=>"){let r=t.type===1?t.expressions:[t];return{type:15,params:r,body:o}}return Us.has(e)?{type:16,operator:e,left:t,right:o}:{type:8,operator:e,left:t,right:o}}kt(){let e={node:!1};return this.Pt(e),e.node||(this.Bt(e),e.node)||(this.Ht(e),e.node)||(this.He(e),e.node)||this.jt(e),e.node}pe(e){let t={node:e};return this._t(t),this.$t(t),this.qt(t),t.node}Dt(){let e=this.u,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);return o===nn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===_e?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ae(i)?(this.e+=3,"new"):!1}Ot(){let e={};return this.Ft(e),e.node}Mt(e){let t={node:e};return this.Kt(t),t.node}F(e){this.h();let t=this.y;for(;t===we||t===en||t===Zt||t===kn;){let o;if(t===kn){if(this.u.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.h(),t=this.y}if(this.e++,t===en){if(e={type:3,computed:!0,object:e,property:this.S()},this.h(),t=this.y,t!==Mn)throw this.r(qs);this.e++}else t===Zt?e={type:6,arguments:this.je(nt),callee:e}:(o&&this.e--,this.h(),e={type:3,computed:!1,object:e,property:this.le()});o&&(e.optional=!0),this.h(),t=this.y}return e}Lt(){let e=this.u,t=this.e,o=t;for(;pt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;pt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===_e||a===nn)&&o++;let c=o;for(;pt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(t,o);throw this.r(Fs+l+this.B+")")}}this.e=o;let s=e.slice(t,o),i=e.charCodeAt(o);if(this.$(i))throw this.r(zs+s+this.B+")");if(i===we||s.length===1&&s.charCodeAt(0)===we)throw this.r(js);return{type:4,value:parseFloat(s),raw:s}}Vt(){let e=this.u,t=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<t;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===In){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this._e(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:t):e.slice(i,l?s:t);if(!l)throw this.e=s,this.r(Ks+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}_e(e){switch(e){case 110:return`
|
|
2
|
-
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}le(){let e=this.y,t=this.e;if(this.$(e))this.e++;else throw this.r(je+this.B);for(;this.e<this.u.length&&(e=this.y,this.ae(e));)this.e++;return{type:2,name:this.u.slice(t,this.e)}}je(e){let t=[],o=!1,r=0;for(;this.e<this.u.length;){this.h();let s=this.y;if(s===e){if(o=!0,this.e++,e===nt&&r&&r>=t.length)throw this.r(Qo+String.fromCharCode(e));break}else if(s===Yt){if(this.e++,r++,r!==t.length){if(e===nt)throw this.r(Qo+",");for(let i=t.length;i<r;i++)t.push(null)}}else{if(t.length!==r&&r!==0)throw this.r(Jo);{let i=this.S();if(!i||i.type===0)throw this.r(Jo);t.push(i)}}}if(!o)throw this.r(ot+String.fromCharCode(e));return t}Ut(){this.e++;let e=this.ce(nt);if(this.f(nt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.r(_s)}It(){return this.e++,{type:9,elements:this.je(Mn)}}Pt(e){if(this.f(Fo)){this.e++;let t=[];for(;!isNaN(this.y);){if(this.h(),this.f(tn)){this.e++,e.node=this.F({type:10,properties:t});return}let o=this.S();if(!o)break;if(this.h(),o.type===2&&(this.f(Yt)||this.f(tn)))t.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(qo)){this.e++;let r=this.S();if(!r)throw this.r(Vs);let s=o.type===9;t.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.h()}else t.push(o);this.f(Yt)&&this.e++}throw this.r(Hs)}}Bt(e){let t=this.y;if((t===_e||t===nn)&&t===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:t===_e?"++":"--",argument:this.F(this.le()),prefix:!0};if(!o.argument||!Ko.has(o.argument.type))throw this.r(je+o.operator)}}$t(e){let t=e.node,o=this.y;if((o===_e||o===nn)&&o===this.u.charCodeAt(this.e+1)){if(!Ko.has(t.type))throw this.r(je+(o===_e?"++":"--"));this.e+=2,e.node={type:13,operator:o===_e?"++":"--",argument:t,prefix:!1}}}Ht(e){this.u.charCodeAt(this.e)===we&&this.u.charCodeAt(this.e+1)===we&&this.u.charCodeAt(this.e+2)===we&&(this.e+=3,e.node={type:14,argument:this.S()})}Kt(e){if(e.node&&this.f(kn)){this.e++;let t=e.node,o=this.S();if(!o)throw this.r(Go);if(this.h(),this.f(qo)){this.e++;let r=this.S();if(!r)throw this.r(Go);e.node={type:11,test:t,consequent:o,alternate:r}}else throw this.r(Ps)}}Ft(e){if(this.h(),this.f(Zt)){let t=this.e;if(this.e++,this.h(),this.f(nt)){this.e++;let o=this.ue();if(o==="=>"){let r=this.Pe();if(!r)throw this.r(Dn+o);e.node={type:15,params:null,body:r};return}}this.e=t}}qt(e){let t=e.node,o=t.type;(o===2||o===3)&&this.f(Ln)&&(e.node={type:17,tag:t,quasi:this.He(e)})}He(e){if(!this.f(Ln))return;let t=this.u,o=t.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let d=t.slice(s,this.e);return r.quasis.push({type:18,value:{raw:d,cooked:d},tail:u})}i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=t.charCodeAt(this.e);if(u===Ln)return l(!0),this.e+=1,e.node=r,r;if(u===36&&t.charCodeAt(this.e+1)===Fo){if(l(!1),this.e+=2,r.expressions.push(...this.ce(tn)),!this.f(tn))throw this.r("unclosed ${");this.e+=1,s=this.e}else if(u===In){c||(c=!0),i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=t.charCodeAt(this.e+1);i.push(t.slice(this.e,this.e+2)),a.push(this._e(f)),this.e+=2,s=this.e}else this.e+=1}throw this.r("Unclosed `")}_t(e){let t=e.node;if(!t||t.operator!=="new"||!t.argument)return;if(!t.argument||![6,3].includes(t.argument.type))throw this.r("Expected new function()");e.node=t.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}jt(e){if(!this.f(zo))return;let t=++this.e,o=!1;for(;this.e<this.u.length;){if(this.y===zo&&!o){let r=this.u.slice(t,this.e),s="";for(;++this.e<this.u.length;){let a=this.y;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.B;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.r(a.message)}return e.node={type:4,value:i,raw:this.u.slice(t-1,this.e)},e.node=this.F(e.node),e.node}this.f(en)?o=!0:o&&this.f(Mn)&&(o=!1),this.e+=this.f(In)?2:1}throw this.r("Unclosed Regex")}},er=n=>new Bn(n).parse();var Ws={"=>":(n,e)=>{},"=":(n,e)=>{},"*=":(n,e)=>{},"**=":(n,e)=>{},"/=":(n,e)=>{},"%=":(n,e)=>{},"+=":(n,e)=>{},"-=":(n,e)=>{},"<<=":(n,e)=>{},">>=":(n,e)=>{},">>>=":(n,e)=>{},"&=":(n,e)=>{},"^=":(n,e)=>{},"|=":(n,e)=>{},"||":(n,e)=>n()||e(),"??":(n,e)=>{var t;return(t=n())!=null?t:e()},"&&":(n,e)=>n()&&e(),"|":(n,e)=>n|e,"^":(n,e)=>n^e,"&":(n,e)=>n&e,"==":(n,e)=>n==e,"!=":(n,e)=>n!=e,"===":(n,e)=>n===e,"!==":(n,e)=>n!==e,"<":(n,e)=>n<e,">":(n,e)=>n>e,"<=":(n,e)=>n<=e,">=":(n,e)=>n>=e,in:(n,e)=>n in e,"<<":(n,e)=>n<<e,">>":(n,e)=>n>>e,">>>":(n,e)=>n>>>e,"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"**":(n,e)=>ht(n,e)},Gs={"-":n=>-n,"+":n=>+n,"!":n=>!n,"~":n=>~n,new:n=>n},rr=n=>{if(!(n!=null&&n.some(or)))return n;let e=[];return n.forEach(t=>or(t)?e.push(...t):e.push(t)),e},tr=(...n)=>rr(n),Hn=(n,e)=>{if(!n)return e;let t=Object.create(e!=null?e:{});return t.$event=n,t},Js={"++":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(++o),o}return++n[e]},"--":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(--o),o}return--n[e]}},Qs={"++":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(o+1),o}return n[e]++},"--":(n,e)=>{let t=n[e];if(C(t)){let o=t();return t(o-1),o}return n[e]--}},nr={"=":(n,e,t)=>{let o=n[e];return C(o)?o(t):n[e]=t},"+=":(n,e,t)=>{let o=n[e];return C(o)?o(o()+t):n[e]+=t},"-=":(n,e,t)=>{let o=n[e];return C(o)?o(o()-t):n[e]-=t},"*=":(n,e,t)=>{let o=n[e];return C(o)?o(o()*t):n[e]*=t},"/=":(n,e,t)=>{let o=n[e];return C(o)?o(o()/t):n[e]/=t},"%=":(n,e,t)=>{let o=n[e];return C(o)?o(o()%t):n[e]%=t},"**=":(n,e,t)=>{let o=n[e];return C(o)?o(ht(o(),t)):n[e]=ht(n[e],t)},"<<=":(n,e,t)=>{let o=n[e];return C(o)?o(o()<<t):n[e]<<=t},">>=":(n,e,t)=>{let o=n[e];return C(o)?o(o()>>t):n[e]>>=t},">>>=":(n,e,t)=>{let o=n[e];return C(o)?o(o()>>>t):n[e]>>>=t},"|=":(n,e,t)=>{let o=n[e];return C(o)?o(o()|t):n[e]|=t},"&=":(n,e,t)=>{let o=n[e];return C(o)?o(o()&t):n[e]&=t},"^=":(n,e,t)=>{let o=n[e];return C(o)?o(o()^t):n[e]^=t}},on=(n,e)=>K(n)?n.bind(e):n,Vn=class{constructor(e,t,o,r,s){m(this,"l");m(this,"$e");m(this,"qe");m(this,"Fe");m(this,"A");m(this,"Ke");m(this,"ze");this.l=w(e)?e:[e],this.$e=t,this.qe=o,this.Fe=r,this.ze=!!s}We(e,t){if(t&&e in t)return t;for(let o of this.l)if(e in o)return o}2(e,t,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],on(V(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],on(V(i[r]),i);let s=this.$e;if(s&&r in s)return this.A=s[r],on(V(s[r]),s)}5(e,t,o){return this.l[0]}0(e,t,o){return this.Ge(t,o,tr,...e.body)}1(e,t,o){return this.E(t,o,(...r)=>r.pop(),...e.expressions)}3(e,t,o){let{obj:r,key:s}=this.fe(e,t,o),i=r==null?void 0:r[s];return this.A=i,on(V(i),r)}4(e,t,o){return e.value}6(e,t,o){let r=(i,...a)=>K(i)?i(...rr(a)):i,s=this.E(++t,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,t,o){return this.E(t,o,Gs[e.operator],e.argument)}8(e,t,o){let r=Ws[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,t,o),()=>this.g(e.right,t,o))}return this.E(t,o,r,e.left,e.right)}9(e,t,o){return this.Ge(++t,o,tr,...e.elements)}10(e,t,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++t,o,s,...e.properties),r}11(e,t,o){return this.E(t,o,r=>this.g(r?e.consequent:e.alternate,t,o),e.test)}12(e,t,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Fe)!=null?u:()=>!1,a=t===0&&this.ze,c=f=>this.Je(a,e.key,t,Hn(f,o)),l=f=>this.Je(a,e.value,t,Hn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,t)?c:c()}else if(e.computed){let f=V(c());r[f]=s(e.value)&&i(f,t)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,t)?()=>l:l()}return r}fe(e,t,o){let r=this.g(e.object,t,o),s=e.computed?this.g(e.property,t,o):e.property.name;return{obj:r,key:s}}13(e,t,o){let r=e.argument,s=e.operator,i=e.prefix?Js:Qs;if(r.type===2){let a=r.name,c=this.We(a,o);return fe(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.fe(r,t,o);return i[s](a,c)}}16(e,t,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.We(i,o);if(fe(a))return;let c=this.g(e.right,t,o);return nr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.fe(r,t,o),c=this.g(e.right,t,o);return nr[s](i,a,c)}}14(e,t,o){let r=this.g(e.argument,t,o);return w(r)&&(r.s=sr),r}17(e,t,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},t,o)}19(e,t,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(t,o,r,...e.expressions)}18(e,t,o){return e.value.cooked}20(e,t,o){let r=(s,...i)=>new s(...i);return this.E(t,o,r,e.callee,...e.arguments)}15(e,t,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,t,s)}}g(e,t,o){let r=V(this[e.type](e,t,o));return this.Ke=e.type,r}Je(e,t,o,r){let s=this.g(t,o,r);return e&&this.Qe()?this.A:s}Qe(){let e=this.Ke;return(e===2||e===3||e===6)&&C(this.A)}eval(e,t){let{value:o,refs:r}=Lt(()=>this.g(e,-1,t)),s={value:o,refs:r};return this.Qe()&&(s.ref=this.A),s}E(e,t,o,...r){let s=r.map(i=>i&&this.g(i,e,t));return o(...s)}Ge(e,t,o,...r){let s=this.qe;if(!s)return this.E(e,t,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.g(a,e,Hn(l,t)):this.g(a,e,t)));return o(...i)}},sr=Symbol("s"),or=n=>(n==null?void 0:n.s)===sr,ir=(n,e,t,o,r,s,i)=>new Vn(e,t,o,r,i).eval(n,s);var ar={},cr=n=>!!n,rn=class{constructor(e,t){m(this,"l");m(this,"o");m(this,"Xe",[]);this.l=e,this.o=t}v(e){this.l=[e,...this.l]}J(){return this.l.map(t=>t.components).filter(cr).reverse().reduce((t,o)=>{for(let[r,s]of Object.entries(o))t[r.toUpperCase()]=s;return t},{})}ot(){let e=[],t=new Set,o=this.l.map(r=>r.components).filter(cr).reverse();for(let r of o)for(let s of Object.keys(r))t.has(s)||(t.add(s),e.push(s));return e}M(e,t,o,r,s){var R;let i=[],a=[],c=new Set,l=()=>{for(let E=0;E<a.length;++E)a[E]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(E,D)=>(c.add(E),D&&E(i),()=>{c.delete(E)}),refs:[],context:this.l[0]};if(X(e))return p;let d=this.o.globalContext,y=[],h=new Set,g=(E,D,G,M)=>{try{let _=ir(E,D,d,t,o,M,r);return G&&_.refs.length>0&&y.push(..._.refs),{value:_.value,refs:_.refs,ref:_.ref}}catch(_){H(6,`evaluation error: ${e}`,_)}return{value:void 0,refs:[]}};try{let E=(R=ar[e])!=null?R:er("["+e+"]");ar[e]=E;let D=this.l.slice(),G=E.elements,M=G.length,_=new Array(M);p.refs=_;let ce=()=>{y.length=0,s||(h.clear(),l());let ee=new Array(M);for(let U=0;U<M;++U){let b=G[U];if(t!=null&&t(U,-1)){ee[U]=J=>g(b,D,!1,{$event:J}).value;continue}let A=g(b,D,!0);ee[U]=A.value,_[U]=A.ref}if(!s)for(let U of y)h.has(U)||(h.add(U),a.push(se(U,ce)));if(i=ee,c.size!==0)for(let U of c)c.has(U)&&U(i)};ce()}catch(E){H(6,`parse error: ${e}`,E)}return p}k(){return this.l.slice()}oe(e){this.Xe.push(this.l),this.l=e}C(e,t){try{this.oe(e),t()}finally{this.zt()}}zt(){var e;this.l=(e=this.Xe.pop())!=null?e:[]}};var ur=n=>{let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||n==="-"||n==="_"||n===":"},Xs=(n,e)=>{let t="";for(let o=e;o<n.length;++o){let r=n[o];if(t){r===t&&(t="");continue}if(r==='"'||r==="'"){t=r;continue}if(r===">")return o}return-1},Ys=(n,e)=>{let t=e?2:1;for(;t<n.length&&(n[t]===" "||n[t]===`
|
|
3
|
-
`);)++t;if(t>=n.length||!ur(n[t]))return null;let o=t;for(;t<n.length&&ur(n[t]);)++t;return{start:o,end:t}},lr=new Set(["table","thead","tbody","tfoot"]),
|
|
1
|
+
"use strict";var dt=Object.defineProperty,wr=Object.defineProperties,Sr=Object.getOwnPropertyDescriptor,Ar=Object.getOwnPropertyDescriptors,Nr=Object.getOwnPropertyNames,zn=Object.getOwnPropertySymbols;var Kn=Object.prototype.hasOwnProperty,Or=Object.prototype.propertyIsEnumerable;var ht=Math.pow,cn=(n,e,t)=>e in n?dt(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,yt=(n,e)=>{for(var t in e||(e={}))Kn.call(e,t)&&cn(n,t,e[t]);if(zn)for(var t of zn(e))Or.call(e,t)&&cn(n,t,e[t]);return n},Wn=(n,e)=>wr(n,Ar(e));var Mr=(n,e)=>{for(var t in e)dt(n,t,{get:e[t],enumerable:!0})},kr=(n,e,t,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Nr(e))!Kn.call(n,r)&&r!==t&&dt(n,r,{get:()=>e[r],enumerable:!(o=Sr(e,r))||o.enumerable});return n};var Lr=n=>kr(dt({},"__esModule",{value:!0}),n);var m=(n,e,t)=>cn(n,typeof e!="symbol"?e+"":e,t);var Gn=(n,e,t)=>new Promise((o,r)=>{var s=c=>{try{a(t.next(c))}catch(l){r(l)}},i=c=>{try{a(t.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((t=t.apply(n,e)).next())});var ui={};Mr(ui,{ComponentHead:()=>We,ContextRegistry:()=>an,RegorConfig:()=>le,addUnbinder:()=>q,batch:()=>vr,collectRefs:()=>Lt,computeMany:()=>gr,computeRef:()=>br,computed:()=>yr,createApp:()=>mr,defineComponent:()=>dr,drainUnbind:()=>Qn,endBatch:()=>Fn,entangle:()=>Ye,flatten:()=>ae,getBindData:()=>Oe,html:()=>$n,isDeepRef:()=>He,isRaw:()=>Ze,isRef:()=>E,markRaw:()=>Tr,observe:()=>se,observeMany:()=>Er,observerCount:()=>Rr,onMounted:()=>hr,onUnmounted:()=>ne,pause:()=>Gt,persist:()=>xr,raw:()=>Cr,ref:()=>be,removeNode:()=>z,resume:()=>Jt,silence:()=>kt,sref:()=>ie,startBatch:()=>qn,toFragment:()=>$e,toJsonTemplate:()=>rt,trigger:()=>Y,unbind:()=>de,unref:()=>V,useScope:()=>Nt,warningHandler:()=>it,watchEffect:()=>Ve});module.exports=Lr(ui);var ze=Symbol(":regor");var de=n=>{let e=[n];for(let t=0;t<e.length;++t){let o=e[t];Ir(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Ir=n=>{let e=n[ze];if(!e)return;let t=e.unbinders;for(let o=0;o<t.length;++o)t[o]();t.length=0,n[ze]=void 0};var Ke=[],gt=!1,bt,Jn=()=>{if(gt=!1,bt=void 0,Ke.length!==0){for(let n=0;n<Ke.length;++n)de(Ke[n]);Ke.length=0}},z=n=>{n.remove(),Ke.push(n),gt||(gt=!0,bt=setTimeout(Jn,1))},Qn=()=>Gn(null,null,function*(){Ke.length===0&&!gt||(bt&&clearTimeout(bt),Jn())});var K=n=>typeof n=="function",W=n=>typeof n=="string",Xn=n=>typeof n=="undefined",fe=n=>n==null||typeof n=="undefined",X=n=>typeof n!="string"||!(n!=null&&n.trim()),Dr=Object.prototype.toString,un=n=>Dr.call(n),Ae=n=>un(n)==="[object Map]",ue=n=>un(n)==="[object Set]",ln=n=>un(n)==="[object Date]",st=n=>typeof n=="symbol",w=Array.isArray,I=n=>n!==null&&typeof n=="object";var Yn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:n=>`Component template cannot be found. selector: ${n} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:n=>`${n} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},j=(n,...e)=>{let t=Yn[n];return new Error(K(t)?t.call(Yn,...e):t)};var Tt=[],Zn=()=>{let n={onMounted:[],onUnmounted:[]};return Tt.push(n),n},Ue=n=>{let e=Tt[Tt.length-1];if(!e&&!n)throw j(2);return e},eo=n=>{let e=Ue();return n&&pn(n),Tt.pop(),e},fn=Symbol("csp"),pn=n=>{let e=n,t=e[fn];if(t){let o=Ue();if(t===o)return;o.onMounted.length>0&&t.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&t.onUnmounted.push(...o.onUnmounted);return}e[fn]=Ue()},xt=n=>n[fn];var Ne=n=>{var t,o;let e=(t=xt(n))==null?void 0:t.onUnmounted;e==null||e.forEach(r=>{r()}),(o=n.unmounted)==null||o.call(n)};var We=class{constructor(e,t,o,r,s){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"me");m(this,"emit",(e,t)=>{this.me.dispatchEvent(new CustomEvent(e,{detail:t}))});this.props=e,this.me=t,this.ctx=o,this.start=r,this.end=s}findContext(e,t=0){var r;if(t<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===t)return s;++o}}requireContext(e,t=0){let o=this.findContext(e,t);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${t}.`)}unmount(){let e=this.start.nextSibling,t=this.end;for(;e&&e!==t;)z(e),e=e.nextSibling;for(let o of this.ctx)Ne(o)}};var Oe=n=>{let e=n,t=e[ze];if(t)return t;let o={unbinders:[],data:{}};return e[ze]=o,o};var q=(n,e)=>{Oe(n).unbinders.push(e)};var to={8:n=>`Model binding requires a ref at ${n.outerHTML}`,7:n=>`Model binding is not supported on ${n.tagName} element at ${n.outerHTML}`,0:(n,e)=>`${n} binding expression is missing at ${e.outerHTML}`,1:(n,e,t)=>`invalid ${n} expression: ${e} at ${t.outerHTML}`,2:(n,e)=>`${n} requires object expression at ${e.outerHTML}`,3:(n,e)=>`${n} binder: key is empty on ${e.outerHTML}.`,4:(n,e,t,o)=>({msg:`Failed setting prop "${n}" on <${e.toLowerCase()}>: value ${t} is invalid.`,args:[o]}),5:(n,e)=>`${n} binding missing event type at ${e.outerHTML}`,6:(n,e)=>({msg:n,args:[e]})},H=(n,...e)=>{let t=to[n],o=K(t)?t.call(to,...e):t,r=it.warning;r&&(W(o)?r(o):r(o,...o.args))},it={warning:console.warn};var Et={},Ct={},no=1,oo=n=>{let e=(no++).toString();return Et[e]=n,Ct[e]=0,e},mn=n=>{Ct[n]+=1},dn=n=>{--Ct[n]===0&&(delete Et[n],delete Ct[n])},ro=n=>Et[n],hn=()=>no!==1&&Object.keys(Et).length>0,at="r-switch",Ur=n=>{let e=n.filter(o=>Be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(at))),t=new Set;return e.forEach(o=>{o.forEach(r=>r&&t.add(r))}),[...t]},Ge=(n,e)=>{if(!hn())return;let t=Ur(e);t.length!==0&&(t.forEach(mn),q(n,()=>{t.forEach(dn)}))};var Rt=()=>{},yn=(n,e,t,o)=>{let r=[];for(let s of n){let i=s.cloneNode(!0);t.insertBefore(i,o),r.push(i)}ke(e,r)},gn=Symbol("r-if"),so=Symbol("r-else"),io=n=>n[so]===1,vt=class{constructor(e){m(this,"i");m(this,"D");m(this,"K");m(this,"z");m(this,"W");m(this,"T");m(this,"R");this.i=e,this.D=e.o.p.if,this.K=Qe(e.o.p.if),this.z=e.o.p.else,this.W=e.o.p.elseif,this.T=e.o.p.for,this.R=e.o.p.pre}Ze(e,t){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(t))return!0;o=o.parentElement}return!1}N(e){let t=e.hasAttribute(this.D),o=Me(e,this.K);for(let r of o)this.b(r);return t}G(e){return e[gn]?!0:(e[gn]=!0,Me(e,this.K).forEach(t=>t[gn]=!0),!1)}b(e){if(e.hasAttribute(this.R)||this.G(e)||this.Ze(e,this.T))return;let t=e.getAttribute(this.D);if(!t){H(0,this.D,e);return}e.removeAttribute(this.D),this.O(e,t)}U(e,t,o){let r=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${t}${o!=null?o:""}`);s.insertBefore(i,e),Ge(i,r),r.forEach(c=>{z(c)}),e.remove(),t!=="if"&&(e[so]=1);let a=document.createComment(`__end__ :${t}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}de(e,t){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{yn(r,this.i,s,a)},unmount:()=>{Ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.i.m.M(r),u=l.value,f=this.de(o,t),p=Rt;return q(a,()=>{l.stop(),p(),p=Rt}),p=l.subscribe(t),[{mount:()=>{yn(s,this.i,i,c)},unmount:()=>{Ce(a,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}O(e,t){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${t} `),c=this.i.m.M(t),l=c.value,u=!1,f=this.i.m,p=f.k(),d=()=>{f.C(p,()=>{if(l()[0])u||(yn(r,this.i,s,a),u=!0),y.forEach(g=>{g.unmount(),g.isMounted=!1});else{Ce(i,a),u=!1;let g=!1;for(let C of y)!g&&C.isTrue()?(C.isMounted||(C.mount(),C.isMounted=!0),g=!0):(C.unmount(),C.isMounted=!1)}})},y=this.de(o,d),h=Rt;q(i,()=>{c.stop(),h(),h=Rt}),d(),h=c.subscribe(d)}};var Je=n=>{let e=ye(n)?n.content.childNodes:[n],t=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}t.push(r)}return t},ke=(n,e)=>{for(let t=0;t<e.length;++t){let o=e[t];o.nodeType===Node.ELEMENT_NODE&&(io(o)||n.H(o))}},Me=(n,e)=>{var o;let t=n.querySelectorAll(e);return(o=n.matches)!=null&&o.call(n,e)?[n,...t]:t},ye=n=>n instanceof HTMLTemplateElement,Be=n=>n.nodeType===Node.ELEMENT_NODE,ct=n=>n.nodeType===Node.ELEMENT_NODE,ao=n=>n instanceof HTMLSlotElement,Ee=n=>ye(n)?n.content.childNodes:n.childNodes,Ce=(n,e)=>{let t=n.nextSibling;for(;t!=null&&t!==e;){let o=t.nextSibling;z(t),t=o}},co=function(){return this()},Br=function(n){return this(n)},Pr=()=>{throw new Error("value is readonly.")},Hr={get:co,set:Br,enumerable:!0,configurable:!1},Vr={get:co,set:Pr,enumerable:!0,configurable:!1},Le=(n,e)=>{Object.defineProperty(n,"value",e?Vr:Hr)},uo=(n,e)=>{if(!n)return!1;if(n.startsWith("["))return n.substring(1,n.length-1);let t=e.length;return n.startsWith(e)?n.substring(t,n.length-t):!1},Qe=n=>`[${CSS.escape(n)}]`,wt=(n,e)=>(n.startsWith("@")&&(n=e.p.on+":"+n.slice(1)),n.includes("[")&&(n=n.replace(/[[\]]/g,e.p.dynamic)),n),bn=n=>{let e=Object.create(null);return t=>e[t]||(e[t]=n(t))},_r=/-(\w)/g,$=bn(n=>n&&n.replace(_r,(e,t)=>t?t.toUpperCase():"")),jr=/\B([A-Z])/g,Xe=bn(n=>n&&n.replace(jr,"-$1").toLowerCase()),ut=bn(n=>n&&n.charAt(0).toUpperCase()+n.slice(1));var St={mount:()=>{}};var At=n=>{var t,o;let e=(t=xt(n))==null?void 0:t.onMounted;e==null||e.forEach(r=>{r()}),(o=n.mounted)==null||o.call(n)};var Tn=Symbol("scope"),Nt=n=>{try{Zn();let e=n();pn(e);let t={context:e,unmount:()=>Ne(e),[Tn]:1};return t[Tn]=1,t}finally{eo()}},lo=n=>I(n)?Tn in n:!1;var Ot=Symbol("ref"),Z=Symbol("sref"),Mt=Symbol("raw");var E=n=>n!=null&&n[Z]===1;var xn={collectRefObj:!0,mount:({parseResult:n})=>({update:({values:e})=>{let t=n.context,o=e[0];if(I(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=t[s];a!==i&&(E(a)?a(i):t[s]=i)}}})};var ne=(n,e)=>{var t;(t=Ue(e))==null||t.onUnmounted.push(n)};var se=(n,e,t,o=!0)=>{if(!E(n))throw j(3,"observe");t&&e(n());let s=n(void 0,void 0,0,e);return o&&ne(s,!0),s};var Ye=(n,e)=>{if(n===e)return()=>{};let t=se(n,r=>e(r)),o=se(e,r=>n(r));return e(n()),()=>{t(),o()}};var Ze=n=>!!n&&n[Mt]===1;var He=n=>(n==null?void 0:n[Ot])===1;var pe=[],fo=n=>{var e;pe.length!==0&&((e=pe[pe.length-1])==null||e.add(n))},Ve=n=>{if(!n)return()=>{};let e={stop:()=>{}};return $r(n,e),ne(()=>e.stop(),!0),e.stop},$r=(n,e)=>{if(!n)return;let t=[],o=!1,r=()=>{for(let s of t)s();t=[],o=!0};e.stop=r;try{let s=new Set;if(pe.push(s),n(i=>t.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),Ve(n)});t.push(a)}}finally{pe.pop()}},kt=n=>{let e=pe.length,t=e>0&&pe[e-1];try{return t&&pe.push(null),n()}finally{t&&pe.pop()}},Lt=n=>{try{let e=new Set;return pe.push(e),{value:n(),refs:[...e]}}finally{pe.pop()}};var Y=(n,e,t)=>{if(!E(n))return;let o=n;if(o(void 0,e,1),!t)return;let r=o();if(r){if(w(r)||ue(r))for(let s of r)Y(s,e,!0);else if(Ae(r))for(let s of r)Y(s[0],e,!0),Y(s[1],e,!0);if(I(r))for(let s in r)Y(r[s],e,!0)}};function qr(n,e,t){Object.defineProperty(n,e,{value:t,enumerable:!1,writable:!0,configurable:!0})}var et=(n,e,t)=>{t.forEach(function(o){let r=n[o];qr(e,o,function(...i){let a=r.apply(this,i),c=this[Z];for(let l of c)Y(l);return a})})},It=(n,e)=>{Object.defineProperty(n,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var po=Array.prototype,Cn=Object.create(po),Fr=["push","pop","shift","unshift","splice","sort","reverse"];et(po,Cn,Fr);var mo=Map.prototype,Dt=Object.create(mo),zr=["set","clear","delete"];It(Dt,"Map");et(mo,Dt,zr);var ho=Set.prototype,Ut=Object.create(ho),Kr=["add","clear","delete"];It(Ut,"Set");et(ho,Ut,Kr);var ge={},ie=n=>{if(E(n)||Ze(n))return n;let e={auto:!0,_value:n},t=c=>I(c)?Z in c?!0:w(c)?(Object.setPrototypeOf(c,Cn),!0):ue(c)?(Object.setPrototypeOf(c,Ut),!0):Ae(c)?(Object.setPrototypeOf(c,Dt),!0):!1:!1,o=t(n),r=new Set,s=(c,l)=>{if(ge.stack&&ge.stack.length){ge.stack[ge.stack.length-1].add(a);return}r.size!==0&&kt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[Z];l||(c[Z]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(t(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(fo(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Z]=1,Le(a,!1),o&&i(n),a};var be=n=>{if(Ze(n))return n;let e;if(E(n)?(e=n,n=e()):e=ie(n),n instanceof Node||n instanceof Date||n instanceof RegExp||n instanceof Promise||n instanceof Error)return e;if(e[Ot]=1,w(n)){let t=n.length;for(let o=0;o<t;++o){let r=n[o];He(r)||(n[o]=be(r))}return e}if(!I(n))return e;for(let t of Object.entries(n)){let o=t[1];if(He(o))continue;let r=t[0];st(r)||(n[r]=null,n[r]=be(o))}return e};var yo=Symbol("modelBridge"),Bt=()=>{},Wr=n=>!!(n!=null&&n[yo]),Gr=n=>{n[yo]=1},Jr=n=>{let e=be(n());return Gr(e),e},go={collectRefObj:!0,mount:({parseResult:n,option:e})=>{if(typeof e!="string"||!e)return Bt;let t=$(e),o,r,s=Bt,i=()=>{s(),s=Bt,o=void 0,r=void 0},a=()=>{s(),s=Bt},c=(u,f)=>{o!==u&&(a(),s=Ye(u,f),o=u)},l=()=>{var d;let u=(d=n.refs[0])!=null?d:n.value()[0],f=n.context,p=f[t];if(!E(u)){if(r&&p===r){r(u);return}if(i(),E(p)){p(u);return}f[t]=u;return}if(Wr(u)){if(p===u)return;E(p)?c(u,p):f[t]=u;return}r||(r=Jr(u)),f[t]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Pt=class{constructor(e){m(this,"i");m(this,"ye");m(this,"he","");m(this,"ge",-1);this.i=e,this.ye=e.o.p.inherit}N(e){this.et(e)}tt(e){if(this.ge!==e.size){let t=[...e.keys()];this.he=[...t,...t.map(Xe)].join(","),this.ge=e.size}return this.he}nt(e){var t;for(let o=0;o<e.length;++o){let r=(t=e[o])==null?void 0:t.components;if(r)for(let s in r)return!0}return!1}et(e){var p;let t=this.i,o=t.m,r=t.o.be,s=t.o.j;if(r.size===0&&!this.nt(o.l))return;let i=o.J(),a=o.ot(),c=this.tt(r),l=[...c?[c]:[],...a,...a.map(Xe)].join(",");if(X(l))return;let u=e.querySelectorAll(l),f=(p=e.matches)!=null&&p.call(e,l)?[e,...u]:u;for(let d of f){if(d.hasAttribute(t.R))continue;let y=d.parentNode;if(!y)continue;let h=d.nextSibling,R=$(d.tagName).toUpperCase(),g=i[R],C=g!=null?g:s.get(R);if(!C)continue;let D=C.template;if(!D)continue;let G=d.parentElement;if(!G)continue;let M=new Comment(" begin component: "+d.tagName),_=new Comment(" end component: "+d.tagName);G.insertBefore(M,d),d.remove();let ce=t.o.p.context,ee=t.o.p.contextAlias,U=t.o.p.bind,b=(x,T)=>{let v={},F=x.hasAttribute(ce);return o.C(T,()=>{o.v(v),F?t.b(xn,x,ce):x.hasAttribute(ee)&&t.b(xn,x,ee);let B=C.props;if(!B||B.length===0)return;B=B.map($);let N=new Map(B.map(S=>[S.toLowerCase(),S]));for(let S of[...B,...B.map(Xe)]){let P=x.getAttribute(S);P!==null&&(v[$(S)]=P,x.removeAttribute(S))}let L=t._.xe(x,!1);for(let[S,P]of L.entries()){let[re,De]=P.Q;if(!De)continue;let Fe=N.get($(De).toLowerCase());Fe&&(re!=="."&&re!==":"&&re!==U||t.b(go,x,S,!0,Fe,P.X))}}),v},A=[...o.k()],J=()=>{var F;let x=b(d,A),T=new We(x,d,A,M,_),v=Nt(()=>{var B;return(B=C.context(T))!=null?B:{}}).context;if(T.autoProps){for(let[B,N]of Object.entries(x))if(B in v){let L=v[B];if(L===N)continue;if(E(L)){E(N)?T.entangle?q(M,Ye(N,L)):L(N()):L(N);continue}}else v[B]=N;(F=T.onAutoPropsAssigned)==null||F.call(T)}return{componentCtx:v,head:T}},{componentCtx:me,head:qe}=J(),Te=[...Ee(D)],k=Te.length,mt=d.childNodes.length===0,O=x=>{let T=x.parentElement;if(mt){for(let N of[...x.childNodes])T.insertBefore(N,x);return}let v=x.name;X(v)&&(v=x.getAttributeNames().filter(N=>N.startsWith("#"))[0],X(v)?v="default":v=v.substring(1));let F=d.querySelector(`template[name='${v}'], template[\\#${v}]`);!F&&v==="default"&&(F=d.querySelector("template:not([name])"),F&&F.getAttributeNames().filter(N=>N.startsWith("#")).length>0&&(F=null));let B=N=>{qe.enableSwitch&&o.C(A,()=>{o.v(me);let L=b(x,o.k());o.C(A,()=>{o.v(L);let S=o.k(),P=oo(S);for(let re of N)Be(re)&&(re.setAttribute(at,P),mn(P),q(re,()=>{dn(P)}))})})};if(F){let N=[...Ee(F)];for(let L of N)T.insertBefore(L,x);B(N)}else{if(v!=="default"){for(let L of[...Ee(x)])T.insertBefore(L,x);return}let N=[...Ee(d)].filter(L=>!ye(L));for(let L of N)T.insertBefore(L,x);B(N)}},Q=x=>{if(!Be(x))return;let T=x.querySelectorAll("slot");if(ao(x)){O(x),x.remove();return}for(let v of T)O(v),v.remove()};(()=>{for(let x=0;x<k;++x)Te[x]=Te[x].cloneNode(!0),y.insertBefore(Te[x],h),Q(Te[x])})(),G.insertBefore(_,h);let te=()=>{if(!C.inheritAttrs)return;let x=Te.filter(v=>v.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(v=>v.hasAttribute(this.ye)));let T=x[0];if(T)for(let v of d.getAttributeNames()){if(v===ce||v===ee)continue;let F=d.getAttribute(v);if(v==="class")T.classList.add(...F.split(" "));else if(v==="style"){let B=T.style,N=d.style;for(let L of N)B.setProperty(L,N.getPropertyValue(L))}else T.setAttribute(wt(v,t.o),F)}},xe=()=>{for(let x of d.getAttributeNames())!x.startsWith("@")&&!x.startsWith(t.o.p.on)&&d.removeAttribute(x)},Se=()=>{te(),xe(),o.v(me),t.Te(d,!1),me.$emit=qe.emit,ke(t,Te),q(d,()=>{Ne(me)}),q(M,()=>{de(d)}),At(me)};o.C(A,Se)}}};var En=class{constructor(e,t){m(this,"Q");m(this,"X");m(this,"Re",[]);this.Q=e,this.X=t}},Ht=class{constructor(e){m(this,"i");m(this,"Ce");m(this,"Ee");m(this,"Y");var o;this.i=e,this.Ce=e.o.rt(),this.Y=new Map;let t=new Map;for(let r of this.Ce){let s=(o=r[0])!=null?o:"",i=t.get(s);i?i.push(r):t.set(s,[r])}this.Ee=t}ve(e){let t=this.Y.get(e);if(t)return t;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);X(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let d=c[p];if(!l&&d==="camel"?l=!0:!u&&d==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=$(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.Y.set(e,f),f}xe(e,t){let o=new Map;if(!ct(e))return o;let r=this.Ee,s=(c,l)=>{var f;let u=r.get((f=l[0])!=null?f:"");if(u)for(let p=0;p<u.length;++p){if(!l.startsWith(u[p]))continue;let d=o.get(l);if(!d){let y=this.ve(l);d=new En(y.terms,y.flags),o.set(l,d)}d.Re.push(c);return}},i=c=>{var u;let l=c.attributes;if(!(!l||l.length===0))for(let f=0;f<l.length;++f){let p=(u=l.item(f))==null?void 0:u.name;p&&s(c,p)}};if(i(e),!t||!e.firstElementChild)return o;let a=e.querySelectorAll("*");for(let c of a)i(c);return o}};var bo=()=>{},Qr=(n,e)=>{for(let t of n){let o=t.cloneNode(!0);e.appendChild(o)}},Vt=class{constructor(e){m(this,"i");m(this,"L");m(this,"we");this.i=e,this.L=e.o.p.is,this.we=Qe(this.L)+", [is]"}N(e){let t=e.hasAttribute(this.L),o=Me(e,this.we);for(let r of o)this.b(r);return t}b(e){let t=e.getAttribute(this.L);if(!t){if(t=e.getAttribute("is"),!t)return;if(!t.startsWith("regor:")){if(!t.startsWith("r-"))return;let o=t.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.i.H(s);return}t=`'${t.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.L),this.O(e,t)}U(e,t){let o=Je(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${t!=null?t:""}`);r.insertBefore(s,e),Ge(s,o),o.forEach(a=>{z(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${t!=null?t:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}O(e,t){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${t} `),a=this.i.m.M(t),c=a.value,l=this.i.m,u=l.k(),f={name:""},p=ye(e)?o:[...o[0].childNodes],d=()=>{l.C(u,()=>{var C;let R=c()[0];if(I(R)&&(R.name?R=R.name:R=(C=Object.entries(l.J()).filter(D=>D[1]===R)[0])==null?void 0:C[0]),!W(R)||X(R)){Ce(s,i);return}if(f.name===R)return;Ce(s,i);let g=document.createElement(R);for(let D of e.getAttributeNames())D!==this.L&&g.setAttribute(D,e.getAttribute(D));Qr(p,g),r.insertBefore(g,i),this.i.H(g),f.name=R})},y=bo;q(s,()=>{a.stop(),y(),y=bo}),d(),y=a.subscribe(d)}};var V=n=>{let e=n;return e!=null&&e[Z]===1?e():e};var Xr=(n,e)=>{let[t,o]=e;K(o)?o(n,t):n.innerHTML=t==null?void 0:t.toString()},_t={mount:()=>({update:({el:n,values:e})=>{Xr(n,e)}})};var jt=class n{constructor(e){m(this,"Z");this.Z=e}static st(e,t){var d,y;let o=e.m,r=e.o,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.P,c=o.J();if(Object.keys(c).length>0||r.j.size>0)return;let l=e._,u=[],f=0,p=[];for(let h=t.length-1;h>=0;--h)p.push(t[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let g=h;if(g.tagName==="TEMPLATE"||g.tagName.includes("-"))return;let C=$(g.tagName).toUpperCase();if(r.j.has(C)||c[C])return;let D=g.attributes;for(let G=0;G<D.length;++G){let M=(d=D.item(G))==null?void 0:d.name;if(!M)continue;if(i.has(M))return;let{terms:_,flags:ce}=l.ve(M),[ee,U]=_,b=(y=a[M])!=null?y:a[ee];if(b){if(b===_t)return;u.push({nodeIndex:f,attrName:M,directive:b,option:U,flags:ce})}}++f}let R=h.childNodes;for(let g=R.length-1;g>=0;--g)p.push(R[g])}if(u.length!==0)return new n(u)}b(e,t){let o=[],r=[];for(let s=t.length-1;s>=0;--s)r.push(t[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.Z.length;++s){let i=this.Z[s],a=o[i.nodeIndex];a&&e.b(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var Yr=(n,e)=>{let t=e.parentNode;if(t)for(let o=0;o<n.items.length;++o)t.insertBefore(n.items[o],e)},Zr=n=>{var a;let e=n.length,t=n.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=n[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||n[u]<l){t[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,n[o[i]]<l?r=i+1:s=i;l<n[o[r]]&&(r>0&&(t[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=t[s];return o},$t=class{static it(e){let{oldItems:t,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=t.length,u=o.length,f=new Array(u),p=new Set;for(let b=0;b<u;++b){let A=r(o[b]);if(A===void 0||p.has(A))return;p.add(A),f[b]=A}let d=new Array(u),y=0,h=l-1,R=u-1;for(;y<=h&&y<=R;){let b=t[y];if(r(b.value)!==f[y]||!s(b.value,o[y]))break;b.value=o[y],d[y]=b,++y}for(;y<=h&&y<=R;){let b=t[h];if(r(b.value)!==f[R]||!s(b.value,o[R]))break;b.value=o[R],d[R]=b,--h,--R}if(y>h){for(let b=R;b>=y;--b){let A=b+1<u?d[b+1].items[0]:c;d[b]=i(b,o[b],A)}return d}if(y>R){for(let b=y;b<=h;++b)a(t[b]);return d}let g=y,C=y,D=R-C+1,G=new Array(D).fill(0),M=new Map;for(let b=C;b<=R;++b)M.set(f[b],b);let _=!1,ce=0;for(let b=g;b<=h;++b){let A=t[b],J=M.get(r(A.value));if(J===void 0){a(A);continue}if(!s(A.value,o[J])){a(A);continue}A.value=o[J],d[J]=A,G[J-C]=b+1,J>=ce?ce=J:_=!0}let ee=_?Zr(G):[],U=ee.length-1;for(let b=D-1;b>=0;--b){let A=C+b,J=A+1<u?d[A+1].items[0]:c;if(G[b]===0){d[A]=i(A,o[A],J);continue}let me=d[A];_&&(U>=0&&ee[U]===b?--U:me&&Yr(me,J))}return d}};var lt=class{constructor(e){m(this,"x",[]);m(this,"V",new Map);m(this,"ee");this.ee=e}get w(){return this.x.length}te(e){let t=this.ee(e.value);t!==void 0&&this.V.set(t,e)}ne(e){var o;let t=this.ee((o=this.x[e])==null?void 0:o.value);t!==void 0&&this.V.delete(t)}static at(e,t){return{items:[],index:e,value:t,order:-1}}v(e){e.order=this.w,this.x.push(e),this.te(e)}ct(e,t){let o=this.w;for(let r=e;r<o;++r)this.x[r].order=r+1;t.order=e,this.x.splice(e,0,t),this.te(t)}I(e){return this.x[e]}oe(e,t){this.ne(e),this.x[e]=t,this.te(t),t.order=e}Se(e){this.ne(e),this.x.splice(e,1);let t=this.w;for(let o=e;o<t;++o)this.x[o].order=o}Ae(e){let t=this.w;for(let o=e;o<t;++o)this.ne(o);this.x.splice(e)}Gt(e){return this.V.has(e)}ut(e){var o;let t=this.V.get(e);return(o=t==null?void 0:t.order)!=null?o:-1}};var Rn=Symbol("r-for"),es=n=>-1,To=()=>{},Ft=class Ft{constructor(e){m(this,"i");m(this,"T");m(this,"re");m(this,"R");this.i=e,this.T=e.o.p.for,this.re=Qe(this.T),this.R=e.o.p.pre}N(e){let t=e.hasAttribute(this.T),o=Me(e,this.re);for(let r of o)this.pt(r);return t}G(e){return e[Rn]?!0:(e[Rn]=!0,Me(e,this.re).forEach(t=>t[Rn]=!0),!1)}pt(e){if(e.hasAttribute(this.R)||this.G(e))return;let t=e.getAttribute(this.T);if(!t){H(0,this.T,e);return}e.removeAttribute(this.T),this.lt(e,t)}Ne(e){return fe(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}lt(e,t){var mt;let o=this.ft(t);if(!(o!=null&&o.list)){H(1,this.T,t,e);return}let r=this.i.o.p.key,s=this.i.o.p.keyBind,i=(mt=e.getAttribute(r))!=null?mt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Je(e),c=jt.st(this.i,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${t}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Ge(f,a),a.forEach(O=>{z(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let d=this.i,y=d.m,h=y.k(),g=h.length===1?[void 0,h[0]]:void 0,C=this.mt(i),D=(O,Q)=>C(O)===C(Q),G=(O,Q)=>O===Q,M=(O,Q,oe)=>{let te=o.createContext(Q,O),xe=lt.at(te.index,Q),Se=()=>{var F,B;let x=(B=(F=p.parentNode)!=null?F:f.parentNode)!=null?B:l,T=oe.previousSibling,v=[];for(let N=0;N<a.length;++N){let L=a[N].cloneNode(!0);x.insertBefore(L,oe),v.push(L)}for(c?c.b(d,v):ke(d,v),T=T.nextSibling;T!==oe;)xe.items.push(T),T=T.nextSibling};return g?(g[0]=te.ctx,y.C(g,Se)):y.C(h,()=>{y.v(te.ctx),Se()}),xe},_=(O,Q)=>{let oe=k.I(O).items,te=oe[oe.length-1].nextSibling;for(let xe of oe)z(xe);k.oe(O,M(O,Q,te))},ce=(O,Q)=>{k.v(M(O,Q,p))},ee=O=>{for(let Q of k.I(O).items)z(Q)},U=O=>{let Q=k.w;for(let oe=O;oe<Q;++oe)k.I(oe).index(oe)},b=O=>{let Q=f.parentNode,oe=p.parentNode;if(!Q||!oe)return;let te=k.w;K(O)&&(O=O());let xe=V(O[0]);if(w(xe)&&xe.length===0){Ce(f,p),k.Ae(0);return}let Se=[];for(let S of this.Ne(O[0]))Se.push(S);let x=$t.it({oldItems:k.x,newValues:Se,getKey:C,isSameValue:G,mountNewValue:(S,P,re)=>M(S,P,re),removeMountItem:S=>{for(let P=0;P<S.items.length;++P)z(S.items[P])},endAnchor:p});if(x){k.x=x,k.V.clear();for(let S=0;S<x.length;++S){let P=x[S];P.order=S,P.index(S);let re=C(P.value);re!==void 0&&k.V.set(re,P)}return}let T=0,v=Number.MAX_SAFE_INTEGER,F=te,B=this.i.o.forGrowThreshold,N=()=>k.w<F+B;for(let S of Se){let P=()=>{if(T<te){let re=k.I(T++);if(D(re.value,S)){if(G(re.value,S))return;_(T-1,S);return}let De=k.ut(C(S));if(De>=T&&De-T<10){if(--T,v=Math.min(v,T),ee(T),k.Se(T),--te,De>T+1)for(let Fe=T;Fe<De-1&&Fe<te&&!D(k.I(T).value,S);)++Fe,ee(T),k.Se(T),--te;P();return}N()?(k.ct(T-1,M(T,S,k.I(T-1).items[0])),v=Math.min(v,T-1),++te):_(T-1,S)}else ce(T++,S)};P()}let L=T;for(te=k.w;T<te;)ee(T++);k.Ae(L),U(v)},A=()=>{J.stop(),qe(),qe=To},J=y.M(o.list),me=J.value,qe=To,Te=0,k=new lt(C);for(let O of this.Ne(me()[0]))k.v(M(Te++,O,p));q(f,A),qe=J.subscribe(b)}ft(e){var c,l;let t=Ft.dt.exec(e);if(!t)return;let o=(t[1]+((c=t[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=t[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},d=V(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(d)){let h=0;for(let R of o)p[R]=d[h++]}else for(let h of o)p[h]=d[h];let y={ctx:p,index:es};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=ie(f)),y}}}mt(e){if(!e)return o=>o;let t=e.trim();if(!t)return o=>o;if(t.includes(".")){let o=this.yt(t),r=o.length>1?o.slice(1):void 0;return s=>{let i=V(s),a=this.Oe(i,o);return a!==void 0||!r?a:this.Oe(i,r)}}return o=>{var r;return V((r=V(o))==null?void 0:r[t])}}yt(e){return e.split(".").filter(t=>t.length>0)}Oe(e,t){var r;let o=e;for(let s of t)o=(r=V(o))==null?void 0:r[s];return V(o)}};m(Ft,"dt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var qt=Ft;var zt=class{constructor(e){m(this,"se",0);m(this,"ie",new Map);m(this,"m");m(this,"Me");m(this,"ke");m(this,"Le");m(this,"Ve");m(this,"_");m(this,"o");m(this,"R");m(this,"Ie");this.m=e,this.o=e.o,this.ke=new qt(this),this.Me=new vt(this),this.Le=new Vt(this),this.Ve=new Pt(this),this._=new Ht(this),this.R=this.o.p.pre,this.Ie=this.o.p.dynamic}ht(e){let t=ye(e)?[e]:e.querySelectorAll("template");for(let o of t){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);ke(this,i)}}H(e){++this.se;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Me.N(e)||this.ke.N(e)||this.Le.N(e))return;this.Ve.N(e),this.ht(e),this.Te(e,!0)}finally{--this.se,this.se===0&&this.gt()}}bt(e,t){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(t)}De(e,t){let o=this.bt(e,t);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${t}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,q(s,()=>{z(e)}),o.appendChild(e),!0}xt(e,t){this.ie.set(e,t)}gt(){let e=this.ie;if(e.size!==0){this.ie=new Map;for(let[t,o]of e.entries())this.De(t,o)}}Te(e,t){var s;let o=this._.xe(e,t),r=this.o.P;for(let[i,a]of o.entries()){let[c,l]=a.Q,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.Re;for(let p=0;p<f.length;++p){let d=f[p];this.b(u,d,i,!1,l,a.X)}}}b(e,t,o,r,s,i){if(t.hasAttribute(this.R))return;let a=t.getAttribute(o);t.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(at);if(f)return f;u=u.parentElement}return null};if(hn()){let l=c(t);if(l){this.m.C(ro(l),()=>{this.O(e,t,a,s,i)});return}}this.O(e,t,a,s,i)}Tt(e,t,o){return e!==St?!1:(X(o)||this.De(t,o)||this.xt(t,o),!0)}O(e,t,o,r,s){if(t.nodeType!==Node.ELEMENT_NODE||o==null||this.Tt(e,t,o))return;let i=this.Rt(r,e.once),a=this.Ct(e,o),c=this.Et(a,i);q(t,c.stop);let l=this.vt(t,o,a,i,r,s),u=this.wt(e,l,c);if(!u)return;let f=this.St(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}Rt(e,t){let o=uo(e,this.Ie);if(o)return this.m.M($(o),void 0,void 0,void 0,t)}Ct(e,t){return this.m.M(t,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Et(e,t){let o={stop:()=>{var r,s,i;e.stop(),t==null||t.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}vt(e,t,o,r,s,i){return{el:e,expr:t,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}wt(e,t,o){let r=e.mount(t);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}St(e,t,o,r,s){let i,a;return()=>{let c=t.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var xo="http://www.w3.org/1999/xlink",ts={itemscope:2,allowfullscreen:2,formnovalidate:2,ismap:2,nomodule:2,novalidate:2,readonly:2,async:1,autofocus:1,autoplay:1,controls:1,default:1,defer:1,disabled:1,hidden:1,inert:1,loop:1,open:1,required:1,reversed:1,scoped:1,seamless:1,checked:1,muted:1,multiple:1,selected:1};function ns(n){return!!n||n===""}var os=(n,e,t,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=$(o)),Kt(n,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=t==null?void 0:t[c])==null?void 0:a[0],f=l[0],p=l[1];Kt(n,f,p,u)}else if(I(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],d=t==null?void 0:t[c],y=d&&f in d?f:void 0;Kt(n,f,p,y)}else{let u=t==null?void 0:t[c],f=e[c++],p=e[c];Kt(n,f,p,u)}}},vn={mount:()=>({update:({el:n,values:e,previousValues:t,option:o,previousOption:r,flags:s})=>{os(n,e,t,o,r,s)}})},Kt=(n,e,t,o)=>{if(o&&o!==e&&n.removeAttribute(o),fe(e)){H(3,"r-bind",n);return}if(!W(e)){H(6,`Attribute key is not string at ${n.outerHTML}`,e);return}if(e.startsWith("xlink:")){fe(t)?n.removeAttributeNS(xo,e.slice(6,e.length)):n.setAttributeNS(xo,e,t);return}let r=e in ts;fe(t)||r&&!ns(t)?n.removeAttribute(e):n.setAttribute(e,r?"":t)};var rs=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Co(n,s[c],i==null?void 0:i[c])}else Co(n,s,i)}},wn={mount:()=>({update:({el:n,values:e,previousValues:t})=>{rs(n,e,t)}})},Co=(n,e,t)=>{let o=n.classList,r=W(e),s=W(t);if(e&&!r){if(t&&!s)for(let i in t)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?t!==e&&(s&&o.remove(...t.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):t&&s&&o.remove(...t.trim().split(/\s+/))};function ss(n,e){if(n.length!==e.length)return!1;let t=!0;for(let o=0;t&&o<n.length;o++)t=Re(n[o],e[o]);return t}function Re(n,e){if(n===e)return!0;let t=ln(n),o=ln(e);if(t||o)return t&&o?n.getTime()===e.getTime():!1;if(t=st(n),o=st(e),t||o)return n===e;if(t=w(n),o=w(e),t||o)return t&&o?ss(n,e):!1;if(t=I(n),o=I(e),t||o){if(!t||!o)return!1;let r=Object.keys(n).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in n){let a=Object.prototype.hasOwnProperty.call(n,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Re(n[i],e[i]))return!1}return!0}return String(n)===String(e)}function Wt(n,e){return n.findIndex(t=>Re(t,e))}var Eo=n=>{let e=parseFloat(n);return isNaN(e)?n:e};var Gt=n=>{if(!E(n))throw j(3,"pause");n(void 0,void 0,3)};var Jt=n=>{if(!E(n))throw j(3,"resume");n(void 0,void 0,4)};var vo={mount:({el:n,parseResult:e,flags:t})=>({update:({values:o})=>{is(n,o[0])},unmount:as(n,e,t)})},is=(n,e)=>{let t=No(n);if(t&&wo(n))w(e)?e=Wt(e,ve(n))>-1:ue(e)?e=e.has(ve(n)):e=ms(n,e),n.checked=e;else if(t&&So(n))n.checked=Re(e,ve(n));else if(t||Oo(n))Ao(n)?n.value!==(e==null?void 0:e.toString())&&(n.value=e):n.value!==e&&(n.value=e);else if(Mo(n)){let o=n.options,r=o.length,s=n.multiple;for(let i=0;i<r;i++){let a=o[i],c=ve(a);if(s)w(e)?a.selected=Wt(e,c)>-1:a.selected=e.has(c);else if(Re(ve(a),e)){n.selectedIndex!==i&&(n.selectedIndex=i);return}}!s&&n.selectedIndex!==-1&&(n.selectedIndex=-1)}else H(7,n)},ft=n=>(E(n)&&(n=n()),K(n)&&(n=n()),n?W(n)?{trim:n.includes("trim"),lazy:n.includes("lazy"),number:n.includes("number"),int:n.includes("int")}:{trim:!!n.trim,lazy:!!n.lazy,number:!!n.number,int:!!n.int}:{trim:!1,lazy:!1,number:!1,int:!1}),wo=n=>n.type==="checkbox",So=n=>n.type==="radio",Ao=n=>n.type==="number"||n.type==="range",No=n=>n.tagName==="INPUT",Oo=n=>n.tagName==="TEXTAREA",Mo=n=>n.tagName==="SELECT",as=(n,e,t)=>{let o=e.value,r=ft(t==null?void 0:t.join(",")),s=ft(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,n),()=>{};let a=()=>e.refs[0],c=No(n);return c&&wo(n)?us(n,a):c&&So(n)?ds(n,a):c||Oo(n)?cs(n,i,a,o):Mo(n)?hs(n,a,o):(H(7,n),()=>{})},Ro=/[.,' ·٫]/,cs=(n,e,t,o)=>{let s=e.lazy?"change":"input",i=Ao(n),a=()=>{!e.trim&&!ft(o()[1]).trim||(n.value=n.value.trim())},c=p=>{let d=p.target;d.composing=1},l=p=>{let d=p.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},u=()=>{n.removeEventListener(s,f),n.removeEventListener("change",a),n.removeEventListener("compositionstart",c),n.removeEventListener("compositionend",l),n.removeEventListener("change",l)},f=p=>{let d=t();if(!d)return;let y=p.target;if(!y||y.composing)return;let h=y.value,R=ft(o()[1]);if(i||R.number||R.int){if(R.int)h=parseInt(h);else{if(Ro.test(h[h.length-1])&&h.split(Ro).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(d()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),n.value=h}else R.trim&&(h=h.trim());d(h)};return n.addEventListener(s,f),n.addEventListener("change",a),n.addEventListener("compositionstart",c),n.addEventListener("compositionend",l),n.addEventListener("change",l),u},us=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n),a=n.checked,c=s();if(w(c)){let l=Wt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else ue(c)?a?c.add(i):c.delete(i):s(ps(n,a))};return n.addEventListener(t,r),o},ve=n=>"_value"in n?n._value:n.value,ko="trueValue",ls="falseValue",Lo="true-value",fs="false-value",ps=(n,e)=>{let t=e?ko:ls;if(t in n)return n[t];let o=e?Lo:fs;return n.hasAttribute(o)?n.getAttribute(o):e},ms=(n,e)=>{if(ko in n)return Re(e,n.trueValue);let o=Lo;return n.hasAttribute(o)?Re(e,n.getAttribute(o)):Re(e,!0)},ds=(n,e)=>{let t="change",o=()=>{n.removeEventListener(t,r)},r=()=>{let s=e();if(!s)return;let i=ve(n);s(i)};return n.addEventListener(t,r),o},hs=(n,e,t)=>{let o="change",r=()=>{n.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=ft(t()[1]).number,l=Array.prototype.filter.call(n.options,u=>u.selected).map(u=>c?Eo(ve(u)):ve(u));if(n.multiple){let u=i();try{if(Gt(i),ue(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{Jt(i),Y(i)}}else i(l[0])};return n.addEventListener(o,s),r};var ys=["stop","prevent","capture","self","once","left","right","middle","passive"],gs=n=>{let e={};if(X(n))return;let t=n.split(",");for(let o of ys)e[o]=t.includes(o);return e},bs=(n,e,t,o,r)=>{var l,u;if(o){let f=e.value(),p=V(o.value()[0]);return W(p)?Sn(n,$(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(t){let f=e.value();return Sn(n,$(t),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(K(p)&&(p=p()),I(p))for(let d of Object.entries(p)){let y=d[0],h=()=>{let g=e.value()[f];return K(g)&&(g=g()),g=g[y],K(g)&&(g=g()),g},R=p[y+"_flags"];s.push(Sn(n,y,h,R))}else H(2,"r-on",n)}return i},An={isLazy:(n,e)=>e===-1&&n%2===0,isLazyKey:(n,e)=>e===0&&!n.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:n,parseResult:e,option:t,dynamicOption:o,flags:r})=>bs(n,e,t,o,r)},Ts=(n,e)=>{if(n.startsWith("keydown")||n.startsWith("keyup")||n.startsWith("keypress")){e!=null||(e="");let t=[...n.split("."),...e.split(",")];n=t[0];let o=t[1],r=t.includes("ctrl"),s=t.includes("shift"),i=t.includes("alt"),a=t.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[n,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[n,c]}return[n,t=>!0]},Sn=(n,e,t,o)=>{if(X(e))return H(5,"r-on",n),()=>{};let r=gs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Ts(e,o);let a=u=>{if(!i(u)||!t&&e==="submit"&&(r!=null&&r.prevent))return;let f=t(u);K(f)&&(f=f(u)),K(f)&&f(u)},c=()=>{n.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==n)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return n.addEventListener(e,l,s),c};var xs=(n,e,t,o)=>{if(t){o&&o.includes("camel")&&(t=$(t)),tt(n,t,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];tt(n,a,c)}else if(I(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];tt(n,c,l)}else{let a=e[s++],c=e[s];tt(n,a,c)}}},Io={mount:()=>({update:({el:n,values:e,option:t,flags:o})=>{xs(n,e,t,o)}})};function Cs(n){return!!n||n===""}var tt=(n,e,t)=>{if(fe(e)){H(3,":prop",n);return}if(e==="innerHTML"||e==="textContent"){let s=[...n.childNodes];setTimeout(()=>s.forEach(de),1),n[e]=t!=null?t:"";return}let o=n.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){n._value=t;let s=o==="OPTION"?n.getAttribute("value"):n.value,i=t!=null?t:"";s!==i&&(n.value=i),t==null&&n.removeAttribute(e);return}let r=!1;if(t===""||t==null){let s=typeof n[e];s==="boolean"?t=Cs(t):t==null&&s==="string"?(t="",r=!0):s==="number"&&(t=0,r=!0)}try{n[e]=t}catch(s){r||H(4,e,o,t,s)}r&&n.removeAttribute(e)};var Do={once:!0,mount:({el:n,parseResult:e,expr:t})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(n):i?i==null||i(n):o.context[t]=n,()=>{if(s){let a=r.indexOf(n);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Es=(n,e)=>{let t=Oe(n).data,o=t._ord;Xn(o)&&(o=t._ord=n.style.display),!!e[0]?n.style.display=o:n.style.display="none"},Uo={mount:()=>({update:({el:n,values:e})=>{Es(n,e)}})};var Rs=(n,e,t)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=t==null?void 0:t[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Bo(n,s[c],i==null?void 0:i[c])}else Bo(n,s,i)}},Qt={mount:()=>({update:({el:n,values:e,previousValues:t})=>{Rs(n,e,t)}})},Bo=(n,e,t)=>{let o=n.style,r=W(e);if(e&&!r){if(t&&!W(t))for(let s in t)e[s]==null&&On(o,s,"");for(let s in e)On(o,s,e[s])}else{let s=o.display;if(r?t!==e&&(o.cssText=e):t&&n.removeAttribute("style"),"_ord"in Oe(n).data)return;o.display=s}},Po=/\s*!important$/;function On(n,e,t){if(w(t))t.forEach(o=>{On(n,e,o)});else if(t==null&&(t=""),e.startsWith("--"))n.setProperty(e,t);else{let o=vs(n,e);Po.test(t)?n.setProperty(Xe(o),t.replace(Po,""),"important"):n[o]=t}}var Ho=["Webkit","Moz","ms"],Nn={};function vs(n,e){let t=Nn[e];if(t)return t;let o=$(e);if(o!=="filter"&&o in n)return Nn[e]=o;o=ut(o);for(let r=0;r<Ho.length;r++){let s=Ho[r]+o;if(s in n)return Nn[e]=s}return e}var ae=n=>Vo(V(n)),Vo=(n,e=new WeakMap)=>{if(!n||!I(n))return n;if(w(n))return n.map(ae);if(ue(n)){let o=new Set;for(let r of n.keys())o.add(ae(r));return o}if(Ae(n)){let o=new Map;for(let r of n)o.set(ae(r[0]),ae(r[1]));return o}if(e.has(n))return V(e.get(n));let t=yt({},n);e.set(n,t);for(let o of Object.entries(t))t[o[0]]=Vo(V(o[1]),e);return t};var ws=(n,e)=>{var o;let t=e[0];n.textContent=ue(t)?JSON.stringify(ae([...t])):Ae(t)?JSON.stringify(ae([...t])):I(t)?JSON.stringify(ae(t)):(o=t==null?void 0:t.toString())!=null?o:""},_o={mount:()=>({update:({el:n,values:e})=>{ws(n,e)}})};var jo={mount:()=>({update:({el:n,values:e})=>{tt(n,"value",e[0])}})};var Ie=class Ie{constructor(e){m(this,"P",{});m(this,"p",{});m(this,"rt",()=>Object.keys(this.P).filter(e=>e.length===1||!e.startsWith(":")));m(this,"be",new Map);m(this,"j",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Nt()}static getDefault(){var e;return(e=Ie.Ue)!=null?e:Ie.Ue=new Ie}Nt(){let e={},t=globalThis;for(let o of Ie.At.split(","))e[o]=t[o];return e.ref=be,e.sref=ie,e.flatten=ae,e}addComponent(...e){for(let t of e){if(!t.defaultName){it.warning("Registered component's default name is not defined",t);continue}this.be.set(ut(t.defaultName),t),this.j.set(ut(t.defaultName).toLocaleUpperCase(),t)}}setDirectives(e){this.P={".":Io,":":vn,"@":An,[`${e}on`]:An,[`${e}bind`]:vn,[`${e}html`]:_t,[`${e}text`]:_o,[`${e}show`]:Uo,[`${e}model`]:vo,":style":Qt,[`${e}style`]:Qt,[`${e}bind:style`]:Qt,":class":wn,[`${e}bind:class`]:wn,":ref":Do,":value":jo,[`${e}teleport`]:St},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.P,this.p)}};m(Ie,"Ue"),m(Ie,"At","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var le=Ie;var Xt=(n,e)=>{if(!n)return;let o=(e!=null?e:le.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of As(n,o.pre,s))Ss(i,o.text,r,s)},Ss=(n,e,t,o)=>{var c;let r=n.textContent;if(!r)return;let s=t,i=r.split(s);if(i.length<=1)return;if(((c=n.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=$o(l,o);if(u&&X(i[0])&&X(i[2])){let f=n.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=$o(l,o);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}n.replaceWith(a)},As=(n,e,t)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)t.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Ee(s))r(a)}};return r(n),o},$o=(n,e)=>e.find(t=>n.startsWith(t.start)&&n.endsWith(t.end));var Ns=9,Os=10,Ms=13,ks=32,we=46,Yt=44,Ls=39,Is=34,Zt=40,nt=41,en=91,Mn=93,kn=63,Ds=59,qo=58,Fo=123,tn=125,_e=43,nn=45,Ln=96,zo=47,In=92,Ko=new Set([2,3]),Yo={"=":2.5,"*=":2.5,"**=":2.5,"/=":2.5,"%=":2.5,"+=":2.5,"-=":2.5,"<<=":2.5,">>=":2.5,">>>=":2.5,"&=":2.5,"^=":2.5,"|=":2.5},Us=Wn(yt({"=>":2},Yo),{"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13}),Zo=Object.keys(Yo),Bs=new Set(Zo),Un=new Set(["=>"]);Zo.forEach(n=>Un.add(n));var Wo={true:!0,false:!1,null:null},Ps="this",ot="Expected ",je="Unexpected ",Pn="Unclosed ",Hs=ot+":",Go=ot+"expression",Vs="missing }",_s=je+"object property",js=Pn+"(",Jo=ot+"comma",Qo=je+"token ",$s=je+"period",Dn=ot+"expression after ",qs="missing unaryOp argument",Fs=Pn+"[",zs=ot+"exponent (",Ks="Variable names cannot start with a number (",Ws=Pn+'quote after "',pt=n=>n>=48&&n<=57,Xo=n=>Us[n],Bn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get B(){return this.u.charAt(this.e)}get y(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}$(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ae(e){return this.$(e)||pt(e)}r(e){return new Error(`${e} at character ${this.e}`)}h(){let e=this.y,t=this.u,o=this.e;for(;e===ks||e===Ns||e===Os||e===Ms;)e=t.charCodeAt(++o);this.e=o}parse(){let e=this.ce();return e.length===1?e[0]:{type:0,body:e}}ce(e){let t=[];for(;this.e<this.u.length;){let o=this.y;if(o===Ds||o===Yt)this.e++;else{let r=this.S();if(r)t.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.r(je+'"'+this.B+'"')}}}return t}S(){var t;let e=(t=this.Ot())!=null?t:this.Pe();return this.h(),this.Mt(e)}ue(){this.h();let e=this.u,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.ae(e.charCodeAt(t+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}Pe(){let e,t,o,r,s,i,a,c;if(s=this.q(),!s||(t=this.ue(),!t))return s;if(r={value:t,prec:Xo(t),right_a:Un.has(t)},i=this.q(),!i)throw this.r(Dn+t);let l=[s,r,i];for(;t=this.ue();){o=Xo(t),r={value:t,prec:o,right_a:Un.has(t)},c=t;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),t=l.pop().value,s=l.pop(),e=this.Be(t,s,i),l.push(e);if(e=this.q(),!e)throw this.r(Dn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this.Be(l[a-1].value,l[a-2],e),a-=2;return e}q(){let e;if(this.h(),e=this.kt(),e)return this.pe(e);let t=this.y;if(pt(t)||t===we)return this.Lt();if(t===Ls||t===Is)e=this.Vt();else if(t===en)e=this.It();else{let o=this.Dt();if(o){let r=this.q();if(!r)throw this.r(qs);return this.pe({type:7,operator:o,argument:r})}this.$(t)?(e=this.le(),e.name in Wo?e={type:4,value:Wo[e.name],raw:e.name}:e.name===Ps&&(e={type:5})):t===Zt&&(e=this.Ut())}return e?(e=this.F(e),this.pe(e)):!1}Be(e,t,o){if(e==="=>"){let r=t.type===1?t.expressions:[t];return{type:15,params:r,body:o}}return Bs.has(e)?{type:16,operator:e,left:t,right:o}:{type:8,operator:e,left:t,right:o}}kt(){let e={node:!1};return this.Pt(e),e.node||(this.Bt(e),e.node)||(this.Ht(e),e.node)||(this.He(e),e.node)||this.jt(e),e.node}pe(e){let t={node:e};return this._t(t),this.$t(t),this.qt(t),t.node}Dt(){let e=this.u,t=this.e,o=e.charCodeAt(t),r=e.charCodeAt(t+1),s=e.charCodeAt(t+2),i=e.charCodeAt(t+3);return o===nn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===_e?(this.e++,"+"):o===110&&r===101&&s===119&&!this.ae(i)?(this.e+=3,"new"):!1}Ot(){let e={};return this.Ft(e),e.node}Mt(e){let t={node:e};return this.Kt(t),t.node}F(e){this.h();let t=this.y;for(;t===we||t===en||t===Zt||t===kn;){let o;if(t===kn){if(this.u.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.h(),t=this.y}if(this.e++,t===en){if(e={type:3,computed:!0,object:e,property:this.S()},this.h(),t=this.y,t!==Mn)throw this.r(Fs);this.e++}else t===Zt?e={type:6,arguments:this.je(nt),callee:e}:(o&&this.e--,this.h(),e={type:3,computed:!1,object:e,property:this.le()});o&&(e.optional=!0),this.h(),t=this.y}return e}Lt(){let e=this.u,t=this.e,o=t;for(;pt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;pt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===_e||a===nn)&&o++;let c=o;for(;pt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(t,o);throw this.r(zs+l+this.B+")")}}this.e=o;let s=e.slice(t,o),i=e.charCodeAt(o);if(this.$(i))throw this.r(Ks+s+this.B+")");if(i===we||s.length===1&&s.charCodeAt(0)===we)throw this.r($s);return{type:4,value:parseFloat(s),raw:s}}Vt(){let e=this.u,t=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<t;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===In){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this._e(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:t):e.slice(i,l?s:t);if(!l)throw this.e=s,this.r(Ws+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}_e(e){switch(e){case 110:return`
|
|
2
|
+
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}le(){let e=this.y,t=this.e;if(this.$(e))this.e++;else throw this.r(je+this.B);for(;this.e<this.u.length&&(e=this.y,this.ae(e));)this.e++;return{type:2,name:this.u.slice(t,this.e)}}je(e){let t=[],o=!1,r=0;for(;this.e<this.u.length;){this.h();let s=this.y;if(s===e){if(o=!0,this.e++,e===nt&&r&&r>=t.length)throw this.r(Qo+String.fromCharCode(e));break}else if(s===Yt){if(this.e++,r++,r!==t.length){if(e===nt)throw this.r(Qo+",");for(let i=t.length;i<r;i++)t.push(null)}}else{if(t.length!==r&&r!==0)throw this.r(Jo);{let i=this.S();if(!i||i.type===0)throw this.r(Jo);t.push(i)}}}if(!o)throw this.r(ot+String.fromCharCode(e));return t}Ut(){this.e++;let e=this.ce(nt);if(this.f(nt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.r(js)}It(){return this.e++,{type:9,elements:this.je(Mn)}}Pt(e){if(this.f(Fo)){this.e++;let t=[];for(;!isNaN(this.y);){if(this.h(),this.f(tn)){this.e++,e.node=this.F({type:10,properties:t});return}let o=this.S();if(!o)break;if(this.h(),o.type===2&&(this.f(Yt)||this.f(tn)))t.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(qo)){this.e++;let r=this.S();if(!r)throw this.r(_s);let s=o.type===9;t.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.h()}else t.push(o);this.f(Yt)&&this.e++}throw this.r(Vs)}}Bt(e){let t=this.y;if((t===_e||t===nn)&&t===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:t===_e?"++":"--",argument:this.F(this.le()),prefix:!0};if(!o.argument||!Ko.has(o.argument.type))throw this.r(je+o.operator)}}$t(e){let t=e.node,o=this.y;if((o===_e||o===nn)&&o===this.u.charCodeAt(this.e+1)){if(!Ko.has(t.type))throw this.r(je+(o===_e?"++":"--"));this.e+=2,e.node={type:13,operator:o===_e?"++":"--",argument:t,prefix:!1}}}Ht(e){this.u.charCodeAt(this.e)===we&&this.u.charCodeAt(this.e+1)===we&&this.u.charCodeAt(this.e+2)===we&&(this.e+=3,e.node={type:14,argument:this.S()})}Kt(e){if(e.node&&this.f(kn)){this.e++;let t=e.node,o=this.S();if(!o)throw this.r(Go);if(this.h(),this.f(qo)){this.e++;let r=this.S();if(!r)throw this.r(Go);e.node={type:11,test:t,consequent:o,alternate:r}}else throw this.r(Hs)}}Ft(e){if(this.h(),this.f(Zt)){let t=this.e;if(this.e++,this.h(),this.f(nt)){this.e++;let o=this.ue();if(o==="=>"){let r=this.Pe();if(!r)throw this.r(Dn+o);e.node={type:15,params:null,body:r};return}}this.e=t}}qt(e){let t=e.node,o=t.type;(o===2||o===3)&&this.f(Ln)&&(e.node={type:17,tag:t,quasi:this.He(e)})}He(e){if(!this.f(Ln))return;let t=this.u,o=t.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let d=t.slice(s,this.e);return r.quasis.push({type:18,value:{raw:d,cooked:d},tail:u})}i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=t.charCodeAt(this.e);if(u===Ln)return l(!0),this.e+=1,e.node=r,r;if(u===36&&t.charCodeAt(this.e+1)===Fo){if(l(!1),this.e+=2,r.expressions.push(...this.ce(tn)),!this.f(tn))throw this.r("unclosed ${");this.e+=1,s=this.e}else if(u===In){c||(c=!0),i.push(t.slice(s,this.e)),a.push(t.slice(s,this.e));let f=t.charCodeAt(this.e+1);i.push(t.slice(this.e,this.e+2)),a.push(this._e(f)),this.e+=2,s=this.e}else this.e+=1}throw this.r("Unclosed `")}_t(e){let t=e.node;if(!t||t.operator!=="new"||!t.argument)return;if(!t.argument||![6,3].includes(t.argument.type))throw this.r("Expected new function()");e.node=t.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}jt(e){if(!this.f(zo))return;let t=++this.e,o=!1;for(;this.e<this.u.length;){if(this.y===zo&&!o){let r=this.u.slice(t,this.e),s="";for(;++this.e<this.u.length;){let a=this.y;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.B;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.r(a.message)}return e.node={type:4,value:i,raw:this.u.slice(t-1,this.e)},e.node=this.F(e.node),e.node}this.f(en)?o=!0:o&&this.f(Mn)&&(o=!1),this.e+=this.f(In)?2:1}throw this.r("Unclosed Regex")}},er=n=>new Bn(n).parse();var Gs={"=>":(n,e)=>{},"=":(n,e)=>{},"*=":(n,e)=>{},"**=":(n,e)=>{},"/=":(n,e)=>{},"%=":(n,e)=>{},"+=":(n,e)=>{},"-=":(n,e)=>{},"<<=":(n,e)=>{},">>=":(n,e)=>{},">>>=":(n,e)=>{},"&=":(n,e)=>{},"^=":(n,e)=>{},"|=":(n,e)=>{},"||":(n,e)=>n()||e(),"??":(n,e)=>{var t;return(t=n())!=null?t:e()},"&&":(n,e)=>n()&&e(),"|":(n,e)=>n|e,"^":(n,e)=>n^e,"&":(n,e)=>n&e,"==":(n,e)=>n==e,"!=":(n,e)=>n!=e,"===":(n,e)=>n===e,"!==":(n,e)=>n!==e,"<":(n,e)=>n<e,">":(n,e)=>n>e,"<=":(n,e)=>n<=e,">=":(n,e)=>n>=e,in:(n,e)=>n in e,"<<":(n,e)=>n<<e,">>":(n,e)=>n>>e,">>>":(n,e)=>n>>>e,"+":(n,e)=>n+e,"-":(n,e)=>n-e,"*":(n,e)=>n*e,"/":(n,e)=>n/e,"%":(n,e)=>n%e,"**":(n,e)=>ht(n,e)},Js={"-":n=>-n,"+":n=>+n,"!":n=>!n,"~":n=>~n,new:n=>n},rr=n=>{if(!(n!=null&&n.some(or)))return n;let e=[];return n.forEach(t=>or(t)?e.push(...t):e.push(t)),e},tr=(...n)=>rr(n),Hn=(n,e)=>{if(!n)return e;let t=Object.create(e!=null?e:{});return t.$event=n,t},Qs={"++":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(++o),o}return++n[e]},"--":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(--o),o}return--n[e]}},Xs={"++":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(o+1),o}return n[e]++},"--":(n,e)=>{let t=n[e];if(E(t)){let o=t();return t(o-1),o}return n[e]--}},nr={"=":(n,e,t)=>{let o=n[e];return E(o)?o(t):n[e]=t},"+=":(n,e,t)=>{let o=n[e];return E(o)?o(o()+t):n[e]+=t},"-=":(n,e,t)=>{let o=n[e];return E(o)?o(o()-t):n[e]-=t},"*=":(n,e,t)=>{let o=n[e];return E(o)?o(o()*t):n[e]*=t},"/=":(n,e,t)=>{let o=n[e];return E(o)?o(o()/t):n[e]/=t},"%=":(n,e,t)=>{let o=n[e];return E(o)?o(o()%t):n[e]%=t},"**=":(n,e,t)=>{let o=n[e];return E(o)?o(ht(o(),t)):n[e]=ht(n[e],t)},"<<=":(n,e,t)=>{let o=n[e];return E(o)?o(o()<<t):n[e]<<=t},">>=":(n,e,t)=>{let o=n[e];return E(o)?o(o()>>t):n[e]>>=t},">>>=":(n,e,t)=>{let o=n[e];return E(o)?o(o()>>>t):n[e]>>>=t},"|=":(n,e,t)=>{let o=n[e];return E(o)?o(o()|t):n[e]|=t},"&=":(n,e,t)=>{let o=n[e];return E(o)?o(o()&t):n[e]&=t},"^=":(n,e,t)=>{let o=n[e];return E(o)?o(o()^t):n[e]^=t}},on=(n,e)=>K(n)?n.bind(e):n,Vn=class{constructor(e,t,o,r,s){m(this,"l");m(this,"$e");m(this,"qe");m(this,"Fe");m(this,"A");m(this,"Ke");m(this,"ze");this.l=w(e)?e:[e],this.$e=t,this.qe=o,this.Fe=r,this.ze=!!s}We(e,t){if(t&&e in t)return t;for(let o of this.l)if(e in o)return o}2(e,t,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],on(V(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],on(V(i[r]),i);let s=this.$e;if(s&&r in s)return this.A=s[r],on(V(s[r]),s)}5(e,t,o){return this.l[0]}0(e,t,o){return this.Ge(t,o,tr,...e.body)}1(e,t,o){return this.E(t,o,(...r)=>r.pop(),...e.expressions)}3(e,t,o){let{obj:r,key:s}=this.fe(e,t,o),i=r==null?void 0:r[s];return this.A=i,on(V(i),r)}4(e,t,o){return e.value}6(e,t,o){let r=(i,...a)=>K(i)?i(...rr(a)):i,s=this.E(++t,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,t,o){return this.E(t,o,Js[e.operator],e.argument)}8(e,t,o){let r=Gs[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,t,o),()=>this.g(e.right,t,o))}return this.E(t,o,r,e.left,e.right)}9(e,t,o){return this.Ge(++t,o,tr,...e.elements)}10(e,t,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++t,o,s,...e.properties),r}11(e,t,o){return this.E(t,o,r=>this.g(r?e.consequent:e.alternate,t,o),e.test)}12(e,t,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.Fe)!=null?u:()=>!1,a=t===0&&this.ze,c=f=>this.Je(a,e.key,t,Hn(f,o)),l=f=>this.Je(a,e.value,t,Hn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,t)?c:c()}else if(e.computed){let f=V(c());r[f]=s(e.value)&&i(f,t)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,t)?()=>l:l()}return r}fe(e,t,o){let r=this.g(e.object,t,o),s=e.computed?this.g(e.property,t,o):e.property.name;return{obj:r,key:s}}13(e,t,o){let r=e.argument,s=e.operator,i=e.prefix?Qs:Xs;if(r.type===2){let a=r.name,c=this.We(a,o);return fe(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.fe(r,t,o);return i[s](a,c)}}16(e,t,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.We(i,o);if(fe(a))return;let c=this.g(e.right,t,o);return nr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.fe(r,t,o),c=this.g(e.right,t,o);return nr[s](i,a,c)}}14(e,t,o){let r=this.g(e.argument,t,o);return w(r)&&(r.s=sr),r}17(e,t,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},t,o)}19(e,t,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(t,o,r,...e.expressions)}18(e,t,o){return e.value.cooked}20(e,t,o){let r=(s,...i)=>new s(...i);return this.E(t,o,r,e.callee,...e.arguments)}15(e,t,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,t,s)}}g(e,t,o){let r=V(this[e.type](e,t,o));return this.Ke=e.type,r}Je(e,t,o,r){let s=this.g(t,o,r);return e&&this.Qe()?this.A:s}Qe(){let e=this.Ke;return(e===2||e===3||e===6)&&E(this.A)}eval(e,t){let{value:o,refs:r}=Lt(()=>this.g(e,-1,t)),s={value:o,refs:r};return this.Qe()&&(s.ref=this.A),s}E(e,t,o,...r){let s=r.map(i=>i&&this.g(i,e,t));return o(...s)}Ge(e,t,o,...r){let s=this.qe;if(!s)return this.E(e,t,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.g(a,e,Hn(l,t)):this.g(a,e,t)));return o(...i)}},sr=Symbol("s"),or=n=>(n==null?void 0:n.s)===sr,ir=(n,e,t,o,r,s,i)=>new Vn(e,t,o,r,i).eval(n,s);var ar={},cr=n=>!!n,rn=class{constructor(e,t){m(this,"l");m(this,"o");m(this,"Xe",[]);this.l=e,this.o=t}v(e){this.l=[e,...this.l]}J(){return this.l.map(t=>t.components).filter(cr).reverse().reduce((t,o)=>{for(let[r,s]of Object.entries(o))t[r.toUpperCase()]=s;return t},{})}ot(){let e=[],t=new Set,o=this.l.map(r=>r.components).filter(cr).reverse();for(let r of o)for(let s of Object.keys(r))t.has(s)||(t.add(s),e.push(s));return e}M(e,t,o,r,s){var g;let i=[],a=[],c=new Set,l=()=>{for(let C=0;C<a.length;++C)a[C]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(C,D)=>(c.add(C),D&&C(i),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(X(e))return p;let d=this.o.globalContext,y=[],h=new Set,R=(C,D,G,M)=>{try{let _=ir(C,D,d,t,o,M,r);return G&&_.refs.length>0&&y.push(..._.refs),{value:_.value,refs:_.refs,ref:_.ref}}catch(_){H(6,`evaluation error: ${e}`,_)}return{value:void 0,refs:[]}};try{let C=(g=ar[e])!=null?g:er("["+e+"]");ar[e]=C;let D=this.l.slice(),G=C.elements,M=G.length,_=new Array(M);p.refs=_;let ce=()=>{y.length=0,s||(h.clear(),l());let ee=new Array(M);for(let U=0;U<M;++U){let b=G[U];if(t!=null&&t(U,-1)){ee[U]=J=>R(b,D,!1,{$event:J}).value;continue}let A=R(b,D,!0);ee[U]=A.value,_[U]=A.ref}if(!s)for(let U of y)h.has(U)||(h.add(U),a.push(se(U,ce)));if(i=ee,c.size!==0)for(let U of c)c.has(U)&&U(i)};ce()}catch(C){H(6,`parse error: ${e}`,C)}return p}k(){return this.l.slice()}oe(e){this.Xe.push(this.l),this.l=e}C(e,t){try{this.oe(e),t()}finally{this.zt()}}zt(){var e;this.l=(e=this.Xe.pop())!=null?e:[]}};var ur=n=>{let e=n.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||n==="-"||n==="_"||n===":"},Ys=(n,e)=>{let t="";for(let o=e;o<n.length;++o){let r=n[o];if(t){r===t&&(t="");continue}if(r==='"'||r==="'"){t=r;continue}if(r===">")return o}return-1},Zs=(n,e)=>{let t=e?2:1;for(;t<n.length&&(n[t]===" "||n[t]===`
|
|
3
|
+
`);)++t;if(t>=n.length||!ur(n[t]))return null;let o=t;for(;t<n.length&&ur(n[t]);)++t;return{start:o,end:t}},lr=new Set(["table","thead","tbody","tfoot"]),ei=new Set(["thead","tbody","tfoot"]),ti=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),ni=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),fr=(n,e)=>`${n.slice(0,n.length-2)}></${e}>`,sn=n=>{var s;let e=0,t=[],o=[],r=0;for(;e<n.length;){let i=n.indexOf("<",e);if(i===-1){t.push(n.slice(e));break}if(t.push(n.slice(e,i)),n.startsWith("<!--",i)){let g=n.indexOf("-->",i+4);if(g===-1){t.push(n.slice(i));break}t.push(n.slice(i,g+3)),e=g+3;continue}let a=Ys(n,i);if(a===-1){t.push(n.slice(i));break}let c=n.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){t.push(c),e=a+1;continue}let f=Zs(c,l);if(!f){t.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(l){let g=o[o.length-1];g?(o.pop(),t.push(g.replacementHost?`</${g.replacementHost}>`:c),lr.has(g.effectiveTag)&&--r):t.push(c),e=a+1;continue}let d=c.charCodeAt(c.length-2)===47,y=o[o.length-1],h=null;r===0?p==="tr"?h="trx":p==="td"?h="tdx":p==="th"&&(h="thx"):ei.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=p==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=ti.has(p)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(h=p==="td"||p==="th"?null:"td");let R=d&&!ni.has(h||p);if(h){let g=h==="trx"||h==="tdx"||h==="thx",C=`${c.slice(0,f.start)}${h} is="${g?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`;t.push(R?fr(C,h):C)}else t.push(R?fr(c,p):c);if(!d){let g=h==="trx"?"tr":h==="tdx"?"td":h==="thx"?"th":h||p;o.push({replacementHost:h,effectiveTag:g}),lr.has(g)&&++r}e=a+1}return t.join("")};var oi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",ri=new Set(oi.toUpperCase().split(",")),si="http://www.w3.org/2000/svg",pr=(n,e)=>{ye(n)?n.content.appendChild(e):n.appendChild(e)},_n=(n,e,t,o)=>{var i;let r=n.t;if(r){let a=t&&ri.has(r.toUpperCase())?document.createElementNS(si,r.toLowerCase()):document.createElement(r),c=n.a;if(c)for(let u of Object.entries(c)){let f=u[0],p=u[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(wt(f,o),p)}let l=n.c;if(l)for(let u of l)_n(u,a,t,o);pr(e,a);return}let s=n.d;if(s){let a;switch((i=n.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)pr(e,a);else throw new Error("unsupported node type.")}},$e=(n,e,t)=>{t!=null||(t=le.getDefault());let o=document.createDocumentFragment();if(!w(n))return _n(n,o,!!e,t),o;for(let r of n)_n(r,o,!!e,t);return o};var mr=(n,e={selector:"#app"},t)=>{W(e)&&(e={selector:"#app",template:e}),lo(n)&&(n=n.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Be(o))throw j(0);t||(t=le.getDefault());let r=()=>{for(let a of[...o.childNodes])z(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(sn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=$e(e.json,e.isSVG,t);r(),s(a.childNodes)}return t.useInterpolation&&Xt(o,t),new jn(n,o,t).b(),q(o,()=>{Ne(n)}),At(n),{context:n,unmount:()=>{z(o)},unbind:()=>{de(o)}}},jn=class{constructor(e,t,o){m(this,"Wt");m(this,"Ye");m(this,"o");m(this,"m");m(this,"i");this.Wt=e,this.Ye=t,this.o=o,this.m=new rn([e],o),this.i=new zt(this.m)}b(){this.i.H(this.Ye)}};var rt=n=>{if(w(n))return n.map(r=>rt(r));let e={};if(n.tagName)e.t=n.tagName;else return n.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),n.textContent&&(e.d=n.textContent),e;let t=n.getAttributeNames();t.length>0&&(e.a=Object.fromEntries(t.map(r=>{var s;return[r,(s=n.getAttribute(r))!=null?s:""]})));let o=Ee(n);return o.length>0&&(e.c=[...o].map(r=>rt(r))),e};var dr=(n,e={})=>{var s,i,a,c,l,u;w(e)&&(e={props:e}),W(n)&&(n={template:n});let t=(s=e.context)!=null?s:()=>({}),o=!1;if(n.element){let f=n.element;f.remove(),n.element=f}else if(n.selector){let f=document.querySelector(n.selector);if(!f)throw j(1,n.selector);f.remove(),n.element=f}else if(n.template){let f=document.createRange().createContextualFragment(sn(n.template));n.element=f}else n.json&&(n.element=$e(n.json,n.isSVG,e.config),o=!0);n.element||(n.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Xt(n.element,(a=e.config)!=null?a:le.getDefault());let r=n.element;if(!o&&(((l=n.isSVG)!=null?l:ct(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||ct(r)&&r.querySelector("[isSVG]"))){let f=r.content,p=f?[...f.childNodes]:[...r.childNodes],d=rt(p);n.element=$e(d,!0,e.config)}return{context:t,template:n.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var an=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let t=e.constructor;this.byConstructor.get(t)===e&&this.byConstructor.delete(t)}find(e){for(let t of this.byConstructor.values())if(t instanceof e)return t}require(e){let t=this.find(e);if(t)return t;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var hr=n=>{var e;(e=Ue())==null||e.onMounted.push(n)};var yr=n=>{let e,t={},o=(...r)=>{if(r.length<=2&&0 in r)throw j(4);return e&&!t.isStopped?e(...r):(e=ii(n,t),e(...r))};return o[Z]=1,Le(o,!0),o.stop=()=>{var r,s;return(s=(r=t.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},ne(()=>o.stop(),!0),o},ii=(n,e)=>{var s;let t=(s=e.ref)!=null?s:ie(null);e.ref=t,e.isStopped=!1;let o=0,r=Ve(()=>{if(o>0){r(),e.isStopped=!0,Y(t);return}t(n()),++o});return t.stop=r,t};var gr=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ai(n,e,t),o(...s))};return r[Z]=1,Le(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ne(()=>r.stop(),!0),r},ai=(n,e,t)=>{var a;let o=(a=t.ref)!=null?a:ie(null);t.ref=o,t.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}let l=n.map(u=>u());o(e(...l)),++r},i=[];for(let c of n){let l=se(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var br=(n,e)=>{let t={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw j(4);return o&&!t.isStopped?o(...s):(o=ci(n,e,t),o(...s))};return r[Z]=1,Le(r,!0),r.stop=()=>{var s,i;return(i=(s=t.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ne(()=>r.stop(),!0),r},ci=(n,e,t)=>{var s;let o=(s=t.ref)!=null?s:ie(null);t.ref=o,t.isStopped=!1;let r=0;return o.stop=se(n,i=>{if(r>0){o.stop(),t.isStopped=!0,Y(o);return}o(e(i)),++r},!0),o};var Tr=n=>(n[Mt]=1,n);var xr=(n,e)=>{if(!e)throw j(5);let o=He(n)?be:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ae(n()))),s=localStorage.getItem(e);if(s!=null)try{n(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Ve(r);return ne(i,!0),n};var $n=(n,...e)=>{let t="",o=n,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)t+=o[a],a<i&&(t+=r[a]);return t},Cr=$n;var Er=(n,e,t)=>{let o=[],r=()=>{e(n.map(i=>i()))};for(let i of n)o.push(se(i,r));t&&r();let s=()=>{for(let i of o)i()};return ne(s,!0),s};var Rr=n=>{if(!E(n))throw j(3,"observerCount");return n(void 0,void 0,2)};var vr=n=>{qn();try{n()}finally{Fn()}},qn=()=>{ge.stack||(ge.stack=[]),ge.stack.push(new Set)},Fn=()=>{let n=ge.stack;if(!n||n.length===0)return;let e=n.pop();if(n.length){let t=n[n.length-1];for(let o of e)t.add(o);return}delete ge.stack;for(let t of e)try{Y(t)}catch(o){console.error(o)}};
|
package/dist/regor.es2015.esm.js
CHANGED
|
@@ -5709,6 +5709,23 @@ var tableDirectAllowed = /* @__PURE__ */ new Set([
|
|
|
5709
5709
|
"tfoot",
|
|
5710
5710
|
"tr"
|
|
5711
5711
|
]);
|
|
5712
|
+
var voidElements = /* @__PURE__ */ new Set([
|
|
5713
|
+
"area",
|
|
5714
|
+
"base",
|
|
5715
|
+
"br",
|
|
5716
|
+
"col",
|
|
5717
|
+
"embed",
|
|
5718
|
+
"hr",
|
|
5719
|
+
"img",
|
|
5720
|
+
"input",
|
|
5721
|
+
"link",
|
|
5722
|
+
"meta",
|
|
5723
|
+
"param",
|
|
5724
|
+
"source",
|
|
5725
|
+
"track",
|
|
5726
|
+
"wbr"
|
|
5727
|
+
]);
|
|
5728
|
+
var expandSelfClosingTag = (tagText, tagName) => `${tagText.slice(0, tagText.length - 2)}></${tagName}>`;
|
|
5712
5729
|
var preprocess = (template) => {
|
|
5713
5730
|
var _a;
|
|
5714
5731
|
let i = 0;
|
|
@@ -5778,15 +5795,17 @@ var preprocess = (template) => {
|
|
|
5778
5795
|
} else if ((parent == null ? void 0 : parent.effectiveTag) === "tr") {
|
|
5779
5796
|
replacementHost = tagName === "td" || tagName === "th" ? null : "td";
|
|
5780
5797
|
}
|
|
5798
|
+
const shouldExpandSelfClosing = selfClosing && !voidElements.has(replacementHost || tagName);
|
|
5781
5799
|
if (replacementHost) {
|
|
5782
5800
|
const isAlias = replacementHost === "trx" || replacementHost === "tdx" || replacementHost === "thx";
|
|
5801
|
+
const rewrittenTag = `${rawTag.slice(0, range.start)}${replacementHost} is="${isAlias ? `r-${tagName}` : `regor:${tagName}`}"${rawTag.slice(range.end)}`;
|
|
5783
5802
|
out.push(
|
|
5784
|
-
|
|
5803
|
+
shouldExpandSelfClosing ? expandSelfClosingTag(rewrittenTag, replacementHost) : rewrittenTag
|
|
5785
5804
|
);
|
|
5786
|
-
} else if (selfClosing && (parent == null ? void 0 : parent.effectiveTag) === "tr") {
|
|
5787
|
-
out.push(`${rawTag.slice(0, rawTag.length - 2)}></${tagName}>`);
|
|
5788
5805
|
} else {
|
|
5789
|
-
out.push(
|
|
5806
|
+
out.push(
|
|
5807
|
+
shouldExpandSelfClosing ? expandSelfClosingTag(rawTag, tagName) : rawTag
|
|
5808
|
+
);
|
|
5790
5809
|
}
|
|
5791
5810
|
if (!selfClosing) {
|
|
5792
5811
|
const effectiveTag = replacementHost === "trx" ? "tr" : replacementHost === "tdx" ? "td" : replacementHost === "thx" ? "th" : replacementHost || tagName;
|