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