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
|
-
var Ae=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();Bo(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},Bo=t=>{let e=t[Ae];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ae]}};var $=t=>{t.remove(),setTimeout(()=>ae(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",xn=t=>typeof t>"u",Z=t=>t==null||typeof t>"u",F=t=>typeof t!="string"||!t?.trim(),Vo=Object.prototype.toString,Ht=t=>Vo.call(t),de=t=>Ht(t)==="[object Map]",X=t=>Ht(t)==="[object Set]",_t=t=>Ht(t)==="[object Date]",ze=t=>typeof t=="symbol",b=Array.isArray,w=t=>t!==null&&typeof t=="object";var Cn={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=Cn[t];return new Error(U(n)?n.call(Cn,...e):n)};var ot=[],vn=()=>{let t={onMounted:[],onUnmounted:[]};return ot.push(t),t},Ee=t=>{let e=ot[ot.length-1];if(!e&&!t)throw I(2);return e},Rn=t=>{let e=Ee();return t&&Vt(t),ot.pop(),e},Bt=Symbol("csp"),Vt=t=>{let e=t,n=e[Bt];if(n){let o=Ee();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Bt]=Ee()},rt=t=>t[Bt];var he=t=>{rt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ke=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;)$(e),e=e.nextSibling;for(let o of this.ctx)he(o)}};var xe=t=>{let e=t[Ae];if(e)return e;let n={unbinders:[],data:{}};return t[Ae]=n,n};var _=(t,e)=>{xe(t).unbinders.push(e)};var Sn={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=Sn[t],o=U(n)?n.call(Sn,...e):n,r=st.warning;r&&(H(o)?r(o):r(o,...o.args))},st={warning:console.warn};var K=(t,e)=>{Ee(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={},wn=1,On=t=>{let e=(wn++).toString();return pt[e]=t,ct[e]=0,e},Pt=t=>{ct[t]+=1},jt=t=>{--ct[t]===0&&(delete pt[t],delete ct[t])},An=t=>pt[t],$t=()=>wn!==1&&Object.keys(pt).length>0,We="r-switch",Po=t=>{let e=t.filter(o=>Ce(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(We))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ne=(t,e)=>{if(!$t())return;let n=Po(e);n.length!==0&&(n.forEach(Pt),_(t,()=>{n.forEach(jt)}))};var Ft=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}ge(e,r)},qt=Symbol("r-if"),Nn=Symbol("r-else"),Mn=t=>t[Nn]===1,ft=class{p;B;q;K;z;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.q=ke(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=ye(e,this.q);for(let r of o)this.T(r);return n}W(e){return e[qt]?!0:(e[qt]=!0,ye(e,this.q).forEach(n=>n[qt]=!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=Me(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),Ne(i,r),r.forEach(c=>{$(c)}),e.remove(),n!=="if"&&(e[Nn]=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:()=>{Ft(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=[];_(a,()=>{p.stop();for(let O of g)O();g.length=0});let h=R(f,n);return g.push(h),[{mount:()=>{Ft(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||(Ft(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=[];_(i,()=>{c.stop();for(let M of O)M();O.length=0}),u();let y=R(p,u);O.push(y)}};var Me=t=>{let e=re(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},ge=(t,e)=>{for(let n of e)Mn(n)||t.G(n)},ye=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},re=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,Ge=t=>t.nodeType===Node.ELEMENT_NODE,kn=t=>t instanceof HTMLSlotElement,pe=t=>re(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;$(n),n=o}},be=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Ln=(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},ke=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),zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},jo=/-(\w)/g,B=zt(t=>t&&t.replace(jo,(e,n)=>n?n.toUpperCase():"")),$o=/\B([A-Z])/g,Le=zt(t=>t&&t.replace($o,"-$1").toLowerCase()),Je=zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ut={};var mt=t=>{rt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Kt=Symbol("scope"),Wt=t=>{try{vn();let e=t();Vt(e);let n={context:e,unmount:()=>he(e),[Kt]:1};return n[Kt]=1,n}finally{Rn()}},In=t=>w(t)?Kt in t:!1;var Dn={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 Un={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 Hn={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&&(d(f)?f(c):p[i]=c)},!0)}};var Gt=(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=>d(t)?t():t;var dt=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(Le),...a.map(Le)].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),we=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let $e=n.o.l.props,Fe=n.o.l.propsOnce,It=n.o.l.bind,et=(m,N)=>{let T={},V=m.hasAttribute($e),j=m.hasAttribute(Fe);return o.v(N,()=>{o.S(T),V&&n.T(Dn,m,$e),j&&n.T(Un,m,Fe);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(Le))){let ie=m.getAttribute(Q);ie!==null&&(T[B(Q)]=ie,m.removeAttribute(Q))}let Dt=n.J.de(m,!1);for(let[Q,ie]of Dt.entries()){let[Ut,Tn]=ie.Q;if(!Tn)continue;let En=G.get(B(Tn).toLowerCase());En&&(Ut!=="."&&Ut!==":"&&Ut!==It||n.T(Hn,m,Q,!0,En,ie.X))}}),T},ue=[...o.V()],tt=()=>{let m=et(l,ue),N=new Ke(m,l,ue,A,we),T=Wt(()=>x.context(N)??{}).context;if(N.autoProps){for(let[V,j]of Object.entries(m))if(V in T){let E=T[V];if(E===j)continue;N.entangle&&d(E)&&d(j)?_(A,Gt(j,E)):d(E)?E(j):T[V]=D(j)}else T[V]=j;N.onAutoPropsAssigned?.()}return{componentCtx:T,head:N}},{componentCtx:me,head:nt}=tt(),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;F(T)&&(T=m.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 j=E=>{nt.enableSwitch&&o.v(ue,()=>{o.S(me);let G=et(m,o.V());o.v(ue,()=>{o.S(G);let Dt=o.V(),Q=On(Dt);for(let ie of E)Ce(ie)&&(ie.setAttribute(We,Q),Pt(Q),_(ie,()=>{jt(Q)}))})})};if(V){let E=[...pe(V)];for(let G of E)N.insertBefore(G,m);j(E)}else{if(T!=="default"){for(let G of[...pe(m)])N.insertBefore(G,m);return}let E=[...pe(l)].filter(G=>!re(G));for(let G of E)N.insertBefore(G,m);j(E)}},v=m=>{if(!Ce(m))return;let N=m.querySelectorAll("slot");if(kn(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(we,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===$e||T===Fe)continue;let V=l.getAttribute(T);if(T==="class")N.classList.add(...V.split(" "));else if(T==="style"){let j=N.style,E=l.style;for(let G of E)j.setProperty(G,E.getPropertyValue(G))}else N.setAttribute(lt(T,n.o),V)}},Oe=()=>{for(let m of l.getAttributeNames())!m.startsWith("@")&&!m.startsWith(n.o.l.on)&&l.removeAttribute(m)},qe=()=>{ne(),Oe(),o.S(me),n.ye(l,!1),me.$emit=nt.emit,ge(n,S),_(l,()=>{he(me)}),_(A,()=>{ae(l)}),mt(me)};o.v(ue,qe)}}};var Jt=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]=".")}}},ht=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Ge(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 Jt(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 Fo=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},yt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=ke(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=ye(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=Me(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Ne(s,o),o.forEach(a=>{$(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=re(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)||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));Fo(g,M),r.insertBefore(M,i),this.p.G(M),l.name=y})},h=[];_(s,()=>{a.stop();for(let y of h)y();h.length=0}),u();let x=R(c,u);h.push(x)}};var ee=[],_n=t=>{ee.length!==0&&ee[ee.length-1]?.add(t)},Ie=t=>{if(!t)return()=>{};let e={stop:()=>{}};return qo(t,e),K(()=>e.stop(),!0),e.stop},qo=(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(ee.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=R(i,()=>{r(),Ie(t)});n.push(a)}}finally{ee.pop()}},Qt=t=>{let e=ee.length,n=e>0&&ee[e-1];try{return n&&ee.push(null),t()}finally{n&&ee.pop()}},Xt=t=>{try{let e=new Set;return ee.push(e),{value:t(),refs:[...e]}}finally{ee.pop()}};var Qe=t=>!!t&&t[at]===1;var q=(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)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 zo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var De=(t,e,n)=>{n.forEach(function(o){let r=t[o];zo(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let p of c)q(p);return a})})},gt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Bn=Array.prototype,Yt=Object.create(Bn),Ko=["push","pop","shift","unshift","splice","sort","reverse"];De(Bn,Yt,Ko);var Vn=Map.prototype,bt=Object.create(Vn),Wo=["set","clear","delete"];gt(bt,"Map");De(Vn,bt,Wo);var Pn=Set.prototype,Tt=Object.create(Pn),Go=["add","clear","delete"];gt(Tt,"Set");De(Pn,Tt,Go);var se={},z=t=>{if(d(t)||Qe(t))return t;let e={auto:!0,_value:t},n=c=>w(c)?W in c?!0:b(c)?(Object.setPrototypeOf(c,Yt),!0):X(c)?(Object.setPrototypeOf(c,Tt),!0):de(c)?(Object.setPrototypeOf(c,bt),!0):!1:!1,o=n(t),r=new Set,s=(c,p)=>{if(se.stack&&se.stack.length){se.stack[se.stack.length-1].add(a);return}r.size!==0&&Qt(()=>{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):(_n(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,be(a,!1),o&&i(t),a};var Xe=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 Zt=Symbol("r-for"),Et=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=ke(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=ye(e,this.ne);for(let r of o)this.Xe(r);return n}W(e){return e[Zt]?!0:(e[Zt]=!0,ye(e,this.ne).forEach(n=>n[Zt]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return Z(e)?[]:(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=>D(D(C)?.[i]):C=>C,c=(C,k)=>a(C)===a(k),p=Me(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);f.insertBefore(g,e),Ne(g,p),p.forEach(C=>{$(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),Y=Xe.Ge(v.index,k);return O.v(x,()=>{O.S(v.ctx);let ne=P.previousSibling,Oe=[];for(let qe of p){let m=qe.cloneNode(!0);f.insertBefore(m,P),Oe.push(m)}for(ge(h,Oe),ne=ne.nextSibling;ne!==P;)Y.items.push(ne),ne=ne.nextSibling}),Y},M=(C,k)=>{let P=S.D(C).items,v=P[P.length-1].nextSibling;for(let Y of P)$(Y);S.te(C,y(C,k,v))},A=(C,k)=>{S.S(y(C,k,u))},we=C=>{for(let k of S.D(C).items)$(k)},$e=C=>{let k=S.w;for(let P=C;P<k;++P)S.D(P).index(P)},Fe=C=>{let k=S.w;U(C)&&(C=C());let P=D(C[0]);if(b(P)&&P.length===0){ce(g,u),S.Ee(0);return}let v=0,Y=Number.MAX_SAFE_INTEGER,ne=k,Oe=this.p.o.forGrowThreshold,qe=()=>S.w<ne+Oe;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 j=S.Qe(a(N));if(j>=v&&j-v<10){if(--v,Y=Math.min(Y,v),we(v),S.Te(v),--k,j>v+1)for(let E=v;E<j-1&&E<k&&!c(S.D(v).value,N);)++E,we(v),S.Te(v),--k;T();return}qe()?(S.Je(v-1,y(v,N,S.D(v-1).items[0])),Y=Math.min(Y,v-1),++k):M(v-1,N)}else A(v++,N)};T()}let m=v;for(k=S.w;v<k;)we(v++);S.Ee(m),$e(Y)},It=()=>{me=R(tt,Fe)},et=()=>{ue.stop(),me()},ue=O.C(o.list),tt=ue.value,me,nt=0,S=new Xe(a);for(let C of this.Re(tt()[0]))S.S(y(nt++,C,u));_(g,et),It()}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 xt=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new Et(this),this.Ce=new ft(this),this.Se=new yt(this),this.we=new dt(this),this.J=new ht(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=re(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);ge(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let 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(We);return f||(p.parentElement?c(p.parentElement):null)};if($t()){let p=c(n);if(p){this.h.v(An(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,_(i,()=>{$(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=[];_(n,()=>{i.stop(),f?.stop();for(let x of a)x();a.length=0});let p=Ln(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 jn="http://www.w3.org/1999/xlink",Jo={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 Qo(t){return!!t||t===""}var en={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=B(o)),Ct(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];Ct(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;Ct(t,f,l,u)}else{let p=n?.[a],f=e[a++],l=e[a];Ct(t,f,l,p)}}}},Ct=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),Z(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:")){Z(n)?t.removeAttributeNS(jn,e.slice(6,e.length)):t.setAttributeNS(jn,e,n);return}let r=e in Jo;Z(n)||r&&!Qo(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var tn={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)$n(t,s[c],i?.[c])}else $n(t,s,i)}}},$n=(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 Fn={onChange:(t,e)=>{let[n,o]=e;U(o)?o(t,n):t.innerHTML=n?.toString()}};function Xo(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=_t(t),o=_t(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=ze(t),o=ze(e),n||o)return t===e;if(n=b(t),o=b(e),n||o)return n&&o?Xo(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 vt(t,e){return t.findIndex(n=>fe(n,e))}var qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var nn=t=>{if(!d(t))throw I(3,"pause");t(void 0,void 0,3)};var on=t=>{if(!d(t))throw I(3,"resume");t(void 0,void 0,4)};var Kn={onChange:(t,e)=>{Yo(t,e[0])},onBind:(t,e,n,o,r,s)=>Zo(t,e,s)},Yo=(t,e)=>{let n=Qn(t);if(n&&Wn(t))b(e)?e=vt(e,le(t))>-1:X(e)?e=e.has(le(t)):e=sr(t,e),t.checked=e;else if(n&&Gn(t))t.checked=fe(e,le(t));else if(n||Xn(t))Jn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(Yn(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=vt(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)},Ye=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}),Wn=t=>t.type==="checkbox",Gn=t=>t.type==="radio",Jn=t=>t.type==="number"||t.type==="range",Qn=t=>t.tagName==="INPUT",Xn=t=>t.tagName==="TEXTAREA",Yn=t=>t.tagName==="SELECT",Zo=(t,e,n)=>{let o=e.value,r=Ye(n?.join(",")),s=Ye(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=Qn(t);return c&&Wn(t)?tr(t,a):c&&Gn(t)?ir(t,a):c||Xn(t)?er(t,i,a,o):Yn(t)?ar(t,a,o):(L(7,t),()=>{})},zn=/[.,' ·٫]/,er=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Jn(t),a=()=>{!e.trim&&!Ye(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=Ye(o()[1]);if(i||O.number||O.int){if(O.int)h=parseInt(h);else{if(zn.test(h[h.length-1])&&h.split(zn).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},tr=(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=vt(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(rr(t,i))};return t.addEventListener(n,r),o},le=t=>"_value"in t?t._value:t.value,Zn="trueValue",nr="falseValue",eo="true-value",or="false-value",rr=(t,e)=>{let n=e?Zn:nr;if(n in t)return t[n];let o=e?eo:or;return t.hasAttribute(o)?t.getAttribute(o):e},sr=(t,e)=>{if(Zn in t)return fe(e,t.trueValue);let o=eo;return t.hasAttribute(o)?fe(e,t.getAttribute(o)):fe(e,!0)},ir=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=le(t);e(s)};return t.addEventListener(n,r),o},ar=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=Ye(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?qn(le(p)):le(p));if(t.multiple){let p=e();try{if(nn(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{on(e),q(e)}}else e(c[0])};return t.addEventListener(o,s),r};var cr=["stop","prevent","capture","self","once","left","right","middle","passive"],pr=t=>{let e={};if(F(t))return;let n=t.split(",");for(let o of cr)e[o]=n.includes(o);return e},sn={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 H(l)?rn(t,B(l),()=>e.value()[0],s?.join(",")??f[1]):()=>{}}else if(o){let f=e.value();return rn(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(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(rn(t,u,h,O))}else L(2,name,t)}return a}},fr=(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]},rn=(t,e,n,o)=>{if(F(e))return L(5,name,t),()=>{};let r=pr(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=fr(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 to={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=B(o)),Ue(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];Ue(t,p,f)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ue(t,f,l)}else{let p=e[a++],f=e[a];Ue(t,p,f)}}}};function lr(t){return!!t||t===""}var Ue=(t,e,n)=>{if(Z(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),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=lr(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 no={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 oo={onChange:(t,e)=>{let n=xe(t).data,o=n._ord;xn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var pn={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)ro(t,s[c],i?.[c])}else ro(t,s,i)}}},ro=(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&&cn(o,s,"");for(let s in e)cn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in xe(t).data)return;o.display=s}},so=/\s*!important$/;function cn(t,e,n){if(b(n))n.forEach(o=>{cn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=ur(t,e);so.test(n)?t.setProperty(Le(o),n.replace(so,""),"important"):t[o]=n}}var io=["Webkit","Moz","ms"],an={};function ur(t,e){let n=an[e];if(n)return n;let o=B(e);if(o!=="filter"&&o in t)return an[e]=o;o=Je(o);for(let r=0;r<io.length;r++){let s=io[r]+o;if(s in t)return an[e]=s}return e}var J=t=>ao(D(t)),ao=(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]]=ao(D(o[1]),e);return n};var co={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 po={onChange:(t,e)=>{Ue(t,"value",e[0])}};var He=t=>t?.[it]===1;var Re=t=>{if(Qe(t))return t;let e;if(d(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];He(r)||(t[o]=Re(r))}return e}if(!w(t))return e;for(let n of Object.entries(t)){let o=n[1];if(He(o))continue;let r=n[0];ze(r)||(t[r]=null,t[r]=Re(o))}return e};var te=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=Re,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){st.warning("Registered component's default name is not defined",n);continue}this.fe.set(Je(n.defaultName),n),this.ue.set(Je(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":to,":":en,"@":sn,[`${e}on`]:sn,[`${e}bind`]:en,[`${e}html`]:Fn,[`${e}text`]:co,[`${e}show`]:oo,[`${e}model`]:Kn,":style":pn,[`${e}bind:style`]:pn,":class":tn,[`${e}bind:class`]:tn,":ref":no,":value":po,[`${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 Rt=(t,e)=>{if(!t)return;let o=(e??te.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of dr(t,o.pre,s))mr(i,o.text,r,s)},mr=(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=fo(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=fo(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)},dr=(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},fo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var hr=9,yr=10,gr=13,br=32,Te=46,St=44,Tr=39,Er=34,wt=40,_e=41,Ot=91,At=93,fn=63,xr=59,lo=58,Cr=123,Nt=125,un=43,vr=45,uo=96,mo=47,Rr=92,ho=[2,3],yo=[un,vr],Co={"-":1,"!":1,"~":1,"+":1,new:1},vo={"=":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},Ve={"=>":2,...vo,"||":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},Ro=Object.keys(vo),Sr=new Set(Ro),Mt=new Set;Mt.add("=>");Ro.forEach(t=>Mt.add(t));var wr=new Set(["$","_"]),go={true:!0,false:!1,null:null},Or="this";function So(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Ar=So(Co),Nr=So(Ve),Pe="Expected ",Se="Unexpected ",dn="Unclosed ",Mr=Pe+":",bo=Pe+"expression",kr="missing }",Lr=Se+"object property",Ir=dn+"(",To=Pe+"comma",Eo=Se+"token ",Dr=Se+"period",ln=Pe+"expression after ",Ur="missing unaryOp argument",Hr=dn+"[",_r=Pe+"exponent (",Br="Variable names cannot start with a number (",Vr=dn+'quote after "';var Be=t=>t>=48&&t<=57,xo=t=>Ve[t]||0,mn=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 Ve)||wr.has(n)}re(e){return this.U(e)||Be(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===br||e===hr||e===yr||e===gr;)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===xr||o===St)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(Se+'"'+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,Nr),r=o.length;for(;r>0;){if(o in Ve&&(!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:xo(n),right_a:Mt.has(n)},i=this.j(),!i)throw this.i(ln+n);let p=[s,r,i];for(;n=this.se();){if(o=xo(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:Mt.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(ln+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(Be(r)||r===Te)return this.gt();if(r===Tr||r===Er)o=this.bt();else if(r===Ot)o=this.xt();else{for(e=this.r.substr(this.e,Ar),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Co,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(Ur);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 go?o={type:4,value:go[o.name],raw:o.name}:o.name===Or&&(o={type:5})):r===wt&&(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===Te||n===Ot||n===wt||n===fn;){let o;if(n===fn){if(this.r.charCodeAt(this.e+1)!==Te)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===Ot){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==At)throw this.i(Hr);this.e++}else n===wt?e={type:6,arguments:this.ke(_e),callee:e}:(n===Te||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(;Be(this.f);)e+=this.r.charAt(this.e++);if(this.m(Te))for(e+=this.r.charAt(this.e++);Be(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++));Be(this.f);)e+=this.r.charAt(this.e++);if(!Be(this.r.charCodeAt(this.e-1)))throw this.i(_r+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(Br+e+this.M+")");if(o===Te||e.length===1&&e.charCodeAt(0)===Te)throw this.i(Dr);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
|
+
var Ae=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();Bo(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},Bo=t=>{let e=t[Ae];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ae]}};var j=t=>{t.remove(),setTimeout(()=>ae(t),1)};var D=t=>typeof t=="function",U=t=>typeof t=="string",xn=t=>typeof t>"u",Z=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),Vo=Object.prototype.toString,Ht=t=>Vo.call(t),de=t=>Ht(t)==="[object Map]",X=t=>Ht(t)==="[object Set]",_t=t=>Ht(t)==="[object Date]",ze=t=>typeof t=="symbol",b=Array.isArray,w=t=>t!==null&&typeof t=="object";var Cn={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=Cn[t];return new Error(D(n)?n.call(Cn,...e):n)};var ot=[],vn=()=>{let t={onMounted:[],onUnmounted:[]};return ot.push(t),t},Ee=t=>{let e=ot[ot.length-1];if(!e&&!t)throw I(2);return e},Rn=t=>{let e=Ee();return t&&Vt(t),ot.pop(),e},Bt=Symbol("csp"),Vt=t=>{let e=t,n=e[Bt];if(n){let o=Ee();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Bt]=Ee()},rt=t=>t[Bt];var he=t=>{rt(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ke=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;)j(e),e=e.nextSibling;for(let o of this.ctx)he(o)}};var xe=t=>{let e=t[Ae];if(e)return e;let n={unbinders:[],data:{}};return t[Ae]=n,n};var H=(t,e)=>{xe(t).unbinders.push(e)};var Sn={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=Sn[t],o=D(n)?n.call(Sn,...e):n,r=st.warning;r&&(U(o)?r(o):r(o,...o.args))},st={warning:console.warn};var K=(t,e)=>{Ee(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={},wn=1,On=t=>{let e=(wn++).toString();return pt[e]=t,ct[e]=0,e},Pt=t=>{ct[t]+=1},jt=t=>{--ct[t]===0&&(delete pt[t],delete ct[t])},An=t=>pt[t],$t=()=>wn!==1&&Object.keys(pt).length>0,We="r-switch",Po=t=>{let e=t.filter(o=>Ce(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(We))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ne=(t,e)=>{if(!$t())return;let n=Po(e);n.length!==0&&(n.forEach(Pt),H(t,()=>{n.forEach(jt)}))};var Ft=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}ge(e,r)},qt=Symbol("r-if"),Nn=Symbol("r-else"),Mn=t=>t[Nn]===1,ft=class{p;B;q;K;z;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.q=ke(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=ye(e,this.q);for(let r of o)this.T(r);return n}W(e){return e[qt]?!0:(e[qt]=!0,ye(e,this.q).forEach(n=>n[qt]=!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=Me(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),Ne(i,r),r.forEach(c=>{j(c)}),e.remove(),n!=="if"&&(e[Nn]=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:()=>{Ft(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=[];H(a,()=>{p.stop();for(let O of g)O();g.length=0});let h=R(f,n);return g.push(h),[{mount:()=>{Ft(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||(Ft(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=[];H(i,()=>{c.stop();for(let M of O)M();O.length=0}),u();let y=R(p,u);O.push(y)}};var Me=t=>{let e=re(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},ge=(t,e)=>{for(let n of e)Mn(n)||t.G(n)},ye=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},re=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,Ge=t=>t.nodeType===Node.ELEMENT_NODE,kn=t=>t instanceof HTMLSlotElement,pe=t=>re(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;j(n),n=o}},be=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},Ln=(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},ke=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),zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},jo=/-(\w)/g,_=zt(t=>t&&t.replace(jo,(e,n)=>n?n.toUpperCase():"")),$o=/\B([A-Z])/g,Le=zt(t=>t&&t.replace($o,"-$1").toLowerCase()),Je=zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var ut={};var mt=t=>{rt(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Kt=Symbol("scope"),Wt=t=>{try{vn();let e=t();Vt(e);let n={context:e,unmount:()=>he(e),[Kt]:1};return n[Kt]=1,n}finally{Rn()}},In=t=>w(t)?Kt in t:!1;var Dn={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 Un={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 Hn={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 Gt=(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 dt=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(Le),...a.map(Le)].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),we=new Comment(" end component: "+l.tagName);M.insertBefore(A,l),l.remove();let $e=n.o.l.props,Fe=n.o.l.propsOnce,It=n.o.l.bind,et=(m,N)=>{let T={},P=m.hasAttribute($e),q=m.hasAttribute(Fe);return o.v(N,()=>{o.S(T),P&&n.T(Dn,m,$e),q&&n.T(Un,m,Fe);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(Le))){let ie=m.getAttribute(Q);ie!==null&&(T[_(Q)]=ie,m.removeAttribute(Q))}let Dt=n.J.de(m,!1);for(let[Q,ie]of Dt.entries()){let[Ut,Tn]=ie.Q;if(!Tn)continue;let En=G.get(_(Tn).toLowerCase());En&&(Ut!=="."&&Ut!==":"&&Ut!==It||n.T(Hn,m,Q,!0,En,ie.X))}}),T},ue=[...o.V()],tt=()=>{let m=et(l,ue),N=new Ke(m,l,ue,A,we),T=Wt(()=>x.context(N)??{}).context;if(N.autoProps){for(let[P,q]of Object.entries(m))if(P in T){let E=T[P];if(E===q)continue;N.entangle&&d(E)&&d(q)&&H(A,Gt(q,E))}else T[P]=q;N.onAutoPropsAssigned?.()}return{componentCtx:T,head:N}},{componentCtx:me,head:nt}=tt(),S=[...pe(y)],C=S.length,k=l.childNodes.length===0,V=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 P=l.querySelector(`template[name='${T}'], template[\\#${T}]`);!P&&T==="default"&&(P=l.querySelector("template:not([name])"),P&&P.getAttributeNames().filter(E=>E.startsWith("#")).length>0&&(P=null));let q=E=>{nt.enableSwitch&&o.v(ue,()=>{o.S(me);let G=et(m,o.V());o.v(ue,()=>{o.S(G);let Dt=o.V(),Q=On(Dt);for(let ie of E)Ce(ie)&&(ie.setAttribute(We,Q),Pt(Q),H(ie,()=>{jt(Q)}))})})};if(P){let E=[...pe(P)];for(let G of E)N.insertBefore(G,m);q(E)}else{if(T!=="default"){for(let G of[...pe(m)])N.insertBefore(G,m);return}let E=[...pe(l)].filter(G=>!re(G));for(let G of E)N.insertBefore(G,m);q(E)}},v=m=>{if(!Ce(m))return;let N=m.querySelectorAll("slot");if(kn(m)){V(m),m.remove();return}for(let T of N)V(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(we,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===$e||T===Fe)continue;let P=l.getAttribute(T);if(T==="class")N.classList.add(...P.split(" "));else if(T==="style"){let q=N.style,E=l.style;for(let G of E)q.setProperty(G,E.getPropertyValue(G))}else N.setAttribute(lt(T,n.o),P)}},Oe=()=>{for(let m of l.getAttributeNames())!m.startsWith("@")&&!m.startsWith(n.o.l.on)&&l.removeAttribute(m)},qe=()=>{ne(),Oe(),o.S(me),n.ye(l,!1),me.$emit=nt.emit,ge(n,S),H(l,()=>{he(me)}),H(A,()=>{ae(l)}),mt(me)};o.v(ue,qe)}}};var Jt=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]=".")}}},ht=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Ge(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 Jt(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 Fo=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},yt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=ke(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=ye(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=Me(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Ne(s,o),o.forEach(a=>{j(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=re(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]),!U(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));Fo(g,M),r.insertBefore(M,i),this.p.G(M),l.name=y})},h=[];H(s,()=>{a.stop();for(let y of h)y();h.length=0}),u();let x=R(c,u);h.push(x)}};var ee=[],_n=t=>{ee.length!==0&&ee[ee.length-1]?.add(t)},Ie=t=>{if(!t)return()=>{};let e={stop:()=>{}};return qo(t,e),K(()=>e.stop(),!0),e.stop},qo=(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(ee.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=R(i,()=>{r(),Ie(t)});n.push(a)}}finally{ee.pop()}},Qt=t=>{let e=ee.length,n=e>0&&ee[e-1];try{return n&&ee.push(null),t()}finally{n&&ee.pop()}},Xt=t=>{try{let e=new Set;return ee.push(e),{value:t(),refs:[...e]}}finally{ee.pop()}};var Qe=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 zo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var De=(t,e,n)=>{n.forEach(function(o){let r=t[o];zo(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let p of c)F(p);return a})})},gt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Bn=Array.prototype,Yt=Object.create(Bn),Ko=["push","pop","shift","unshift","splice","sort","reverse"];De(Bn,Yt,Ko);var Vn=Map.prototype,bt=Object.create(Vn),Wo=["set","clear","delete"];gt(bt,"Map");De(Vn,bt,Wo);var Pn=Set.prototype,Tt=Object.create(Pn),Go=["add","clear","delete"];gt(Tt,"Set");De(Pn,Tt,Go);var se={},z=t=>{if(d(t)||Qe(t))return t;let e={auto:!0,_value:t},n=c=>w(c)?W in c?!0:b(c)?(Object.setPrototypeOf(c,Yt),!0):X(c)?(Object.setPrototypeOf(c,Tt),!0):de(c)?(Object.setPrototypeOf(c,bt),!0):!1:!1,o=n(t),r=new Set,s=(c,p)=>{if(se.stack&&se.stack.length){se.stack[se.stack.length-1].add(a);return}r.size!==0&&Qt(()=>{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):(_n(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,be(a,!1),o&&i(t),a};var B=t=>d(t)?t():t;var Xe=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 Zt=Symbol("r-for"),Et=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=ke(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=ye(e,this.ne);for(let r of o)this.Xe(r);return n}W(e){return e[Zt]?!0:(e[Zt]=!0,ye(e,this.ne).forEach(n=>n[Zt]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.W(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Re(e){return Z(e)?[]:(D(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=Me(e),f=e.parentNode;if(!f)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);f.insertBefore(g,e),Ne(g,p),p.forEach(C=>{j(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,V)=>{let v=o.createContext(k,C),Y=Xe.Ge(v.index,k);return O.v(x,()=>{O.S(v.ctx);let ne=V.previousSibling,Oe=[];for(let qe of p){let m=qe.cloneNode(!0);f.insertBefore(m,V),Oe.push(m)}for(ge(h,Oe),ne=ne.nextSibling;ne!==V;)Y.items.push(ne),ne=ne.nextSibling}),Y},M=(C,k)=>{let V=S.D(C).items,v=V[V.length-1].nextSibling;for(let Y of V)j(Y);S.te(C,y(C,k,v))},A=(C,k)=>{S.S(y(C,k,u))},we=C=>{for(let k of S.D(C).items)j(k)},$e=C=>{let k=S.w;for(let V=C;V<k;++V)S.D(V).index(V)},Fe=C=>{let k=S.w;D(C)&&(C=C());let V=B(C[0]);if(b(V)&&V.length===0){ce(g,u),S.Ee(0);return}let v=0,Y=Number.MAX_SAFE_INTEGER,ne=k,Oe=this.p.o.forGrowThreshold,qe=()=>S.w<ne+Oe;for(let N of this.Re(C[0])){let T=()=>{if(v<k){let P=S.D(v++);if(c(P.value,N))return;let q=S.Qe(a(N));if(q>=v&&q-v<10){if(--v,Y=Math.min(Y,v),we(v),S.Te(v),--k,q>v+1)for(let E=v;E<q-1&&E<k&&!c(S.D(v).value,N);)++E,we(v),S.Te(v),--k;T();return}qe()?(S.Je(v-1,y(v,N,S.D(v-1).items[0])),Y=Math.min(Y,v-1),++k):M(v-1,N)}else A(v++,N)};T()}let m=v;for(k=S.w;v<k;)we(v++);S.Ee(m),$e(Y)},It=()=>{me=R(tt,Fe)},et=()=>{ue.stop(),me()},ue=O.C(o.list),tt=ue.value,me,nt=0,S=new Xe(a);for(let C of this.Re(tt()[0]))S.S(y(nt++,C,u));H(g,et),It()}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:z(-1)};return s&&(g.index=f[s.startsWith("#")?s.substring(1):s]=z(p)),g}}}};var xt=class{h;Ce;ve;Se;we;J;o;x;Oe;constructor(e){this.h=e,this.o=e.o,this.ve=new Et(this),this.Ce=new ft(this),this.Se=new yt(this),this.we=new dt(this),this.J=new ht(this),this.x=this.o.l.pre,this.Oe=this.o.l.dynamic}tt(e){let n=re(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);ge(this,i)}}G(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let 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(We);return f||(p.parentElement?c(p.parentElement):null)};if($t()){let p=c(n);if(p){this.h.v(An(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,H(i,()=>{j(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=[];H(n,()=>{i.stop(),f?.stop();for(let x of a)x();a.length=0});let p=Ln(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 jn="http://www.w3.org/1999/xlink",Jo={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 Qo(t){return!!t||t===""}var en={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),Ct(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];Ct(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;Ct(t,f,l,u)}else{let p=n?.[a],f=e[a++],l=e[a];Ct(t,f,l,p)}}}},Ct=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),Z(e)){L(3,name,t);return}if(!U(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){Z(n)?t.removeAttributeNS(jn,e.slice(6,e.length)):t.setAttributeNS(jn,e,n);return}let r=e in Jo;Z(n)||r&&!Qo(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var tn={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)$n(t,s[c],i?.[c])}else $n(t,s,i)}}},$n=(t,e,n)=>{let o=t.classList,r=U(e),s=U(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 Fn={onChange:(t,e)=>{let[n,o]=e;D(o)?o(t,n):t.innerHTML=n?.toString()}};function Xo(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=_t(t),o=_t(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=ze(t),o=ze(e),n||o)return t===e;if(n=b(t),o=b(e),n||o)return n&&o?Xo(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 vt(t,e){return t.findIndex(n=>fe(n,e))}var qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var nn=t=>{if(!d(t))throw I(3,"pause");t(void 0,void 0,3)};var on=t=>{if(!d(t))throw I(3,"resume");t(void 0,void 0,4)};var Kn={onChange:(t,e)=>{Yo(t,e[0])},onBind:(t,e,n,o,r,s)=>Zo(t,e,s)},Yo=(t,e)=>{let n=Qn(t);if(n&&Wn(t))b(e)?e=vt(e,le(t))>-1:X(e)?e=e.has(le(t)):e=sr(t,e),t.checked=e;else if(n&&Gn(t))t.checked=fe(e,le(t));else if(n||Xn(t))Jn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(Yn(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=vt(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)},Ye=t=>(d(t)&&(t=t()),D(t)&&(t=t()),t?U(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}),Wn=t=>t.type==="checkbox",Gn=t=>t.type==="radio",Jn=t=>t.type==="number"||t.type==="range",Qn=t=>t.tagName==="INPUT",Xn=t=>t.tagName==="TEXTAREA",Yn=t=>t.tagName==="SELECT",Zo=(t,e,n)=>{let o=e.value,r=Ye(n?.join(",")),s=Ye(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=Qn(t);return c&&Wn(t)?tr(t,a):c&&Gn(t)?ir(t,a):c||Xn(t)?er(t,i,a,o):Yn(t)?ar(t,a,o):(L(7,t),()=>{})},zn=/[.,' ·٫]/,er=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Jn(t),a=()=>{!e.trim&&!Ye(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=Ye(o()[1]);if(i||O.number||O.int){if(O.int)h=parseInt(h);else{if(zn.test(h[h.length-1])&&h.split(zn).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},tr=(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=vt(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(rr(t,i))};return t.addEventListener(n,r),o},le=t=>"_value"in t?t._value:t.value,Zn="trueValue",nr="falseValue",eo="true-value",or="false-value",rr=(t,e)=>{let n=e?Zn:nr;if(n in t)return t[n];let o=e?eo:or;return t.hasAttribute(o)?t.getAttribute(o):e},sr=(t,e)=>{if(Zn in t)return fe(e,t.trueValue);let o=eo;return t.hasAttribute(o)?fe(e,t.getAttribute(o)):fe(e,!0)},ir=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=le(t);e(s)};return t.addEventListener(n,r),o},ar=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let a=Ye(n()[1]).number,c=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>a?qn(le(p)):le(p));if(t.multiple){let p=e();try{if(nn(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{on(e),F(e)}}else e(c[0])};return t.addEventListener(o,s),r};var cr=["stop","prevent","capture","self","once","left","right","middle","passive"],pr=t=>{let e={};if($(t))return;let n=t.split(",");for(let o of cr)e[o]=n.includes(o);return e},sn={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 U(l)?rn(t,_(l),()=>e.value()[0],s?.join(",")??f[1]):()=>{}}else if(o){let f=e.value();return rn(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(D(l)&&(l=l()),w(l))for(let g of Object.entries(l)){let u=g[0],h=()=>{let x=e.value()[f];return D(x)&&(x=x()),x=x[u],D(x)&&(x=x()),x},O=l[u+"_flags"];i.push(rn(t,u,h,O))}else L(2,name,t)}return a}},fr=(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]},rn=(t,e,n,o)=>{if($(e))return L(5,name,t),()=>{};let r=pr(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=fr(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&r?.prevent)return;let l=n(f);D(l)&&(l=l(f)),D(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 to={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),Ue(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];Ue(t,p,f)}else if(w(c))for(let p of Object.entries(c)){let f=p[0],l=p[1];Ue(t,f,l)}else{let p=e[a++],f=e[a];Ue(t,p,f)}}}};function lr(t){return!!t||t===""}var Ue=(t,e,n)=>{if(Z(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),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=lr(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 no={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 oo={onChange:(t,e)=>{let n=xe(t).data,o=n._ord;xn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var pn={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)ro(t,s[c],i?.[c])}else ro(t,s,i)}}},ro=(t,e,n)=>{let o=t.style,r=U(e);if(e&&!r){if(n&&!U(n))for(let s in n)e[s]==null&&cn(o,s,"");for(let s in e)cn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in xe(t).data)return;o.display=s}},so=/\s*!important$/;function cn(t,e,n){if(b(n))n.forEach(o=>{cn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=ur(t,e);so.test(n)?t.setProperty(Le(o),n.replace(so,""),"important"):t[o]=n}}var io=["Webkit","Moz","ms"],an={};function ur(t,e){let n=an[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return an[e]=o;o=Je(o);for(let r=0;r<io.length;r++){let s=io[r]+o;if(s in t)return an[e]=s}return e}var J=t=>ao(B(t)),ao=(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]]=ao(B(o[1]),e);return n};var co={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 po={onChange:(t,e)=>{Ue(t,"value",e[0])}};var He=t=>t?.[it]===1;var Re=t=>{if(Qe(t))return t;let e;if(d(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];He(r)||(t[o]=Re(r))}return e}if(!w(t))return e;for(let n of Object.entries(t)){let o=n[1];if(He(o))continue;let r=n[0];ze(r)||(t[r]=null,t[r]=Re(o))}return e};var te=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=Re,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){st.warning("Registered component's default name is not defined",n);continue}this.fe.set(Je(n.defaultName),n),this.ue.set(Je(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.H={".":to,":":en,"@":sn,[`${e}on`]:sn,[`${e}bind`]:en,[`${e}html`]:Fn,[`${e}text`]:co,[`${e}show`]:oo,[`${e}model`]:Kn,":style":pn,[`${e}bind:style`]:pn,":class":tn,[`${e}bind:class`]:tn,":ref":no,":value":po,[`${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 Rt=(t,e)=>{if(!t)return;let o=(e??te.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of dr(t,o.pre,s))mr(i,o.text,r,s)},mr=(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=fo(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=fo(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)},dr=(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},fo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var hr=9,yr=10,gr=13,br=32,Te=46,St=44,Tr=39,Er=34,wt=40,_e=41,Ot=91,At=93,fn=63,xr=59,lo=58,Cr=123,Nt=125,un=43,vr=45,uo=96,mo=47,Rr=92,ho=[2,3],yo=[un,vr],Co={"-":1,"!":1,"~":1,"+":1,new:1},vo={"=":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},Ve={"=>":2,...vo,"||":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},Ro=Object.keys(vo),Sr=new Set(Ro),Mt=new Set;Mt.add("=>");Ro.forEach(t=>Mt.add(t));var wr=new Set(["$","_"]),go={true:!0,false:!1,null:null},Or="this";function So(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Ar=So(Co),Nr=So(Ve),Pe="Expected ",Se="Unexpected ",dn="Unclosed ",Mr=Pe+":",bo=Pe+"expression",kr="missing }",Lr=Se+"object property",Ir=dn+"(",To=Pe+"comma",Eo=Se+"token ",Dr=Se+"period",ln=Pe+"expression after ",Ur="missing unaryOp argument",Hr=dn+"[",_r=Pe+"exponent (",Br="Variable names cannot start with a number (",Vr=dn+'quote after "';var Be=t=>t>=48&&t<=57,xo=t=>Ve[t]||0,mn=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 Ve)||wr.has(n)}re(e){return this.U(e)||Be(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===br||e===hr||e===yr||e===gr;)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===xr||o===St)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(Se+'"'+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,Nr),r=o.length;for(;r>0;){if(o in Ve&&(!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:xo(n),right_a:Mt.has(n)},i=this.j(),!i)throw this.i(ln+n);let p=[s,r,i];for(;n=this.se();){if(o=xo(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:Mt.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(ln+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(Be(r)||r===Te)return this.gt();if(r===Tr||r===Er)o=this.bt();else if(r===Ot)o=this.xt();else{for(e=this.r.substr(this.e,Ar),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Co,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(Ur);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 go?o={type:4,value:go[o.name],raw:o.name}:o.name===Or&&(o={type:5})):r===wt&&(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===Te||n===Ot||n===wt||n===fn;){let o;if(n===fn){if(this.r.charCodeAt(this.e+1)!==Te)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===Ot){if(e={type:3,computed:!0,object:e,property:this.O()},this.y(),n=this.f,n!==At)throw this.i(Hr);this.e++}else n===wt?e={type:6,arguments:this.ke(_e),callee:e}:(n===Te||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(;Be(this.f);)e+=this.r.charAt(this.e++);if(this.m(Te))for(e+=this.r.charAt(this.e++);Be(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++));Be(this.f);)e+=this.r.charAt(this.e++);if(!Be(this.r.charCodeAt(this.e-1)))throw this.i(_r+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(Br+e+this.M+")");if(o===Te||e.length===1&&e.charCodeAt(0)===Te)throw this.i(Dr);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(Vr+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(Se+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===_e&&r&&r>=n.length)throw this.i(Eo+String.fromCharCode(e));break}else if(s===St){if(this.e++,r++,r!==n.length){if(e===_e)throw this.i(Eo+",");if(e===At)for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(To);{let i=this.O();if(!i||i.type===0)throw this.i(To);n.push(i)}}}if(!o)throw this.i(Pe+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(_e);if(this.m(_e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Ir)}xt(){return this.e++,{type:9,elements:this.ke(At)}}lt(e){if(this.m(Cr)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Nt)){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(St)||this.m(Nt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.m(lo)){this.e++;let r=this.O();if(!r)throw this.i(Lr);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(St)&&this.e++}throw this.i(kr)}}ft(e){let n=this.f;if(yo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){this.e+=2;let o=e.node={type:13,operator:n===un?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!o.argument||!ho.includes(o.argument.type))throw this.i(Se+o.operator)}}yt(e){if(e.node){let n=this.f;if(yo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){if(!ho.includes(e.node.type))throw this.i(Se+e.node.operator);this.e+=2,e.node={type:13,operator:n===un?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Te)&&(this.e+=3,e.node={type:14,argument:this.O()})}ct(e){if(e.node&&this.m(fn)){this.e++;let n=e.node,o=this.O();if(!o)throw this.i(bo);if(this.y(),this.m(lo)){this.e++;let r=this.O();if(!r)throw this.i(bo);if(e.node={type:11,test:n,consequent:o,alternate:r},n.operator&&Ve[n.operator]<=.9){let s=n;for(;s.right.operator&&Ve[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(Mr)}}it(e){if(this.y(),this.m(wt)){let n=this.e;if(this.e++,this.y(),this.m(_e)){this.e++;let o=this.se();if(o==="=>"){let r=this.Me();if(!r)throw this.i(ln+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){Sr.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(uo)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(uo))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(Nt)),!this.m(Nt))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(mo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===mo&&!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(Ot)?o=!0:o&&this.m(At)&&(o=!1),this.e+=this.m(Rr)?2:1}throw this.i("Unclosed Regex")}},wo=t=>new mn(t).parse();var Pr={"=>":(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},jr={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Mo=t=>{if(!t?.some(No))return t;let e=[];return t.forEach(n=>No(n)?e.push(...n):e.push(n)),e},Oo=(...t)=>Mo(t),hn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},$r={"++":(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]}},Fr={"++":(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]--}},Ao={"=":(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}},kt=(t,e)=>U(t)?t.bind(e):t,yn=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],kt(D(o[r]),o);for(let i of this.u)if(r in i)return this.A=i[r],kt(D(i[r]),i);let s=this.Ve;if(s&&r in s)return this.A=s[r],kt(D(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this._e(n,o,Oo,...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,kt(D(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>U(i)?i(...Mo(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,jr[e.operator],e.argument)}8(e,n,o){let r=Pr[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,Oo,...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,hn(f,o)),p=f=>this.He(a,e.value,n,hn(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?$r:Fr;if(r.type===2){let a=r.name,c=this.Pe(a,o);return Z(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(Z(a))return;let c=this.g(e.right,n,o);return Ao[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 Ao[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return b(r)&&(r.s=ko),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)&&d(this.A)}eval(e,n){let{value:o,refs:r}=Xt(()=>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,hn(p,n)):this.g(a,e,n)));return o(...i)}},ko=Symbol("s"),No=t=>t?.s===ko,Lo=(t,e,n,o,r,s,i)=>new yn(e,n,o,r,i).eval(t,s);var Io={},Lt=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=Lo(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=Io[e]??wo("["+e+"]");Io[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 qr="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",zr=new Set(qr.toUpperCase().split(",")),Kr="http://www.w3.org/2000/svg",Do=(t,e)=>{re(t)?t.content.appendChild(e):t.appendChild(e)},gn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&zr.has(r.toUpperCase())?document.createElementNS(Kr,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)gn(p,i,n,o);Do(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)Do(e,i);else throw new Error("unsupported node type.")}},je=(t,e,n)=>{n??=te.getDefault();let o=document.createDocumentFragment();if(!b(t))return gn(t,o,!!e,n),o;for(let r of t)gn(r,o,!!e,n);return o};var Wr=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),In(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ce(o))throw I(0);n||(n=te.getDefault());let r=()=>{for(let a of[...o.childNodes])$(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=je(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Rt(o,n),new bn(t,o,n).T(),_(o,()=>{he(t)}),mt(t),{context:t,unmount:()=>{$(o)},unbind:()=>{ae(o)}}},bn=class{Rt;$e;o;h;p;constructor(e,n,o){this.Rt=e,this.$e=n,this.o=o,this.h=new Lt([e],o),this.p=new xt(this.h)}T(){this.p.G(this.$e)}};var Ze=t=>{if(b(t))return t.map(r=>Ze(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=>Ze(r))),e};var Gr=(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=je(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Rt(t.element,e.config??te.getDefault());let r=t.element;if(!o&&((t.isSVG??(Ge(r)&&r.hasAttribute?.("isSVG")))||Ge(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=Ze(i);t.element=je(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Jr=t=>{Ee()?.onMounted.push(t)};var Qr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=Xr(t,n),e(...r))};return o[W]=1,be(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Xr=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let o=0,r=Ie(()=>{if(o>0){r(),e.isStopped=!0,q(n);return}n(t()),++o});return n.stop=r,n};var Yr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Zr(t,e,n),o(...s))};return r[W]=1,be(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Zr=(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 es=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=ts(t,e,n),o(...s))};return r[W]=1,be(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},ts=(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 ns=t=>(t[at]=1,t);var os=(t,e)=>{if(!e)throw I(5);let o=He(t)?Re: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=Ie(r);return K(i,!0),t};var Uo=(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},rs=Uo;var ss=(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 is=t=>{if(!d(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var as=t=>{Ho();try{t()}finally{_o()}},Ho=()=>{se.stack||(se.stack=[]),se.stack.push(new Set)},_o=()=>{let t=se.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete se.stack;for(let n of e)try{q(n)}catch(o){console.error(o)}};export{Ke as ComponentHead,te as RegorConfig,_ as addUnbinder,as as batch,Xt as collectRefs,Yr as computeMany,es as computeRef,Qr as computed,Wr as createApp,Gr as createComponent,_o as endBatch,Gt as entangle,J as flatten,xe as getBindData,Uo as html,He as isDeepRef,Qe as isRaw,d as isRef,ns as markRaw,R as observe,ss as observeMany,is as observerCount,Jr as onMounted,K as onUnmounted,nn as pause,os as persist,rs as raw,Re as ref,$ as removeNode,on as resume,Qt as silence,z as sref,Ho as startBatch,je as toFragment,Ze as toJsonTemplate,q as trigger,ae as unbind,D as unref,Wt as useScope,st as warningHandler,Ie as watchEffect};
|
|
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(mo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===mo&&!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(Ot)?o=!0:o&&this.m(At)&&(o=!1),this.e+=this.m(Rr)?2:1}throw this.i("Unclosed Regex")}},wo=t=>new mn(t).parse();var Pr={"=>":(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},jr={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Mo=t=>{if(!t?.some(No))return t;let e=[];return t.forEach(n=>No(n)?e.push(...n):e.push(n)),e},Oo=(...t)=>Mo(t),hn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},$r={"++":(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]}},Fr={"++":(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]--}},Ao={"=":(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}},kt=(t,e)=>D(t)?t.bind(e):t,yn=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],kt(B(o[r]),o);for(let i of this.u)if(r in i)return this.A=i[r],kt(B(i[r]),i);let s=this.Ve;if(s&&r in s)return this.A=s[r],kt(B(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this._e(n,o,Oo,...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,kt(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>D(i)?i(...Mo(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,jr[e.operator],e.argument)}8(e,n,o){let r=Pr[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,Oo,...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,hn(f,o)),p=f=>this.He(a,e.value,n,hn(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?$r:Fr;if(r.type===2){let a=r.name,c=this.Pe(a,o);return Z(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(Z(a))return;let c=this.g(e.right,n,o);return Ao[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 Ao[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return b(r)&&(r.s=ko),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}=Xt(()=>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,hn(p,n)):this.g(a,e,n)));return o(...i)}},ko=Symbol("s"),No=t=>t?.s===ko,Lo=(t,e,n,o,r,s,i)=>new yn(e,n,o,r,i).eval(t,s);var Io={},Lt=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($(e))return p;let f=this.o.globalContext,l=[],g=(u,h,O,x)=>{try{let y=Lo(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=Io[e]??wo("["+e+"]");Io[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 qr="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",zr=new Set(qr.toUpperCase().split(",")),Kr="http://www.w3.org/2000/svg",Do=(t,e)=>{re(t)?t.content.appendChild(e):t.appendChild(e)},gn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&zr.has(r.toUpperCase())?document.createElementNS(Kr,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)gn(p,i,n,o);Do(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)Do(e,i);else throw new Error("unsupported node type.")}},je=(t,e,n)=>{n??=te.getDefault();let o=document.createDocumentFragment();if(!b(t))return gn(t,o,!!e,n),o;for(let r of t)gn(r,o,!!e,n);return o};var Wr=(t,e={selector:"#app"},n)=>{U(e)&&(e={selector:"#app",template:e}),In(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ce(o))throw I(0);n||(n=te.getDefault());let r=()=>{for(let a of[...o.childNodes])j(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=je(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Rt(o,n),new bn(t,o,n).T(),H(o,()=>{he(t)}),mt(t),{context:t,unmount:()=>{j(o)},unbind:()=>{ae(o)}}},bn=class{Rt;$e;o;h;p;constructor(e,n,o){this.Rt=e,this.$e=n,this.o=o,this.h=new Lt([e],o),this.p=new xt(this.h)}T(){this.p.G(this.$e)}};var Ze=t=>{if(b(t))return t.map(r=>Ze(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=>Ze(r))),e};var Gr=(t,e={})=>{b(e)&&(e={props:e}),U(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=je(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Rt(t.element,e.config??te.getDefault());let r=t.element;if(!o&&((t.isSVG??(Ge(r)&&r.hasAttribute?.("isSVG")))||Ge(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=Ze(i);t.element=je(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var Jr=t=>{Ee()?.onMounted.push(t)};var Qr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=Xr(t,n),e(...r))};return o[W]=1,be(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Xr=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let o=0,r=Ie(()=>{if(o>0){r(),e.isStopped=!0,F(n);return}n(t()),++o});return n.stop=r,n};var Yr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Zr(t,e,n),o(...s))};return r[W]=1,be(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Zr=(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,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 es=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=ts(t,e,n),o(...s))};return r[W]=1,be(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},ts=(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,F(o);return}o(e(s)),++r},!0),o};var ns=t=>(t[at]=1,t);var os=(t,e)=>{if(!e)throw I(5);let o=He(t)?Re: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=Ie(r);return K(i,!0),t};var Uo=(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},rs=Uo;var ss=(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 is=t=>{if(!d(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var as=t=>{Ho();try{t()}finally{_o()}},Ho=()=>{se.stack||(se.stack=[]),se.stack.push(new Set)},_o=()=>{let t=se.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete se.stack;for(let n of e)try{F(n)}catch(o){console.error(o)}};export{Ke as ComponentHead,te as RegorConfig,H as addUnbinder,as as batch,Xt as collectRefs,Yr as computeMany,es as computeRef,Qr as computed,Wr as createApp,Gr as createComponent,_o as endBatch,Gt as entangle,J as flatten,xe as getBindData,Uo as html,He as isDeepRef,Qe as isRaw,d as isRef,ns as markRaw,R as observe,ss as observeMany,is as observerCount,Jr as onMounted,K as onUnmounted,nn as pause,os as persist,rs as raw,Re as ref,j as removeNode,on as resume,Qt as silence,z as sref,Ho as startBatch,je as toFragment,Ze as toJsonTemplate,F as trigger,ae as unbind,B as unref,Wt as useScope,st as warningHandler,Ie as watchEffect};
|
|
@@ -775,11 +775,6 @@ var Regor = (() => {
|
|
|
775
775
|
};
|
|
776
776
|
};
|
|
777
777
|
|
|
778
|
-
// src/reactivity/unref.ts
|
|
779
|
-
var unref = (value) => {
|
|
780
|
-
return isRef(value) ? value() : value;
|
|
781
|
-
};
|
|
782
|
-
|
|
783
778
|
// src/bind/ComponentBinder.ts
|
|
784
779
|
var ComponentBinder = class {
|
|
785
780
|
__binder;
|
|
@@ -842,7 +837,10 @@ var Regor = (() => {
|
|
|
842
837
|
if (!definedProps || definedProps.length === 0) return;
|
|
843
838
|
definedProps = definedProps.map(camelize);
|
|
844
839
|
const definedPropsByLowerCase = new Map(
|
|
845
|
-
definedProps.map((definedProp) => [
|
|
840
|
+
definedProps.map((definedProp) => [
|
|
841
|
+
definedProp.toLowerCase(),
|
|
842
|
+
definedProp
|
|
843
|
+
])
|
|
846
844
|
);
|
|
847
845
|
for (const name2 of definedProps.concat(definedProps.map(hyphenate))) {
|
|
848
846
|
const value = component2.getAttribute(name2);
|
|
@@ -891,9 +889,7 @@ var Regor = (() => {
|
|
|
891
889
|
if (compValue === propsValue) continue;
|
|
892
890
|
if (head2.entangle && isRef(compValue) && isRef(propsValue)) {
|
|
893
891
|
addUnbinder(startOfComponent, entangle(propsValue, compValue));
|
|
894
|
-
}
|
|
895
|
-
compValue(propsValue);
|
|
896
|
-
} else componentCtx2[key] = unref(propsValue);
|
|
892
|
+
}
|
|
897
893
|
} else componentCtx2[key] = propsValue;
|
|
898
894
|
}
|
|
899
895
|
head2.onAutoPropsAssigned?.();
|
|
@@ -1479,6 +1475,11 @@ var Regor = (() => {
|
|
|
1479
1475
|
return srefFunction;
|
|
1480
1476
|
};
|
|
1481
1477
|
|
|
1478
|
+
// src/reactivity/unref.ts
|
|
1479
|
+
var unref = (value) => {
|
|
1480
|
+
return isRef(value) ? value() : value;
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1482
1483
|
// src/bind/MountList.ts
|
|
1483
1484
|
var MountList = class {
|
|
1484
1485
|
__list = [];
|