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