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