regor 1.5.5 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- var gr=Object.defineProperty,br=Object.defineProperties;var Tr=Object.getOwnPropertyDescriptors;var Gn=Object.getOwnPropertySymbols;var xr=Object.prototype.hasOwnProperty,Cr=Object.prototype.propertyIsEnumerable;var ht=Math.pow,an=(t,e,n)=>e in t?gr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,yt=(t,e)=>{for(var n in e||(e={}))xr.call(e,n)&&an(t,n,e[n]);if(Gn)for(var n of Gn(e))Cr.call(e,n)&&an(t,n,e[n]);return t},Jn=(t,e)=>br(t,Tr(e));var m=(t,e,n)=>an(t,typeof e!="symbol"?e+"":e,n);var Qn=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(l){r(l)}},i=c=>{try{a(n.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var $e=Symbol(":regor");var Ce=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Er(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Er=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var _e=[],gt=!1,bt,Xn=()=>{if(gt=!1,bt=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)Ce(_e[t]);_e.length=0}},Q=t=>{t.remove(),_e.push(t),gt||(gt=!0,bt=setTimeout(Xn,1))},Rr=()=>Qn(null,null,function*(){_e.length===0&&!gt||(bt&&clearTimeout(bt),Xn())});var K=t=>typeof t=="function",W=t=>typeof t=="string",Yn=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),wr=Object.prototype.toString,cn=t=>wr.call(t),Oe=t=>cn(t)==="[object Map]",fe=t=>cn(t)==="[object Set]",un=t=>cn(t)==="[object Date]",nt=t=>typeof t=="symbol",w=Array.isArray,N=t=>t!==null&&typeof t=="object";var Zn={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},$=(t,...e)=>{let n=Zn[t];return new Error(K(n)?n.call(Zn,...e):n)};var Tt=[],eo=()=>{let t={onMounted:[],onUnmounted:[]};return Tt.push(t),t},De=t=>{let e=Tt[Tt.length-1];if(!e&&!t)throw $(2);return e},to=t=>{let e=De();return t&&ln(t),Tt.pop(),e},fn=Symbol("csp"),ln=t=>{let e=t,n=e[fn];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[fn]=De()},xt=t=>t[fn];var Me=t=>{var n,o;let e=(n=xt(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var no={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},H=(t,...e)=>{let n=no[t],o=K(n)?n.call(no,...e):n,r=Fe.warning;r&&(W(o)?r(o):r(o,...o.args))},Fe={warning:console.warn};var Ct=Symbol("ref"),ee=Symbol("sref"),Et=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var ke=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},be=(t,e)=>{throw new ke(t,`${e}.`)},Rt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${Rt(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},Sr=t=>t.length>60?`${t.slice(0,57)}...`:t,ot=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${ot(s,e+1)})`}if(typeof t=="string")return Sr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>ot(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(N(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=ot(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ae=t=>{if(C(t))return`got ${Rt(t)}(${ot(t())})`;let e=Rt(t),n=ot(t);return`got ${e} (${n})`},vr=t=>t instanceof ke?t.detail:t instanceof Error?t.message:String(t),oo=(t,e)=>{let n=`, ${ae(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Ar=(t,e,n)=>{if(e instanceof ke){if(e.propPath===t)return oo(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let o=oo(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return vr(e)},Nr=(t,e,n)=>{let o=[];for(let r of e){let s=Ar(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ae(n):o.length===1?`${o[0]}, ${ae(n)}`:`${o.join(" or ")}, ${ae(n)}`},Or=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":Rt(t),Mr=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${ae(t)}`)},kr=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${ae(t)}`)},Lr=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${ae(t)}`)},Ir=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${ae(e)}`)},Vr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Pr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Dr=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}be(n,Nr(n,r,e))},Ur=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>Or(o)).join(", ")}, ${ae(e)}`)},Hr=t=>(e,n,o)=>{w(e)||be(n,`expected array, ${ae(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function Br(t){return(e,n,o)=>{N(e)||be(n,`expected object, ${ae(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var jr=t=>(e,n,o)=>{if(C(e)){t(e(),`${n}.value`,o);return}be(n,`expected ref, ${ae(e)}`)},$r={fail:be,describe:ae,isString:Mr,isNumber:kr,isBoolean:Lr,isClass:Ir,optional:Vr,nullable:Pr,or:Dr,oneOf:Ur,arrayOf:Hr,shape:Br,refOf:jr};var _r=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof ke?n.propPath:e,s=n instanceof ke?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},rt=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=_r(this.G,o,i);if(this.J==="warn"){Fe.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Q(e),e=e.nextSibling;for(let o of this.ctx)Me(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var G=(t,e)=>{Ue(t).unbinders.push(e)};var St={},wt={},ro=1,so=t=>{let e=(ro++).toString();return St[e]=t,wt[e]=0,e},pn=t=>{wt[t]+=1},mn=t=>{--wt[t]===0&&(delete St[t],delete wt[t])},io=t=>St[t],dn=()=>ro!==1&&Object.keys(St).length>0,st="r-switch",Fr=t=>{let e=t.filter(o=>Ee(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(st))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},qe=(t,e)=>{if(!dn())return;let n=Fr(e);n.length!==0&&(n.forEach(pn),G(t,()=>{n.forEach(mn)}))};var vt=()=>{},hn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Le(e,r)},yn=Symbol("r-if"),ao=Symbol("r-else"),co=t=>t[ao]===1,At=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=Ot(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[yn]?!0:(e[yn]=!0,Nt(e,this.ge).forEach(n=>n[yn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){H(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),qe(i,r),r.forEach(c=>{Q(c)}),e.remove(),n!=="if"&&(e[ao]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{hn(r,this.o,s,a)},unmount:()=>{Re(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.V(r),f=l.value,u=this.be(o,n),p=vt;return G(a,()=>{l.stop(),p(),p=vt}),p=l.subscribe(n),[{mount:()=>{hn(s,this.o,i,c)},unmount:()=>{Re(a,c)},isTrue:()=>!!f()[0],isMounted:!1},...u]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.V(n),l=c.value,f=!1,u=this.o.m,p=u.L(),h=()=>{u.E(p,()=>{if(l()[0])f||(hn(r,this.o,s,a),f=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{Re(i,a),f=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=vt;G(i,()=>{c.stop(),d(),d=vt}),h(),d=c.subscribe(h)}};var ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Le=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(co(o)||t.$(o))}},Nt=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,Ee=t=>t.nodeType===Node.ELEMENT_NODE,it=t=>t.nodeType===Node.ELEMENT_NODE,uo=t=>t instanceof HTMLSlotElement,we=t=>de(t)?t.content.childNodes:t.childNodes,Re=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;Q(n),n=o}},fo=function(){return this()},qr=function(t){return this(t)},zr=()=>{throw new Error("value is readonly.")},Kr={get:fo,set:qr,enumerable:!0,configurable:!1},Wr={get:fo,set:zr,enumerable:!0,configurable:!1},Ie=(t,e)=>{Object.defineProperty(t,"value",e?Wr:Kr)},lo=(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},Ot=t=>`[${CSS.escape(t)}]`,Mt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),gn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Gr=/-(\w)/g,_=gn(t=>t&&t.replace(Gr,(e,n)=>n?n.toUpperCase():"")),Jr=/\B([A-Z])/g,Ke=gn(t=>t&&t.replace(Jr,"-$1").toLowerCase()),at=gn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var kt={mount:()=>{}};var We=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Lt=t=>{var n,o;let e=(n=xt(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var bn=Symbol("scope"),Tn=t=>{try{eo();let e=t();ln(e);let n={context:e,unmount:()=>Me(e),[bn]:1};return n[bn]=1,n}finally{to()}},po=t=>N(t)?bn in t:!1;var xn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(N(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=De(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,o=!0)=>{if(!C(t))throw $(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var ct=(t,e)=>{if(t===e)return()=>{};let n=ie(t,r=>e(r)),o=ie(e,r=>t(r));return e(t()),()=>{n(),o()}};var ut=t=>!!t&&t[Et]===1;var Ge=t=>(t==null?void 0:t[Ct])===1;var he=[],mo=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Qr(t,e),re(()=>e.stop(),!0),e.stop},Qr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=ie(i,()=>{r(),Je(t)});n.push(a)}}finally{he.pop()}},Cn=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},En=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var te=(t,e,n)=>{if(!C(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)te(s,e,!0);else if(Oe(r))for(let s of r)te(s[0],e,!0),te(s[1],e,!0);if(N(r))for(let s in r)te(r[s],e,!0)}};function Xr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];Xr(e,o,function(...i){let a=r.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},It=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var ho=Array.prototype,Rn=Object.create(ho),Yr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(ho,Rn,Yr);var yo=Map.prototype,Vt=Object.create(yo),Zr=["set","clear","delete"];It(Vt,"Map");Qe(yo,Vt,Zr);var go=Set.prototype,Pt=Object.create(go),es=["add","clear","delete"];It(Pt,"Set");Qe(go,Pt,es);var Te={},ce=t=>{if(C(t)||ut(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,Rn),!0):fe(c)?(Object.setPrototypeOf(c,Pt),!0):Oe(c)?(Object.setPrototypeOf(c,Vt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}r.size!==0&&Cn(()=>{for(let f of[...r.keys()])r.has(f)&&f(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],u=c[1];return 0 in c?e._value===f||C(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(mo(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let u=p=>{r.delete(p)};return r.add(f),()=>{u(f)}}case 1:{let f=c[1],u=e._value;s(u,f);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,Ie(a,!1),o&&i(t),a};var Se=t=>{if(ut(t))return t;let e;if(C(t)?(e=t,t=e()):e=ce(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Ct]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ge(r)||(t[o]=Se(r))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];nt(r)||(t[r]=null,t[r]=Se(o))}return e};var bo=Symbol("modelBridge"),Dt=()=>{},ts=t=>!!(t!=null&&t[bo]),ns=t=>{t[bo]=1},os=t=>{let e=Se(t());return ns(e),e},To={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Dt;let n=_(e),o,r,s=Dt,i=()=>{s(),s=Dt,o=void 0,r=void 0},a=()=>{s(),s=Dt},c=(f,u)=>{o!==f&&(a(),s=ct(f,u),o=f)},l=()=>{var h;let f=(h=t.refs[0])!=null?h:t.value()[0],u=t.context,p=u[n];if(!C(f)){if(r&&p===r){r(f);return}if(i(),C(p)){p(f);return}u[n]=f;return}if(ts(f)){if(p===f)return;C(p)?c(f,p):u[n]=f;return}r||(r=os(f)),u[n]=r,c(f,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Ut=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Ke)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return de(e)&&e.getAttributeNames().length===0}ot(e){var l,f;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let u of c){if(u.hasAttribute(n.R))continue;let p=u.parentNode;if(!p)continue;let h=u.nextSibling,g=_(u.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=u.parentElement;if(!R)continue;let k=new Comment(" begin component: "+u.tagName),X=new Comment(" end component: "+u.tagName);R.insertBefore(k,u),u.remove();let P=n.r.p.context,U=n.r.p.contextAlias,le=n.r.p.bind,Y=(f=(l=E.props)==null?void 0:l.map(_))!=null?f:[],L=(x,A)=>{let y={},j=x.hasAttribute(P);return o.E(A,()=>{if(o.w(y),j?n.y(xn,x,P):x.hasAttribute(U)&&n.y(xn,x,U),Y.length===0)return;let D=new Map(Y.map(S=>[S.toLowerCase(),S]));for(let S of[...Y,...Y.map(Ke)]){let V=x.getAttribute(S);V!==null&&(y[_(S)]=V,x.removeAttribute(S))}let J=n.F.Ce(x,!1);for(let[S,V]of J.entries()){let[v,z]=V.te;if(!z)continue;let se=D.get(_(z).toLowerCase());se&&(v!=="."&&v!==":"&&v!==le||n.y(To,x,S,!0,se,V.ne))}}),y},b=[...o.L()],O=()=>{var j;let x=L(u,b),A=new rt(x,u,b,k,X,n.r.propValidationMode),y=Tn(()=>{var D;return(D=E.context(A))!=null?D:{}}).context;if(A.autoProps){for(let[D,J]of Object.entries(x))if(D in y){let S=y[D];if(S===J)continue;if(C(S)){C(J)?A.entangle?G(k,ct(J,S)):S(J()):S(J);continue}}else y[D]=J;for(let D of Y)D in y||(y[D]=void 0);(j=A.onAutoPropsAssigned)==null||j.call(A)}return{componentCtx:y,head:A}},{componentCtx:B,head:Pe}=O(),pe=[...we(T)],rn=pe.length,I=u.childNodes.length===0,tt=x=>{var J;let A=x.parentElement,y=x.name;if(q(y)&&(y=x.getAttributeNames().filter(S=>S.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),I){if(y==="default"){let S=n.r.p.text,V=u.getAttribute(S);if(!q(V)){let v=document.createElement("span");v.setAttribute(S,V),A.insertBefore(v,x),u.removeAttribute(S);return}}for(let S of[...x.childNodes])A.insertBefore(S,x);return}let j=u.querySelector(`template[name='${y}'], template[\\#${y}]`);!j&&y==="default"&&(j=(J=[...u.querySelectorAll("template:not([name])")].find(V=>this.ct(V)))!=null?J:null);let D=S=>{Pe.enableSwitch&&o.E(b,()=>{o.w(B);let V=L(x,o.L());o.E(b,()=>{o.w(V);let v=o.L(),z=so(v);for(let se of S)Ee(se)&&(se.setAttribute(st,z),pn(z),G(se,()=>{mn(z)}))})})};if(j){let S=[...we(j)];for(let V of S)A.insertBefore(V,x);D(S)}else{if(y!=="default"){for(let V of[...we(x)])A.insertBefore(V,x);return}let S=[...we(u)].filter(V=>!this.at(V));for(let V of S)A.insertBefore(V,x);D(S)}},M=x=>{if(!Ee(x))return;let A=x.querySelectorAll("slot");if(uo(x)){tt(x),x.remove();return}for(let y of A)tt(y),y.remove()};(()=>{for(let x=0;x<rn;++x)pe[x]=pe[x].cloneNode(!0),p.insertBefore(pe[x],h),M(pe[x])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let x=pe.filter(y=>y.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(y=>y.hasAttribute(this.xe)));let A=x[0];if(A)for(let y of u.getAttributeNames()){if(y===P||y===U)continue;let j=u.getAttribute(y);if(y==="class"){let D=We(j);D.length>0&&A.classList.add(...D)}else if(y==="style"){let D=A.style,J=u.style;for(let S of J)D.setProperty(S,J.getPropertyValue(S))}else A.setAttribute(Mt(y,n.r),j)}},oe=()=>{for(let x of u.getAttributeNames())!x.startsWith("@")&&!x.startsWith(n.r.p.on)&&u.removeAttribute(x)},xe=()=>{ne(),oe(),o.w(B),n.we(u,!1),B.$emit=Pe.emit,Le(n,pe),G(u,()=>{Me(B)}),G(k,()=>{Ce(u)}),Lt(B)};o.E(b,xe)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Ke)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Ee(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Ee(i)&&r.push(i)}return r}return[]}};var wn=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"ve",[]);this.te=e,this.ne=n}},Ht=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"re");var o;this.o=e,this.Se=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,f=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!f&&h==="prop"&&(f=!0),l&&f)break}l&&(a[a.length-1]=_(a[a.length-1])),f&&(a[0]=".");let u={terms:a,flags:c};return this.re.set(e,u),u}Ce(e,n){let o=new Map;if(!it(e))return o;let r=this.Ae,s=(a,c)=>{var f;let l=r.get((f=c[0])!=null?f:"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new wn(h.terms,h.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let f=0;f<c.length;++f){let u=(l=c.item(f))==null?void 0:l.name;u&&s(a,u)}};return i(e),!n||!e.firstElementChild||this.o.O.j(e,i),o}};var xo=()=>{},rs=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Bt=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),qe(s,o),o.forEach(a=>{Q(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.V(n),c=a.value,l=this.o.m,f=l.L(),u={name:""},p=de(e)?o:[...o[0].childNodes],h=()=>{l.E(f,()=>{var R;let E=c()[0];if(N(E)&&(E.name?E=E.name:E=(R=Object.entries(l.ee()).filter(k=>k[1]===E)[0])==null?void 0:R[0]),!W(E)||q(E)){Re(s,i);return}if(u.name===E)return;Re(s,i);let T=document.createElement(E);for(let k of e.getAttributeNames())k!==this.I&&T.setAttribute(k,e.getAttribute(k));rs(p,T),r.insertBefore(T,i),this.o.$(T),u.name=E})},g=xo;G(s,()=>{a.stop(),g(),g=xo}),h(),g=a.subscribe(h)}};var F=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var ss=(t,e)=>{let[n,o]=e;K(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},jt={mount:()=>({update:({el:t,values:e})=>{ss(t,e)}})};var $t=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let l=e.F,f=[],u=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=_(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let k=T.attributes;for(let X=0;X<k.length;++X){let P=(h=k.item(X))==null?void 0:h.name;if(!P)continue;if(i.has(P))return;let{terms:U,flags:le}=l.ke(P),[Y,L]=U,b=(g=a[P])!=null?g:a[Y];if(b){if(b===jt)return;f.push({nodeIndex:u,attrName:P,directive:b,option:L,flags:le})}}++u}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(f.length!==0)return new t(f)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var is=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},as=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let f=o[o.length-1];if(f===void 0||t[f]<l){n[c]=f!=null?f:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},_t=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,f=o.length,u=new Array(f),p=new Set;for(let b=0;b<f;++b){let O=r(o[b]);if(O===void 0||p.has(O))return;p.add(O),u[b]=O}let h=new Array(f),g=0,d=l-1,E=f-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==u[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==u[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let O=b+1<f?h[b+1].items[0]:c;h[b]=i(b,o[b],O)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,k=E-R+1,X=new Array(k).fill(0),P=new Map;for(let b=R;b<=E;++b)P.set(u[b],b);let U=!1,le=0;for(let b=T;b<=d;++b){let O=n[b],B=P.get(r(O.value));if(B===void 0){a(O);continue}if(!s(O.value,o[B])){a(O);continue}O.value=o[B],h[B]=O,X[B-R]=b+1,B>=le?le=B:U=!0}let Y=U?as(X):[],L=Y.length-1;for(let b=k-1;b>=0;--b){let O=R+b,B=O+1<f?h[O+1].items[0]:c;if(X[b]===0){h[O]=i(O,o[O],B);continue}let Pe=h[O];U&&(L>=0&&Y[L]===b?--L:Pe&&is(Pe,B))}return h}};var ft=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get v(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ie(e)}yt(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Oe(e){let n=this.v;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var Sn=Symbol("r-for"),cs=t=>-1,Co=()=>{},qt=class qt{constructor(e){m(this,"o");m(this,"x");m(this,"Me");m(this,"R");this.o=e,this.x=e.r.p.for,this.Me=Ot(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.o.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[Sn]?!0:(e[Sn]=!0,Nt(e,this.Me).forEach(n=>n[Sn]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){H(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return me(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var tt;let o=this.bt(n);if(!(o!=null&&o.list)){H(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(tt=e.getAttribute(r))!=null?tt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=$t.ft(this.o,a),l=e.parentNode;if(!l)return;let f=`${this.x} => ${n}`,u=new Comment(`__begin__ ${f}`);l.insertBefore(u,e),qe(u,a),a.forEach(M=>{Q(M)}),e.remove();let p=new Comment(`__end__ ${f}`);l.insertBefore(p,u.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),k=(M,Z)=>R(M)===R(Z),X=(M,Z)=>M===Z,P=(M,Z,ne)=>{let oe=o.createContext(Z,M),xe=ft.mt(oe.index,Z),x=()=>{var D,J;let A=(J=(D=p.parentNode)!=null?D:u.parentNode)!=null?J:l,y=ne.previousSibling,j=[];for(let S=0;S<a.length;++S){let V=a[S].cloneNode(!0);A.insertBefore(V,ne),j.push(V)}for(c?c.y(h,j):Le(h,j),y=y.nextSibling;y!==ne;)xe.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,x)):g.E(d,()=>{g.w(oe.ctx),x()}),xe},U=(M,Z)=>{let ne=I.D(M).items,oe=ne[ne.length-1].nextSibling;for(let xe of ne)Q(xe);I.ce(M,P(M,Z,oe))},le=(M,Z)=>{I.w(P(M,Z,p))},Y=M=>{for(let Z of I.D(M).items)Q(Z)},L=M=>{let Z=I.v;for(let ne=M;ne<Z;++ne)I.D(ne).index(ne)},b=M=>{let Z=u.parentNode,ne=p.parentNode;if(!Z||!ne)return;let oe=I.v;K(M)&&(M=M());let xe=F(M[0]);if(w(xe)&&xe.length===0){Re(u,p),I.Oe(0);return}let x=[];for(let v of this.Le(M[0]))x.push(v);let A=_t.dt({oldItems:I.T,newValues:x,getKey:R,isSameValue:X,mountNewValue:(v,z,se)=>P(v,z,se),removeMountItem:v=>{for(let z=0;z<v.items.length;++z)Q(v.items[z])},endAnchor:p});if(A){I.T=A,I.P.clear();for(let v=0;v<A.length;++v){let z=A[v];z.order=v,z.index(v);let se=R(z.value);se!==void 0&&I.P.set(se,z)}return}let y=0,j=Number.MAX_SAFE_INTEGER,D=oe,J=this.o.r.forGrowThreshold,S=()=>I.v<D+J;for(let v of x){let z=()=>{if(y<oe){let se=I.D(y++);if(k(se.value,v)){if(X(se.value,v))return;U(y-1,v);return}let dt=I.ht(R(v));if(dt>=y&&dt-y<10){if(--y,j=Math.min(j,y),Y(y),I.Ne(y),--oe,dt>y+1)for(let sn=y;sn<dt-1&&sn<oe&&!k(I.D(y).value,v);)++sn,Y(y),I.Ne(y),--oe;z();return}S()?(I.yt(y-1,P(y,v,I.D(y-1).items[0])),j=Math.min(j,y-1),++oe):U(y-1,v)}else le(y++,v)};z()}let V=y;for(oe=I.v;y<oe;)Y(y++);I.Oe(V),L(j)},O=()=>{B.stop(),pe(),pe=Co},B=g.V(o.list),Pe=B.value,pe=Co,rn=0,I=new ft(R);for(let M of this.Le(Pe()[0]))I.w(P(rn++,M,p));G(u,O),pe=B.subscribe(b)}bt(e){var c,l;let n=qt.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,u)=>{let p={},h=F(f);if(!a&&o.length===1)p[o[0]]=f;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:cs};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ce(u)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=F(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return F((r=F(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=F(o))==null?void 0:r[s];return F(o)}};m(qt,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Ft=qt;var zt=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"O");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new Ft(this),this.Pe=new At(this),this.Ue=new Bt(this),this.O=new Ut(this),this.F=new Ht(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Le(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.O.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Q(e)}),o.appendChild(e),!0}vt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.te,f=(s=r[i])!=null?s:r[c];if(!f){console.error("directive not found:",c);continue}let u=a.ve;for(let p=0;p<u.length;++p){let h=u[p];this.y(f,h,i,!1,l,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let f=l;for(;f;){let u=f.getAttribute(st);if(u)return u;f=f.parentElement}return null};if(dn()){let l=c(n);if(l){this.m.E(io(l),()=>{this.M(e,n,a,s,i)});return}}this.M(e,n,a,s,i)}St(e,n,o){return e!==kt?!1:(q(o)||this.He(n,o)||this.vt(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);G(n,c.stop);let l=this.Ot(n,o,a,i,r,s),f=this.Mt(e,l,c);if(!f)return;let u=this.Vt(l,a,i,r,f);u(),e.once||(c.result=a.subscribe(u),i&&(c.dynamic=i.subscribe(u)))}At(e,n){let o=lo(e,this.Be);if(o)return this.m.V(_(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Vt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var Eo="http://www.w3.org/1999/xlink",us={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 fs(t){return!!t||t===""}var ls=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=_(o)),Kt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],u=l[0],p=l[1];Kt(t,u,p,f)}else if(N(l))for(let f of Object.entries(l)){let u=f[0],p=f[1],h=n==null?void 0:n[c],g=h&&u in h?u:void 0;Kt(t,u,p,g)}else{let f=n==null?void 0:n[c],u=e[c++],p=e[c];Kt(t,u,p,f)}}},vn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{ls(t,e,n,o,r,s)}})},Kt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),me(e)){H(3,"r-bind",t);return}if(!W(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(Eo,e.slice(6,e.length)):t.setAttributeNS(Eo,e,n);return}let r=e in us;me(n)||r&&!fs(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var ps=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Ro(t,s[c],i==null?void 0:i[c])}else Ro(t,s,i)}},An={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ps(t,e,n)}})},Ro=(t,e,n)=>{let o=t.classList,r=W(e),s=W(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(n!==e){let i=s?We(n):[],a=We(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(n){let i=s?We(n):[];i.length>0&&o.remove(...i)}};function ms(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=ve(t[o],e[o]);return n}function ve(t,e){if(t===e)return!0;let n=un(t),o=un(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=nt(t),o=nt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?ms(t,e):!1;if(n=N(t),o=N(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!ve(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Wt(t,e){return t.findIndex(n=>ve(n,e))}var wo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Nn=t=>{if(!C(t))throw $(3,"pause");t(void 0,void 0,3)};var On=t=>{if(!C(t))throw $(3,"resume");t(void 0,void 0,4)};var vo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{ds(t,o[0])},unmount:hs(t,e,n)})},ds=(t,e)=>{let n=Mo(t);if(n&&Ao(t))w(e)?e=Wt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=Cs(t,e),t.checked=e;else if(n&&No(t))t.checked=ve(e,Ae(t));else if(n||ko(t))Oo(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Lo(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=Wt(e,c)>-1:a.selected=e.has(c);else if(ve(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},lt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),Ao=t=>t.type==="checkbox",No=t=>t.type==="radio",Oo=t=>t.type==="number"||t.type==="range",Mo=t=>t.tagName==="INPUT",ko=t=>t.tagName==="TEXTAREA",Lo=t=>t.tagName==="SELECT",hs=(t,e,n)=>{let o=e.value,r=lt(n==null?void 0:n.join(",")),s=lt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,t),()=>{};let a=()=>e.refs[0],c=Mo(t);return c&&Ao(t)?gs(t,a):c&&No(t)?Es(t,a):c||ko(t)?ys(t,i,a,o):Lo(t)?Rs(t,a,o):(H(7,t),()=>{})},So=/[.,' ·٫]/,ys=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Oo(t),a=()=>{!e.trim&&!lt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,u),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},u=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=lt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(So.test(d[d.length-1])&&d.split(So).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,u),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),f},gs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let l=Wt(c,i),f=l!==-1;a&&!f?c.push(i):!a&&f&&c.splice(l,1)}else fe(c)?a?c.add(i):c.delete(i):s(xs(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,Io="trueValue",bs="falseValue",Vo="true-value",Ts="false-value",xs=(t,e)=>{let n=e?Io:bs;if(n in t)return t[n];let o=e?Vo:Ts;return t.hasAttribute(o)?t.getAttribute(o):e},Cs=(t,e)=>{if(Io in t)return ve(e,t.trueValue);let o=Vo;return t.hasAttribute(o)?ve(e,t.getAttribute(o)):ve(e,!0)},Es=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},Rs=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=lt(n()[1]).number,l=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?wo(Ae(f)):Ae(f));if(t.multiple){let f=i();try{if(Nn(i),fe(f)){f.clear();for(let u of l)f.add(u)}else w(f)?(f.splice(0),f.push(...l)):i(l)}finally{On(i),te(i)}}else i(l[0])};return t.addEventListener(o,s),r};var ws=["stop","prevent","capture","self","once","left","right","middle","passive"],Ss=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of ws)e[o]=n.includes(o);return e},vs=(t,e,n,o,r)=>{var l,f;if(o){let u=e.value(),p=F(o.value()[0]);return W(p)?Mn(t,_(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:u[1]):()=>{}}else if(n){let u=e.value();return Mn(t,_(n),()=>e.value()[0],(f=r==null?void 0:r.join(","))!=null?f:u[1])}let s=[],i=()=>{s.forEach(u=>u())},a=e.value(),c=a.length;for(let u=0;u<c;++u){let p=a[u];if(K(p)&&(p=p()),N(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[u];return K(T)&&(T=T()),T=T[g],K(T)&&(T=T()),T},E=p[g+"_flags"];s.push(Mn(t,g,d,E))}else H(2,"r-on",t)}return i},kn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>vs(t,e,n,o,r)},As=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},Mn=(t,e,n,o)=>{if(q(e))return H(5,"r-on",t),()=>{};let r=Ss(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=As(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let u=n(f);K(u)&&(u=u(f)),K(u)&&u(f)},c=()=>{t.removeEventListener(e,l,s)},l=f=>{if(!r){a(f);return}try{if(r.left&&f.button!==0||r.middle&&f.button!==1||r.right&&f.button!==2||r.self&&f.target!==t)return;r.stop&&f.stopPropagation(),r.prevent&&f.preventDefault(),a(f)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Ns=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=_(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(t,a,c)}else if(N(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];Xe(t,c,l)}else{let a=e[s++],c=e[s];Xe(t,a,c)}}},Po={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Ns(t,e,n,o)}})};function Os(t){return!!t||t===""}var Xe=(t,e,n)=>{if(me(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ce),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Os(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var Do={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Ms=(t,e)=>{let n=Ue(t).data,o=n._ord;Yn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},Uo={mount:()=>({update:({el:t,values:e})=>{Ms(t,e)}})};var ks=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Ho(t,s[c],i==null?void 0:i[c])}else Ho(t,s,i)}},Gt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ks(t,e,n)}})},Ho=(t,e,n)=>{let o=t.style,r=W(e);if(e&&!r){if(n&&!W(n))for(let s in n)e[s]==null&&In(o,s,"");for(let s in e)In(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;o.display=s}},Bo=/\s*!important$/;function In(t,e,n){if(w(n))n.forEach(o=>{In(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Ls(t,e);Bo.test(n)?t.setProperty(Ke(o),n.replace(Bo,""),"important"):t[o]=n}}var jo=["Webkit","Moz","ms"],Ln={};function Ls(t,e){let n=Ln[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return Ln[e]=o;o=at(o);for(let r=0;r<jo.length;r++){let s=jo[r]+o;if(s in t)return Ln[e]=s}return e}var ue=t=>$o(F(t)),$o=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(w(t))return t.map(ue);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ue(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ue(r[0]),ue(r[1]));return o}if(e.has(t))return F(e.get(t));let n=yt({},t);e.set(t,n);for(let o of Object.entries(n))n[o[0]]=$o(F(o[1]),e);return n};var Is=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ue([...n])):Oe(n)?JSON.stringify(ue([...n])):N(n)?JSON.stringify(ue(n)):(o=n==null?void 0:n.toString())!=null?o:""},_o={mount:()=>({update:({el:t,values:e})=>{Is(t,e)}})};var Fo={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var Ve=class Ve{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Ve.je)!=null?e:Ve.je=new Ve}It(){let e={},n=globalThis;for(let o of Ve.Lt.split(","))e[o]=n[o];return e.ref=Se,e.sref=ce,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){Fe.warning("Registered component's default name is not defined",n);continue}this.Z.set(at(n.defaultName),n),this._.set(at(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Po,":":vn,"@":kn,[`${e}on`]:kn,[`${e}bind`]:vn,[`${e}html`]:jt,[`${e}text`]:_o,[`${e}show`]:Uo,[`${e}model`]:vo,":style":Gt,[`${e}style`]:Gt,[`${e}bind:style`]:Gt,":class":An,[`${e}bind:class`]:An,":ref":Do,":value":Fo,[`${e}teleport`]:kt},this.p={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.B,this.p)}};m(Ve,"je"),m(Ve,"Lt","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 ye=Ve;var Jt=(t,e)=>{if(!t)return;let o=(e!=null?e:ye.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ps(t,o.pre,s))Vs(i,o.text,r,s)},Vs=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],f=qo(l,o);if(f&&q(i[0])&&q(i[2])){let u=t.parentElement;u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),u.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let f=qo(l,o);if(f){let u=document.createElement("span");u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),a.appendChild(u)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Ps=(t,e,n)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of we(s))r(a)}};return r(t),o},qo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Ds=9,Us=10,Hs=13,Bs=32,Ne=46,Qt=44,js=39,$s=34,Xt=40,Ye=41,Yt=91,Vn=93,Pn=63,_s=59,zo=58,Ko=123,Zt=125,Be=43,en=45,Dn=96,Wo=47,Un=92,Go=new Set([2,3]),er={"=":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},Fs=Jn(yt({"=>":2},er),{"||":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}),tr=Object.keys(er),qs=new Set(tr),Bn=new Set(["=>"]);tr.forEach(t=>Bn.add(t));var Jo={true:!0,false:!1,null:null},zs="this",Ze="Expected ",je="Unexpected ",$n="Unclosed ",Ks=Ze+":",Qo=Ze+"expression",Ws="missing }",Gs=je+"object property",Js=$n+"(",Xo=Ze+"comma",Yo=je+"token ",Qs=je+"period",Hn=Ze+"expression after ",Xs="missing unaryOp argument",Ys=$n+"[",Zs=Ze+"exponent (",ei="Variable names cannot start with a number (",ti=$n+'quote after "',pt=t=>t>=48&&t<=57,Zo=t=>Fs[t],jn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||pt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===Bs||e===Ds||e===Us||e===Hs;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===_s||o===Qt)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(je+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:Zo(n),right_a:Bn.has(n)},i=this.z(),!i)throw this.i(Hn+n);let l=[s,r,i];for(;n=this.de();){o=Zo(n),r={value:n,prec:o,right_a:Bn.has(n)},c=n;let f=u=>r.right_a&&u.right_a?o>u.prec:o<=u.prec;for(;l.length>2&&f(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.z(),!e)throw this.i(Hn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(pt(n)||n===Ne)return this.Bt();if(n===js||n===$s)e=this.Ht();else if(n===Yt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(Xs);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in Jo?e={type:4,value:Jo[e.name],raw:e.name}:e.name===zs&&(e={type:5})):n===Xt&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return qs.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===en?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Be?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===Yt||n===Xt||n===Pn;){let o;if(n===Pn){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Yt){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Vn)throw this.i(Ys);this.e++}else n===Xt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;pt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;pt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===Be||a===en)&&o++;let c=o;for(;pt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(Zs+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(ei+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(Qs);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let u=e.charCodeAt(s);if(u===r){l=!0,this.e=s+1;break}if(u===Un){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let f=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(ti+f+'"');return{type:4,value:f,raw:e.substring(o,this.e)}}Ke(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)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(je+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.i(Yo+String.fromCharCode(e));break}else if(s===Qt){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.i(Yo+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Xo);{let i=this.S();if(!i||i.type===0)throw this.i(Xo);n.push(i)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Js)}jt(){return this.e++,{type:9,elements:this.qe(Vn)}}Ft(e){if(this.f(Ko)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(Zt)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(Qt)||this.f(Zt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(zo)){this.e++;let r=this.S();if(!r)throw this.i(Gs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Qt)&&this.e++}throw this.i(Ws)}}qt(e){let n=this.h;if((n===Be||n===en)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Be?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!Go.has(o.argument.type))throw this.i(je+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Be||o===en)&&o===this.u.charCodeAt(this.e+1)){if(!Go.has(n.type))throw this.i(je+(o===Be?"++":"--"));this.e+=2,e.node={type:13,operator:o===Be?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Pn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(Qo);if(this.g(),this.f(zo)){this.e++;let r=this.S();if(!r)throw this.i(Qo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Ks)}}Qt(e){if(this.g(),this.f(Xt)){let n=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Hn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Dn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Dn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=f=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:f})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:u,cooked:p},tail:f})};for(;this.e<o;){let f=n.charCodeAt(this.e);if(f===Dn)return l(!0),this.e+=1,e.node=r,r;if(f===36&&n.charCodeAt(this.e+1)===Ko){if(l(!1),this.e+=2,r.expressions.push(...this.fe(Zt)),!this.f(Zt))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(f===Un){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.Ke(u)),this.e+=2,s=this.e}else this.e+=1}throw this.i("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.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(Wo))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Wo&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Yt)?o=!0:o&&this.f(Vn)&&(o=!1),this.e+=this.f(Un)?2:1}throw this.i("Unclosed Regex")}},nr=t=>new jn(t).parse();var ni={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>ht(t,e)},oi={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},ir=t=>{if(!(t!=null&&t.some(sr)))return t;let e=[];return t.forEach(n=>sr(n)?e.push(...n):e.push(n)),e},or=(...t)=>ir(t),_n=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},ri={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(--o),o}return--t[e]}},si={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o-1),o}return t[e]--}},rr={"=":(t,e,n)=>{let o=t[e];return C(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return C(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return C(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return C(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return C(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return C(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return C(o)?o(ht(o(),n)):t[e]=ht(t[e],n)},"<<=":(t,e,n)=>{let o=t[e];return C(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return C(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return C(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return C(o)?o(o()^n):t[e]^=n}},tn=(t,e)=>K(t)?t.bind(e):t,Fn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],tn(F(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],tn(F(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],tn(F(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,or,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,tn(F(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>K(i)?i(...ir(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,oi[e.operator],e.argument)}8(e,n,o){let r=ni[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,or,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var f;let r={},s=u=>(u==null?void 0:u.type)!==15,i=(f=this.Ge)!=null?f:()=>!1,a=n===0&&this.Qe,c=u=>this.Ze(a,e.key,n,_n(u,o)),l=u=>this.Ze(a,e.value,n,_n(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&i(u,n)?c:c()}else if(e.computed){let u=F(c());r[u]=s(e.value)&&i(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&i(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?ri:si;if(r.type===2){let a=r.name,c=this.Xe(a,o);return me(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(me(a))return;let c=this.b(e.right,n,o);return rr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return rr[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=ar),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=F(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&C(this.A)}eval(e,n){let{value:o,refs:r}=En(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,_n(l,n)):this.b(a,e,n)));return o(...i)}},ar=Symbol("s"),sr=t=>(t==null?void 0:t.s)===ar,cr=(t,e,n,o,r,s,i)=>new Fn(e,n,o,r,i).eval(t,s);var ur={},fr=t=>!!t,nn=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(fr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(fr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,k)=>(c.add(R),k&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,k,X,P)=>{try{let U=cr(R,k,h,n,o,P,r);return X&&U.refs.length>0&&g.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){H(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let R=(T=ur[e])!=null?T:nr("["+e+"]");ur[e]=R;let k=this.l.slice(),X=R.elements,P=X.length,U=new Array(P);p.refs=U;let le=()=>{g.length=0,s||(d.clear(),l());let Y=new Array(P);for(let L=0;L<P;++L){let b=X[L];if(n!=null&&n(L,-1)){Y[L]=B=>E(b,k,!1,{$event:B}).value;continue}let O=E(b,k,!0);Y[L]=O.value,U[L]=O.ref}if(!s)for(let L of g)d.has(L)||(d.add(L),a.push(ie(L,le)));if(i=Y,c.size!==0)for(let L of c)c.has(L)&&L(i)};le()}catch(R){H(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var lr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ii=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},ai=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!lr(t[n]))return null;let o=n;for(;n<t.length&&lr(t[n]);)++n;return{start:o,end:n}},pr=new Set(["table","thead","tbody","tfoot"]),ci=new Set(["thead","tbody","tfoot"]),ui=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),fi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),mr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,on=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=ii(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let u=ai(c,l);if(!u){n.push(c),e=a+1;continue}let p=c.slice(u.start,u.end);if(l){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),pr.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):ci.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=ui.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!fi.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,u.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(u.end)}`;n.push(E?mr(R,d):R)}else n.push(E?mr(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),pr.has(T)&&++r}e=a+1}return n.join("")};var li="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",pi=new Set(li.toUpperCase().split(",")),mi="http://www.w3.org/2000/svg",dr=(t,e)=>{de(t)?t.content.appendChild(e):t.appendChild(e)},qn=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&pi.has(r.toUpperCase())?document.createElementNS(mi,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let f of Object.entries(c)){let u=f[0],p=f[1];u.startsWith("#")&&(p=u.substring(1),u="name"),a.setAttribute(Mt(u,o),p)}let l=t.c;if(l)for(let f of l)qn(f,a,n,o);dr(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)dr(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n!=null||(n=ye.getDefault());let o=document.createDocumentFragment();if(!w(t))return qn(t,o,!!e,n),o;for(let r of t)qn(r,o,!!e,n);return o};var di=(t,e={selector:"#app"},n)=>{W(e)&&(e={selector:"#app",template:e}),po(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ee(o))throw $(0);n||(n=ye.getDefault());let r=()=>{for(let a of[...o.childNodes])Q(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(on(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=et(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Jt(o,n),new zn(t,o,n).y(),G(o,()=>{Me(t)}),Lt(t),{context:t,unmount:()=>{Q(o)},unbind:()=>{Ce(o)}}},zn=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new nn([e],o),this.o=new zt(this.m)}y(){this.o.$(this.nt)}};var mt=t=>{if(w(t))return t.map(r=>mt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=we(t);return o.length>0&&(e.c=[...o].map(r=>mt(r))),e};var hi=(t,e={})=>{var s,i,a,c,l,f;w(e)&&(e={props:e}),W(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!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 $(1,t.selector);u.remove(),t.element=u}else if(t.template){let u=document.createRange().createContextualFragment(on(t.template));t.element=u}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Jt(t.element,(a=e.config)!=null?a:ye.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:it(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||it(r)&&r.querySelector("[isSVG]"))){let u=r.content,p=u?[...u.childNodes]:[...r.childNodes],h=mt(p);t.element=et(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Kn=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var yi=t=>{var e;(e=De())==null||e.onMounted.push(t)};var gi=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw $(4);return e&&!n.isStopped?e(...r):(e=bi(t,n),e(...r))};return o[ee]=1,Ie(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},bi=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ce(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,te(n);return}n(t()),++o});return n.stop=r,n};var Ti=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=xi(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},xi=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ce(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}let l=t.map(f=>f());o(e(...l)),++r},i=[];for(let c of t){let l=ie(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Ci=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=Ei(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Ei=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ce(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ie(t,i=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}o(e(i)),++r},!0),o};var Ri=t=>(t[Et]=1,t);var wi=(t,e)=>{if(!e)throw $(5);let o=Ge(t)?Se:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ue(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Je(r);return re(i,!0),t};var Wn=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},Si=Wn,vi=Wn;var Ai=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(ie(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Ni=t=>{if(!C(t))throw $(3,"observerCount");return t(void 0,void 0,2)};var Oi=t=>{hr();try{t()}finally{yr()}},hr=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},yr=()=>{let t=Te.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete Te.stack;for(let n of e)try{te(n)}catch(o){console.error(o)}};export{rt as ComponentHead,Kn as ContextRegistry,ye as RegorConfig,G as addUnbinder,Oi as batch,En as collectRefs,Ti as computeMany,Ci as computeRef,gi as computed,di as createApp,hi as defineComponent,Rr as drainUnbind,yr as endBatch,ct as entangle,ue as flatten,Ue as getBindData,Wn as html,Ge as isDeepRef,ut as isRaw,C as isRef,Ri as markRaw,ie as observe,Ai as observeMany,Ni as observerCount,yi as onMounted,re as onUnmounted,Nn as pause,wi as persist,$r as pval,Si as raw,Se as ref,Q as removeNode,On as resume,Cn as silence,ce as sref,hr as startBatch,vi as svg,et as toFragment,mt as toJsonTemplate,te as trigger,Ce as unbind,F as unref,Tn as useScope,Fe as warningHandler,Je as watchEffect};
1
+ var br=Object.defineProperty,Tr=Object.defineProperties;var xr=Object.getOwnPropertyDescriptors;var Jn=Object.getOwnPropertySymbols;var Cr=Object.prototype.hasOwnProperty,Er=Object.prototype.propertyIsEnumerable;var yt=Math.pow,cn=(t,e,n)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gt=(t,e)=>{for(var n in e||(e={}))Cr.call(e,n)&&cn(t,n,e[n]);if(Jn)for(var n of Jn(e))Er.call(e,n)&&cn(t,n,e[n]);return t},Qn=(t,e)=>Tr(t,xr(e));var m=(t,e,n)=>cn(t,typeof e!="symbol"?e+"":e,n);var Xn=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(l){r(l)}},i=c=>{try{a(n.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var $e=Symbol(":regor");var Ce=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Rr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Rr=t=>{let e=t[$e];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[$e]=void 0};var _e=[],bt=!1,Tt,Yn=()=>{if(bt=!1,Tt=void 0,_e.length!==0){for(let t=0;t<_e.length;++t)Ce(_e[t]);_e.length=0}},Q=t=>{t.remove(),_e.push(t),bt||(bt=!0,Tt=setTimeout(Yn,1))},wr=()=>Xn(null,null,function*(){_e.length===0&&!bt||(Tt&&clearTimeout(Tt),Yn())});var K=t=>typeof t=="function",W=t=>typeof t=="string",Zn=t=>typeof t=="undefined",me=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),Sr=Object.prototype.toString,un=t=>Sr.call(t),Oe=t=>un(t)==="[object Map]",fe=t=>un(t)==="[object Set]",fn=t=>un(t)==="[object Date]",nt=t=>typeof t=="symbol",w=Array.isArray,N=t=>t!==null&&typeof t=="object";var eo={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},$=(t,...e)=>{let n=eo[t];return new Error(K(n)?n.call(eo,...e):n)};var xt=[],to=()=>{let t={onMounted:[],onUnmounted:[]};return xt.push(t),t},De=t=>{let e=xt[xt.length-1];if(!e&&!t)throw $(2);return e},no=t=>{let e=De();return t&&pn(t),xt.pop(),e},ln=Symbol("csp"),pn=t=>{let e=t,n=e[ln];if(n){let o=De();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[ln]=De()},Ct=t=>t[ln];var Me=t=>{var n,o;let e=(n=Ct(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var oo={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},H=(t,...e)=>{let n=oo[t],o=K(n)?n.call(oo,...e):n,r=Fe.warning;r&&(W(o)?r(o):r(o,...o.args))},Fe={warning:console.warn};var Et=Symbol("ref"),ee=Symbol("sref"),Rt=Symbol("raw");var C=t=>t!=null&&t[ee]===1;var ke=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},be=(t,e)=>{throw new ke(t,`${e}.`)},wt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(C(t))return`ref<${wt(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},vr=t=>t.length>60?`${t.slice(0,57)}...`:t,ot=(t,e=0)=>{if(e>1)return"unknown";if(C(t)){let s=t();return`ref(${ot(s,e+1)})`}if(typeof t=="string")return vr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>ot(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(N(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=ot(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ae=t=>{if(C(t))return`got ${wt(t)}(${ot(t())})`;let e=wt(t),n=ot(t);return`got ${e} (${n})`},Ar=t=>t instanceof ke?t.detail:t instanceof Error?t.message:String(t),ro=(t,e)=>{let n=`, ${ae(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Nr=(t,e,n)=>{if(e instanceof ke){if(e.propPath===t)return ro(e.detail,n);if(e.propPath===`${t}.value`&&C(n)){let o=ro(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return Ar(e)},Or=(t,e,n)=>{let o=[];for(let r of e){let s=Nr(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ae(n):o.length===1?`${o[0]}, ${ae(n)}`:`${o.join(" or ")}, ${ae(n)}`},Mr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":wt(t),kr=(t,e)=>{typeof t!="string"&&be(e,`expected string, ${ae(t)}`)},Lr=(t,e)=>{typeof t!="number"&&be(e,`expected number, ${ae(t)}`)},Ir=(t,e)=>{typeof t!="boolean"&&be(e,`expected boolean, ${ae(t)}`)},Vr=t=>(e,n)=>{e instanceof t||be(n,`expected instance of ${t.name||"provided class"}, ${ae(e)}`)},Pr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},Dr=t=>(e,n,o)=>{e!==null&&t(e,n,o)},Ur=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}be(n,Or(n,r,e))},Hr=t=>(e,n)=>{t.includes(e)||be(n,`expected one of ${t.map(o=>Mr(o)).join(", ")}, ${ae(e)}`)},Br=t=>(e,n,o)=>{w(e)||be(n,`expected array, ${ae(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function jr(t){return(e,n,o)=>{N(e)||be(n,`expected object, ${ae(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var $r=t=>(e,n,o)=>{if(C(e)){t(e(),`${n}.value`,o);return}be(n,`expected ref, ${ae(e)}`)},_r={fail:be,describe:ae,isString:kr,isNumber:Lr,isBoolean:Ir,isClass:Vr,optional:Pr,nullable:Dr,or:Ur,oneOf:Hr,arrayOf:Br,shape:jr,refOf:$r};var Fr=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof ke?n.propPath:e,s=n instanceof ke?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},rt=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=Fr(this.G,o,i);if(this.J==="warn"){Fe.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)Q(e),e=e.nextSibling;for(let o of this.ctx)Me(o)}};var Ue=t=>{let e=t,n=e[$e];if(n)return n;let o={unbinders:[],data:{}};return e[$e]=o,o};var G=(t,e)=>{Ue(t).unbinders.push(e)};var st=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var vt={},St={},so=1,io=t=>{let e=(so++).toString();return vt[e]=t,St[e]=0,e},mn=t=>{St[t]+=1},dn=t=>{--St[t]===0&&(delete vt[t],delete St[t])},ao=t=>vt[t],hn=()=>so!==1&&Object.keys(vt).length>0,it="r-switch",qr=t=>{let e=t.filter(o=>Ee(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(it))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},qe=(t,e)=>{if(!hn())return;let n=qr(e);n.length!==0&&(n.forEach(mn),G(t,()=>{n.forEach(dn)}))};var At=()=>{},yn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Le(e,r)},gn=Symbol("r-if"),co=Symbol("r-else"),uo=t=>t[co]===1,Nt=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=Mt(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[gn]?!0:(e[gn]=!0,Ot(e,this.ge).forEach(n=>n[gn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){H(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=ze(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),qe(i,r),r.forEach(c=>{Q(c)}),e.remove(),n!=="if"&&(e[co]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{yn(r,this.o,s,a)},unmount:()=>{Re(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.V(r),f=l.value,u=this.be(o,n),p=At;return G(a,()=>{l.stop(),p(),p=At}),p=l.subscribe(n),[{mount:()=>{yn(s,this.o,i,c)},unmount:()=>{Re(a,c)},isTrue:()=>st(f()[0]),isMounted:!1},...u]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.V(n),l=c.value,f=!1,u=this.o.m,p=u.L(),h=()=>{u.E(p,()=>{if(st(l()[0]))f||(yn(r,this.o,s,a),f=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{Re(i,a),f=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=At;G(i,()=>{c.stop(),d(),d=At}),h(),d=c.subscribe(h)}};var ze=t=>{let e=de(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Le=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(uo(o)||t.$(o))}},Ot=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},de=t=>t instanceof HTMLTemplateElement,Ee=t=>t.nodeType===Node.ELEMENT_NODE,at=t=>t.nodeType===Node.ELEMENT_NODE,fo=t=>t instanceof HTMLSlotElement,we=t=>de(t)?t.content.childNodes:t.childNodes,Re=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;Q(n),n=o}},lo=function(){return this()},zr=function(t){return this(t)},Kr=()=>{throw new Error("value is readonly.")},Wr={get:lo,set:zr,enumerable:!0,configurable:!1},Gr={get:lo,set:Kr,enumerable:!0,configurable:!1},Ie=(t,e)=>{Object.defineProperty(t,"value",e?Gr:Wr)},po=(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},Mt=t=>`[${CSS.escape(t)}]`,kt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),bn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},Jr=/-(\w)/g,_=bn(t=>t&&t.replace(Jr,(e,n)=>n?n.toUpperCase():"")),Qr=/\B([A-Z])/g,Ke=bn(t=>t&&t.replace(Qr,"-$1").toLowerCase()),ct=bn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Lt={mount:()=>{}};var We=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var It=t=>{var n,o;let e=(n=Ct(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var Tn=Symbol("scope"),xn=t=>{try{to();let e=t();pn(e);let n={context:e,unmount:()=>Me(e),[Tn]:1};return n[Tn]=1,n}finally{no()}},mo=t=>N(t)?Tn in t:!1;var Cn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(N(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(C(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=De(e))==null||n.onUnmounted.push(t)};var ie=(t,e,n,o=!0)=>{if(!C(t))throw $(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var ut=(t,e)=>{if(t===e)return()=>{};let n=ie(t,r=>e(r)),o=ie(e,r=>t(r));return e(t()),()=>{n(),o()}};var ft=t=>!!t&&t[Rt]===1;var Ge=t=>(t==null?void 0:t[Et])===1;var he=[],ho=t=>{var e;he.length!==0&&((e=he[he.length-1])==null||e.add(t))},Je=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Xr(t,e),re(()=>e.stop(),!0),e.stop},Xr=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(he.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=ie(i,()=>{r(),Je(t)});n.push(a)}}finally{he.pop()}},En=t=>{let e=he.length,n=e>0&&he[e-1];try{return n&&he.push(null),t()}finally{n&&he.pop()}},Rn=t=>{try{let e=new Set;return he.push(e),{value:t(),refs:[...e]}}finally{he.pop()}};var te=(t,e,n)=>{if(!C(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)te(s,e,!0);else if(Oe(r))for(let s of r)te(s[0],e,!0),te(s[1],e,!0);if(N(r))for(let s in r)te(r[s],e,!0)}};function Yr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Qe=(t,e,n)=>{n.forEach(function(o){let r=t[o];Yr(e,o,function(...i){let a=r.apply(this,i),c=this[ee];for(let l of c)te(l);return a})})},Vt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var yo=Array.prototype,wn=Object.create(yo),Zr=["push","pop","shift","unshift","splice","sort","reverse"];Qe(yo,wn,Zr);var go=Map.prototype,Pt=Object.create(go),es=["set","clear","delete"];Vt(Pt,"Map");Qe(go,Pt,es);var bo=Set.prototype,Dt=Object.create(bo),ts=["add","clear","delete"];Vt(Dt,"Set");Qe(bo,Dt,ts);var Te={},ce=t=>{if(C(t)||ft(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?ee in c?!0:w(c)?(Object.setPrototypeOf(c,wn),!0):fe(c)?(Object.setPrototypeOf(c,Dt),!0):Oe(c)?(Object.setPrototypeOf(c,Pt),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(Te.stack&&Te.stack.length){Te.stack[Te.stack.length-1].add(a);return}r.size!==0&&En(()=>{for(let f of[...r.keys()])r.has(f)&&f(c,l)})},i=c=>{let l=c[ee];l||(c[ee]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],u=c[1];return 0 in c?e._value===f||C(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(ho(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let u=p=>{r.delete(p)};return r.add(f),()=>{u(f)}}case 1:{let f=c[1],u=e._value;s(u,f);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[ee]=1,Ie(a,!1),o&&i(t),a};var Se=t=>{if(ft(t))return t;let e;if(C(t)?(e=t,t=e()):e=ce(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Et]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Ge(r)||(t[o]=Se(r))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Ge(o))continue;let r=n[0];nt(r)||(t[r]=null,t[r]=Se(o))}return e};var To=Symbol("modelBridge"),Ut=()=>{},ns=t=>!!(t!=null&&t[To]),os=t=>{t[To]=1},rs=t=>{let e=Se(t());return os(e),e},xo={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return Ut;let n=_(e),o,r,s=Ut,i=()=>{s(),s=Ut,o=void 0,r=void 0},a=()=>{s(),s=Ut},c=(f,u)=>{o!==f&&(a(),s=ut(f,u),o=f)},l=()=>{var h;let f=(h=t.refs[0])!=null?h:t.value()[0],u=t.context,p=u[n];if(!C(f)){if(r&&p===r){r(f);return}if(i(),C(p)){p(f);return}u[n]=f;return}if(ns(f)){if(p===f)return;C(p)?c(f,p):u[n]=f;return}r||(r=rs(f)),u[n]=r,c(f,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var Ht=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Ke)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!de(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return de(e)&&e.getAttributeNames().length===0}ot(e){var l,f;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let u of c){if(u.hasAttribute(n.R))continue;let p=u.parentNode;if(!p)continue;let h=u.nextSibling,g=_(u.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=u.parentElement;if(!R)continue;let k=new Comment(" begin component: "+u.tagName),X=new Comment(" end component: "+u.tagName);R.insertBefore(k,u),u.remove();let P=n.r.p.context,U=n.r.p.contextAlias,le=n.r.p.bind,Y=(f=(l=E.props)==null?void 0:l.map(_))!=null?f:[],L=(x,A)=>{let y={},j=x.hasAttribute(P);return o.E(A,()=>{if(o.w(y),j?n.y(Cn,x,P):x.hasAttribute(U)&&n.y(Cn,x,U),Y.length===0)return;let D=new Map(Y.map(S=>[S.toLowerCase(),S]));for(let S of[...Y,...Y.map(Ke)]){let V=x.getAttribute(S);V!==null&&(y[_(S)]=V,x.removeAttribute(S))}let J=n.F.Ce(x,!1);for(let[S,V]of J.entries()){let[v,z]=V.te;if(!z)continue;let se=D.get(_(z).toLowerCase());se&&(v!=="."&&v!==":"&&v!==le||n.y(xo,x,S,!0,se,V.ne))}}),y},b=[...o.L()],O=()=>{var j;let x=L(u,b),A=new rt(x,u,b,k,X,n.r.propValidationMode),y=xn(()=>{var D;return(D=E.context(A))!=null?D:{}}).context;if(A.autoProps){for(let[D,J]of Object.entries(x))if(D in y){let S=y[D];if(S===J)continue;if(C(S)){C(J)?A.entangle?G(k,ut(J,S)):S(J()):S(J);continue}}else y[D]=J;for(let D of Y)D in y||(y[D]=void 0);(j=A.onAutoPropsAssigned)==null||j.call(A)}return{componentCtx:y,head:A}},{componentCtx:B,head:Pe}=O(),pe=[...we(T)],sn=pe.length,I=u.childNodes.length===0,tt=x=>{var J;let A=x.parentElement,y=x.name;if(q(y)&&(y=x.getAttributeNames().filter(S=>S.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),I){if(y==="default"){let S=n.r.p.text,V=u.getAttribute(S);if(!q(V)){let v=document.createElement("span");v.setAttribute(S,V),A.insertBefore(v,x),u.removeAttribute(S);return}}for(let S of[...x.childNodes])A.insertBefore(S,x);return}let j=u.querySelector(`template[name='${y}'], template[\\#${y}]`);!j&&y==="default"&&(j=(J=[...u.querySelectorAll("template:not([name])")].find(V=>this.ct(V)))!=null?J:null);let D=S=>{Pe.enableSwitch&&o.E(b,()=>{o.w(B);let V=L(x,o.L());o.E(b,()=>{o.w(V);let v=o.L(),z=io(v);for(let se of S)Ee(se)&&(se.setAttribute(it,z),mn(z),G(se,()=>{dn(z)}))})})};if(j){let S=[...we(j)];for(let V of S)A.insertBefore(V,x);D(S)}else{if(y!=="default"){for(let V of[...we(x)])A.insertBefore(V,x);return}let S=[...we(u)].filter(V=>!this.at(V));for(let V of S)A.insertBefore(V,x);D(S)}},M=x=>{if(!Ee(x))return;let A=x.querySelectorAll("slot");if(fo(x)){tt(x),x.remove();return}for(let y of A)tt(y),y.remove()};(()=>{for(let x=0;x<sn;++x)pe[x]=pe[x].cloneNode(!0),p.insertBefore(pe[x],h),M(pe[x])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let x=pe.filter(y=>y.nodeType===Node.ELEMENT_NODE);x.length>1&&(x=x.filter(y=>y.hasAttribute(this.xe)));let A=x[0];if(A)for(let y of u.getAttributeNames()){if(y===P||y===U)continue;let j=u.getAttribute(y);if(y==="class"){let D=We(j);D.length>0&&A.classList.add(...D)}else if(y==="style"){let D=A.style,J=u.style;for(let S of J)D.setProperty(S,J.getPropertyValue(S))}else A.setAttribute(kt(y,n.r),j)}},oe=()=>{for(let x of u.getAttributeNames())!x.startsWith("@")&&!x.startsWith(n.r.p.on)&&u.removeAttribute(x)},xe=()=>{ne(),oe(),o.w(B),n.we(u,!1),B.$emit=Pe.emit,Le(n,pe),G(u,()=>{Me(B)}),G(k,()=>{Ce(u)}),It(B)};o.E(b,xe)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Ke)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Ee(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Ee(i)&&r.push(i)}return r}return[]}};var Sn=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"Se",[]);this.te=e,this.ne=n}},Bt=class{constructor(e){m(this,"o");m(this,"ve");m(this,"Ae");m(this,"re");var o;this.o=e,this.ve=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.ve){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,f=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!f&&h==="prop"&&(f=!0),l&&f)break}l&&(a[a.length-1]=_(a[a.length-1])),f&&(a[0]=".");let u={terms:a,flags:c};return this.re.set(e,u),u}Ce(e,n){let o=new Map;if(!at(e))return o;let r=this.Ae,s=(a,c)=>{var f;let l=r.get((f=c[0])!=null?f:"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new Sn(h.terms,h.flags),o.set(c,p)}p.Se.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let f=0;f<c.length;++f){let u=(l=c.item(f))==null?void 0:l.name;u&&s(a,u)}};return i(e),!n||!e.firstElementChild||this.o.O.j(e,i),o}};var Co=()=>{},ss=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},jt=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=ze(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),qe(s,o),o.forEach(a=>{Q(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.V(n),c=a.value,l=this.o.m,f=l.L(),u={name:""},p=de(e)?o:[...o[0].childNodes],h=()=>{l.E(f,()=>{var R;let E=c()[0];if(N(E)&&(E.name?E=E.name:E=(R=Object.entries(l.ee()).filter(k=>k[1]===E)[0])==null?void 0:R[0]),!W(E)||q(E)){Re(s,i);return}if(u.name===E)return;Re(s,i);let T=document.createElement(E);for(let k of e.getAttributeNames())k!==this.I&&T.setAttribute(k,e.getAttribute(k));ss(p,T),r.insertBefore(T,i),this.o.$(T),u.name=E})},g=Co;G(s,()=>{a.stop(),g(),g=Co}),h(),g=a.subscribe(h)}};var F=t=>{let e=t;return e!=null&&e[ee]===1?e():e};var is=(t,e)=>{let[n,o]=e;K(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},$t={mount:()=>({update:({el:t,values:e})=>{is(t,e)}})};var _t=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let l=e.F,f=[],u=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=_(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let k=T.attributes;for(let X=0;X<k.length;++X){let P=(h=k.item(X))==null?void 0:h.name;if(!P)continue;if(i.has(P))return;let{terms:U,flags:le}=l.ke(P),[Y,L]=U,b=(g=a[P])!=null?g:a[Y];if(b){if(b===$t)return;f.push({nodeIndex:u,attrName:P,directive:b,option:L,flags:le})}}++u}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(f.length!==0)return new t(f)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var as=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},cs=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let f=o[o.length-1];if(f===void 0||t[f]<l){n[c]=f!=null?f:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},Ft=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,f=o.length,u=new Array(f),p=new Set;for(let b=0;b<f;++b){let O=r(o[b]);if(O===void 0||p.has(O))return;p.add(O),u[b]=O}let h=new Array(f),g=0,d=l-1,E=f-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==u[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==u[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let O=b+1<f?h[b+1].items[0]:c;h[b]=i(b,o[b],O)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,k=E-R+1,X=new Array(k).fill(0),P=new Map;for(let b=R;b<=E;++b)P.set(u[b],b);let U=!1,le=0;for(let b=T;b<=d;++b){let O=n[b],B=P.get(r(O.value));if(B===void 0){a(O);continue}if(!s(O.value,o[B])){a(O);continue}O.value=o[B],h[B]=O,X[B-R]=b+1,B>=le?le=B:U=!0}let Y=U?cs(X):[],L=Y.length-1;for(let b=k-1;b>=0;--b){let O=R+b,B=O+1<f?h[O+1].items[0]:c;if(X[b]===0){h[O]=i(O,o[O],B);continue}let Pe=h[O];U&&(L>=0&&Y[L]===b?--L:Pe&&as(Pe,B))}return h}};var lt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get S(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.S,this.T.push(e),this.ie(e)}yt(e,n){let o=this.S;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.S;for(let o=e;o<n;++o)this.T[o].order=o}Oe(e){let n=this.S;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var vn=Symbol("r-for"),us=t=>-1,Eo=()=>{},zt=class zt{constructor(e){m(this,"o");m(this,"x");m(this,"Me");m(this,"R");this.o=e,this.x=e.r.p.for,this.Me=Mt(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.o.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[vn]?!0:(e[vn]=!0,Ot(e,this.Me).forEach(n=>n[vn]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){H(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return me(e)?[]:(K(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var tt;let o=this.bt(n);if(!(o!=null&&o.list)){H(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(tt=e.getAttribute(r))!=null?tt:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=ze(e),c=_t.ft(this.o,a),l=e.parentNode;if(!l)return;let f=`${this.x} => ${n}`,u=new Comment(`__begin__ ${f}`);l.insertBefore(u,e),qe(u,a),a.forEach(M=>{Q(M)}),e.remove();let p=new Comment(`__end__ ${f}`);l.insertBefore(p,u.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),k=(M,Z)=>R(M)===R(Z),X=(M,Z)=>M===Z,P=(M,Z,ne)=>{let oe=o.createContext(Z,M),xe=lt.mt(oe.index,Z),x=()=>{var D,J;let A=(J=(D=p.parentNode)!=null?D:u.parentNode)!=null?J:l,y=ne.previousSibling,j=[];for(let S=0;S<a.length;++S){let V=a[S].cloneNode(!0);A.insertBefore(V,ne),j.push(V)}for(c?c.y(h,j):Le(h,j),y=y.nextSibling;y!==ne;)xe.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,x)):g.E(d,()=>{g.w(oe.ctx),x()}),xe},U=(M,Z)=>{let ne=I.D(M).items,oe=ne[ne.length-1].nextSibling;for(let xe of ne)Q(xe);I.ce(M,P(M,Z,oe))},le=(M,Z)=>{I.w(P(M,Z,p))},Y=M=>{for(let Z of I.D(M).items)Q(Z)},L=M=>{let Z=I.S;for(let ne=M;ne<Z;++ne)I.D(ne).index(ne)},b=M=>{let Z=u.parentNode,ne=p.parentNode;if(!Z||!ne)return;let oe=I.S;K(M)&&(M=M());let xe=F(M[0]);if(w(xe)&&xe.length===0){Re(u,p),I.Oe(0);return}let x=[];for(let v of this.Le(M[0]))x.push(v);let A=Ft.dt({oldItems:I.T,newValues:x,getKey:R,isSameValue:X,mountNewValue:(v,z,se)=>P(v,z,se),removeMountItem:v=>{for(let z=0;z<v.items.length;++z)Q(v.items[z])},endAnchor:p});if(A){I.T=A,I.P.clear();for(let v=0;v<A.length;++v){let z=A[v];z.order=v,z.index(v);let se=R(z.value);se!==void 0&&I.P.set(se,z)}return}let y=0,j=Number.MAX_SAFE_INTEGER,D=oe,J=this.o.r.forGrowThreshold,S=()=>I.S<D+J;for(let v of x){let z=()=>{if(y<oe){let se=I.D(y++);if(k(se.value,v)){if(X(se.value,v))return;U(y-1,v);return}let ht=I.ht(R(v));if(ht>=y&&ht-y<10){if(--y,j=Math.min(j,y),Y(y),I.Ne(y),--oe,ht>y+1)for(let an=y;an<ht-1&&an<oe&&!k(I.D(y).value,v);)++an,Y(y),I.Ne(y),--oe;z();return}S()?(I.yt(y-1,P(y,v,I.D(y-1).items[0])),j=Math.min(j,y-1),++oe):U(y-1,v)}else le(y++,v)};z()}let V=y;for(oe=I.S;y<oe;)Y(y++);I.Oe(V),L(j)},O=()=>{B.stop(),pe(),pe=Eo},B=g.V(o.list),Pe=B.value,pe=Eo,sn=0,I=new lt(R);for(let M of this.Le(Pe()[0]))I.w(P(sn++,M,p));G(u,O),pe=B.subscribe(b)}bt(e){var c,l;let n=zt.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,u)=>{let p={},h=F(f);if(!a&&o.length===1)p[o[0]]=f;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:us};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ce(u)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=F(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return F((r=F(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=F(o))==null?void 0:r[s];return F(o)}};m(zt,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var qt=zt;var Kt=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"O");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new qt(this),this.Pe=new Nt(this),this.Ue=new jt(this),this.O=new Ht(this),this.F=new Bt(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=de(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Le(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.O.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,G(s,()=>{Q(e)}),o.appendChild(e),!0}St(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.te,f=(s=r[i])!=null?s:r[c];if(!f){console.error("directive not found:",c);continue}let u=a.Se;for(let p=0;p<u.length;++p){let h=u[p];this.y(f,h,i,!1,l,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let f=l;for(;f;){let u=f.getAttribute(it);if(u)return u;f=f.parentElement}return null};if(hn()){let l=c(n);if(l){this.m.E(ao(l),()=>{this.M(e,n,a,s,i)});return}}this.M(e,n,a,s,i)}vt(e,n,o){return e!==Lt?!1:(q(o)||this.He(n,o)||this.St(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.vt(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);G(n,c.stop);let l=this.Ot(n,o,a,i,r,s),f=this.Mt(e,l,c);if(!f)return;let u=this.Vt(l,a,i,r,f);u(),e.once||(c.result=a.subscribe(u),i&&(c.dynamic=i.subscribe(u)))}At(e,n){let o=po(e,this.Be);if(o)return this.m.V(_(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Vt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var Ro="http://www.w3.org/1999/xlink",fs={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 ls(t){return!!t||t===""}var ps=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=_(o)),Wt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],u=l[0],p=l[1];Wt(t,u,p,f)}else if(N(l))for(let f of Object.entries(l)){let u=f[0],p=f[1],h=n==null?void 0:n[c],g=h&&u in h?u:void 0;Wt(t,u,p,g)}else{let f=n==null?void 0:n[c],u=e[c++],p=e[c];Wt(t,u,p,f)}}},An={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{ps(t,e,n,o,r,s)}})},Wt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),me(e)){H(3,"r-bind",t);return}if(!W(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){me(n)?t.removeAttributeNS(Ro,e.slice(6,e.length)):t.setAttributeNS(Ro,e,n);return}let r=e in fs;me(n)||r&&!ls(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var ms=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)wo(t,s[c],i==null?void 0:i[c])}else wo(t,s,i)}},Nn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ms(t,e,n)}})},wo=(t,e,n)=>{let o=t.classList,r=W(e),s=W(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(n!==e){let i=s?We(n):[],a=We(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(n){let i=s?We(n):[];i.length>0&&o.remove(...i)}};function ds(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=ve(t[o],e[o]);return n}function ve(t,e){if(t===e)return!0;let n=fn(t),o=fn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=nt(t),o=nt(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?ds(t,e):!1;if(n=N(t),o=N(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!ve(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Gt(t,e){return t.findIndex(n=>ve(n,e))}var So=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var On=t=>{if(!C(t))throw $(3,"pause");t(void 0,void 0,3)};var Mn=t=>{if(!C(t))throw $(3,"resume");t(void 0,void 0,4)};var Ao={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{hs(t,o[0])},unmount:ys(t,e,n)})},hs=(t,e)=>{let n=ko(t);if(n&&No(t))w(e)?e=Gt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=Es(t,e),t.checked=e;else if(n&&Oo(t))t.checked=ve(e,Ae(t));else if(n||Lo(t))Mo(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Io(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=Gt(e,c)>-1:a.selected=e.has(c);else if(ve(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},pt=t=>(C(t)&&(t=t()),K(t)&&(t=t()),t?W(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}),No=t=>t.type==="checkbox",Oo=t=>t.type==="radio",Mo=t=>t.type==="number"||t.type==="range",ko=t=>t.tagName==="INPUT",Lo=t=>t.tagName==="TEXTAREA",Io=t=>t.tagName==="SELECT",ys=(t,e,n)=>{let o=e.value,r=pt(n==null?void 0:n.join(",")),s=pt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,t),()=>{};let a=()=>e.refs[0],c=ko(t);return c&&No(t)?bs(t,a):c&&Oo(t)?Rs(t,a):c||Lo(t)?gs(t,i,a,o):Io(t)?ws(t,a,o):(H(7,t),()=>{})},vo=/[.,' ·٫]/,gs=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Mo(t),a=()=>{!e.trim&&!pt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,u),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},u=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=pt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(vo.test(d[d.length-1])&&d.split(vo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,u),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),f},bs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let l=Gt(c,i),f=l!==-1;a&&!f?c.push(i):!a&&f&&c.splice(l,1)}else fe(c)?a?c.add(i):c.delete(i):s(Cs(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,Vo="trueValue",Ts="falseValue",Po="true-value",xs="false-value",Cs=(t,e)=>{let n=e?Vo:Ts;if(n in t)return t[n];let o=e?Po:xs;return t.hasAttribute(o)?t.getAttribute(o):e},Es=(t,e)=>{if(Vo in t)return ve(e,t.trueValue);let o=Po;return t.hasAttribute(o)?ve(e,t.getAttribute(o)):ve(e,!0)},Rs=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},ws=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=pt(n()[1]).number,l=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?So(Ae(f)):Ae(f));if(t.multiple){let f=i();try{if(On(i),fe(f)){f.clear();for(let u of l)f.add(u)}else w(f)?(f.splice(0),f.push(...l)):i(l)}finally{Mn(i),te(i)}}else i(l[0])};return t.addEventListener(o,s),r};var Ss=["stop","prevent","capture","self","once","left","right","middle","passive"],vs=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of Ss)e[o]=n.includes(o);return e},As=(t,e,n,o,r)=>{var l,f;if(o){let u=e.value(),p=F(o.value()[0]);return W(p)?kn(t,_(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:u[1]):()=>{}}else if(n){let u=e.value();return kn(t,_(n),()=>e.value()[0],(f=r==null?void 0:r.join(","))!=null?f:u[1])}let s=[],i=()=>{s.forEach(u=>u())},a=e.value(),c=a.length;for(let u=0;u<c;++u){let p=a[u];if(K(p)&&(p=p()),N(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[u];return K(T)&&(T=T()),T=T[g],K(T)&&(T=T()),T},E=p[g+"_flags"];s.push(kn(t,g,d,E))}else H(2,"r-on",t)}return i},Ln={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>As(t,e,n,o,r)},Ns=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},kn=(t,e,n,o)=>{if(q(e))return H(5,"r-on",t),()=>{};let r=vs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Ns(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let u=n(f);K(u)&&(u=u(f)),K(u)&&u(f)},c=()=>{t.removeEventListener(e,l,s)},l=f=>{if(!r){a(f);return}try{if(r.left&&f.button!==0||r.middle&&f.button!==1||r.right&&f.button!==2||r.self&&f.target!==t)return;r.stop&&f.stopPropagation(),r.prevent&&f.preventDefault(),a(f)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Os=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=_(n)),Xe(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];Xe(t,a,c)}else if(N(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];Xe(t,c,l)}else{let a=e[s++],c=e[s];Xe(t,a,c)}}},Do={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Os(t,e,n,o)}})};function Ms(t){return!!t||t===""}var Xe=(t,e,n)=>{if(me(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(Ce),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ms(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var Uo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var ks=(t,e)=>{let n=Ue(t).data,o=n._ord;Zn(o)&&(o=n._ord=t.style.display),st(e[0])?t.style.display=o:t.style.display="none"},Ho={mount:()=>({update:({el:t,values:e})=>{ks(t,e)}})};var Ls=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Bo(t,s[c],i==null?void 0:i[c])}else Bo(t,s,i)}},Jt={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ls(t,e,n)}})},Bo=(t,e,n)=>{let o=t.style,r=W(e);if(e&&!r){if(n&&!W(n))for(let s in n)e[s]==null&&Vn(o,s,"");for(let s in e)Vn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ue(t).data)return;o.display=s}},jo=/\s*!important$/;function Vn(t,e,n){if(w(n))n.forEach(o=>{Vn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Is(t,e);jo.test(n)?t.setProperty(Ke(o),n.replace(jo,""),"important"):t[o]=n}}var $o=["Webkit","Moz","ms"],In={};function Is(t,e){let n=In[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return In[e]=o;o=ct(o);for(let r=0;r<$o.length;r++){let s=$o[r]+o;if(s in t)return In[e]=s}return e}var ue=t=>_o(F(t)),_o=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(w(t))return t.map(ue);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ue(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ue(r[0]),ue(r[1]));return o}if(e.has(t))return F(e.get(t));let n=gt({},t);e.set(t,n);for(let o of Object.entries(n))n[o[0]]=_o(F(o[1]),e);return n};var Vs=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ue([...n])):Oe(n)?JSON.stringify(ue([...n])):N(n)?JSON.stringify(ue(n)):(o=n==null?void 0:n.toString())!=null?o:""},Fo={mount:()=>({update:({el:t,values:e})=>{Vs(t,e)}})};var qo={mount:()=>({update:({el:t,values:e})=>{Xe(t,"value",e[0])}})};var Ve=class Ve{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Ve.je)!=null?e:Ve.je=new Ve}It(){let e={},n=globalThis;for(let o of Ve.Lt.split(","))e[o]=n[o];return e.ref=Se,e.sref=ce,e.flatten=ue,e}addComponent(...e){for(let n of e){if(!n.defaultName){Fe.warning("Registered component's default name is not defined",n);continue}this.Z.set(ct(n.defaultName),n),this._.set(ct(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":Do,":":An,"@":Ln,[`${e}on`]:Ln,[`${e}bind`]:An,[`${e}html`]:$t,[`${e}text`]:Fo,[`${e}show`]:Ho,[`${e}model`]:Ao,":style":Jt,[`${e}style`]:Jt,[`${e}bind:style`]:Jt,":class":Nn,[`${e}bind:class`]:Nn,":ref":Uo,":value":qo,[`${e}teleport`]:Lt},this.p={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.B,this.p)}};m(Ve,"je"),m(Ve,"Lt","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 ye=Ve;var Qt=(t,e)=>{if(!t)return;let o=(e!=null?e:ye.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Ds(t,o.pre,s))Ps(i,o.text,r,s)},Ps=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],f=zo(l,o);if(f&&q(i[0])&&q(i[2])){let u=t.parentElement;u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),u.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let f=zo(l,o);if(f){let u=document.createElement("span");u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),a.appendChild(u)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Ds=(t,e,n)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of we(s))r(a)}};return r(t),o},zo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Us=9,Hs=10,Bs=13,js=32,Ne=46,Xt=44,$s=39,_s=34,Yt=40,Ye=41,Zt=91,Pn=93,Dn=63,Fs=59,Ko=58,Wo=123,en=125,Be=43,tn=45,Un=96,Go=47,Hn=92,Jo=new Set([2,3]),tr={"=":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},qs=Qn(gt({"=>":2},tr),{"||":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}),nr=Object.keys(tr),zs=new Set(nr),jn=new Set(["=>"]);nr.forEach(t=>jn.add(t));var Qo={true:!0,false:!1,null:null},Ks="this",Ze="Expected ",je="Unexpected ",_n="Unclosed ",Ws=Ze+":",Xo=Ze+"expression",Gs="missing }",Js=je+"object property",Qs=_n+"(",Yo=Ze+"comma",Zo=je+"token ",Xs=je+"period",Bn=Ze+"expression after ",Ys="missing unaryOp argument",Zs=_n+"[",ei=Ze+"exponent (",ti="Variable names cannot start with a number (",ni=_n+'quote after "',mt=t=>t>=48&&t<=57,er=t=>qs[t],$n=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||mt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===js||e===Us||e===Hs||e===Bs;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===Fs||o===Xt)this.e++;else{let r=this.v();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(je+'"'+this.H+'"')}}}return n}v(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:er(n),right_a:jn.has(n)},i=this.z(),!i)throw this.i(Bn+n);let l=[s,r,i];for(;n=this.de();){o=er(n),r={value:n,prec:o,right_a:jn.has(n)},c=n;let f=u=>r.right_a&&u.right_a?o>u.prec:o<=u.prec;for(;l.length>2&&f(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.z(),!e)throw this.i(Bn+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(mt(n)||n===Ne)return this.Bt();if(n===$s||n===_s)e=this.Ht();else if(n===Zt)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(Ys);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in Qo?e={type:4,value:Qo[e.name],raw:e.name}:e.name===Ks&&(e={type:5})):n===Yt&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return zs.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===tn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===Be?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===Zt||n===Yt||n===Dn;){let o;if(n===Dn){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===Zt){if(e={type:3,computed:!0,object:e,property:this.v()},this.g(),n=this.h,n!==Pn)throw this.i(Zs);this.e++}else n===Yt?e={type:6,arguments:this.qe(Ye),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;mt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;mt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===Be||a===tn)&&o++;let c=o;for(;mt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(ei+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(ti+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(Xs);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let u=e.charCodeAt(s);if(u===r){l=!0,this.e=s+1;break}if(u===Hn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let f=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(ni+f+'"');return{type:4,value:f,raw:e.substring(o,this.e)}}Ke(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)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(je+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===Ye&&r&&r>=n.length)throw this.i(Zo+String.fromCharCode(e));break}else if(s===Xt){if(this.e++,r++,r!==n.length){if(e===Ye)throw this.i(Zo+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Yo);{let i=this.v();if(!i||i.type===0)throw this.i(Yo);n.push(i)}}}if(!o)throw this.i(Ze+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(Ye);if(this.f(Ye))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Qs)}jt(){return this.e++,{type:9,elements:this.qe(Pn)}}Ft(e){if(this.f(Wo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(en)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.v();if(!o)break;if(this.g(),o.type===2&&(this.f(Xt)||this.f(en)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Ko)){this.e++;let r=this.v();if(!r)throw this.i(Js);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(Xt)&&this.e++}throw this.i(Gs)}}qt(e){let n=this.h;if((n===Be||n===tn)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===Be?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!Jo.has(o.argument.type))throw this.i(je+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===Be||o===tn)&&o===this.u.charCodeAt(this.e+1)){if(!Jo.has(n.type))throw this.i(je+(o===Be?"++":"--"));this.e+=2,e.node={type:13,operator:o===Be?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.v()})}Xt(e){if(e.node&&this.f(Dn)){this.e++;let n=e.node,o=this.v();if(!o)throw this.i(Xo);if(this.g(),this.f(Ko)){this.e++;let r=this.v();if(!r)throw this.i(Xo);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(Ws)}}Qt(e){if(this.g(),this.f(Yt)){let n=this.e;if(this.e++,this.g(),this.f(Ye)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(Bn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Un)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Un))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=f=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:f})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:u,cooked:p},tail:f})};for(;this.e<o;){let f=n.charCodeAt(this.e);if(f===Un)return l(!0),this.e+=1,e.node=r,r;if(f===36&&n.charCodeAt(this.e+1)===Wo){if(l(!1),this.e+=2,r.expressions.push(...this.fe(en)),!this.f(en))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(f===Hn){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.Ke(u)),this.e+=2,s=this.e}else this.e+=1}throw this.i("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.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(Go))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Go&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(Zt)?o=!0:o&&this.f(Pn)&&(o=!1),this.e+=this.f(Hn)?2:1}throw this.i("Unclosed Regex")}},or=t=>new $n(t).parse();var oi={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(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)=>yt(t,e)},ri={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},ar=t=>{if(!(t!=null&&t.some(ir)))return t;let e=[];return t.forEach(n=>ir(n)?e.push(...n):e.push(n)),e},rr=(...t)=>ar(t),Fn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},si={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(--o),o}return--t[e]}},ii={"++":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(C(n)){let o=n();return n(o-1),o}return t[e]--}},sr={"=":(t,e,n)=>{let o=t[e];return C(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return C(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return C(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return C(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return C(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return C(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return C(o)?o(yt(o(),n)):t[e]=yt(t[e],n)},"<<=":(t,e,n)=>{let o=t[e];return C(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return C(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return C(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return C(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return C(o)?o(o()^n):t[e]^=n}},nn=(t,e)=>K(t)?t.bind(e):t,qn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],nn(F(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],nn(F(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],nn(F(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,rr,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,nn(F(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>K(i)?i(...ar(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,ri[e.operator],e.argument)}8(e,n,o){let r=oi[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,rr,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var f;let r={},s=u=>(u==null?void 0:u.type)!==15,i=(f=this.Ge)!=null?f:()=>!1,a=n===0&&this.Qe,c=u=>this.Ze(a,e.key,n,Fn(u,o)),l=u=>this.Ze(a,e.value,n,Fn(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&i(u,n)?c:c()}else if(e.computed){let u=F(c());r[u]=s(e.value)&&i(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&i(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?si:ii;if(r.type===2){let a=r.name,c=this.Xe(a,o);return me(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(me(a))return;let c=this.b(e.right,n,o);return sr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return sr[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=cr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=F(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&C(this.A)}eval(e,n){let{value:o,refs:r}=Rn(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,Fn(l,n)):this.b(a,e,n)));return o(...i)}},cr=Symbol("s"),ir=t=>(t==null?void 0:t.s)===cr,ur=(t,e,n,o,r,s,i)=>new qn(e,n,o,r,i).eval(t,s);var fr={},lr=t=>!!t,on=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(lr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(lr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,k)=>(c.add(R),k&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,k,X,P)=>{try{let U=ur(R,k,h,n,o,P,r);return X&&U.refs.length>0&&g.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){H(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let R=(T=fr[e])!=null?T:or("["+e+"]");fr[e]=R;let k=this.l.slice(),X=R.elements,P=X.length,U=new Array(P);p.refs=U;let le=()=>{g.length=0,s||(d.clear(),l());let Y=new Array(P);for(let L=0;L<P;++L){let b=X[L];if(n!=null&&n(L,-1)){Y[L]=B=>E(b,k,!1,{$event:B}).value;continue}let O=E(b,k,!0);Y[L]=O.value,U[L]=O.ref}if(!s)for(let L of g)d.has(L)||(d.add(L),a.push(ie(L,le)));if(i=Y,c.size!==0)for(let L of c)c.has(L)&&L(i)};le()}catch(R){H(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var pr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ai=(t,e)=>{let n="";for(let o=e;o<t.length;++o){let r=t[o];if(n){r===n&&(n="");continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return o}return-1},ci=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!pr(t[n]))return null;let o=n;for(;n<t.length&&pr(t[n]);)++n;return{start:o,end:n}},mr=new Set(["table","thead","tbody","tfoot"]),ui=new Set(["thead","tbody","tfoot"]),fi=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),li=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),dr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,rn=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=ai(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let u=ci(c,l);if(!u){n.push(c),e=a+1;continue}let p=c.slice(u.start,u.end);if(l){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),mr.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):ui.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=fi.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!li.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,u.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(u.end)}`;n.push(E?dr(R,d):R)}else n.push(E?dr(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),mr.has(T)&&++r}e=a+1}return n.join("")};var pi="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",mi=new Set(pi.toUpperCase().split(",")),di="http://www.w3.org/2000/svg",hr=(t,e)=>{de(t)?t.content.appendChild(e):t.appendChild(e)},zn=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&mi.has(r.toUpperCase())?document.createElementNS(di,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let f of Object.entries(c)){let u=f[0],p=f[1];u.startsWith("#")&&(p=u.substring(1),u="name"),a.setAttribute(kt(u,o),p)}let l=t.c;if(l)for(let f of l)zn(f,a,n,o);hr(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)hr(e,a);else throw new Error("unsupported node type.")}},et=(t,e,n)=>{n!=null||(n=ye.getDefault());let o=document.createDocumentFragment();if(!w(t))return zn(t,o,!!e,n),o;for(let r of t)zn(r,o,!!e,n);return o};var hi=(t,e={selector:"#app"},n)=>{W(e)&&(e={selector:"#app",template:e}),mo(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Ee(o))throw $(0);n||(n=ye.getDefault());let r=()=>{for(let a of[...o.childNodes])Q(a)},s=a=>{for(;a.length>0;)o.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(rn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=et(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Qt(o,n),new Kn(t,o,n).y(),G(o,()=>{Me(t)}),It(t),{context:t,unmount:()=>{Q(o)},unbind:()=>{Ce(o)}}},Kn=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new on([e],o),this.o=new Kt(this.m)}y(){this.o.$(this.nt)}};var dt=t=>{if(w(t))return t.map(r=>dt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=we(t);return o.length>0&&(e.c=[...o].map(r=>dt(r))),e};var yi=(t,e={})=>{var s,i,a,c,l,f;w(e)&&(e={props:e}),W(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!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 $(1,t.selector);u.remove(),t.element=u}else if(t.template){let u=document.createRange().createContextualFragment(rn(t.template));t.element=u}else t.json&&(t.element=et(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&Qt(t.element,(a=e.config)!=null?a:ye.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:at(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||at(r)&&r.querySelector("[isSVG]"))){let u=r.content,p=u?[...u.childNodes]:[...r.childNodes],h=dt(p);t.element=et(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var Wn=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var gi=t=>{var e;(e=De())==null||e.onMounted.push(t)};var bi=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw $(4);return e&&!n.isStopped?e(...r):(e=Ti(t,n),e(...r))};return o[ee]=1,Ie(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},Ti=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ce(null);e.ref=n,e.isStopped=!1;let o=0,r=Je(()=>{if(o>0){r(),e.isStopped=!0,te(n);return}n(t()),++o});return n.stop=r,n};var xi=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=Ci(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Ci=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ce(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}let l=t.map(f=>f());o(e(...l)),++r},i=[];for(let c of t){let l=ie(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Ei=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw $(4);return o&&!n.isStopped?o(...s):(o=Ri(t,e,n),o(...s))};return r[ee]=1,Ie(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Ri=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ce(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=ie(t,i=>{if(r>0){o.stop(),n.isStopped=!0,te(o);return}o(e(i)),++r},!0),o};var wi=t=>(t[Rt]=1,t);var Si=(t,e)=>{if(!e)throw $(5);let o=Ge(t)?Se:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ue(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Je(r);return re(i,!0),t};var Gn=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},vi=Gn,Ai=Gn;var Ni=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(ie(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Oi=t=>{if(!C(t))throw $(3,"observerCount");return t(void 0,void 0,2)};var Mi=t=>{yr();try{t()}finally{gr()}},yr=()=>{Te.stack||(Te.stack=[]),Te.stack.push(new Set)},gr=()=>{let t=Te.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let o of e)n.add(o);return}delete Te.stack;for(let n of e)try{te(n)}catch(o){console.error(o)}};export{rt as ComponentHead,Wn as ContextRegistry,ye as RegorConfig,G as addUnbinder,Mi as batch,Rn as collectRefs,xi as computeMany,Ei as computeRef,bi as computed,hi as createApp,yi as defineComponent,wr as drainUnbind,gr as endBatch,ut as entangle,ue as flatten,Ue as getBindData,Gn as html,Ge as isDeepRef,ft as isRaw,C as isRef,wi as markRaw,ie as observe,Ni as observeMany,Oi as observerCount,gi as onMounted,re as onUnmounted,On as pause,Si as persist,_r as pval,vi as raw,Se as ref,Q as removeNode,Mn as resume,En as silence,ce as sref,yr as startBatch,Ai as svg,et as toFragment,dt as toJsonTemplate,te as trigger,Ce as unbind,F as unref,xn as useScope,Fe as warningHandler,Je as watchEffect};
@@ -808,6 +808,17 @@ var Regor = (() => {
808
808
  getBindData(node).unbinders.push(unbinder);
809
809
  };
810
810
 
811
+ // src/common/toBoolean.ts
812
+ var toBoolean = (value) => {
813
+ if (typeof value === "string") {
814
+ const normalized = value.trim().toLowerCase();
815
+ if (normalized === "" || normalized === "0" || normalized === "false")
816
+ return false;
817
+ if (normalized === "true") return true;
818
+ }
819
+ return !!value;
820
+ };
821
+
811
822
  // src/bind/switch.ts
812
823
  var switches = {};
813
824
  var switchCounter = {};
@@ -998,7 +1009,7 @@ var Regor = (() => {
998
1009
  unmount: () => {
999
1010
  unmount(commentBegin, commentEnd);
1000
1011
  },
1001
- isTrue: () => !!value()[0],
1012
+ isTrue: () => toBoolean(value()[0]),
1002
1013
  isMounted: false
1003
1014
  },
1004
1015
  ...remainingElses
@@ -1019,7 +1030,7 @@ var Regor = (() => {
1019
1030
  const capturedContext = parser.__capture();
1020
1031
  const refresh = () => {
1021
1032
  parser.__scoped(capturedContext, () => {
1022
- if (value()[0]) {
1033
+ if (toBoolean(value()[0])) {
1023
1034
  if (!isIfMounted) {
1024
1035
  mount(nodes, this.__binder, parent, commentEnd);
1025
1036
  isIfMounted = true;
@@ -4024,7 +4035,7 @@ var Regor = (() => {
4024
4035
  if (isUndefined(originalDisplay)) {
4025
4036
  originalDisplay = data._ord = el.style.display;
4026
4037
  }
4027
- const isVisible = !!values[0];
4038
+ const isVisible = toBoolean(values[0]);
4028
4039
  if (isVisible) el.style.display = originalDisplay;
4029
4040
  else el.style.display = "none";
4030
4041
  };
@@ -6385,8 +6396,8 @@ var Regor = (() => {
6385
6396
  }
6386
6397
  };
6387
6398
  const appendChildren = (childNodes) => {
6388
- for (const child of childNodes) {
6389
- root.appendChild(child);
6399
+ while (childNodes.length > 0) {
6400
+ root.appendChild(childNodes[0]);
6390
6401
  }
6391
6402
  };
6392
6403
  if (template.template) {