regor 1.2.0 → 1.2.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.
@@ -1,3 +1,3 @@
1
- "use strict";var $t=Object.defineProperty;var Gr=Object.getOwnPropertyDescriptor;var Jr=Object.getOwnPropertyNames;var Qr=Object.prototype.hasOwnProperty;var Xr=(t,e)=>{for(var n in e)$t(t,n,{get:e[n],enumerable:!0})},Yr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Jr(e))!Qr.call(t,o)&&o!==n&&$t(t,o,{get:()=>e[o],enumerable:!(r=Gr(e,o))||r.enumerable});return t};var Zr=t=>Yr($t({},"__esModule",{value:!0}),t);var ms={};Xr(ms,{ComponentHead:()=>Ie,RegorConfig:()=>X,addUnbinder:()=>U,batch:()=>Wr,collectRefs:()=>xt,computeMany:()=>Pr,computeRef:()=>jr,computed:()=>Vr,createApp:()=>Hr,createComponent:()=>_r,endBatch:()=>vn,entangle:()=>yt,flatten:()=>J,getBindData:()=>he,html:()=>En,isDeepRef:()=>Oe,isRaw:()=>Be,isRef:()=>m,markRaw:()=>$r,observe:()=>R,observeMany:()=>zr,observerCount:()=>Kr,onMounted:()=>Br,onUnmounted:()=>K,pause:()=>Nt,persist:()=>Fr,raw:()=>qr,ref:()=>Te,removeNode:()=>P,resume:()=>Mt,silence:()=>Et,sref:()=>z,startBatch:()=>xn,toFragment:()=>Ne,toJsonTemplate:()=>ze,trigger:()=>q,unbind:()=>ne,unref:()=>D,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>we});module.exports=Zr(ms);var Le=Symbol(":regor");var ne=t=>{let e=[t];for(;e.length>0;){let n=e.shift();eo(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},eo=t=>{let e=t[Le];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Le]}};var P=t=>{t.remove(),setTimeout(()=>ne(t),1)};var H=t=>typeof t=="function",_=t=>typeof t=="string",Cn=t=>typeof t>"u",Z=t=>t==null||typeof t>"u",F=t=>typeof t!="string"||!t?.trim(),to=Object.prototype.toString,Ft=t=>to.call(t),me=t=>Ft(t)==="[object Map]",Q=t=>Ft(t)==="[object Set]",qt=t=>Ft(t)==="[object Date]",Je=t=>typeof t=="symbol",b=Array.isArray,w=t=>t!==null&&typeof t=="object";var Rn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},I=(t,...e)=>{let n=Rn[t];return new Error(H(n)?n.call(Rn,...e):n)};var st=[],Sn=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},Ce=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},wn=t=>{let e=Ce();return t&&Kt(t),st.pop(),e},zt=Symbol("csp"),Kt=t=>{let e=t,n=e[zt];if(n){let r=Ce();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[zt]=Ce()},it=t=>t[zt];var de=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ie=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)P(e),e=e.nextSibling;for(let r of this.ctx)de(r)}};var he=t=>{let e=t[Le];if(e)return e;let n={unbinders:[],data:{}};return t[Le]=n,n};var U=(t,e)=>{he(t).unbinders.push(e)};var On={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},L=(t,...e)=>{let n=On[t],r=H(n)?n.call(On,...e):n,o=Qe.warning;o&&(_(r)?o(r):o(r,...r.args))},Qe={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var m=t=>t?.[W]===1;var R=(t,e,n)=>{if(!m(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var ft={},pt={},An=1,Nn=t=>{let e=(An++).toString();return ft[e]=t,pt[e]=0,e},Wt=t=>{pt[t]+=1},Gt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},Mn=t=>ft[t],Jt=()=>An!==1&&Object.keys(ft).length>0,Xe="r-switch",no=t=>{let e=t.filter(r=>Re(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Xe))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},De=(t,e)=>{if(!Jt())return;let n=no(e);n.length!==0&&(n.forEach(Wt),U(t,()=>{n.forEach(Gt)}))};var Qt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}ge(e,o)},Xt=Symbol("r-if"),kn=Symbol("r-else"),Ln=t=>t[kn]===1,lt=class{p;B;q;K;z;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.q=He(e.o.l.if),this.K=e.o.l.else,this.z=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=ye(e,this.q);for(let o of r)this.T(o);return n}W(e){return e[Xt]?!0:(e[Xt]=!0,ye(e,this.q).forEach(n=>n[Xt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),De(i,o),o.forEach(c=>{P(c)}),e.remove(),n!=="if"&&(e[kn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Qt(o,this.p,s,a)},unmount:()=>{ae(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.z);if(!o)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),p=this.p.h.C(o),f=p.value,l=this.ce(r,n),g=[];U(a,()=>{p.stop();for(let O of g)O();g.length=0});let h=R(f,n);return g.push(h),[{mount:()=>{Qt(s,this.p,i,c)},unmount:()=>{ae(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,g=l.V(),u=()=>{l.v(g,()=>{if(p()[0])f||(Qt(o,this.p,s,a),f=!0),h.forEach(M=>{M.unmount(),M.isMounted=!1});else{ae(i,a),f=!1;let M=!1;for(let A of h)!M&&A.isTrue()?(A.isMounted||(A.mount(),A.isMounted=!0),M=!0):(A.unmount(),A.isMounted=!1)}})},h=this.ce(r,u),O=[];U(i,()=>{c.stop();for(let M of O)M();O.length=0}),u();let y=R(p,u);O.push(y)}};var Ue=t=>{let e=oe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},ge=(t,e)=>{for(let n of e)Ln(n)||t.G(n)},ye=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},oe=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,In=t=>t instanceof HTMLSlotElement,ce=t=>oe(t)?t.content.childNodes:t.childNodes,ae=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;P(n),n=r}},be=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Dn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},He=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Yt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ro=/-(\w)/g,B=Yt(t=>t&&t.replace(ro,(e,n)=>n?n.toUpperCase():"")),oo=/\B([A-Z])/g,_e=Yt(t=>t&&t.replace(oo,"-$1").toLowerCase()),Ze=Yt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Zt=Symbol("scope"),ht=t=>{try{Sn();let e=t();Kt(e);let n={context:e,unmount:()=>de(e),[Zt]:1};return n[Zt]=1,n}finally{wn()}},Un=t=>w(t)?Zt in t:!1;var Hn={collectRefObj:!0,onBind:(t,e)=>R(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(w(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(m(p)?p(c):o[a]=c)}},!0)};var _n={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!w(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(m(c)?c(a):r[i]=a)}return()=>{}}};var Bn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=B(r);return R(e.value,()=>{let c=e.refs[0]??e.value()[0],p=e.context,f=p[r];f!==c&&(m(f)?f(c):p[i]=c)},!0)}};var yt=(t,e)=>{if(t===e)return()=>{};let n=R(t,o=>e(o)),r=R(e,o=>t(o));return e(t()),()=>{n(),r()}};var D=t=>m(t)?t():t;var gt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(_e),...a.map(_e)].join(",");if(F(c))return;let p=e.querySelectorAll(c),f=e.matches?.(c)?[e,...p]:p;for(let l of f){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let u=l.nextSibling,h=B(l.tagName).toUpperCase(),x=i[h]??s.get(h);if(!x)continue;let y=x.template;if(!y)continue;let M=l.parentElement;if(!M)continue;let A=new Comment(" begin component: "+l.tagName),Me=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let Ke=n.o.l.props,We=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(d,N)=>{let T={},V=d.hasAttribute(Ke),$=d.hasAttribute(We);return r.v(N,()=>{r.S(T),V&&n.T(Hn,d,Ke),$&&n.T(_n,d,We);let E=x.props;if(!E||E.length===0)return;E=E.map(B);for(let xe of E.concat(E.map(_e))){let ie=d.getAttribute(xe);ie!==null&&(T[B(xe)]=ie,d.removeAttribute(xe))}let G=n.J.de(d,!1);for(let[xe,ie]of G.entries()){let[ve,jt]=ie.Q;jt&&E.includes(B(jt))&&(ve!=="."&&ve!==":"&&ve!==Pt||n.T(Bn,d,xe,!0,jt,ie.X))}}),T},le=[...r.V()],rt=()=>{let d=nt(l,le),N=new Ie(d,l,le,A,Me),T=ht(()=>x.context(N)??{}).context;if(N.autoProps){for(let[V,$]of Object.entries(d))if(V in T){let E=T[V];if(E===$)continue;N.entangle&&m(E)&&m($)?U(A,yt($,E)):m(E)?E($):T[V]=D($)}else T[V]=$;N.onAutoPropsAssigned?.()}return{componentCtx:T,head:N}},{componentCtx:ue,head:ot}=rt(),S=[...ce(y)],v=S.length,k=l.childNodes.length===0,j=d=>{let N=d.parentElement;if(k){for(let E of[...d.childNodes])N.insertBefore(E,d);return}let T=d.name;F(T)&&(T=d.getAttributeNames().filter(E=>E.startsWith("#"))[0],F(T)?T="default":T=T.substring(1));let V=l.querySelector(`template[name='${T}'], template[\\#${T}]`);!V&&T==="default"&&(V=l.querySelector("template:not([name])"),V&&V.getAttributeNames().filter(E=>E.startsWith("#")).length>0&&(V=null));let $=E=>{ot.enableSwitch&&r.v(le,()=>{r.S(ue);let G=nt(d,r.V());r.v(le,()=>{r.S(G);let xe=r.V(),ie=Nn(xe);for(let ve of E)Re(ve)&&(ve.setAttribute(Xe,ie),Wt(ie),U(ve,()=>{Gt(ie)}))})})};if(V){let E=[...ce(V)];for(let G of E)N.insertBefore(G,d);$(E)}else{if(T!=="default"){for(let G of[...ce(d)])N.insertBefore(G,d);return}let E=[...ce(l)].filter(G=>!oe(G));for(let G of E)N.insertBefore(G,d);$(E)}},C=d=>{if(!Re(d))return;let N=d.querySelectorAll("slot");if(In(d)){j(d),d.remove();return}for(let T of N)j(T),T.remove()};(()=>{for(let d=0;d<v;++d)S[d]=S[d].cloneNode(!0),g.insertBefore(S[d],u),C(S[d])})(),M.insertBefore(Me,u);let te=()=>{if(!x.inheritAttrs)return;let d=S.filter(T=>T.nodeType===Node.ELEMENT_NODE);d.length>1&&(d=d.filter(T=>T.hasAttribute(this.le)));let N=d[0];if(N)for(let T of l.getAttributeNames()){if(T===Ke||T===We)continue;let V=l.getAttribute(T);if(T==="class")N.classList.add(...V.split(" "));else if(T==="style"){let $=N.style,E=l.style;for(let G of E)$.setProperty(G,E.getPropertyValue(G))}else N.setAttribute(ut(T,n.o),V)}},ke=()=>{for(let d of l.getAttributeNames())!d.startsWith("@")&&!d.startsWith(n.o.l.on)&&l.removeAttribute(d)},Ge=()=>{te(),ke(),r.S(ue),n.ye(l,!1),ue.$emit=ot.emit,ge(n,S),U(l,()=>{de(ue)}),U(A,()=>{ne(l)}),dt(ue)};r.v(le,Ge)}}};var en=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if(F(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=B(o[i])}s.includes("prop")&&(o[0]=".")}}},bt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ye(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(p=>o.some(f=>p.startsWith(f)));for(let p of c)r.has(p)||r.set(p,new en(p)),r.get(p).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var so=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Tt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=ye(e,this.xe);for(let o of r)this.T(o);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=Ue(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),De(s,r),r.forEach(a=>{P(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},g=oe(e)?r:[...r[0].childNodes],u=()=>{p.v(f,()=>{let y=c()[0];if(w(y)&&(y.name?y=y.name:y=Object.entries(p.me()).filter(A=>A[1]===y)[0]?.[0]),!_(y)||F(y)){ae(s,i);return}if(l.name===y)return;ae(s,i);let M=document.createElement(y);for(let A of e.getAttributeNames())A!==this.I&&M.setAttribute(A,e.getAttribute(A));so(g,M),o.insertBefore(M,i),this.p.G(M),l.name=y})},h=[];U(s,()=>{a.stop();for(let y of h)y();h.length=0}),u();let x=R(c,u);h.push(x)}};var ee=[],Vn=t=>{ee.length!==0&&ee[ee.length-1]?.add(t)},we=t=>{if(!t)return()=>{};let e={stop:()=>{}};return io(t,e),K(()=>e.stop(),!0),e.stop},io=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ee.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=R(i,()=>{o(),we(t)});n.push(a)}}finally{ee.pop()}},Et=t=>{let e=ee.length,n=e>0&&ee[e-1];try{return n&&ee.push(null),t()}finally{n&&ee.pop()}},xt=t=>{try{let e=new Set;return ee.push(e),{value:t(),refs:[...e]}}finally{ee.pop()}};var Be=t=>!!t&&t[ct]===1;var q=(t,e,n)=>{if(!m(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(b(o)||Q(o))for(let s of o)q(s,e,!0);else if(me(o))for(let s of o)q(s[0],e,!0),q(s[1],e,!0);if(w(o))for(let s in o)q(o[s],e,!0)}};function ao(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ve=(t,e,n)=>{n.forEach(function(r){let o=t[r];ao(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let p of c)q(p);return a})})},vt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Pn=Array.prototype,tn=Object.create(Pn),co=["push","pop","shift","unshift","splice","sort","reverse"];Ve(Pn,tn,co);var jn=Map.prototype,Ct=Object.create(jn),po=["set","clear","delete"];vt(Ct,"Map");Ve(jn,Ct,po);var $n=Set.prototype,Rt=Object.create($n),fo=["add","clear","delete"];vt(Rt,"Set");Ve($n,Rt,fo);var se={},z=t=>{if(m(t)||Be(t))return t;let e={auto:!0,_value:t},n=c=>w(c)?W in c?!0:b(c)?(Object.setPrototypeOf(c,tn),!0):Q(c)?(Object.setPrototypeOf(c,Rt),!0):me(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(se.stack&&se.stack.length){se.stack[se.stack.length-1].add(a);return}o.size!==0&&Et(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[W];p||(c[W]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||m(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(Vn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=g=>{o.delete(g)};return o.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,be(a,!1),r&&i(t),a};var et=class{E=[];_=new Map;get w(){return this.E.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.E[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.E[o].order=o+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.E[r].order=r}Ee(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var nn=Symbol("r-for"),St=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=He(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=ye(e,this.ne);for(let o of r)this.Xe(o);return n}W(e){return e[nn]?!0:(e[nn]=!0,ye(e,this.ne).forEach(n=>n[nn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return Z(e)?[]:(H(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?v=>D(D(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),p=Ue(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);f.insertBefore(g,e),De(g,p),p.forEach(v=>{P(v)}),e.remove();let u=new Comment(`__end__ ${l}`);f.insertBefore(u,g.nextSibling);let h=this.p,O=h.h,x=O.V(),y=(v,k,j)=>{let C=r.createContext(k,v),Y=et.Ge(C.index,k);return O.v(x,()=>{O.S(C.ctx);let te=j.previousSibling,ke=[];for(let Ge of p){let d=Ge.cloneNode(!0);f.insertBefore(d,j),ke.push(d)}for(ge(h,ke),te=te.nextSibling;te!==j;)Y.items.push(te),te=te.nextSibling}),Y},M=(v,k)=>{let j=S.D(v).items,C=j[j.length-1].nextSibling;for(let Y of j)P(Y);S.te(v,y(v,k,C))},A=(v,k)=>{S.S(y(v,k,u))},Me=v=>{for(let k of S.D(v).items)P(k)},Ke=v=>{let k=S.w;for(let j=v;j<k;++j)S.D(j).index(j)},We=v=>{let k=S.w;H(v)&&(v=v());let j=D(v[0]);if(b(j)&&j.length===0){ae(g,u),S.Ee(0);return}let C=0,Y=Number.MAX_SAFE_INTEGER,te=k,ke=this.p.o.forGrowThreshold,Ge=()=>S.w<te+ke;for(let N of this.Re(v[0])){let T=()=>{if(C<k){let V=S.D(C++);if(c(V.value,N))return;let $=S.Qe(a(N));if($>=C&&$-C<10){if(--C,Y=Math.min(Y,C),Me(C),S.Te(C),--k,$>C+1)for(let E=C;E<$-1&&E<k&&!c(S.D(C).value,N);)++E,Me(C),S.Te(C),--k;T();return}Ge()?(S.Je(C-1,y(C,N,S.D(C-1).items[0])),Y=Math.min(Y,C-1),++k):M(C-1,N)}else A(C++,N)};T()}let d=C;for(k=S.w;C<k;)Me(C++);S.Ee(d),Ke(Y)},Pt=()=>{ue=R(rt,We)},nt=()=>{le.stop(),ue()},le=O.C(r.list),rt=le.value,ue,ot=0,S=new et(a);for(let v of this.Re(rt()[0]))S.S(y(ot++,v,u));U(g,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,p)=>{let f={},l=D(c);if(!a&&r.length===1)f[r[0]]=c;else if(b(l)){let u=0;for(let h of r)f[h]=l[u++]}else for(let u of r)f[u]=l[u];let g={ctx:f,index:z(-1)};return s&&(g.index=f[s.startsWith("#")?s.substring(1):s]=z(p)),g}}}};var wt=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new St(this),this.Ce=new lt(this),this.Se=new Tt(this),this.we=new gt(this),this.J=new bt(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=oe(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);ge(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.H;for(let[s,i]of r.entries()){let[a,c]=i.Q,p=o[s]??o[a];if(!p){console.error("directive not found:",a);continue}i.ge.forEach(f=>{this.T(p,f,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p.getAttribute(Xe);return f||(p.parentElement?c(p.parentElement):null)};if(Jt()){let p=c(n);if(p){this.h.v(Mn(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==mt)return!1;if(F(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,U(i,()=>{P(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];U(n,()=>{i.stop(),f?.stop();for(let x of a)x();a.length=0});let p=Dn(o,this.Oe),f;p&&(f=this.h.C(B(p),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),u,h=()=>f?(u=f.value()[0],u):(u=o,o),O=()=>{if(!e.onChange)return;let x=R(i.value,y=>{let M=l,A=u;e.onChange?.(n,g(),M,h(),A,s)});if(a.push(x),f){let y=R(f.value,M=>{let A=u;e.onChange?.(n,g(),A,h(),A,s)});a.push(y)}};e.once||O(),e.onBind&&a.push(e.onBind(n,i,r,o,f,s)),e.onChange?.(n,g(),void 0,h(),void 0,s)}};var Fn="http://www.w3.org/1999/xlink",lo={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 uo(t){return!!t||t===""}var rn={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=B(r)),Ot(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(b(c)){let p=n?.[a]?.[0],f=c[0],l=c[1];Ot(t,f,l,p)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1],g=n?.[a],u=g&&f in g?f:void 0;Ot(t,f,l,u)}else{let p=n?.[a],f=e[a++],l=e[a];Ot(t,f,l,p)}}}},Ot=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),Z(e)){L(3,name,t);return}if(!_(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){Z(n)?t.removeAttributeNS(Fn,e.slice(6,e.length)):t.setAttributeNS(Fn,e,n);return}let o=e in lo;Z(n)||o&&!uo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var on={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(b(s)){let a=s.length;for(let c=0;c<a;++c)qn(t,s[c],i?.[c])}else qn(t,s,i)}}},qn=(t,e,n)=>{let r=t.classList,o=_(e),s=_(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var zn={onChange:(t,e)=>{let[n,r]=e;H(r)?r(t,n):t.innerHTML=n?.toString()}};function mo(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=pe(t[r],e[r]);return n}function pe(t,e){if(t===e)return!0;let n=qt(t),r=qt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Je(t),r=Je(e),n||r)return t===e;if(n=b(t),r=b(e),n||r)return n&&r?mo(t,e):!1;if(n=w(t),r=w(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!pe(t[i],e[i]))return!1}}return String(t)===String(e)}function At(t,e){return t.findIndex(n=>pe(n,e))}var Kn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Nt=t=>{if(!m(t))throw I(3,"pause");t(void 0,void 0,3)};var Mt=t=>{if(!m(t))throw I(3,"resume");t(void 0,void 0,4)};var Gn={onChange:(t,e)=>{ho(t,e[0])},onBind:(t,e,n,r,o,s)=>yo(t,e,s)},ho=(t,e)=>{let n=Yn(t);if(n&&Jn(t))b(e)?e=At(e,fe(t))>-1:Q(e)?e=e.has(fe(t)):e=vo(t,e),t.checked=e;else if(n&&Qn(t))t.checked=pe(e,fe(t));else if(n||Zn(t))Xn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(er(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=fe(a);if(s)b(e)?a.selected=At(e,c)>-1:a.selected=e.has(c);else if(pe(fe(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(m(t)&&(t=t()),H(t)&&(t=t()),t?_(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Jn=t=>t.type==="checkbox",Qn=t=>t.type==="radio",Xn=t=>t.type==="number"||t.type==="range",Yn=t=>t.tagName==="INPUT",Zn=t=>t.tagName==="TEXTAREA",er=t=>t.tagName==="SELECT",yo=(t,e,n)=>{let r=e.value,o=tt(n?.join(",")),s=tt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim},a=e.refs[0];if(!a)return L(8,t),()=>{};let c=Yn(t);return c&&Jn(t)?bo(t,a):c&&Qn(t)?Co(t,a):c||Zn(t)?go(t,i,a,r):er(t)?Ro(t,a,r):(L(7,t),()=>{})},Wn=/[.,' ·٫]/,go=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Xn(t),a=()=>{!e.trim&&!tt(r()[1]).trim||(t.value=t.value.trim())},c=g=>{let u=g.target;u.composing=1},p=g=>{let u=g.target;u.composing&&(u.composing=0,u.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=g=>{let u=g.target;if(!u||u.composing)return;let h=u.value,O=tt(r()[1]);if(i||O.number||O.int){if(O.int)h=parseInt(h);else{if(Wn.test(h[h.length-1])&&h.split(Wn).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(n()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),t.value=h}else O.trim&&(h=h.trim());n(h)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},bo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=fe(t),i=t.checked,a=e();if(b(a)){let c=At(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else Q(a)?i?a.add(s):a.delete(s):e(xo(t,i))};return t.addEventListener(n,o),r},fe=t=>"_value"in t?t._value:t.value,tr="trueValue",To="falseValue",nr="true-value",Eo="false-value",xo=(t,e)=>{let n=e?tr:To;if(n in t)return t[n];let r=e?nr:Eo;return t.hasAttribute(r)?t.getAttribute(r):e},vo=(t,e)=>{if(tr in t)return pe(e,t.trueValue);let r=nr;return t.hasAttribute(r)?pe(e,t.getAttribute(r)):pe(e,!0)},Co=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=fe(t);e(s)};return t.addEventListener(n,o),r},Ro=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let a=tt(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?Kn(fe(p)):fe(p));if(t.multiple){let p=e();try{if(Nt(e),Q(p)){p.clear();for(let f of c)p.add(f)}else b(p)?(p.splice(0),p.push(...c)):e(c)}finally{Mt(e),q(e)}}else e(c[0])};return t.addEventListener(r,s),o};var So=["stop","prevent","capture","self","once","left","right","middle","passive"],wo=t=>{let e={};if(F(t))return;let n=t.split(",");for(let r of So)e[r]=n.includes(r);return e},an={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let f=e.value(),l=D(o.value()[0]);return _(l)?sn(t,B(l),()=>e.value()[0],s?.join(",")??f[1]):()=>{}}else if(r){let f=e.value();return sn(t,B(r),()=>e.value()[0],s?.join(",")??f[1])}let i=[],a=()=>{i.forEach(f=>f())},c=e.value(),p=c.length;for(let f=0;f<p;++f){let l=c[f];if(H(l)&&(l=l()),w(l))for(let g of Object.entries(l)){let u=g[0],h=()=>{let x=e.value()[f];return H(x)&&(x=x()),x=x[u],H(x)&&(x=x()),x},O=l[u+"_flags"];i.push(sn(t,u,h,O))}else L(2,name,t)}return a}},Oo=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},sn=(t,e,n,r)=>{if(F(e))return L(5,name,t),()=>{};let o=wo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Oo(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&o?.prevent)return;let l=n(f);H(l)&&(l=l(f)),H(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var rr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=B(r)),Pe(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(b(c)){let p=c[0],f=c[1];Pe(t,p,f)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Pe(t,f,l)}else{let p=e[a++],f=e[a];Pe(t,p,f)}}}};function Ao(t){return!!t||t===""}var Pe=(t,e,n)=>{if(Z(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ne),1),t[e]=n??"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ao(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var or={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=b(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var sr={onChange:(t,e)=>{let n=he(t).data,r=n._ord;Cn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var fn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(b(s)){let a=s.length;for(let c=0;c<a;++c)ir(t,s[c],i?.[c])}else ir(t,s,i)}}},ir=(t,e,n)=>{let r=t.style,o=_(e);if(e&&!o){if(n&&!_(n))for(let s in n)e[s]==null&&pn(r,s,"");for(let s in e)pn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in he(t).data)return;r.display=s}},ar=/\s*!important$/;function pn(t,e,n){if(b(n))n.forEach(r=>{pn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=No(t,e);ar.test(n)?t.setProperty(_e(r),n.replace(ar,""),"important"):t[r]=n}}var cr=["Webkit","Moz","ms"],cn={};function No(t,e){let n=cn[e];if(n)return n;let r=B(e);if(r!=="filter"&&r in t)return cn[e]=r;r=Ze(r);for(let o=0;o<cr.length;o++){let s=cr[o]+r;if(s in t)return cn[e]=s}return e}var J=t=>pr(D(t)),pr=(t,e=new WeakMap)=>{if(!t||!w(t))return t;if(b(t))return t.map(J);if(Q(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(me(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return D(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=pr(D(r[1]),e);return n};var fr={onChange:(t,e)=>{let n=e[0];t.textContent=Q(n)?JSON.stringify(J([...n])):me(n)?JSON.stringify(J([...n])):w(n)?JSON.stringify(J(n)):n?.toString()??""}};var lr={onChange:(t,e)=>{Pe(t,"value",e[0])}};var Oe=t=>t?.[at]===1;var Te=t=>{if(Be(t))return t;let e;if(m(t)?(e=t,t=e()):e=z(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,b(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Oe(o)||(t[r]=Te(o))}return e}if(!w(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Oe(r))continue;let o=n[0];Je(o)||(t[o]=null,t[o]=Te(r))}return e};var X=class t{static getDefault(){return t.Ae??(t.Ae=new t)}H={};l={};We=()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Ae;static rt="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";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=Te,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":rr,":":rn,"@":an,[`${e}on`]:an,[`${e}bind`]:rn,[`${e}html`]:zn,[`${e}text`]:fr,[`${e}show`]:sr,[`${e}model`]:Gn,":style":fn,[`${e}bind:style`]:fn,":class":on,[`${e}bind:class`]:on,":ref":or,":value":lr,teleport:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.l)}};var kt=(t,e)=>{if(!t)return;let r=(e??X.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of ko(t,r.pre,s))Mo(i,r.text,o,s)},Mo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],p=ur(c,r);if(p&&F(i[0])&&F(i[2])){let f=t.parentElement;f.setAttribute(e,c.substring(p.start.length,c.length-p.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let p=ur(c,r);if(p){let f=document.createElement("span");f.setAttribute(e,c.substring(p.start.length,c.length-p.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},ko=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of ce(s))o(i)}};return o(t),r},ur=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Lo=9,Io=10,Do=13,Uo=32,Ee=46,Lt=44,Ho=39,_o=34,It=40,je=41,Dt=91,Ut=93,ln=63,Bo=59,mr=58,Vo=123,Ht=125,mn=43,Po=45,dr=96,hr=47,jo=92,yr=[2,3],gr=[mn,Po],Cr={"-":1,"!":1,"~":1,"+":1,new:1},Rr={"=":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},Fe={"=>":2,...Rr,"||":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},Sr=Object.keys(Rr),$o=new Set(Sr),_t=new Set;_t.add("=>");Sr.forEach(t=>_t.add(t));var Fo=new Set(["$","_"]),br={true:!0,false:!1,null:null},qo="this";function wr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var zo=wr(Cr),Ko=wr(Fe),qe="Expected ",Ae="Unexpected ",hn="Unclosed ",Wo=qe+":",Tr=qe+"expression",Go="missing }",Jo=Ae+"object property",Qo=hn+"(",Er=qe+"comma",xr=Ae+"token ",Xo=Ae+"period",un=qe+"expression after ",Yo="missing unaryOp argument",Zo=hn+"[",es=qe+"exponent (",ts="Variable names cannot start with a number (",ns=hn+'quote after "';var $e=t=>t>=48&&t<=57,vr=t=>Fe[t]||0,dn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Fe)||Fo.has(n)}re(e){return this.U(e)||$e(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===Uo||e===Lo||e===Io||e===Do;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Bo||r===Lt)this.e++;else{let o=this.O();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Ae+'"'+this.M+'"')}}}return n}O(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Ko),o=r.length;for(;o>0;){if(r in Fe&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:vr(n),right_a:_t.has(n)},i=this.j(),!i)throw this.i(un+n);let p=[s,o,i];for(;n=this.se();){if(r=vr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:_t.has(n)},c=n;let f=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(un+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if($e(o)||o===Ee)return this.gt();if(o===Ho||o===_o)r=this.bt();else if(o===Dt)r=this.xt();else{for(e=this.r.substr(this.e,zo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Cr,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(Yo);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in br?r={type:4,value:br[r.name],raw:r.name}:r.name===qo&&(r={type:5})):o===It&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===Ee||n===Dt||n===It||n===ln;){let r;if(n===ln){if(this.r.charCodeAt(this.e+1)!==Ee)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===Dt){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==Ut)throw this.i(Zo);this.e++}else n===It?e={type:6,arguments:this.ke(je),callee:e}:(n===Ee||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;$e(this.f);)e+=this.r.charAt(this.e++);if(this.m(Ee))for(e+=this.r.charAt(this.e++);$e(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));$e(this.f);)e+=this.r.charAt(this.e++);if(!$e(this.r.charCodeAt(this.e-1)))throw this.i(es+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(ts+e+this.M+")");if(r===Ee||e.length===1&&e.charCodeAt(0)===Ee)throw this.i(Xo);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(ns+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Ae+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===je&&o&&o>=n.length)throw this.i(xr+String.fromCharCode(e));break}else if(s===Lt){if(this.e++,o++,o!==n.length){if(e===je)throw this.i(xr+",");if(e===Ut)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Er);{let i=this.O();if(!i||i.type===0)throw this.i(Er);n.push(i)}}}if(!r)throw this.i(qe+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(je);if(this.m(je))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Qo)}xt(){return this.e++,{type:9,elements:this.ke(Ut)}}lt(e){if(this.m(Vo)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ht)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.O();if(!r)break;if(this.y(),r.type===2&&(this.m(Lt)||this.m(Ht)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(mr)){this.e++;let o=this.O();if(!o)throw this.i(Jo);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(Lt)&&this.e++}throw this.i(Go)}}ft(e){let n=this.f;if(gr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===mn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!yr.includes(r.argument.type))throw this.i(Ae+r.operator)}}yt(e){if(e.node){let n=this.f;if(gr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!yr.includes(e.node.type))throw this.i(Ae+e.node.operator);this.e+=2,e.node={type:13,operator:n===mn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Ee)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(ln)){this.e++;let n=e.node,r=this.O();if(!r)throw this.i(Tr);if(this.y(),this.m(mr)){this.e++;let o=this.O();if(!o)throw this.i(Tr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Fe[n.operator]<=.9){let s=n;for(;s.right.operator&&Fe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Wo)}}it(e){if(this.y(),this.m(It)){let n=this.e;if(this.e++,this.y(),this.m(je)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(un+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.$(e.node)}$(e){$o.has(e.operator)?(e.type=16,this.$(e.left),this.$(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.$(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(dr)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(dr))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Ht)),!this.m(Ht))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
3
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r?.callee?.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(hr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===hr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(Dt)?r=!0:r&&this.m(Ut)&&(r=!1),this.e+=this.m(jo)?2:1}throw this.i("Unclosed Regex")}},Or=t=>new dn(t).parse();var rs={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},os={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},kr=t=>{if(!t?.some(Mr))return t;let e=[];return t.forEach(n=>Mr(n)?e.push(...n):e.push(n)),e},Ar=(...t)=>kr(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ss={"++":(t,e)=>{let n=t[e];if(m(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(m(n)){let r=n();return n(--r),r}return--t[e]}},is={"++":(t,e)=>{let n=t[e];if(m(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(m(n)){let r=n();return n(r-1),r}return t[e]--}},Nr={"=":(t,e,n)=>{let r=t[e];return m(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return m(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return m(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return m(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return m(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return m(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return m(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return m(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return m(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return m(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return m(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return m(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return m(r)?r(r()^n):t[e]^=n}},Bt=(t,e)=>H(t)?t.bind(e):t,gn=class{u;Ve;Ie;De;A;Ue;Be;constructor(e,n,r,o,s){this.u=b(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],Bt(D(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],Bt(D(i[o]),i);let s=this.Ve;if(s&&o in s)return this.A=s[o],Bt(D(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this._e(n,r,Ar,...e.body)}1(e,n,r){return this.R(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o?.[s];return this.A=i,Bt(D(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>H(i)?i(...kr(a)):i,s=this.R(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.R(n,r,os[e.operator],e.argument)}8(e,n,r){let o=rs[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.R(n,r,o,e.left,e.right)}9(e,n,r){return this._e(++n,r,Ar,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.R(++n,r,s,...e.properties),o}11(e,n,r){return this.R(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){let o={},s=f=>f?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=f=>this.He(a,e.key,n,yn(f,r)),p=f=>this.He(a,e.value,n,yn(f,r));if(e.shorthand){let f=e.key.name;o[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=D(c());o[f]=s(e.value)&&i(f,n)?p:p()}else{let f=e.key.type===4?e.key.value:e.key.name;o[f]=s(e.value)&&i(f,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?ss:is;if(o.type===2){let a=o.name,c=this.Pe(a,r);return Z(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(Z(a))return;let c=this.g(e.right,n,r);return Nr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Nr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return b(o)&&(o.s=Lr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.R(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=D(this[e.type](e,n,r));return this.Ue=e.type,o}He(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.A:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&m(this.A)}eval(e,n){let{value:r,refs:o}=xt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.A),s}R(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}_e(e,n,r,...o){let s=this.Ie;if(!s)return this.R(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,yn(p,n)):this.g(a,e,n)));return r(...i)}},Lr=Symbol("s"),Mr=t=>t?.s===Lr,Ir=(t,e,n,r,o,s,i)=>new gn(e,n,r,o,i).eval(t,s);var Dr={},Vt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){let i=z([]),a=[],c=()=>{for(let u of a)u();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(F(e))return p;let f=this.o.globalContext,l=[],g=(u,h,O,x)=>{try{let y=Ir(u,h,f,n,r,x,o);return O&&l.push(...y.refs),{value:y.value,refs:y.refs,ref:y.ref}}catch(y){L(6,`evaluation error: ${e}`,y)}return{value:void 0,refs:[]}};try{let u=Dr[e]??Or("["+e+"]");Dr[e]=u;let h=this.u,O=()=>{l.splice(0),c();let x=u.elements.map((y,M)=>n?.(M,-1)?{value:A=>g(y,h,!1,{$event:A}).value,refs:[]}:g(y,h,!0));if(!s)for(let y of l){let M=R(y,O);a.push(M)}i(x.map(y=>y.value)),p.refs=x.map(y=>y.ref)};O()}catch(u){L(6,`parse error: ${e}`,u)}return p}V(){return this.u}Fe=[];te(e){this.Fe.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Et()}}Et(){this.u=this.Fe.pop()??[]}};var as="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",cs=new Set(as.toUpperCase().split(",")),ps="http://www.w3.org/2000/svg",Ur=(t,e)=>{oe(t)?t.content.appendChild(e):t.appendChild(e)},bn=(t,e,n,r)=>{let o=t.t;if(o){let i=n&&cs.has(o.toUpperCase())?document.createElementNS(ps,o.toLowerCase()):document.createElement(o),a=t.a;if(a)for(let p of Object.entries(a)){let f=p[0],l=p[1];f.startsWith("#")&&(l=f.substring(1),f="name"),i.setAttribute(ut(f,r),l)}let c=t.c;if(c)for(let p of c)bn(p,i,n,r);Ur(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)Ur(e,i);else throw new Error("unsupported node type.")}},Ne=(t,e,n)=>{n??=X.getDefault();let r=document.createDocumentFragment();if(!b(t))return bn(t,r,!!e,n),r;for(let o of t)bn(o,r,!!e,n);return r};var Hr=(t,e={selector:"#app"},n)=>{_(e)&&(e={selector:"#app",template:e}),Un(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Re(r))throw I(0);n||(n=X.getDefault());let o=()=>{for(let a of[...r.childNodes])P(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ne(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&kt(r,n),new Tn(t,r,n).T(),U(r,()=>{de(t)}),dt(t),{context:t,unmount:()=>{P(r)},unbind:()=>{ne(r)}}},Tn=class{Rt;$e;o;h;p;constructor(e,n,r){this.Rt=e,this.$e=n,this.o=r,this.h=new Vt([e],r),this.p=new wt(this.h)}T(){this.p.G(this.$e)}};var ze=t=>{if(b(t))return t.map(o=>ze(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)??""])));let r=ce(t);return r.length>0&&(e.c=[...r].map(o=>ze(o))),e};var _r=(t,e={})=>{b(e)&&(e={props:e}),_(t)&&(t={template:t});let n=e.context??(()=>({})),r=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(t.template);t.element=s}else t.json&&(t.element=Ne(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&kt(t.element,e.config??X.getDefault());let o=t.element;if(!r&&((t.isSVG??(Ye(o)&&o.hasAttribute?.("isSVG")))||Ye(o)&&o.querySelector("[isSVG]"))){let s=o.content,i=s?[...s.childNodes]:[...o.childNodes],a=ze(i);t.element=Ne(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Br=t=>{Ce()?.onMounted.push(t)};var Vr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=fs(t,n),e(...o))};return r[W]=1,be(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},fs=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let r=0,o=we(()=>{if(r>0){o(),e.isStopped=!0,q(n);return}n(t()),++r});return n.stop=o,n};var Pr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=ls(t,e,n),r(...s))};return o[W]=1,be(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},ls=(t,e,n)=>{let r=n.ref??z(null);n.ref=r,n.isStopped=!1;let o=0,s=a=>{if(o>0){r.stop(),n.isStopped=!0,q(r);return}r(e(...t.map(c=>c()))),++o},i=[];for(let a of t){let c=R(a,s);i.push(c)}return s(null),r.stop=()=>{i.forEach(a=>{a()})},r};var jr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=us(t,e,n),r(...s))};return o[W]=1,be(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},us=(t,e,n)=>{let r=n.ref??z(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=R(t,s=>{if(o>0){r.stop(),n.isStopped=!0,q(r);return}r(e(s)),++o},!0),r};var $r=t=>(t[ct]=1,t);var Fr=(t,e)=>{if(!e)throw I(5);let r=Oe(t)?Te:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=we(o);return K(i,!0),t};var En=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},qr=En;var zr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(R(i,o));n&&o();let s=()=>{for(let i of r)i()};return K(s,!0),s};var Kr=t=>{if(!m(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Wr=t=>{xn();try{t()}finally{vn()}},xn=()=>{se.stack||(se.stack=[]),se.stack.push(new Set)},vn=()=>{let t=se.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete se.stack;for(let n of e)try{q(n)}catch(r){console.error(r)}};
1
+ "use strict";var $t=Object.defineProperty;var Xo=Object.getOwnPropertyDescriptor;var Yo=Object.getOwnPropertyNames;var Zo=Object.prototype.hasOwnProperty;var er=(t,e)=>{for(var n in e)$t(t,n,{get:e[n],enumerable:!0})},tr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Yo(e))!Zo.call(t,r)&&r!==n&&$t(t,r,{get:()=>e[r],enumerable:!(o=Xo(e,r))||o.enumerable});return t};var nr=t=>tr($t({},"__esModule",{value:!0}),t);var hs={};er(hs,{ComponentHead:()=>Le,RegorConfig:()=>Y,addUnbinder:()=>U,batch:()=>Qo,collectRefs:()=>Et,computeMany:()=>Fo,computeRef:()=>qo,computed:()=>$o,createApp:()=>Vo,createComponent:()=>Po,endBatch:()=>Cn,entangle:()=>ht,flatten:()=>J,getBindData:()=>ye,html:()=>En,isDeepRef:()=>we,isRaw:()=>_e,isRef:()=>m,markRaw:()=>zo,observe:()=>R,observeMany:()=>Go,observerCount:()=>Jo,onMounted:()=>jo,onUnmounted:()=>K,pause:()=>At,persist:()=>Ko,raw:()=>Wo,ref:()=>Ee,removeNode:()=>P,resume:()=>Nt,silence:()=>Tt,sref:()=>z,startBatch:()=>xn,toFragment:()=>Ae,toJsonTemplate:()=>qe,trigger:()=>q,unbind:()=>oe,unref:()=>D,useScope:()=>dt,warningHandler:()=>Je,watchEffect:()=>Se});module.exports=nr(hs);var ke=Symbol(":regor");var oe=t=>{let e=[t];for(;e.length>0;){let n=e.shift();or(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},or=t=>{let e=t[ke];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[ke]}};var P=t=>{t.remove(),setTimeout(()=>oe(t),1)};var H=t=>typeof t=="function",_=t=>typeof t=="string",Sn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",F=t=>typeof t!="string"||!t?.trim(),rr=Object.prototype.toString,Ft=t=>rr.call(t),de=t=>Ft(t)==="[object Map]",X=t=>Ft(t)==="[object Set]",qt=t=>Ft(t)==="[object Date]",Ge=t=>typeof t=="symbol",b=Array.isArray,w=t=>t!==null&&typeof t=="object";var wn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},I=(t,...e)=>{let n=wn[t];return new Error(H(n)?n.call(wn,...e):n)};var rt=[],On=()=>{let t={onMounted:[],onUnmounted:[]};return rt.push(t),t},Ce=t=>{let e=rt[rt.length-1];if(!e&&!t)throw I(2);return e},An=t=>{let e=Ce();return t&&Kt(t),rt.pop(),e},zt=Symbol("csp"),Kt=t=>{let e=t,n=e[zt];if(n){let o=Ce();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[zt]=Ce()},st=t=>t[zt];var he=t=>{st(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Le=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,o,r,s){this.props=e,this.pe=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)P(e),e=e.nextSibling;for(let o of this.ctx)he(o)}};var ye=t=>{let e=t[ke];if(e)return e;let n={unbinders:[],data:{}};return t[ke]=n,n};var U=(t,e)=>{ye(t).unbinders.push(e)};var Nn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},L=(t,...e)=>{let n=Nn[t],o=H(n)?n.call(Nn,...e):n,r=Je.warning;r&&(_(o)?r(o):r(o,...o.args))},Je={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var it=Symbol("ref"),W=Symbol("sref"),at=Symbol("raw");var m=t=>t?.[W]===1;var R=(t,e,n)=>{if(!m(t))throw I(3,"observe");n&&e(t());let r=t(void 0,void 0,0,e);return K(r,!0),r};var pt={},ct={},Mn=1,kn=t=>{let e=(Mn++).toString();return pt[e]=t,ct[e]=0,e},Wt=t=>{ct[t]+=1},Gt=t=>{--ct[t]===0&&(delete pt[t],delete ct[t])},Ln=t=>pt[t],Jt=()=>Mn!==1&&Object.keys(pt).length>0,Qe="r-switch",sr=t=>{let e=t.filter(o=>ve(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(Qe))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ie=(t,e)=>{if(!Jt())return;let n=sr(e);n.length!==0&&(n.forEach(Wt),U(t,()=>{n.forEach(Gt)}))};var Qt=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}be(e,r)},Xt=Symbol("r-if"),In=Symbol("r-else"),Dn=t=>t[In]===1,ft=class{p;B;q;K;z;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.q=Ue(e.o.l.if),this.K=e.o.l.else,this.z=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),o=ge(e,this.q);for(let r of o)this.T(r);return n}W(e){return e[Xt]?!0:(e[Xt]=!0,ge(e,this.q).forEach(n=>n[Xt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.W(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,o){let r=De(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),Ie(i,r),r.forEach(c=>{P(c)}),e.remove(),n!=="if"&&(e[In]=1);let a=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.K)){e.removeAttribute(this.K);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Qt(r,this.p,s,a)},unmount:()=>{ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.z);if(!r)return[];e.removeAttribute(this.z);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${r} `),p=this.p.h.C(r),f=p.value,l=this.ce(o,n),g=[];U(a,()=>{p.stop();for(let O of g)O();g.length=0});let h=R(f,n);return g.push(h),[{mount:()=>{Qt(s,this.p,i,c)},unmount:()=>{ce(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(l)}}L(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),p=c.value,f=!1,l=this.p.h,g=l.V(),u=()=>{l.v(g,()=>{if(p()[0])f||(Qt(r,this.p,s,a),f=!0),h.forEach(M=>{M.unmount(),M.isMounted=!1});else{ce(i,a),f=!1;let M=!1;for(let A of h)!M&&A.isTrue()?(A.isMounted||(A.mount(),A.isMounted=!0),M=!0):(A.unmount(),A.isMounted=!1)}})},h=this.ce(o,u),O=[];U(i,()=>{c.stop();for(let M of O)M();O.length=0}),u();let y=R(p,u);O.push(y)}};var De=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},be=(t,e)=>{for(let n of e)Dn(n)||t.G(n)},ge=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Xe=t=>t.nodeType===Node.ELEMENT_NODE,Un=t=>t instanceof HTMLSlotElement,pe=t=>se(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;P(n),n=o}},Te=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Hn=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Ue=t=>`[${CSS.escape(t)}]`,lt=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Yt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ir=/-(\w)/g,B=Yt(t=>t&&t.replace(ir,(e,n)=>n?n.toUpperCase():"")),ar=/\B([A-Z])/g,He=Yt(t=>t&&t.replace(ar,"-$1").toLowerCase()),Ye=Yt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ut={};var mt=t=>{st(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Zt=Symbol("scope"),dt=t=>{try{On();let e=t();Kt(e);let n={context:e,unmount:()=>he(e),[Zt]:1};return n[Zt]=1,n}finally{An()}},_n=t=>w(t)?Zt in t:!1;var Bn={collectRefObj:!0,onBind:(t,e)=>R(e.value,()=>{let o=e.value(),r=e.context,s=o[0];if(w(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=r[a];p!==c&&(m(p)?p(c):r[a]=c)}},!0)};var Vn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),o=e.context,r=n[0];if(!w(r))return()=>{};for(let s of Object.entries(r)){let i=s[0],a=s[1],c=o[i];c!==a&&(m(c)?c(a):o[i]=a)}return()=>{}}};var Pn={collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(!o)return()=>{};let i=B(o);return R(e.value,()=>{let c=e.refs[0]??e.value()[0],p=e.context,f=p[o];f!==c&&(m(f)?f(c):p[i]=c)},!0)}};var ht=(t,e)=>{if(t===e)return()=>{};let n=R(t,r=>e(r)),o=R(e,r=>t(r));return e(t()),()=>{n(),o()}};var D=t=>m(t)?t():t;var yt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,o=n.h,r=n.o.fe,s=n.o.ue,i=o.me(),a=o.ze(),c=[...r.keys(),...a,...[...r.keys()].map(He),...a.map(He)].join(",");if(F(c))return;let p=e.querySelectorAll(c),f=e.matches?.(c)?[e,...p]:p;for(let l of f){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let u=l.nextSibling,h=B(l.tagName).toUpperCase(),x=i[h]??s.get(h);if(!x)continue;let y=x.template;if(!y)continue;let M=l.parentElement;if(!M)continue;let A=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let ze=n.o.l.props,Ke=n.o.l.propsOnce,Vt=n.o.l.bind,tt=(d,N)=>{let T={},V=d.hasAttribute(ze),$=d.hasAttribute(Ke);return o.v(N,()=>{o.S(T),V&&n.T(Bn,d,ze),$&&n.T(Vn,d,Ke);let E=x.props;if(!E||E.length===0)return;E=E.map(B);let G=new Map(E.map(Q=>[Q.toLowerCase(),Q]));for(let Q of E.concat(E.map(He))){let ae=d.getAttribute(Q);ae!==null&&(T[B(Q)]=ae,d.removeAttribute(Q))}let Pt=n.J.de(d,!1);for(let[Q,ae]of Pt.entries()){let[jt,vn]=ae.Q;if(!vn)continue;let Rn=G.get(B(vn).toLowerCase());Rn&&(jt!=="."&&jt!==":"&&jt!==Vt||n.T(Pn,d,Q,!0,Rn,ae.X))}}),T},ue=[...o.V()],nt=()=>{let d=tt(l,ue),N=new Le(d,l,ue,A,Ne),T=dt(()=>x.context(N)??{}).context;if(N.autoProps){for(let[V,$]of Object.entries(d))if(V in T){let E=T[V];if(E===$)continue;N.entangle&&m(E)&&m($)?U(A,ht($,E)):m(E)?E($):T[V]=D($)}else T[V]=$;N.onAutoPropsAssigned?.()}return{componentCtx:T,head:N}},{componentCtx:me,head:ot}=nt(),S=[...pe(y)],C=S.length,k=l.childNodes.length===0,j=d=>{let N=d.parentElement;if(k){for(let E of[...d.childNodes])N.insertBefore(E,d);return}let T=d.name;F(T)&&(T=d.getAttributeNames().filter(E=>E.startsWith("#"))[0],F(T)?T="default":T=T.substring(1));let V=l.querySelector(`template[name='${T}'], template[\\#${T}]`);!V&&T==="default"&&(V=l.querySelector("template:not([name])"),V&&V.getAttributeNames().filter(E=>E.startsWith("#")).length>0&&(V=null));let $=E=>{ot.enableSwitch&&o.v(ue,()=>{o.S(me);let G=tt(d,o.V());o.v(ue,()=>{o.S(G);let Pt=o.V(),Q=kn(Pt);for(let ae of E)ve(ae)&&(ae.setAttribute(Qe,Q),Wt(Q),U(ae,()=>{Gt(Q)}))})})};if(V){let E=[...pe(V)];for(let G of E)N.insertBefore(G,d);$(E)}else{if(T!=="default"){for(let G of[...pe(d)])N.insertBefore(G,d);return}let E=[...pe(l)].filter(G=>!se(G));for(let G of E)N.insertBefore(G,d);$(E)}},v=d=>{if(!ve(d))return;let N=d.querySelectorAll("slot");if(Un(d)){j(d),d.remove();return}for(let T of N)j(T),T.remove()};(()=>{for(let d=0;d<C;++d)S[d]=S[d].cloneNode(!0),g.insertBefore(S[d],u),v(S[d])})(),M.insertBefore(Ne,u);let ne=()=>{if(!x.inheritAttrs)return;let d=S.filter(T=>T.nodeType===Node.ELEMENT_NODE);d.length>1&&(d=d.filter(T=>T.hasAttribute(this.le)));let N=d[0];if(N)for(let T of l.getAttributeNames()){if(T===ze||T===Ke)continue;let V=l.getAttribute(T);if(T==="class")N.classList.add(...V.split(" "));else if(T==="style"){let $=N.style,E=l.style;for(let G of E)$.setProperty(G,E.getPropertyValue(G))}else N.setAttribute(lt(T,n.o),V)}},Me=()=>{for(let d of l.getAttributeNames())!d.startsWith("@")&&!d.startsWith(n.o.l.on)&&l.removeAttribute(d)},We=()=>{ne(),Me(),o.S(me),n.ye(l,!1),me.$emit=ot.emit,be(n,S),U(l,()=>{he(me)}),U(A,()=>{oe(l)}),mt(me)};o.v(ue,We)}}};var en=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let o=e.indexOf("."),r=this.Q=(o<0?e:e.substring(0,o)).split(/[:@]/);if(F(r[0])&&(r[0]=n?".":e[0]),o>=0){let s=this.X=e.slice(o+1).split(".");if(s.includes("camel")){let i=r.length-1;r[i]=B(r[i])}s.includes("prop")&&(r[0]=".")}}},gt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Xe(e))return o;let r=this.be,s=a=>{let c=a.getAttributeNames().filter(p=>r.some(f=>p.startsWith(f)));for(let p of c)o.has(p)||o.set(p,new en(p)),o.get(p).ge.push(a)};if(s(e),!n)return o;let i=e.querySelectorAll("*");for(let a of i)s(a);return o}};var cr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},bt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=Ue(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=ge(e,this.xe);for(let r of o)this.T(r);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n||!n.startsWith("regor:"))return;n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let o=De(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Ie(s,o),o.forEach(a=>{P(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,p=this.p.h,f=p.V(),l={name:""},g=se(e)?o:[...o[0].childNodes],u=()=>{p.v(f,()=>{let y=c()[0];if(w(y)&&(y.name?y=y.name:y=Object.entries(p.me()).filter(A=>A[1]===y)[0]?.[0]),!_(y)||F(y)){ce(s,i);return}if(l.name===y)return;ce(s,i);let M=document.createElement(y);for(let A of e.getAttributeNames())A!==this.I&&M.setAttribute(A,e.getAttribute(A));cr(g,M),r.insertBefore(M,i),this.p.G(M),l.name=y})},h=[];U(s,()=>{a.stop();for(let y of h)y();h.length=0}),u();let x=R(c,u);h.push(x)}};var te=[],jn=t=>{te.length!==0&&te[te.length-1]?.add(t)},Se=t=>{if(!t)return()=>{};let e={stop:()=>{}};return pr(t,e),K(()=>e.stop(),!0),e.stop},pr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(te.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=R(i,()=>{r(),Se(t)});n.push(a)}}finally{te.pop()}},Tt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},Et=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var _e=t=>!!t&&t[at]===1;var q=(t,e,n)=>{if(!m(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(b(r)||X(r))for(let s of r)q(s,e,!0);else if(de(r))for(let s of r)q(s[0],e,!0),q(s[1],e,!0);if(w(r))for(let s in r)q(r[s],e,!0)}};function fr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Be=(t,e,n)=>{n.forEach(function(o){let r=t[o];fr(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let p of c)q(p);return a})})},xt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var $n=Array.prototype,tn=Object.create($n),lr=["push","pop","shift","unshift","splice","sort","reverse"];Be($n,tn,lr);var Fn=Map.prototype,Ct=Object.create(Fn),ur=["set","clear","delete"];xt(Ct,"Map");Be(Fn,Ct,ur);var qn=Set.prototype,vt=Object.create(qn),mr=["add","clear","delete"];xt(vt,"Set");Be(qn,vt,mr);var ie={},z=t=>{if(m(t)||_e(t))return t;let e={auto:!0,_value:t},n=c=>w(c)?W in c?!0:b(c)?(Object.setPrototypeOf(c,tn),!0):X(c)?(Object.setPrototypeOf(c,vt),!0):de(c)?(Object.setPrototypeOf(c,Ct),!0):!1:!1,o=n(t),r=new Set,s=(c,p)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}r.size!==0&&Tt(()=>{for(let f of[...r.keys()])r.has(f)&&f(c,p)})},i=c=>{let p=c[W];p||(c[W]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],l=c[1];return 0 in c?e._value===f||m(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,l),e._value):(jn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let l=g=>{r.delete(g)};return r.add(f),()=>{l(f)}}case 1:{let f=c[1],l=e._value;s(l,f);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Te(a,!1),o&&i(t),a};var Ze=class{E=[];_=new Map;get w(){return this.E.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.E[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.E.push(e),this.Z(e)}Je(e,n){let o=this.w;for(let r=e;r<o;++r)this.E[r].order=r+1;n.order=e,this.E.splice(e,0,n),this.Z(n)}D(e){return this.E[e]}te(e,n){this.ee(e),this.E[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.E.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.E[o].order=o}Ee(e){let n=this.w;for(let o=e;o<n;++o)this.ee(o);this.E.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var nn=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=Ue(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=ge(e,this.ne);for(let r of o)this.Xe(r);return n}W(e){return e[nn]?!0:(e[nn]=!0,ge(e,this.ne).forEach(n=>n[nn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return ee(e)?[]:(H(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))}Ye(e,n){let o=this.Ze(n);if(!o?.list){L(1,this.b,n,e);return}let r=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=i?C=>D(D(C)?.[i]):C=>C,c=(C,k)=>a(C)===a(k),p=De(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);f.insertBefore(g,e),Ie(g,p),p.forEach(C=>{P(C)}),e.remove();let u=new Comment(`__end__ ${l}`);f.insertBefore(u,g.nextSibling);let h=this.p,O=h.h,x=O.V(),y=(C,k,j)=>{let v=o.createContext(k,C),Z=Ze.Ge(v.index,k);return O.v(x,()=>{O.S(v.ctx);let ne=j.previousSibling,Me=[];for(let We of p){let d=We.cloneNode(!0);f.insertBefore(d,j),Me.push(d)}for(be(h,Me),ne=ne.nextSibling;ne!==j;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(C,k)=>{let j=S.D(C).items,v=j[j.length-1].nextSibling;for(let Z of j)P(Z);S.te(C,y(C,k,v))},A=(C,k)=>{S.S(y(C,k,u))},Ne=C=>{for(let k of S.D(C).items)P(k)},ze=C=>{let k=S.w;for(let j=C;j<k;++j)S.D(j).index(j)},Ke=C=>{let k=S.w;H(C)&&(C=C());let j=D(C[0]);if(b(j)&&j.length===0){ce(g,u),S.Ee(0);return}let v=0,Z=Number.MAX_SAFE_INTEGER,ne=k,Me=this.p.o.forGrowThreshold,We=()=>S.w<ne+Me;for(let N of this.Re(C[0])){let T=()=>{if(v<k){let V=S.D(v++);if(c(V.value,N))return;let $=S.Qe(a(N));if($>=v&&$-v<10){if(--v,Z=Math.min(Z,v),Ne(v),S.Te(v),--k,$>v+1)for(let E=v;E<$-1&&E<k&&!c(S.D(v).value,N);)++E,Ne(v),S.Te(v),--k;T();return}We()?(S.Je(v-1,y(v,N,S.D(v-1).items[0])),Z=Math.min(Z,v-1),++k):M(v-1,N)}else A(v++,N)};T()}let d=v;for(k=S.w;v<k;)Ne(v++);S.Ee(d),ze(Z)},Vt=()=>{me=R(nt,Ke)},tt=()=>{ue.stop(),me()},ue=O.C(o.list),nt=ue.value,me,ot=0,S=new Ze(a);for(let C of this.Re(nt()[0]))S.S(y(ot++,C,u));U(g,tt),Vt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,p)=>{let f={},l=D(c);if(!a&&o.length===1)f[o[0]]=c;else if(b(l)){let u=0;for(let h of o)f[h]=l[u++]}else for(let u of o)f[u]=l[u];let g={ctx:f,index:z(-1)};return s&&(g.index=f[s.startsWith("#")?s.substring(1):s]=z(p)),g}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new ft(this),this.Se=new bt(this),this.we=new yt(this),this.J=new gt(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.x))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);be(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let o=this.J.de(e,n),r=this.o.H;for(let[s,i]of o.entries()){let[a,c]=i.Q,p=r[s]??r[a];if(!p){console.error("directive not found:",a);continue}i.ge.forEach(f=>{this.T(p,f,s,!1,c,i.X)})}}T(e,n,o,r,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=p=>{let f=p.getAttribute(Qe);return f||(p.parentElement?c(p.parentElement):null)};if(Jt()){let p=c(n);if(p){this.h.v(Ln(p),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,o){if(e!==ut)return!1;if(F(o))return!0;let r=document.querySelector(o);if(r){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${o}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,U(i,()=>{P(n)}),r.appendChild(n)}return!0}L(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.nt(e,n,o))return;let i=this.h.C(o,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];U(n,()=>{i.stop(),f?.stop();for(let x of a)x();a.length=0});let p=Hn(r,this.Oe),f;p&&(f=this.h.C(B(p),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),u,h=()=>f?(u=f.value()[0],u):(u=r,r),O=()=>{if(!e.onChange)return;let x=R(i.value,y=>{let M=l,A=u;e.onChange?.(n,g(),M,h(),A,s)});if(a.push(x),f){let y=R(f.value,M=>{let A=u;e.onChange?.(n,g(),A,h(),A,s)});a.push(y)}};e.once||O(),e.onBind&&a.push(e.onBind(n,i,o,r,f,s)),e.onChange?.(n,g(),void 0,h(),void 0,s)}};var zn="http://www.w3.org/1999/xlink",dr={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 hr(t){return!!t||t===""}var on={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=B(o)),wt(t,o,e[0],r);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(b(c)){let p=n?.[a]?.[0],f=c[0],l=c[1];wt(t,f,l,p)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1],g=n?.[a],u=g&&f in g?f:void 0;wt(t,f,l,u)}else{let p=n?.[a],f=e[a++],l=e[a];wt(t,f,l,p)}}}},wt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),ee(e)){L(3,name,t);return}if(!_(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(zn,e.slice(6,e.length)):t.setAttributeNS(zn,e,n);return}let r=e in dr;ee(n)||r&&!hr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var rn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(b(s)){let a=s.length;for(let c=0;c<a;++c)Kn(t,s[c],i?.[c])}else Kn(t,s,i)}}},Kn=(t,e,n)=>{let o=t.classList,r=_(e),s=_(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?n!==e&&(s&&o.remove(...n.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):n&&s&&o.remove(...n.trim().split(/\s+/))};var Wn={onChange:(t,e)=>{let[n,o]=e;H(o)?o(t,n):t.innerHTML=n?.toString()}};function yr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=fe(t[o],e[o]);return n}function fe(t,e){if(t===e)return!0;let n=qt(t),o=qt(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=Ge(t),o=Ge(e),n||o)return t===e;if(n=b(t),o=b(e),n||o)return n&&o?yr(t,e):!1;if(n=w(t),o=w(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!fe(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>fe(n,e))}var Gn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!m(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!m(t))throw I(3,"resume");t(void 0,void 0,4)};var Qn={onChange:(t,e)=>{gr(t,e[0])},onBind:(t,e,n,o,r,s)=>br(t,e,s)},gr=(t,e)=>{let n=eo(t);if(n&&Xn(t))b(e)?e=Ot(e,le(t))>-1:X(e)?e=e.has(le(t)):e=Rr(t,e),t.checked=e;else if(n&&Yn(t))t.checked=fe(e,le(t));else if(n||to(t))Zn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(no(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=le(a);if(s)b(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(fe(le(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},et=t=>(m(t)&&(t=t()),H(t)&&(t=t()),t?_(t)?{trim:t.includes("trim"),lazy:t.includes("lazy"),number:t.includes("number"),int:t.includes("int")}:{trim:!!t.trim,lazy:!!t.lazy,number:!!t.number,int:!!t.int}:{trim:!1,lazy:!1,number:!1,int:!1}),Xn=t=>t.type==="checkbox",Yn=t=>t.type==="radio",Zn=t=>t.type==="number"||t.type==="range",eo=t=>t.tagName==="INPUT",to=t=>t.tagName==="TEXTAREA",no=t=>t.tagName==="SELECT",br=(t,e,n)=>{let o=e.value,r=et(n?.join(",")),s=et(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim},a=e.refs[0];if(!a)return L(8,t),()=>{};let c=eo(t);return c&&Xn(t)?Er(t,a):c&&Yn(t)?Sr(t,a):c||to(t)?Tr(t,i,a,o):no(t)?wr(t,a,o):(L(7,t),()=>{})},Jn=/[.,' ·٫]/,Tr=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Zn(t),a=()=>{!e.trim&&!et(o()[1]).trim||(t.value=t.value.trim())},c=g=>{let u=g.target;u.composing=1},p=g=>{let u=g.target;u.composing&&(u.composing=0,u.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},l=g=>{let u=g.target;if(!u||u.composing)return;let h=u.value,O=et(o()[1]);if(i||O.number||O.int){if(O.int)h=parseInt(h);else{if(Jn.test(h[h.length-1])&&h.split(Jn).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(n()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),t.value=h}else O.trim&&(h=h.trim());n(h)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},Er=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=le(t),i=t.checked,a=e();if(b(a)){let c=Ot(a,s),p=c!==-1;i&&!p?a.push(s):!i&&p&&a.splice(c,1)}else X(a)?i?a.add(s):a.delete(s):e(vr(t,i))};return t.addEventListener(n,r),o},le=t=>"_value"in t?t._value:t.value,oo="trueValue",xr="falseValue",ro="true-value",Cr="false-value",vr=(t,e)=>{let n=e?oo:xr;if(n in t)return t[n];let o=e?ro:Cr;return t.hasAttribute(o)?t.getAttribute(o):e},Rr=(t,e)=>{if(oo in t)return fe(e,t.trueValue);let o=ro;return t.hasAttribute(o)?fe(e,t.getAttribute(o)):fe(e,!0)},Sr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=le(t);e(s)};return t.addEventListener(n,r),o},wr=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=et(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?Gn(le(p)):le(p));if(t.multiple){let p=e();try{if(At(e),X(p)){p.clear();for(let f of c)p.add(f)}else b(p)?(p.splice(0),p.push(...c)):e(c)}finally{Nt(e),q(e)}}else e(c[0])};return t.addEventListener(o,s),r};var Or=["stop","prevent","capture","self","once","left","right","middle","passive"],Ar=t=>{let e={};if(F(t))return;let n=t.split(",");for(let o of Or)e[o]=n.includes(o);return e},an={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(r){let f=e.value(),l=D(r.value()[0]);return _(l)?sn(t,B(l),()=>e.value()[0],s?.join(",")??f[1]):()=>{}}else if(o){let f=e.value();return sn(t,B(o),()=>e.value()[0],s?.join(",")??f[1])}let i=[],a=()=>{i.forEach(f=>f())},c=e.value(),p=c.length;for(let f=0;f<p;++f){let l=c[f];if(H(l)&&(l=l()),w(l))for(let g of Object.entries(l)){let u=g[0],h=()=>{let x=e.value()[f];return H(x)&&(x=x()),x=x[u],H(x)&&(x=x()),x},O=l[u+"_flags"];i.push(sn(t,u,h,O))}else L(2,name,t)}return a}},Nr=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(r&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return o?[t,p=>c(p)?p.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},sn=(t,e,n,o)=>{if(F(e))return L(5,name,t),()=>{};let r=Ar(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Nr(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&r?.prevent)return;let l=n(f);H(l)&&(l=l(f)),H(l)&&l(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!r){a(f);return}try{if(r.left&&f.button!==0||r.middle&&f.button!==1||r.right&&f.button!==2||r.self&&f.target!==t)return;r.stop&&f.stopPropagation(),r.prevent&&f.preventDefault(),a(f)}finally{r.once&&c()}};return t.addEventListener(e,p,s),c};var so={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=B(o)),Ve(t,o,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(b(c)){let p=c[0],f=c[1];Ve(t,p,f)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ve(t,f,l)}else{let p=e[a++],f=e[a];Ve(t,p,f)}}}};function Mr(t){return!!t||t===""}var Ve=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(oe),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Mr(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||L(4,e,o,n,s)}r&&t.removeAttribute(e)};var io={once:!0,onBind:(t,e,n)=>{let o=e.value()[0],r=b(o),s=e.refs[0];return r?o.push(t):s?s?.(t):e.context[n]=t,()=>{if(r){let i=o.indexOf(t);i!==-1&&o.splice(i,1)}else s?.(null)}}};var ao={onChange:(t,e)=>{let n=ye(t).data,o=n._ord;Sn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var fn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(b(s)){let a=s.length;for(let c=0;c<a;++c)co(t,s[c],i?.[c])}else co(t,s,i)}}},co=(t,e,n)=>{let o=t.style,r=_(e);if(e&&!r){if(n&&!_(n))for(let s in n)e[s]==null&&pn(o,s,"");for(let s in e)pn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in ye(t).data)return;o.display=s}},po=/\s*!important$/;function pn(t,e,n){if(b(n))n.forEach(o=>{pn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=kr(t,e);po.test(n)?t.setProperty(He(o),n.replace(po,""),"important"):t[o]=n}}var fo=["Webkit","Moz","ms"],cn={};function kr(t,e){let n=cn[e];if(n)return n;let o=B(e);if(o!=="filter"&&o in t)return cn[e]=o;o=Ye(o);for(let r=0;r<fo.length;r++){let s=fo[r]+o;if(s in t)return cn[e]=s}return e}var J=t=>lo(D(t)),lo=(t,e=new WeakMap)=>{if(!t||!w(t))return t;if(b(t))return t.map(J);if(X(t)){let o=new Set;for(let r of t.keys())o.add(J(r));return o}if(de(t)){let o=new Map;for(let r of t)o.set(J(r[0]),J(r[1]));return o}if(e.has(t))return D(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=lo(D(o[1]),e);return n};var uo={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):de(n)?JSON.stringify(J([...n])):w(n)?JSON.stringify(J(n)):n?.toString()??""}};var mo={onChange:(t,e)=>{Ve(t,"value",e[0])}};var we=t=>t?.[it]===1;var Ee=t=>{if(_e(t))return t;let e;if(m(t)?(e=t,t=e()):e=z(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[it]=1,b(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];we(r)||(t[o]=Ee(r))}return e}if(!w(t))return e;for(let n of Object.entries(t)){let o=n[1];if(we(o))continue;let r=n[0];Ge(r)||(t[r]=null,t[r]=Ee(o))}return e};var Y=class t{static getDefault(){return t.Ae??(t.Ae=new t)}H={};l={};We=()=>Object.keys(this.H).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Ae;static rt="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";forGrowThreshold=10;globalContext;useInterpolation=!0;constructor(e){if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.ot()}ot(){let e={},n=globalThis;for(let o of t.rt.split(","))e[o]=n[o];return e.ref=Ee,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Je.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ye(n.defaultName),n),this.ue.set(Ye(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":so,":":on,"@":an,[`${e}on`]:an,[`${e}bind`]:on,[`${e}html`]:Wn,[`${e}text`]:uo,[`${e}show`]:ao,[`${e}model`]:Qn,":style":fn,[`${e}bind:style`]:fn,":class":rn,[`${e}bind:class`]:rn,":ref":io,":value":mo,[`${e}teleport`]:ut},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.H,this.l)}};var Mt=(t,e)=>{if(!t)return;let o=(e??Y.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ir(t,o.pre,s))Lr(i,o.text,r,s)},Lr=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],p=ho(c,o);if(p&&F(i[0])&&F(i[2])){let f=t.parentElement;f.setAttribute(e,c.substring(p.start.length,c.length-p.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let p=ho(c,o);if(p){let f=document.createElement("span");f.setAttribute(e,c.substring(p.start.length,c.length-p.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Ir=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of pe(s))r(i)}};return r(t),o},ho=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Dr=9,Ur=10,Hr=13,_r=32,xe=46,kt=44,Br=39,Vr=34,Lt=40,Pe=41,It=91,Dt=93,ln=63,Pr=59,yo=58,jr=123,Ut=125,mn=43,$r=45,go=96,bo=47,Fr=92,To=[2,3],Eo=[mn,$r],wo={"-":1,"!":1,"~":1,"+":1,new:1},Oo={"=":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},$e={"=>":2,...Oo,"||":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},Ao=Object.keys(Oo),qr=new Set(Ao),Ht=new Set;Ht.add("=>");Ao.forEach(t=>Ht.add(t));var zr=new Set(["$","_"]),xo={true:!0,false:!1,null:null},Kr="this";function No(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Wr=No(wo),Gr=No($e),Fe="Expected ",Oe="Unexpected ",hn="Unclosed ",Jr=Fe+":",Co=Fe+"expression",Qr="missing }",Xr=Oe+"object property",Yr=hn+"(",vo=Fe+"comma",Ro=Oe+"token ",Zr=Oe+"period",un=Fe+"expression after ",es="missing unaryOp argument",ts=hn+"[",ns=Fe+"exponent (",os="Variable names cannot start with a number (",rs=hn+'quote after "';var je=t=>t>=48&&t<=57,So=t=>$e[t]||0,dn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in $e)||zr.has(n)}re(e){return this.U(e)||je(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,o){let r=this.st[e];if(!r)return o;let s={node:o},i=a=>{a.call(this,s)};return n===0?r.forEach(i):r.find(i),s.node}y(){let e=this.f,n=this.r,o=this.e;for(;e===_r||e===Dr||e===Ur||e===Hr;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let o=this.f;if(o===Pr||o===kt)this.e++;else{let r=this.O();if(r)n.push(r);else if(this.e<this.r.length){if(o===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}O(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,o=n.substr(e,Gr),r=o.length;for(;r>0;){if(o in $e&&(!this.U(this.f)||e+o.length<n.length&&!this.re(n.charCodeAt(e+o.length))))return e+=r,this.e=e,o;o=o.substr(0,--r)}return!1}Me(){let e,n,o,r,s,i,a,c;if(s=this.j(),!s||(n=this.se(),!n))return s;if(r={value:n,prec:So(n),right_a:Ht.has(n)},i=this.j(),!i)throw this.i(un+n);let p=[s,r,i];for(;n=this.se();){if(o=So(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:Ht.has(n)},c=n;let f=l=>r.right_a&&l.right_a?o>l.prec:o<=l.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e={type:8,operator:n,left:s,right:i},p.push(e);if(e=this.j(),!e)throw this.i(un+c);p.push(r,e)}for(a=p.length-1,e=p[a];a>1;)e={type:8,operator:p[a-1].value,left:p[a-2],right:e},a-=2;return e}j(){let e,n,o;if(this.y(),o=this.k(2,1),o)return this.k(3,0,o);let r=this.f;if(je(r)||r===xe)return this.gt();if(r===Br||r===Vr)o=this.bt();else if(r===It)o=this.xt();else{for(e=this.r.substr(this.e,Wr),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(wo,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.j();if(!s)throw this.i(es);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(r)?(o=this.ie(),o.name in xo?o={type:4,value:xo[o.name],raw:o.name}:o.name===Kr&&(o={type:5})):r===Lt&&(o=this.Tt())}return o?(o=this.F(o),this.k(3,0,o)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===It||n===Lt||n===ln;){let o;if(n===ln){if(this.r.charCodeAt(this.e+1)!==xe)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==Dt)throw this.i(ts);this.e++}else n===Lt?e={type:6,arguments:this.ke(Pe),callee:e}:(n===xe||o)&&(o&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});o&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;je(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);je(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));je(this.f);)e+=this.r.charAt(this.e++);if(!je(this.r.charCodeAt(this.e-1)))throw this.i(ns+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(os+e+this.M+")");if(o===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(Zr);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,o=this.r.charAt(this.e++),r=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===o){r=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!r)throw this.i(rs+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],o=!1,r=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(o=!0,this.e++,e===Pe&&r&&r>=n.length)throw this.i(Ro+String.fromCharCode(e));break}else if(s===kt){if(this.e++,r++,r!==n.length){if(e===Pe)throw this.i(Ro+",");if(e===Dt)for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(vo);{let i=this.O();if(!i||i.type===0)throw this.i(vo);n.push(i)}}}if(!o)throw this.i(Fe+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(Pe);if(this.m(Pe))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Yr)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(jr)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let o=this.O();if(!o)break;if(this.y(),o.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.m(yo)){this.e++;let r=this.O();if(!r)throw this.i(Xr);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.y()}else o&&n.push(o);this.m(kt)&&this.e++}throw this.i(Qr)}}ft(e){let n=this.f;if(Eo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){this.e+=2;let o=e.node={type:13,operator:n===mn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!o.argument||!To.includes(o.argument.type))throw this.i(Oe+o.operator)}}yt(e){if(e.node){let n=this.f;if(Eo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){if(!To.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===mn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===xe)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(ln)){this.e++;let n=e.node,o=this.O();if(!o)throw this.i(Co);if(this.y(),this.m(yo)){this.e++;let r=this.O();if(!r)throw this.i(Co);if(e.node={type:11,test:n,consequent:o,alternate:r},n.operator&&$e[n.operator]<=.9){let s=n;for(;s.right.operator&&$e[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Jr)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m(Pe)){this.e++;let o=this.se();if(o==="=>"){let r=this.Me();if(!r)throw this.i(un+o);e.node={type:15,params:null,body:r};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.$(e.node)}$(e){qr.has(e.operator)?(e.type=16,this.$(e.left),this.$(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.$(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(go)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(go))return;let n={type:19,quasis:[],expressions:[]},o="",r="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:r,cooked:o},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),r="",o="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(r+=c,c=this.r.charAt(++this.e),r+=c,c){case"n":o+=`
3
+ `;break;case"r":o+="\r";break;case"t":o+=" ";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;default:o+=c}else o+=c,r+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.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}mt(e){if(!this.m(bo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===bo&&!o){let r=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?o=!0:o&&this.m(Dt)&&(o=!1),this.e+=this.m(Fr)?2:1}throw this.i("Unclosed Regex")}},Mo=t=>new dn(t).parse();var ss={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>t**e},is={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Do=t=>{if(!t?.some(Io))return t;let e=[];return t.forEach(n=>Io(n)?e.push(...n):e.push(n)),e},ko=(...t)=>Do(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},as={"++":(t,e)=>{let n=t[e];if(m(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(m(n)){let o=n();return n(--o),o}return--t[e]}},cs={"++":(t,e)=>{let n=t[e];if(m(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(m(n)){let o=n();return n(o-1),o}return t[e]--}},Lo={"=":(t,e,n)=>{let o=t[e];return m(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return m(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return m(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return m(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return m(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return m(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return m(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return m(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return m(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return m(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return m(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return m(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return m(o)?o(o()^n):t[e]^=n}},_t=(t,e)=>H(t)?t.bind(e):t,gn=class{u;Ve;Ie;De;A;Ue;Be;constructor(e,n,o,r,s){this.u=b(e)?e:[e],this.Ve=n,this.Ie=o,this.De=r,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let o of this.u)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.u[this.u.length-1];if(r==="$parent")return this.u[1];if(r==="$ctx")return[...this.u];if(o&&r in o)return this.A=o[r],_t(D(o[r]),o);for(let i of this.u)if(r in i)return this.A=i[r],_t(D(i[r]),i);let s=this.Ve;if(s&&r in s)return this.A=s[r],_t(D(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this._e(n,o,ko,...e.body)}1(e,n,o){return this.R(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ae(e,n,o),i=r?.[s];return this.A=i,_t(D(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>H(i)?i(...Do(a)):i,s=this.R(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.R(n,o,is[e.operator],e.argument)}8(e,n,o){let r=ss[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,n,o),()=>this.g(e.right,n,o))}return this.R(n,o,r,e.left,e.right)}9(e,n,o){return this._e(++n,o,ko,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.R(++n,o,s,...e.properties),r}11(e,n,o){return this.R(n,o,r=>this.g(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=f=>f?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=f=>this.He(a,e.key,n,yn(f,o)),p=f=>this.He(a,e.value,n,yn(f,o));if(e.shorthand){let f=e.key.name;r[f]=s(e.key)&&i(f,n)?c:c()}else if(e.computed){let f=D(c());r[f]=s(e.value)&&i(f,n)?p:p()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,n)?()=>p:p()}return r}ae(e,n,o){let r=this.g(e.object,n,o),s=e.computed?this.g(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?as:cs;if(r.type===2){let a=r.name,c=this.Pe(a,o);return ee(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ae(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Pe(i,o);if(ee(a))return;let c=this.g(e.right,n,o);return Lo[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ae(r,n,o),c=this.g(e.right,n,o);return Lo[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return b(r)&&(r.s=Uo),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.R(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.R(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,n,s)}}g(e,n,o){let r=D(this[e.type](e,n,o));return this.Ue=e.type,r}He(e,n,o,r){let s=this.g(n,o,r);return e&&this.je()?this.A:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&m(this.A)}eval(e,n){let{value:o,refs:r}=Et(()=>this.g(e,-1,n)),s={value:o,refs:r};return this.je()&&(s.ref=this.A),s}R(e,n,o,...r){let s=r.map(i=>i&&this.g(i,e,n));return o(...s)}_e(e,n,o,...r){let s=this.Ie;if(!s)return this.R(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,yn(p,n)):this.g(a,e,n)));return o(...i)}},Uo=Symbol("s"),Io=t=>t?.s===Uo,Ho=(t,e,n,o,r,s,i)=>new gn(e,n,o,r,i).eval(t,s);var _o={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,o=this.u.map(r=>r.components).filter(r=>!!r).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,o,r,s){let i=z([]),a=[],c=()=>{for(let u of a)u();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if(F(e))return p;let f=this.o.globalContext,l=[],g=(u,h,O,x)=>{try{let y=Ho(u,h,f,n,o,x,r);return O&&l.push(...y.refs),{value:y.value,refs:y.refs,ref:y.ref}}catch(y){L(6,`evaluation error: ${e}`,y)}return{value:void 0,refs:[]}};try{let u=_o[e]??Mo("["+e+"]");_o[e]=u;let h=this.u,O=()=>{l.splice(0),c();let x=u.elements.map((y,M)=>n?.(M,-1)?{value:A=>g(y,h,!1,{$event:A}).value,refs:[]}:g(y,h,!0));if(!s)for(let y of l){let M=R(y,O);a.push(M)}i(x.map(y=>y.value)),p.refs=x.map(y=>y.ref)};O()}catch(u){L(6,`parse error: ${e}`,u)}return p}V(){return this.u}Fe=[];te(e){this.Fe.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Et()}}Et(){this.u=this.Fe.pop()??[]}};var ps="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",fs=new Set(ps.toUpperCase().split(",")),ls="http://www.w3.org/2000/svg",Bo=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},bn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&fs.has(r.toUpperCase())?document.createElementNS(ls,r.toLowerCase()):document.createElement(r),a=t.a;if(a)for(let p of Object.entries(a)){let f=p[0],l=p[1];f.startsWith("#")&&(l=f.substring(1),f="name"),i.setAttribute(lt(f,o),l)}let c=t.c;if(c)for(let p of c)bn(p,i,n,o);Bo(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)Bo(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let o=document.createDocumentFragment();if(!b(t))return bn(t,o,!!e,n),o;for(let r of t)bn(r,o,!!e,n);return o};var Vo=(t,e={selector:"#app"},n)=>{_(e)&&(e={selector:"#app",template:e}),_n(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!ve(o))throw I(0);n||(n=Y.getDefault());let r=()=>{for(let a of[...o.childNodes])P(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(e.template);r(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Mt(o,n),new Tn(t,o,n).T(),U(o,()=>{he(t)}),mt(t),{context:t,unmount:()=>{P(o)},unbind:()=>{oe(o)}}},Tn=class{Rt;$e;o;h;p;constructor(e,n,o){this.Rt=e,this.$e=n,this.o=o,this.h=new Bt([e],o),this.p=new St(this.h)}T(){this.p.G(this.$e)}};var qe=t=>{if(b(t))return t.map(r=>qe(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>[r,t.getAttribute(r)??""])));let o=pe(t);return o.length>0&&(e.c=[...o].map(r=>qe(r))),e};var Po=(t,e={})=>{b(e)&&(e={props:e}),_(t)&&(t={template:t});let n=e.context??(()=>({})),o=!1;if(t.element){let s=t.element;s.remove(),t.element=s}else if(t.selector){let s=document.querySelector(t.selector);if(!s)throw I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(t.template);t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let r=t.element;if(!o&&((t.isSVG??(Xe(r)&&r.hasAttribute?.("isSVG")))||Xe(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=qe(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var jo=t=>{Ce()?.onMounted.push(t)};var $o=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=us(t,n),e(...r))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},us=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let o=0,r=Se(()=>{if(o>0){r(),e.isStopped=!0,q(n);return}n(t()),++o});return n.stop=r,n};var Fo=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=ms(t,e,n),o(...s))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},ms=(t,e,n)=>{let o=n.ref??z(null);n.ref=o,n.isStopped=!1;let r=0,s=a=>{if(r>0){o.stop(),n.isStopped=!0,q(o);return}o(e(...t.map(c=>c()))),++r},i=[];for(let a of t){let c=R(a,s);i.push(c)}return s(null),o.stop=()=>{i.forEach(a=>{a()})},o};var qo=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=ds(t,e,n),o(...s))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},ds=(t,e,n)=>{let o=n.ref??z(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=R(t,s=>{if(r>0){o.stop(),n.isStopped=!0,q(o);return}o(e(s)),++r},!0),o};var zo=t=>(t[at]=1,t);var Ko=(t,e)=>{if(!e)throw I(5);let o=we(t)?Ee:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Se(r);return K(i,!0),t};var En=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},Wo=En;var Go=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(R(i,r));n&&r();let s=()=>{for(let i of o)i()};return K(s,!0),s};var Jo=t=>{if(!m(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Qo=t=>{xn();try{t()}finally{Cn()}},xn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},Cn=()=>{let t=ie.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete ie.stack;for(let n of e)try{q(n)}catch(o){console.error(o)}};
@@ -775,6 +775,9 @@ var ComponentBinder = class {
775
775
  let definedProps = registeredComponent.props;
776
776
  if (!definedProps || definedProps.length === 0) return;
777
777
  definedProps = definedProps.map(camelize);
778
+ const definedPropsByLowerCase = new Map(
779
+ definedProps.map((definedProp) => [definedProp.toLowerCase(), definedProp])
780
+ );
778
781
  for (const name2 of definedProps.concat(definedProps.map(hyphenate))) {
779
782
  const value = component2.getAttribute(name2);
780
783
  if (value === null) continue;
@@ -785,14 +788,17 @@ var ComponentBinder = class {
785
788
  for (const [attrName, item] of map.entries()) {
786
789
  const [name2, option] = item.__terms;
787
790
  if (!option) continue;
788
- if (!definedProps.includes(camelize(option))) continue;
791
+ const propName = definedPropsByLowerCase.get(
792
+ camelize(option).toLowerCase()
793
+ );
794
+ if (!propName) continue;
789
795
  if (name2 !== "." && name2 !== ":" && name2 !== bindName) continue;
790
796
  binder.__bind(
791
797
  singlePropDirective,
792
798
  component2,
793
799
  attrName,
794
800
  true,
795
- option,
801
+ propName,
796
802
  item.__flags
797
803
  );
798
804
  }
@@ -2970,7 +2976,7 @@ var RegorConfig = class _RegorConfig {
2970
2976
  [`${prefix}bind:class`]: classDirective,
2971
2977
  ":ref": refDirective,
2972
2978
  ":value": valueDirective,
2973
- teleport: teleportDirective
2979
+ [`${prefix}teleport`]: teleportDirective
2974
2980
  };
2975
2981
  this.__builtInNames = {
2976
2982
  for: `${prefix}for`,