regor 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.es2015.cjs.js +10 -9
- package/dist/regor.es2015.cjs.prod.js +2 -2
- package/dist/regor.es2015.esm.js +10 -9
- package/dist/regor.es2015.esm.prod.js +2 -2
- package/dist/regor.es2015.iife.js +10 -9
- package/dist/regor.es2015.iife.prod.js +2 -2
- package/dist/regor.es2019.cjs.js +10 -9
- package/dist/regor.es2019.cjs.prod.js +2 -2
- package/dist/regor.es2019.esm.js +10 -9
- package/dist/regor.es2019.esm.prod.js +2 -2
- package/dist/regor.es2019.iife.js +10 -9
- package/dist/regor.es2019.iife.prod.js +2 -2
- package/dist/regor.es2022.cjs.js +10 -9
- package/dist/regor.es2022.cjs.prod.js +2 -2
- package/dist/regor.es2022.esm.js +10 -9
- package/dist/regor.es2022.esm.prod.js +2 -2
- package/dist/regor.es2022.iife.js +10 -9
- package/dist/regor.es2022.iife.prod.js +2 -2
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
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+=`
|
|
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:()=>D,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:()=>d,markRaw:()=>zo,observe:()=>R,observeMany:()=>Go,observerCount:()=>Jo,onMounted:()=>jo,onUnmounted:()=>K,pause:()=>At,persist:()=>Ko,raw:()=>Wo,ref:()=>Ee,removeNode:()=>V,resume:()=>Nt,silence:()=>Tt,sref:()=>q,startBatch:()=>xn,toFragment:()=>Ae,toJsonTemplate:()=>qe,trigger:()=>F,unbind:()=>oe,unref:()=>B,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 V=t=>{t.remove(),setTimeout(()=>oe(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",Sn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=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(U(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;)V(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 D=(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=U(n)?n.call(Nn,...e):n,r=Je.warning;r&&(H(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 d=t=>t?.[W]===1;var R=(t,e,n)=>{if(!d(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),D(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=>{V(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=[];D(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=[];D(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;V(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,_=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&&(d(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&&(d(c)?c(a):o[i]=a)}return()=>{}}};var Pn={collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(!o)return()=>{};let i=_(o);return R(e.value,()=>{let c=e.refs[0]??e.value()[0],p=e.context,f=p[o];f!==c&&(d(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 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($(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=_(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=(m,N)=>{let T={},j=m.hasAttribute(ze),z=m.hasAttribute(Ke);return o.v(N,()=>{o.S(T),j&&n.T(Bn,m,ze),z&&n.T(Vn,m,Ke);let E=x.props;if(!E||E.length===0)return;E=E.map(_);let G=new Map(E.map(Q=>[Q.toLowerCase(),Q]));for(let Q of E.concat(E.map(He))){let ae=m.getAttribute(Q);ae!==null&&(T[_(Q)]=ae,m.removeAttribute(Q))}let Pt=n.J.de(m,!1);for(let[Q,ae]of Pt.entries()){let[jt,vn]=ae.Q;if(!vn)continue;let Rn=G.get(_(vn).toLowerCase());Rn&&(jt!=="."&&jt!==":"&&jt!==Vt||n.T(Pn,m,Q,!0,Rn,ae.X))}}),T},ue=[...o.V()],nt=()=>{let m=tt(l,ue),N=new Le(m,l,ue,A,Ne),T=dt(()=>x.context(N)??{}).context;if(N.autoProps){for(let[j,z]of Object.entries(m))if(j in T){let E=T[j];if(E===z)continue;N.entangle&&d(E)&&d(z)&&D(A,ht(z,E))}else T[j]=z;N.onAutoPropsAssigned?.()}return{componentCtx:T,head:N}},{componentCtx:me,head:ot}=nt(),S=[...pe(y)],C=S.length,k=l.childNodes.length===0,P=m=>{let N=m.parentElement;if(k){for(let E of[...m.childNodes])N.insertBefore(E,m);return}let T=m.name;$(T)&&(T=m.getAttributeNames().filter(E=>E.startsWith("#"))[0],$(T)?T="default":T=T.substring(1));let j=l.querySelector(`template[name='${T}'], template[\\#${T}]`);!j&&T==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(E=>E.startsWith("#")).length>0&&(j=null));let z=E=>{ot.enableSwitch&&o.v(ue,()=>{o.S(me);let G=tt(m,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),D(ae,()=>{Gt(Q)}))})})};if(j){let E=[...pe(j)];for(let G of E)N.insertBefore(G,m);z(E)}else{if(T!=="default"){for(let G of[...pe(m)])N.insertBefore(G,m);return}let E=[...pe(l)].filter(G=>!se(G));for(let G of E)N.insertBefore(G,m);z(E)}},v=m=>{if(!ve(m))return;let N=m.querySelectorAll("slot");if(Un(m)){P(m),m.remove();return}for(let T of N)P(T),T.remove()};(()=>{for(let m=0;m<C;++m)S[m]=S[m].cloneNode(!0),g.insertBefore(S[m],u),v(S[m])})(),M.insertBefore(Ne,u);let ne=()=>{if(!x.inheritAttrs)return;let m=S.filter(T=>T.nodeType===Node.ELEMENT_NODE);m.length>1&&(m=m.filter(T=>T.hasAttribute(this.le)));let N=m[0];if(N)for(let T of l.getAttributeNames()){if(T===ze||T===Ke)continue;let j=l.getAttribute(T);if(T==="class")N.classList.add(...j.split(" "));else if(T==="style"){let z=N.style,E=l.style;for(let G of E)z.setProperty(G,E.getPropertyValue(G))}else N.setAttribute(lt(T,n.o),j)}},Me=()=>{for(let m of l.getAttributeNames())!m.startsWith("@")&&!m.startsWith(n.o.l.on)&&l.removeAttribute(m)},We=()=>{ne(),Me(),o.S(me),n.ye(l,!1),me.$emit=ot.emit,be(n,S),D(l,()=>{he(me)}),D(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($(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]=_(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=>{V(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]),!H(y)||$(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=[];D(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 F=(t,e,n)=>{if(!d(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)F(s,e,!0);else if(de(r))for(let s of r)F(s[0],e,!0),F(s[1],e,!0);if(w(r))for(let s in r)F(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)F(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={},q=t=>{if(d(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||d(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 B=t=>d(t)?t():t;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)?[]:(U(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=>B(B(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=>{V(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,P)=>{let v=o.createContext(k,C),Z=Ze.Ge(v.index,k);return O.v(x,()=>{O.S(v.ctx);let ne=P.previousSibling,Me=[];for(let We of p){let m=We.cloneNode(!0);f.insertBefore(m,P),Me.push(m)}for(be(h,Me),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(C,k)=>{let P=S.D(C).items,v=P[P.length-1].nextSibling;for(let Z of P)V(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)V(k)},ze=C=>{let k=S.w;for(let P=C;P<k;++P)S.D(P).index(P)},Ke=C=>{let k=S.w;U(C)&&(C=C());let P=B(C[0]);if(b(P)&&P.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 j=S.D(v++);if(c(j.value,N))return;let z=S.Qe(a(N));if(z>=v&&z-v<10){if(--v,Z=Math.min(Z,v),Ne(v),S.Te(v),--k,z>v+1)for(let E=v;E<z-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 m=v;for(k=S.w;v<k;)Ne(v++);S.Ee(m),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));D(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=B(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:q(-1)};return s&&(g.index=f[s.startsWith("#")?s.substring(1):s]=q(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($(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,D(i,()=>{V(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=[];D(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(_(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=_(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(!H(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=H(e),s=H(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;U(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(!d(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!d(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=>(d(t)&&(t=t()),U(t)&&(t=t()),t?H(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),F(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($(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=B(r.value()[0]);return H(l)?sn(t,_(l),()=>e.value()[0],s?.join(",")??f[1]):()=>{}}else if(o){let f=e.value();return sn(t,_(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(U(l)&&(l=l()),w(l))for(let g of Object.entries(l)){let u=g[0],h=()=>{let x=e.value()[f];return U(x)&&(x=x()),x=x[u],U(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($(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);U(l)&&(l=l(f)),U(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=_(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=H(e);if(e&&!r){if(n&&!H(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=_(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(B(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 B(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=lo(B(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(d(t)?(e=t,t=e()):e=q(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=q,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&&$(i[0])&&$(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
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)}};
|
|
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(d(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(d(n)){let o=n();return n(--o),o}return--t[e]}},cs={"++":(t,e)=>{let n=t[e];if(d(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(d(n)){let o=n();return n(o-1),o}return t[e]--}},Lo={"=":(t,e,n)=>{let o=t[e];return d(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return d(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return d(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return d(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return d(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return d(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return d(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return d(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return d(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return d(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return d(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return d(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return d(o)?o(o()^n):t[e]^=n}},_t=(t,e)=>U(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(B(o[r]),o);for(let i of this.u)if(r in i)return this.A=i[r],_t(B(i[r]),i);let s=this.Ve;if(s&&r in s)return this.A=s[r],_t(B(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(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>U(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=B(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=B(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)&&d(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=q([]),a=[],c=()=>{for(let u of a)u();a.length=0},p={value:i,stop:c,refs:[],context:this.u[0]};if($(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)=>{H(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])V(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(),D(o,()=>{he(t)}),mt(t),{context:t,unmount:()=>{V(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}),H(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??q(null);e.ref=n,e.isStopped=!1;let o=0,r=Se(()=>{if(o>0){r(),e.isStopped=!0,F(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??q(null);n.ref=o,n.isStopped=!1;let r=0,s=a=>{if(r>0){o.stop(),n.isStopped=!0,F(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??q(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=R(t,s=>{if(r>0){o.stop(),n.isStopped=!0,F(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(!d(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{F(n)}catch(o){console.error(o)}};
|
package/dist/regor.es2022.esm.js
CHANGED
|
@@ -709,11 +709,6 @@ var entangle = (r1, r2) => {
|
|
|
709
709
|
};
|
|
710
710
|
};
|
|
711
711
|
|
|
712
|
-
// src/reactivity/unref.ts
|
|
713
|
-
var unref = (value) => {
|
|
714
|
-
return isRef(value) ? value() : value;
|
|
715
|
-
};
|
|
716
|
-
|
|
717
712
|
// src/bind/ComponentBinder.ts
|
|
718
713
|
var ComponentBinder = class {
|
|
719
714
|
__binder;
|
|
@@ -776,7 +771,10 @@ var ComponentBinder = class {
|
|
|
776
771
|
if (!definedProps || definedProps.length === 0) return;
|
|
777
772
|
definedProps = definedProps.map(camelize);
|
|
778
773
|
const definedPropsByLowerCase = new Map(
|
|
779
|
-
definedProps.map((definedProp) => [
|
|
774
|
+
definedProps.map((definedProp) => [
|
|
775
|
+
definedProp.toLowerCase(),
|
|
776
|
+
definedProp
|
|
777
|
+
])
|
|
780
778
|
);
|
|
781
779
|
for (const name2 of definedProps.concat(definedProps.map(hyphenate))) {
|
|
782
780
|
const value = component2.getAttribute(name2);
|
|
@@ -825,9 +823,7 @@ var ComponentBinder = class {
|
|
|
825
823
|
if (compValue === propsValue) continue;
|
|
826
824
|
if (head2.entangle && isRef(compValue) && isRef(propsValue)) {
|
|
827
825
|
addUnbinder(startOfComponent, entangle(propsValue, compValue));
|
|
828
|
-
}
|
|
829
|
-
compValue(propsValue);
|
|
830
|
-
} else componentCtx2[key] = unref(propsValue);
|
|
826
|
+
}
|
|
831
827
|
} else componentCtx2[key] = propsValue;
|
|
832
828
|
}
|
|
833
829
|
head2.onAutoPropsAssigned?.();
|
|
@@ -1413,6 +1409,11 @@ var sref = (value) => {
|
|
|
1413
1409
|
return srefFunction;
|
|
1414
1410
|
};
|
|
1415
1411
|
|
|
1412
|
+
// src/reactivity/unref.ts
|
|
1413
|
+
var unref = (value) => {
|
|
1414
|
+
return isRef(value) ? value() : value;
|
|
1415
|
+
};
|
|
1416
|
+
|
|
1416
1417
|
// src/bind/MountList.ts
|
|
1417
1418
|
var MountList = class {
|
|
1418
1419
|
__list = [];
|