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.
@@ -1,3 +1,3 @@
1
- "use strict";var Regor=(()=>{var lt=Object.defineProperty,To=Object.defineProperties,Co=Object.getOwnPropertyDescriptor,Eo=Object.getOwnPropertyDescriptors,Ro=Object.getOwnPropertyNames,Vn=Object.getOwnPropertySymbols;var jn=Object.prototype.hasOwnProperty,xo=Object.prototype.propertyIsEnumerable;var mt=Math.pow,en=(t,e,n)=>e in t?lt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dt=(t,e)=>{for(var n in e||(e={}))jn.call(e,n)&&en(t,n,e[n]);if(Vn)for(var n of Vn(e))xo.call(e,n)&&en(t,n,e[n]);return t},$n=(t,e)=>To(t,Eo(e));var vo=(t,e)=>{for(var n in e)lt(t,n,{get:e[n],enumerable:!0})},So=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Ro(e))!jn.call(t,o)&&o!==n&&lt(t,o,{get:()=>e[o],enumerable:!(r=Co(e,o))||r.enumerable});return t};var wo=t=>So(lt({},"__esModule",{value:!0}),t);var d=(t,e,n)=>en(t,typeof e!="symbol"?e+"":e,n);var qn=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(p){o(p)}},i=c=>{try{a(n.throw(c))}catch(p){o(p)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var Ks={};vo(Ks,{ComponentHead:()=>qe,RegorConfig:()=>se,addUnbinder:()=>H,batch:()=>bo,collectRefs:()=>Nt,computeMany:()=>fo,computeRef:()=>uo,computed:()=>po,createApp:()=>io,createComponent:()=>ao,drainUnbind:()=>zn,endBatch:()=>Hn,entangle:()=>Ge,flatten:()=>ne,getBindData:()=>Ae,html:()=>Un,isDeepRef:()=>Be,isRaw:()=>Je,isRef:()=>b,markRaw:()=>lo,observe:()=>F,observeMany:()=>yo,observerCount:()=>go,onMounted:()=>co,onUnmounted:()=>Z,pause:()=>$t,persist:()=>mo,raw:()=>ho,ref:()=>me,removeNode:()=>q,resume:()=>qt,silence:()=>At,sref:()=>ee,startBatch:()=>Bn,toFragment:()=>Ve,toJsonTemplate:()=>et,trigger:()=>G,unbind:()=>pe,unref:()=>I,useScope:()=>St,warningHandler:()=>rt,watchEffect:()=>He});var je=Symbol(":regor");var pe=t=>{let e=[t];for(;e.length>0;){let n=e.pop();Oo(n);for(let r=n.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Oo=t=>{let e=t[je];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[je]=void 0};var $e=[],ht=!1,yt,Fn=()=>{if(ht=!1,yt=void 0,$e.length!==0){for(let t=0;t<$e.length;++t)pe($e[t]);$e.length=0}},q=t=>{t.remove(),$e.push(t),ht||(ht=!0,yt=setTimeout(Fn,1))},zn=()=>qn(null,null,function*(){$e.length===0&&!ht||(yt&&clearTimeout(yt),Fn())});var V=t=>typeof t=="function",j=t=>typeof t=="string",Kn=t=>typeof t=="undefined",ie=t=>t==null||typeof t=="undefined",W=t=>typeof t!="string"||!(t!=null&&t.trim()),Ao=Object.prototype.toString,tn=t=>Ao.call(t),we=t=>tn(t)==="[object Map]",oe=t=>tn(t)==="[object Set]",nn=t=>tn(t)==="[object Date]",nt=t=>typeof t=="symbol",R=Array.isArray,A=t=>t!==null&&typeof t=="object";var Wn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},B=(t,...e)=>{let n=Wn[t];return new Error(V(n)?n.call(Wn,...e):n)};var gt=[],Gn=()=>{let t={onMounted:[],onUnmounted:[]};return gt.push(t),t},Ie=t=>{let e=gt[gt.length-1];if(!e&&!t)throw B(2);return e},Jn=t=>{let e=Ie();return t&&on(t),gt.pop(),e},rn=Symbol("csp"),on=t=>{let e=t,n=e[rn];if(n){let r=Ie();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[rn]=Ie()},bt=t=>t[rn];var Oe=t=>{var n,r;let e=(n=bt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var qe=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;)q(e),e=e.nextSibling;for(let r of this.ctx)Oe(r)}};var Ae=t=>{let e=t,n=e[je];if(n)return n;let r={unbinders:[],data:{}};return e[je]=r,r};var H=(t,e)=>{Ae(t).unbinders.push(e)};var Qn={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=Qn[t],r=V(n)?n.call(Qn,...e):n,o=rt.warning;o&&(j(r)?o(r):o(r,...r.args))},rt={warning:console.warn};var Ct={},Tt={},Xn=1,Yn=t=>{let e=(Xn++).toString();return Ct[e]=t,Tt[e]=0,e},sn=t=>{Tt[t]+=1},an=t=>{--Tt[t]===0&&(delete Ct[t],delete Tt[t])},Zn=t=>Ct[t],cn=()=>Xn!==1&&Object.keys(Ct).length>0,ot="r-switch",No=t=>{let e=t.filter(r=>De(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(ot))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Fe=(t,e)=>{if(!cn())return;let n=No(e);n.length!==0&&(n.forEach(sn),H(t,()=>{n.forEach(an)}))};var pn=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Me(e,o)},fn=Symbol("r-if"),er=Symbol("r-else"),tr=t=>t[er]===1,Et=class{constructor(e){d(this,"i");d(this,"I");d(this,"q");d(this,"F");d(this,"K");d(this,"b");d(this,"T");this.i=e,this.I=e.r.l.if,this.q=Ke(e.r.l.if),this.F=e.r.l.else,this.K=e.r.l.elseif,this.b=e.r.l.for,this.T=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=Ne(e,this.q);for(let o of r)this.x(o);return n}z(e){return e[fn]?!0:(e[fn]=!0,Ne(e,this.q).forEach(n=>n[fn]=!0),!1)}x(e){if(e.hasAttribute(this.T)||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=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Fe(i,o),o.forEach(c=>{q(c)}),e.remove(),n!=="if"&&(e[er]=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:()=>{pn(o,this.i,s,a)},unmount:()=>{be(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=[];H(a,()=>{p.stop();for(let h of l)h();l.length=0});let y=p.subscribe?p.subscribe(n):()=>{};return l.push(y),[{mount:()=>{pn(s,this.i,i,c)},unmount:()=>{be(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||(pn(o,this.i,s,a),f=!0),y.forEach(T=>{T.unmount(),T.isMounted=!1});else{be(i,a),f=!1;let T=!1;for(let S of y)!T&&S.isTrue()?(S.isMounted||(S.mount(),S.isMounted=!0),T=!0):(S.unmount(),S.isMounted=!1)}})},y=this.ce(r,m),h=[];H(i,()=>{c.stop();for(let T of h)T();h.length=0}),m();let E=c.subscribe?c.subscribe(m):()=>{};h.push(E)}};var ze=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"})},Me=(t,e)=>{for(let n=0;n<e.length;++n){let r=e[n];r.nodeType===Node.ELEMENT_NODE&&(tr(r)||t.P(r))}},Ne=(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,st=t=>t.nodeType===Node.ELEMENT_NODE,nr=t=>t instanceof HTMLSlotElement,Te=t=>ue(t)?t.content.childNodes:t.childNodes,be=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;q(n),n=r}},rr=function(){return this()},Mo=function(t){return this(t)},Lo=()=>{throw new Error("value is readonly.")},ko={get:rr,set:Mo,enumerable:!0,configurable:!1},Io={get:rr,set:Lo,enumerable:!0,configurable:!1},Le=(t,e)=>{Object.defineProperty(t,"value",e?Io:ko)},or=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Ke=t=>`[${CSS.escape(t)}]`,Rt=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),un=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Do=/-(\w)/g,$=un(t=>t&&t.replace(Do,(e,n)=>n?n.toUpperCase():"")),Uo=/\B([A-Z])/g,We=un(t=>t&&t.replace(Uo,"-$1").toLowerCase()),it=un(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var xt={};var vt=t=>{var n,r;let e=(n=bt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var ln=Symbol("scope"),St=t=>{try{Gn();let e=t();on(e);let n={context:e,unmount:()=>Oe(e),[ln]:1};return n[ln]=1,n}finally{Jn()}},sr=t=>A(t)?ln in t:!1;var Z=(t,e)=>{var n;(n=Ie(e))==null||n.onUnmounted.push(t)};var wt=Symbol("ref"),Q=Symbol("sref"),Ot=Symbol("raw");var b=t=>t!=null&&t[Q]===1;var F=(t,e,n,r=!0)=>{if(!b(t))throw B(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&Z(s,!0),s};var ir={collectRefObj:!0,onBind:(t,e)=>F(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&&(b(p)?p(c):o[a]=c)}},!0)};var ar={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&&(b(c)?c(a):r[i]=a)}return()=>{}}};var Ge=(t,e)=>{if(t===e)return()=>{};let n=F(t,o=>e(o)),r=F(e,o=>t(o));return e(t()),()=>{n(),r()}};var Je=t=>!!t&&t[Ot]===1;var Be=t=>(t==null?void 0:t[wt])===1;var ae=[],cr=t=>{var e;ae.length!==0&&((e=ae[ae.length-1])==null||e.add(t))},He=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Bo(t,e),Z(()=>e.stop(),!0),e.stop},Bo=(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=F(i,()=>{o(),He(t)});n.push(a)}}finally{ae.pop()}},At=t=>{let e=ae.length,n=e>0&&ae[e-1];try{return n&&ae.push(null),t()}finally{n&&ae.pop()}},Nt=t=>{try{let e=new Set;return ae.push(e),{value:t(),refs:[...e]}}finally{ae.pop()}};var G=(t,e,n)=>{if(!b(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)G(s,e,!0);else if(we(o))for(let s of o)G(s[0],e,!0),G(s[1],e,!0);if(A(o))for(let s in o)G(o[s],e,!0)}};function Ho(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(r){let o=t[r];Ho(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)G(p);return a})})},Mt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var pr=Array.prototype,mn=Object.create(pr),_o=["push","pop","shift","unshift","splice","sort","reverse"];Qe(pr,mn,_o);var fr=Map.prototype,Lt=Object.create(fr),Po=["set","clear","delete"];Mt(Lt,"Map");Qe(fr,Lt,Po);var ur=Set.prototype,kt=Object.create(ur),Vo=["add","clear","delete"];Mt(kt,"Set");Qe(ur,kt,Vo);var le={},ee=t=>{if(b(t)||Je(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?Q in c?!0:R(c)?(Object.setPrototypeOf(c,mn),!0):oe(c)?(Object.setPrototypeOf(c,kt),!0):we(c)?(Object.setPrototypeOf(c,Lt),!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&&At(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=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||b(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(cr(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[Q]=1,Le(a,!1),r&&i(t),a};var me=t=>{if(Je(t))return t;let e;if(b(t)?(e=t,t=e()):e=ee(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[wt]=1,R(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Be(o)||(t[r]=me(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Be(r))continue;let o=n[0];nt(o)||(t[o]=null,t[o]=me(r))}return e};var lr=Symbol("modelBridge"),It=()=>{},jo=t=>!!(t!=null&&t[lr]),$o=t=>{t[lr]=1},qo=t=>{let e=me(t());return $o(e),e},mr={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return It;let i=$(r),a,c,p=It,f=()=>{p(),p=It,a=void 0,c=void 0},u=()=>{p(),p=It},l=(y,h)=>{a!==y&&(u(),p=Ge(y,h),a=y)},m=F(e.value,()=>{var E;let y=(E=e.refs[0])!=null?E:e.value()[0],h=e.context,C=h[i];if(!b(y)){if(c&&C===c){c(y);return}if(f(),b(C)){C(y);return}h[i]=y;return}if(jo(y)){if(C===y)return;b(C)?l(y,C):h[i]=y;return}c||(c=qo(y)),h[i]=c,l(y,c)},!0);return()=>{p(),m()}}};var Dt=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(We)).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(We)].join(",");if(W(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.T))continue;let y=m.parentNode;if(!y)continue;let h=m.nextSibling,C=$(m.tagName).toUpperCase(),E=i[C],T=E!=null?E:s.get(C);if(!T)continue;let S=T.template;if(!S)continue;let D=m.parentElement;if(!D)continue;let z=new Comment(" begin component: "+m.tagName),U=new Comment(" end component: "+m.tagName);D.insertBefore(z,m),m.remove();let ce=n.r.l.props,xe=n.r.l.propsOnce,K=n.r.l.bind,de=(g,N)=>{let x={},_=g.hasAttribute(ce),L=g.hasAttribute(xe);return r.E(N,()=>{r.v(x),_&&n.x(ir,g,ce),L&&n.x(ar,g,xe);let v=T.props;if(!v||v.length===0)return;v=v.map($);let P=new Map(v.map(Y=>[Y.toLowerCase(),Y]));for(let Y of v.concat(v.map(We))){let ge=g.getAttribute(Y);ge!==null&&(x[$(Y)]=ge,g.removeAttribute(Y))}let Se=n.W.he(g,!1);for(let[Y,ge]of Se.entries()){let[Zt,_n]=ge.G;if(!_n)continue;let Pn=P.get($(_n).toLowerCase());Pn&&(Zt!=="."&&Zt!==":"&&Zt!==K||n.x(mr,g,Y,!0,Pn,ge.J))}}),x},re=[...r.k()],tt=()=>{var _;let g=de(m,re),N=new qe(g,m,re,z,U),x=St(()=>{var L;return(L=T.context(N))!=null?L:{}}).context;if(N.autoProps){for(let[L,v]of Object.entries(g))if(L in x){let P=x[L];if(P===v)continue;N.entangle&&b(P)&&b(v)&&H(z,Ge(v,P))}else x[L]=v;(_=N.onAutoPropsAssigned)==null||_.call(N)}return{componentCtx:x,head:N}},{componentCtx:ve,head:ft}=tt(),w=[...Te(S)],ut=w.length,M=m.childNodes.length===0,J=g=>{let N=g.parentElement;if(M){for(let v of[...g.childNodes])N.insertBefore(v,g);return}let x=g.name;W(x)&&(x=g.getAttributeNames().filter(v=>v.startsWith("#"))[0],W(x)?x="default":x=x.substring(1));let _=m.querySelector(`template[name='${x}'], template[\\#${x}]`);!_&&x==="default"&&(_=m.querySelector("template:not([name])"),_&&_.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(_=null));let L=v=>{ft.enableSwitch&&r.E(re,()=>{r.v(ve);let P=de(g,r.k());r.E(re,()=>{r.v(P);let Se=r.k(),Y=Yn(Se);for(let ge of v)De(ge)&&(ge.setAttribute(ot,Y),sn(Y),H(ge,()=>{an(Y)}))})})};if(_){let v=[...Te(_)];for(let P of v)N.insertBefore(P,g);L(v)}else{if(x!=="default"){for(let P of[...Te(g)])N.insertBefore(P,g);return}let v=[...Te(m)].filter(P=>!ue(P));for(let P of v)N.insertBefore(P,g);L(v)}},X=g=>{if(!De(g))return;let N=g.querySelectorAll("slot");if(nr(g)){J(g),g.remove();return}for(let x of N)J(x),x.remove()};(()=>{for(let g=0;g<ut;++g)w[g]=w[g].cloneNode(!0),y.insertBefore(w[g],h),X(w[g])})(),D.insertBefore(U,h);let he=()=>{if(!T.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 _=m.getAttribute(x);if(x==="class")N.classList.add(..._.split(" "));else if(x==="style"){let L=N.style,v=m.style;for(let P of v)L.setProperty(P,v.getPropertyValue(P))}else N.setAttribute(Rt(x,n.r),_)}},O=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.r.l.on)&&m.removeAttribute(g)},ye=()=>{he(),O(),r.v(ve),n.ge(m,!1),ve.$emit=ft.emit,Me(n,w),H(m,()=>{Oe(ve)}),H(z,()=>{pe(m)}),vt(ve)};r.E(re,ye)}}};var dn=class{constructor(e,n){d(this,"G");d(this,"J");d(this,"be",[]);this.G=e,this.J=n}},Ut=class{constructor(e){d(this,"i");d(this,"Te");d(this,"xe");d(this,"Q");var r;this.i=e,this.Te=e.r.Ze(),this.Q=new Map;let n=new Map;for(let o of this.Te){let s=(r=o[0])!=null?r:"",i=n.get(s);i?i.push(o):n.set(s,[o])}this.xe=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(/[:@]/);W(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(!st(e))return r;let o=this.xe,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 dn(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 Fo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Bt=class{constructor(e){d(this,"i");d(this,"L");d(this,"Re");this.i=e,this.L=e.r.l.is,this.Re=Ke(this.L)+", [is]"}O(e){let n=e.hasAttribute(this.L),r=Ne(e,this.Re);for(let o of r)this.x(o);return n}x(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=ze(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Fe(s,r),r.forEach(a=>{q(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 S;let E=c()[0];if(A(E)&&(E.name?E=E.name:E=(S=Object.entries(p.ye()).filter(D=>D[1]===E)[0])==null?void 0:S[0]),!j(E)||W(E)){be(s,i);return}if(u.name===E)return;be(s,i);let T=document.createElement(E);for(let D of e.getAttributeNames())D!==this.L&&T.setAttribute(D,e.getAttribute(D));Fo(l,T),o.insertBefore(T,i),this.i.P(T),u.name=E})},y=[];H(s,()=>{a.stop();for(let E of y)E();y.length=0}),m();let C=a.subscribe?a.subscribe(m):()=>{};y.push(C)}};var I=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var at=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 hn=Symbol("r-for"),zo=t=>-1,_t=class _t{constructor(e){d(this,"i");d(this,"b");d(this,"te");d(this,"T");this.i=e,this.b=e.r.l.for,this.te=Ke(this.b),this.T=e.r.l.pre}O(e){let n=e.hasAttribute(this.b),r=Ne(e,this.te);for(let o of r)this.ot(o);return n}z(e){return e[hn]?!0:(e[hn]=!0,Ne(e,this.te).forEach(n=>n[hn]=!0),!1)}ot(e){if(e.hasAttribute(this.T)||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)?[]:(V(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 ut;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=(ut=e.getAttribute(o))!=null?ut:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=ze(e),c=e.parentNode;if(!c)return;let p=`${this.b} => ${n}`,f=new Comment(`__begin__ ${p}`);c.insertBefore(f,e),Fe(f,a),a.forEach(M=>{q(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),T=(M,J)=>E(M)===E(J),S=(M,J,X)=>{let te=r.createContext(J,M),he=at.tt(te.index,J),O=()=>{var x,_;let ye=(_=(x=u.parentNode)!=null?x:f.parentNode)!=null?_:c,g=X.previousSibling,N=[];for(let L=0;L<a.length;++L){let v=a[L].cloneNode(!0);ye.insertBefore(v,X),N.push(v)}for(Me(l,N),g=g.nextSibling;g!==X;)he.items.push(g),g=g.nextSibling};return C?(C[0]=te.ctx,m.E(C,O)):m.E(y,()=>{m.v(te.ctx),O()}),he},D=(M,J)=>{let X=w.V(M).items,te=X[X.length-1].nextSibling;for(let he of X)q(he);w.ee(M,S(M,J,te))},z=(M,J)=>{w.v(S(M,J,u))},U=M=>{for(let J of w.V(M).items)q(J)},ce=M=>{let J=w.S;for(let X=M;X<J;++X)w.V(X).index(X)},xe=M=>{let J=f.parentNode,X=u.parentNode;if(!J||!X)return;let te=w.S;V(M)&&(M=M());let he=I(M[0]);if(R(he)&&he.length===0){be(f,u),w.Ce(0);return}let O=0,ye=Number.MAX_SAFE_INTEGER,g=te,N=this.i.r.forGrowThreshold,x=()=>w.S<g+N;for(let L of this.ve(M[0])){let v=()=>{if(O<te){let P=w.V(O++);if(T(P.value,L))return;let Se=w.rt(E(L));if(Se>=O&&Se-O<10){if(--O,ye=Math.min(ye,O),U(O),w.Ee(O),--te,Se>O+1)for(let Y=O;Y<Se-1&&Y<te&&!T(w.V(O).value,L);)++Y,U(O),w.Ee(O),--te;v();return}x()?(w.nt(O-1,S(O,L,w.V(O-1).items[0])),ye=Math.min(ye,O-1),++te):D(O-1,L)}else z(O++,L)};v()}let _=O;for(te=w.S;O<te;)U(O++);w.Ce(_),ce(ye)},K=()=>{ve=re.subscribe?re.subscribe(xe):()=>{}},de=()=>{re.stop(),ve()},re=m.M(r.list),tt=re.value,ve,ft=0,w=new at(E);for(let M of this.ve(tt()[0]))w.v(S(ft++,M,u));H(f,de),K()}it(e){var c,p;let n=_t.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=I(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:zo};return s&&(y.index=l[s.startsWith("#")?s.substring(1):s]=ee(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=I(s),a=this.Se(i,r);return a!==void 0||!o?a:this.Se(i,o)}}return r=>{var o;return I((o=I(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=I(r))==null?void 0:o[s];return I(r)}};d(_t,"pt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Ht=_t;var Pt=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,"T");d(this,"Me");this.h=e,this.r=e.r,this.Ae=new Ht(this),this.we=new Et(this),this.Oe=new Bt(this),this.Ne=new Dt(this),this.W=new Ut(this),this.T=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.T))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);Me(this,i)}}P(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.T)||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.x(f,m,i,!1,p,a.J)}}}x(e,n,r,o,s,i){if(n.hasAttribute(this.T))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=p=>{let f=p;for(;f;){let u=f.getAttribute(ot);if(u)return u;f=f.parentElement}return null};if(cn()){let p=c(n);if(p){this.h.E(Zn(p),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}ut(e,n,r){if(e!==xt)return!1;if(W(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,H(i,()=>{q(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;H(n,()=>{i.stop(),u==null||u.stop();for(let E=0;E<a.length;++E)a[E]();a.length=0});let f=or(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 U;let T=y,S=h,D=i.value(),z=m?l.value()[0]:o;y=D,h=z,(U=e.onChange)==null||U.call(e,n,D,T,z,S,s)}):()=>{};if(a.push(E),l){let T=l.subscribe?l.subscribe(()=>{var U;let S=h,D=i.value(),z=l.value()[0];y=D,h=z,(U=e.onChange)==null||U.call(e,n,D,S,z,S,s)}):()=>{};a.push(T)}}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 dr="http://www.w3.org/1999/xlink",Ko={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 Wo(t){return!!t||t===""}var yn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=$(r)),Vt(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];Vt(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;Vt(t,u,l,y)}else{let f=n==null?void 0:n[c],u=e[c++],l=e[c];Vt(t,u,l,f)}}}},Vt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ie(e)){k(3,"r-bind",t);return}if(!j(e)){k(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ie(n)?t.removeAttributeNS(dr,e.slice(6,e.length)):t.setAttributeNS(dr,e,n);return}let o=e in Ko;ie(n)||o&&!Wo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var gn={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)hr(t,s[c],i==null?void 0:i[c])}else hr(t,s,i)}}},hr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(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 yr={onChange:(t,e)=>{let[n,r]=e;V(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Go(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=nn(t),r=nn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=nt(t),r=nt(e),n||r)return t===e;if(n=R(t),r=R(e),n||r)return n&&r?Go(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 jt(t,e){return t.findIndex(n=>Ce(n,e))}var gr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var $t=t=>{if(!b(t))throw B(3,"pause");t(void 0,void 0,3)};var qt=t=>{if(!b(t))throw B(3,"resume");t(void 0,void 0,4)};var Tr={onChange:(t,e)=>{Jo(t,e[0])},onBind:(t,e,n,r,o,s)=>Qo(t,e,s)},Jo=(t,e)=>{let n=xr(t);if(n&&Cr(t))R(e)?e=jt(e,Ee(t))>-1:oe(e)?e=e.has(Ee(t)):e=ns(t,e),t.checked=e;else if(n&&Er(t))t.checked=Ce(e,Ee(t));else if(n||vr(t))Rr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Sr(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=jt(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)},ct=t=>(b(t)&&(t=t()),V(t)&&(t=t()),t?j(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",Er=t=>t.type==="radio",Rr=t=>t.type==="number"||t.type==="range",xr=t=>t.tagName==="INPUT",vr=t=>t.tagName==="TEXTAREA",Sr=t=>t.tagName==="SELECT",Qo=(t,e,n)=>{let r=e.value,o=ct(n==null?void 0:n.join(",")),s=ct(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=xr(t);return c&&Cr(t)?Yo(t,a):c&&Er(t)?rs(t,a):c||vr(t)?Xo(t,i,a,r):Sr(t)?os(t,a,r):(k(7,t),()=>{})},br=/[.,' ·٫]/,Xo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Rr(t),a=()=>{!e.trim&&!ct(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=ct(r()[1]);if(i||C.number||C.int){if(C.int)h=parseInt(h);else{if(br.test(h[h.length-1])&&h.split(br).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},Yo=(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=jt(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(ts(t,a))};return t.addEventListener(n,o),r},Ee=t=>"_value"in t?t._value:t.value,wr="trueValue",Zo="falseValue",Or="true-value",es="false-value",ts=(t,e)=>{let n=e?wr:Zo;if(n in t)return t[n];let r=e?Or:es;return t.hasAttribute(r)?t.getAttribute(r):e},ns=(t,e)=>{if(wr in t)return Ce(e,t.trueValue);let r=Or;return t.hasAttribute(r)?Ce(e,t.getAttribute(r)):Ce(e,!0)},rs=(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},os=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=ct(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?gr(Ee(f)):Ee(f));if(t.multiple){let f=i();try{if($t(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{qt(i),G(i)}}else i(p[0])};return t.addEventListener(r,s),o};var ss=["stop","prevent","capture","self","once","left","right","middle","passive"],is=t=>{let e={};if(W(t))return;let n=t.split(",");for(let r of ss)e[r]=n.includes(r);return e},Tn={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=I(o.value()[0]);return j(m)?bn(t,$(m),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:l[1]):()=>{}}else if(r){let l=e.value();return bn(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(V(m)&&(m=m()),A(m))for(let y of Object.entries(m)){let h=y[0],C=()=>{let T=e.value()[l];return V(T)&&(T=T()),T=T[h],V(T)&&(T=T()),T},E=m[h+"_flags"];i.push(bn(t,h,C,E))}else k(2,"r-on",t)}return a}},as=(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]},bn=(t,e,n,r)=>{if(W(e))return k(5,"r-on",t),()=>{};let o=is(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=as(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let u=n(f);V(u)&&(u=u(f)),V(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 Ar={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=$(r)),Xe(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];Xe(t,p,f)}else if(A(c))for(let p of Object.entries(c)){let f=p[0],u=p[1];Xe(t,f,u)}else{let p=e[a++],f=e[a];Xe(t,p,f)}}}};function cs(t){return!!t||t===""}var Xe=(t,e,n)=>{if(ie(e)){k(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(pe),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=cs(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 Nr={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 Mr={onChange:(t,e)=>{let n=Ae(t).data,r=n._ord;Kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var Rn={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)Lr(t,s[c],i==null?void 0:i[c])}else Lr(t,s,i)}}},Lr=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&En(r,s,"");for(let s in e)En(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ae(t).data)return;r.display=s}},kr=/\s*!important$/;function En(t,e,n){if(R(n))n.forEach(r=>{En(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=ps(t,e);kr.test(n)?t.setProperty(We(r),n.replace(kr,""),"important"):t[r]=n}}var Ir=["Webkit","Moz","ms"],Cn={};function ps(t,e){let n=Cn[e];if(n)return n;let r=$(e);if(r!=="filter"&&r in t)return Cn[e]=r;r=it(r);for(let o=0;o<Ir.length;o++){let s=Ir[o]+r;if(s in t)return Cn[e]=s}return e}var ne=t=>Dr(I(t)),Dr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(R(t))return t.map(ne);if(oe(t)){let r=new Set;for(let o of t.keys())r.add(ne(o));return r}if(we(t)){let r=new Map;for(let o of t)r.set(ne(o[0]),ne(o[1]));return r}if(e.has(t))return I(e.get(t));let n=dt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=Dr(I(r[1]),e);return n};var Ur={onChange:(t,e)=>{var r;let n=e[0];t.textContent=oe(n)?JSON.stringify(ne([...n])):we(n)?JSON.stringify(ne([...n])):A(n)?JSON.stringify(ne(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Br={onChange:(t,e)=>{Xe(t,"value",e[0])}};var ke=class ke{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=ke.ke)!=null?e:ke.ke=new ke}mt(){let e={},n=globalThis;for(let r of ke.ft.split(","))e[r]=n[r];return e.ref=me,e.sref=ee,e.flatten=ne,e}addComponent(...e){for(let n of e){if(!n.defaultName){rt.warning("Registered component's default name is not defined",n);continue}this.me.set(it(n.defaultName),n),this.de.set(it(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this._={".":Ar,":":yn,"@":Tn,[`${e}on`]:Tn,[`${e}bind`]:yn,[`${e}html`]:yr,[`${e}text`]:Ur,[`${e}show`]:Mr,[`${e}model`]:Tr,":style":Rn,[`${e}bind:style`]:Rn,":class":gn,[`${e}bind:class`]:gn,":ref":Nr,":value":Br,[`${e}teleport`]:xt},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(ke,"ke"),d(ke,"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 se=ke;var Ft=(t,e)=>{if(!t)return;let r=(e!=null?e:se.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of us(t,r.pre,s))fs(i,r.text,o,s)},fs=(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=Hr(p,r);if(f&&W(i[0])&&W(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=Hr(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)},us=(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 Te(s))o(a)}};return o(t),r},Hr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ls=9,ms=10,ds=13,hs=32,Re=46,zt=44,ys=39,gs=34,Kt=40,Ye=41,Wt=91,xn=93,vn=63,bs=59,_r=58,Pr=123,Gt=125,_e=43,Jt=45,Sn=96,Vr=47,wn=92,jr=new Set([2,3]),Wr={"=":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},Ts=$n(dt({"=>":2},Wr),{"||":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}),Gr=Object.keys(Wr),Cs=new Set(Gr),An=new Set(["=>"]);Gr.forEach(t=>An.add(t));var $r={true:!0,false:!1,null:null},Es="this",Ze="Expected ",Pe="Unexpected ",Mn="Unclosed ",Rs=Ze+":",qr=Ze+"expression",xs="missing }",vs=Pe+"object property",Ss=Mn+"(",Fr=Ze+"comma",zr=Pe+"token ",ws=Pe+"period",On=Ze+"expression after ",Os="missing unaryOp argument",As=Mn+"[",Ns=Ze+"exponent (",Ms="Variable names cannot start with a number (",Ls=Mn+'quote after "',pt=t=>t>=48&&t<=57,Kr=t=>Ts[t],Nn=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)||pt(e)}o(e){return new Error(`${e} at character ${this.e}`)}y(){let e=this.m,n=this.p,r=this.e;for(;e===hs||e===ls||e===ms||e===ds;)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===bs||r===zt)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(Pe+'"'+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:An.has(n)},i=this.j(),!i)throw this.o(On+n);let p=[s,o,i];for(;n=this.oe();){r=Kr(n),o={value:n,prec:r,right_a:An.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(On+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(pt(n)||n===Re)return this.gt();if(n===ys||n===gs)e=this.bt();else if(n===Wt)e=this.Tt();else{let r=this.xt();if(r){let o=this.j();if(!o)throw this.o(Os);return this.se({type:7,operator:r,argument:o})}this.H(n)?(e=this.ie(),e.name in $r?e={type:4,value:$r[e.name],raw:e.name}:e.name===Es&&(e={type:5})):n===Kt&&(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 Cs.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}xt(){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===_e?(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===Wt||n===Kt||n===vn;){let r;if(n===vn){if(this.p.charCodeAt(this.e+1)!==Re)break;r=!0,this.e+=2,this.y(),n=this.m}if(this.e++,n===Wt){if(e={type:3,computed:!0,object:e,property:this.w()},this.y(),n=this.m,n!==xn)throw this.o(As);this.e++}else n===Kt?e={type:6,arguments:this.De(Ye),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(;pt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===Re)for(r++;pt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===_e||a===Jt)&&r++;let c=r;for(;pt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let p=e.slice(n,r);throw this.o(Ns+p+this.U+")")}}this.e=r;let s=e.slice(n,r),i=e.charCodeAt(r);if(this.H(i))throw this.o(Ms+s+this.U+")");if(i===Re||s.length===1&&s.charCodeAt(0)===Re)throw this.o(ws);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===wn){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(Ls+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(Pe+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===Ye&&o&&o>=n.length)throw this.o(zr+String.fromCharCode(e));break}else if(s===zt){if(this.e++,o++,o!==n.length){if(e===Ye)throw this.o(zr+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.o(Fr);{let i=this.w();if(!i||i.type===0)throw this.o(Fr);n.push(i)}}}if(!r)throw this.o(Ze+String.fromCharCode(e));return n}Rt(){this.e++;let e=this.re(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.o(Ss)}Tt(){return this.e++,{type:9,elements:this.De(xn)}}Et(e){if(this.f(Pr)){this.e++;let n=[];for(;!isNaN(this.m);){if(this.y(),this.f(Gt)){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(zt)||this.f(Gt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(_r)){this.e++;let o=this.w();if(!o)throw this.o(vs);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(zt)&&this.e++}throw this.o(xs)}}Ct(e){let n=this.m;if((n===_e||n===Jt)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===_e?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!jr.has(r.argument.type))throw this.o(Pe+r.operator)}}At(e){let n=e.node,r=this.m;if((r===_e||r===Jt)&&r===this.p.charCodeAt(this.e+1)){if(!jr.has(n.type))throw this.o(Pe+(r===_e?"++":"--"));this.e+=2,e.node={type:13,operator:r===_e?"++":"--",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(vn)){this.e++;let n=e.node,r=this.w();if(!r)throw this.o(qr);if(this.y(),this.f(_r)){this.e++;let o=this.w();if(!o)throw this.o(qr);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.o(Rs)}}Nt(e){if(this.y(),this.f(Kt)){let n=this.e;if(this.e++,this.y(),this.f(Ye)){this.e++;let r=this.oe();if(r==="=>"){let o=this.Le();if(!o)throw this.o(On+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(Sn)&&(e.node={type:17,tag:n,quasi:this.Ie(e)})}Ie(e){if(!this.f(Sn))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===Sn)return p(!0),this.e+=1,e.node=o,o;if(f===36&&n.charCodeAt(this.e+1)===Pr){if(p(!1),this.e+=2,o.expressions.push(...this.re(Gt)),!this.f(Gt))throw this.o("unclosed ${");this.e+=1,s=this.e}else if(f===wn){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(Vr))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.m===Vr&&!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(Wt)?r=!0:r&&this.f(xn)&&(r=!1),this.e+=this.f(wn)?2:1}throw this.o("Unclosed Regex")}},Jr=t=>new Nn(t).parse();var ks={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>mt(t,e)},Is={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Zr=t=>{if(!(t!=null&&t.some(Yr)))return t;let e=[];return t.forEach(n=>Yr(n)?e.push(...n):e.push(n)),e},Qr=(...t)=>Zr(t),Ln=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Ds={"++":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(--r),r}return--t[e]}},Us={"++":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(b(n)){let r=n();return n(r-1),r}return t[e]--}},Xr={"=":(t,e,n)=>{let r=t[e];return b(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return b(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return b(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return b(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return b(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return b(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return b(r)?r(mt(r(),n)):t[e]=mt(t[e],n)},"<<=":(t,e,n)=>{let r=t[e];return b(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return b(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return b(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return b(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return b(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return b(r)?r(r()^n):t[e]^=n}},Qt=(t,e)=>V(t)?t.bind(e):t,kn=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],Qt(I(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],Qt(I(i[o]),i);let s=this.Pe;if(s&&o in s)return this.A=s[o],Qt(I(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.qe(n,r,Qr,...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(I(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>V(i)?i(...Zr(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,Is[e.operator],e.argument)}8(e,n,r){let o=ks[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,Qr,...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,Ln(u,r)),p=u=>this.Fe(a,e.value,n,Ln(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=I(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?Ds:Us;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 Xr[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 Xr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return R(o)&&(o.s=eo),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=I(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)&&b(this.A)}eval(e,n){let{value:r,refs:o}=Nt(()=>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,Ln(p,n)):this.g(a,e,n)));return r(...i)}},eo=Symbol("s"),Yr=t=>(t==null?void 0:t.s)===eo,to=(t,e,n,r,o,s,i)=>new kn(e,n,r,o,i).eval(t,s);var no={},Xt=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=ee([]),a=[],c=new Set,p=()=>{for(let T of a)T();a.length=0},l={value:i,stop:()=>{p(),c.clear()},subscribe:(T,S)=>(c.add(T),S&&T(i()),()=>{c.delete(T)}),refs:[],context:this.u[0]};if(W(e))return l;let m=this.r.globalContext,y=[],h=new Set,C=(T,S,D,z)=>{try{let U=to(T,S,m,n,r,z,o);return D&&y.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){k(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let T=(E=no[e])!=null?E:Jr("["+e+"]");no[e]=T;let S=this.u.slice(),D=T.elements,z=D.length,U=()=>{y.length=0,h.clear(),p();let ce=new Array(z),xe=new Array(z);for(let K=0;K<z;++K){let de=D[K];if(n!=null&&n(K,-1)){ce[K]=tt=>C(de,S,!1,{$event:tt}).value;continue}let re=C(de,S,!0);ce[K]=re.value,xe[K]=re.ref}if(!s)for(let K of y){if(h.has(K))continue;h.add(K);let de=F(K,U);a.push(de)}if(l.refs=xe,i(ce),c.size!==0)for(let K of c)c.has(K)&&K(ce)};U()}catch(T){k(6,`parse error: ${e}`,T)}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 ro=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Bs=(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},Hs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!ro(t[n]))return null;let r=n;for(;n<t.length&&ro(t[n]);)++n;return{start:r,end:n}},oo=new Set(["table","thead","tbody","tfoot"]),_s=new Set(["thead","tbody","tfoot"]),Ps=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Yt=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=Bs(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=Hs(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),oo.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"):_s.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=l==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=Ps.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}),oo.has(C)&&++o}e=a+1}return n.join("")};var Vs="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",js=new Set(Vs.toUpperCase().split(",")),$s="http://www.w3.org/2000/svg",so=(t,e)=>{ue(t)?t.content.appendChild(e):t.appendChild(e)},In=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&js.has(o.toUpperCase())?document.createElementNS($s,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(Rt(u,r),l)}let p=t.c;if(p)for(let f of p)In(f,a,n,r);so(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)so(e,a);else throw new Error("unsupported node type.")}},Ve=(t,e,n)=>{n!=null||(n=se.getDefault());let r=document.createDocumentFragment();if(!R(t))return In(t,r,!!e,n),r;for(let o of t)In(o,r,!!e,n);return r};var io=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),sr(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=se.getDefault());let o=()=>{for(let a of[...r.childNodes])q(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Yt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ve(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Ft(r,n),new Dn(t,r,n).x(),H(r,()=>{Oe(t)}),vt(t),{context:t,unmount:()=>{q(r)},unbind:()=>{pe(r)}}},Dn=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 Xt([e],r),this.i=new Pt(this.h)}x(){this.i.P(this.We)}};var et=t=>{if(R(t))return t.map(o=>et(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=Te(t);return r.length>0&&(e.c=[...r].map(o=>et(o))),e};var ao=(t,e={})=>{var s,i,a,c,p,f;R(e)&&(e={props:e}),j(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(Yt(t.template));t.element=u}else t.json&&(t.element=Ve(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Ft(t.element,(a=e.config)!=null?a:se.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:st(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||st(o)&&o.querySelector("[isSVG]"))){let u=o.content,l=u?[...u.childNodes]:[...o.childNodes],m=et(l);t.element=Ve(m,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var co=t=>{var e;(e=Ie())==null||e.onMounted.push(t)};var po=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw B(4);return e&&!n.isStopped?e(...o):(e=qs(t,n),e(...o))};return r[Q]=1,Le(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},Z(()=>r.stop(),!0),r},qs=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ee(null);e.ref=n,e.isStopped=!1;let r=0,o=He(()=>{if(r>0){o(),e.isStopped=!0,G(n);return}n(t()),++r});return n.stop=o,n};var fo=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw B(4);return r&&!n.isStopped?r(...s):(r=Fs(t,e,n),r(...s))};return o[Q]=1,Le(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Z(()=>o.stop(),!0),o},Fs=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:ee(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,G(r);return}let p=t.map(f=>f());r(e(...p)),++o},i=[];for(let c of t){let p=F(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var uo=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw B(4);return r&&!n.isStopped?r(...s):(r=zs(t,e,n),r(...s))};return o[Q]=1,Le(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Z(()=>o.stop(),!0),o},zs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:ee(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=F(t,i=>{if(o>0){r.stop(),n.isStopped=!0,G(r);return}r(e(i)),++o},!0),r};var lo=t=>(t[Ot]=1,t);var mo=(t,e)=>{if(!e)throw B(5);let r=Be(t)?me:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(ne(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=He(o);return Z(i,!0),t};var Un=(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},ho=Un;var yo=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(F(i,o));n&&o();let s=()=>{for(let i of r)i()};return Z(s,!0),s};var go=t=>{if(!b(t))throw B(3,"observerCount");return t(void 0,void 0,2)};var bo=t=>{Bn();try{t()}finally{Hn()}},Bn=()=>{le.stack||(le.stack=[]),le.stack.push(new Set)},Hn=()=>{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{G(n)}catch(r){console.error(r)}};return wo(Ks);})();
1
+ "use strict";var Regor=(()=>{var lt=Object.defineProperty,go=Object.defineProperties,bo=Object.getOwnPropertyDescriptor,To=Object.getOwnPropertyDescriptors,Co=Object.getOwnPropertyNames,Vn=Object.getOwnPropertySymbols;var jn=Object.prototype.hasOwnProperty,Eo=Object.prototype.propertyIsEnumerable;var mt=Math.pow,en=(t,e,n)=>e in t?lt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dt=(t,e)=>{for(var n in e||(e={}))jn.call(e,n)&&en(t,n,e[n]);if(Vn)for(var n of Vn(e))Eo.call(e,n)&&en(t,n,e[n]);return t},$n=(t,e)=>go(t,To(e));var xo=(t,e)=>{for(var n in e)lt(t,n,{get:e[n],enumerable:!0})},Ro=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Co(e))!jn.call(t,o)&&o!==n&&lt(t,o,{get:()=>e[o],enumerable:!(r=bo(e,o))||r.enumerable});return t};var vo=t=>Ro(lt({},"__esModule",{value:!0}),t);var d=(t,e,n)=>en(t,typeof e!="symbol"?e+"":e,n);var qn=(t,e,n)=>new Promise((r,o)=>{var s=c=>{try{a(n.next(c))}catch(p){o(p)}},i=c=>{try{a(n.throw(c))}catch(p){o(p)}},a=c=>c.done?r(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var Fs={};xo(Fs,{ComponentHead:()=>qe,RegorConfig:()=>ie,addUnbinder:()=>_,batch:()=>yo,collectRefs:()=>Nt,computeMany:()=>co,computeRef:()=>po,computed:()=>ao,createApp:()=>oo,createComponent:()=>so,drainUnbind:()=>zn,endBatch:()=>Hn,entangle:()=>Ge,flatten:()=>ne,getBindData:()=>Ae,html:()=>Un,isDeepRef:()=>Be,isRaw:()=>Je,isRef:()=>T,markRaw:()=>fo,observe:()=>F,observeMany:()=>mo,observerCount:()=>ho,onMounted:()=>io,onUnmounted:()=>Y,pause:()=>$t,persist:()=>uo,raw:()=>lo,ref:()=>de,removeNode:()=>q,resume:()=>qt,silence:()=>Ot,sref:()=>Z,startBatch:()=>Bn,toFragment:()=>Ve,toJsonTemplate:()=>et,trigger:()=>G,unbind:()=>fe,unref:()=>I,useScope:()=>St,warningHandler:()=>rt,watchEffect:()=>He});var je=Symbol(":regor");var fe=t=>{let e=[t];for(;e.length>0;){let n=e.pop();So(n);for(let r=n.lastChild;r!=null;r=r.previousSibling)e.push(r)}},So=t=>{let e=t[je];if(!e)return;let n=e.unbinders;for(let r=0;r<n.length;++r)n[r]();n.length=0,t[je]=void 0};var $e=[],ht=!1,yt,Fn=()=>{if(ht=!1,yt=void 0,$e.length!==0){for(let t=0;t<$e.length;++t)fe($e[t]);$e.length=0}},q=t=>{t.remove(),$e.push(t),ht||(ht=!0,yt=setTimeout(Fn,1))},zn=()=>qn(null,null,function*(){$e.length===0&&!ht||(yt&&clearTimeout(yt),Fn())});var V=t=>typeof t=="function",j=t=>typeof t=="string",Kn=t=>typeof t=="undefined",ae=t=>t==null||typeof t=="undefined",W=t=>typeof t!="string"||!(t!=null&&t.trim()),wo=Object.prototype.toString,tn=t=>wo.call(t),Se=t=>tn(t)==="[object Map]",se=t=>tn(t)==="[object Set]",nn=t=>tn(t)==="[object Date]",nt=t=>typeof t=="symbol",x=Array.isArray,L=t=>t!==null&&typeof t=="object";var Wn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},H=(t,...e)=>{let n=Wn[t];return new Error(V(n)?n.call(Wn,...e):n)};var gt=[],Gn=()=>{let t={onMounted:[],onUnmounted:[]};return gt.push(t),t},Ie=t=>{let e=gt[gt.length-1];if(!e&&!t)throw H(2);return e},Jn=t=>{let e=Ie();return t&&on(t),gt.pop(),e},rn=Symbol("csp"),on=t=>{let e=t,n=e[rn];if(n){let r=Ie();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[rn]=Ie()},bt=t=>t[rn];var we=t=>{var n,r;let e=(n=bt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(o=>{o()}),(r=t.unmounted)==null||r.call(t)};var qe=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;)q(e),e=e.nextSibling;for(let r of this.ctx)we(r)}};var Ae=t=>{let e=t,n=e[je];if(n)return n;let r={unbinders:[],data:{}};return e[je]=r,r};var _=(t,e)=>{Ae(t).unbinders.push(e)};var Qn={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=Qn[t],r=V(n)?n.call(Qn,...e):n,o=rt.warning;o&&(j(r)?o(r):o(r,...r.args))},rt={warning:console.warn};var Ct={},Tt={},Xn=1,Yn=t=>{let e=(Xn++).toString();return Ct[e]=t,Tt[e]=0,e},sn=t=>{Tt[t]+=1},an=t=>{--Tt[t]===0&&(delete Ct[t],delete Tt[t])},Zn=t=>Ct[t],cn=()=>Xn!==1&&Object.keys(Ct).length>0,ot="r-switch",Ao=t=>{let e=t.filter(r=>De(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(ot))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Fe=(t,e)=>{if(!cn())return;let n=Ao(e);n.length!==0&&(n.forEach(sn),_(t,()=>{n.forEach(an)}))};var pn=(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)},fn=Symbol("r-if"),er=Symbol("r-else"),tr=t=>t[er]===1,Et=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=Ke(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=Oe(e,this.q);for(let o of r)this.T(o);return n}z(e){return e[fn]?!0:(e[fn]=!0,Oe(e,this.q).forEach(n=>n[fn]=!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=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r!=null?r:""}`);s.insertBefore(i,e),Fe(i,o),o.forEach(c=>{q(c)}),e.remove(),n!=="if"&&(e[er]=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:()=>{pn(o,this.i,s,a)},unmount:()=>{be(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=[];_(a,()=>{p.stop();for(let h of l)h();l.length=0});let y=p.subscribe?p.subscribe(n):()=>{};return l.push(y),[{mount:()=>{pn(s,this.i,i,c)},unmount:()=>{be(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||(pn(o,this.i,s,a),f=!0),y.forEach(b=>{b.unmount(),b.isMounted=!1});else{be(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=[];_(i,()=>{c.stop();for(let b of h)b();h.length=0}),m();let E=c.subscribe?c.subscribe(m):()=>{};h.push(E)}};var ze=t=>{let e=le(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&&(tr(r)||t.B(r))}},Oe=(t,e)=>{var r;let n=t.querySelectorAll(e);return(r=t.matches)!=null&&r.call(t,e)?[t,...n]:n},le=t=>t instanceof HTMLTemplateElement,De=t=>t.nodeType===Node.ELEMENT_NODE,st=t=>t.nodeType===Node.ELEMENT_NODE,nr=t=>t instanceof HTMLSlotElement,Te=t=>le(t)?t.content.childNodes:t.childNodes,be=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;q(n),n=r}},rr=function(){return this()},Oo=function(t){return this(t)},No=()=>{throw new Error("value is readonly.")},Mo={get:rr,set:Oo,enumerable:!0,configurable:!1},Lo={get:rr,set:No,enumerable:!0,configurable:!1},Me=(t,e)=>{Object.defineProperty(t,"value",e?Lo:Mo)},or=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Ke=t=>`[${CSS.escape(t)}]`,xt=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),un=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ko=/-(\w)/g,$=un(t=>t&&t.replace(ko,(e,n)=>n?n.toUpperCase():"")),Io=/\B([A-Z])/g,We=un(t=>t&&t.replace(Io,"-$1").toLowerCase()),it=un(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Rt={};var vt=t=>{var n,r;let e=(n=bt(t))==null?void 0:n.onMounted;e==null||e.forEach(o=>{o()}),(r=t.mounted)==null||r.call(t)};var ln=Symbol("scope"),St=t=>{try{Gn();let e=t();on(e);let n={context:e,unmount:()=>we(e),[ln]:1};return n[ln]=1,n}finally{Jn()}},sr=t=>L(t)?ln in t:!1;var Y=(t,e)=>{var n;(n=Ie(e))==null||n.onUnmounted.push(t)};var wt=Symbol("ref"),Q=Symbol("sref"),At=Symbol("raw");var T=t=>t!=null&&t[Q]===1;var F=(t,e,n,r=!0)=>{if(!T(t))throw H(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return r&&Y(s,!0),s};var mn={collectRefObj:!0,onBind:(t,e)=>F(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 Ge=(t,e)=>{if(t===e)return()=>{};let n=F(t,o=>e(o)),r=F(e,o=>t(o));return e(t()),()=>{n(),r()}};var Je=t=>!!t&&t[At]===1;var Be=t=>(t==null?void 0:t[wt])===1;var ce=[],ir=t=>{var e;ce.length!==0&&((e=ce[ce.length-1])==null||e.add(t))},He=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Do(t,e),Y(()=>e.stop(),!0),e.stop},Do=(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(ce.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=F(i,()=>{o(),He(t)});n.push(a)}}finally{ce.pop()}},Ot=t=>{let e=ce.length,n=e>0&&ce[e-1];try{return n&&ce.push(null),t()}finally{n&&ce.pop()}},Nt=t=>{try{let e=new Set;return ce.push(e),{value:t(),refs:[...e]}}finally{ce.pop()}};var G=(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)G(s,e,!0);else if(Se(o))for(let s of o)G(s[0],e,!0),G(s[1],e,!0);if(L(o))for(let s in o)G(o[s],e,!0)}};function Uo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(r){let o=t[r];Uo(e,r,function(...i){let a=o.apply(this,i),c=this[Q];for(let p of c)G(p);return a})})},Mt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var ar=Array.prototype,dn=Object.create(ar),Bo=["push","pop","shift","unshift","splice","sort","reverse"];Qe(ar,dn,Bo);var cr=Map.prototype,Lt=Object.create(cr),Ho=["set","clear","delete"];Mt(Lt,"Map");Qe(cr,Lt,Ho);var pr=Set.prototype,kt=Object.create(pr),_o=["add","clear","delete"];Mt(kt,"Set");Qe(pr,kt,_o);var me={},Z=t=>{if(T(t)||Je(t))return t;let e={auto:!0,_value:t},n=c=>L(c)?Q in c?!0:x(c)?(Object.setPrototypeOf(c,dn),!0):se(c)?(Object.setPrototypeOf(c,kt),!0):Se(c)?(Object.setPrototypeOf(c,Lt),!0):!1:!1,r=n(t),o=new Set,s=(c,p)=>{if(me.stack&&me.stack.length){me.stack[me.stack.length-1].add(a);return}o.size!==0&&Ot(()=>{for(let f of[...o.keys()])o.has(f)&&f(c,p)})},i=c=>{let p=c[Q];p||(c[Q]=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):(ir(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[Q]=1,Me(a,!1),r&&i(t),a};var de=t=>{if(Je(t))return t;let e;if(T(t)?(e=t,t=e()):e=Z(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[wt]=1,x(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Be(o)||(t[r]=de(o))}return e}if(!L(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Be(r))continue;let o=n[0];nt(o)||(t[o]=null,t[o]=de(r))}return e};var fr=Symbol("modelBridge"),It=()=>{},Po=t=>!!(t!=null&&t[fr]),Vo=t=>{t[fr]=1},jo=t=>{let e=de(t());return Vo(e),e},ur={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return It;let i=$(r),a,c,p=It,f=()=>{p(),p=It,a=void 0,c=void 0},u=()=>{p(),p=It},l=(y,h)=>{a!==y&&(u(),p=Ge(y,h),a=y)},m=F(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(Po(y)){if(C===y)return;T(C)?l(y,C):h[i]=y;return}c||(c=jo(y)),h[i]=c,l(y,c)},!0);return()=>{p(),m()}}};var Dt=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(We)).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(We)].join(",");if(W(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 D=m.parentElement;if(!D)continue;let z=new Comment(" begin component: "+m.tagName),U=new Comment(" end component: "+m.tagName);D.insertBefore(z,m),m.remove();let pe=n.r.l.context,Re=n.r.l.contextAlias,K=n.r.l.bind,he=(g,N)=>{let R={},P=g.hasAttribute(pe);return r.E(N,()=>{r.v(R),P?n.T(mn,g,pe):g.hasAttribute(Re)&&n.T(mn,g,Re);let S=b.props;if(!S||S.length===0)return;S=S.map($);let v=new Map(S.map(te=>[te.toLowerCase(),te]));for(let te of S.concat(S.map(We))){let oe=g.getAttribute(te);oe!==null&&(R[$(te)]=oe,g.removeAttribute(te))}let B=n.W.he(g,!1);for(let[te,oe]of B.entries()){let[ke,_n]=oe.G;if(!_n)continue;let Pn=v.get($(_n).toLowerCase());Pn&&(ke!=="."&&ke!==":"&&ke!==K||n.T(ur,g,te,!0,Pn,oe.J))}}),R},re=[...r.k()],tt=()=>{var P;let g=he(m,re),N=new qe(g,m,re,z,U),R=St(()=>{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 B=R[S];if(B===v)continue;if(T(B)){T(v)?N.entangle?_(z,Ge(v,B)):B(v()):B(v);continue}}else R[S]=v;(P=N.onAutoPropsAssigned)==null||P.call(N)}return{componentCtx:R,head:N}},{componentCtx:ve,head:ft}=tt(),A=[...Te(w)],ut=A.length,M=m.childNodes.length===0,J=g=>{let N=g.parentElement;if(M){for(let v of[...g.childNodes])N.insertBefore(v,g);return}let R=g.name;W(R)&&(R=g.getAttributeNames().filter(v=>v.startsWith("#"))[0],W(R)?R="default":R=R.substring(1));let P=m.querySelector(`template[name='${R}'], template[\\#${R}]`);!P&&R==="default"&&(P=m.querySelector("template:not([name])"),P&&P.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(P=null));let S=v=>{ft.enableSwitch&&r.E(re,()=>{r.v(ve);let B=he(g,r.k());r.E(re,()=>{r.v(B);let te=r.k(),oe=Yn(te);for(let ke of v)De(ke)&&(ke.setAttribute(ot,oe),sn(oe),_(ke,()=>{an(oe)}))})})};if(P){let v=[...Te(P)];for(let B of v)N.insertBefore(B,g);S(v)}else{if(R!=="default"){for(let B of[...Te(g)])N.insertBefore(B,g);return}let v=[...Te(m)].filter(B=>!le(B));for(let B of v)N.insertBefore(B,g);S(v)}},X=g=>{if(!De(g))return;let N=g.querySelectorAll("slot");if(nr(g)){J(g),g.remove();return}for(let R of N)J(R),R.remove()};(()=>{for(let g=0;g<ut;++g)A[g]=A[g].cloneNode(!0),y.insertBefore(A[g],h),X(A[g])})(),D.insertBefore(U,h);let ye=()=>{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 P=m.getAttribute(R);if(R==="class")N.classList.add(...P.split(" "));else if(R==="style"){let S=N.style,v=m.style;for(let B of v)S.setProperty(B,v.getPropertyValue(B))}else N.setAttribute(xt(R,n.r),P)}},O=()=>{for(let g of m.getAttributeNames())!g.startsWith("@")&&!g.startsWith(n.r.l.on)&&m.removeAttribute(g)},ge=()=>{ye(),O(),r.v(ve),n.ge(m,!1),ve.$emit=ft.emit,Ne(n,A),_(m,()=>{we(ve)}),_(z,()=>{fe(m)}),vt(ve)};r.E(re,ge)}}};var hn=class{constructor(e,n){d(this,"G");d(this,"J");d(this,"be",[]);this.G=e,this.J=n}},Ut=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(/[:@]/);W(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(!st(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 hn(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 $o=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Bt=class{constructor(e){d(this,"i");d(this,"L");d(this,"Re");this.i=e,this.L=e.r.l.is,this.Re=Ke(this.L)+", [is]"}O(e){let n=e.hasAttribute(this.L),r=Oe(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=ze(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);o.insertBefore(s,e),Fe(s,r),r.forEach(a=>{q(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=le(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(D=>D[1]===E)[0])==null?void 0:w[0]),!j(E)||W(E)){be(s,i);return}if(u.name===E)return;be(s,i);let b=document.createElement(E);for(let D of e.getAttributeNames())D!==this.L&&b.setAttribute(D,e.getAttribute(D));$o(l,b),o.insertBefore(b,i),this.i.B(b),u.name=E})},y=[];_(s,()=>{a.stop();for(let E of y)E();y.length=0}),m();let C=a.subscribe?a.subscribe(m):()=>{};y.push(C)}};var I=t=>{let e=t;return e!=null&&e[Q]===1?e():e};var at=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 yn=Symbol("r-for"),qo=t=>-1,_t=class _t{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=Ke(this.b),this.x=e.r.l.pre}O(e){let n=e.hasAttribute(this.b),r=Oe(e,this.te);for(let o of r)this.ot(o);return n}z(e){return e[yn]?!0:(e[yn]=!0,Oe(e,this.te).forEach(n=>n[yn]=!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 ae(e)?[]:(V(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 ut;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=(ut=e.getAttribute(o))!=null?ut:e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=ze(e),c=e.parentNode;if(!c)return;let p=`${this.b} => ${n}`,f=new Comment(`__begin__ ${p}`);c.insertBefore(f,e),Fe(f,a),a.forEach(M=>{q(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,J)=>E(M)===E(J),w=(M,J,X)=>{let ee=r.createContext(J,M),ye=at.tt(ee.index,J),O=()=>{var R,P;let ge=(P=(R=u.parentNode)!=null?R:f.parentNode)!=null?P:c,g=X.previousSibling,N=[];for(let S=0;S<a.length;++S){let v=a[S].cloneNode(!0);ge.insertBefore(v,X),N.push(v)}for(Ne(l,N),g=g.nextSibling;g!==X;)ye.items.push(g),g=g.nextSibling};return C?(C[0]=ee.ctx,m.E(C,O)):m.E(y,()=>{m.v(ee.ctx),O()}),ye},D=(M,J)=>{let X=A.V(M).items,ee=X[X.length-1].nextSibling;for(let ye of X)q(ye);A.ee(M,w(M,J,ee))},z=(M,J)=>{A.v(w(M,J,u))},U=M=>{for(let J of A.V(M).items)q(J)},pe=M=>{let J=A.S;for(let X=M;X<J;++X)A.V(X).index(X)},Re=M=>{let J=f.parentNode,X=u.parentNode;if(!J||!X)return;let ee=A.S;V(M)&&(M=M());let ye=I(M[0]);if(x(ye)&&ye.length===0){be(f,u),A.Ce(0);return}let O=0,ge=Number.MAX_SAFE_INTEGER,g=ee,N=this.i.r.forGrowThreshold,R=()=>A.S<g+N;for(let S of this.ve(M[0])){let v=()=>{if(O<ee){let B=A.V(O++);if(b(B.value,S))return;let te=A.rt(E(S));if(te>=O&&te-O<10){if(--O,ge=Math.min(ge,O),U(O),A.Ee(O),--ee,te>O+1)for(let oe=O;oe<te-1&&oe<ee&&!b(A.V(O).value,S);)++oe,U(O),A.Ee(O),--ee;v();return}R()?(A.nt(O-1,w(O,S,A.V(O-1).items[0])),ge=Math.min(ge,O-1),++ee):D(O-1,S)}else z(O++,S)};v()}let P=O;for(ee=A.S;O<ee;)U(O++);A.Ce(P),pe(ge)},K=()=>{ve=re.subscribe?re.subscribe(Re):()=>{}},he=()=>{re.stop(),ve()},re=m.M(r.list),tt=re.value,ve,ft=0,A=new at(E);for(let M of this.ve(tt()[0]))A.v(w(ft++,M,u));_(f,he),K()}it(e){var c,p;let n=_t.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=I(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:qo};return s&&(y.index=l[s.startsWith("#")?s.substring(1):s]=Z(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=I(s),a=this.Se(i,r);return a!==void 0||!o?a:this.Se(i,o)}}return r=>{var o;return I((o=I(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=I(r))==null?void 0:o[s];return I(r)}};d(_t,"ct",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Ht=_t;var Pt=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 Ht(this),this.we=new Et(this),this.Oe=new Bt(this),this.Ne=new Dt(this),this.W=new Ut(this),this.x=this.r.l.pre,this.Me=this.r.l.dynamic}lt(e){let n=le(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)}}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(ot);if(u)return u;f=f.parentElement}return null};if(cn()){let p=c(n);if(p){this.h.E(Zn(p),()=>{this.N(e,n,a,s,i)});return}}this.N(e,n,a,s,i)}ut(e,n,r){if(e!==Rt)return!1;if(W(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,_(i,()=>{q(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;_(n,()=>{i.stop(),u==null||u.stop();for(let E=0;E<a.length;++E)a[E]();a.length=0});let f=or(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 U;let b=y,w=h,D=i.value(),z=m?l.value()[0]:o;y=D,h=z,(U=e.onChange)==null||U.call(e,n,D,b,z,w,s)}):()=>{};if(a.push(E),l){let b=l.subscribe?l.subscribe(()=>{var U;let w=h,D=i.value(),z=l.value()[0];y=D,h=z,(U=e.onChange)==null||U.call(e,n,D,w,z,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 lr="http://www.w3.org/1999/xlink",Fo={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 zo(t){return!!t||t===""}var gn={onChange:(t,e,n,r,o,s)=>{var a;if(r){s&&s.includes("camel")&&(r=$(r)),Vt(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];Vt(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;Vt(t,u,l,y)}else{let f=n==null?void 0:n[c],u=e[c++],l=e[c];Vt(t,u,l,f)}}}},Vt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ae(e)){k(3,"r-bind",t);return}if(!j(e)){k(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ae(n)?t.removeAttributeNS(lr,e.slice(6,e.length)):t.setAttributeNS(lr,e,n);return}let o=e in Fo;ae(n)||o&&!zo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};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(x(s)){let a=s.length;for(let c=0;c<a;++c)mr(t,s[c],i==null?void 0:i[c])}else mr(t,s,i)}}},mr=(t,e,n)=>{let r=t.classList,o=j(e),s=j(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 dr={onChange:(t,e)=>{let[n,r]=e;V(r)?r(t,n):t.innerHTML=n==null?void 0:n.toString()}};function Ko(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=nn(t),r=nn(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=nt(t),r=nt(e),n||r)return t===e;if(n=x(t),r=x(e),n||r)return n&&r?Ko(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 jt(t,e){return t.findIndex(n=>Ce(n,e))}var hr=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var $t=t=>{if(!T(t))throw H(3,"pause");t(void 0,void 0,3)};var qt=t=>{if(!T(t))throw H(3,"resume");t(void 0,void 0,4)};var gr={onChange:(t,e)=>{Wo(t,e[0])},onBind:(t,e,n,r,o,s)=>Go(t,e,s)},Wo=(t,e)=>{let n=Er(t);if(n&&br(t))x(e)?e=jt(e,Ee(t))>-1:se(e)?e=e.has(Ee(t)):e=es(t,e),t.checked=e;else if(n&&Tr(t))t.checked=Ce(e,Ee(t));else if(n||xr(t))Cr(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Rr(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=jt(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)},ct=t=>(T(t)&&(t=t()),V(t)&&(t=t()),t?j(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}),br=t=>t.type==="checkbox",Tr=t=>t.type==="radio",Cr=t=>t.type==="number"||t.type==="range",Er=t=>t.tagName==="INPUT",xr=t=>t.tagName==="TEXTAREA",Rr=t=>t.tagName==="SELECT",Go=(t,e,n)=>{let r=e.value,o=ct(n==null?void 0:n.join(",")),s=ct(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=Er(t);return c&&br(t)?Qo(t,a):c&&Tr(t)?ts(t,a):c||xr(t)?Jo(t,i,a,r):Rr(t)?ns(t,a,r):(k(7,t),()=>{})},yr=/[.,' ·٫]/,Jo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Cr(t),a=()=>{!e.trim&&!ct(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=ct(r()[1]);if(i||C.number||C.int){if(C.int)h=parseInt(h);else{if(yr.test(h[h.length-1])&&h.split(yr).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},Qo=(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=jt(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(Zo(t,a))};return t.addEventListener(n,o),r},Ee=t=>"_value"in t?t._value:t.value,vr="trueValue",Xo="falseValue",Sr="true-value",Yo="false-value",Zo=(t,e)=>{let n=e?vr:Xo;if(n in t)return t[n];let r=e?Sr:Yo;return t.hasAttribute(r)?t.getAttribute(r):e},es=(t,e)=>{if(vr in t)return Ce(e,t.trueValue);let r=Sr;return t.hasAttribute(r)?Ce(e,t.getAttribute(r)):Ce(e,!0)},ts=(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},ns=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=ct(n()[1]).number,p=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?hr(Ee(f)):Ee(f));if(t.multiple){let f=i();try{if($t(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{qt(i),G(i)}}else i(p[0])};return t.addEventListener(r,s),o};var rs=["stop","prevent","capture","self","once","left","right","middle","passive"],os=t=>{let e={};if(W(t))return;let n=t.split(",");for(let r of rs)e[r]=n.includes(r);return e},Cn={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=I(o.value()[0]);return j(m)?Tn(t,$(m),()=>e.value()[0],(f=s==null?void 0:s.join(","))!=null?f:l[1]):()=>{}}else if(r){let l=e.value();return Tn(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(V(m)&&(m=m()),L(m))for(let y of Object.entries(m)){let h=y[0],C=()=>{let b=e.value()[l];return V(b)&&(b=b()),b=b[h],V(b)&&(b=b()),b},E=m[h+"_flags"];i.push(Tn(t,h,C,E))}else k(2,"r-on",t)}return a}},ss=(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]},Tn=(t,e,n,r)=>{if(W(e))return k(5,"r-on",t),()=>{};let o=os(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=ss(e,r);let a=f=>{if(!i(f)||!n&&e==="submit"&&(o!=null&&o.prevent))return;let u=n(f);V(u)&&(u=u(f)),V(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 wr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=$(r)),Xe(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];Xe(t,p,f)}else if(L(c))for(let p of Object.entries(c)){let f=p[0],u=p[1];Xe(t,f,u)}else{let p=e[a++],f=e[a];Xe(t,p,f)}}}};function is(t){return!!t||t===""}var Xe=(t,e,n)=>{if(ae(e)){k(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(fe),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=is(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 Ar={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 Or={onChange:(t,e)=>{let n=Ae(t).data,r=n._ord;Kn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var Ft={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)Nr(t,s[c],i==null?void 0:i[c])}else Nr(t,s,i)}}},Nr=(t,e,n)=>{let r=t.style,o=j(e);if(e&&!o){if(n&&!j(n))for(let s in n)e[s]==null&&xn(r,s,"");for(let s in e)xn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ae(t).data)return;r.display=s}},Mr=/\s*!important$/;function xn(t,e,n){if(x(n))n.forEach(r=>{xn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=as(t,e);Mr.test(n)?t.setProperty(We(r),n.replace(Mr,""),"important"):t[r]=n}}var Lr=["Webkit","Moz","ms"],En={};function as(t,e){let n=En[e];if(n)return n;let r=$(e);if(r!=="filter"&&r in t)return En[e]=r;r=it(r);for(let o=0;o<Lr.length;o++){let s=Lr[o]+r;if(s in t)return En[e]=s}return e}var ne=t=>kr(I(t)),kr=(t,e=new WeakMap)=>{if(!t||!L(t))return t;if(x(t))return t.map(ne);if(se(t)){let r=new Set;for(let o of t.keys())r.add(ne(o));return r}if(Se(t)){let r=new Map;for(let o of t)r.set(ne(o[0]),ne(o[1]));return r}if(e.has(t))return I(e.get(t));let n=dt({},t);e.set(t,n);for(let r of Object.entries(n))n[r[0]]=kr(I(r[1]),e);return n};var Ir={onChange:(t,e)=>{var r;let n=e[0];t.textContent=se(n)?JSON.stringify(ne([...n])):Se(n)?JSON.stringify(ne([...n])):L(n)?JSON.stringify(ne(n)):(r=n==null?void 0:n.toString())!=null?r:""}};var Dr={onChange:(t,e)=>{Xe(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=de,e.sref=Z,e.flatten=ne,e}addComponent(...e){for(let n of e){if(!n.defaultName){rt.warning("Registered component's default name is not defined",n);continue}this.me.set(it(n.defaultName),n),this.de.set(it(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this._={".":wr,":":gn,"@":Cn,[`${e}on`]:Cn,[`${e}bind`]:gn,[`${e}html`]:dr,[`${e}text`]:Ir,[`${e}show`]:Or,[`${e}model`]:gr,":style":Ft,[`${e}style`]:Ft,[`${e}bind:style`]:Ft,":class":bn,[`${e}bind:class`]:bn,":ref":Ar,":value":Dr,[`${e}teleport`]:Rt},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(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 ie=Le;var zt=(t,e)=>{if(!t)return;let r=(e!=null?e:ie.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of ps(t,r.pre,s))cs(i,r.text,o,s)},cs=(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=Ur(p,r);if(f&&W(i[0])&&W(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=Ur(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)},ps=(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 Te(s))o(a)}};return o(t),r},Ur=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var fs=9,us=10,ls=13,ms=32,xe=46,Kt=44,ds=39,hs=34,Wt=40,Ye=41,Gt=91,Rn=93,vn=63,ys=59,Br=58,Hr=123,Jt=125,_e=43,Qt=45,Sn=96,_r=47,wn=92,Pr=new Set([2,3]),zr={"=":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},gs=$n(dt({"=>":2},zr),{"||":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}),Kr=Object.keys(zr),bs=new Set(Kr),On=new Set(["=>"]);Kr.forEach(t=>On.add(t));var Vr={true:!0,false:!1,null:null},Ts="this",Ze="Expected ",Pe="Unexpected ",Mn="Unclosed ",Cs=Ze+":",jr=Ze+"expression",Es="missing }",xs=Pe+"object property",Rs=Mn+"(",$r=Ze+"comma",qr=Pe+"token ",vs=Pe+"period",An=Ze+"expression after ",Ss="missing unaryOp argument",ws=Mn+"[",As=Ze+"exponent (",Os="Variable names cannot start with a number (",Ns=Mn+'quote after "',pt=t=>t>=48&&t<=57,Fr=t=>gs[t],Nn=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)||pt(e)}o(e){return new Error(`${e} at character ${this.e}`)}y(){let e=this.m,n=this.p,r=this.e;for(;e===ms||e===fs||e===us||e===ls;)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===ys||r===Kt)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(Pe+'"'+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:Fr(n),right_a:On.has(n)},i=this.j(),!i)throw this.o(An+n);let p=[s,o,i];for(;n=this.oe();){r=Fr(n),o={value:n,prec:r,right_a:On.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(An+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(pt(n)||n===xe)return this.gt();if(n===ds||n===hs)e=this.bt();else if(n===Gt)e=this.xt();else{let r=this.Tt();if(r){let o=this.j();if(!o)throw this.o(Ss);return this.se({type:7,operator:r,argument:o})}this.H(n)?(e=this.ie(),e.name in Vr?e={type:4,value:Vr[e.name],raw:e.name}:e.name===Ts&&(e={type:5})):n===Wt&&(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 bs.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===Qt?(this.e++,"-"):r===33?(this.e++,"!"):r===126?(this.e++,"~"):r===_e?(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===Gt||n===Wt||n===vn;){let r;if(n===vn){if(this.p.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.m}if(this.e++,n===Gt){if(e={type:3,computed:!0,object:e,property:this.w()},this.y(),n=this.m,n!==Rn)throw this.o(ws);this.e++}else n===Wt?e={type:6,arguments:this.De(Ye),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(;pt(e.charCodeAt(r));)r++;if(e.charCodeAt(r)===xe)for(r++;pt(e.charCodeAt(r));)r++;let o=e.charCodeAt(r);if(o===101||o===69){r++;let a=e.charCodeAt(r);(a===_e||a===Qt)&&r++;let c=r;for(;pt(e.charCodeAt(r));)r++;if(c===r){this.e=r;let p=e.slice(n,r);throw this.o(As+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===xe||s.length===1&&s.charCodeAt(0)===xe)throw this.o(vs);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===wn){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(Ns+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(Pe+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===Ye&&o&&o>=n.length)throw this.o(qr+String.fromCharCode(e));break}else if(s===Kt){if(this.e++,o++,o!==n.length){if(e===Ye)throw this.o(qr+",");for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.o($r);{let i=this.w();if(!i||i.type===0)throw this.o($r);n.push(i)}}}if(!r)throw this.o(Ze+String.fromCharCode(e));return n}Rt(){this.e++;let e=this.re(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.o(Rs)}xt(){return this.e++,{type:9,elements:this.De(Rn)}}Et(e){if(this.f(Hr)){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(Kt)||this.f(Jt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.f(Br)){this.e++;let o=this.w();if(!o)throw this.o(xs);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(Kt)&&this.e++}throw this.o(Es)}}Ct(e){let n=this.m;if((n===_e||n===Qt)&&n===this.p.charCodeAt(this.e+1)){this.e+=2;let r=e.node={type:13,operator:n===_e?"++":"--",argument:this.$(this.ie()),prefix:!0};if(!r.argument||!Pr.has(r.argument.type))throw this.o(Pe+r.operator)}}At(e){let n=e.node,r=this.m;if((r===_e||r===Qt)&&r===this.p.charCodeAt(this.e+1)){if(!Pr.has(n.type))throw this.o(Pe+(r===_e?"++":"--"));this.e+=2,e.node={type:13,operator:r===_e?"++":"--",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(vn)){this.e++;let n=e.node,r=this.w();if(!r)throw this.o(jr);if(this.y(),this.f(Br)){this.e++;let o=this.w();if(!o)throw this.o(jr);e.node={type:11,test:n,consequent:r,alternate:o}}else throw this.o(Cs)}}Nt(e){if(this.y(),this.f(Wt)){let n=this.e;if(this.e++,this.y(),this.f(Ye)){this.e++;let r=this.oe();if(r==="=>"){let o=this.Le();if(!o)throw this.o(An+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(Sn)&&(e.node={type:17,tag:n,quasi:this.Ie(e)})}Ie(e){if(!this.f(Sn))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===Sn)return p(!0),this.e+=1,e.node=o,o;if(f===36&&n.charCodeAt(this.e+1)===Hr){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===wn){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(_r))return;let n=++this.e,r=!1;for(;this.e<this.p.length;){if(this.m===_r&&!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(Gt)?r=!0:r&&this.f(Rn)&&(r=!1),this.e+=this.f(wn)?2:1}throw this.o("Unclosed Regex")}},Wr=t=>new Nn(t).parse();var Ms={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>mt(t,e)},Ls={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Xr=t=>{if(!(t!=null&&t.some(Qr)))return t;let e=[];return t.forEach(n=>Qr(n)?e.push(...n):e.push(n)),e},Gr=(...t)=>Xr(t),Ln=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ks={"++":(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]}},Is={"++":(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]--}},Jr={"=":(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(mt(r(),n)):t[e]=mt(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}},Xt=(t,e)=>V(t)?t.bind(e):t,kn=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],Xt(I(r[o]),r);for(let i of this.u)if(o in i)return this.A=i[o],Xt(I(i[o]),i);let s=this.Be;if(s&&o in s)return this.A=s[o],Xt(I(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.qe(n,r,Gr,...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,Xt(I(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>V(i)?i(...Xr(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,Ls[e.operator],e.argument)}8(e,n,r){let o=Ms[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,Gr,...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,Ln(u,r)),p=u=>this.Fe(a,e.value,n,Ln(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=I(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?ks:Is;if(o.type===2){let a=o.name,c=this.$e(a,r);return ae(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(ae(a))return;let c=this.g(e.right,n,r);return Jr[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 Jr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return x(o)&&(o.s=Yr),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=I(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}=Nt(()=>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,Ln(p,n)):this.g(a,e,n)));return r(...i)}},Yr=Symbol("s"),Qr=t=>(t==null?void 0:t.s)===Yr,Zr=(t,e,n,r,o,s,i)=>new kn(e,n,r,o,i).eval(t,s);var eo={},Yt=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=Z([]),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(W(e))return l;let m=this.r.globalContext,y=[],h=new Set,C=(b,w,D,z)=>{try{let U=Zr(b,w,m,n,r,z,o);return D&&y.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){k(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let b=(E=eo[e])!=null?E:Wr("["+e+"]");eo[e]=b;let w=this.u.slice(),D=b.elements,z=D.length,U=()=>{y.length=0,h.clear(),p();let pe=new Array(z),Re=new Array(z);for(let K=0;K<z;++K){let he=D[K];if(n!=null&&n(K,-1)){pe[K]=tt=>C(he,w,!1,{$event:tt}).value;continue}let re=C(he,w,!0);pe[K]=re.value,Re[K]=re.ref}if(!s)for(let K of y){if(h.has(K))continue;h.add(K);let he=F(K,U);a.push(he)}if(l.refs=Re,i(pe),c.size!==0)for(let K of c)c.has(K)&&K(pe)};U()}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 to=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Ds=(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||!to(t[n]))return null;let r=n;for(;n<t.length&&to(t[n]);)++n;return{start:r,end:n}},no=new Set(["table","thead","tbody","tfoot"]),Bs=new Set(["thead","tbody","tfoot"]),Hs=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=Ds(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=Us(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),no.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"):Bs.has((s=y==null?void 0:y.effectiveTag)!=null?s:"")?h=l==="tr"?null:"tr":(y==null?void 0:y.effectiveTag)==="table"?h=Hs.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}),no.has(C)&&++o}e=a+1}return n.join("")};var _s="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",Ps=new Set(_s.toUpperCase().split(",")),Vs="http://www.w3.org/2000/svg",ro=(t,e)=>{le(t)?t.content.appendChild(e):t.appendChild(e)},In=(t,e,n,r)=>{var i;let o=t.t;if(o){let a=n&&Ps.has(o.toUpperCase())?document.createElementNS(Vs,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(xt(u,r),l)}let p=t.c;if(p)for(let f of p)In(f,a,n,r);ro(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)ro(e,a);else throw new Error("unsupported node type.")}},Ve=(t,e,n)=>{n!=null||(n=ie.getDefault());let r=document.createDocumentFragment();if(!x(t))return In(t,r,!!e,n),r;for(let o of t)In(o,r,!!e,n);return r};var oo=(t,e={selector:"#app"},n)=>{j(e)&&(e={selector:"#app",template:e}),sr(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!De(r))throw H(0);n||(n=ie.getDefault());let o=()=>{for(let a of[...r.childNodes])q(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=Ve(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&zt(r,n),new Dn(t,r,n).T(),_(r,()=>{we(t)}),vt(t),{context:t,unmount:()=>{q(r)},unbind:()=>{fe(r)}}},Dn=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 Yt([e],r),this.i=new Pt(this.h)}T(){this.i.B(this.We)}};var et=t=>{if(x(t))return t.map(o=>et(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=Te(t);return r.length>0&&(e.c=[...r].map(o=>et(o))),e};var so=(t,e={})=>{var s,i,a,c,p,f;x(e)&&(e={props:e}),j(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 H(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=Ve(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&zt(t.element,(a=e.config)!=null?a:ie.getDefault());let o=t.element;if(!r&&(((p=t.isSVG)!=null?p:st(o)&&((c=o.hasAttribute)!=null&&c.call(o,"isSVG")))||st(o)&&o.querySelector("[isSVG]"))){let u=o.content,l=u?[...u.childNodes]:[...o.childNodes],m=et(l);t.element=Ve(m,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var io=t=>{var e;(e=Ie())==null||e.onMounted.push(t)};var ao=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw H(4);return e&&!n.isStopped?e(...o):(e=js(t,n),e(...o))};return r[Q]=1,Me(r,!0),r.stop=()=>{var o,s;return(s=(o=n.ref)==null?void 0:o.stop)==null?void 0:s.call(o)},Y(()=>r.stop(),!0),r},js=(t,e)=>{var s;let n=(s=e.ref)!=null?s:Z(null);e.ref=n,e.isStopped=!1;let r=0,o=He(()=>{if(r>0){o(),e.isStopped=!0,G(n);return}n(t()),++r});return n.stop=o,n};var co=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw H(4);return r&&!n.isStopped?r(...s):(r=$s(t,e,n),r(...s))};return o[Q]=1,Me(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Y(()=>o.stop(),!0),o},$s=(t,e,n)=>{var a;let r=(a=n.ref)!=null?a:Z(null);n.ref=r,n.isStopped=!1;let o=0,s=c=>{if(o>0){r.stop(),n.isStopped=!0,G(r);return}let p=t.map(f=>f());r(e(...p)),++o},i=[];for(let c of t){let p=F(c,s);i.push(p)}return s(null),r.stop=()=>{i.forEach(c=>{c()})},r};var po=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw H(4);return r&&!n.isStopped?r(...s):(r=qs(t,e,n),r(...s))};return o[Q]=1,Me(o,!0),o.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},Y(()=>o.stop(),!0),o},qs=(t,e,n)=>{var s;let r=(s=n.ref)!=null?s:Z(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=F(t,i=>{if(o>0){r.stop(),n.isStopped=!0,G(r);return}r(e(i)),++o},!0),r};var fo=t=>(t[At]=1,t);var uo=(t,e)=>{if(!e)throw H(5);let r=Be(t)?de:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(ne(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=He(o);return Y(i,!0),t};var Un=(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},lo=Un;var mo=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(F(i,o));n&&o();let s=()=>{for(let i of r)i()};return Y(s,!0),s};var ho=t=>{if(!T(t))throw H(3,"observerCount");return t(void 0,void 0,2)};var yo=t=>{Bn();try{t()}finally{Hn()}},Bn=()=>{me.stack||(me.stack=[]),me.stack.push(new Set)},Hn=()=>{let t=me.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 me.stack;for(let n of e)try{G(n)}catch(r){console.error(r)}};return vo(Fs);})();
@@ -210,30 +210,105 @@ var callUnmounted = (context) => {
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
- /** Automatically assigns properties defined in the :props binding to the component context when enabled. If disabled, props should be manually assigned using head.props.
218
- * Default: true */
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
- /** When both autoProps and entangle are enabled,
221
- * the refs defined in the component context (without using head.props)
222
- * become entangled with the head.props refs. (parent[ref] `<==>` component[ref])
223
- * This means that changes to parent[ref] reflect in component[ref], and vice versa.
224
- * Disable this flag to isolate refs created within the component context.
225
- * Default: true */
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
- /** enables slot context switch to the parent
228
- * Default: false */
285
+ /**
286
+ * Enables slot context switch behavior for advanced slot scenarios.
287
+ * Default: `false`.
288
+ */
229
289
  __publicField(this, "enableSwitch", false);
230
- /** A callback invoked after auto props get assigned to the component context. */
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
- /** use arrow syntax to be called without using head.emit.bind(head) in Binder.ts. */
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 ComponentHead = class {
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 observe = (source, observer, init, trackUnmount = true) => {
726
805
  return stop;
727
806
  };
728
807
 
729
- // src/directives/props.ts
730
- var propsDirective = {
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 propsDirective = {
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 ComponentBinder = class {
1247
1298
  const endOfComponent = new Comment(" end component: " + component.tagName);
1248
1299
  componentParent.insertBefore(startOfComponent, component);
1249
1300
  component.remove();
1250
- const propsName = binder.__config.__builtInNames.props;
1251
- const propsOnceName = binder.__config.__builtInNames.propsOnce;
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 hasProps = component2.hasAttribute(propsName);
1256
- const hasPropsOnce = component2.hasAttribute(propsOnceName);
1306
+ const hasContext = component2.hasAttribute(contextName);
1257
1307
  parser.__scoped(capturedContext2, () => {
1258
1308
  parser.__push(props);
1259
- if (hasProps) binder.__bind(propsDirective, component2, propsName);
1260
- if (hasPropsOnce)
1261
- binder.__bind(propsOnceDirective, component2, propsOnceName);
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 ComponentBinder = class {
1315
1367
  if (key in componentCtx2) {
1316
1368
  const compValue = componentCtx2[key];
1317
1369
  if (compValue === propsValue) continue;
1318
- if (head2.entangle && isRef(compValue) && isRef(propsValue)) {
1319
- addUnbinder(startOfComponent, entangle(propsValue, compValue));
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 ComponentBinder = class {
1427
1491
  const inheritor = inheritorChildNodes[0];
1428
1492
  if (!inheritor) return;
1429
1493
  for (const attrName of component.getAttributeNames()) {
1430
- if (attrName === propsName || attrName === propsOnceName) continue;
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 _RegorConfig = class _RegorConfig {
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 _RegorConfig = class _RegorConfig {
3325
3391
  pre: `${prefix}pre`,
3326
3392
  inherit: `${prefix}inherit`,
3327
3393
  text: `${prefix}text`,
3328
- props: ":props",
3329
- propsOnce: ":props-once",
3394
+ context: ":context",
3395
+ contextAlias: `${prefix}context`,
3330
3396
  bind: `${prefix}bind`,
3331
3397
  on: `${prefix}on`,
3332
3398
  keyBind: ":key",