regor 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -18
- package/dist/regor.d.ts +30 -12
- package/dist/regor.es2015.cjs.js +738 -387
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +738 -387
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +738 -387
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +738 -387
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +738 -387
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +738 -387
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +729 -375
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +729 -375
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +729 -375
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Jr=Object.defineProperty;var Qr=(t,e,n)=>e in t?Jr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var d=(t,e,n)=>Qr(t,typeof e!="symbol"?e+"":e,n);var _e=Symbol(":regor");var ye=t=>{let e=[t];for(;e.length>0;){let n=e.pop();Xr(n);for(let r=n.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Xr=t=>{let e=t[_e];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[_e]=void 0};var Pe=[],ut=!1,lt,In=()=>{if(ut=!1,lt=void 0,Pe.length!==0){for(let t=0;t<Pe.length;++t)ye(Pe[t]);Pe.length=0}},z=t=>{t.remove(),Pe.push(t),ut||(ut=!0,lt=setTimeout(In,1))},Yr=async()=>{Pe.length===0&&!ut||(lt&&clearTimeout(lt),In())};var P=t=>typeof t=="function",V=t=>typeof t=="string",Dn=t=>typeof t=="undefined",ie=t=>t==null||typeof t=="undefined",K=t=>typeof t!="string"||!(t!=null&&t.trim()),Zr=Object.prototype.toString,Kt=t=>Zr.call(t),Se=t=>Kt(t)==="[object Map]",se=t=>Kt(t)==="[object Set]",Wt=t=>Kt(t)==="[object Date]",Ye=t=>typeof t=="symbol",x=Array.isArray,L=t=>t!==null&&typeof t=="object";var Un={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."},B=(t,...e)=>{let n=Un[t];return new Error(P(n)?n.call(Un,...e):n)};var mt=[],Bn=()=>{let t={onMounted:[],onUnmounted:[]};return mt.push(t),t},ke=t=>{let e=mt[mt.length-1];if(!e&&!t)throw B(2);return e},Hn=t=>{let e=ke();return t&&Jt(t),mt.pop(),e},Gt=Symbol("csp"),Jt=t=>{let e=t,n=e[Gt];if(n){let r=ke();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Gt]=ke()},dt=t=>t[Gt];var we=t=>{var n,r;let e=(n=dt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var Ze=class{constructor(e,n,r,o,s){d(this,"props");d(this,"start");d(this,"end");d(this,"ctx");d(this,"autoProps",!0);d(this,"entangle",!0);d(this,"enableSwitch",!1);d(this,"onAutoPropsAssigned");d(this,"ce");d(this,"emit",(e,n)=>{this.ce.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.ce=n,this.ctx=r,this.start=o,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)z(e),e=e.nextSibling;for(let r of this.ctx)we(r)}};var Ie=t=>{let e=t,n=e[_e];if(n)return n;let r={unbinders:[],data:{}};return e[_e]=r,r};var j=(t,e)=>{Ie(t).unbinders.push(e)};var _n={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},k=(t,...e)=>{let n=_n[t],r=P(n)?n.call(_n,...e):n,o=ht.warning;o&&(V(r)?o(r):o(r,...r.args))},ht={warning:console.warn};var gt={},yt={},Pn=1,Vn=t=>{let e=(Pn++).toString();return gt[e]=t,yt[e]=0,e},Qt=t=>{yt[t]+=1},Xt=t=>{--yt[t]===0&&(delete gt[t],delete yt[t])},jn=t=>gt[t],Yt=()=>Pn!==1&&Object.keys(gt).length>0,et="r-switch",eo=t=>{let e=t.filter(r=>De(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(et))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Ve=(t,e)=>{if(!Yt())return;let n=eo(e);n.length!==0&&(n.forEach(Qt),j(t,()=>{n.forEach(Xt)}))};var Zt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Oe(e,o)},en=Symbol("r-if"),$n=Symbol("r-else"),qn=t=>t[$n]===1,bt=class{constructor(e){d(this,"i");d(this,"I");d(this,"q");d(this,"F");d(this,"K");d(this,"b");d(this,"x");this.i=e,this.I=e.r.l.if,this.q=$e(e.r.l.if),this.F=e.r.l.else,this.K=e.r.l.elseif,this.b=e.r.l.for,this.x=e.r.l.pre}Ge(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}O(e){let n=e.hasAttribute(this.I),r=Ae(e,this.q);for(let o of r)this.T(o);return n}z(e){return e[en]?!0:(e[en]=!0,Ae(e,this.q).forEach(n=>n[en]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.z(e)||this.Ge(e,this.b))return;let n=e.getAttribute(this.I);if(!n){k(0,this.I,e);return}e.removeAttribute(this.I),this.N(e,n)}D(e,n,r){let o=je(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Ve(i,o),o.forEach(c=>{z(c)}),e.remove(),n!=="if"&&(e[$n]=1);let a=document.createComment(`__end__ :${n}${r!=null?r:""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}pe(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.F)){e.removeAttribute(this.F);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.D(e,"else");return[{mount:()=>{Zt(o,this.i,s,a)},unmount:()=>{ge(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.K);if(!o)return[];e.removeAttribute(this.K);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.D(e,"elseif",` => ${o} `),p=this.i.h.M(o),f=p.value,u=this.pe(r,n),l=[];j(a,()=>{p.stop();for(let h of l)h();l.length=0});let y=p.subscribe?p.subscribe(n):()=>{};return l.push(y),[{mount:()=>{Zt(s,this.i,i,c)},unmount:()=>{ge(a,c)},isTrue:()=>!!f()[0],isMounted:!1}].concat(u)}}N(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.D(e,"if",` => ${n} `),c=this.i.h.M(n),p=c.value,f=!1,u=this.i.h,l=u.k(),m=()=>{u.E(l,()=>{if(p()[0])f||(Zt(o,this.i,s,a),f=!0),y.forEach(b=>{b.unmount(),b.isMounted=!1});else{ge(i,a),f=!1;let b=!1;for(let w of y)!b&&w.isTrue()?(w.isMounted||(w.mount(),w.isMounted=!0),b=!0):(w.unmount(),w.isMounted=!1)}})},y=this.pe(r,m),h=[];j(i,()=>{c.stop();for(let b of h)b();h.length=0}),m();let E=c.subscribe?c.subscribe(m):()=>{};h.push(E)}};var je=t=>{let e=ue(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Oe=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(qn(r)||t.B(r))}},Ae=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},ue=t=>t instanceof HTMLTemplateElement,De=t=>t.nodeType===Node.ELEMENT_NODE,tt=t=>t.nodeType===Node.ELEMENT_NODE,Fn=t=>t instanceof HTMLSlotElement,be=t=>ue(t)?t.content.childNodes:t.childNodes,ge=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;z(n),n=r}},zn=function(){return this()},to=function(t){return this(t)},no=()=>{throw new Error("value is readonly.")},ro={get:zn,set:to,enumerable:!0,configurable:!1},oo={get:zn,set:no,enumerable:!0,configurable:!1},Ne=(t,e)=>{Object.defineProperty(t,"value",e?oo:ro)},Kn=(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},$e=t=>`[${CSS.escape(t)}]`,Tt=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),tn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},so=/-(\w)/g,$=tn(t=>t&&t.replace(so,(e,n)=>n?n.toUpperCase():"")),io=/\B([A-Z])/g,qe=tn(t=>t&&t.replace(io,"-$1").toLowerCase()),nt=tn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Ct={};var Et=t=>{var n,r;let e=(n=dt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var nn=Symbol("scope"),rn=t=>{try{Bn();let e=t();Jt(e);let n={context:e,unmount:()=>we(e),[nn]:1};return n[nn]=1,n}finally{Hn()}},Wn=t=>L(t)?nn in t:!1;var ee=(t,e)=>{var n;(n=ke(e))==null||n.onUnmounted.push(t)};var xt=Symbol("ref"),J=Symbol("sref"),Rt=Symbol("raw");var T=t=>t!=null&&t[J]===1;var W=(t,e,n,r=!0)=>{if(!T(t))throw B(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ee(s,!0),s};var on={collectRefObj:!0,onBind:(t,e)=>W(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(L(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],p=o[a];p!==c&&(T(p)?p(c):o[a]=c)}},!0)};var rt=(t,e)=>{if(t===e)return()=>{};let n=W(t,o=>e(o)),r=W(e,o=>t(o));return e(t()),()=>{n(),r()}};var ot=t=>!!t&&t[Rt]===1;var Fe=t=>(t==null?void 0:t[xt])===1;var ae=[],Gn=t=>{var e;ae.length!==0&&((e=ae[ae.length-1])==null||e.add(t))},ze=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ao(t,e),ee(()=>e.stop(),!0),e.stop},ao=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ae.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=W(i,()=>{o(),ze(t)});n.push(a)}}finally{ae.pop()}},sn=t=>{let e=ae.length,n=e>0&&ae[e-1];try{return n&&ae.push(null),t()}finally{n&&ae.pop()}},an=t=>{try{let e=new Set;return ae.push(e),{value:t(),refs:[...e]}}finally{ae.pop()}};var Q=(t,e,n)=>{if(!T(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(x(o)||se(o))for(let s of o)Q(s,e,!0);else if(Se(o))for(let s of o)Q(s[0],e,!0),Q(s[1],e,!0);if(L(o))for(let s in o)Q(o[s],e,!0)}};function co(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Ke=(t,e,n)=>{n.forEach(function(r){let o=t[r];co(e,r,function(...i){let a=o.apply(this,i),c=this[J];for(let p of c)Q(p);return a})})},vt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Jn=Array.prototype,cn=Object.create(Jn),po=["push","pop","shift","unshift","splice","sort","reverse"];Ke(Jn,cn,po);var Qn=Map.prototype,St=Object.create(Qn),fo=["set","clear","delete"];vt(St,"Map");Ke(Qn,St,fo);var Xn=Set.prototype,wt=Object.create(Xn),uo=["add","clear","delete"];vt(wt,"Set");Ke(Xn,wt,uo);var le={},te=t=>{if(T(t)||ot(t))return t;let e={auto:!0,_value:t},n=c=>L(c)?J in c?!0:x(c)?(Object.setPrototypeOf(c,cn),!0):se(c)?(Object.setPrototypeOf(c,wt),!0):Se(c)?(Object.setPrototypeOf(c,St),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(le.stack&&le.stack.length){le.stack[le.stack.length-1].add(a);return}o.size!==0&&sn(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[J];p||(c[J]=p=new Set),p.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],u=c[1];return 0 in c?e._value===f||T(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(Gn(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let u=l=>{o.delete(l)};return o.add(f),()=>{u(f)}}case 1:{let f=c[1],u=e._value;s(u,f);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[J]=1,Ne(a,!1),r&&i(t),a};var Te=t=>{if(ot(t))return t;let e;if(T(t)?(e=t,t=e()):e=te(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[xt]=1,x(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Fe(o)||(t[r]=Te(o))}return e}if(!L(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Fe(r))continue;let o=n[0];Ye(o)||(t[o]=null,t[o]=Te(r))}return e};var Yn=Symbol("modelBridge"),At=()=>{},lo=t=>!!(t!=null&&t[Yn]),mo=t=>{t[Yn]=1},ho=t=>{let e=Te(t());return mo(e),e},Zn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return At;let i=$(r),a,c,p=At,f=()=>{p(),p=At,a=void 0,c=void 0},u=()=>{p(),p=At},l=(y,h)=>{a!==y&&(u(),p=rt(y,h),a=y)},m=W(e.value,()=>{var E;let y=(E=e.refs[0])!=null?E:e.value()[0],h=e.context,C=h[i];if(!T(y)){if(c&&C===c){c(y);return}if(f(),T(C)){C(y);return}h[i]=y;return}if(lo(y)){if(C===y)return;T(C)?l(y,C):h[i]=y;return}c||(c=ho(y)),h[i]=c,l(y,c)},!0);return()=>{p(),m()}}};var Ot=class{constructor(e){d(this,"i");d(this,"le");d(this,"ue","");d(this,"fe",-1);this.i=e,this.le=e.r.l.inherit}O(e){this.Je(e)}Qe(e){if(this.fe!==e.size){let n=[...e.keys()];this.ue=n.concat(n.map(qe)).join(","),this.fe=e.size}return this.ue}Xe(e){var n;for(let r=0;r<e.length;++r){let o=(n=e[r])==null?void 0:n.components;if(o)for(let s in o)return!0}return!1}Je(e){var l;let n=this.i,r=n.h,o=n.r.me,s=n.r.de;if(o.size===0&&!this.Xe(r.u))return;let i=r.ye(),a=r.Ye(),c=this.Qe(o),p=[...c?[c]:[],...a,...a.map(qe)].join(",");if(K(p))return;let f=e.querySelectorAll(p),u=(l=e.matches)!=null&&l.call(e,p)?[e,...f]:f;for(let m of u){if(m.hasAttribute(n.x))continue;let y=m.parentNode;if(!y)continue;let h=m.nextSibling,C=$(m.tagName).toUpperCase(),E=i[C],b=E!=null?E:s.get(C);if(!b)continue;let w=b.template;if(!w)continue;let I=m.parentElement;if(!I)continue;let q=new Comment(" begin component: "+m.tagName),D=new Comment(" end component: "+m.tagName);I.insertBefore(q,m),m.remove();let pe=n.r.l.context,Re=n.r.l.contextAlias,F=n.r.l.bind,me=(g,N)=>{let R={},_=g.hasAttribute(pe);return r.E(N,()=>{r.v(R),_?n.T(on,g,pe):g.hasAttribute(Re)&&n.T(on,g,Re);let S=b.props;if(!S||S.length===0)return;S=S.map($);let v=new Map(S.map(Z=>[Z.toLowerCase(),Z]));for(let Z of S.concat(S.map(qe))){let re=g.getAttribute(Z);re!==null&&(R[$(Z)]=re,g.removeAttribute(Z))}let U=n.W.he(g,!1);for(let[Z,re]of U.entries()){let[Le,Ln]=re.G;if(!Ln)continue;let kn=v.get($(Ln).toLowerCase());kn&&(Le!=="."&&Le!==":"&&Le!==F||n.T(Zn,g,Z,!0,kn,re.J))}}),R},ne=[...r.k()],Xe=()=>{var _;let g=me(m,ne),N=new Ze(g,m,ne,q,D),R=rn(()=>{var S;return(S=b.context(N))!=null?S:{}}).context;if(N.autoProps){for(let[S,v]of Object.entries(g))if(S in R){let U=R[S];if(U===v)continue;if(T(U)){T(v)?N.entangle?j(q,rt(v,U)):U(v()):U(v);continue}}else R[S]=v;(_=N.onAutoPropsAssigned)==null||_.call(N)}return{componentCtx:R,head:N}},{componentCtx:ve,head:pt}=Xe(),A=[...be(w)],ft=A.length,M=m.childNodes.length===0,G=g=>{let N=g.parentElement;if(M){for(let v of[...g.childNodes])N.insertBefore(v,g);return}let R=g.name;K(R)&&(R=g.getAttributeNames().filter(v=>v.startsWith("#"))[0],K(R)?R="default":R=R.substring(1));let _=m.querySelector(`template[name='${R}'], template[\\#${R}]`);!_&&R==="default"&&(_=m.querySelector("template:not([name])"),_&&_.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(_=null));let S=v=>{pt.enableSwitch&&r.E(ne,()=>{r.v(ve);let U=me(g,r.k());r.E(ne,()=>{r.v(U);let Z=r.k(),re=Vn(Z);for(let Le of v)De(Le)&&(Le.setAttribute(et,re),Qt(re),j(Le,()=>{Xt(re)}))})})};if(_){let v=[...be(_)];for(let U of v)N.insertBefore(U,g);S(v)}else{if(R!=="default"){for(let U of[...be(g)])N.insertBefore(U,g);return}let v=[...be(m)].filter(U=>!ue(U));for(let U of v)N.insertBefore(U,g);S(v)}},X=g=>{if(!De(g))return;let N=g.querySelectorAll("slot");if(Fn(g)){G(g),g.remove();return}for(let R of N)G(R),R.remove()};(()=>{for(let g=0;g<ft;++g)A[g]=A[g].cloneNode(!0),y.insertBefore(A[g],h),X(A[g])})(),I.insertBefore(D,h);let de=()=>{if(!b.inheritAttrs)return;let g=A.filter(R=>R.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(R=>R.hasAttribute(this.le)));let N=g[0];if(N)for(let R of m.getAttributeNames()){if(R===pe||R===Re)continue;let _=m.getAttribute(R);if(R==="class")N.classList.add(..._.split(" "));else if(R==="style"){let S=N.style,v=m.style;for(let U of v)S.setProperty(U,v.getPropertyValue(U))}else N.setAttribute(Tt(R,n.r),_)}},O=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.r.l.on)&&m.removeAttribute(g)},he=()=>{de(),O(),r.v(ve),n.ge(m,!1),ve.$emit=pt.emit,Oe(n,A),j(m,()=>{we(ve)}),j(q,()=>{ye(m)}),Et(ve)};r.E(ne,he)}}};var pn=class{constructor(e,n){d(this,"G");d(this,"J");d(this,"be",[]);this.G=e,this.J=n}},Nt=class{constructor(e){d(this,"i");d(this,"xe");d(this,"Te");d(this,"Q");var r;this.i=e,this.xe=e.r.Ze(),this.Q=new Map;let n=new Map;for(let o of this.xe){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.Te=n}et(e){let n=this.Q.get(e);if(n)return n;let r=e,o=r.startsWith(".");o&&(r=":"+r.slice(1));let s=r.indexOf("."),a=(s<0?r:r.substring(0,s)).split(/[:@]/);K(a[0])&&(a[0]=o?".":r[0]);let c=s>=0?r.slice(s+1).split("."):[],p=!1,f=!1;for(let l=0;l<c.length;++l){let m=c[l];if(!p&&m==="camel"?p=!0:!f&&m==="prop"&&(f=!0),p&&f)break}p&&(a[a.length-1]=$(a[a.length-1])),f&&(a[0]=".");let u={terms:a,flags:c};return this.Q.set(e,u),u}he(e,n){let r=new Map;if(!tt(e))return r;let o=this.Te,s=(c,p)=>{var u;let f=o.get((u=p[0])!=null?u:"");if(f)for(let l=0;l<f.length;++l){if(!p.startsWith(f[l]))continue;let m=r.get(p);if(!m){let y=this.et(p);m=new pn(y.terms,y.flags),r.set(p,m)}m.be.push(c);return}},i=c=>{var u,l;let p=c.attributes;if(!p||p.length===0)return;let f=p;for(let m=0;m<p.length;++m){let y=(l=(u=f[m])!=null?u:p.item(m))==null?void 0:l.name;y&&s(c,y)}};if(i(e),!n)return r;let a=e.querySelectorAll("*");for(let c of a)i(c);return r}};var yo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Mt=class{constructor(e){d(this,"i");d(this,"L");d(this,"Re");this.i=e,this.L=e.r.l.is,this.Re=$e(this.L)+", [is]"}O(e){let n=e.hasAttribute(this.L),r=Ae(e,this.Re);for(let o of r)this.T(o);return n}T(e){let n=e.getAttribute(this.L);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.i.B(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.L),this.N(e,n)}D(e,n){let r=je(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Ve(s,r),r.forEach(a=>{z(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}N(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.D(e,` => ${n} `),a=this.i.h.M(n),c=a.value,p=this.i.h,f=p.k(),u={name:""},l=ue(e)?r:[...r[0].childNodes],m=()=>{p.E(f,()=>{var w;let E=c()[0];if(L(E)&&(E.name?E=E.name:E=(w=Object.entries(p.ye()).filter(I=>I[1]===E)[0])==null?void 0:w[0]),!V(E)||K(E)){ge(s,i);return}if(u.name===E)return;ge(s,i);let b=document.createElement(E);for(let I of e.getAttributeNames())I!==this.L&&b.setAttribute(I,e.getAttribute(I));yo(l,b),o.insertBefore(b,i),this.i.B(b),u.name=E})},y=[];j(s,()=>{a.stop();for(let E of y)E();y.length=0}),m();let C=a.subscribe?a.subscribe(m):()=>{};y.push(C)}};var H=t=>{let e=t;return e!=null&&e[J]===1?e():e};var st=class{constructor(e){d(this,"R",[]);d(this,"P",new Map);d(this,"X");this.X=e}get S(){return this.R.length}Y(e){let n=this.X(e.value);n!==void 0&&this.P.set(n,e)}Z(e){var r;let n=this.X((r=this.R[e])==null?void 0:r.value);n!==void 0&&this.P.delete(n)}static tt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.S,this.R.push(e),this.Y(e)}nt(e,n){let r=this.S;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Y(n)}V(e){return this.R[e]}ee(e,n){this.Z(e),this.R[e]=n,this.Y(n),n.order=e}Ee(e){this.Z(e),this.R.splice(e,1);let n=this.S;for(let r=e;r<n;++r)this.R[r].order=r}Ce(e){let n=this.S;for(let r=e;r<n;++r)this.Z(r);this.R.splice(e)}Vt(e){return this.P.has(e)}rt(e){var r;let n=this.P.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var fn=Symbol("r-for"),go=t=>-1,kt=class kt{constructor(e){d(this,"i");d(this,"b");d(this,"te");d(this,"x");this.i=e,this.b=e.r.l.for,this.te=$e(this.b),this.x=e.r.l.pre}O(e){let n=e.hasAttribute(this.b),r=Ae(e,this.te);for(let o of r)this.ot(o);return n}z(e){return e[fn]?!0:(e[fn]=!0,Ae(e,this.te).forEach(n=>n[fn]=!0),!1)}ot(e){if(e.hasAttribute(this.x)||this.z(e))return;let n=e.getAttribute(this.b);if(!n){k(0,this.b,e);return}e.removeAttribute(this.b),this.st(e,n)}ve(e){return ie(e)?[]:(P(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}st(e,n){var ft;let r=this.it(n);if(!(r!=null&&r.list)){k(1,this.b,n,e);return}let o=this.i.r.l.key,s=this.i.r.l.keyBind,i=(ft=e.getAttribute(o))!=null?ft:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=je(e),c=e.parentNode;if(!c)return;let p=`${this.b} => ${n}`,f=new Comment(`__begin__ ${p}`);c.insertBefore(f,e),Ve(f,a),a.forEach(M=>{z(M)}),e.remove();let u=new Comment(`__end__ ${p}`);c.insertBefore(u,f.nextSibling);let l=this.i,m=l.h,y=m.k(),C=y.length===1?[void 0,y[0]]:void 0,E=this.at(i),b=(M,G)=>E(M)===E(G),w=(M,G,X)=>{let Y=r.createContext(G,M),de=st.tt(Y.index,G),O=()=>{var R,_;let he=(_=(R=u.parentNode)!=null?R:f.parentNode)!=null?_:c,g=X.previousSibling,N=[];for(let S=0;S<a.length;++S){let v=a[S].cloneNode(!0);he.insertBefore(v,X),N.push(v)}for(Oe(l,N),g=g.nextSibling;g!==X;)de.items.push(g),g=g.nextSibling};return C?(C[0]=Y.ctx,m.E(C,O)):m.E(y,()=>{m.v(Y.ctx),O()}),de},I=(M,G)=>{let X=A.V(M).items,Y=X[X.length-1].nextSibling;for(let de of X)z(de);A.ee(M,w(M,G,Y))},q=(M,G)=>{A.v(w(M,G,u))},D=M=>{for(let G of A.V(M).items)z(G)},pe=M=>{let G=A.S;for(let X=M;X<G;++X)A.V(X).index(X)},Re=M=>{let G=f.parentNode,X=u.parentNode;if(!G||!X)return;let Y=A.S;P(M)&&(M=M());let de=H(M[0]);if(x(de)&&de.length===0){ge(f,u),A.Ce(0);return}let O=0,he=Number.MAX_SAFE_INTEGER,g=Y,N=this.i.r.forGrowThreshold,R=()=>A.S<g+N;for(let S of this.ve(M[0])){let v=()=>{if(O<Y){let U=A.V(O++);if(b(U.value,S))return;let Z=A.rt(E(S));if(Z>=O&&Z-O<10){if(--O,he=Math.min(he,O),D(O),A.Ee(O),--Y,Z>O+1)for(let re=O;re<Z-1&&re<Y&&!b(A.V(O).value,S);)++re,D(O),A.Ee(O),--Y;v();return}R()?(A.nt(O-1,w(O,S,A.V(O-1).items[0])),he=Math.min(he,O-1),++Y):I(O-1,S)}else q(O++,S)};v()}let _=O;for(Y=A.S;O<Y;)D(O++);A.Ce(_),pe(he)},F=()=>{ve=ne.subscribe?ne.subscribe(Re):()=>{}},me=()=>{ne.stop(),ve()},ne=m.M(r.list),Xe=ne.value,ve,pt=0,A=new st(E);for(let M of this.ve(Xe()[0]))A.v(w(pt++,M,u));j(f,me),F()}it(e){var c,p;let n=kt.ct.exec(e);if(!n)return;let r=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||(p=r[o])!=null&&p.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,u)=>{let l={},m=H(f);if(!a&&r.length===1)l[r[0]]=f;else if(x(m)){let h=0;for(let C of r)l[C]=m[h++]}else for(let h of r)l[h]=m[h];let y={ctx:l,index:go};return s&&(y.index=l[s.startsWith("#")?s.substring(1):s]=te(u)),y}}}at(e){if(!e)return r=>r;let n=e.trim();if(!n)return r=>r;if(n.includes(".")){let r=this.pt(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=H(s),a=this.Se(i,r);return a!==void 0||!o?a:this.Se(i,o)}}return r=>{var o;return H((o=H(r))==null?void 0:o[n])}}pt(e){return e.split(".").filter(n=>n.length>0)}Se(e,n){var o;let r=e;for(let s of n)r=(o=H(r))==null?void 0:o[s];return H(r)}};d(kt,"ct",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Lt=kt;var It=class{constructor(e){d(this,"h");d(this,"we");d(this,"Ae");d(this,"Oe");d(this,"Ne");d(this,"W");d(this,"r");d(this,"x");d(this,"Me");this.h=e,this.r=e.r,this.Ae=new Lt(this),this.we=new bt(this),this.Oe=new Mt(this),this.Ne=new Ot(this),this.W=new Nt(this),this.x=this.r.l.pre,this.Me=this.r.l.dynamic}lt(e){let n=ue(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Oe(this,i)}}B(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.we.O(e)||this.Ae.O(e)||this.Oe.O(e)||(this.Ne.O(e),this.lt(e),this.ge(e,!0))}ge(e,n){var s;let r=this.W.he(e,n),o=this.r._;for(let[i,a]of r.entries()){let[c,p]=a.G,f=(s=o[i])!=null?s:o[c];if(!f){console.error("directive not found:",c);continue}let u=a.be;for(let l=0;l<u.length;++l){let m=u[l];this.T(f,m,i,!1,p,a.J)}}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p;for(;f;){let u=f.getAttribute(et);if(u)return u;f=f.parentElement}return null};if(Yt()){let p=c(n);if(p){this.h.E(jn(p),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}ut(e,n,r){if(e!==Ct)return!1;if(K(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,j(i,()=>{z(n)}),o.appendChild(n)}return!0}N(e,n,r,o,s){var C;if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.ut(e,n,r))return;let i=this.h.M(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[],c=!!e.onChange;j(n,()=>{i.stop(),u==null||u.stop();for(let E=0;E<a.length;++E)a[E]();a.length=0});let f=Kn(o,this.Me),u;f&&(u=this.h.M($(f),void 0,void 0,void 0,e.once));let l=u,m=l!=null,y=i.value(),h=m?u.value()[0]:o;if(!e.once&&c){let E=i.subscribe?i.subscribe(()=>{var D;let b=y,w=h,I=i.value(),q=m?l.value()[0]:o;y=I,h=q,(D=e.onChange)==null||D.call(e,n,I,b,q,w,s)}):()=>{};if(a.push(E),l){let b=l.subscribe?l.subscribe(()=>{var D;let w=h,I=i.value(),q=l.value()[0];y=I,h=q,(D=e.onChange)==null||D.call(e,n,I,w,q,w,s)}):()=>{};a.push(b)}}e.onBind&&a.push(e.onBind(n,i,r,o,u,s)),(C=e.onChange)==null||C.call(e,n,y,void 0,h,void 0,s)}};var er="http://www.w3.org/1999/xlink",bo={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 To(t){return!!t||t===""}var un={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=$(r)),Dt(t,r,e[0],o);return}let i=e.length;for(let c=0;c<i;++c){let p=e[c];if(x(p)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],u=p[0],l=p[1];Dt(t,u,l,f)}else if(L(p))for(let f of Object.entries(p)){let u=f[0],l=f[1],m=n==null?void 0:n[c],y=m&&u in m?u:void 0;Dt(t,u,l,y)}else{let f=n==null?void 0:n[c],u=e[c++],l=e[c];Dt(t,u,l,f)}}}},Dt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ie(e)){k(3,"r-bind",t);return}if(!V(e)){k(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ie(n)?t.removeAttributeNS(er,e.slice(6,e.length)):t.setAttributeNS(er,e,n);return}let o=e in bo;ie(n)||o&&!To(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var ln={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(x(s)){let a=s.length;for(let c=0;c<a;++c)tr(t,s[c],i==null?void 0:i[c])}else tr(t,s,i)}}},tr=(t,e,n)=>{let r=t.classList,o=V(e),s=V(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var nr={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Co(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=Ce(t[r],e[r]);return n}function Ce(t,e){if(t===e)return!0;let n=Wt(t),r=Wt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Ye(t),r=Ye(e),n||r)return t===e;if(n=x(t),r=x(e),n||r)return n&&r?Co(t,e):!1;if(n=L(t),r=L(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Ce(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Ut(t,e){return t.findIndex(n=>Ce(n,e))}var rr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var mn=t=>{if(!T(t))throw B(3,"pause");t(void 0,void 0,3)};var dn=t=>{if(!T(t))throw B(3,"resume");t(void 0,void 0,4)};var sr={onChange:(t,e)=>{Eo(t,e[0])},onBind:(t,e,n,r,o,s)=>xo(t,e,s)},Eo=(t,e)=>{let n=pr(t);if(n&&ir(t))x(e)?e=Ut(e,Ee(t))>-1:se(e)?e=e.has(Ee(t)):e=Oo(t,e),t.checked=e;else if(n&&ar(t))t.checked=Ce(e,Ee(t));else if(n||fr(t))cr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(ur(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=Ee(a);if(s)x(e)?a.selected=Ut(e,c)>-1:a.selected=e.has(c);else if(Ce(Ee(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else k(7,t)},it=t=>(T(t)&&(t=t()),P(t)&&(t=t()),t?V(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}),ir=t=>t.type==="checkbox",ar=t=>t.type==="radio",cr=t=>t.type==="number"||t.type==="range",pr=t=>t.tagName==="INPUT",fr=t=>t.tagName==="TEXTAREA",ur=t=>t.tagName==="SELECT",xo=(t,e,n)=>{let r=e.value,o=it(n==null?void 0:n.join(",")),s=it(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return k(8,t),()=>{};let a=()=>e.refs[0],c=pr(t);return c&&ir(t)?vo(t,a):c&&ar(t)?No(t,a):c||fr(t)?Ro(t,i,a,r):ur(t)?Mo(t,a,r):(k(7,t),()=>{})},or=/[.,' ·٫]/,Ro=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=cr(t),a=()=>{!e.trim&&!it(r()[1]).trim||(t.value=t.value.trim())},c=l=>{let m=l.target;m.composing=1},p=l=>{let m=l.target;m.composing&&(m.composing=0,m.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,u),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",p),t.removeEventListener("change",p)},u=l=>{let m=n();if(!m)return;let y=l.target;if(!y||y.composing)return;let h=y.value,C=it(r()[1]);if(i||C.number||C.int){if(C.int)h=parseInt(h);else{if(or.test(h[h.length-1])&&h.split(or).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(m()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),t.value=h}else C.trim&&(h=h.trim());m(h)};return t.addEventListener(s,u),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",p),t.addEventListener("change",p),f},vo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ee(t),a=t.checked,c=s();if(x(c)){let p=Ut(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else se(c)?a?c.add(i):c.delete(i):s(Ao(t,a))};return t.addEventListener(n,o),r},Ee=t=>"_value"in t?t._value:t.value,lr="trueValue",So="falseValue",mr="true-value",wo="false-value",Ao=(t,e)=>{let n=e?lr:So;if(n in t)return t[n];let r=e?mr:wo;return t.hasAttribute(r)?t.getAttribute(r):e},Oo=(t,e)=>{if(lr in t)return Ce(e,t.trueValue);let r=mr;return t.hasAttribute(r)?Ce(e,t.getAttribute(r)):Ce(e,!0)},No=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=Ee(t);s(i)};return t.addEventListener(n,o),r},Mo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=it(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?rr(Ee(f)):Ee(f));if(t.multiple){let f=i();try{if(mn(i),se(f)){f.clear();for(let u of p)f.add(u)}else x(f)?(f.splice(0),f.push(...p)):i(p)}finally{dn(i),Q(i)}}else i(p[0])};return t.addEventListener(r,s),o};var Lo=["stop","prevent","capture","self","once","left","right","middle","passive"],ko=t=>{let e={};if(K(t))return;let n=t.split(",");for(let r of Lo)e[r]=n.includes(r);return e},yn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{var f,u;if(o){let l=e.value(),m=H(o.value()[0]);return V(m)?hn(t,$(m),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:l[1]):()=>{}}else if(r){let l=e.value();return hn(t,$(r),()=>e.value()[0],(u=s==null?void 0:s.join(","))!=null?u:l[1])}let i=[],a=()=>{i.forEach(l=>l())},c=e.value(),p=c.length;for(let l=0;l<p;++l){let m=c[l];if(P(m)&&(m=m()),L(m))for(let y of Object.entries(m)){let h=y[0],C=()=>{let b=e.value()[l];return P(b)&&(b=b()),b=b[h],P(b)&&(b=b()),b},E=m[h+"_flags"];i.push(hn(t,h,C,E))}else k(2,"r-on",t)}return a}},Io=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=p=>!(o&&!p.ctrlKey||s&&!p.shiftKey||i&&!p.altKey||a&&!p.metaKey);return r?[t,p=>c(p)?p.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},hn=(t,e,n,r)=>{if(K(e))return k(5,"r-on",t),()=>{};let o=ko(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Io(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let u=n(f);P(u)&&(u=u(f)),P(u)&&u(f)},c=()=>{t.removeEventListener(e,p,s)},p=f=>{if(!o){a(f);return}try{if(o.left&&f.button!==0||o.middle&&f.button!==1||o.right&&f.button!==2||o.self&&f.target!==t)return;o.stop&&f.stopPropagation(),o.prevent&&f.preventDefault(),a(f)}finally{o.once&&c()}};return t.addEventListener(e,p,s),c};var dr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=$(r)),We(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let p=c[0],f=c[1];We(t,p,f)}else if(L(c))for(let p of Object.entries(c)){let f=p[0],u=p[1];We(t,f,u)}else{let p=e[a++],f=e[a];We(t,p,f)}}}};function Do(t){return!!t||t===""}var We=(t,e,n)=>{if(ie(e)){k(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ye),1),t[e]=n!=null?n:"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Do(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||k(4,e,r,n,s)}o&&t.removeAttribute(e)};var hr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=x(r),s=e.refs[0];return o?r.push(t):s?s==null||s(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s==null||s(null)}}};var yr={onChange:(t,e)=>{let n=Ie(t).data,r=n._ord;Dn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var Bt={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n==null?void 0:n[o];if(x(s)){let a=s.length;for(let c=0;c<a;++c)gr(t,s[c],i==null?void 0:i[c])}else gr(t,s,i)}}},gr=(t,e,n)=>{let r=t.style,o=V(e);if(e&&!o){if(n&&!V(n))for(let s in n)e[s]==null&&bn(r,s,"");for(let s in e)bn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ie(t).data)return;r.display=s}},br=/\s*!important$/;function bn(t,e,n){if(x(n))n.forEach(r=>{bn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Uo(t,e);br.test(n)?t.setProperty(qe(r),n.replace(br,""),"important"):t[r]=n}}var Tr=["Webkit","Moz","ms"],gn={};function Uo(t,e){let n=gn[e];if(n)return n;let r=$(e);if(r!=="filter"&&r in t)return gn[e]=r;r=nt(r);for(let o=0;o<Tr.length;o++){let s=Tr[o]+r;if(s in t)return gn[e]=s}return e}var oe=t=>Cr(H(t)),Cr=(t,e=new WeakMap)=>{if(!t||!L(t))return t;if(x(t))return t.map(oe);if(se(t)){let r=new Set;for(let o of t.keys())r.add(oe(o));return r}if(Se(t)){let r=new Map;for(let o of t)r.set(oe(o[0]),oe(o[1]));return r}if(e.has(t))return H(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Cr(H(r[1]),e);return n};var Er={onChange:(t,e)=>{var r;let n=e[0];t.textContent=se(n)?JSON.stringify(oe([...n])):Se(n)?JSON.stringify(oe([...n])):L(n)?JSON.stringify(oe(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var xr={onChange:(t,e)=>{We(t,"value",e[0])}};var Me=class Me{constructor(e){d(this,"_",{});d(this,"l",{});d(this,"Ze",()=>Object.keys(this._).filter(e=>e.length===1||!e.startsWith(":")));d(this,"me",new Map);d(this,"de",new Map);d(this,"forGrowThreshold",10);d(this,"globalContext");d(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.mt()}static getDefault(){var e;return(e=Me.ke)!=null?e:Me.ke=new Me}mt(){let e={},n=globalThis;for(let r of Me.ft.split(","))e[r]=n[r];return e.ref=Te,e.sref=te,e.flatten=oe,e}addComponent(...e){for(let n of e){if(!n.defaultName){ht.warning("Registered component's default name is not defined",n);continue}this.me.set(nt(n.defaultName),n),this.de.set(nt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this._={".":dr,":":un,"@":yn,[`${e}on`]:yn,[`${e}bind`]:un,[`${e}html`]:nr,[`${e}text`]:Er,[`${e}show`]:yr,[`${e}model`]:sr,":style":Bt,[`${e}style`]:Bt,[`${e}bind:style`]:Bt,":class":ln,[`${e}bind:class`]:ln,":ref":hr,":value":xr,[`${e}teleport`]:Ct},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this._,this.l)}};d(Me,"ke"),d(Me,"ft","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var ce=Me;var Ht=(t,e)=>{if(!t)return;let r=(e!=null?e:ce.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ho(t,r.pre,s))Bo(i,r.text,o,s)},Bo=(t,e,n,r)=>{var c;let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let p=i[1],f=Rr(p,r);if(f&&K(i[0])&&K(i[2])){let u=t.parentElement;u.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),u.innerText="";return}}let a=document.createDocumentFragment();for(let p of i){let f=Rr(p,r);if(f){let u=document.createElement("span");u.setAttribute(e,p.substring(f.start.length,p.length-f.end.length)),a.appendChild(u)}else a.appendChild(document.createTextNode(p))}t.replaceWith(a)},Ho=(t,e,n)=>{let r=[],o=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&r.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of be(s))o(a)}};return o(t),r},Rr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var _o=9,Po=10,Vo=13,jo=32,xe=46,_t=44,$o=39,qo=34,Pt=40,Ge=41,Vt=91,Tn=93,Cn=63,Fo=59,vr=58,Sr=123,jt=125,Be=43,$t=45,En=96,wr=47,xn=92,Ar=new Set([2,3]),Ir={"=":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},zo={"=>":2,...Ir,"||":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},Dr=Object.keys(Ir),Ko=new Set(Dr),vn=new Set(["=>"]);Dr.forEach(t=>vn.add(t));var Or={true:!0,false:!1,null:null},Wo="this",Je="Expected ",He="Unexpected ",wn="Unclosed ",Go=Je+":",Nr=Je+"expression",Jo="missing }",Qo=He+"object property",Xo=wn+"(",Mr=Je+"comma",Lr=He+"token ",Yo=He+"period",Rn=Je+"expression after ",Zo="missing unaryOp argument",es=wn+"[",ts=Je+"exponent (",ns="Variable names cannot start with a number (",rs=wn+'quote after "',at=t=>t>=48&&t<=57,kr=t=>zo[t],Sn=class{constructor(e){d(this,"p");d(this,"e");this.p=e,this.e=0}get U(){return this.p.charAt(this.e)}get m(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}H(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}ne(e){return this.H(e)||at(e)}o(e){return new Error(`${e} at character ${this.e}`)}y(){let e=this.m,n=this.p,r=this.e;for(;e===jo||e===_o||e===Po||e===Vo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.re();return e.length===1?e[0]:{type:0,body:e}}re(e){let n=[];for(;this.e<this.p.length;){let r=this.m;if(r===Fo||r===_t)this.e++;else{let o=this.w();if(o)n.push(o);else if(this.e<this.p.length){if(r===e)break;throw this.o(He+'"'+this.U+'"')}}}return n}w(){var n;let e=(n=this.dt())!=null?n:this.Le();return this.y(),this.yt(e)}oe(){this.y();let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(r))return!1;let a=!1,c=0;return r===62&&o===62&&s===62&&i===61?(a=">>>=",c=4):r===61&&o===61&&s===61?(a="===",c=3):r===33&&o===61&&s===61?(a="!==",c=3):r===62&&o===62&&s===62?(a=">>>",c=3):r===60&&o===60&&s===61?(a="<<=",c=3):r===62&&o===62&&s===61?(a=">>=",c=3):r===42&&o===42&&s===61?(a="**=",c=3):r===61&&o===62?(a="=>",c=2):r===124&&o===124?(a="||",c=2):r===63&&o===63?(a="??",c=2):r===38&&o===38?(a="&&",c=2):r===61&&o===61?(a="==",c=2):r===33&&o===61?(a="!=",c=2):r===60&&o===61?(a="<=",c=2):r===62&&o===61?(a=">=",c=2):r===60&&o===60?(a="<<",c=2):r===62&&o===62?(a=">>",c=2):r===43&&o===61?(a="+=",c=2):r===45&&o===61?(a="-=",c=2):r===42&&o===61?(a="*=",c=2):r===47&&o===61?(a="/=",c=2):r===37&&o===61?(a="%=",c=2):r===38&&o===61?(a="&=",c=2):r===94&&o===61?(a="^=",c=2):r===124&&o===61?(a="|=",c=2):r===42&&o===42?(a="**",c=2):r===105&&o===110?this.ne(e.charCodeAt(n+2))||(a="in",c=2):r===61?(a="=",c=1):r===124?(a="|",c=1):r===94?(a="^",c=1):r===38?(a="&",c=1):r===60?(a="<",c=1):r===62?(a=">",c=1):r===43?(a="+",c=1):r===45?(a="-",c=1):r===42?(a="*",c=1):r===47?(a="/",c=1):r===37&&(a="%",c=1),a?(this.e+=c,a):!1}Le(){let e,n,r,o,s,i,a,c;if(s=this.j(),!s||(n=this.oe(),!n))return s;if(o={value:n,prec:kr(n),right_a:vn.has(n)},i=this.j(),!i)throw this.o(Rn+n);let p=[s,o,i];for(;n=this.oe();){r=kr(n),o={value:n,prec:r,right_a:vn.has(n)},c=n;let f=u=>o.right_a&&u.right_a?r>u.prec:r<=u.prec;for(;p.length>2&&f(p[p.length-2]);)i=p.pop(),n=p.pop().value,s=p.pop(),e=this.Ve(n,s,i),p.push(e);if(e=this.j(),!e)throw this.o(Rn+c);p.push(o,e)}for(a=p.length-1,e=p[a];a>1;)e=this.Ve(p[a-1].value,p[a-2],e),a-=2;return e}j(){let e;if(this.y(),e=this.ht(),e)return this.se(e);let n=this.m;if(at(n)||n===xe)return this.gt();if(n===$o||n===qo)e=this.bt();else if(n===Vt)e=this.xt();else{let r=this.Tt();if(r){let o=this.j();if(!o)throw this.o(Zo);return this.se({type:7,operator:r,argument:o})}this.H(n)?(e=this.ie(),e.name in Or?e={type:4,value:Or[e.name],raw:e.name}:e.name===Wo&&(e={type:5})):n===Pt&&(e=this.Rt())}return e?(e=this.$(e),this.se(e)):!1}Ve(e,n,r){if(e==="=>"){let o=n.type===1?n.expressions:[n];return{type:15,params:o,body:r}}return Ko.has(e)?{type:16,operator:e,left:n,right:r}:{type:8,operator:e,left:n,right:r}}ht(){let e={node:!1};return this.Et(e),e.node||(this.Ct(e),e.node)||(this.vt(e),e.node)||(this.Ie(e),e.node)||this.St(e),e.node}se(e){let n={node:e};return this.wt(n),this.At(n),this.Ot(n),n.node}Tt(){let e=this.p,n=this.e,r=e.charCodeAt(n),o=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return r===$t?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===Be?(this.e++,"+"):r===110&&o===101&&s===119&&!this.ne(i)?(this.e+=3,"new"):!1}dt(){let e={};return this.Nt(e),e.node}yt(e){let n={node:e};return this.Mt(n),n.node}$(e){this.y();let n=this.m;for(;n===xe||n===Vt||n===Pt||n===Cn;){let r;if(n===Cn){if(this.p.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.m}if(this.e++,n===Vt){if(e={type:3,computed:!0,object:e,property:this.w()},this.y(),n=this.m,n!==Tn)throw this.o(es);this.e++}else n===Pt?e={type:6,arguments:this.De(Ge),callee:e}:(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.m}return e}gt(){let e=this.p,n=this.e,r=n;for(;at(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===xe)for(r++;at(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===Be||a===$t)&&r++;let c=r;for(;at(e.charCodeAt(r));)r++;if(c===r){this.e=r;let p=e.slice(n,r);throw this.o(ts+p+this.U+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.H(i))throw this.o(ns+s+this.U+")");if(i===xe||s.length===1&&s.charCodeAt(0)===xe)throw this.o(Yo);return{type:4,value:parseFloat(s),raw:s}}bt(){let e=this.p,n=e.length,r=this.e,o=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,p=!1;for(;s<n;){let u=e.charCodeAt(s);if(u===o){p=!0,this.e=s+1;break}if(u===xn){c||(c=!0),a.push(e.slice(i,s));let l=e.charCodeAt(s+1);a.push(this.Ue(l)),s+=2,i=s}else s++}let f=c?a.join("")+e.slice(i,p?s:n):e.slice(i,p?s:n);if(!p)throw this.e=s,this.o(rs+f+'"');return{type:4,value:f,raw:e.substring(r,this.e)}}Ue(e){switch(e){case 110:return`
|
|
2
|
-
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}ie(){let e=this.m,n=this.e;if(this.H(e))this.e++;else throw this.o(He+this.U);for(;this.e<this.p.length&&(e=this.m,this.ne(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}De(e){let n=[],r=!1,o=0;for(;this.e<this.p.length;){this.y();let s=this.m;if(s===e){if(r=!0,this.e++,e===Ge&&o&&o>=n.length)throw this.o(Lr+String.fromCharCode(e));break}else if(s===_t){if(this.e++,o++,o!==n.length){if(e===Ge)throw this.o(Lr+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.o(Mr);{let i=this.w();if(!i||i.type===0)throw this.o(Mr);n.push(i)}}}if(!r)throw this.o(Je+String.fromCharCode(e));return n}Rt(){this.e++;let e=this.re(Ge);if(this.f(Ge))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.o(Xo)}xt(){return this.e++,{type:9,elements:this.De(Tn)}}Et(e){if(this.f(Sr)){this.e++;let n=[];for(;!isNaN(this.m);){if(this.y(),this.f(jt)){this.e++,e.node=this.$({type:10,properties:n});return}let r=this.w();if(!r)break;if(this.y(),r.type===2&&(this.f(_t)||this.f(jt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(vr)){this.e++;let o=this.w();if(!o)throw this.o(Qo);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else n.push(r);this.f(_t)&&this.e++}throw this.o(Jo)}}Ct(e){let n=this.m;if((n===Be||n===$t)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===Be?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!Ar.has(r.argument.type))throw this.o(He+r.operator)}}At(e){let n=e.node,r=this.m;if((r===Be||r===$t)&&r===this.p.charCodeAt(this.e+1)){if(!Ar.has(n.type))throw this.o(He+(r===Be?"++":"--"));this.e+=2,e.node={type:13,operator:r===Be?"++":"--",argument:n,prefix:!1}}}vt(e){this.p.charCodeAt(this.e)===xe&&this.p.charCodeAt(this.e+1)===xe&&this.p.charCodeAt(this.e+2)===xe&&(this.e+=3,e.node={type:14,argument:this.w()})}Mt(e){if(e.node&&this.f(Cn)){this.e++;let n=e.node,r=this.w();if(!r)throw this.o(Nr);if(this.y(),this.f(vr)){this.e++;let o=this.w();if(!o)throw this.o(Nr);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.o(Go)}}Nt(e){if(this.y(),this.f(Pt)){let n=this.e;if(this.e++,this.y(),this.f(Ge)){this.e++;let r=this.oe();if(r==="=>"){let o=this.Le();if(!o)throw this.o(Rn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}Ot(e){let n=e.node,r=n.type;(r===2||r===3)&&this.f(En)&&(e.node={type:17,tag:n,quasi:this.Ie(e)})}Ie(e){if(!this.f(En))return;let n=this.p,r=n.length,o={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,p=f=>{if(!c){let m=n.slice(s,this.e);return o.quasis.push({type:18,value:{raw:m,cooked:m},tail:f})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=i.join(""),l=a.join("");return i.length=0,a.length=0,c=!1,o.quasis.push({type:18,value:{raw:u,cooked:l},tail:f})};for(;this.e<r;){let f=n.charCodeAt(this.e);if(f===En)return p(!0),this.e+=1,e.node=o,o;if(f===36&&n.charCodeAt(this.e+1)===Sr){if(p(!1),this.e+=2,o.expressions.push(...this.re(jt)),!this.f(jt))throw this.o("unclosed ${");this.e+=1,s=this.e}else if(f===xn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Ue(u)),this.e+=2,s=this.e}else this.e+=1}throw this.o("Unclosed `")}wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.o("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r.callee.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}St(e){if(!this.f(wr))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.m===wr&&!r){let o=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.m;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.U;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.o(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.$(e.node),e.node}this.f(Vt)?r=!0:r&&this.f(Tn)&&(r=!1),this.e+=this.f(xn)?2:1}throw this.o("Unclosed Regex")}},Ur=t=>new Sn(t).parse();var os={"=>":(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)=>{var n;return(n=t())!=null?n: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},ss={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Pr=t=>{if(!(t!=null&&t.some(_r)))return t;let e=[];return t.forEach(n=>_r(n)?e.push(...n):e.push(n)),e},Br=(...t)=>Pr(t),An=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},is={"++":(t,e)=>{let n=t[e];if(T(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(T(n)){let r=n();return n(--r),r}return--t[e]}},as={"++":(t,e)=>{let n=t[e];if(T(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(T(n)){let r=n();return n(r-1),r}return t[e]--}},Hr={"=":(t,e,n)=>{let r=t[e];return T(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return T(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return T(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return T(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return T(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return T(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return T(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return T(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return T(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return T(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return T(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return T(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return T(r)?r(r()^n):t[e]^=n}},qt=(t,e)=>P(t)?t.bind(e):t,On=class{constructor(e,n,r,o,s){d(this,"u");d(this,"Be");d(this,"Pe");d(this,"_e");d(this,"A");d(this,"He");d(this,"je");this.u=x(e)?e:[e],this.Be=n,this.Pe=r,this._e=o,this.je=!!s}$e(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.A=r[o],qt(H(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],qt(H(i[o]),i);let s=this.Be;if(s&&o in s)return this.A=s[o],qt(H(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.qe(n,r,Br,...e.body)}1(e,n,r){return this.C(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o==null?void 0:o[s];return this.A=i,qt(H(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...Pr(a)):i,s=this.C(++n,r,o,e.callee,...e.arguments);return this.A=s,s}7(e,n,r){return this.C(n,r,ss[e.operator],e.argument)}8(e,n,r){let o=os[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.C(n,r,o,e.left,e.right)}9(e,n,r){return this.qe(++n,r,Br,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.C(++n,r,s,...e.properties),o}11(e,n,r){return this.C(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){var f;let o={},s=u=>(u==null?void 0:u.type)!==15,i=(f=this._e)!=null?f:()=>!1,a=n===0&&this.je,c=u=>this.Fe(a,e.key,n,An(u,r)),p=u=>this.Fe(a,e.value,n,An(u,r));if(e.shorthand){let u=e.key.name;o[u]=s(e.key)&&i(u,n)?c:c()}else if(e.computed){let u=H(c());o[u]=s(e.value)&&i(u,n)?p:p()}else{let u=e.key.type===4?e.key.value:e.key.name;o[u]=s(e.value)&&i(u,n)?()=>p:p()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?is:as;if(o.type===2){let a=o.name,c=this.$e(a,r);return ie(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.$e(i,r);if(ie(a))return;let c=this.g(e.right,n,r);return Hr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Hr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return x(o)&&(o.s=Vr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.C(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r!=null?r:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=H(this[e.type](e,n,r));return this.He=e.type,o}Fe(e,n,r,o){let s=this.g(n,r,o);return e&&this.Ke()?this.A:s}Ke(){let e=this.He;return(e===2||e===3||e===6)&&T(this.A)}eval(e,n){let{value:r,refs:o}=an(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.Ke()&&(s.ref=this.A),s}C(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}qe(e,n,r,...o){let s=this.Pe;if(!s)return this.C(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?p=>this.g(a,e,An(p,n)):this.g(a,e,n)));return r(...i)}},Vr=Symbol("s"),_r=t=>(t==null?void 0:t.s)===Vr,jr=(t,e,n,r,o,s,i)=>new On(e,n,r,o,i).eval(t,s);var $r={},Ft=class{constructor(e,n){d(this,"u");d(this,"r");d(this,"ze",[]);this.u=e,this.r=n}v(e){this.u=[e,...this.u]}ye(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}Ye(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}M(e,n,r,o,s){var E;let i=te([]),a=[],c=new Set,p=()=>{for(let b of a)b();a.length=0},l={value:i,stop:()=>{p(),c.clear()},subscribe:(b,w)=>(c.add(b),w&&b(i()),()=>{c.delete(b)}),refs:[],context:this.u[0]};if(K(e))return l;let m=this.r.globalContext,y=[],h=new Set,C=(b,w,I,q)=>{try{let D=jr(b,w,m,n,r,q,o);return I&&y.push(...D.refs),{value:D.value,refs:D.refs,ref:D.ref}}catch(D){k(6,`evaluation error: ${e}`,D)}return{value:void 0,refs:[]}};try{let b=(E=$r[e])!=null?E:Ur("["+e+"]");$r[e]=b;let w=this.u.slice(),I=b.elements,q=I.length,D=()=>{y.length=0,h.clear(),p();let pe=new Array(q),Re=new Array(q);for(let F=0;F<q;++F){let me=I[F];if(n!=null&&n(F,-1)){pe[F]=Xe=>C(me,w,!1,{$event:Xe}).value;continue}let ne=C(me,w,!0);pe[F]=ne.value,Re[F]=ne.ref}if(!s)for(let F of y){if(h.has(F))continue;h.add(F);let me=W(F,D);a.push(me)}if(l.refs=Re,i(pe),c.size!==0)for(let F of c)c.has(F)&&F(pe)};D()}catch(b){k(6,`parse error: ${e}`,b)}return l}k(){return this.u.slice()}ee(e){this.ze.push(this.u),this.u=e}E(e,n){try{this.ee(e),n()}finally{this.kt()}}kt(){var e;this.u=(e=this.ze.pop())!=null?e:[]}};var qr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},cs=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},ps=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
-
`);)++n;if(n>=t.length||!
|
|
1
|
+
var nr=Object.defineProperty;var or=(t,e,n)=>e in t?nr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var d=(t,e,n)=>or(t,typeof e!="symbol"?e+"":e,n);var $e=Symbol(":regor");var Te=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];rr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},rr=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var qe=[],mt=!1,dt,Pn=()=>{if(mt=!1,dt=void 0,qe.length!==0){for(let t=0;t<qe.length;++t)Te(qe[t]);qe.length=0}},G=t=>{t.remove(),qe.push(t),mt||(mt=!0,dt=setTimeout(Pn,1))},sr=async()=>{qe.length===0&&!mt||(dt&&clearTimeout(dt),Pn())};var F=t=>typeof t=="function",z=t=>typeof t=="string",Hn=t=>typeof t=="undefined",le=t=>t==null||typeof t=="undefined",X=t=>typeof t!="string"||!(t!=null&&t.trim()),ir=Object.prototype.toString,Yt=t=>ir.call(t),Ae=t=>Yt(t)==="[object Map]",ue=t=>Yt(t)==="[object Set]",Zt=t=>Yt(t)==="[object Date]",tt=t=>typeof t=="symbol",w=Array.isArray,I=t=>t!==null&&typeof t=="object";var Vn={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."},_=(t,...e)=>{let n=Vn[t];return new Error(F(n)?n.call(Vn,...e):n)};var ht=[],_n=()=>{let t={onMounted:[],onUnmounted:[]};return ht.push(t),t},De=t=>{let e=ht[ht.length-1];if(!e&&!t)throw _(2);return e},jn=t=>{let e=De();return t&&tn(t),ht.pop(),e},en=Symbol("csp"),tn=t=>{let e=t,n=e[en];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[en]=De()},yt=t=>t[en];var Ne=t=>{var n,o;let e=(n=yt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var nt=class{constructor(e,n,o,r,s){d(this,"props");d(this,"start");d(this,"end");d(this,"ctx");d(this,"autoProps",!0);d(this,"entangle",!0);d(this,"enableSwitch",!1);d(this,"onAutoPropsAssigned");d(this,"le");d(this,"emit",(e,n)=>{this.le.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.le=n,this.ctx=o,this.start=r,this.end=s}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)G(e),e=e.nextSibling;for(let o of this.ctx)Ne(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var K=(t,e)=>{Ue(t).unbinders.push(e)};var $n={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]})},H=(t,...e)=>{let n=$n[t],o=F(n)?n.call($n,...e):n,r=gt.warning;r&&(z(o)?r(o):r(o,...o.args))},gt={warning:console.warn};var Tt={},bt={},qn=1,Fn=t=>{let e=(qn++).toString();return Tt[e]=t,bt[e]=0,e},nn=t=>{bt[t]+=1},on=t=>{--bt[t]===0&&(delete Tt[t],delete bt[t])},zn=t=>Tt[t],rn=()=>qn!==1&&Object.keys(Tt).length>0,ot="r-switch",ar=t=>{let e=t.filter(o=>Be(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ot))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Fe=(t,e)=>{if(!rn())return;let n=ar(e);n.length!==0&&(n.forEach(nn),K(t,()=>{n.forEach(on)}))};var xt=()=>{},sn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Me(e,r)},an=Symbol("r-if"),Kn=Symbol("r-else"),Wn=t=>t[Kn]===1,Et=class{constructor(e){d(this,"i");d(this,"D");d(this,"K");d(this,"z");d(this,"W");d(this,"T");d(this,"R");this.i=e,this.D=e.o.u.if,this.K=Ke(e.o.u.if),this.z=e.o.u.else,this.W=e.o.u.elseif,this.T=e.o.u.for,this.R=e.o.u.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.D),o=Oe(e,this.K);for(let r of o)this.b(r);return n}G(e){return e[an]?!0:(e[an]=!0,Oe(e,this.K).forEach(n=>n[an]=!0),!1)}b(e){if(e.hasAttribute(this.R)||this.G(e)||this.Qe(e,this.T))return;let n=e.getAttribute(this.D);if(!n){H(0,this.D,e);return}e.removeAttribute(this.D),this.O(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),Fe(i,r),r.forEach(c=>{G(c)}),e.remove(),n!=="if"&&(e[Kn]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}fe(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{sn(r,this.i,s,a)},unmount:()=>{xe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.i.m.k(r),u=l.value,f=this.fe(o,n),p=xt;return K(a,()=>{l.stop(),p(),p=xt}),p=l.subscribe(n),[{mount:()=>{sn(s,this.i,i,c)},unmount:()=>{xe(a,c)},isTrue:()=>!!u()[0],isMounted:!1},...f]}}O(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.i.m.k(n),l=c.value,u=!1,f=this.i.m,p=f.M(),m=()=>{f.E(p,()=>{if(l()[0])u||(sn(r,this.i,s,a),u=!0),y.forEach(R=>{R.unmount(),R.isMounted=!1});else{xe(i,a),u=!1;let R=!1;for(let C of y)!R&&C.isTrue()?(C.isMounted||(C.mount(),C.isMounted=!0),R=!0):(C.unmount(),C.isMounted=!1)}})},y=this.fe(o,m),h=xt;K(i,()=>{c.stop(),h(),h=xt}),m(),h=c.subscribe(m)}};var ze=t=>{let e=he(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Me=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(Wn(o)||t.H(o))}},Oe=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},he=t=>t instanceof HTMLTemplateElement,Be=t=>t.nodeType===Node.ELEMENT_NODE,rt=t=>t.nodeType===Node.ELEMENT_NODE,Gn=t=>t instanceof HTMLSlotElement,Ee=t=>he(t)?t.content.childNodes:t.childNodes,xe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;G(n),n=o}},Jn=function(){return this()},cr=function(t){return this(t)},ur=()=>{throw new Error("value is readonly.")},lr={get:Jn,set:cr,enumerable:!0,configurable:!1},fr={get:Jn,set:ur,enumerable:!0,configurable:!1},ke=(t,e)=>{Object.defineProperty(t,"value",e?fr:lr)},Qn=(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)}]`,Ct=(t,e)=>(t.startsWith("@")&&(t=e.u.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.u.dynamic)),t),cn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},pr=/-(\w)/g,j=cn(t=>t&&t.replace(pr,(e,n)=>n?n.toUpperCase():"")),mr=/\B([A-Z])/g,We=cn(t=>t&&t.replace(mr,"-$1").toLowerCase()),st=cn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Rt={mount:()=>{}};var vt=t=>{var n,o;let e=(n=yt(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var un=Symbol("scope"),ln=t=>{try{_n();let e=t();tn(e);let n={context:e,unmount:()=>Ne(e),[un]:1};return n[un]=1,n}finally{jn()}},Xn=t=>I(t)?un in t:!1;var wt=Symbol("ref"),Y=Symbol("sref"),St=Symbol("raw");var E=t=>t!=null&&t[Y]===1;var fn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(I(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(E(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=De(e))==null||n.onUnmounted.push(t)};var se=(t,e,n,o=!0)=>{if(!E(t))throw _(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var it=(t,e)=>{if(t===e)return()=>{};let n=se(t,r=>e(r)),o=se(e,r=>t(r));return e(t()),()=>{n(),o()}};var at=t=>!!t&&t[St]===1;var Ge=t=>(t==null?void 0:t[wt])===1;var fe=[],Yn=t=>{var e;fe.length!==0&&((e=fe[fe.length-1])==null||e.add(t))},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return dr(t,e),re(()=>e.stop(),!0),e.stop},dr=(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(fe.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),Je(t)});n.push(a)}}finally{fe.pop()}},pn=t=>{let e=fe.length,n=e>0&&fe[e-1];try{return n&&fe.push(null),t()}finally{n&&fe.pop()}},mn=t=>{try{let e=new Set;return fe.push(e),{value:t(),refs:[...e]}}finally{fe.pop()}};var Z=(t,e,n)=>{if(!E(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||ue(r))for(let s of r)Z(s,e,!0);else if(Ae(r))for(let s of r)Z(s[0],e,!0),Z(s[1],e,!0);if(I(r))for(let s in r)Z(r[s],e,!0)}};function hr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];hr(e,o,function(...i){let a=r.apply(this,i),c=this[Y];for(let l of c)Z(l);return a})})},At=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Zn=Array.prototype,dn=Object.create(Zn),yr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(Zn,dn,yr);var eo=Map.prototype,Nt=Object.create(eo),gr=["set","clear","delete"];At(Nt,"Map");Qe(eo,Nt,gr);var to=Set.prototype,Ot=Object.create(to),br=["add","clear","delete"];At(Ot,"Set");Qe(to,Ot,br);var ye={},ae=t=>{if(E(t)||at(t))return t;let e={auto:!0,_value:t},n=c=>I(c)?Y in c?!0:w(c)?(Object.setPrototypeOf(c,dn),!0):ue(c)?(Object.setPrototypeOf(c,Ot),!0):Ae(c)?(Object.setPrototypeOf(c,Nt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(ye.stack&&ye.stack.length){ye.stack[ye.stack.length-1].add(a);return}r.size!==0&&pn(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,l)})},i=c=>{let l=c[Y];l||(c[Y]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],f=c[1];return 0 in c?e._value===u||E(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,f),e._value):(Yn(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let f=p=>{r.delete(p)};return r.add(u),()=>{f(u)}}case 1:{let u=c[1],f=e._value;s(f,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[Y]=1,ke(a,!1),o&&i(t),a};var Ce=t=>{if(at(t))return t;let e;if(E(t)?(e=t,t=e()):e=ae(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[wt]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ge(r)||(t[o]=Ce(r))}return e}if(!I(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];tt(r)||(t[r]=null,t[r]=Ce(o))}return e};var no=Symbol("modelBridge"),Mt=()=>{},Tr=t=>!!(t!=null&&t[no]),xr=t=>{t[no]=1},Er=t=>{let e=Ce(t());return xr(e),e},oo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Mt;let n=j(e),o,r,s=Mt,i=()=>{s(),s=Mt,o=void 0,r=void 0},a=()=>{s(),s=Mt},c=(u,f)=>{o!==u&&(a(),s=it(u,f),o=u)},l=()=>{var m;let u=(m=t.refs[0])!=null?m:t.value()[0],f=t.context,p=f[n];if(!E(u)){if(r&&p===r){r(u);return}if(i(),E(p)){p(u);return}f[n]=u;return}if(Tr(u)){if(p===u)return;E(p)?c(u,p):f[n]=u;return}r||(r=Er(u)),f[n]=r,c(u,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var kt=class{constructor(e){d(this,"i");d(this,"me");d(this,"de","");d(this,"ye",-1);this.i=e,this.me=e.o.u.inherit}N(e){this.Xe(e)}Ye(e){if(this.ye!==e.size){let n=[...e.keys()];this.de=[...n,...n.map(We)].join(","),this.ye=e.size}return this.de}Ze(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}Xe(e){var p;let n=this.i,o=n.m,r=n.o.he,s=n.o._;if(r.size===0&&!this.Ze(o.l))return;let i=o.J(),a=o.et(),c=this.Ye(r),l=[...c?[c]:[],...a,...a.map(We)].join(",");if(X(l))return;let u=e.querySelectorAll(l),f=(p=e.matches)!=null&&p.call(e,l)?[e,...u]:u;for(let m of f){if(m.hasAttribute(n.R))continue;let y=m.parentNode;if(!y)continue;let h=m.nextSibling,g=j(m.tagName).toUpperCase(),R=i[g],C=R!=null?R:s.get(g);if(!C)continue;let D=C.template;if(!D)continue;let W=m.parentElement;if(!W)continue;let M=new Comment(" begin component: "+m.tagName),V=new Comment(" end component: "+m.tagName);W.insertBefore(M,m),m.remove();let ie=n.o.u.context,ee=n.o.u.contextAlias,U=n.o.u.bind,b=(x,T)=>{let v={},q=x.hasAttribute(ie);return o.E(T,()=>{o.v(v),q?n.b(fn,x,ie):x.hasAttribute(ee)&&n.b(fn,x,ee);let B=C.props;if(!B||B.length===0)return;B=B.map(j);let N=new Map(B.map(S=>[S.toLowerCase(),S]));for(let S of[...B,...B.map(We)]){let P=x.getAttribute(S);P!==null&&(v[j(S)]=P,x.removeAttribute(S))}let L=n.j.ge(x,!1);for(let[S,P]of L.entries()){let[oe,Ie]=P.Q;if(!Ie)continue;let je=N.get(j(Ie).toLowerCase());je&&(oe!=="."&&oe!==":"&&oe!==U||n.b(oo,x,S,!0,je,P.X))}}),v},A=[...o.M()],J=()=>{var q;let x=b(m,A),T=new nt(x,m,A,M,V),v=ln(()=>{var B;return(B=C.context(T))!=null?B:{}}).context;if(T.autoProps){for(let[B,N]of Object.entries(x))if(B in v){let L=v[B];if(L===N)continue;if(E(L)){E(N)?T.entangle?K(M,it(N,L)):L(N()):L(N);continue}}else v[B]=N;(q=T.onAutoPropsAssigned)==null||q.call(T)}return{componentCtx:v,head:T}},{componentCtx:me,head:_e}=J(),ge=[...Ee(D)],k=ge.length,pt=m.childNodes.length===0,O=x=>{let T=x.parentElement;if(pt){for(let N of[...x.childNodes])T.insertBefore(N,x);return}let v=x.name;X(v)&&(v=x.getAttributeNames().filter(N=>N.startsWith("#"))[0],X(v)?v="default":v=v.substring(1));let q=m.querySelector(`template[name='${v}'], template[\\#${v}]`);!q&&v==="default"&&(q=m.querySelector("template:not([name])"),q&&q.getAttributeNames().filter(N=>N.startsWith("#")).length>0&&(q=null));let B=N=>{_e.enableSwitch&&o.E(A,()=>{o.v(me);let L=b(x,o.M());o.E(A,()=>{o.v(L);let S=o.M(),P=Fn(S);for(let oe of N)Be(oe)&&(oe.setAttribute(ot,P),nn(P),K(oe,()=>{on(P)}))})})};if(q){let N=[...Ee(q)];for(let L of N)T.insertBefore(L,x);B(N)}else{if(v!=="default"){for(let L of[...Ee(x)])T.insertBefore(L,x);return}let N=[...Ee(m)].filter(L=>!he(L));for(let L of N)T.insertBefore(L,x);B(N)}},Q=x=>{if(!Be(x))return;let T=x.querySelectorAll("slot");if(Gn(x)){O(x),x.remove();return}for(let v of T)O(v),v.remove()};(()=>{for(let x=0;x<k;++x)ge[x]=ge[x].cloneNode(!0),y.insertBefore(ge[x],h),Q(ge[x])})(),W.insertBefore(V,h);let te=()=>{if(!C.inheritAttrs)return;let x=ge.filter(v=>v.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(v=>v.hasAttribute(this.me)));let T=x[0];if(T)for(let v of m.getAttributeNames()){if(v===ie||v===ee)continue;let q=m.getAttribute(v);if(v==="class")T.classList.add(...q.split(" "));else if(v==="style"){let B=T.style,N=m.style;for(let L of N)B.setProperty(L,N.getPropertyValue(L))}else T.setAttribute(Ct(v,n.o),q)}},be=()=>{for(let x of m.getAttributeNames())!x.startsWith("@")&&!x.startsWith(n.o.u.on)&&m.removeAttribute(x)},Se=()=>{te(),be(),o.v(me),n.be(m,!1),me.$emit=_e.emit,Me(n,ge),K(m,()=>{Ne(me)}),K(M,()=>{Te(m)}),vt(me)};o.E(A,Se)}}};var hn=class{constructor(e,n){d(this,"Q");d(this,"X");d(this,"xe",[]);this.Q=e,this.X=n}},Lt=class{constructor(e){d(this,"i");d(this,"Te");d(this,"Re");d(this,"Y");var o;this.i=e,this.Te=e.o.tt(),this.Y=new Map;let n=new Map;for(let r of this.Te){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Re=n}Ee(e){let n=this.Y.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);X(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,u=!1;for(let p=0;p<c.length;++p){let m=c[p];if(!l&&m==="camel"?l=!0:!u&&m==="prop"&&(u=!0),l&&u)break}l&&(a[a.length-1]=j(a[a.length-1])),u&&(a[0]=".");let f={terms:a,flags:c};return this.Y.set(e,f),f}ge(e,n){let o=new Map;if(!rt(e))return o;let r=this.Re,s=(c,l)=>{var f;let u=r.get((f=l[0])!=null?f:"");if(u)for(let p=0;p<u.length;++p){if(!l.startsWith(u[p]))continue;let m=o.get(l);if(!m){let y=this.Ee(l);m=new hn(y.terms,y.flags),o.set(l,m)}m.xe.push(c);return}},i=c=>{var u;let l=c.attributes;if(!(!l||l.length===0))for(let f=0;f<l.length;++f){let p=(u=l.item(f))==null?void 0:u.name;p&&s(c,p)}};if(i(e),!n||!e.firstElementChild)return o;let a=e.querySelectorAll("*");for(let c of a)i(c);return o}};var ro=()=>{},Cr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},It=class{constructor(e){d(this,"i");d(this,"L");d(this,"Ce");this.i=e,this.L=e.o.u.is,this.Ce=Ke(this.L)+", [is]"}N(e){let n=e.hasAttribute(this.L),o=Oe(e,this.Ce);for(let r of o)this.b(r);return n}b(e){let n=e.getAttribute(this.L);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.i.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.L),this.O(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),Fe(s,o),o.forEach(a=>{G(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}O(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.i.m.k(n),c=a.value,l=this.i.m,u=l.M(),f={name:""},p=he(e)?o:[...o[0].childNodes],m=()=>{l.E(u,()=>{var C;let g=c()[0];if(I(g)&&(g.name?g=g.name:g=(C=Object.entries(l.J()).filter(D=>D[1]===g)[0])==null?void 0:C[0]),!z(g)||X(g)){xe(s,i);return}if(f.name===g)return;xe(s,i);let R=document.createElement(g);for(let D of e.getAttributeNames())D!==this.L&&R.setAttribute(D,e.getAttribute(D));Cr(p,R),r.insertBefore(R,i),this.i.H(R),f.name=g})},y=ro;K(s,()=>{a.stop(),y(),y=ro}),m(),y=a.subscribe(m)}};var $=t=>{let e=t;return e!=null&&e[Y]===1?e():e};var Rr=(t,e)=>{let[n,o]=e;F(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},Dt={mount:()=>({update:({el:t,values:e})=>{Rr(t,e)}})};var Ut=class t{constructor(e){d(this,"Z");this.Z=e}static nt(e,n){var m,y;let o=e.m,r=e.o,s=r.u,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.P,c=o.J();if(Object.keys(c).length>0||r._.size>0)return;let l=e.j,u=[],f=0,p=[];for(let h=n.length-1;h>=0;--h)p.push(n[h]);for(;p.length>0;){let h=p.pop();if(h.nodeType===Node.ELEMENT_NODE){let R=h;if(R.tagName==="TEMPLATE"||R.tagName.includes("-"))return;let C=j(R.tagName).toUpperCase();if(r._.has(C)||c[C])return;let D=R.attributes;for(let W=0;W<D.length;++W){let M=(m=D.item(W))==null?void 0:m.name;if(!M)continue;if(i.has(M))return;let{terms:V,flags:ie}=l.Ee(M),[ee,U]=V,b=(y=a[M])!=null?y:a[ee];if(b){if(b===Dt)return;u.push({nodeIndex:f,attrName:M,directive:b,option:U,flags:ie})}}++f}let g=h.childNodes;for(let R=g.length-1;R>=0;--R)p.push(g[R])}if(u.length!==0)return new t(u)}b(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.Z.length;++s){let i=this.Z[s],a=o[i.nodeIndex];a&&e.b(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var vr=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},wr=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let u=o[o.length-1];if(u===void 0||t[u]<l){n[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},Bt=class{static ot(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,u=o.length,f=new Array(u),p=new Set;for(let b=0;b<u;++b){let A=r(o[b]);if(A===void 0||p.has(A))return;p.add(A),f[b]=A}let m=new Array(u),y=0,h=l-1,g=u-1;for(;y<=h&&y<=g;){let b=n[y];if(r(b.value)!==f[y]||!s(b.value,o[y]))break;b.value=o[y],m[y]=b,++y}for(;y<=h&&y<=g;){let b=n[h];if(r(b.value)!==f[g]||!s(b.value,o[g]))break;b.value=o[g],m[g]=b,--h,--g}if(y>h){for(let b=g;b>=y;--b){let A=b+1<u?m[b+1].items[0]:c;m[b]=i(b,o[b],A)}return m}if(y>g){for(let b=y;b<=h;++b)a(n[b]);return m}let R=y,C=y,D=g-C+1,W=new Array(D).fill(0),M=new Map;for(let b=C;b<=g;++b)M.set(f[b],b);let V=!1,ie=0;for(let b=R;b<=h;++b){let A=n[b],J=M.get(r(A.value));if(J===void 0){a(A);continue}if(!s(A.value,o[J])){a(A);continue}A.value=o[J],m[J]=A,W[J-C]=b+1,J>=ie?ie=J:V=!0}let ee=V?wr(W):[],U=ee.length-1;for(let b=D-1;b>=0;--b){let A=C+b,J=A+1<u?m[A+1].items[0]:c;if(W[b]===0){m[A]=i(A,o[A],J);continue}let me=m[A];V&&(U>=0&&ee[U]===b?--U:me&&vr(me,J))}return m}};var ct=class{constructor(e){d(this,"x",[]);d(this,"I",new Map);d(this,"ee");this.ee=e}get w(){return this.x.length}te(e){let n=this.ee(e.value);n!==void 0&&this.I.set(n,e)}ne(e){var o;let n=this.ee((o=this.x[e])==null?void 0:o.value);n!==void 0&&this.I.delete(n)}static rt(e,n){return{items:[],index:e,value:n,order:-1}}v(e){e.order=this.w,this.x.push(e),this.te(e)}st(e,n){let o=this.w;for(let r=e;r<o;++r)this.x[r].order=r+1;n.order=e,this.x.splice(e,0,n),this.te(n)}V(e){return this.x[e]}oe(e,n){this.ne(e),this.x[e]=n,this.te(n),n.order=e}ve(e){this.ne(e),this.x.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.x[o].order=o}we(e){let n=this.w;for(let o=e;o<n;++o)this.ne(o);this.x.splice(e)}$t(e){return this.I.has(e)}it(e){var o;let n=this.I.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var yn=Symbol("r-for"),Sr=t=>-1,so=()=>{},Ht=class Ht{constructor(e){d(this,"i");d(this,"T");d(this,"re");d(this,"R");this.i=e,this.T=e.o.u.for,this.re=Ke(this.T),this.R=e.o.u.pre}N(e){let n=e.hasAttribute(this.T),o=Oe(e,this.re);for(let r of o)this.at(r);return n}G(e){return e[yn]?!0:(e[yn]=!0,Oe(e,this.re).forEach(n=>n[yn]=!0),!1)}at(e){if(e.hasAttribute(this.R)||this.G(e))return;let n=e.getAttribute(this.T);if(!n){H(0,this.T,e);return}e.removeAttribute(this.T),this.ct(e,n)}Se(e){return le(e)?[]:(F(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))}ct(e,n){var pt;let o=this.pt(n);if(!(o!=null&&o.list)){H(1,this.T,n,e);return}let r=this.i.o.u.key,s=this.i.o.u.keyBind,i=(pt=e.getAttribute(r))!=null?pt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=Ut.nt(this.i,a),l=e.parentNode;if(!l)return;let u=`${this.T} => ${n}`,f=new Comment(`__begin__ ${u}`);l.insertBefore(f,e),Fe(f,a),a.forEach(O=>{G(O)}),e.remove();let p=new Comment(`__end__ ${u}`);l.insertBefore(p,f.nextSibling);let m=this.i,y=m.m,h=y.M(),R=h.length===1?[void 0,h[0]]:void 0,C=this.ut(i),D=(O,Q)=>C(O)===C(Q),W=(O,Q)=>O===Q,M=(O,Q,ne)=>{let te=o.createContext(Q,O),be=ct.rt(te.index,Q),Se=()=>{var q,B;let x=(B=(q=p.parentNode)!=null?q:f.parentNode)!=null?B:l,T=ne.previousSibling,v=[];for(let N=0;N<a.length;++N){let L=a[N].cloneNode(!0);x.insertBefore(L,ne),v.push(L)}for(c?c.b(m,v):Me(m,v),T=T.nextSibling;T!==ne;)be.items.push(T),T=T.nextSibling};return R?(R[0]=te.ctx,y.E(R,Se)):y.E(h,()=>{y.v(te.ctx),Se()}),be},V=(O,Q)=>{let ne=k.V(O).items,te=ne[ne.length-1].nextSibling;for(let be of ne)G(be);k.oe(O,M(O,Q,te))},ie=(O,Q)=>{k.v(M(O,Q,p))},ee=O=>{for(let Q of k.V(O).items)G(Q)},U=O=>{let Q=k.w;for(let ne=O;ne<Q;++ne)k.V(ne).index(ne)},b=O=>{let Q=f.parentNode,ne=p.parentNode;if(!Q||!ne)return;let te=k.w;F(O)&&(O=O());let be=$(O[0]);if(w(be)&&be.length===0){xe(f,p),k.we(0);return}let Se=[];for(let S of this.Se(O[0]))Se.push(S);let x=Bt.ot({oldItems:k.x,newValues:Se,getKey:C,isSameValue:W,mountNewValue:(S,P,oe)=>M(S,P,oe),removeMountItem:S=>{for(let P=0;P<S.items.length;++P)G(S.items[P])},endAnchor:p});if(x){k.x=x,k.I.clear();for(let S=0;S<x.length;++S){let P=x[S];P.order=S,P.index(S);let oe=C(P.value);oe!==void 0&&k.I.set(oe,P)}return}let T=0,v=Number.MAX_SAFE_INTEGER,q=te,B=this.i.o.forGrowThreshold,N=()=>k.w<q+B;for(let S of Se){let P=()=>{if(T<te){let oe=k.V(T++);if(D(oe.value,S)){if(W(oe.value,S))return;V(T-1,S);return}let Ie=k.it(C(S));if(Ie>=T&&Ie-T<10){if(--T,v=Math.min(v,T),ee(T),k.ve(T),--te,Ie>T+1)for(let je=T;je<Ie-1&&je<te&&!D(k.V(T).value,S);)++je,ee(T),k.ve(T),--te;P();return}N()?(k.st(T-1,M(T,S,k.V(T-1).items[0])),v=Math.min(v,T-1),++te):V(T-1,S)}else ie(T++,S)};P()}let L=T;for(te=k.w;T<te;)ee(T++);k.we(L),U(v)},A=()=>{J.stop(),_e(),_e=so},J=y.k(o.list),me=J.value,_e=so,ge=0,k=new ct(C);for(let O of this.Se(me()[0]))k.v(M(ge++,O,p));K(f,A),_e=J.subscribe(b)}pt(e){var c,l;let n=Ht.lt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,f)=>{let p={},m=$(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(m)){let h=0;for(let g of o)p[g]=m[h++]}else for(let h of o)p[h]=m[h];let y={ctx:p,index:Sr};return s&&(y.index=p[s.startsWith("#")?s.substring(1):s]=ae(f)),y}}}ut(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.ft(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=$(s),a=this.Ae(i,o);return a!==void 0||!r?a:this.Ae(i,r)}}return o=>{var r;return $((r=$(o))==null?void 0:r[n])}}ft(e){return e.split(".").filter(n=>n.length>0)}Ae(e,n){var r;let o=e;for(let s of n)o=(r=$(o))==null?void 0:r[s];return $(o)}};d(Ht,"lt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Pt=Ht;var Vt=class{constructor(e){d(this,"m");d(this,"Ne");d(this,"Oe");d(this,"ke");d(this,"Me");d(this,"j");d(this,"o");d(this,"R");d(this,"Le");this.m=e,this.o=e.o,this.Oe=new Pt(this),this.Ne=new Et(this),this.ke=new It(this),this.Me=new kt(this),this.j=new Lt(this),this.R=this.o.u.pre,this.Le=this.o.u.dynamic}mt(e){let n=he(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Me(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Ne.N(e)||this.Oe.N(e)||this.ke.N(e)||(this.Me.N(e),this.mt(e),this.be(e,!0))}be(e,n){var s;let o=this.j.ge(e,n),r=this.o.P;for(let[i,a]of o.entries()){let[c,l]=a.Q,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let f=a.xe;for(let p=0;p<f.length;++p){let m=f[p];this.b(u,m,i,!1,l,a.X)}}}b(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let u=l;for(;u;){let f=u.getAttribute(ot);if(f)return f;u=u.parentElement}return null};if(rn()){let l=c(n);if(l){this.m.E(zn(l),()=>{this.O(e,n,a,s,i)});return}}this.O(e,n,a,s,i)}dt(e,n,o){if(e!==Rt)return!1;if(X(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,K(i,()=>{G(n)}),r.appendChild(n)}return!0}O(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.dt(e,n,o))return;let i=this.yt(r,e.once),a=this.ht(e,o),c=this.gt(a,i);K(n,c.stop);let l=this.bt(n,o,a,i,r,s),u=this.xt(e,l,c);if(!u)return;let f=this.Tt(l,a,i,r,u);f(),e.once||(c.result=a.subscribe(f),i&&(c.dynamic=i.subscribe(f)))}yt(e,n){let o=Qn(e,this.Le);if(o)return this.m.k(j(o),void 0,void 0,void 0,n)}ht(e,n){return this.m.k(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}gt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}bt(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}xt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Tt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var io="http://www.w3.org/1999/xlink",Ar={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 Nr(t){return!!t||t===""}var Or=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=j(o)),_t(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let u=(a=n==null?void 0:n[c])==null?void 0:a[0],f=l[0],p=l[1];_t(t,f,p,u)}else if(I(l))for(let u of Object.entries(l)){let f=u[0],p=u[1],m=n==null?void 0:n[c],y=m&&f in m?f:void 0;_t(t,f,p,y)}else{let u=n==null?void 0:n[c],f=e[c++],p=e[c];_t(t,f,p,u)}}},gn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Or(t,e,n,o,r,s)}})},_t=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),le(e)){H(3,"r-bind",t);return}if(!z(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){le(n)?t.removeAttributeNS(io,e.slice(6,e.length)):t.setAttributeNS(io,e,n);return}let r=e in Ar;le(n)||r&&!Nr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Mr=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)ao(t,s[c],i==null?void 0:i[c])}else ao(t,s,i)}},bn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Mr(t,e,n)}})},ao=(t,e,n)=>{let o=t.classList,r=z(e),s=z(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+/))};function kr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Re(t[o],e[o]);return n}function Re(t,e){if(t===e)return!0;let n=Zt(t),o=Zt(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=tt(t),o=tt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?kr(t,e):!1;if(n=I(t),o=I(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=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Re(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function jt(t,e){return t.findIndex(n=>Re(n,e))}var co=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Tn=t=>{if(!E(t))throw _(3,"pause");t(void 0,void 0,3)};var xn=t=>{if(!E(t))throw _(3,"resume");t(void 0,void 0,4)};var lo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{Lr(t,o[0])},unmount:Ir(t,e,n)})},Lr=(t,e)=>{let n=ho(t);if(n&&fo(t))w(e)?e=jt(e,ve(t))>-1:ue(e)?e=e.has(ve(t)):e=Vr(t,e),t.checked=e;else if(n&&po(t))t.checked=Re(e,ve(t));else if(n||yo(t))mo(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(go(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=ve(a);if(s)w(e)?a.selected=jt(e,c)>-1:a.selected=e.has(c);else if(Re(ve(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},ut=t=>(E(t)&&(t=t()),F(t)&&(t=t()),t?z(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}),fo=t=>t.type==="checkbox",po=t=>t.type==="radio",mo=t=>t.type==="number"||t.type==="range",ho=t=>t.tagName==="INPUT",yo=t=>t.tagName==="TEXTAREA",go=t=>t.tagName==="SELECT",Ir=(t,e,n)=>{let o=e.value,r=ut(n==null?void 0:n.join(",")),s=ut(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,t),()=>{};let a=()=>e.refs[0],c=ho(t);return c&&fo(t)?Ur(t,a):c&&po(t)?_r(t,a):c||yo(t)?Dr(t,i,a,o):go(t)?jr(t,a,o):(H(7,t),()=>{})},uo=/[.,' ·٫]/,Dr=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=mo(t),a=()=>{!e.trim&&!ut(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let m=p.target;m.composing=1},l=p=>{let m=p.target;m.composing&&(m.composing=0,m.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,f),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},f=p=>{let m=n();if(!m)return;let y=p.target;if(!y||y.composing)return;let h=y.value,g=ut(o()[1]);if(i||g.number||g.int){if(g.int)h=parseInt(h);else{if(uo.test(h[h.length-1])&&h.split(uo).length===2){if(h+="0",h=parseFloat(h),isNaN(h))h="";else if(m()===h)return}h=parseFloat(h)}isNaN(h)&&(h=""),t.value=h}else g.trim&&(h=h.trim());m(h)};return t.addEventListener(s,f),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),u},Ur=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ve(t),a=t.checked,c=s();if(w(c)){let l=jt(c,i),u=l!==-1;a&&!u?c.push(i):!a&&u&&c.splice(l,1)}else ue(c)?a?c.add(i):c.delete(i):s(Hr(t,a))};return t.addEventListener(n,r),o},ve=t=>"_value"in t?t._value:t.value,bo="trueValue",Br="falseValue",To="true-value",Pr="false-value",Hr=(t,e)=>{let n=e?bo:Br;if(n in t)return t[n];let o=e?To:Pr;return t.hasAttribute(o)?t.getAttribute(o):e},Vr=(t,e)=>{if(bo in t)return Re(e,t.trueValue);let o=To;return t.hasAttribute(o)?Re(e,t.getAttribute(o)):Re(e,!0)},_r=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ve(t);s(i)};return t.addEventListener(n,r),o},jr=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=ut(n()[1]).number,l=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?co(ve(u)):ve(u));if(t.multiple){let u=i();try{if(Tn(i),ue(u)){u.clear();for(let f of l)u.add(f)}else w(u)?(u.splice(0),u.push(...l)):i(l)}finally{xn(i),Z(i)}}else i(l[0])};return t.addEventListener(o,s),r};var $r=["stop","prevent","capture","self","once","left","right","middle","passive"],qr=t=>{let e={};if(X(t))return;let n=t.split(",");for(let o of $r)e[o]=n.includes(o);return e},Fr=(t,e,n,o,r)=>{var l,u;if(o){let f=e.value(),p=$(o.value()[0]);return z(p)?En(t,j(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:f[1]):()=>{}}else if(n){let f=e.value();return En(t,j(n),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:f[1])}let s=[],i=()=>{s.forEach(f=>f())},a=e.value(),c=a.length;for(let f=0;f<c;++f){let p=a[f];if(F(p)&&(p=p()),I(p))for(let m of Object.entries(p)){let y=m[0],h=()=>{let R=e.value()[f];return F(R)&&(R=R()),R=R[y],F(R)&&(R=R()),R},g=p[y+"_flags"];s.push(En(t,y,h,g))}else H(2,"r-on",t)}return i},Cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>Fr(t,e,n,o,r)},zr=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...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=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},En=(t,e,n,o)=>{if(X(e))return H(5,"r-on",t),()=>{};let r=qr(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=zr(e,o);let a=u=>{if(!i(u)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let f=n(u);F(f)&&(f=f(u)),F(f)&&f(u)},c=()=>{t.removeEventListener(e,l,s)},l=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Kr=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=j(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(t,a,c)}else if(I(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];Xe(t,c,l)}else{let a=e[s++],c=e[s];Xe(t,a,c)}}},xo={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Kr(t,e,n,o)}})};function Wr(t){return!!t||t===""}var Xe=(t,e,n)=>{if(le(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Te),1),t[e]=n!=null?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!=null?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=Wr(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var Eo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Gr=(t,e)=>{let n=Ue(t).data,o=n._ord;Hn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},Co={mount:()=>({update:({el:t,values:e})=>{Gr(t,e)}})};var Jr=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Ro(t,s[c],i==null?void 0:i[c])}else Ro(t,s,i)}},$t={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Jr(t,e,n)}})},Ro=(t,e,n)=>{let o=t.style,r=z(e);if(e&&!r){if(n&&!z(n))for(let s in n)e[s]==null&&vn(o,s,"");for(let s in e)vn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;o.display=s}},vo=/\s*!important$/;function vn(t,e,n){if(w(n))n.forEach(o=>{vn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Qr(t,e);vo.test(n)?t.setProperty(We(o),n.replace(vo,""),"important"):t[o]=n}}var wo=["Webkit","Moz","ms"],Rn={};function Qr(t,e){let n=Rn[e];if(n)return n;let o=j(e);if(o!=="filter"&&o in t)return Rn[e]=o;o=st(o);for(let r=0;r<wo.length;r++){let s=wo[r]+o;if(s in t)return Rn[e]=s}return e}var ce=t=>So($(t)),So=(t,e=new WeakMap)=>{if(!t||!I(t))return t;if(w(t))return t.map(ce);if(ue(t)){let o=new Set;for(let r of t.keys())o.add(ce(r));return o}if(Ae(t)){let o=new Map;for(let r of t)o.set(ce(r[0]),ce(r[1]));return o}if(e.has(t))return $(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=So($(o[1]),e);return n};var Xr=(t,e)=>{var o;let n=e[0];t.textContent=ue(n)?JSON.stringify(ce([...n])):Ae(n)?JSON.stringify(ce([...n])):I(n)?JSON.stringify(ce(n)):(o=n==null?void 0:n.toString())!=null?o:""},Ao={mount:()=>({update:({el:t,values:e})=>{Xr(t,e)}})};var No={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var Le=class Le{constructor(e){d(this,"P",{});d(this,"u",{});d(this,"tt",()=>Object.keys(this.P).filter(e=>e.length===1||!e.startsWith(":")));d(this,"he",new Map);d(this,"_",new Map);d(this,"forGrowThreshold",10);d(this,"globalContext");d(this,"useInterpolation",!0);if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.Et()}static getDefault(){var e;return(e=Le.Ie)!=null?e:Le.Ie=new Le}Et(){let e={},n=globalThis;for(let o of Le.Rt.split(","))e[o]=n[o];return e.ref=Ce,e.sref=ae,e.flatten=ce,e}addComponent(...e){for(let n of e){if(!n.defaultName){gt.warning("Registered component's default name is not defined",n);continue}this.he.set(st(n.defaultName),n),this._.set(st(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.P={".":xo,":":gn,"@":Cn,[`${e}on`]:Cn,[`${e}bind`]:gn,[`${e}html`]:Dt,[`${e}text`]:Ao,[`${e}show`]:Co,[`${e}model`]:lo,":style":$t,[`${e}style`]:$t,[`${e}bind:style`]:$t,":class":bn,[`${e}bind:class`]:bn,":ref":Eo,":value":No,[`${e}teleport`]:Rt},this.u={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.P,this.u)}};d(Le,"Ie"),d(Le,"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");var pe=Le;var qt=(t,e)=>{if(!t)return;let o=(e!=null?e:pe.getDefault()).u,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Zr(t,o.pre,s))Yr(i,o.text,r,s)},Yr=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],u=Oo(l,o);if(u&&X(i[0])&&X(i[2])){let f=t.parentElement;f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),f.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let u=Oo(l,o);if(u){let f=document.createElement("span");f.setAttribute(e,l.substring(u.start.length,l.length-u.end.length)),a.appendChild(f)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Zr=(t,e,n)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Ee(s))r(a)}};return r(t),o},Oo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var es=9,ts=10,ns=13,os=32,we=46,Ft=44,rs=39,ss=34,zt=40,Ye=41,Kt=91,wn=93,Sn=63,is=59,Mo=58,ko=123,Wt=125,He=43,Gt=45,An=96,Lo=47,Nn=92,Io=new Set([2,3]),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},as={"=>":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},_o=Object.keys(Vo),cs=new Set(_o),Mn=new Set(["=>"]);_o.forEach(t=>Mn.add(t));var Do={true:!0,false:!1,null:null},us="this",Ze="Expected ",Ve="Unexpected ",Ln="Unclosed ",ls=Ze+":",Uo=Ze+"expression",fs="missing }",ps=Ve+"object property",ms=Ln+"(",Bo=Ze+"comma",Po=Ve+"token ",ds=Ve+"period",On=Ze+"expression after ",hs="missing unaryOp argument",ys=Ln+"[",gs=Ze+"exponent (",bs="Variable names cannot start with a number (",Ts=Ln+'quote after "',lt=t=>t>=48&&t<=57,Ho=t=>as[t],kn=class{constructor(e){d(this,"p");d(this,"e");this.p=e,this.e=0}get B(){return this.p.charAt(this.e)}get y(){return this.p.charCodeAt(this.e)}f(e){return this.p.charCodeAt(this.e)===e}$(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}se(e){return this.$(e)||lt(e)}r(e){return new Error(`${e} at character ${this.e}`)}h(){let e=this.y,n=this.p,o=this.e;for(;e===os||e===es||e===ts||e===ns;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.ie();return e.length===1?e[0]:{type:0,body:e}}ie(e){let n=[];for(;this.e<this.p.length;){let o=this.y;if(o===is||o===Ft)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.p.length){if(o===e)break;throw this.r(Ve+'"'+this.B+'"')}}}return n}S(){var n;let e=(n=this.Ct())!=null?n:this.Ve();return this.h(),this.vt(e)}ae(){this.h();let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.se(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}Ve(){let e,n,o,r,s,i,a,c;if(s=this.q(),!s||(n=this.ae(),!n))return s;if(r={value:n,prec:Ho(n),right_a:Mn.has(n)},i=this.q(),!i)throw this.r(On+n);let l=[s,r,i];for(;n=this.ae();){o=Ho(n),r={value:n,prec:o,right_a:Mn.has(n)},c=n;let u=f=>r.right_a&&f.right_a?o>f.prec:o<=f.prec;for(;l.length>2&&u(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this.De(n,s,i),l.push(e);if(e=this.q(),!e)throw this.r(On+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this.De(l[a-1].value,l[a-2],e),a-=2;return e}q(){let e;if(this.h(),e=this.wt(),e)return this.ce(e);let n=this.y;if(lt(n)||n===we)return this.St();if(n===rs||n===ss)e=this.At();else if(n===Kt)e=this.Nt();else{let o=this.Ot();if(o){let r=this.q();if(!r)throw this.r(hs);return this.ce({type:7,operator:o,argument:r})}this.$(n)?(e=this.pe(),e.name in Do?e={type:4,value:Do[e.name],raw:e.name}:e.name===us&&(e={type:5})):n===zt&&(e=this.kt())}return e?(e=this.F(e),this.ce(e)):!1}De(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return cs.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}wt(){let e={node:!1};return this.Mt(e),e.node||(this.Lt(e),e.node)||(this.It(e),e.node)||(this.Ue(e),e.node)||this.Vt(e),e.node}ce(e){let n={node:e};return this.Dt(n),this.Ut(n),this.Pt(n),n.node}Ot(){let e=this.p,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===Gt?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===He?(this.e++,"+"):o===110&&r===101&&s===119&&!this.se(i)?(this.e+=3,"new"):!1}Ct(){let e={};return this.Bt(e),e.node}vt(e){let n={node:e};return this.Ht(n),n.node}F(e){this.h();let n=this.y;for(;n===we||n===Kt||n===zt||n===Sn;){let o;if(n===Sn){if(this.p.charCodeAt(this.e+1)!==we)break;o=!0,this.e+=2,this.h(),n=this.y}if(this.e++,n===Kt){if(e={type:3,computed:!0,object:e,property:this.S()},this.h(),n=this.y,n!==wn)throw this.r(ys);this.e++}else n===zt?e={type:6,arguments:this.Pe(Ye),callee:e}:(o&&this.e--,this.h(),e={type:3,computed:!1,object:e,property:this.pe()});o&&(e.optional=!0),this.h(),n=this.y}return e}St(){let e=this.p,n=this.e,o=n;for(;lt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===we)for(o++;lt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===He||a===Gt)&&o++;let c=o;for(;lt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.r(gs+l+this.B+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.$(i))throw this.r(bs+s+this.B+")");if(i===we||s.length===1&&s.charCodeAt(0)===we)throw this.r(ds);return{type:4,value:parseFloat(s),raw:s}}At(){let e=this.p,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let f=e.charCodeAt(s);if(f===r){l=!0,this.e=s+1;break}if(f===Nn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Be(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.r(Ts+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Be(e){switch(e){case 110:return`
|
|
2
|
+
`;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}pe(){let e=this.y,n=this.e;if(this.$(e))this.e++;else throw this.r(Ve+this.B);for(;this.e<this.p.length&&(e=this.y,this.se(e));)this.e++;return{type:2,name:this.p.slice(n,this.e)}}Pe(e){let n=[],o=!1,r=0;for(;this.e<this.p.length;){this.h();let s=this.y;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.r(Po+String.fromCharCode(e));break}else if(s===Ft){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.r(Po+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.r(Bo);{let i=this.S();if(!i||i.type===0)throw this.r(Bo);n.push(i)}}}if(!o)throw this.r(Ze+String.fromCharCode(e));return n}kt(){this.e++;let e=this.ie(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.r(ms)}Nt(){return this.e++,{type:9,elements:this.Pe(wn)}}Mt(e){if(this.f(ko)){this.e++;let n=[];for(;!isNaN(this.y);){if(this.h(),this.f(Wt)){this.e++,e.node=this.F({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.h(),o.type===2&&(this.f(Ft)||this.f(Wt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Mo)){this.e++;let r=this.S();if(!r)throw this.r(ps);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.h()}else n.push(o);this.f(Ft)&&this.e++}throw this.r(fs)}}Lt(e){let n=this.y;if((n===He||n===Gt)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===He?"++":"--",argument:this.F(this.pe()),prefix:!0};if(!o.argument||!Io.has(o.argument.type))throw this.r(Ve+o.operator)}}Ut(e){let n=e.node,o=this.y;if((o===He||o===Gt)&&o===this.p.charCodeAt(this.e+1)){if(!Io.has(n.type))throw this.r(Ve+(o===He?"++":"--"));this.e+=2,e.node={type:13,operator:o===He?"++":"--",argument:n,prefix:!1}}}It(e){this.p.charCodeAt(this.e)===we&&this.p.charCodeAt(this.e+1)===we&&this.p.charCodeAt(this.e+2)===we&&(this.e+=3,e.node={type:14,argument:this.S()})}Ht(e){if(e.node&&this.f(Sn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.r(Uo);if(this.h(),this.f(Mo)){this.e++;let r=this.S();if(!r)throw this.r(Uo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.r(ls)}}Bt(e){if(this.h(),this.f(zt)){let n=this.e;if(this.e++,this.h(),this.f(Ye)){this.e++;let o=this.ae();if(o==="=>"){let r=this.Ve();if(!r)throw this.r(On+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Pt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(An)&&(e.node={type:17,tag:n,quasi:this.Ue(e)})}Ue(e){if(!this.f(An))return;let n=this.p,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=u=>{if(!c){let m=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:m,cooked:m},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:f,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===An)return l(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===ko){if(l(!1),this.e+=2,r.expressions.push(...this.ie(Wt)),!this.f(Wt))throw this.r("unclosed ${");this.e+=1,s=this.e}else if(u===Nn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let f=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Be(f)),this.e+=2,s=this.e}else this.e+=1}throw this.r("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.r("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}Vt(e){if(!this.f(Lo))return;let n=++this.e,o=!1;for(;this.e<this.p.length;){if(this.y===Lo&&!o){let r=this.p.slice(n,this.e),s="";for(;++this.e<this.p.length;){let a=this.y;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.B;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.r(a.message)}return e.node={type:4,value:i,raw:this.p.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.f(Kt)?o=!0:o&&this.f(wn)&&(o=!1),this.e+=this.f(Nn)?2:1}throw this.r("Unclosed Regex")}},jo=t=>new kn(t).parse();var xs={"=>":(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)=>{var n;return(n=t())!=null?n: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},Es={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},zo=t=>{if(!(t!=null&&t.some(Fo)))return t;let e=[];return t.forEach(n=>Fo(n)?e.push(...n):e.push(n)),e},$o=(...t)=>zo(t),In=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Cs={"++":(t,e)=>{let n=t[e];if(E(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(E(n)){let o=n();return n(--o),o}return--t[e]}},Rs={"++":(t,e)=>{let n=t[e];if(E(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(E(n)){let o=n();return n(o-1),o}return t[e]--}},qo={"=":(t,e,n)=>{let o=t[e];return E(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return E(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return E(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return E(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return E(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return E(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return E(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return E(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return E(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return E(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return E(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return E(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return E(o)?o(o()^n):t[e]^=n}},Jt=(t,e)=>F(t)?t.bind(e):t,Dn=class{constructor(e,n,o,r,s){d(this,"l");d(this,"He");d(this,"_e");d(this,"je");d(this,"A");d(this,"$e");d(this,"qe");this.l=w(e)?e:[e],this.He=n,this._e=o,this.je=r,this.qe=!!s}Fe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],Jt($(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],Jt($(i[r]),i);let s=this.He;if(s&&r in s)return this.A=s[r],Jt($(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ke(n,o,$o,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ue(e,n,o),i=r==null?void 0:r[s];return this.A=i,Jt($(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>F(i)?i(...zo(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,Es[e.operator],e.argument)}8(e,n,o){let r=xs[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,n,o),()=>this.g(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ke(++n,o,$o,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.g(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var u;let r={},s=f=>(f==null?void 0:f.type)!==15,i=(u=this.je)!=null?u:()=>!1,a=n===0&&this.qe,c=f=>this.ze(a,e.key,n,In(f,o)),l=f=>this.ze(a,e.value,n,In(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=$(c());r[f]=s(e.value)&&i(f,n)?l:l()}else{let f=e.key.type===4?e.key.value:e.key.name;r[f]=s(e.value)&&i(f,n)?()=>l:l()}return r}ue(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?Cs:Rs;if(r.type===2){let a=r.name,c=this.Fe(a,o);return le(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ue(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.Fe(i,o);if(le(a))return;let c=this.g(e.right,n,o);return qo[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ue(r,n,o),c=this.g(e.right,n,o);return qo[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return w(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.C(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.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,n,s)}}g(e,n,o){let r=$(this[e.type](e,n,o));return this.$e=e.type,r}ze(e,n,o,r){let s=this.g(n,o,r);return e&&this.We()?this.A:s}We(){let e=this.$e;return(e===2||e===3||e===6)&&E(this.A)}eval(e,n){let{value:o,refs:r}=mn(()=>this.g(e,-1,n)),s={value:o,refs:r};return this.We()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.g(i,e,n));return o(...s)}Ke(e,n,o,...r){let s=this._e;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.g(a,e,In(l,n)):this.g(a,e,n)));return o(...i)}},Ko=Symbol("s"),Fo=t=>(t==null?void 0:t.s)===Ko,Wo=(t,e,n,o,r,s,i)=>new Dn(e,n,o,r,i).eval(t,s);var Go={},Jo=t=>!!t,Qt=class{constructor(e,n){d(this,"l");d(this,"o");d(this,"Ge",[]);this.l=e,this.o=n}v(e){this.l=[e,...this.l]}J(){return this.l.map(n=>n.components).filter(Jo).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}et(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(Jo).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}k(e,n,o,r,s){var R;let i=[],a=[],c=new Set,l=()=>{for(let C=0;C<a.length;++C)a[C]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(C,D)=>(c.add(C),D&&C(i),()=>{c.delete(C)}),refs:[],context:this.l[0]};if(X(e))return p;let m=this.o.globalContext,y=[],h=new Set,g=(C,D,W,M)=>{try{let V=Wo(C,D,m,n,o,M,r);return W&&V.refs.length>0&&y.push(...V.refs),{value:V.value,refs:V.refs,ref:V.ref}}catch(V){H(6,`evaluation error: ${e}`,V)}return{value:void 0,refs:[]}};try{let C=(R=Go[e])!=null?R:jo("["+e+"]");Go[e]=C;let D=this.l.slice(),W=C.elements,M=W.length,V=new Array(M);p.refs=V;let ie=()=>{y.length=0,s||(h.clear(),l());let ee=new Array(M);for(let U=0;U<M;++U){let b=W[U];if(n!=null&&n(U,-1)){ee[U]=J=>g(b,D,!1,{$event:J}).value;continue}let A=g(b,D,!0);ee[U]=A.value,V[U]=A.ref}if(!s)for(let U of y)h.has(U)||(h.add(U),a.push(se(U,ie)));if(i=ee,c.size!==0)for(let U of c)c.has(U)&&U(i)};ie()}catch(C){H(6,`parse error: ${e}`,C)}return p}M(){return this.l.slice()}oe(e){this.Ge.push(this.l),this.l=e}E(e,n){try{this.oe(e),n()}finally{this._t()}}_t(){var e;this.l=(e=this.Ge.pop())!=null?e:[]}};var Qo=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},vs=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},ws=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
+
`);)++n;if(n>=t.length||!Qo(t[n]))return null;let o=n;for(;n<t.length&&Qo(t[n]);)++n;return{start:o,end:n}},Xo=new Set(["table","thead","tbody","tfoot"]),Ss=new Set(["thead","tbody","tfoot"]),As=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Xt=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let g=t.indexOf("-->",i+4);if(g===-1){n.push(t.slice(i));break}n.push(t.slice(i,g+3)),e=g+3;continue}let a=vs(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let f=ws(c,l);if(!f){n.push(c),e=a+1;continue}let p=c.slice(f.start,f.end);if(l){let g=o[o.length-1];g?(o.pop(),n.push(g.replacementHost?`</${g.replacementHost}>`:c),Xo.has(g.effectiveTag)&&--r):n.push(c),e=a+1;continue}let m=c.charCodeAt(c.length-2)===47,y=o[o.length-1],h=null;if(r===0?p==="tr"?h="trx":p==="td"?h="tdx":p==="th"&&(h="thx"):Ss.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=p==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=As.has(p)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(h=p==="td"||p==="th"?null:"td"),h){let g=h==="trx"||h==="tdx"||h==="thx";n.push(`${c.slice(0,f.start)}${h} is="${g?`r-${p}`:`regor:${p}`}"${c.slice(f.end)}`)}else m&&(y==null?void 0:y.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${p}>`):n.push(c);if(!m){let g=h==="trx"?"tr":h==="tdx"?"td":h==="thx"?"th":h||p;o.push({replacementHost:h,effectiveTag:g}),Xo.has(g)&&++r}e=a+1}return n.join("")};var Ns="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",Os=new Set(Ns.toUpperCase().split(",")),Ms="http://www.w3.org/2000/svg",Yo=(t,e)=>{he(t)?t.content.appendChild(e):t.appendChild(e)},Un=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&Os.has(r.toUpperCase())?document.createElementNS(Ms,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let u of Object.entries(c)){let f=u[0],p=u[1];f.startsWith("#")&&(p=f.substring(1),f="name"),a.setAttribute(Ct(f,o),p)}let l=t.c;if(l)for(let u of l)Un(u,a,n,o);Yo(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Yo(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n!=null||(n=pe.getDefault());let o=document.createDocumentFragment();if(!w(t))return Un(t,o,!!e,n),o;for(let r of t)Un(r,o,!!e,n);return o};var ks=(t,e={selector:"#app"},n)=>{z(e)&&(e={selector:"#app",template:e}),Xn(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Be(o))throw _(0);n||(n=pe.getDefault());let r=()=>{for(let a of[...o.childNodes])G(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Xt(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=et(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&qt(o,n),new Bn(t,o,n).b(),K(o,()=>{Ne(t)}),vt(t),{context:t,unmount:()=>{G(o)},unbind:()=>{Te(o)}}},Bn=class{constructor(e,n,o){d(this,"jt");d(this,"Je");d(this,"o");d(this,"m");d(this,"i");this.jt=e,this.Je=n,this.o=o,this.m=new Qt([e],o),this.i=new Vt(this.m)}b(){this.i.H(this.Je)}};var ft=t=>{if(w(t))return t.map(r=>ft(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=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=Ee(t);return o.length>0&&(e.c=[...o].map(r=>ft(r))),e};var Ls=(t,e={})=>{var s,i,a,c,l,u;w(e)&&(e={props:e}),z(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!1;if(t.element){let f=t.element;f.remove(),t.element=f}else if(t.selector){let f=document.querySelector(t.selector);if(!f)throw _(1,t.selector);f.remove(),t.element=f}else if(t.template){let f=document.createRange().createContextualFragment(Xt(t.template));t.element=f}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&qt(t.element,(a=e.config)!=null?a:pe.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:rt(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||rt(r)&&r.querySelector("[isSVG]"))){let f=r.content,p=f?[...f.childNodes]:[...r.childNodes],m=ft(p);t.element=et(m,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var Is=t=>{var e;(e=De())==null||e.onMounted.push(t)};var Ds=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw _(4);return e&&!n.isStopped?e(...r):(e=Us(t,n),e(...r))};return o[Y]=1,ke(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},Us=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ae(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,Z(n);return}n(t()),++o});return n.stop=r,n};var Bs=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Ps(t,e,n),o(...s))};return r[Y]=1,ke(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Ps=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ae(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}let l=t.map(u=>u());o(e(...l)),++r},i=[];for(let c of t){let l=se(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Hs=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Vs(t,e,n),o(...s))};return r[Y]=1,ke(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Vs=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ae(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=se(t,i=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}o(e(i)),++r},!0),o};var _s=t=>(t[St]=1,t);var js=(t,e)=>{if(!e)throw _(5);let o=Ge(t)?Ce:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ce(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Je(r);return re(i,!0),t};var Zo=(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},$s=Zo;var qs=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(se(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Fs=t=>{if(!E(t))throw _(3,"observerCount");return t(void 0,void 0,2)};var zs=t=>{er();try{t()}finally{tr()}},er=()=>{ye.stack||(ye.stack=[]),ye.stack.push(new Set)},tr=()=>{let t=ye.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 ye.stack;for(let n of e)try{Z(n)}catch(o){console.error(o)}};export{nt as ComponentHead,pe as RegorConfig,K as addUnbinder,zs as batch,mn as collectRefs,Bs as computeMany,Hs as computeRef,Ds as computed,ks as createApp,Ls as createComponent,sr as drainUnbind,tr as endBatch,it as entangle,ce as flatten,Ue as getBindData,Zo as html,Ge as isDeepRef,at as isRaw,E as isRef,_s as markRaw,se as observe,qs as observeMany,Fs as observerCount,Is as onMounted,re as onUnmounted,Tn as pause,js as persist,$s as raw,Ce as ref,G as removeNode,xn as resume,pn as silence,ae as sref,er as startBatch,et as toFragment,ft as toJsonTemplate,Z as trigger,Te as unbind,$ as unref,ln as useScope,gt as warningHandler,Je as watchEffect};
|