regor 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/regor.d.ts +253 -21
- package/dist/regor.es2015.cjs.js +120 -54
- package/dist/regor.es2015.cjs.prod.js +3 -3
- package/dist/regor.es2015.esm.js +120 -54
- package/dist/regor.es2015.esm.prod.js +3 -3
- package/dist/regor.es2015.iife.js +120 -54
- package/dist/regor.es2015.iife.prod.js +3 -3
- package/dist/regor.es2019.cjs.js +120 -54
- package/dist/regor.es2019.cjs.prod.js +3 -3
- package/dist/regor.es2019.esm.js +120 -54
- package/dist/regor.es2019.esm.prod.js +3 -3
- package/dist/regor.es2019.iife.js +120 -54
- package/dist/regor.es2019.iife.prod.js +3 -3
- package/dist/regor.es2022.cjs.js +120 -54
- package/dist/regor.es2022.cjs.prod.js +3 -3
- package/dist/regor.es2022.esm.js +120 -54
- package/dist/regor.es2022.esm.prod.js +3 -3
- package/dist/regor.es2022.iife.js +120 -54
- package/dist/regor.es2022.iife.prod.js +3 -3
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var Xr=Object.defineProperty;var Yr=(t,e,n)=>e in t?Xr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var d=(t,e,n)=>Yr(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();Zr(n);for(let r=n.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Zr=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))},eo=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",se=t=>t==null||typeof t=="undefined",K=t=>typeof t!="string"||!(t!=null&&t.trim()),to=Object.prototype.toString,Kt=t=>to.call(t),we=t=>Kt(t)==="[object Map]",oe=t=>Kt(t)==="[object Set]",Wt=t=>Kt(t)==="[object Date]",Ye=t=>typeof t=="symbol",R=Array.isArray,A=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."},U=(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 U(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 Oe=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,"pe");d(this,"emit",(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.pe=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)Oe(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",no=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=no(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)}Ne(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}}ce(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.ce(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 S of y)!b&&S.isTrue()?(S.isMounted||(S.mount(),S.isMounted=!0),b=!0):(S.unmount(),S.isMounted=!1)}})},y=this.ce(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=fe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n==null?void 0:n.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Ne=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(qn(r)||t.P(r))}},Ae=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},fe=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=>fe(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()},ro=function(t){return this(t)},oo=()=>{throw new Error("value is readonly.")},so={get:zn,set:ro,enumerable:!0,configurable:!1},io={get:zn,set:oo,enumerable:!0,configurable:!1},Me=(t,e)=>{Object.defineProperty(t,"value",e?io:so)},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))},ao=/-(\w)/g,$=tn(t=>t&&t.replace(ao,(e,n)=>n?n.toUpperCase():"")),co=/\B([A-Z])/g,qe=tn(t=>t&&t.replace(co,"-$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:()=>Oe(e),[nn]:1};return n[nn]=1,n}finally{Hn()}},Wn=t=>A(t)?nn in t:!1;var ee=(t,e)=>{var n;(n=ke(e))==null||n.onUnmounted.push(t)};var Rt=Symbol("ref"),J=Symbol("sref"),xt=Symbol("raw");var T=t=>t!=null&&t[J]===1;var W=(t,e,n,r=!0)=>{if(!T(t))throw U(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&ee(s,!0),s};var Gn={collectRefObj:!0,onBind:(t,e)=>W(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(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 Jn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(T(c)?c(a):r[i]=a)}return()=>{}}};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[xt]===1;var Fe=t=>(t==null?void 0:t[Rt])===1;var ie=[],Qn=t=>{var e;ie.length!==0&&((e=ie[ie.length-1])==null||e.add(t))},ze=t=>{if(!t)return()=>{};let e={stop:()=>{}};return po(t,e),ee(()=>e.stop(),!0),e.stop},po=(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(ie.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{ie.pop()}},on=t=>{let e=ie.length,n=e>0&&ie[e-1];try{return n&&ie.push(null),t()}finally{n&&ie.pop()}},sn=t=>{try{let e=new Set;return ie.push(e),{value:t(),refs:[...e]}}finally{ie.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(R(o)||oe(o))for(let s of o)Q(s,e,!0);else if(we(o))for(let s of o)Q(s[0],e,!0),Q(s[1],e,!0);if(A(o))for(let s in o)Q(o[s],e,!0)}};function fo(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];fo(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 Xn=Array.prototype,an=Object.create(Xn),uo=["push","pop","shift","unshift","splice","sort","reverse"];Ke(Xn,an,uo);var Yn=Map.prototype,St=Object.create(Yn),lo=["set","clear","delete"];vt(St,"Map");Ke(Yn,St,lo);var Zn=Set.prototype,wt=Object.create(Zn),mo=["add","clear","delete"];vt(wt,"Set");Ke(Zn,wt,mo);var ue={},te=t=>{if(T(t)||ot(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?J in c?!0:R(c)?(Object.setPrototypeOf(c,an),!0):oe(c)?(Object.setPrototypeOf(c,wt),!0):we(c)?(Object.setPrototypeOf(c,St),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(ue.stack&&ue.stack.length){ue.stack[ue.stack.length-1].add(a);return}o.size!==0&&on(()=>{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):(Qn(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,Me(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[Rt]=1,R(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(!A(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 er=Symbol("modelBridge"),Ot=()=>{},ho=t=>!!(t!=null&&t[er]),yo=t=>{t[er]=1},go=t=>{let e=Te(t());return yo(e),e},tr={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return Ot;let i=$(r),a,c,p=Ot,f=()=>{p(),p=Ot,a=void 0,c=void 0},u=()=>{p(),p=Ot},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(ho(y)){if(C===y)return;T(C)?l(y,C):h[i]=y;return}c||(c=go(y)),h[i]=c,l(y,c)},!0);return()=>{p(),m()}}};var At=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 S=b.template;if(!S)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 ce=n.r.l.props,xe=n.r.l.propsOnce,F=n.r.l.bind,le=(g,N)=>{let x={},H=g.hasAttribute(ce),L=g.hasAttribute(xe);return r.E(N,()=>{r.v(x),H&&n.T(Gn,g,ce),L&&n.T(Jn,g,xe);let v=b.props;if(!v||v.length===0)return;v=v.map($);let _=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(qe))){let he=g.getAttribute(Y);he!==null&&(x[$(Y)]=he,g.removeAttribute(Y))}let Se=n.W.he(g,!1);for(let[Y,he]of Se.entries()){let[zt,Ln]=he.G;if(!Ln)continue;let kn=_.get($(Ln).toLowerCase());kn&&(zt!=="."&&zt!==":"&&zt!==F||n.T(tr,g,Y,!0,kn,he.J))}}),x},ne=[...r.k()],Xe=()=>{var H;let g=le(m,ne),N=new Ze(g,m,ne,q,D),x=rn(()=>{var L;return(L=b.context(N))!=null?L:{}}).context;if(N.autoProps){for(let[L,v]of Object.entries(g))if(L in x){let _=x[L];if(_===v)continue;N.entangle&&T(_)&&T(v)&&j(q,rt(v,_))}else x[L]=v;(H=N.onAutoPropsAssigned)==null||H.call(N)}return{componentCtx:x,head:N}},{componentCtx:ve,head:pt}=Xe(),w=[...be(S)],ft=w.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 x=g.name;K(x)&&(x=g.getAttributeNames().filter(v=>v.startsWith("#"))[0],K(x)?x="default":x=x.substring(1));let H=m.querySelector(`template[name='${x}'], template[\\#${x}]`);!H&&x==="default"&&(H=m.querySelector("template:not([name])"),H&&H.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(H=null));let L=v=>{pt.enableSwitch&&r.E(ne,()=>{r.v(ve);let _=le(g,r.k());r.E(ne,()=>{r.v(_);let Se=r.k(),Y=Vn(Se);for(let he of v)De(he)&&(he.setAttribute(et,Y),Qt(Y),j(he,()=>{Xt(Y)}))})})};if(H){let v=[...be(H)];for(let _ of v)N.insertBefore(_,g);L(v)}else{if(x!=="default"){for(let _ of[...be(g)])N.insertBefore(_,g);return}let v=[...be(m)].filter(_=>!fe(_));for(let _ of v)N.insertBefore(_,g);L(v)}},X=g=>{if(!De(g))return;let N=g.querySelectorAll("slot");if(Fn(g)){G(g),g.remove();return}for(let x of N)G(x),x.remove()};(()=>{for(let g=0;g<ft;++g)w[g]=w[g].cloneNode(!0),y.insertBefore(w[g],h),X(w[g])})(),I.insertBefore(D,h);let me=()=>{if(!b.inheritAttrs)return;let g=w.filter(x=>x.nodeType===Node.ELEMENT_NODE);g.length>1&&(g=g.filter(x=>x.hasAttribute(this.le)));let N=g[0];if(N)for(let x of m.getAttributeNames()){if(x===ce||x===xe)continue;let H=m.getAttribute(x);if(x==="class")N.classList.add(...H.split(" "));else if(x==="style"){let L=N.style,v=m.style;for(let _ of v)L.setProperty(_,v.getPropertyValue(_))}else N.setAttribute(Tt(x,n.r),H)}},O=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.r.l.on)&&m.removeAttribute(g)},de=()=>{me(),O(),r.v(ve),n.ge(m,!1),ve.$emit=pt.emit,Ne(n,w),j(m,()=>{Oe(ve)}),j(q,()=>{ye(m)}),Et(ve)};r.E(ne,de)}}};var cn=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 cn(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 bo=(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.P(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=fe(e)?r:[...r[0].childNodes],m=()=>{p.E(f,()=>{var S;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(S=Object.entries(p.ye()).filter(I=>I[1]===E)[0])==null?void 0:S[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));bo(l,b),o.insertBefore(b,i),this.i.P(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 B=t=>{let e=t;return e!=null&&e[J]===1?e():e};var st=class{constructor(e){d(this,"R",[]);d(this,"B",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.B.set(n,e)}Z(e){var r;let n=this.X((r=this.R[e])==null?void 0:r.value);n!==void 0&&this.B.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.B.has(e)}rt(e){var r;let n=this.B.get(e);return(r=n==null?void 0:n.order)!=null?r:-1}};var pn=Symbol("r-for"),To=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[pn]?!0:(e[pn]=!0,Ae(e,this.te).forEach(n=>n[pn]=!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 se(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),S=(M,G,X)=>{let Z=r.createContext(G,M),me=st.tt(Z.index,G),O=()=>{var x,H;let de=(H=(x=u.parentNode)!=null?x:f.parentNode)!=null?H:c,g=X.previousSibling,N=[];for(let L=0;L<a.length;++L){let v=a[L].cloneNode(!0);de.insertBefore(v,X),N.push(v)}for(Ne(l,N),g=g.nextSibling;g!==X;)me.items.push(g),g=g.nextSibling};return C?(C[0]=Z.ctx,m.E(C,O)):m.E(y,()=>{m.v(Z.ctx),O()}),me},I=(M,G)=>{let X=w.V(M).items,Z=X[X.length-1].nextSibling;for(let me of X)z(me);w.ee(M,S(M,G,Z))},q=(M,G)=>{w.v(S(M,G,u))},D=M=>{for(let G of w.V(M).items)z(G)},ce=M=>{let G=w.S;for(let X=M;X<G;++X)w.V(X).index(X)},xe=M=>{let G=f.parentNode,X=u.parentNode;if(!G||!X)return;let Z=w.S;P(M)&&(M=M());let me=B(M[0]);if(R(me)&&me.length===0){ge(f,u),w.Ce(0);return}let O=0,de=Number.MAX_SAFE_INTEGER,g=Z,N=this.i.r.forGrowThreshold,x=()=>w.S<g+N;for(let L of this.ve(M[0])){let v=()=>{if(O<Z){let _=w.V(O++);if(b(_.value,L))return;let Se=w.rt(E(L));if(Se>=O&&Se-O<10){if(--O,de=Math.min(de,O),D(O),w.Ee(O),--Z,Se>O+1)for(let Y=O;Y<Se-1&&Y<Z&&!b(w.V(O).value,L);)++Y,D(O),w.Ee(O),--Z;v();return}x()?(w.nt(O-1,S(O,L,w.V(O-1).items[0])),de=Math.min(de,O-1),++Z):I(O-1,L)}else q(O++,L)};v()}let H=O;for(Z=w.S;O<Z;)D(O++);w.Ce(H),ce(de)},F=()=>{ve=ne.subscribe?ne.subscribe(xe):()=>{}},le=()=>{ne.stop(),ve()},ne=m.M(r.list),Xe=ne.value,ve,pt=0,w=new st(E);for(let M of this.ve(Xe()[0]))w.v(S(pt++,M,u));j(f,le),F()}it(e){var c,p;let n=kt.pt.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=B(f);if(!a&&r.length===1)l[r[0]]=f;else if(R(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:To};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.ct(n),o=r.length>1?r.slice(1):void 0;return s=>{let i=B(s),a=this.Se(i,r);return a!==void 0||!o?a:this.Se(i,o)}}return r=>{var o;return B((o=B(r))==null?void 0:o[n])}}ct(e){return e.split(".").filter(n=>n.length>0)}Se(e,n){var o;let r=e;for(let s of n)r=(o=B(r))==null?void 0:o[s];return B(r)}};d(kt,"pt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\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 At(this),this.W=new Nt(this),this.x=this.r.l.pre,this.Me=this.r.l.dynamic}lt(e){let n=fe(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);Ne(this,i)}}P(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,S=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,S,s)}):()=>{};if(a.push(E),l){let b=l.subscribe?l.subscribe(()=>{var D;let S=h,I=i.value(),q=l.value()[0];y=I,h=q,(D=e.onChange)==null||D.call(e,n,I,S,q,S,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 nr="http://www.w3.org/1999/xlink",Co={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 Eo(t){return!!t||t===""}var fn={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(R(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(A(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),se(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:")){se(n)?t.removeAttributeNS(nr,e.slice(6,e.length)):t.setAttributeNS(nr,e,n);return}let o=e in Co;se(n)||o&&!Eo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var un={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(R(s)){let a=s.length;for(let c=0;c<a;++c)rr(t,s[c],i==null?void 0:i[c])}else rr(t,s,i)}}},rr=(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 or={onChange:(t,e)=>{let[n,r]=e;P(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Ro(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=R(t),r=R(e),n||r)return n&&r?Ro(t,e):!1;if(n=A(t),r=A(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 sr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var ln=t=>{if(!T(t))throw U(3,"pause");t(void 0,void 0,3)};var mn=t=>{if(!T(t))throw U(3,"resume");t(void 0,void 0,4)};var ar={onChange:(t,e)=>{xo(t,e[0])},onBind:(t,e,n,r,o,s)=>vo(t,e,s)},xo=(t,e)=>{let n=ur(t);if(n&&cr(t))R(e)?e=Ut(e,Ee(t))>-1:oe(e)?e=e.has(Ee(t)):e=Mo(t,e),t.checked=e;else if(n&&pr(t))t.checked=Ce(e,Ee(t));else if(n||lr(t))fr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(mr(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)R(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}),cr=t=>t.type==="checkbox",pr=t=>t.type==="radio",fr=t=>t.type==="number"||t.type==="range",ur=t=>t.tagName==="INPUT",lr=t=>t.tagName==="TEXTAREA",mr=t=>t.tagName==="SELECT",vo=(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=ur(t);return c&&cr(t)?wo(t,a):c&&pr(t)?Lo(t,a):c||lr(t)?So(t,i,a,r):mr(t)?ko(t,a,r):(k(7,t),()=>{})},ir=/[.,' ·٫]/,So=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=fr(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(ir.test(h[h.length-1])&&h.split(ir).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},wo=(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(R(c)){let p=Ut(c,i),f=p!==-1;a&&!f?c.push(i):!a&&f&&c.splice(p,1)}else oe(c)?a?c.add(i):c.delete(i):s(No(t,a))};return t.addEventListener(n,o),r},Ee=t=>"_value"in t?t._value:t.value,dr="trueValue",Oo="falseValue",hr="true-value",Ao="false-value",No=(t,e)=>{let n=e?dr:Oo;if(n in t)return t[n];let r=e?hr:Ao;return t.hasAttribute(r)?t.getAttribute(r):e},Mo=(t,e)=>{if(dr in t)return Ce(e,t.trueValue);let r=hr;return t.hasAttribute(r)?Ce(e,t.getAttribute(r)):Ce(e,!0)},Lo=(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},ko=(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?sr(Ee(f)):Ee(f));if(t.multiple){let f=i();try{if(ln(i),oe(f)){f.clear();for(let u of p)f.add(u)}else R(f)?(f.splice(0),f.push(...p)):i(p)}finally{mn(i),Q(i)}}else i(p[0])};return t.addEventListener(r,s),o};var Io=["stop","prevent","capture","self","once","left","right","middle","passive"],Do=t=>{let e={};if(K(t))return;let n=t.split(",");for(let r of Io)e[r]=n.includes(r);return e},hn={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=B(o.value()[0]);return V(m)?dn(t,$(m),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:l[1]):()=>{}}else if(r){let l=e.value();return dn(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()),A(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(dn(t,h,C,E))}else k(2,"r-on",t)}return a}},Uo=(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]},dn=(t,e,n,r)=>{if(K(e))return k(5,"r-on",t),()=>{};let o=Do(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Uo(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 yr={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(R(c)){let p=c[0],f=c[1];We(t,p,f)}else if(A(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 Bo(t){return!!t||t===""}var We=(t,e,n)=>{if(se(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=Bo(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 gr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=R(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 br={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 bn={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(R(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.style,o=V(e);if(e&&!o){if(n&&!V(n))for(let s in n)e[s]==null&&gn(r,s,"");for(let s in e)gn(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}},Cr=/\s*!important$/;function gn(t,e,n){if(R(n))n.forEach(r=>{gn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Ho(t,e);Cr.test(n)?t.setProperty(qe(r),n.replace(Cr,""),"important"):t[r]=n}}var Er=["Webkit","Moz","ms"],yn={};function Ho(t,e){let n=yn[e];if(n)return n;let r=$(e);if(r!=="filter"&&r in t)return yn[e]=r;r=nt(r);for(let o=0;o<Er.length;o++){let s=Er[o]+r;if(s in t)return yn[e]=s}return e}var re=t=>Rr(B(t)),Rr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(R(t))return t.map(re);if(oe(t)){let r=new Set;for(let o of t.keys())r.add(re(o));return r}if(we(t)){let r=new Map;for(let o of t)r.set(re(o[0]),re(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Rr(B(r[1]),e);return n};var xr={onChange:(t,e)=>{var r;let n=e[0];t.textContent=oe(n)?JSON.stringify(re([...n])):we(n)?JSON.stringify(re([...n])):A(n)?JSON.stringify(re(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var vr={onChange:(t,e)=>{We(t,"value",e[0])}};var Le=class Le{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=Le.ke)!=null?e:Le.ke=new Le}mt(){let e={},n=globalThis;for(let r of Le.ft.split(","))e[r]=n[r];return e.ref=Te,e.sref=te,e.flatten=re,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._={".":yr,":":fn,"@":hn,[`${e}on`]:hn,[`${e}bind`]:fn,[`${e}html`]:or,[`${e}text`]:xr,[`${e}show`]:br,[`${e}model`]:ar,":style":bn,[`${e}bind:style`]:bn,":class":un,[`${e}bind:class`]:un,":ref":gr,":value":vr,[`${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`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this._,this.l)}};d(Le,"ke"),d(Le,"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 ae=Le;var Bt=(t,e)=>{if(!t)return;let r=(e!=null?e:ae.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Po(t,r.pre,s))_o(i,r.text,o,s)},_o=(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=Sr(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=Sr(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)},Po=(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},Sr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Vo=9,jo=10,$o=13,qo=32,Re=46,Ht=44,Fo=39,zo=34,_t=40,Ge=41,Pt=91,Tn=93,Cn=63,Ko=59,wr=58,Or=123,Vt=125,Be=43,jt=45,En=96,Ar=47,Rn=92,Nr=new Set([2,3]),Ur={"=":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},Wo={"=>":2,...Ur,"||":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},Br=Object.keys(Ur),Go=new Set(Br),vn=new Set(["=>"]);Br.forEach(t=>vn.add(t));var Mr={true:!0,false:!1,null:null},Jo="this",Je="Expected ",He="Unexpected ",wn="Unclosed ",Qo=Je+":",Lr=Je+"expression",Xo="missing }",Yo=He+"object property",Zo=wn+"(",kr=Je+"comma",Ir=He+"token ",es=He+"period",xn=Je+"expression after ",ts="missing unaryOp argument",ns=wn+"[",rs=Je+"exponent (",os="Variable names cannot start with a number (",ss=wn+'quote after "',at=t=>t>=48&&t<=57,Dr=t=>Wo[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===qo||e===Vo||e===jo||e===$o;)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===Ko||r===Ht)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:Dr(n),right_a:vn.has(n)},i=this.j(),!i)throw this.o(xn+n);let p=[s,o,i];for(;n=this.oe();){r=Dr(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(xn+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===Re)return this.gt();if(n===Fo||n===zo)e=this.bt();else if(n===Pt)e=this.xt();else{let r=this.Tt();if(r){let o=this.j();if(!o)throw this.o(ts);return this.se({type:7,operator:r,argument:o})}this.H(n)?(e=this.ie(),e.name in Mr?e={type:4,value:Mr[e.name],raw:e.name}:e.name===Jo&&(e={type:5})):n===_t&&(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 Go.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===jt?(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===Re||n===Pt||n===_t||n===Cn;){let r;if(n===Cn){if(this.p.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.m}if(this.e++,n===Pt){if(e={type:3,computed:!0,object:e,property:this.w()},this.y(),n=this.m,n!==Tn)throw this.o(ns);this.e++}else n===_t?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)===Re)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===jt)&&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(rs+p+this.U+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.H(i))throw this.o(os+s+this.U+")");if(i===Re||s.length===1&&s.charCodeAt(0)===Re)throw this.o(es);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===Rn){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(ss+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(Ir+String.fromCharCode(e));break}else if(s===Ht){if(this.e++,o++,o!==n.length){if(e===Ge)throw this.o(Ir+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.o(kr);{let i=this.w();if(!i||i.type===0)throw this.o(kr);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(Zo)}xt(){return this.e++,{type:9,elements:this.De(Tn)}}Et(e){if(this.f(Or)){this.e++;let n=[];for(;!isNaN(this.m);){if(this.y(),this.f(Vt)){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(Ht)||this.f(Vt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(wr)){this.e++;let o=this.w();if(!o)throw this.o(Yo);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(Ht)&&this.e++}throw this.o(Xo)}}Ct(e){let n=this.m;if((n===Be||n===jt)&&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||!Nr.has(r.argument.type))throw this.o(He+r.operator)}}At(e){let n=e.node,r=this.m;if((r===Be||r===jt)&&r===this.p.charCodeAt(this.e+1)){if(!Nr.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)===Re&&this.p.charCodeAt(this.e+1)===Re&&this.p.charCodeAt(this.e+2)===Re&&(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(Lr);if(this.y(),this.f(wr)){this.e++;let o=this.w();if(!o)throw this.o(Lr);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.o(Qo)}}Nt(e){if(this.y(),this.f(_t)){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(xn+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)===Or){if(p(!1),this.e+=2,o.expressions.push(...this.re(Vt)),!this.f(Vt))throw this.o("unclosed ${");this.e+=1,s=this.e}else if(f===Rn){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(Ar))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.m===Ar&&!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(Pt)?r=!0:r&&this.f(Tn)&&(r=!1),this.e+=this.f(Rn)?2:1}throw this.o("Unclosed Regex")}},Hr=t=>new Sn(t).parse();var is={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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},as={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},jr=t=>{if(!(t!=null&&t.some(Vr)))return t;let e=[];return t.forEach(n=>Vr(n)?e.push(...n):e.push(n)),e},_r=(...t)=>jr(t),On=(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(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]}},ps={"++":(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]--}},Pr={"=":(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}},$t=(t,e)=>P(t)?t.bind(e):t,An=class{constructor(e,n,r,o,s){d(this,"u");d(this,"Pe");d(this,"Be");d(this,"_e");d(this,"A");d(this,"He");d(this,"je");this.u=R(e)?e:[e],this.Pe=n,this.Be=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],$t(B(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],$t(B(i[o]),i);let s=this.Pe;if(s&&o in s)return this.A=s[o],$t(B(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.qe(n,r,_r,...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,$t(B(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>P(i)?i(...jr(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,as[e.operator],e.argument)}8(e,n,r){let o=is[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,_r,...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,On(u,r)),p=u=>this.Fe(a,e.value,n,On(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=B(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?cs:ps;if(o.type===2){let a=o.name,c=this.$e(a,r);return se(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(se(a))return;let c=this.g(e.right,n,r);return Pr[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 Pr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return R(o)&&(o.s=$r),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=B(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}=sn(()=>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.Be;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,On(p,n)):this.g(a,e,n)));return r(...i)}},$r=Symbol("s"),Vr=t=>(t==null?void 0:t.s)===$r,qr=(t,e,n,r,o,s,i)=>new An(e,n,r,o,i).eval(t,s);var Fr={},qt=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,S)=>(c.add(b),S&&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,S,I,q)=>{try{let D=qr(b,S,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=Fr[e])!=null?E:Hr("["+e+"]");Fr[e]=b;let S=this.u.slice(),I=b.elements,q=I.length,D=()=>{y.length=0,h.clear(),p();let ce=new Array(q),xe=new Array(q);for(let F=0;F<q;++F){let le=I[F];if(n!=null&&n(F,-1)){ce[F]=Xe=>C(le,S,!1,{$event:Xe}).value;continue}let ne=C(le,S,!0);ce[F]=ne.value,xe[F]=ne.ref}if(!s)for(let F of y){if(h.has(F))continue;h.add(F);let le=W(F,D);a.push(le)}if(l.refs=xe,i(ce),c.size!==0)for(let F of c)c.has(F)&&F(ce)};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 zr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},fs=(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},us=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
|
|
3
|
-
`);)++n;if(n>=t.length||!
|
|
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||!qr(t[n]))return null;let r=n;for(;n<t.length&&qr(t[n]);)++n;return{start:r,end:n}},Fr=new Set(["table","thead","tbody","tfoot"]),fs=new Set(["thead","tbody","tfoot"]),us=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),zt=t=>{var s;let e=0,n=[],r=[],o=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 C=t.indexOf("-->",i+4);if(C===-1){n.push(t.slice(i));break}n.push(t.slice(i,C+3)),e=C+3;continue}let a=cs(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),p=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let u=ps(c,p);if(!u){n.push(c),e=a+1;continue}let l=c.slice(u.start,u.end);if(p){let C=r[r.length-1];C?(r.pop(),n.push(C.replacementHost?`</${C.replacementHost}>`:c),Fr.has(C.effectiveTag)&&--o):n.push(c),e=a+1;continue}let m=c.charCodeAt(c.length-2)===47,y=r[r.length-1],h=null;if(o===0?l==="tr"?h="trx":l==="td"?h="tdx":l==="th"&&(h="thx"):fs.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=l==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=us.has(l)?null:"tr":(y==null?void 0:y.effectiveTag)==="tr"&&(h=l==="td"||l==="th"?null:"td"),h){let C=h==="trx"||h==="tdx"||h==="thx";n.push(`${c.slice(0,u.start)}${h} is="${C?`r-${l}`:`regor:${l}`}"${c.slice(u.end)}`)}else m&&(y==null?void 0:y.effectiveTag)==="tr"?n.push(`${c.slice(0,c.length-2)}></${l}>`):n.push(c);if(!m){let C=h==="trx"?"tr":h==="tdx"?"td":h==="thx"?"th":h||l;r.push({replacementHost:h,effectiveTag:C}),Fr.has(C)&&++o}e=a+1}return n.join("")};var ls="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",ms=new Set(ls.toUpperCase().split(",")),ds="http://www.w3.org/2000/svg",zr=(t,e)=>{ue(t)?t.content.appendChild(e):t.appendChild(e)},Nn=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&ms.has(o.toUpperCase())?document.createElementNS(ds,o.toLowerCase()):document.createElement(o),c=t.a;if(c)for(let f of Object.entries(c)){let u=f[0],l=f[1];u.startsWith("#")&&(l=u.substring(1),u="name"),a.setAttribute(Tt(u,r),l)}let p=t.c;if(p)for(let f of p)Nn(f,a,n,r);zr(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)zr(e,a);else throw new Error("unsupported node type.")}},Qe=(t,e,n)=>{n!=null||(n=ce.getDefault());let r=document.createDocumentFragment();if(!x(t))return Nn(t,r,!!e,n),r;for(let o of t)Nn(o,r,!!e,n);return r};var hs=(t,e={selector:"#app"},n)=>{V(e)&&(e={selector:"#app",template:e}),Wn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!De(r))throw B(0);n||(n=ce.getDefault());let o=()=>{for(let a of[...r.childNodes])z(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(zt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Qe(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Ht(r,n),new Mn(t,r,n).T(),j(r,()=>{we(t)}),Et(t),{context:t,unmount:()=>{z(r)},unbind:()=>{ye(r)}}},Mn=class{constructor(e,n,r){d(this,"Lt");d(this,"We");d(this,"r");d(this,"h");d(this,"i");this.Lt=e,this.We=n,this.r=r,this.h=new Ft([e],r),this.i=new It(this.h)}T(){this.i.B(this.We)}};var ct=t=>{if(x(t))return t.map(o=>ct(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>{var s;return[o,(s=t.getAttribute(o))!=null?s:""]})));let r=be(t);return r.length>0&&(e.c=[...r].map(o=>ct(o))),e};var ys=(t,e={})=>{var s,i,a,c,p,f;x(e)&&(e={props:e}),V(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),r=!1;if(t.element){let u=t.element;u.remove(),t.element=u}else if(t.selector){let u=document.querySelector(t.selector);if(!u)throw B(1,t.selector);u.remove(),t.element=u}else if(t.template){let u=document.createRange().createContextualFragment(zt(t.template));t.element=u}else t.json&&(t.element=Qe(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Ht(t.element,(a=e.config)!=null?a:ce.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:tt(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||tt(o)&&o.querySelector("[isSVG]"))){let u=o.content,l=u?[...u.childNodes]:[...o.childNodes],m=ct(l);t.element=Qe(m,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var gs=t=>{var e;(e=ke())==null||e.onMounted.push(t)};var bs=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw B(4);return e&&!n.isStopped?e(...o):(e=Ts(t,n),e(...o))};return r[J]=1,Ne(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},ee(()=>r.stop(),!0),r},Ts=(t,e)=>{var s;let n=(s=e.ref)!=null?s:te(null);e.ref=n,e.isStopped=!1;let r=0,o=ze(()=>{if(r>0){o(),e.isStopped=!0,Q(n);return}n(t()),++r});return n.stop=o,n};var Cs=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw B(4);return r&&!n.isStopped?r(...s):(r=Es(t,e,n),r(...s))};return o[J]=1,Ne(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ee(()=>o.stop(),!0),o},Es=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:te(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,Q(r);return}let p=t.map(f=>f());r(e(...p)),++o},i=[];for(let c of t){let p=W(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var xs=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw B(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[J]=1,Ne(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},ee(()=>o.stop(),!0),o},Rs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:te(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=W(t,i=>{if(o>0){r.stop(),n.isStopped=!0,Q(r);return}r(e(i)),++o},!0),r};var vs=t=>(t[Rt]=1,t);var Ss=(t,e)=>{if(!e)throw B(5);let r=Fe(t)?Te:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(oe(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){k(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=ze(o);return ee(i,!0),t};var Kr=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},ws=Kr;var As=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(W(i,o));n&&o();let s=()=>{for(let i of r)i()};return ee(s,!0),s};var Os=t=>{if(!T(t))throw B(3,"observerCount");return t(void 0,void 0,2)};var Ns=t=>{Wr();try{t()}finally{Gr()}},Wr=()=>{le.stack||(le.stack=[]),le.stack.push(new Set)},Gr=()=>{let t=le.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete le.stack;for(let n of e)try{Q(n)}catch(r){console.error(r)}};export{Ze as ComponentHead,ce as RegorConfig,j as addUnbinder,Ns as batch,an as collectRefs,Cs as computeMany,xs as computeRef,bs as computed,hs as createApp,ys as createComponent,Yr as drainUnbind,Gr as endBatch,rt as entangle,oe as flatten,Ie as getBindData,Kr as html,Fe as isDeepRef,ot as isRaw,T as isRef,vs as markRaw,W as observe,As as observeMany,Os as observerCount,gs as onMounted,ee as onUnmounted,mn as pause,Ss as persist,ws as raw,Te as ref,z as removeNode,dn as resume,sn as silence,te as sref,Wr as startBatch,Qe as toFragment,ct as toJsonTemplate,Q as trigger,ye as unbind,H as unref,rn as useScope,ht as warningHandler,ze as watchEffect};
|
|
@@ -210,30 +210,105 @@ var Regor = (() => {
|
|
|
210
210
|
// src/app/ComponentHead.ts
|
|
211
211
|
var ComponentHead = class {
|
|
212
212
|
constructor(props, element, ctx, start, end) {
|
|
213
|
+
/**
|
|
214
|
+
* Values provided by parent for this component instance.
|
|
215
|
+
*
|
|
216
|
+
* Sources:
|
|
217
|
+
* - declared props via `props: ['foo']` + attribute binding (`:foo="..."`)
|
|
218
|
+
* - object binding via `:context="{ ... }"`
|
|
219
|
+
*/
|
|
213
220
|
__publicField(this, "props");
|
|
221
|
+
/**
|
|
222
|
+
* Comment node that marks the beginning of this mounted component block.
|
|
223
|
+
* Advanced use only.
|
|
224
|
+
*/
|
|
214
225
|
__publicField(this, "start");
|
|
226
|
+
/**
|
|
227
|
+
* Comment node that marks the end of this mounted component block.
|
|
228
|
+
* Advanced use only.
|
|
229
|
+
*/
|
|
215
230
|
__publicField(this, "end");
|
|
231
|
+
/**
|
|
232
|
+
* Captured context chain used by this component instance.
|
|
233
|
+
* Used internally for lifecycle/unmount behavior.
|
|
234
|
+
*/
|
|
216
235
|
__publicField(this, "ctx");
|
|
217
|
-
/**
|
|
218
|
-
*
|
|
236
|
+
/**
|
|
237
|
+
* Controls whether Regor should automatically apply incoming `head.props`
|
|
238
|
+
* values to the component context after `context(head)` returns.
|
|
239
|
+
*
|
|
240
|
+
* Think of it as "auto wire parent inputs into my component fields".
|
|
241
|
+
*
|
|
242
|
+
* - `true` (default):
|
|
243
|
+
* - If a key exists in `head.props` but does not exist on the object
|
|
244
|
+
* returned by `context(head)`, Regor adds that key to component context.
|
|
245
|
+
* - Existing ref fields can receive incoming values automatically.
|
|
246
|
+
* - Ref-to-ref inputs can be entangled when `head.entangle` is enabled.
|
|
247
|
+
* - `false`:
|
|
248
|
+
* - Regor does not auto-apply props.
|
|
249
|
+
* - You fully control mapping manually inside `context(head)`.
|
|
250
|
+
*
|
|
251
|
+
* Use `false` when you need strict custom mapping/validation/transforms
|
|
252
|
+
* before any value touches component state.
|
|
253
|
+
*
|
|
254
|
+
* "Missing key" is always checked against the returned component context object.
|
|
255
|
+
*
|
|
256
|
+
* Example (auto add):
|
|
257
|
+
* ```ts
|
|
258
|
+
* // Parent passes: :context="{ badge: 'pro' }"
|
|
259
|
+
* context(head) {
|
|
260
|
+
* // Returned context has no "badge" key:
|
|
261
|
+
* return { name: ref('Ada') }
|
|
262
|
+
* }
|
|
263
|
+
* // Resulting component context becomes:
|
|
264
|
+
* // { name: ref('Ada'), badge: 'pro' }
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* Example:
|
|
268
|
+
* ```ts
|
|
269
|
+
* context(head) {
|
|
270
|
+
* head.autoProps = false
|
|
271
|
+
* const title = ref((head.props.title as string) ?? 'Untitled')
|
|
272
|
+
* return { title }
|
|
273
|
+
* }
|
|
274
|
+
* ```
|
|
275
|
+
*/
|
|
219
276
|
__publicField(this, "autoProps", true);
|
|
220
|
-
/**
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
*
|
|
277
|
+
/**
|
|
278
|
+
* Enables two-way ref linking between incoming props and component context
|
|
279
|
+
* when `autoProps` is also enabled.
|
|
280
|
+
*
|
|
281
|
+
* - `true` (default): parent and component refs stay synchronized.
|
|
282
|
+
* - `false`: component keeps local ref isolation.
|
|
283
|
+
*/
|
|
226
284
|
__publicField(this, "entangle", true);
|
|
227
|
-
/**
|
|
228
|
-
*
|
|
285
|
+
/**
|
|
286
|
+
* Enables slot context switch behavior for advanced slot scenarios.
|
|
287
|
+
* Default: `false`.
|
|
288
|
+
*/
|
|
229
289
|
__publicField(this, "enableSwitch", false);
|
|
230
|
-
/**
|
|
290
|
+
/**
|
|
291
|
+
* Optional hook called after automatic prop assignment completes.
|
|
292
|
+
* Useful when post-assignment normalization is needed.
|
|
293
|
+
*/
|
|
231
294
|
__publicField(this, "onAutoPropsAssigned");
|
|
232
295
|
/**
|
|
233
296
|
* @internal
|
|
234
297
|
*/
|
|
235
298
|
__publicField(this, "__element");
|
|
236
|
-
/**
|
|
299
|
+
/**
|
|
300
|
+
* Emits a custom DOM event from the component host element.
|
|
301
|
+
*
|
|
302
|
+
* Example:
|
|
303
|
+
* ```ts
|
|
304
|
+
* head.emit('saved', { id: 42 })
|
|
305
|
+
* ```
|
|
306
|
+
*
|
|
307
|
+
* Parent markup can listen via regular event binding:
|
|
308
|
+
* ```html
|
|
309
|
+
* <MyComp @saved="onSaved"></MyComp>
|
|
310
|
+
* ```
|
|
311
|
+
*/
|
|
237
312
|
__publicField(this, "emit", (event, args) => {
|
|
238
313
|
this.__element.dispatchEvent(
|
|
239
314
|
new CustomEvent(event, { detail: args })
|
|
@@ -245,6 +320,10 @@ var Regor = (() => {
|
|
|
245
320
|
this.start = start;
|
|
246
321
|
this.end = end;
|
|
247
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Unmounts this component instance by removing nodes between `start` and `end`
|
|
325
|
+
* and calling unmount lifecycle handlers for captured contexts.
|
|
326
|
+
*/
|
|
248
327
|
unmount() {
|
|
249
328
|
let next = this.start.nextSibling;
|
|
250
329
|
const end = this.end;
|
|
@@ -726,8 +805,8 @@ var Regor = (() => {
|
|
|
726
805
|
return stop;
|
|
727
806
|
};
|
|
728
807
|
|
|
729
|
-
// src/directives/
|
|
730
|
-
var
|
|
808
|
+
// src/directives/context.ts
|
|
809
|
+
var contextDirective = {
|
|
731
810
|
collectRefObj: true,
|
|
732
811
|
onBind: (_, parseResult) => {
|
|
733
812
|
const stopObserving = observe(
|
|
@@ -757,34 +836,6 @@ var Regor = (() => {
|
|
|
757
836
|
}
|
|
758
837
|
};
|
|
759
838
|
|
|
760
|
-
// src/directives/props-once.ts
|
|
761
|
-
var propsOnceDirective = {
|
|
762
|
-
collectRefObj: true,
|
|
763
|
-
once: true,
|
|
764
|
-
onBind: (_, parseResult) => {
|
|
765
|
-
const value = parseResult.value();
|
|
766
|
-
const ctx = parseResult.context;
|
|
767
|
-
const obj = value[0];
|
|
768
|
-
if (!isObject(obj)) {
|
|
769
|
-
return () => {
|
|
770
|
-
};
|
|
771
|
-
}
|
|
772
|
-
for (const item of Object.entries(obj)) {
|
|
773
|
-
const key = item[0];
|
|
774
|
-
const value2 = item[1];
|
|
775
|
-
const ctxKey = ctx[key];
|
|
776
|
-
if (ctxKey === value2) continue;
|
|
777
|
-
if (isRef(ctxKey)) {
|
|
778
|
-
ctxKey(value2);
|
|
779
|
-
} else {
|
|
780
|
-
ctx[key] = value2;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
return () => {
|
|
784
|
-
};
|
|
785
|
-
}
|
|
786
|
-
};
|
|
787
|
-
|
|
788
839
|
// src/reactivity/entangle.ts
|
|
789
840
|
var entangle = (r1, r2) => {
|
|
790
841
|
if (r1 === r2) return () => {
|
|
@@ -1247,18 +1298,19 @@ var Regor = (() => {
|
|
|
1247
1298
|
const endOfComponent = new Comment(" end component: " + component.tagName);
|
|
1248
1299
|
componentParent.insertBefore(startOfComponent, component);
|
|
1249
1300
|
component.remove();
|
|
1250
|
-
const
|
|
1251
|
-
const
|
|
1301
|
+
const contextName = binder.__config.__builtInNames.context;
|
|
1302
|
+
const contextAliasName = binder.__config.__builtInNames.contextAlias;
|
|
1252
1303
|
const bindName = binder.__config.__builtInNames.bind;
|
|
1253
1304
|
const getProps = (component2, capturedContext2) => {
|
|
1254
1305
|
const props = {};
|
|
1255
|
-
const
|
|
1256
|
-
const hasPropsOnce = component2.hasAttribute(propsOnceName);
|
|
1306
|
+
const hasContext = component2.hasAttribute(contextName);
|
|
1257
1307
|
parser.__scoped(capturedContext2, () => {
|
|
1258
1308
|
parser.__push(props);
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
|
|
1309
|
+
if (hasContext) {
|
|
1310
|
+
binder.__bind(contextDirective, component2, contextName);
|
|
1311
|
+
} else if (component2.hasAttribute(contextAliasName)) {
|
|
1312
|
+
binder.__bind(contextDirective, component2, contextAliasName);
|
|
1313
|
+
}
|
|
1262
1314
|
let definedProps = registeredComponent.props;
|
|
1263
1315
|
if (!definedProps || definedProps.length === 0) return;
|
|
1264
1316
|
definedProps = definedProps.map(camelize);
|
|
@@ -1315,8 +1367,20 @@ var Regor = (() => {
|
|
|
1315
1367
|
if (key in componentCtx2) {
|
|
1316
1368
|
const compValue = componentCtx2[key];
|
|
1317
1369
|
if (compValue === propsValue) continue;
|
|
1318
|
-
if (
|
|
1319
|
-
|
|
1370
|
+
if (isRef(compValue)) {
|
|
1371
|
+
if (isRef(propsValue)) {
|
|
1372
|
+
if (head2.entangle) {
|
|
1373
|
+
addUnbinder(
|
|
1374
|
+
startOfComponent,
|
|
1375
|
+
entangle(propsValue, compValue)
|
|
1376
|
+
);
|
|
1377
|
+
} else {
|
|
1378
|
+
compValue(propsValue());
|
|
1379
|
+
}
|
|
1380
|
+
} else {
|
|
1381
|
+
compValue(propsValue);
|
|
1382
|
+
}
|
|
1383
|
+
continue;
|
|
1320
1384
|
}
|
|
1321
1385
|
} else componentCtx2[key] = propsValue;
|
|
1322
1386
|
}
|
|
@@ -1427,7 +1491,8 @@ var Regor = (() => {
|
|
|
1427
1491
|
const inheritor = inheritorChildNodes[0];
|
|
1428
1492
|
if (!inheritor) return;
|
|
1429
1493
|
for (const attrName of component.getAttributeNames()) {
|
|
1430
|
-
if (attrName ===
|
|
1494
|
+
if (attrName === contextName || attrName === contextAliasName)
|
|
1495
|
+
continue;
|
|
1431
1496
|
const value = component.getAttribute(attrName);
|
|
1432
1497
|
if (attrName === "class") {
|
|
1433
1498
|
inheritor.classList.add(...value.split(" "));
|
|
@@ -3310,6 +3375,7 @@ var Regor = (() => {
|
|
|
3310
3375
|
[`${prefix}show`]: showDirective,
|
|
3311
3376
|
[`${prefix}model`]: modelDirective,
|
|
3312
3377
|
":style": styleDirective,
|
|
3378
|
+
[`${prefix}style`]: styleDirective,
|
|
3313
3379
|
[`${prefix}bind:style`]: styleDirective,
|
|
3314
3380
|
":class": classDirective,
|
|
3315
3381
|
[`${prefix}bind:class`]: classDirective,
|
|
@@ -3325,8 +3391,8 @@ var Regor = (() => {
|
|
|
3325
3391
|
pre: `${prefix}pre`,
|
|
3326
3392
|
inherit: `${prefix}inherit`,
|
|
3327
3393
|
text: `${prefix}text`,
|
|
3328
|
-
|
|
3329
|
-
|
|
3394
|
+
context: ":context",
|
|
3395
|
+
contextAlias: `${prefix}context`,
|
|
3330
3396
|
bind: `${prefix}bind`,
|
|
3331
3397
|
on: `${prefix}on`,
|
|
3332
3398
|
keyBind: ":key",
|