regor 1.2.9 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/regor.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
- export declare class ComponentHead<TContext = IRegorContext> {
3
+ export declare class ComponentHead<TContext extends IRegorContext | object = IRegorContext> {
4
4
  props: TContext;
5
5
  start: Comment;
6
6
  end: Comment;
@@ -31,7 +31,7 @@ export declare class RegorConfig {
31
31
  globalContext: Record<string, unknown>;
32
32
  useInterpolation: boolean;
33
33
  constructor(globalContext?: Record<string, unknown>);
34
- addComponent<TContext = IRegorContext>(...components: Array<Component<TContext>>): void;
34
+ addComponent<TContext extends IRegorContext | object = IRegorContext>(...components: Array<Component<TContext>>): void;
35
35
  setDirectives(prefix: string): void;
36
36
  updateDirectives(updater: (directiveMap: Record<string, Directive>, builtInNames: Record<string, string>) => void): void;
37
37
  }
@@ -158,7 +158,7 @@ export interface Template {
158
158
  */
159
159
  isSVG?: boolean;
160
160
  }
161
- export interface App<TRegorContext extends IRegorContext> {
161
+ export interface App<TRegorContext extends IRegorContext | object> {
162
162
  context: TRegorContext;
163
163
  unmount: () => void;
164
164
  unbind: () => void;
@@ -168,14 +168,14 @@ export interface App<TRegorContext extends IRegorContext> {
168
168
  *
169
169
  * @typeparam TContext - The type of context accepted by the component.
170
170
  */
171
- export interface Component<TContext = IRegorContext> {
171
+ export interface Component<TContext extends IRegorContext | object = IRegorContext> {
172
172
  /**
173
173
  * A function that returns the Regor context associated with the component.
174
174
  *
175
175
  * @param head - Provides information on component mount.
176
176
  * @returns The component context.
177
177
  */
178
- context: (head: ComponentHead<TContext>) => TContext;
178
+ context(head: ComponentHead<TContext>): TContext;
179
179
  /**
180
180
  * The template for the component.
181
181
  */
@@ -196,13 +196,13 @@ export interface Component<TContext = IRegorContext> {
196
196
  }
197
197
  export type OnMounted = () => void;
198
198
  export type OnUnmounted = () => void;
199
- export interface CreateComponentOptions<TContext = IRegorContext> {
199
+ export interface CreateComponentOptions<TContext extends IRegorContext | object = IRegorContext> {
200
200
  useInterpolation?: boolean;
201
201
  config?: RegorConfig;
202
202
  /**
203
203
  * A function that defines the Regor context for the component.
204
204
  */
205
- context?: (head: ComponentHead<TContext>) => TContext;
205
+ context?(head: ComponentHead<TContext>): TContext;
206
206
  inheritAttrs?: boolean;
207
207
  /**
208
208
  * Notes on component props:
@@ -223,8 +223,8 @@ export interface Scope<TRegorContext> {
223
223
  [ScopeSymbol]: true;
224
224
  [key: string]: unknown;
225
225
  }
226
- export declare const createApp: <TRegorContext extends IRegorContext>(context: TRegorContext | Scope<TRegorContext>, template?: Template | string, config?: RegorConfig) => App<TRegorContext>;
227
- export declare const createComponent: <TContext = IRegorContext>(template: Template | string, options?: CreateComponentOptions<TContext> | string[]) => Component<TContext>;
226
+ export declare const createApp: <TRegorContext extends IRegorContext | object = IRegorContext>(context: TRegorContext | Scope<TRegorContext>, template?: Template | string, config?: RegorConfig) => App<TRegorContext>;
227
+ export declare const createComponent: <TContext extends IRegorContext | object = IRegorContext>(template: Template | string, options?: CreateComponentOptions<TContext> | string[]) => Component<TContext>;
228
228
  export declare const toFragment: (json: JSONTemplate | JSONTemplate[], isSVG?: boolean, config?: RegorConfig) => DocumentFragment;
229
229
  export declare const toJsonTemplate: (node: Element | Element[]) => JSONTemplate | JSONTemplate[];
230
230
  export declare const addUnbinder: (node: Node, unbinder: Unbinder) => void;
@@ -233,7 +233,7 @@ export declare const removeNode: (node: ChildNode) => void;
233
233
  export declare const unbind: (node: Node) => void;
234
234
  export declare const onMounted: (onMounted: OnMounted) => void;
235
235
  export declare const onUnmounted: (onUnmounted: OnUnmounted, noThrow?: boolean) => void;
236
- export declare const useScope: <TRegorContext extends IRegorContext>(context: () => TRegorContext) => Scope<TRegorContext>;
236
+ export declare const useScope: <TRegorContext extends IRegorContext | object>(context: () => TRegorContext) => Scope<TRegorContext>;
237
237
  export declare const computed: <TReturnType>(compute: () => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
238
238
  export declare const computeMany: <TReturnType>(sources: AnyRef[], compute: (...values: any[]) => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
239
239
  export declare const computeRef: <TValueType extends AnyRef, TReturnType>(source: TValueType, compute: (value: UnwrapRef<TValueType>) => TReturnType) => ComputedRef<UnwrapRef<TReturnType>>;
@@ -1,4 +1,4 @@
1
- "use strict";var Ft=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var no=Object.prototype.hasOwnProperty;var ro=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},oo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of to(e))!no.call(t,o)&&o!==n&&Ft(t,o,{get:()=>e[o],enumerable:!(r=eo(e,o))||r.enumerable});return t};var so=t=>oo(Ft({},"__esModule",{value:!0}),t);var ws={};ro(ws,{ComponentHead:()=>Ie,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>Zr,collectRefs:()=>gt,computeMany:()=>Kr,computeRef:()=>Wr,computed:()=>zr,createApp:()=>$r,createComponent:()=>Fr,endBatch:()=>Cn,entangle:()=>Be,flatten:()=>J,getBindData:()=>ge,html:()=>xn,isDeepRef:()=>Se,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Gr,observe:()=>w,observeMany:()=>Xr,observerCount:()=>Yr,onMounted:()=>qr,onUnmounted:()=>K,pause:()=>At,persist:()=>Jr,raw:()=>Qr,ref:()=>ae,removeNode:()=>V,resume:()=>Nt,silence:()=>yt,sref:()=>q,startBatch:()=>vn,toFragment:()=>Ae,toJsonTemplate:()=>Ke,trigger:()=>F,unbind:()=>re,unref:()=>B,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>we});module.exports=so(ws);var Le=Symbol(":regor");var re=t=>{let e=[t];for(;e.length>0;){let n=e.shift();io(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},io=t=>{let e=t[Le];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Le]}};var V=t=>{t.remove(),setTimeout(()=>re(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),ao=Object.prototype.toString,qt=t=>ao.call(t),he=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Je=t=>typeof t=="symbol",E=Array.isArray,A=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var st=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},ve=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=ve();return t&&Wt(t),st.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let r=ve();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Kt]=ve()},it=t=>t[Kt];var ye=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ie=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)ye(r)}};var ge=t=>{let e=t[Le];if(e)return e;let n={unbinders:[],data:{}};return t[Le]=n,n};var D=(t,e)=>{ge(t).unbinders.push(e)};var Mn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},L=(t,...e)=>{let n=Mn[t],r=U(n)?n.call(Mn,...e):n,o=Qe.warning;o&&(H(r)?o(r):o(r,...r.args))},Qe={warning:console.warn};var K=(t,e)=>{ve(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var ft={},pt={},kn=1,Ln=t=>{let e=(kn++).toString();return ft[e]=t,pt[e]=0,e},Gt=t=>{pt[t]+=1},Jt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},In=t=>ft[t],Qt=()=>kn!==1&&Object.keys(ft).length>0,Xe="r-switch",co=t=>{let e=t.filter(r=>Ce(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Xe))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},De=(t,e)=>{if(!Qt())return;let n=co(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=He(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=be(e,this.K);for(let o of r)this.T(o);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,be(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),De(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(o,this.p,s,a)},unmount:()=>{pe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),f=this.p.h.C(o),p=f.value,l=this.ce(r,n),g=[];D(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{pe(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(Xt(o,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{pe(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(r,d),m=[];D(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var Ue=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)Un(n)||t.H(n)},be=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,fe=t=>se(t)?t.content.childNodes:t.childNodes,pe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},He=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},po=/-(\w)/g,_=Zt(t=>t&&t.replace(po,(e,n)=>n?n.toUpperCase():"")),fo=/\B([A-Z])/g,_e=Zt(t=>t&&t.replace(fo,"-$1").toLowerCase()),Ze=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),ht=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>ye(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>A(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=o[a];f!==c&&(h(f)?f(c):o[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Be=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Ve=t=>!!t&&t[ct]===1;var Se=t=>t?.[at]===1;var te=[],jn=t=>{te.length!==0&&te[te.length-1]?.add(t)},we=t=>{if(!t)return()=>{};let e={stop:()=>{}};return lo(t,e),K(()=>e.stop(),!0),e.stop},lo=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(te.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),we(t)});n.push(a)}}finally{te.pop()}},yt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},gt=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var F=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(E(o)||X(o))for(let s of o)F(s,e,!0);else if(he(o))for(let s of o)F(s[0],e,!0),F(s[1],e,!0);if(A(o))for(let s in o)F(o[s],e,!0)}};function uo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Pe=(t,e,n)=>{n.forEach(function(r){let o=t[r];uo(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var $n=Array.prototype,tn=Object.create($n),mo=["push","pop","shift","unshift","splice","sort","reverse"];Pe($n,tn,mo);var Fn=Map.prototype,Tt=Object.create(Fn),ho=["set","clear","delete"];bt(Tt,"Map");Pe(Fn,Tt,ho);var qn=Set.prototype,Et=Object.create(qn),yo=["add","clear","delete"];bt(Et,"Set");Pe(qn,Et,yo);var ie={},q=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:E(c)?(Object.setPrototypeOf(c,tn),!0):X(c)?(Object.setPrototypeOf(c,Et),!0):he(c)?(Object.setPrototypeOf(c,Tt),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}o.size!==0&&yt(()=>{for(let p of[...o.keys()])o.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(jn(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{o.delete(g)};return o.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Ee(a,!1),r&&i(t),a};var ae=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Se(o)||(t[r]=ae(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Se(r))continue;let o=n[0];Je(o)||(t[o]=null,t[o]=ae(r))}return e};var zn=Symbol("modelBridge"),go=t=>!!t?.[zn],bo=t=>{t[zn]=1},To=t=>{let e=ae(t());return bo(e),e},Kn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=_(r),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Be(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(go(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=To(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var xt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(_e),...a.map(_e)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let We=n.o.l.props,Ge=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(y,S)=>{let x={},j=y.hasAttribute(We),z=y.hasAttribute(Ge);return r.v(S,()=>{r.S(x),j&&n.T(Vn,y,We),z&&n.T(Pn,y,Ge);let v=T.props;if(!v||v.length===0)return;v=v.map(_);let G=new Map(v.map(Q=>[Q.toLowerCase(),Q]));for(let Q of v.concat(v.map(_e))){let ce=y.getAttribute(Q);ce!==null&&(x[_(Q)]=ce,y.removeAttribute(Q))}let jt=n.J.de(y,!1);for(let[Q,ce]of jt.entries()){let[$t,Rn]=ce.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(Kn,y,Q,!0,Sn,ce.X))}}),x},me=[...r.V()],rt=()=>{let y=nt(l,me),S=new Ie(y,l,me,N,Ne),x=ht(()=>T.context(S)??{}).context;if(S.autoProps){for(let[j,z]of Object.entries(y))if(j in x){let v=x[j];if(v===z)continue;S.entangle&&h(v)&&h(z)&&D(N,Be(z,v))}else x[j]=z;S.onAutoPropsAssigned?.()}return{componentCtx:x,head:S}},{componentCtx:de,head:ot}=rt(),O=[...fe(b)],C=O.length,k=l.childNodes.length===0,P=y=>{let S=y.parentElement;if(k){for(let v of[...y.childNodes])S.insertBefore(v,y);return}let x=y.name;$(x)&&(x=y.getAttributeNames().filter(v=>v.startsWith("#"))[0],$(x)?x="default":x=x.substring(1));let j=l.querySelector(`template[name='${x}'], template[\\#${x}]`);!j&&x==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(j=null));let z=v=>{ot.enableSwitch&&r.v(me,()=>{r.S(de);let G=nt(y,r.V());r.v(me,()=>{r.S(G);let jt=r.V(),Q=Ln(jt);for(let ce of v)Ce(ce)&&(ce.setAttribute(Xe,Q),Gt(Q),D(ce,()=>{Jt(Q)}))})})};if(j){let v=[...fe(j)];for(let G of v)S.insertBefore(G,y);z(v)}else{if(x!=="default"){for(let G of[...fe(y)])S.insertBefore(G,y);return}let v=[...fe(l)].filter(G=>!se(G));for(let G of v)S.insertBefore(G,y);z(v)}},R=y=>{if(!Ce(y))return;let S=y.querySelectorAll("slot");if(Hn(y)){P(y),y.remove();return}for(let x of S)P(x),x.remove()};(()=>{for(let y=0;y<C;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(Ne,d);let Me=()=>{if(!T.inheritAttrs)return;let y=O.filter(x=>x.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(x=>x.hasAttribute(this.le)));let S=y[0];if(S)for(let x of l.getAttributeNames()){if(x===We||x===Ge)continue;let j=l.getAttribute(x);if(x==="class")S.classList.add(...j.split(" "));else if(x==="style"){let z=S.style,v=l.style;for(let G of v)z.setProperty(G,v.getPropertyValue(G))}else S.setAttribute(ut(x,n.o),j)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},ke=()=>{Me(),ne(),r.S(de),n.ye(l,!1),de.$emit=ot.emit,Te(n,O),D(l,()=>{ye(de)}),D(N,()=>{re(l)}),dt(de)};r.v(me,ke)}}};var nn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if($(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=_(o[i])}s.includes("prop")&&(o[0]=".")}}},vt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ye(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>o.some(p=>f.startsWith(p)));for(let f of c)r.has(f)||r.set(f,new nn(f)),r.get(f).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Eo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Ct=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=be(e,this.xe);for(let o of r)this.T(o);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=Ue(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),De(s,r),r.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=se(e)?r:[...r[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!H(b)||$(b)){pe(s,i);return}if(l.name===b)return;pe(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));Eo(g,M),o.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];D(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var et=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var rn=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=He(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[rn]?!0:(e[rn]=!0,be(e,this.ne).forEach(n=>n[rn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ee(e)?[]:(U(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?C=>B(B(C)?.[i]):C=>C,c=(C,k)=>a(C)===a(k),f=Ue(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),De(g,f),f.forEach(C=>{V(C)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(C,k,P)=>{let R=r.createContext(k,C),Z=et.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Me=d.parentNode??g.parentNode;if(!Me)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=P.previousSibling,ke=[];for(let y of f){let S=y.cloneNode(!0);Me.insertBefore(S,P),ke.push(S)}for(Te(u,ke),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(C,k)=>{let P=O.D(C).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);O.te(C,b(C,k,R))},N=(C,k)=>{O.S(b(C,k,d))},Ne=C=>{for(let k of O.D(C).items)V(k)},We=C=>{let k=O.w;for(let P=C;P<k;++P)O.D(P).index(P)},Ge=C=>{let k=O.w;U(C)&&(C=C());let P=B(C[0]);if(E(P)&&P.length===0){pe(g,d),O.Re(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,Me=k,ne=this.p.o.forGrowThreshold,ke=()=>O.w<Me+ne;for(let S of this.Ee(C[0])){let x=()=>{if(R<k){let j=O.D(R++);if(c(j.value,S))return;let z=O.Qe(a(S));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),O.Te(R),--k,z>R+1)for(let v=R;v<z-1&&v<k&&!c(O.D(R).value,S);)++v,Ne(R),O.Te(R),--k;x();return}ke()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,S)}else N(R++,S)};x()}let y=R;for(k=O.w;R<k;)Ne(R++);O.Re(y),We(Z)},Pt=()=>{de=w(rt,Ge)},nt=()=>{me.stop(),de()},me=m.C(r.list),rt=me.value,de,ot=0,O=new et(a);for(let C of this.Ee(rt()[0]))O.S(b(ot++,C,d));D(g,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&r.length===1)p[r[0]]=c;else if(E(l)){let d=0;for(let u of r)p[u]=l[d++]}else for(let d of r)p[d]=l[d];let g={ctx:p,index:q(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),g}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new lt(this),this.Se=new Ct(this),this.we=new xt(this),this.J=new vt(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.j;for(let[s,i]of r.entries()){let[a,c]=i.Q,f=o[s]??o[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let p=f.getAttribute(Xe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==mt)return!1;if($(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=_n(o,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=o,o),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,r,o,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Wn="http://www.w3.org/1999/xlink",xo={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 vo(t){return!!t||t===""}var on={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),wt(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;wt(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Wn,e.slice(6,e.length)):t.setAttributeNS(Wn,e,n);return}let o=e in xo;ee(n)||o&&!vo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var sn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)Gn(t,s[c],i?.[c])}else Gn(t,s,i)}}},Gn=(t,e,n)=>{let r=t.classList,o=H(e),s=H(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Jn={onChange:(t,e)=>{let[n,r]=e;U(r)?r(t,n):t.innerHTML=n?.toString()}};function Co(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=le(t[r],e[r]);return n}function le(t,e){if(t===e)return!0;let n=zt(t),r=zt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Je(t),r=Je(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?Co(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>le(n,e))}var Qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Yn={onChange:(t,e)=>{Ro(t,e[0])},onBind:(t,e,n,r,o,s)=>So(t,e,s)},Ro=(t,e)=>{let n=nr(t);if(n&&Zn(t))E(e)?e=Ot(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=ko(t,e),t.checked=e;else if(n&&er(t))t.checked=le(e,ue(t));else if(n||rr(t))tr(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(or(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ue(a);if(s)E(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(h(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Zn=t=>t.type==="checkbox",er=t=>t.type==="radio",tr=t=>t.type==="number"||t.type==="range",nr=t=>t.tagName==="INPUT",rr=t=>t.tagName==="TEXTAREA",or=t=>t.tagName==="SELECT",So=(t,e,n)=>{let r=e.value,o=tt(n?.join(",")),s=tt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=nr(t);return c&&Zn(t)?Oo(t,a):c&&er(t)?Lo(t,a):c||rr(t)?wo(t,i,a,r):or(t)?Io(t,a,r):(L(7,t),()=>{})},Xn=/[.,' ·٫]/,wo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=tr(t),a=()=>{!e.trim&&!tt(r()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=tt(r()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Xn.test(m[m.length-1])&&m.split(Xn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},Oo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(E(c)){let f=Ot(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(Mo(t,a))};return t.addEventListener(n,o),r},ue=t=>"_value"in t?t._value:t.value,sr="trueValue",Ao="falseValue",ir="true-value",No="false-value",Mo=(t,e)=>{let n=e?sr:Ao;if(n in t)return t[n];let r=e?ir:No;return t.hasAttribute(r)?t.getAttribute(r):e},ko=(t,e)=>{if(sr in t)return le(e,t.trueValue);let r=ir;return t.hasAttribute(r)?le(e,t.getAttribute(r)):le(e,!0)},Lo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,o),r},Io=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=tt(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Qn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(At(i),X(p)){p.clear();for(let l of f)p.add(l)}else E(p)?(p.splice(0),p.push(...f)):i(f)}finally{Nt(i),F(i)}}else i(f[0])};return t.addEventListener(r,s),o};var Do=["stop","prevent","capture","self","once","left","right","middle","passive"],Uo=t=>{let e={};if($(t))return;let n=t.split(",");for(let r of Do)e[r]=n.includes(r);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let p=e.value(),l=B(o.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(r){let p=e.value();return an(t,_(r),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return U(T)&&(T=T()),T=T[d],U(T)&&(T=T()),T},m=l[d+"_flags"];i.push(an(t,d,u,m))}else L(2,name,t)}return a}},Ho=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(o&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return r?[t,f=>c(f)?f.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},an=(t,e,n,r)=>{if($(e))return L(5,name,t),()=>{};let o=Uo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Ho(e,r);let a=p=>{if(!i(p)||!n&&e==="submit"&&o?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!o){a(p);return}try{if(o.left&&p.button!==0||o.middle&&p.button!==1||o.right&&p.button!==2||o.self&&p.target!==t)return;o.stop&&p.stopPropagation(),o.prevent&&p.preventDefault(),a(p)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var ar={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),je(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=c[0],p=c[1];je(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];je(t,p,l)}else{let f=e[a++],p=e[a];je(t,f,p)}}}};function _o(t){return!!t||t===""}var je=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(re),1),t[e]=n??"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=_o(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var cr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=E(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var pr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;wn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)fr(t,s[c],i?.[c])}else fr(t,s,i)}}},fr=(t,e,n)=>{let r=t.style,o=H(e);if(e&&!o){if(n&&!H(n))for(let s in n)e[s]==null&&fn(r,s,"");for(let s in e)fn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},lr=/\s*!important$/;function fn(t,e,n){if(E(n))n.forEach(r=>{fn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Bo(t,e);lr.test(n)?t.setProperty(_e(r),n.replace(lr,""),"important"):t[r]=n}}var ur=["Webkit","Moz","ms"],pn={};function Bo(t,e){let n=pn[e];if(n)return n;let r=_(e);if(r!=="filter"&&r in t)return pn[e]=r;r=Ze(r);for(let o=0;o<ur.length;o++){let s=ur[o]+r;if(s in t)return pn[e]=s}return e}var J=t=>mr(B(t)),mr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(E(t))return t.map(J);if(X(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=mr(B(r[1]),e);return n};var dr={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var hr={onChange:(t,e)=>{je(t,"value",e[0])}};var Y=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=ae,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ar,":":on,"@":cn,[`${e}on`]:cn,[`${e}bind`]:on,[`${e}html`]:Jn,[`${e}text`]:dr,[`${e}show`]:pr,[`${e}model`]:Yn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":cr,":value":hr,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let r=(e??Y.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Po(t,r.pre,s))Vo(i,r.text,o,s)},Vo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=yr(c,r);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=yr(c,r);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Po=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of fe(s))o(i)}};return o(t),r},yr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var jo=9,$o=10,Fo=13,qo=32,xe=46,kt=44,zo=39,Ko=34,Lt=40,$e=41,It=91,Dt=93,un=63,Wo=59,gr=58,Go=123,Ut=125,dn=43,Jo=45,br=96,Tr=47,Qo=92,Er=[2,3],xr=[dn,Jo],Or={"-":1,"!":1,"~":1,"+":1,new:1},Ar={"=":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},qe={"=>":2,...Ar,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Nr=Object.keys(Ar),Xo=new Set(Nr),Ht=new Set;Ht.add("=>");Nr.forEach(t=>Ht.add(t));var Yo=new Set(["$","_"]),vr={true:!0,false:!1,null:null},Zo="this";function Mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var es=Mr(Or),ts=Mr(qe),ze="Expected ",Oe="Unexpected ",yn="Unclosed ",ns=ze+":",Cr=ze+"expression",rs="missing }",os=Oe+"object property",ss=yn+"(",Rr=ze+"comma",Sr=Oe+"token ",is=Oe+"period",mn=ze+"expression after ",as="missing unaryOp argument",cs=yn+"[",ps=ze+"exponent (",fs="Variable names cannot start with a number (",ls=yn+'quote after "';var Fe=t=>t>=48&&t<=57,wr=t=>qe[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in qe)||Yo.has(n)}re(e){return this.U(e)||Fe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===qo||e===jo||e===$o||e===Fo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Wo||r===kt)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ts),o=r.length;for(;o>0;){if(r in qe&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:wr(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,o,i];for(;n=this.se();){if(r=wr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ht.has(n)},c=n;let p=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if(Fe(o)||o===xe)return this.gt();if(o===zo||o===Ko)r=this.bt();else if(o===It)r=this.xt();else{for(e=this.r.substr(this.e,es),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Or,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(as);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in vr?r={type:4,value:vr[r.name],raw:r.name}:r.name===Zo&&(r={type:5})):o===Lt&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===It||n===Lt||n===un;){let r;if(n===un){if(this.r.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Dt)throw this.i(cs);this.e++}else n===Lt?e={type:6,arguments:this.ke($e),callee:e}:(n===xe||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Fe(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);Fe(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Fe(this.f);)e+=this.r.charAt(this.e++);if(!Fe(this.r.charCodeAt(this.e-1)))throw this.i(ps+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(fs+e+this.M+")");if(r===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(is);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(ls+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===$e&&o&&o>=n.length)throw this.i(Sr+String.fromCharCode(e));break}else if(s===kt){if(this.e++,o++,o!==n.length){if(e===$e)throw this.i(Sr+",");if(e===Dt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Rr);{let i=this.A();if(!i||i.type===0)throw this.i(Rr);n.push(i)}}}if(!r)throw this.i(ze+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe($e);if(this.m($e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ss)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(Go)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(gr)){this.e++;let o=this.A();if(!o)throw this.i(os);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(kt)&&this.e++}throw this.i(rs)}}ft(e){let n=this.f;if(xr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===dn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Er.includes(r.argument.type))throw this.i(Oe+r.operator)}}yt(e){if(e.node){let n=this.f;if(xr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Er.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===dn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===xe)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(un)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Cr);if(this.y(),this.m(gr)){this.e++;let o=this.A();if(!o)throw this.i(Cr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&qe[n.operator]<=.9){let s=n;for(;s.right.operator&&qe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ns)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m($e)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(mn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Xo.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(br)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(br))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
3
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r?.callee?.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(Tr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===Tr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?r=!0:r&&this.m(Dt)&&(r=!1),this.e+=this.m(Qo)?2:1}throw this.i("Unclosed Regex")}},kr=t=>new hn(t).parse();var us={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},ms={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Ur=t=>{if(!t?.some(Dr))return t;let e=[];return t.forEach(n=>Dr(n)?e.push(...n):e.push(n)),e},Lr=(...t)=>Ur(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ds={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},hs={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},Ir={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},_t=(t,e)=>U(t)?t.bind(e):t,bn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,r,o,s){this.u=E(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.O=r[o],_t(B(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],_t(B(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],_t(B(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Lr,...e.body)}1(e,n,r){return this.E(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o?.[s];return this.O=i,_t(B(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>U(i)?i(...Ur(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,ms[e.operator],e.argument)}8(e,n,r){let o=us[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,Lr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){let o={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,gn(p,r)),f=p=>this._e(a,e.value,n,gn(p,r));if(e.shorthand){let p=e.key.name;o[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());o[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;o[p]=s(e.value)&&i(p,n)?()=>f:f()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?ds:hs;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ee(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(ee(a))return;let c=this.g(e.right,n,r);return Ir[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Ir[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=Hr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.E(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=B(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:r,refs:o}=gt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;if(!s)return this.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,gn(f,n)):this.g(a,e,n)));return r(...i)}},Hr=Symbol("s"),Dr=t=>t?.s===Hr,_r=(t,e,n,r,o,s,i)=>new bn(e,n,r,o,i).eval(t,s);var Br={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){let i=q([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=_r(d,u,p,n,r,T,o);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Br[e]??kr("["+e+"]");Br[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Vr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ys=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},gs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!Vr(t[n]))return null;let r=n;for(;n<t.length&&Vr(t[n]);)++n;return{start:r,end:n}},Pr=new Set(["table","thead","tbody","tfoot"]),bs=new Set(["thead","tbody","tfoot"]),Ts=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=t=>{let e=0,n=[],r=[],o=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=ys(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=gs(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=r[r.length-1];m?(r.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),Pr.has(m.effectiveTag)&&--o):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=r[r.length-1],u=null;if(o===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):bs.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=Ts.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;r.push({replacementHost:u,effectiveTag:m}),Pr.has(m)&&++o}e=i+1}return n.join("")};var Es="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",xs=new Set(Es.toUpperCase().split(",")),vs="http://www.w3.org/2000/svg",jr=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},Tn=(t,e,n,r)=>{let o=t.t;if(o){let i=n&&xs.has(o.toUpperCase())?document.createElementNS(vs,o.toLowerCase()):document.createElement(o),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,r),l)}let c=t.c;if(c)for(let f of c)Tn(f,i,n,r);jr(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)jr(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let r=document.createDocumentFragment();if(!E(t))return Tn(t,r,!!e,n),r;for(let o of t)Tn(o,r,!!e,n);return r};var $r=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),Bn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ce(r))throw I(0);n||(n=Y.getDefault());let o=()=>{for(let a of[...r.childNodes])V(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Mt(r,n),new En(t,r,n).T(),D(r,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{V(r)},unbind:()=>{re(r)}}},En=class{Et;Fe;o;h;p;constructor(e,n,r){this.Et=e,this.Fe=n,this.o=r,this.h=new Bt([e],r),this.p=new St(this.h)}T(){this.p.H(this.Fe)}};var Ke=t=>{if(E(t))return t.map(o=>Ke(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)??""])));let r=fe(t);return r.length>0&&(e.c=[...r].map(o=>Ke(o))),e};var Fr=(t,e={})=>{E(e)&&(e={props:e}),H(t)&&(t={template:t});let n=e.context??(()=>({})),r=!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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Vt(t.template));t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let o=t.element;if(!r&&((t.isSVG??(Ye(o)&&o.hasAttribute?.("isSVG")))||Ye(o)&&o.querySelector("[isSVG]"))){let s=o.content,i=s?[...s.childNodes]:[...o.childNodes],a=Ke(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var qr=t=>{ve()?.onMounted.push(t)};var zr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=Cs(t,n),e(...o))};return r[W]=1,Ee(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Cs=(t,e)=>{let n=e.ref??q(null);e.ref=n,e.isStopped=!1;let r=0,o=we(()=>{if(r>0){o(),e.isStopped=!0,F(n);return}n(t()),++r});return n.stop=o,n};var Kr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[W]=1,Ee(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Rs=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0,s=a=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(...t.map(c=>c()))),++o},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),r.stop=()=>{i.forEach(a=>{a()})},r};var Wr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Ss(t,e,n),r(...s))};return o[W]=1,Ee(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Ss=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,s=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(s)),++o},!0),r};var Gr=t=>(t[ct]=1,t);var Jr=(t,e)=>{if(!e)throw I(5);let r=Se(t)?ae:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=we(o);return K(i,!0),t};var xn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Qr=xn;var Xr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return K(s,!0),s};var Yr=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Zr=t=>{vn();try{t()}finally{Cn()}},vn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},Cn=()=>{let t=ie.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete ie.stack;for(let n of e)try{F(n)}catch(r){console.error(r)}};
1
+ "use strict";var Ft=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.prototype.hasOwnProperty;var rr=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},sr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nr(e))!or.call(t,r)&&r!==n&&Ft(t,r,{get:()=>e[r],enumerable:!(o=tr(e,r))||o.enumerable});return t};var ir=t=>sr(Ft({},"__esModule",{value:!0}),t);var ws={};rr(ws,{ComponentHead:()=>Ie,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>er,collectRefs:()=>gt,computeMany:()=>Wo,computeRef:()=>Go,computed:()=>Ko,createApp:()=>Fo,createComponent:()=>qo,endBatch:()=>vn,entangle:()=>Be,flatten:()=>J,getBindData:()=>ge,html:()=>En,isDeepRef:()=>Se,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Jo,observe:()=>w,observeMany:()=>Yo,observerCount:()=>Zo,onMounted:()=>zo,onUnmounted:()=>K,pause:()=>At,persist:()=>Qo,raw:()=>Xo,ref:()=>ae,removeNode:()=>V,resume:()=>Nt,silence:()=>yt,sref:()=>q,startBatch:()=>Cn,toFragment:()=>Ae,toJsonTemplate:()=>Ke,trigger:()=>F,unbind:()=>oe,unref:()=>B,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>we});module.exports=ir(ws);var Le=Symbol(":regor");var oe=t=>{let e=[t];for(;e.length>0;){let n=e.shift();ar(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},ar=t=>{let e=t[Le];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Le]}};var V=t=>{t.remove(),setTimeout(()=>oe(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),cr=Object.prototype.toString,qt=t=>cr.call(t),he=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Je=t=>typeof t=="symbol",x=Array.isArray,A=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var st=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},Ce=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=Ce();return t&&Wt(t),st.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let o=Ce();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Kt]=Ce()},it=t=>t[Kt];var ye=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ie=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,o,r,s){this.props=e,this.pe=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let o of this.ctx)ye(o)}};var ge=t=>{let e=t[Le];if(e)return e;let n={unbinders:[],data:{}};return t[Le]=n,n};var D=(t,e)=>{ge(t).unbinders.push(e)};var Mn={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]})},L=(t,...e)=>{let n=Mn[t],o=U(n)?n.call(Mn,...e):n,r=Qe.warning;r&&(H(o)?r(o):r(o,...o.args))},Qe={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let r=t(void 0,void 0,0,e);return K(r,!0),r};var ft={},pt={},kn=1,Ln=t=>{let e=(kn++).toString();return ft[e]=t,pt[e]=0,e},Gt=t=>{pt[t]+=1},Jt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},In=t=>ft[t],Qt=()=>kn!==1&&Object.keys(ft).length>0,Xe="r-switch",pr=t=>{let e=t.filter(o=>ve(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(Xe))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},De=(t,e)=>{if(!Qt())return;let n=pr(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Te(e,r)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=He(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(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.B),o=be(e,this.K);for(let r of o)this.T(r);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,be(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,o){let r=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),De(i,r),r.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(r,this.p,s,a)},unmount:()=>{pe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${r} `),f=this.p.h.C(r),p=f.value,l=this.ce(o,n),g=[];D(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{pe(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(Xt(r,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{pe(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(o,d),m=[];D(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var Ue=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},Te=(t,e)=>{for(let n of e)Un(n)||t.H(n)},be=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,fe=t=>se(t)?t.content.childNodes:t.childNodes,pe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;V(n),n=o}},xe=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},He=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},fr=/-(\w)/g,_=Zt(t=>t&&t.replace(fr,(e,n)=>n?n.toUpperCase():"")),lr=/\B([A-Z])/g,_e=Zt(t=>t&&t.replace(lr,"-$1").toLowerCase()),Ze=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),ht=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>ye(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>A(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let o=e.value(),r=e.context,s=o[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=r[a];f!==c&&(h(f)?f(c):r[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),o=e.context,r=n[0];if(!A(r))return()=>{};for(let s of Object.entries(r)){let i=s[0],a=s[1],c=o[i];c!==a&&(h(c)?c(a):o[i]=a)}return()=>{}}};var Be=(t,e)=>{if(t===e)return()=>{};let n=w(t,r=>e(r)),o=w(e,r=>t(r));return e(t()),()=>{n(),o()}};var Ve=t=>!!t&&t[ct]===1;var Se=t=>t?.[at]===1;var te=[],jn=t=>{te.length!==0&&te[te.length-1]?.add(t)},we=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ur(t,e),K(()=>e.stop(),!0),e.stop},ur=(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(te.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=w(i,()=>{r(),we(t)});n.push(a)}}finally{te.pop()}},yt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},gt=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var F=(t,e,n)=>{if(!h(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(x(r)||X(r))for(let s of r)F(s,e,!0);else if(he(r))for(let s of r)F(s[0],e,!0),F(s[1],e,!0);if(A(r))for(let s in r)F(r[s],e,!0)}};function mr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Pe=(t,e,n)=>{n.forEach(function(o){let r=t[o];mr(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var $n=Array.prototype,tn=Object.create($n),dr=["push","pop","shift","unshift","splice","sort","reverse"];Pe($n,tn,dr);var Fn=Map.prototype,Tt=Object.create(Fn),hr=["set","clear","delete"];bt(Tt,"Map");Pe(Fn,Tt,hr);var qn=Set.prototype,xt=Object.create(qn),yr=["add","clear","delete"];bt(xt,"Set");Pe(qn,xt,yr);var ie={},q=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:x(c)?(Object.setPrototypeOf(c,tn),!0):X(c)?(Object.setPrototypeOf(c,xt),!0):he(c)?(Object.setPrototypeOf(c,Tt),!0):!1:!1,o=n(t),r=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}r.size!==0&&yt(()=>{for(let p of[...r.keys()])r.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(jn(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{r.delete(g)};return r.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,xe(a,!1),o&&i(t),a};var ae=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,x(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Se(r)||(t[o]=ae(r))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Se(o))continue;let r=n[0];Je(r)||(t[r]=null,t[r]=ae(o))}return e};var zn=Symbol("modelBridge"),gr=t=>!!t?.[zn],br=t=>{t[zn]=1},Tr=t=>{let e=ae(t());return br(e),e},Kn={collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(!o)return()=>{};let i=_(o),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Be(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(gr(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=Tr(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var Et=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,o=n.h,r=n.o.fe,s=n.o.ue,i=o.me(),a=o.ze(),c=[...r.keys(),...a,...[...r.keys()].map(_e),...a.map(_e)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let We=n.o.l.props,Ge=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(y,S)=>{let E={},j=y.hasAttribute(We),z=y.hasAttribute(Ge);return o.v(S,()=>{o.S(E),j&&n.T(Vn,y,We),z&&n.T(Pn,y,Ge);let C=T.props;if(!C||C.length===0)return;C=C.map(_);let G=new Map(C.map(Q=>[Q.toLowerCase(),Q]));for(let Q of C.concat(C.map(_e))){let ce=y.getAttribute(Q);ce!==null&&(E[_(Q)]=ce,y.removeAttribute(Q))}let jt=n.J.de(y,!1);for(let[Q,ce]of jt.entries()){let[$t,Rn]=ce.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(Kn,y,Q,!0,Sn,ce.X))}}),E},me=[...o.V()],ot=()=>{let y=nt(l,me),S=new Ie(y,l,me,N,Ne),E=ht(()=>T.context(S)??{}).context;if(S.autoProps){for(let[j,z]of Object.entries(y))if(j in E){let C=E[j];if(C===z)continue;S.entangle&&h(C)&&h(z)&&D(N,Be(z,C))}else E[j]=z;S.onAutoPropsAssigned?.()}return{componentCtx:E,head:S}},{componentCtx:de,head:rt}=ot(),O=[...fe(b)],v=O.length,k=l.childNodes.length===0,P=y=>{let S=y.parentElement;if(k){for(let C of[...y.childNodes])S.insertBefore(C,y);return}let E=y.name;$(E)&&(E=y.getAttributeNames().filter(C=>C.startsWith("#"))[0],$(E)?E="default":E=E.substring(1));let j=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!j&&E==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(C=>C.startsWith("#")).length>0&&(j=null));let z=C=>{rt.enableSwitch&&o.v(me,()=>{o.S(de);let G=nt(y,o.V());o.v(me,()=>{o.S(G);let jt=o.V(),Q=Ln(jt);for(let ce of C)ve(ce)&&(ce.setAttribute(Xe,Q),Gt(Q),D(ce,()=>{Jt(Q)}))})})};if(j){let C=[...fe(j)];for(let G of C)S.insertBefore(G,y);z(C)}else{if(E!=="default"){for(let G of[...fe(y)])S.insertBefore(G,y);return}let C=[...fe(l)].filter(G=>!se(G));for(let G of C)S.insertBefore(G,y);z(C)}},R=y=>{if(!ve(y))return;let S=y.querySelectorAll("slot");if(Hn(y)){P(y),y.remove();return}for(let E of S)P(E),E.remove()};(()=>{for(let y=0;y<v;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(Ne,d);let Me=()=>{if(!T.inheritAttrs)return;let y=O.filter(E=>E.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(E=>E.hasAttribute(this.le)));let S=y[0];if(S)for(let E of l.getAttributeNames()){if(E===We||E===Ge)continue;let j=l.getAttribute(E);if(E==="class")S.classList.add(...j.split(" "));else if(E==="style"){let z=S.style,C=l.style;for(let G of C)z.setProperty(G,C.getPropertyValue(G))}else S.setAttribute(ut(E,n.o),j)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},ke=()=>{Me(),ne(),o.S(de),n.ye(l,!1),de.$emit=rt.emit,Te(n,O),D(l,()=>{ye(de)}),D(N,()=>{oe(l)}),dt(de)};o.v(me,ke)}}};var nn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let o=e.indexOf("."),r=this.Q=(o<0?e:e.substring(0,o)).split(/[:@]/);if($(r[0])&&(r[0]=n?".":e[0]),o>=0){let s=this.X=e.slice(o+1).split(".");if(s.includes("camel")){let i=r.length-1;r[i]=_(r[i])}s.includes("prop")&&(r[0]=".")}}},Ct=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Ye(e))return o;let r=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>r.some(p=>f.startsWith(p)));for(let f of c)o.has(f)||o.set(f,new nn(f)),o.get(f).ge.push(a)};if(s(e),!n)return o;let i=e.querySelectorAll("*");for(let a of i)s(a);return o}};var xr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},vt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=be(e,this.xe);for(let r of o)this.T(r);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let o=Ue(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),De(s,o),o.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=se(e)?o:[...o[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!H(b)||$(b)){pe(s,i);return}if(l.name===b)return;pe(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));xr(g,M),r.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];D(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var et=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let o=this.w;for(let r=e;r<o;++r)this.R[r].order=r+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.R[o].order=o}Re(e){let n=this.w;for(let o=e;o<n;++o)this.ee(o);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var on=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=He(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=be(e,this.ne);for(let r of o)this.Xe(r);return n}G(e){return e[on]?!0:(e[on]=!0,be(e,this.ne).forEach(n=>n[on]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ee(e)?[]:(U(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))}Ye(e,n){let o=this.Ze(n);if(!o?.list){L(1,this.b,n,e);return}let r=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=i?v=>B(B(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),f=Ue(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),De(g,f),f.forEach(v=>{V(v)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(v,k,P)=>{let R=o.createContext(k,v),Z=et.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Me=d.parentNode??g.parentNode;if(!Me)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=P.previousSibling,ke=[];for(let y of f){let S=y.cloneNode(!0);Me.insertBefore(S,P),ke.push(S)}for(Te(u,ke),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(v,k)=>{let P=O.D(v).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);O.te(v,b(v,k,R))},N=(v,k)=>{O.S(b(v,k,d))},Ne=v=>{for(let k of O.D(v).items)V(k)},We=v=>{let k=O.w;for(let P=v;P<k;++P)O.D(P).index(P)},Ge=v=>{let k=O.w;U(v)&&(v=v());let P=B(v[0]);if(x(P)&&P.length===0){pe(g,d),O.Re(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,Me=k,ne=this.p.o.forGrowThreshold,ke=()=>O.w<Me+ne;for(let S of this.Ee(v[0])){let E=()=>{if(R<k){let j=O.D(R++);if(c(j.value,S))return;let z=O.Qe(a(S));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),O.Te(R),--k,z>R+1)for(let C=R;C<z-1&&C<k&&!c(O.D(R).value,S);)++C,Ne(R),O.Te(R),--k;E();return}ke()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,S)}else N(R++,S)};E()}let y=R;for(k=O.w;R<k;)Ne(R++);O.Re(y),We(Z)},Pt=()=>{de=w(ot,Ge)},nt=()=>{me.stop(),de()},me=m.C(o.list),ot=me.value,de,rt=0,O=new et(a);for(let v of this.Ee(ot()[0]))O.S(b(rt++,v,d));D(g,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&o.length===1)p[o[0]]=c;else if(x(l)){let d=0;for(let u of o)p[u]=l[d++]}else for(let d of o)p[d]=l[d];let g={ctx:p,index:q(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),g}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new lt(this),this.Se=new vt(this),this.we=new Et(this),this.J=new Ct(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.x))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Te(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let o=this.J.de(e,n),r=this.o.j;for(let[s,i]of o.entries()){let[a,c]=i.Q,f=r[s]??r[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,o,r,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=f=>{let p=f.getAttribute(Xe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,o){if(e!==mt)return!1;if($(o))return!0;let r=document.querySelector(o);if(r){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${o}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),r.appendChild(n)}return!0}L(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.nt(e,n,o))return;let i=this.h.C(o,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=_n(r,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=r,r),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,o,r,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Wn="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 Cr(t){return!!t||t===""}var rn={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),wt(t,o,e[0],r);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;wt(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Wn,e.slice(6,e.length)):t.setAttributeNS(Wn,e,n);return}let r=e in Er;ee(n)||r&&!Cr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var sn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)Gn(t,s[c],i?.[c])}else Gn(t,s,i)}}},Gn=(t,e,n)=>{let o=t.classList,r=H(e),s=H(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?n!==e&&(s&&o.remove(...n.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):n&&s&&o.remove(...n.trim().split(/\s+/))};var Jn={onChange:(t,e)=>{let[n,o]=e;U(o)?o(t,n):t.innerHTML=n?.toString()}};function vr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=le(t[o],e[o]);return n}function le(t,e){if(t===e)return!0;let n=zt(t),o=zt(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=Je(t),o=Je(e),n||o)return t===e;if(n=x(t),o=x(e),n||o)return n&&o?vr(t,e):!1;if(n=A(t),o=A(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>le(n,e))}var Qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Yn={onChange:(t,e)=>{Rr(t,e[0])},onBind:(t,e,n,o,r,s)=>Sr(t,e,s)},Rr=(t,e)=>{let n=no(t);if(n&&Zn(t))x(e)?e=Ot(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=kr(t,e),t.checked=e;else if(n&&eo(t))t.checked=le(e,ue(t));else if(n||oo(t))to(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(ro(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=ue(a);if(s)x(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(h(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Zn=t=>t.type==="checkbox",eo=t=>t.type==="radio",to=t=>t.type==="number"||t.type==="range",no=t=>t.tagName==="INPUT",oo=t=>t.tagName==="TEXTAREA",ro=t=>t.tagName==="SELECT",Sr=(t,e,n)=>{let o=e.value,r=tt(n?.join(",")),s=tt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=no(t);return c&&Zn(t)?Or(t,a):c&&eo(t)?Lr(t,a):c||oo(t)?wr(t,i,a,o):ro(t)?Ir(t,a,o):(L(7,t),()=>{})},Xn=/[.,' ·٫]/,wr=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=to(t),a=()=>{!e.trim&&!tt(o()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=tt(o()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Xn.test(m[m.length-1])&&m.split(Xn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},Or=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(x(c)){let f=Ot(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(Mr(t,a))};return t.addEventListener(n,r),o},ue=t=>"_value"in t?t._value:t.value,so="trueValue",Ar="falseValue",io="true-value",Nr="false-value",Mr=(t,e)=>{let n=e?so:Ar;if(n in t)return t[n];let o=e?io:Nr;return t.hasAttribute(o)?t.getAttribute(o):e},kr=(t,e)=>{if(so in t)return le(e,t.trueValue);let o=io;return t.hasAttribute(o)?le(e,t.getAttribute(o)):le(e,!0)},Lr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,r),o},Ir=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=tt(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Qn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(At(i),X(p)){p.clear();for(let l of f)p.add(l)}else x(p)?(p.splice(0),p.push(...f)):i(f)}finally{Nt(i),F(i)}}else i(f[0])};return t.addEventListener(o,s),r};var Dr=["stop","prevent","capture","self","once","left","right","middle","passive"],Ur=t=>{let e={};if($(t))return;let n=t.split(",");for(let o of Dr)e[o]=n.includes(o);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(r){let p=e.value(),l=B(r.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(o){let p=e.value();return an(t,_(o),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return U(T)&&(T=T()),T=T[d],U(T)&&(T=T()),T},m=l[d+"_flags"];i.push(an(t,d,u,m))}else L(2,name,t)}return a}},Hr=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(r&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return o?[t,f=>c(f)?f.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},an=(t,e,n,o)=>{if($(e))return L(5,name,t),()=>{};let r=Ur(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Hr(e,o);let a=p=>{if(!i(p)||!n&&e==="submit"&&r?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!r){a(p);return}try{if(r.left&&p.button!==0||r.middle&&p.button!==1||r.right&&p.button!==2||r.self&&p.target!==t)return;r.stop&&p.stopPropagation(),r.prevent&&p.preventDefault(),a(p)}finally{r.once&&c()}};return t.addEventListener(e,f,s),c};var ao={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),je(t,o,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=c[0],p=c[1];je(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];je(t,p,l)}else{let f=e[a++],p=e[a];je(t,f,p)}}}};function _r(t){return!!t||t===""}var je=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(oe),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=_r(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||L(4,e,o,n,s)}r&&t.removeAttribute(e)};var co={once:!0,onBind:(t,e,n)=>{let o=e.value()[0],r=x(o),s=e.refs[0];return r?o.push(t):s?s?.(t):e.context[n]=t,()=>{if(r){let i=o.indexOf(t);i!==-1&&o.splice(i,1)}else s?.(null)}}};var po={onChange:(t,e)=>{let n=ge(t).data,o=n._ord;wn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)fo(t,s[c],i?.[c])}else fo(t,s,i)}}},fo=(t,e,n)=>{let o=t.style,r=H(e);if(e&&!r){if(n&&!H(n))for(let s in n)e[s]==null&&fn(o,s,"");for(let s in e)fn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;o.display=s}},lo=/\s*!important$/;function fn(t,e,n){if(x(n))n.forEach(o=>{fn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Br(t,e);lo.test(n)?t.setProperty(_e(o),n.replace(lo,""),"important"):t[o]=n}}var uo=["Webkit","Moz","ms"],pn={};function Br(t,e){let n=pn[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return pn[e]=o;o=Ze(o);for(let r=0;r<uo.length;r++){let s=uo[r]+o;if(s in t)return pn[e]=s}return e}var J=t=>mo(B(t)),mo=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(x(t))return t.map(J);if(X(t)){let o=new Set;for(let r of t.keys())o.add(J(r));return o}if(he(t)){let o=new Map;for(let r of t)o.set(J(r[0]),J(r[1]));return o}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=mo(B(o[1]),e);return n};var ho={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var yo={onChange:(t,e)=>{je(t,"value",e[0])}};var Y=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let o of t.rt.split(","))e[o]=n[o];return e.ref=ae,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ao,":":rn,"@":cn,[`${e}on`]:cn,[`${e}bind`]:rn,[`${e}html`]:Jn,[`${e}text`]:ho,[`${e}show`]:po,[`${e}model`]:Yn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":co,":value":yo,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let o=(e??Y.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Pr(t,o.pre,s))Vr(i,o.text,r,s)},Vr=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=go(c,o);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=go(c,o);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Pr=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of fe(s))r(i)}};return r(t),o},go=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var jr=9,$r=10,Fr=13,qr=32,Ee=46,kt=44,zr=39,Kr=34,Lt=40,$e=41,It=91,Dt=93,un=63,Wr=59,bo=58,Gr=123,Ut=125,dn=43,Jr=45,To=96,xo=47,Qr=92,Eo=[2,3],Co=[dn,Jr],Ao={"-":1,"!":1,"~":1,"+":1,new:1},No={"=":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},qe={"=>":2,...No,"||":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},Mo=Object.keys(No),Xr=new Set(Mo),Ht=new Set;Ht.add("=>");Mo.forEach(t=>Ht.add(t));var Yr=new Set(["$","_"]),vo={true:!0,false:!1,null:null},Zr="this";function ko(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var es=ko(Ao),ts=ko(qe),ze="Expected ",Oe="Unexpected ",yn="Unclosed ",ns=ze+":",Ro=ze+"expression",os="missing }",rs=Oe+"object property",ss=yn+"(",So=ze+"comma",wo=Oe+"token ",is=Oe+"period",mn=ze+"expression after ",as="missing unaryOp argument",cs=yn+"[",ps=ze+"exponent (",fs="Variable names cannot start with a number (",ls=yn+'quote after "';var Fe=t=>t>=48&&t<=57,Oo=t=>qe[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in qe)||Yr.has(n)}re(e){return this.U(e)||Fe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,o){let r=this.st[e];if(!r)return o;let s={node:o},i=a=>{a.call(this,s)};return n===0?r.forEach(i):r.find(i),s.node}y(){let e=this.f,n=this.r,o=this.e;for(;e===qr||e===jr||e===$r||e===Fr;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let o=this.f;if(o===Wr||o===kt)this.e++;else{let r=this.A();if(r)n.push(r);else if(this.e<this.r.length){if(o===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,o=n.substr(e,ts),r=o.length;for(;r>0;){if(o in qe&&(!this.U(this.f)||e+o.length<n.length&&!this.re(n.charCodeAt(e+o.length))))return e+=r,this.e=e,o;o=o.substr(0,--r)}return!1}Me(){let e,n,o,r,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(r={value:n,prec:Oo(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,r,i];for(;n=this.se();){if(o=Oo(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:Ht.has(n)},c=n;let p=l=>r.right_a&&l.right_a?o>l.prec:o<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(r,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,o;if(this.y(),o=this.k(2,1),o)return this.k(3,0,o);let r=this.f;if(Fe(r)||r===Ee)return this.gt();if(r===zr||r===Kr)o=this.bt();else if(r===It)o=this.xt();else{for(e=this.r.substr(this.e,es),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Ao,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(as);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(r)?(o=this.ie(),o.name in vo?o={type:4,value:vo[o.name],raw:o.name}:o.name===Zr&&(o={type:5})):r===Lt&&(o=this.Tt())}return o?(o=this.F(o),this.k(3,0,o)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===Ee||n===It||n===Lt||n===un;){let o;if(n===un){if(this.r.charCodeAt(this.e+1)!==Ee)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Dt)throw this.i(cs);this.e++}else n===Lt?e={type:6,arguments:this.ke($e),callee:e}:(n===Ee||o)&&(o&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});o&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Fe(this.f);)e+=this.r.charAt(this.e++);if(this.m(Ee))for(e+=this.r.charAt(this.e++);Fe(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Fe(this.f);)e+=this.r.charAt(this.e++);if(!Fe(this.r.charCodeAt(this.e-1)))throw this.i(ps+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(fs+e+this.M+")");if(o===Ee||e.length===1&&e.charCodeAt(0)===Ee)throw this.i(is);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,o=this.r.charAt(this.e++),r=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===o){r=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!r)throw this.i(ls+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],o=!1,r=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(o=!0,this.e++,e===$e&&r&&r>=n.length)throw this.i(wo+String.fromCharCode(e));break}else if(s===kt){if(this.e++,r++,r!==n.length){if(e===$e)throw this.i(wo+",");if(e===Dt)for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(So);{let i=this.A();if(!i||i.type===0)throw this.i(So);n.push(i)}}}if(!o)throw this.i(ze+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe($e);if(this.m($e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ss)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(Gr)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let o=this.A();if(!o)break;if(this.y(),o.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.m(bo)){this.e++;let r=this.A();if(!r)throw this.i(rs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.y()}else o&&n.push(o);this.m(kt)&&this.e++}throw this.i(os)}}ft(e){let n=this.f;if(Co.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){this.e+=2;let o=e.node={type:13,operator:n===dn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!o.argument||!Eo.includes(o.argument.type))throw this.i(Oe+o.operator)}}yt(e){if(e.node){let n=this.f;if(Co.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){if(!Eo.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===dn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Ee)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(un)){this.e++;let n=e.node,o=this.A();if(!o)throw this.i(Ro);if(this.y(),this.m(bo)){this.e++;let r=this.A();if(!r)throw this.i(Ro);if(e.node={type:11,test:n,consequent:o,alternate:r},n.operator&&qe[n.operator]<=.9){let s=n;for(;s.right.operator&&qe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ns)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m($e)){this.e++;let o=this.se();if(o==="=>"){let r=this.Me();if(!r)throw this.i(mn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Xr.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(To)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(To))return;let n={type:19,quasis:[],expressions:[]},o="",r="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:r,cooked:o},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),r="",o="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(r+=c,c=this.r.charAt(++this.e),r+=c,c){case"n":o+=`
3
+ `;break;case"r":o+="\r";break;case"t":o+=" ";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;default:o+=c}else o+=c,r+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o?.callee?.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}mt(e){if(!this.m(xo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===xo&&!o){let r=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?o=!0:o&&this.m(Dt)&&(o=!1),this.e+=this.m(Qr)?2:1}throw this.i("Unclosed Regex")}},Lo=t=>new hn(t).parse();var us={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},ms={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Ho=t=>{if(!t?.some(Uo))return t;let e=[];return t.forEach(n=>Uo(n)?e.push(...n):e.push(n)),e},Io=(...t)=>Ho(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ds={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(--o),o}return--t[e]}},hs={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o-1),o}return t[e]--}},Do={"=":(t,e,n)=>{let o=t[e];return h(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return h(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return h(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return h(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return h(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return h(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return h(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return h(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return h(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return h(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return h(o)?o(o()^n):t[e]^=n}},_t=(t,e)=>U(t)?t.bind(e):t,bn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,o,r,s){this.u=x(e)?e:[e],this.Ve=n,this.Ie=o,this.De=r,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let o of this.u)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.u[this.u.length-1];if(r==="$parent")return this.u[1];if(r==="$ctx")return[...this.u];if(o&&r in o)return this.O=o[r],_t(B(o[r]),o);for(let i of this.u)if(r in i)return this.O=i[r],_t(B(i[r]),i);let s=this.Ve;if(s&&r in s)return this.O=s[r],_t(B(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this.He(n,o,Io,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ae(e,n,o),i=r?.[s];return this.O=i,_t(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>U(i)?i(...Ho(a)):i,s=this.E(++n,o,r,e.callee,...e.arguments);return this.O=s,s}7(e,n,o){return this.E(n,o,ms[e.operator],e.argument)}8(e,n,o){let r=us[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,n,o),()=>this.g(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.He(++n,o,Io,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.g(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,gn(p,o)),f=p=>this._e(a,e.value,n,gn(p,o));if(e.shorthand){let p=e.key.name;r[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());r[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;r[p]=s(e.value)&&i(p,n)?()=>f:f()}return r}ae(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,i=e.prefix?ds:hs;if(r.type===2){let a=r.name,c=this.Pe(a,o);return ee(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ae(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Pe(i,o);if(ee(a))return;let c=this.g(e.right,n,o);return Do[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ae(r,n,o),c=this.g(e.right,n,o);return Do[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return x(r)&&(r.s=_o),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,n,s)}}g(e,n,o){let r=B(this[e.type](e,n,o));return this.Ue=e.type,r}_e(e,n,o,r){let s=this.g(n,o,r);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:o,refs:r}=gt(()=>this.g(e,-1,n)),s={value:o,refs:r};return this.je()&&(s.ref=this.O),s}E(e,n,o,...r){let s=r.map(i=>i&&this.g(i,e,n));return o(...s)}He(e,n,o,...r){let s=this.Ie;if(!s)return this.E(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,gn(f,n)):this.g(a,e,n)));return o(...i)}},_o=Symbol("s"),Uo=t=>t?.s===_o,Bo=(t,e,n,o,r,s,i)=>new bn(e,n,o,r,i).eval(t,s);var Vo={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,o=this.u.map(r=>r.components).filter(r=>!!r).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,o,r,s){let i=q([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=Bo(d,u,p,n,o,T,r);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Vo[e]??Lo("["+e+"]");Vo[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Po=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ys=(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},gs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!Po(t[n]))return null;let o=n;for(;n<t.length&&Po(t[n]);)++n;return{start:o,end:n}},jo=new Set(["table","thead","tbody","tfoot"]),bs=new Set(["thead","tbody","tfoot"]),Ts=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=ys(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=gs(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=o[o.length-1];m?(o.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),jo.has(m.effectiveTag)&&--r):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=o[o.length-1],u=null;if(r===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):bs.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=Ts.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;o.push({replacementHost:u,effectiveTag:m}),jo.has(m)&&++r}e=i+1}return n.join("")};var xs="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",Es=new Set(xs.toUpperCase().split(",")),Cs="http://www.w3.org/2000/svg",$o=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},Tn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&Es.has(r.toUpperCase())?document.createElementNS(Cs,r.toLowerCase()):document.createElement(r),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,o),l)}let c=t.c;if(c)for(let f of c)Tn(f,i,n,o);$o(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)$o(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let o=document.createDocumentFragment();if(!x(t))return Tn(t,o,!!e,n),o;for(let r of t)Tn(r,o,!!e,n);return o};var Fo=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),Bn(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!ve(o))throw I(0);n||(n=Y.getDefault());let r=()=>{for(let a of[...o.childNodes])V(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Mt(o,n),new xn(t,o,n).T(),D(o,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{V(o)},unbind:()=>{oe(o)}}},xn=class{Et;Fe;o;h;p;constructor(e,n,o){this.Et=e,this.Fe=n,this.o=o,this.h=new Bt([e],o),this.p=new St(this.h)}T(){this.p.H(this.Fe)}};var Ke=t=>{if(x(t))return t.map(r=>Ke(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=fe(t);return o.length>0&&(e.c=[...o].map(r=>Ke(r))),e};var qo=(t,e={})=>{x(e)&&(e={props:e}),H(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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Vt(t.template));t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let r=t.element;if(!o&&((t.isSVG??(Ye(r)&&r.hasAttribute?.("isSVG")))||Ye(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=Ke(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var zo=t=>{Ce()?.onMounted.push(t)};var Ko=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=vs(t,n),e(...r))};return o[W]=1,xe(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},vs=(t,e)=>{let n=e.ref??q(null);e.ref=n,e.isStopped=!1;let o=0,r=we(()=>{if(o>0){r(),e.isStopped=!0,F(n);return}n(t()),++o});return n.stop=r,n};var Wo=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Rs(t,e,n),o(...s))};return r[W]=1,xe(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Rs=(t,e,n)=>{let o=n.ref??q(null);n.ref=o,n.isStopped=!1;let r=0,s=a=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(...t.map(c=>c()))),++r},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),o.stop=()=>{i.forEach(a=>{a()})},o};var Go=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Ss(t,e,n),o(...s))};return r[W]=1,xe(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Ss=(t,e,n)=>{let o=n.ref??q(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=w(t,s=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(s)),++r},!0),o};var Jo=t=>(t[ct]=1,t);var Qo=(t,e)=>{if(!e)throw I(5);let o=Se(t)?ae:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=we(r);return K(i,!0),t};var En=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},Xo=En;var Yo=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(w(i,r));n&&r();let s=()=>{for(let i of o)i()};return K(s,!0),s};var Zo=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var er=t=>{Cn();try{t()}finally{vn()}},Cn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},vn=()=>{let t=ie.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 ie.stack;for(let n of e)try{F(n)}catch(o){console.error(o)}};
@@ -1,4 +1,4 @@
1
- var Ne=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();jr(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},jr=t=>{let e=t[Ne];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ne]}};var j=t=>{t.remove(),setTimeout(()=>ae(t),1)};var D=t=>typeof t=="function",U=t=>typeof t=="string",vn=t=>typeof t>"u",Z=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),$r=Object.prototype.toString,Bt=t=>$r.call(t),he=t=>Bt(t)==="[object Map]",X=t=>Bt(t)==="[object Set]",Vt=t=>Bt(t)==="[object Date]",ze=t=>typeof t=="symbol",E=Array.isArray,A=t=>t!==null&&typeof t=="object";var Cn={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."},I=(t,...e)=>{let n=Cn[t];return new Error(D(n)?n.call(Cn,...e):n)};var ot=[],Rn=()=>{let t={onMounted:[],onUnmounted:[]};return ot.push(t),t},xe=t=>{let e=ot[ot.length-1];if(!e&&!t)throw I(2);return e},Sn=t=>{let e=xe();return t&&jt(t),ot.pop(),e},Pt=Symbol("csp"),jt=t=>{let e=t,n=e[Pt];if(n){let r=xe();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Pt]=xe()},st=t=>t[Pt];var ye=t=>{st(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ke=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)j(e),e=e.nextSibling;for(let r of this.ctx)ye(r)}};var ve=t=>{let e=t[Ne];if(e)return e;let n={unbinders:[],data:{}};return t[Ne]=n,n};var H=(t,e)=>{ve(t).unbinders.push(e)};var wn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},L=(t,...e)=>{let n=wn[t],r=D(n)?n.call(wn,...e):n,o=it.warning;o&&(U(r)?o(r):o(r,...r.args))},it={warning:console.warn};var K=(t,e)=>{xe(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var ft={},pt={},On=1,An=t=>{let e=(On++).toString();return ft[e]=t,pt[e]=0,e},$t=t=>{pt[t]+=1},Ft=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},Nn=t=>ft[t],qt=()=>On!==1&&Object.keys(ft).length>0,We="r-switch",Fr=t=>{let e=t.filter(r=>Ce(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(We))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},Me=(t,e)=>{if(!qt())return;let n=Fr(e);n.length!==0&&(n.forEach($t),H(t,()=>{n.forEach(Ft)}))};var zt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}be(e,o)},Kt=Symbol("r-if"),Mn=Symbol("r-else"),kn=t=>t[Mn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=Le(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=ge(e,this.K);for(let o of r)this.T(o);return n}G(e){return e[Kt]?!0:(e[Kt]=!0,ge(e,this.K).forEach(n=>n[Kt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=ke(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),Me(i,o),o.forEach(c=>{j(c)}),e.remove(),n!=="if"&&(e[Mn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{zt(o,this.p,s,a)},unmount:()=>{ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),f=this.p.h.C(o),p=f.value,l=this.ce(r,n),g=[];H(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{zt(s,this.p,i,c)},unmount:()=>{ce(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(zt(o,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{ce(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(r,d),m=[];H(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var ke=t=>{let e=oe(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},be=(t,e)=>{for(let n of e)kn(n)||t.H(n)},ge=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},oe=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,Ge=t=>t.nodeType===Node.ELEMENT_NODE,Ln=t=>t instanceof HTMLSlotElement,pe=t=>oe(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;j(n),n=r}},Te=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},In=(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},Le=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Wt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},qr=/-(\w)/g,_=Wt(t=>t&&t.replace(qr,(e,n)=>n?n.toUpperCase():"")),zr=/\B([A-Z])/g,Ie=Wt(t=>t&&t.replace(zr,"-$1").toLowerCase()),Je=Wt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{st(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Gt=Symbol("scope"),Jt=t=>{try{Rn();let e=t();jt(e);let n={context:e,unmount:()=>ye(e),[Gt]:1};return n[Gt]=1,n}finally{Sn()}},Dn=t=>A(t)?Gt in t:!1;var Un={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=o[a];f!==c&&(h(f)?f(c):o[a]=c)}},!0)};var Hn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Qe=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Xe=t=>!!t&&t[ct]===1;var De=t=>t?.[at]===1;var ee=[],_n=t=>{ee.length!==0&&ee[ee.length-1]?.add(t)},Ue=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Kr(t,e),K(()=>e.stop(),!0),e.stop},Kr=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(ee.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),Ue(t)});n.push(a)}}finally{ee.pop()}},Qt=t=>{let e=ee.length,n=e>0&&ee[e-1];try{return n&&ee.push(null),t()}finally{n&&ee.pop()}},Xt=t=>{try{let e=new Set;return ee.push(e),{value:t(),refs:[...e]}}finally{ee.pop()}};var F=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(E(o)||X(o))for(let s of o)F(s,e,!0);else if(he(o))for(let s of o)F(s[0],e,!0),F(s[1],e,!0);if(A(o))for(let s in o)F(o[s],e,!0)}};function Wr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var He=(t,e,n)=>{n.forEach(function(r){let o=t[r];Wr(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},ht=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Bn=Array.prototype,Yt=Object.create(Bn),Gr=["push","pop","shift","unshift","splice","sort","reverse"];He(Bn,Yt,Gr);var Vn=Map.prototype,yt=Object.create(Vn),Jr=["set","clear","delete"];ht(yt,"Map");He(Vn,yt,Jr);var Pn=Set.prototype,gt=Object.create(Pn),Qr=["add","clear","delete"];ht(gt,"Set");He(Pn,gt,Qr);var se={},z=t=>{if(h(t)||Xe(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:E(c)?(Object.setPrototypeOf(c,Yt),!0):X(c)?(Object.setPrototypeOf(c,gt),!0):he(c)?(Object.setPrototypeOf(c,yt),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(se.stack&&se.stack.length){se.stack[se.stack.length-1].add(a);return}o.size!==0&&Qt(()=>{for(let p of[...o.keys()])o.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(_n(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{o.delete(g)};return o.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Te(a,!1),r&&i(t),a};var fe=t=>{if(Xe(t))return t;let e;if(h(t)?(e=t,t=e()):e=z(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];De(o)||(t[r]=fe(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(De(r))continue;let o=n[0];ze(o)||(t[o]=null,t[o]=fe(r))}return e};var jn=Symbol("modelBridge"),Xr=t=>!!t?.[jn],Yr=t=>{t[jn]=1},Zr=t=>{let e=fe(t());return Yr(e),e},$n={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=_(r),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Qe(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(Xr(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=Zr(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var bt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(Ie),...a.map(Ie)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),we=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let Fe=n.o.l.props,qe=n.o.l.propsOnce,Ut=n.o.l.bind,tt=(y,S)=>{let x={},P=y.hasAttribute(Fe),q=y.hasAttribute(qe);return r.v(S,()=>{r.S(x),P&&n.T(Un,y,Fe),q&&n.T(Hn,y,qe);let v=T.props;if(!v||v.length===0)return;v=v.map(_);let G=new Map(v.map(Q=>[Q.toLowerCase(),Q]));for(let Q of v.concat(v.map(Ie))){let ie=y.getAttribute(Q);ie!==null&&(x[_(Q)]=ie,y.removeAttribute(Q))}let Ht=n.J.de(y,!1);for(let[Q,ie]of Ht.entries()){let[_t,En]=ie.Q;if(!En)continue;let xn=G.get(_(En).toLowerCase());xn&&(_t!=="."&&_t!==":"&&_t!==Ut||n.T($n,y,Q,!0,xn,ie.X))}}),x},me=[...r.V()],nt=()=>{let y=tt(l,me),S=new Ke(y,l,me,N,we),x=Jt(()=>T.context(S)??{}).context;if(S.autoProps){for(let[P,q]of Object.entries(y))if(P in x){let v=x[P];if(v===q)continue;S.entangle&&h(v)&&h(q)&&H(N,Qe(q,v))}else x[P]=q;S.onAutoPropsAssigned?.()}return{componentCtx:x,head:S}},{componentCtx:de,head:rt}=nt(),O=[...pe(b)],C=O.length,k=l.childNodes.length===0,V=y=>{let S=y.parentElement;if(k){for(let v of[...y.childNodes])S.insertBefore(v,y);return}let x=y.name;$(x)&&(x=y.getAttributeNames().filter(v=>v.startsWith("#"))[0],$(x)?x="default":x=x.substring(1));let P=l.querySelector(`template[name='${x}'], template[\\#${x}]`);!P&&x==="default"&&(P=l.querySelector("template:not([name])"),P&&P.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(P=null));let q=v=>{rt.enableSwitch&&r.v(me,()=>{r.S(de);let G=tt(y,r.V());r.v(me,()=>{r.S(G);let Ht=r.V(),Q=An(Ht);for(let ie of v)Ce(ie)&&(ie.setAttribute(We,Q),$t(Q),H(ie,()=>{Ft(Q)}))})})};if(P){let v=[...pe(P)];for(let G of v)S.insertBefore(G,y);q(v)}else{if(x!=="default"){for(let G of[...pe(y)])S.insertBefore(G,y);return}let v=[...pe(l)].filter(G=>!oe(G));for(let G of v)S.insertBefore(G,y);q(v)}},R=y=>{if(!Ce(y))return;let S=y.querySelectorAll("slot");if(Ln(y)){V(y),y.remove();return}for(let x of S)V(x),x.remove()};(()=>{for(let y=0;y<C;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(we,d);let Oe=()=>{if(!T.inheritAttrs)return;let y=O.filter(x=>x.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(x=>x.hasAttribute(this.le)));let S=y[0];if(S)for(let x of l.getAttributeNames()){if(x===Fe||x===qe)continue;let P=l.getAttribute(x);if(x==="class")S.classList.add(...P.split(" "));else if(x==="style"){let q=S.style,v=l.style;for(let G of v)q.setProperty(G,v.getPropertyValue(G))}else S.setAttribute(ut(x,n.o),P)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},Ae=()=>{Oe(),ne(),r.S(de),n.ye(l,!1),de.$emit=rt.emit,be(n,O),H(l,()=>{ye(de)}),H(N,()=>{ae(l)}),dt(de)};r.v(me,Ae)}}};var Zt=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if($(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=_(o[i])}s.includes("prop")&&(o[0]=".")}}},Tt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ge(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>o.some(p=>f.startsWith(p)));for(let f of c)r.has(f)||r.set(f,new Zt(f)),r.get(f).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var eo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Et=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=Le(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=ge(e,this.xe);for(let o of r)this.T(o);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=ke(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),Me(s,r),r.forEach(a=>{j(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=oe(e)?r:[...r[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!U(b)||$(b)){ce(s,i);return}if(l.name===b)return;ce(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));eo(g,M),o.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];H(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var Ye=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var en=Symbol("r-for"),xt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=Le(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=ge(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[en]?!0:(e[en]=!0,ge(e,this.ne).forEach(n=>n[en]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return Z(e)?[]:(D(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?C=>B(B(C)?.[i]):C=>C,c=(C,k)=>a(C)===a(k),f=ke(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),Me(g,f),f.forEach(C=>{j(C)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(C,k,V)=>{let R=r.createContext(k,C),Y=Ye.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Oe=d.parentNode??g.parentNode;if(!Oe)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=V.previousSibling,Ae=[];for(let y of f){let S=y.cloneNode(!0);Oe.insertBefore(S,V),Ae.push(S)}for(be(u,Ae),ne=ne.nextSibling;ne!==V;)Y.items.push(ne),ne=ne.nextSibling}),Y},M=(C,k)=>{let V=O.D(C).items,R=V[V.length-1].nextSibling;for(let Y of V)j(Y);O.te(C,b(C,k,R))},N=(C,k)=>{O.S(b(C,k,d))},we=C=>{for(let k of O.D(C).items)j(k)},Fe=C=>{let k=O.w;for(let V=C;V<k;++V)O.D(V).index(V)},qe=C=>{let k=O.w;D(C)&&(C=C());let V=B(C[0]);if(E(V)&&V.length===0){ce(g,d),O.Re(0);return}let R=0,Y=Number.MAX_SAFE_INTEGER,Oe=k,ne=this.p.o.forGrowThreshold,Ae=()=>O.w<Oe+ne;for(let S of this.Ee(C[0])){let x=()=>{if(R<k){let P=O.D(R++);if(c(P.value,S))return;let q=O.Qe(a(S));if(q>=R&&q-R<10){if(--R,Y=Math.min(Y,R),we(R),O.Te(R),--k,q>R+1)for(let v=R;v<q-1&&v<k&&!c(O.D(R).value,S);)++v,we(R),O.Te(R),--k;x();return}Ae()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Y=Math.min(Y,R-1),++k):M(R-1,S)}else N(R++,S)};x()}let y=R;for(k=O.w;R<k;)we(R++);O.Re(y),Fe(Y)},Ut=()=>{de=w(nt,qe)},tt=()=>{me.stop(),de()},me=m.C(r.list),nt=me.value,de,rt=0,O=new Ye(a);for(let C of this.Ee(nt()[0]))O.S(b(rt++,C,d));H(g,tt),Ut()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&r.length===1)p[r[0]]=c;else if(E(l)){let d=0;for(let u of r)p[u]=l[d++]}else for(let d of r)p[d]=l[d];let g={ctx:p,index:z(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=z(f)),g}}}};var vt=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new xt(this),this.Ce=new lt(this),this.Se=new Et(this),this.we=new bt(this),this.J=new Tt(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=oe(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);be(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.j;for(let[s,i]of r.entries()){let[a,c]=i.Q,f=o[s]??o[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let p=f.getAttribute(We);return p||(f.parentElement?c(f.parentElement):null)};if(qt()){let f=c(n);if(f){this.h.v(Nn(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==mt)return!1;if($(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,H(i,()=>{j(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];H(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=In(o,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=o,o),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,r,o,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Fn="http://www.w3.org/1999/xlink",to={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 no(t){return!!t||t===""}var tn={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),Ct(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];Ct(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;Ct(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];Ct(t,p,l,f)}}}},Ct=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),Z(e)){L(3,name,t);return}if(!U(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){Z(n)?t.removeAttributeNS(Fn,e.slice(6,e.length)):t.setAttributeNS(Fn,e,n);return}let o=e in to;Z(n)||o&&!no(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var nn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)qn(t,s[c],i?.[c])}else qn(t,s,i)}}},qn=(t,e,n)=>{let r=t.classList,o=U(e),s=U(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var zn={onChange:(t,e)=>{let[n,r]=e;D(r)?r(t,n):t.innerHTML=n?.toString()}};function ro(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=le(t[r],e[r]);return n}function le(t,e){if(t===e)return!0;let n=Vt(t),r=Vt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=ze(t),r=ze(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?ro(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Rt(t,e){return t.findIndex(n=>le(n,e))}var Kn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var rn=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var on=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Gn={onChange:(t,e)=>{oo(t,e[0])},onBind:(t,e,n,r,o,s)=>so(t,e,s)},oo=(t,e)=>{let n=Yn(t);if(n&&Jn(t))E(e)?e=Rt(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=lo(t,e),t.checked=e;else if(n&&Qn(t))t.checked=le(e,ue(t));else if(n||Zn(t))Xn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(er(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ue(a);if(s)E(e)?a.selected=Rt(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},Ze=t=>(h(t)&&(t=t()),D(t)&&(t=t()),t?U(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}),Jn=t=>t.type==="checkbox",Qn=t=>t.type==="radio",Xn=t=>t.type==="number"||t.type==="range",Yn=t=>t.tagName==="INPUT",Zn=t=>t.tagName==="TEXTAREA",er=t=>t.tagName==="SELECT",so=(t,e,n)=>{let r=e.value,o=Ze(n?.join(",")),s=Ze(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=Yn(t);return c&&Jn(t)?ao(t,a):c&&Qn(t)?uo(t,a):c||Zn(t)?io(t,i,a,r):er(t)?mo(t,a,r):(L(7,t),()=>{})},Wn=/[.,' ·٫]/,io=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=Xn(t),a=()=>{!e.trim&&!Ze(r()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=Ze(r()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Wn.test(m[m.length-1])&&m.split(Wn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},ao=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(E(c)){let f=Rt(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(fo(t,a))};return t.addEventListener(n,o),r},ue=t=>"_value"in t?t._value:t.value,tr="trueValue",co="falseValue",nr="true-value",po="false-value",fo=(t,e)=>{let n=e?tr:co;if(n in t)return t[n];let r=e?nr:po;return t.hasAttribute(r)?t.getAttribute(r):e},lo=(t,e)=>{if(tr in t)return le(e,t.trueValue);let r=nr;return t.hasAttribute(r)?le(e,t.getAttribute(r)):le(e,!0)},uo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,o),r},mo=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=Ze(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Kn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(rn(i),X(p)){p.clear();for(let l of f)p.add(l)}else E(p)?(p.splice(0),p.push(...f)):i(f)}finally{on(i),F(i)}}else i(f[0])};return t.addEventListener(r,s),o};var ho=["stop","prevent","capture","self","once","left","right","middle","passive"],yo=t=>{let e={};if($(t))return;let n=t.split(",");for(let r of ho)e[r]=n.includes(r);return e},an={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let p=e.value(),l=B(o.value()[0]);return U(l)?sn(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(r){let p=e.value();return sn(t,_(r),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(D(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return D(T)&&(T=T()),T=T[d],D(T)&&(T=T()),T},m=l[d+"_flags"];i.push(sn(t,d,u,m))}else L(2,name,t)}return a}},go=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(o&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return r?[t,f=>c(f)?f.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},sn=(t,e,n,r)=>{if($(e))return L(5,name,t),()=>{};let o=yo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=go(e,r);let a=p=>{if(!i(p)||!n&&e==="submit"&&o?.prevent)return;let l=n(p);D(l)&&(l=l(p)),D(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!o){a(p);return}try{if(o.left&&p.button!==0||o.middle&&p.button!==1||o.right&&p.button!==2||o.self&&p.target!==t)return;o.stop&&p.stopPropagation(),o.prevent&&p.preventDefault(),a(p)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var rr={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),_e(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=c[0],p=c[1];_e(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];_e(t,p,l)}else{let f=e[a++],p=e[a];_e(t,f,p)}}}};function bo(t){return!!t||t===""}var _e=(t,e,n)=>{if(Z(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n??"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=bo(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var or={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=E(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var sr={onChange:(t,e)=>{let n=ve(t).data,r=n._ord;vn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var fn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)ir(t,s[c],i?.[c])}else ir(t,s,i)}}},ir=(t,e,n)=>{let r=t.style,o=U(e);if(e&&!o){if(n&&!U(n))for(let s in n)e[s]==null&&pn(r,s,"");for(let s in e)pn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ve(t).data)return;r.display=s}},ar=/\s*!important$/;function pn(t,e,n){if(E(n))n.forEach(r=>{pn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=To(t,e);ar.test(n)?t.setProperty(Ie(r),n.replace(ar,""),"important"):t[r]=n}}var cr=["Webkit","Moz","ms"],cn={};function To(t,e){let n=cn[e];if(n)return n;let r=_(e);if(r!=="filter"&&r in t)return cn[e]=r;r=Je(r);for(let o=0;o<cr.length;o++){let s=cr[o]+r;if(s in t)return cn[e]=s}return e}var J=t=>pr(B(t)),pr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(E(t))return t.map(J);if(X(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=pr(B(r[1]),e);return n};var fr={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var lr={onChange:(t,e)=>{_e(t,"value",e[0])}};var te=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=fe,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){it.warning("Registered component's default name is not defined",n);continue}this.fe.set(Je(n.defaultName),n),this.ue.set(Je(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":rr,":":tn,"@":an,[`${e}on`]:an,[`${e}bind`]:tn,[`${e}html`]:zn,[`${e}text`]:fr,[`${e}show`]:sr,[`${e}model`]:Gn,":style":fn,[`${e}bind:style`]:fn,":class":nn,[`${e}bind:class`]:nn,":ref":or,":value":lr,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var St=(t,e)=>{if(!t)return;let r=(e??te.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of xo(t,r.pre,s))Eo(i,r.text,o,s)},Eo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=ur(c,r);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=ur(c,r);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},xo=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of pe(s))o(i)}};return o(t),r},ur=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var vo=9,Co=10,Ro=13,So=32,Ee=46,wt=44,wo=39,Oo=34,Ot=40,Be=41,At=91,Nt=93,ln=63,Ao=59,mr=58,No=123,Mt=125,mn=43,Mo=45,dr=96,hr=47,ko=92,yr=[2,3],gr=[mn,Mo],Cr={"-":1,"!":1,"~":1,"+":1,new:1},Rr={"=":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},Pe={"=>":2,...Rr,"||":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},Sr=Object.keys(Rr),Lo=new Set(Sr),kt=new Set;kt.add("=>");Sr.forEach(t=>kt.add(t));var Io=new Set(["$","_"]),br={true:!0,false:!1,null:null},Do="this";function wr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Uo=wr(Cr),Ho=wr(Pe),je="Expected ",Se="Unexpected ",hn="Unclosed ",_o=je+":",Tr=je+"expression",Bo="missing }",Vo=Se+"object property",Po=hn+"(",Er=je+"comma",xr=Se+"token ",jo=Se+"period",un=je+"expression after ",$o="missing unaryOp argument",Fo=hn+"[",qo=je+"exponent (",zo="Variable names cannot start with a number (",Ko=hn+'quote after "';var Ve=t=>t>=48&&t<=57,vr=t=>Pe[t]||0,dn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Pe)||Io.has(n)}re(e){return this.U(e)||Ve(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===So||e===vo||e===Co||e===Ro;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Ao||r===wt)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Se+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,Ho),o=r.length;for(;o>0;){if(r in Pe&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:vr(n),right_a:kt.has(n)},i=this.$(),!i)throw this.i(un+n);let f=[s,o,i];for(;n=this.se();){if(r=vr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:kt.has(n)},c=n;let p=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(un+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if(Ve(o)||o===Ee)return this.gt();if(o===wo||o===Oo)r=this.bt();else if(o===At)r=this.xt();else{for(e=this.r.substr(this.e,Uo),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Cr,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i($o);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in br?r={type:4,value:br[r.name],raw:r.name}:r.name===Do&&(r={type:5})):o===Ot&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===Ee||n===At||n===Ot||n===ln;){let r;if(n===ln){if(this.r.charCodeAt(this.e+1)!==Ee)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===At){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Nt)throw this.i(Fo);this.e++}else n===Ot?e={type:6,arguments:this.ke(Be),callee:e}:(n===Ee||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Ve(this.f);)e+=this.r.charAt(this.e++);if(this.m(Ee))for(e+=this.r.charAt(this.e++);Ve(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Ve(this.f);)e+=this.r.charAt(this.e++);if(!Ve(this.r.charCodeAt(this.e-1)))throw this.i(qo+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(zo+e+this.M+")");if(r===Ee||e.length===1&&e.charCodeAt(0)===Ee)throw this.i(jo);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(Ko+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Se+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===Be&&o&&o>=n.length)throw this.i(xr+String.fromCharCode(e));break}else if(s===wt){if(this.e++,o++,o!==n.length){if(e===Be)throw this.i(xr+",");if(e===Nt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Er);{let i=this.A();if(!i||i.type===0)throw this.i(Er);n.push(i)}}}if(!r)throw this.i(je+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(Be);if(this.m(Be))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Po)}xt(){return this.e++,{type:9,elements:this.ke(Nt)}}lt(e){if(this.m(No)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Mt)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(wt)||this.m(Mt)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(mr)){this.e++;let o=this.A();if(!o)throw this.i(Vo);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(wt)&&this.e++}throw this.i(Bo)}}ft(e){let n=this.f;if(gr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===mn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!yr.includes(r.argument.type))throw this.i(Se+r.operator)}}yt(e){if(e.node){let n=this.f;if(gr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!yr.includes(e.node.type))throw this.i(Se+e.node.operator);this.e+=2,e.node={type:13,operator:n===mn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Ee)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(ln)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Tr);if(this.y(),this.m(mr)){this.e++;let o=this.A();if(!o)throw this.i(Tr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&Pe[n.operator]<=.9){let s=n;for(;s.right.operator&&Pe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(_o)}}it(e){if(this.y(),this.m(Ot)){let n=this.e;if(this.e++,this.y(),this.m(Be)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(un+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Lo.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(dr)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(dr))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Mt)),!this.m(Mt))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
3
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r?.callee?.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(hr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===hr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(At)?r=!0:r&&this.m(Nt)&&(r=!1),this.e+=this.m(ko)?2:1}throw this.i("Unclosed Regex")}},Or=t=>new dn(t).parse();var Wo={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},Go={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},kr=t=>{if(!t?.some(Mr))return t;let e=[];return t.forEach(n=>Mr(n)?e.push(...n):e.push(n)),e},Ar=(...t)=>kr(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},Jo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},Qo={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},Nr={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},Lt=(t,e)=>D(t)?t.bind(e):t,gn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,r,o,s){this.u=E(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.O=r[o],Lt(B(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],Lt(B(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],Lt(B(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Ar,...e.body)}1(e,n,r){return this.E(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o?.[s];return this.O=i,Lt(B(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>D(i)?i(...kr(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,Go[e.operator],e.argument)}8(e,n,r){let o=Wo[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,Ar,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){let o={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,yn(p,r)),f=p=>this._e(a,e.value,n,yn(p,r));if(e.shorthand){let p=e.key.name;o[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());o[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;o[p]=s(e.value)&&i(p,n)?()=>f:f()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?Jo:Qo;if(o.type===2){let a=o.name,c=this.Pe(a,r);return Z(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(Z(a))return;let c=this.g(e.right,n,r);return Nr[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Nr[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=Lr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.E(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=B(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:r,refs:o}=Xt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;if(!s)return this.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,yn(f,n)):this.g(a,e,n)));return r(...i)}},Lr=Symbol("s"),Mr=t=>t?.s===Lr,Ir=(t,e,n,r,o,s,i)=>new gn(e,n,r,o,i).eval(t,s);var Dr={},It=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){let i=z([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=Ir(d,u,p,n,r,T,o);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Dr[e]??Or("["+e+"]");Dr[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Ur=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Xo=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},Yo=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!Ur(t[n]))return null;let r=n;for(;n<t.length&&Ur(t[n]);)++n;return{start:r,end:n}},Hr=new Set(["table","thead","tbody","tfoot"]),Zo=new Set(["thead","tbody","tfoot"]),es=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Dt=t=>{let e=0,n=[],r=[],o=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=Xo(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=Yo(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=r[r.length-1];m?(r.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),Hr.has(m.effectiveTag)&&--o):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=r[r.length-1],u=null;if(o===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):Zo.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=es.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;r.push({replacementHost:u,effectiveTag:m}),Hr.has(m)&&++o}e=i+1}return n.join("")};var ts="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",ns=new Set(ts.toUpperCase().split(",")),rs="http://www.w3.org/2000/svg",_r=(t,e)=>{oe(t)?t.content.appendChild(e):t.appendChild(e)},bn=(t,e,n,r)=>{let o=t.t;if(o){let i=n&&ns.has(o.toUpperCase())?document.createElementNS(rs,o.toLowerCase()):document.createElement(o),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,r),l)}let c=t.c;if(c)for(let f of c)bn(f,i,n,r);_r(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)_r(e,i);else throw new Error("unsupported node type.")}},$e=(t,e,n)=>{n??=te.getDefault();let r=document.createDocumentFragment();if(!E(t))return bn(t,r,!!e,n),r;for(let o of t)bn(o,r,!!e,n);return r};var os=(t,e={selector:"#app"},n)=>{U(e)&&(e={selector:"#app",template:e}),Dn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ce(r))throw I(0);n||(n=te.getDefault());let o=()=>{for(let a of[...r.childNodes])j(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Dt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=$e(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&St(r,n),new Tn(t,r,n).T(),H(r,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{j(r)},unbind:()=>{ae(r)}}},Tn=class{Et;Fe;o;h;p;constructor(e,n,r){this.Et=e,this.Fe=n,this.o=r,this.h=new It([e],r),this.p=new vt(this.h)}T(){this.p.H(this.Fe)}};var et=t=>{if(E(t))return t.map(o=>et(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)??""])));let r=pe(t);return r.length>0&&(e.c=[...r].map(o=>et(o))),e};var ss=(t,e={})=>{E(e)&&(e={props:e}),U(t)&&(t={template:t});let n=e.context??(()=>({})),r=!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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Dt(t.template));t.element=s}else t.json&&(t.element=$e(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&St(t.element,e.config??te.getDefault());let o=t.element;if(!r&&((t.isSVG??(Ge(o)&&o.hasAttribute?.("isSVG")))||Ge(o)&&o.querySelector("[isSVG]"))){let s=o.content,i=s?[...s.childNodes]:[...o.childNodes],a=et(i);t.element=$e(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var is=t=>{xe()?.onMounted.push(t)};var as=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=cs(t,n),e(...o))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},cs=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let r=0,o=Ue(()=>{if(r>0){o(),e.isStopped=!0,F(n);return}n(t()),++r});return n.stop=o,n};var ps=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=fs(t,e,n),r(...s))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},fs=(t,e,n)=>{let r=n.ref??z(null);n.ref=r,n.isStopped=!1;let o=0,s=a=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(...t.map(c=>c()))),++o},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),r.stop=()=>{i.forEach(a=>{a()})},r};var ls=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=us(t,e,n),r(...s))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},us=(t,e,n)=>{let r=n.ref??z(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,s=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(s)),++o},!0),r};var ms=t=>(t[ct]=1,t);var ds=(t,e)=>{if(!e)throw I(5);let r=De(t)?fe:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=Ue(o);return K(i,!0),t};var Br=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},hs=Br;var ys=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return K(s,!0),s};var gs=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var bs=t=>{Vr();try{t()}finally{Pr()}},Vr=()=>{se.stack||(se.stack=[]),se.stack.push(new Set)},Pr=()=>{let t=se.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete se.stack;for(let n of e)try{F(n)}catch(r){console.error(r)}};export{Ke as ComponentHead,te as RegorConfig,H as addUnbinder,bs as batch,Xt as collectRefs,ps as computeMany,ls as computeRef,as as computed,os as createApp,ss as createComponent,Pr as endBatch,Qe as entangle,J as flatten,ve as getBindData,Br as html,De as isDeepRef,Xe as isRaw,h as isRef,ms as markRaw,w as observe,ys as observeMany,gs as observerCount,is as onMounted,K as onUnmounted,rn as pause,ds as persist,hs as raw,fe as ref,j as removeNode,on as resume,Qt as silence,z as sref,Vr as startBatch,$e as toFragment,et as toJsonTemplate,F as trigger,ae as unbind,B as unref,Jt as useScope,it as warningHandler,Ue as watchEffect};
1
+ var Ne=Symbol(":regor");var ae=t=>{let e=[t];for(;e.length>0;){let n=e.shift();$o(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},$o=t=>{let e=t[Ne];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Ne]}};var j=t=>{t.remove(),setTimeout(()=>ae(t),1)};var D=t=>typeof t=="function",U=t=>typeof t=="string",Cn=t=>typeof t>"u",Z=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),Fo=Object.prototype.toString,Bt=t=>Fo.call(t),he=t=>Bt(t)==="[object Map]",X=t=>Bt(t)==="[object Set]",Vt=t=>Bt(t)==="[object Date]",ze=t=>typeof t=="symbol",x=Array.isArray,A=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."},I=(t,...e)=>{let n=vn[t];return new Error(D(n)?n.call(vn,...e):n)};var rt=[],Rn=()=>{let t={onMounted:[],onUnmounted:[]};return rt.push(t),t},Ee=t=>{let e=rt[rt.length-1];if(!e&&!t)throw I(2);return e},Sn=t=>{let e=Ee();return t&&jt(t),rt.pop(),e},Pt=Symbol("csp"),jt=t=>{let e=t,n=e[Pt];if(n){let o=Ee();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Pt]=Ee()},st=t=>t[Pt];var ye=t=>{st(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ke=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,o,r,s){this.props=e,this.pe=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)j(e),e=e.nextSibling;for(let o of this.ctx)ye(o)}};var Ce=t=>{let e=t[Ne];if(e)return e;let n={unbinders:[],data:{}};return t[Ne]=n,n};var H=(t,e)=>{Ce(t).unbinders.push(e)};var wn={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]})},L=(t,...e)=>{let n=wn[t],o=D(n)?n.call(wn,...e):n,r=it.warning;r&&(U(o)?r(o):r(o,...o.args))},it={warning:console.warn};var K=(t,e)=>{Ee(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let r=t(void 0,void 0,0,e);return K(r,!0),r};var ft={},pt={},On=1,An=t=>{let e=(On++).toString();return ft[e]=t,pt[e]=0,e},$t=t=>{pt[t]+=1},Ft=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},Nn=t=>ft[t],qt=()=>On!==1&&Object.keys(ft).length>0,We="r-switch",qo=t=>{let e=t.filter(o=>ve(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(We))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Me=(t,e)=>{if(!qt())return;let n=qo(e);n.length!==0&&(n.forEach($t),H(t,()=>{n.forEach(Ft)}))};var zt=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}be(e,r)},Kt=Symbol("r-if"),Mn=Symbol("r-else"),kn=t=>t[Mn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=Le(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(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.B),o=ge(e,this.K);for(let r of o)this.T(r);return n}G(e){return e[Kt]?!0:(e[Kt]=!0,ge(e,this.K).forEach(n=>n[Kt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,o){let r=ke(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),Me(i,r),r.forEach(c=>{j(c)}),e.remove(),n!=="if"&&(e[Mn]=1);let a=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{zt(r,this.p,s,a)},unmount:()=>{ce(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${r} `),f=this.p.h.C(r),p=f.value,l=this.ce(o,n),g=[];H(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{zt(s,this.p,i,c)},unmount:()=>{ce(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(zt(r,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{ce(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(o,d),m=[];H(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var ke=t=>{let e=re(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},be=(t,e)=>{for(let n of e)kn(n)||t.H(n)},ge=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},re=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Ge=t=>t.nodeType===Node.ELEMENT_NODE,Ln=t=>t instanceof HTMLSlotElement,pe=t=>re(t)?t.content.childNodes:t.childNodes,ce=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;j(n),n=o}},Te=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},In=(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},Le=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Wt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},zo=/-(\w)/g,_=Wt(t=>t&&t.replace(zo,(e,n)=>n?n.toUpperCase():"")),Ko=/\B([A-Z])/g,Ie=Wt(t=>t&&t.replace(Ko,"-$1").toLowerCase()),Je=Wt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{st(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var Gt=Symbol("scope"),Jt=t=>{try{Rn();let e=t();jt(e);let n={context:e,unmount:()=>ye(e),[Gt]:1};return n[Gt]=1,n}finally{Sn()}},Dn=t=>A(t)?Gt in t:!1;var Un={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let o=e.value(),r=e.context,s=o[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=r[a];f!==c&&(h(f)?f(c):r[a]=c)}},!0)};var Hn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),o=e.context,r=n[0];if(!A(r))return()=>{};for(let s of Object.entries(r)){let i=s[0],a=s[1],c=o[i];c!==a&&(h(c)?c(a):o[i]=a)}return()=>{}}};var Qe=(t,e)=>{if(t===e)return()=>{};let n=w(t,r=>e(r)),o=w(e,r=>t(r));return e(t()),()=>{n(),o()}};var Xe=t=>!!t&&t[ct]===1;var De=t=>t?.[at]===1;var ee=[],_n=t=>{ee.length!==0&&ee[ee.length-1]?.add(t)},Ue=t=>{if(!t)return()=>{};let e={stop:()=>{}};return Wo(t,e),K(()=>e.stop(),!0),e.stop},Wo=(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(ee.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=w(i,()=>{r(),Ue(t)});n.push(a)}}finally{ee.pop()}},Qt=t=>{let e=ee.length,n=e>0&&ee[e-1];try{return n&&ee.push(null),t()}finally{n&&ee.pop()}},Xt=t=>{try{let e=new Set;return ee.push(e),{value:t(),refs:[...e]}}finally{ee.pop()}};var F=(t,e,n)=>{if(!h(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(x(r)||X(r))for(let s of r)F(s,e,!0);else if(he(r))for(let s of r)F(s[0],e,!0),F(s[1],e,!0);if(A(r))for(let s in r)F(r[s],e,!0)}};function Go(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var He=(t,e,n)=>{n.forEach(function(o){let r=t[o];Go(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},ht=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Bn=Array.prototype,Yt=Object.create(Bn),Jo=["push","pop","shift","unshift","splice","sort","reverse"];He(Bn,Yt,Jo);var Vn=Map.prototype,yt=Object.create(Vn),Qo=["set","clear","delete"];ht(yt,"Map");He(Vn,yt,Qo);var Pn=Set.prototype,gt=Object.create(Pn),Xo=["add","clear","delete"];ht(gt,"Set");He(Pn,gt,Xo);var se={},z=t=>{if(h(t)||Xe(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:x(c)?(Object.setPrototypeOf(c,Yt),!0):X(c)?(Object.setPrototypeOf(c,gt),!0):he(c)?(Object.setPrototypeOf(c,yt),!0):!1:!1,o=n(t),r=new Set,s=(c,f)=>{if(se.stack&&se.stack.length){se.stack[se.stack.length-1].add(a);return}r.size!==0&&Qt(()=>{for(let p of[...r.keys()])r.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(_n(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{r.delete(g)};return r.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Te(a,!1),o&&i(t),a};var fe=t=>{if(Xe(t))return t;let e;if(h(t)?(e=t,t=e()):e=z(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,x(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];De(r)||(t[o]=fe(r))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let o=n[1];if(De(o))continue;let r=n[0];ze(r)||(t[r]=null,t[r]=fe(o))}return e};var jn=Symbol("modelBridge"),Yo=t=>!!t?.[jn],Zo=t=>{t[jn]=1},er=t=>{let e=fe(t());return Zo(e),e},$n={collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(!o)return()=>{};let i=_(o),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Qe(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(Yo(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=er(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var bt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,o=n.h,r=n.o.fe,s=n.o.ue,i=o.me(),a=o.ze(),c=[...r.keys(),...a,...[...r.keys()].map(Ie),...a.map(Ie)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),we=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let Fe=n.o.l.props,qe=n.o.l.propsOnce,Ut=n.o.l.bind,tt=(y,S)=>{let E={},P=y.hasAttribute(Fe),q=y.hasAttribute(qe);return o.v(S,()=>{o.S(E),P&&n.T(Un,y,Fe),q&&n.T(Hn,y,qe);let C=T.props;if(!C||C.length===0)return;C=C.map(_);let G=new Map(C.map(Q=>[Q.toLowerCase(),Q]));for(let Q of C.concat(C.map(Ie))){let ie=y.getAttribute(Q);ie!==null&&(E[_(Q)]=ie,y.removeAttribute(Q))}let Ht=n.J.de(y,!1);for(let[Q,ie]of Ht.entries()){let[_t,xn]=ie.Q;if(!xn)continue;let En=G.get(_(xn).toLowerCase());En&&(_t!=="."&&_t!==":"&&_t!==Ut||n.T($n,y,Q,!0,En,ie.X))}}),E},me=[...o.V()],nt=()=>{let y=tt(l,me),S=new Ke(y,l,me,N,we),E=Jt(()=>T.context(S)??{}).context;if(S.autoProps){for(let[P,q]of Object.entries(y))if(P in E){let C=E[P];if(C===q)continue;S.entangle&&h(C)&&h(q)&&H(N,Qe(q,C))}else E[P]=q;S.onAutoPropsAssigned?.()}return{componentCtx:E,head:S}},{componentCtx:de,head:ot}=nt(),O=[...pe(b)],v=O.length,k=l.childNodes.length===0,V=y=>{let S=y.parentElement;if(k){for(let C of[...y.childNodes])S.insertBefore(C,y);return}let E=y.name;$(E)&&(E=y.getAttributeNames().filter(C=>C.startsWith("#"))[0],$(E)?E="default":E=E.substring(1));let P=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!P&&E==="default"&&(P=l.querySelector("template:not([name])"),P&&P.getAttributeNames().filter(C=>C.startsWith("#")).length>0&&(P=null));let q=C=>{ot.enableSwitch&&o.v(me,()=>{o.S(de);let G=tt(y,o.V());o.v(me,()=>{o.S(G);let Ht=o.V(),Q=An(Ht);for(let ie of C)ve(ie)&&(ie.setAttribute(We,Q),$t(Q),H(ie,()=>{Ft(Q)}))})})};if(P){let C=[...pe(P)];for(let G of C)S.insertBefore(G,y);q(C)}else{if(E!=="default"){for(let G of[...pe(y)])S.insertBefore(G,y);return}let C=[...pe(l)].filter(G=>!re(G));for(let G of C)S.insertBefore(G,y);q(C)}},R=y=>{if(!ve(y))return;let S=y.querySelectorAll("slot");if(Ln(y)){V(y),y.remove();return}for(let E of S)V(E),E.remove()};(()=>{for(let y=0;y<v;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(we,d);let Oe=()=>{if(!T.inheritAttrs)return;let y=O.filter(E=>E.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(E=>E.hasAttribute(this.le)));let S=y[0];if(S)for(let E of l.getAttributeNames()){if(E===Fe||E===qe)continue;let P=l.getAttribute(E);if(E==="class")S.classList.add(...P.split(" "));else if(E==="style"){let q=S.style,C=l.style;for(let G of C)q.setProperty(G,C.getPropertyValue(G))}else S.setAttribute(ut(E,n.o),P)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},Ae=()=>{Oe(),ne(),o.S(de),n.ye(l,!1),de.$emit=ot.emit,be(n,O),H(l,()=>{ye(de)}),H(N,()=>{ae(l)}),dt(de)};o.v(me,Ae)}}};var Zt=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let o=e.indexOf("."),r=this.Q=(o<0?e:e.substring(0,o)).split(/[:@]/);if($(r[0])&&(r[0]=n?".":e[0]),o>=0){let s=this.X=e.slice(o+1).split(".");if(s.includes("camel")){let i=r.length-1;r[i]=_(r[i])}s.includes("prop")&&(r[0]=".")}}},Tt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Ge(e))return o;let r=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>r.some(p=>f.startsWith(p)));for(let f of c)o.has(f)||o.set(f,new Zt(f)),o.get(f).ge.push(a)};if(s(e),!n)return o;let i=e.querySelectorAll("*");for(let a of i)s(a);return o}};var tr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},xt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=Le(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=ge(e,this.xe);for(let r of o)this.T(r);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let o=ke(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),Me(s,o),o.forEach(a=>{j(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=re(e)?o:[...o[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!U(b)||$(b)){ce(s,i);return}if(l.name===b)return;ce(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));tr(g,M),r.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];H(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var Ye=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let o=this.w;for(let r=e;r<o;++r)this.R[r].order=r+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.R[o].order=o}Re(e){let n=this.w;for(let o=e;o<n;++o)this.ee(o);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var en=Symbol("r-for"),Et=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=Le(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=ge(e,this.ne);for(let r of o)this.Xe(r);return n}G(e){return e[en]?!0:(e[en]=!0,ge(e,this.ne).forEach(n=>n[en]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return Z(e)?[]:(D(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))}Ye(e,n){let o=this.Ze(n);if(!o?.list){L(1,this.b,n,e);return}let r=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=i?v=>B(B(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),f=ke(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),Me(g,f),f.forEach(v=>{j(v)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(v,k,V)=>{let R=o.createContext(k,v),Y=Ye.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Oe=d.parentNode??g.parentNode;if(!Oe)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=V.previousSibling,Ae=[];for(let y of f){let S=y.cloneNode(!0);Oe.insertBefore(S,V),Ae.push(S)}for(be(u,Ae),ne=ne.nextSibling;ne!==V;)Y.items.push(ne),ne=ne.nextSibling}),Y},M=(v,k)=>{let V=O.D(v).items,R=V[V.length-1].nextSibling;for(let Y of V)j(Y);O.te(v,b(v,k,R))},N=(v,k)=>{O.S(b(v,k,d))},we=v=>{for(let k of O.D(v).items)j(k)},Fe=v=>{let k=O.w;for(let V=v;V<k;++V)O.D(V).index(V)},qe=v=>{let k=O.w;D(v)&&(v=v());let V=B(v[0]);if(x(V)&&V.length===0){ce(g,d),O.Re(0);return}let R=0,Y=Number.MAX_SAFE_INTEGER,Oe=k,ne=this.p.o.forGrowThreshold,Ae=()=>O.w<Oe+ne;for(let S of this.Ee(v[0])){let E=()=>{if(R<k){let P=O.D(R++);if(c(P.value,S))return;let q=O.Qe(a(S));if(q>=R&&q-R<10){if(--R,Y=Math.min(Y,R),we(R),O.Te(R),--k,q>R+1)for(let C=R;C<q-1&&C<k&&!c(O.D(R).value,S);)++C,we(R),O.Te(R),--k;E();return}Ae()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Y=Math.min(Y,R-1),++k):M(R-1,S)}else N(R++,S)};E()}let y=R;for(k=O.w;R<k;)we(R++);O.Re(y),Fe(Y)},Ut=()=>{de=w(nt,qe)},tt=()=>{me.stop(),de()},me=m.C(o.list),nt=me.value,de,ot=0,O=new Ye(a);for(let v of this.Ee(nt()[0]))O.S(b(ot++,v,d));H(g,tt),Ut()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&o.length===1)p[o[0]]=c;else if(x(l)){let d=0;for(let u of o)p[u]=l[d++]}else for(let d of o)p[d]=l[d];let g={ctx:p,index:z(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=z(f)),g}}}};var Ct=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new Et(this),this.Ce=new lt(this),this.Se=new xt(this),this.we=new bt(this),this.J=new Tt(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=re(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.x))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);be(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let o=this.J.de(e,n),r=this.o.j;for(let[s,i]of o.entries()){let[a,c]=i.Q,f=r[s]??r[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,o,r,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=f=>{let p=f.getAttribute(We);return p||(f.parentElement?c(f.parentElement):null)};if(qt()){let f=c(n);if(f){this.h.v(Nn(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,o){if(e!==mt)return!1;if($(o))return!0;let r=document.querySelector(o);if(r){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${o}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,H(i,()=>{j(n)}),r.appendChild(n)}return!0}L(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.nt(e,n,o))return;let i=this.h.C(o,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];H(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=In(r,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=r,r),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,o,r,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Fn="http://www.w3.org/1999/xlink",nr={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 or(t){return!!t||t===""}var tn={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),vt(t,o,e[0],r);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];vt(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;vt(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];vt(t,p,l,f)}}}},vt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),Z(e)){L(3,name,t);return}if(!U(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){Z(n)?t.removeAttributeNS(Fn,e.slice(6,e.length)):t.setAttributeNS(Fn,e,n);return}let r=e in nr;Z(n)||r&&!or(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var nn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)qn(t,s[c],i?.[c])}else qn(t,s,i)}}},qn=(t,e,n)=>{let o=t.classList,r=U(e),s=U(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?n!==e&&(s&&o.remove(...n.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):n&&s&&o.remove(...n.trim().split(/\s+/))};var zn={onChange:(t,e)=>{let[n,o]=e;D(o)?o(t,n):t.innerHTML=n?.toString()}};function rr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=le(t[o],e[o]);return n}function le(t,e){if(t===e)return!0;let n=Vt(t),o=Vt(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=ze(t),o=ze(e),n||o)return t===e;if(n=x(t),o=x(e),n||o)return n&&o?rr(t,e):!1;if(n=A(t),o=A(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Rt(t,e){return t.findIndex(n=>le(n,e))}var Kn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var on=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var rn=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Gn={onChange:(t,e)=>{sr(t,e[0])},onBind:(t,e,n,o,r,s)=>ir(t,e,s)},sr=(t,e)=>{let n=Yn(t);if(n&&Jn(t))x(e)?e=Rt(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=ur(t,e),t.checked=e;else if(n&&Qn(t))t.checked=le(e,ue(t));else if(n||Zn(t))Xn(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(eo(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=ue(a);if(s)x(e)?a.selected=Rt(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},Ze=t=>(h(t)&&(t=t()),D(t)&&(t=t()),t?U(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}),Jn=t=>t.type==="checkbox",Qn=t=>t.type==="radio",Xn=t=>t.type==="number"||t.type==="range",Yn=t=>t.tagName==="INPUT",Zn=t=>t.tagName==="TEXTAREA",eo=t=>t.tagName==="SELECT",ir=(t,e,n)=>{let o=e.value,r=Ze(n?.join(",")),s=Ze(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=Yn(t);return c&&Jn(t)?cr(t,a):c&&Qn(t)?mr(t,a):c||Zn(t)?ar(t,i,a,o):eo(t)?dr(t,a,o):(L(7,t),()=>{})},Wn=/[.,' ·٫]/,ar=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Xn(t),a=()=>{!e.trim&&!Ze(o()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=Ze(o()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Wn.test(m[m.length-1])&&m.split(Wn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},cr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(x(c)){let f=Rt(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(lr(t,a))};return t.addEventListener(n,r),o},ue=t=>"_value"in t?t._value:t.value,to="trueValue",pr="falseValue",no="true-value",fr="false-value",lr=(t,e)=>{let n=e?to:pr;if(n in t)return t[n];let o=e?no:fr;return t.hasAttribute(o)?t.getAttribute(o):e},ur=(t,e)=>{if(to in t)return le(e,t.trueValue);let o=no;return t.hasAttribute(o)?le(e,t.getAttribute(o)):le(e,!0)},mr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,r),o},dr=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=Ze(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Kn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(on(i),X(p)){p.clear();for(let l of f)p.add(l)}else x(p)?(p.splice(0),p.push(...f)):i(f)}finally{rn(i),F(i)}}else i(f[0])};return t.addEventListener(o,s),r};var hr=["stop","prevent","capture","self","once","left","right","middle","passive"],yr=t=>{let e={};if($(t))return;let n=t.split(",");for(let o of hr)e[o]=n.includes(o);return e},an={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(r){let p=e.value(),l=B(r.value()[0]);return U(l)?sn(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(o){let p=e.value();return sn(t,_(o),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(D(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return D(T)&&(T=T()),T=T[d],D(T)&&(T=T()),T},m=l[d+"_flags"];i.push(sn(t,d,u,m))}else L(2,name,t)}return a}},gr=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(r&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return o?[t,f=>c(f)?f.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},sn=(t,e,n,o)=>{if($(e))return L(5,name,t),()=>{};let r=yr(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=gr(e,o);let a=p=>{if(!i(p)||!n&&e==="submit"&&r?.prevent)return;let l=n(p);D(l)&&(l=l(p)),D(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!r){a(p);return}try{if(r.left&&p.button!==0||r.middle&&p.button!==1||r.right&&p.button!==2||r.self&&p.target!==t)return;r.stop&&p.stopPropagation(),r.prevent&&p.preventDefault(),a(p)}finally{r.once&&c()}};return t.addEventListener(e,f,s),c};var oo={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),_e(t,o,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=c[0],p=c[1];_e(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];_e(t,p,l)}else{let f=e[a++],p=e[a];_e(t,f,p)}}}};function br(t){return!!t||t===""}var _e=(t,e,n)=>{if(Z(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ae),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=br(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||L(4,e,o,n,s)}r&&t.removeAttribute(e)};var ro={once:!0,onBind:(t,e,n)=>{let o=e.value()[0],r=x(o),s=e.refs[0];return r?o.push(t):s?s?.(t):e.context[n]=t,()=>{if(r){let i=o.indexOf(t);i!==-1&&o.splice(i,1)}else s?.(null)}}};var so={onChange:(t,e)=>{let n=Ce(t).data,o=n._ord;Cn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var fn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)io(t,s[c],i?.[c])}else io(t,s,i)}}},io=(t,e,n)=>{let o=t.style,r=U(e);if(e&&!r){if(n&&!U(n))for(let s in n)e[s]==null&&pn(o,s,"");for(let s in e)pn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Ce(t).data)return;o.display=s}},ao=/\s*!important$/;function pn(t,e,n){if(x(n))n.forEach(o=>{pn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Tr(t,e);ao.test(n)?t.setProperty(Ie(o),n.replace(ao,""),"important"):t[o]=n}}var co=["Webkit","Moz","ms"],cn={};function Tr(t,e){let n=cn[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return cn[e]=o;o=Je(o);for(let r=0;r<co.length;r++){let s=co[r]+o;if(s in t)return cn[e]=s}return e}var J=t=>po(B(t)),po=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(x(t))return t.map(J);if(X(t)){let o=new Set;for(let r of t.keys())o.add(J(r));return o}if(he(t)){let o=new Map;for(let r of t)o.set(J(r[0]),J(r[1]));return o}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=po(B(o[1]),e);return n};var fo={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var lo={onChange:(t,e)=>{_e(t,"value",e[0])}};var te=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let o of t.rt.split(","))e[o]=n[o];return e.ref=fe,e.sref=z,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){it.warning("Registered component's default name is not defined",n);continue}this.fe.set(Je(n.defaultName),n),this.ue.set(Je(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":oo,":":tn,"@":an,[`${e}on`]:an,[`${e}bind`]:tn,[`${e}html`]:zn,[`${e}text`]:fo,[`${e}show`]:so,[`${e}model`]:Gn,":style":fn,[`${e}bind:style`]:fn,":class":nn,[`${e}bind:class`]:nn,":ref":ro,":value":lo,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var St=(t,e)=>{if(!t)return;let o=(e??te.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Er(t,o.pre,s))xr(i,o.text,r,s)},xr=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=uo(c,o);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=uo(c,o);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Er=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of pe(s))r(i)}};return r(t),o},uo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var Cr=9,vr=10,Rr=13,Sr=32,xe=46,wt=44,wr=39,Or=34,Ot=40,Be=41,At=91,Nt=93,ln=63,Ar=59,mo=58,Nr=123,Mt=125,mn=43,Mr=45,ho=96,yo=47,kr=92,go=[2,3],bo=[mn,Mr],Ro={"-":1,"!":1,"~":1,"+":1,new:1},So={"=":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},Pe={"=>":2,...So,"||":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},wo=Object.keys(So),Lr=new Set(wo),kt=new Set;kt.add("=>");wo.forEach(t=>kt.add(t));var Ir=new Set(["$","_"]),To={true:!0,false:!1,null:null},Dr="this";function Oo(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var Ur=Oo(Ro),Hr=Oo(Pe),je="Expected ",Se="Unexpected ",hn="Unclosed ",_r=je+":",xo=je+"expression",Br="missing }",Vr=Se+"object property",Pr=hn+"(",Eo=je+"comma",Co=Se+"token ",jr=Se+"period",un=je+"expression after ",$r="missing unaryOp argument",Fr=hn+"[",qr=je+"exponent (",zr="Variable names cannot start with a number (",Kr=hn+'quote after "';var Ve=t=>t>=48&&t<=57,vo=t=>Pe[t]||0,dn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in Pe)||Ir.has(n)}re(e){return this.U(e)||Ve(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,o){let r=this.st[e];if(!r)return o;let s={node:o},i=a=>{a.call(this,s)};return n===0?r.forEach(i):r.find(i),s.node}y(){let e=this.f,n=this.r,o=this.e;for(;e===Sr||e===Cr||e===vr||e===Rr;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let o=this.f;if(o===Ar||o===wt)this.e++;else{let r=this.A();if(r)n.push(r);else if(this.e<this.r.length){if(o===e)break;throw this.i(Se+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,o=n.substr(e,Hr),r=o.length;for(;r>0;){if(o in Pe&&(!this.U(this.f)||e+o.length<n.length&&!this.re(n.charCodeAt(e+o.length))))return e+=r,this.e=e,o;o=o.substr(0,--r)}return!1}Me(){let e,n,o,r,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(r={value:n,prec:vo(n),right_a:kt.has(n)},i=this.$(),!i)throw this.i(un+n);let f=[s,r,i];for(;n=this.se();){if(o=vo(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:kt.has(n)},c=n;let p=l=>r.right_a&&l.right_a?o>l.prec:o<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(un+c);f.push(r,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,o;if(this.y(),o=this.k(2,1),o)return this.k(3,0,o);let r=this.f;if(Ve(r)||r===xe)return this.gt();if(r===wr||r===Or)o=this.bt();else if(r===At)o=this.xt();else{for(e=this.r.substr(this.e,Ur),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Ro,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i($r);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(r)?(o=this.ie(),o.name in To?o={type:4,value:To[o.name],raw:o.name}:o.name===Dr&&(o={type:5})):r===Ot&&(o=this.Tt())}return o?(o=this.F(o),this.k(3,0,o)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===At||n===Ot||n===ln;){let o;if(n===ln){if(this.r.charCodeAt(this.e+1)!==xe)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===At){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Nt)throw this.i(Fr);this.e++}else n===Ot?e={type:6,arguments:this.ke(Be),callee:e}:(n===xe||o)&&(o&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});o&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Ve(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);Ve(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Ve(this.f);)e+=this.r.charAt(this.e++);if(!Ve(this.r.charCodeAt(this.e-1)))throw this.i(qr+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(zr+e+this.M+")");if(o===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(jr);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,o=this.r.charAt(this.e++),r=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===o){r=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!r)throw this.i(Kr+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Se+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],o=!1,r=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(o=!0,this.e++,e===Be&&r&&r>=n.length)throw this.i(Co+String.fromCharCode(e));break}else if(s===wt){if(this.e++,r++,r!==n.length){if(e===Be)throw this.i(Co+",");if(e===Nt)for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(Eo);{let i=this.A();if(!i||i.type===0)throw this.i(Eo);n.push(i)}}}if(!o)throw this.i(je+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe(Be);if(this.m(Be))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(Pr)}xt(){return this.e++,{type:9,elements:this.ke(Nt)}}lt(e){if(this.m(Nr)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Mt)){this.e++,e.node=this.F({type:10,properties:n});return}let o=this.A();if(!o)break;if(this.y(),o.type===2&&(this.m(wt)||this.m(Mt)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.m(mo)){this.e++;let r=this.A();if(!r)throw this.i(Vr);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.y()}else o&&n.push(o);this.m(wt)&&this.e++}throw this.i(Br)}}ft(e){let n=this.f;if(bo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){this.e+=2;let o=e.node={type:13,operator:n===mn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!o.argument||!go.includes(o.argument.type))throw this.i(Se+o.operator)}}yt(e){if(e.node){let n=this.f;if(bo.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){if(!go.includes(e.node.type))throw this.i(Se+e.node.operator);this.e+=2,e.node={type:13,operator:n===mn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===xe)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(ln)){this.e++;let n=e.node,o=this.A();if(!o)throw this.i(xo);if(this.y(),this.m(mo)){this.e++;let r=this.A();if(!r)throw this.i(xo);if(e.node={type:11,test:n,consequent:o,alternate:r},n.operator&&Pe[n.operator]<=.9){let s=n;for(;s.right.operator&&Pe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(_r)}}it(e){if(this.y(),this.m(Ot)){let n=this.e;if(this.e++,this.y(),this.m(Be)){this.e++;let o=this.se();if(o==="=>"){let r=this.Me();if(!r)throw this.i(un+o);e.node={type:15,params:null,body:r};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Lr.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(ho)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(ho))return;let n={type:19,quasis:[],expressions:[]},o="",r="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:r,cooked:o},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),r="",o="",n.expressions.push(...this.oe(Mt)),!this.m(Mt))throw this.i("unclosed ${")}else if(c==="\\")switch(r+=c,c=this.r.charAt(++this.e),r+=c,c){case"n":o+=`
3
+ `;break;case"r":o+="\r";break;case"t":o+=" ";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;default:o+=c}else o+=c,r+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o?.callee?.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}mt(e){if(!this.m(yo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===yo&&!o){let r=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(At)?o=!0:o&&this.m(Nt)&&(o=!1),this.e+=this.m(kr)?2:1}throw this.i("Unclosed Regex")}},Ao=t=>new dn(t).parse();var Wr={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},Gr={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Lo=t=>{if(!t?.some(ko))return t;let e=[];return t.forEach(n=>ko(n)?e.push(...n):e.push(n)),e},No=(...t)=>Lo(t),yn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},Jr={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(--o),o}return--t[e]}},Qr={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o-1),o}return t[e]--}},Mo={"=":(t,e,n)=>{let o=t[e];return h(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return h(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return h(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return h(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return h(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return h(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return h(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return h(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return h(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return h(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return h(o)?o(o()^n):t[e]^=n}},Lt=(t,e)=>D(t)?t.bind(e):t,gn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,o,r,s){this.u=x(e)?e:[e],this.Ve=n,this.Ie=o,this.De=r,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let o of this.u)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.u[this.u.length-1];if(r==="$parent")return this.u[1];if(r==="$ctx")return[...this.u];if(o&&r in o)return this.O=o[r],Lt(B(o[r]),o);for(let i of this.u)if(r in i)return this.O=i[r],Lt(B(i[r]),i);let s=this.Ve;if(s&&r in s)return this.O=s[r],Lt(B(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this.He(n,o,No,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ae(e,n,o),i=r?.[s];return this.O=i,Lt(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>D(i)?i(...Lo(a)):i,s=this.E(++n,o,r,e.callee,...e.arguments);return this.O=s,s}7(e,n,o){return this.E(n,o,Gr[e.operator],e.argument)}8(e,n,o){let r=Wr[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,n,o),()=>this.g(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.He(++n,o,No,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.g(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,yn(p,o)),f=p=>this._e(a,e.value,n,yn(p,o));if(e.shorthand){let p=e.key.name;r[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());r[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;r[p]=s(e.value)&&i(p,n)?()=>f:f()}return r}ae(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,i=e.prefix?Jr:Qr;if(r.type===2){let a=r.name,c=this.Pe(a,o);return Z(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ae(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Pe(i,o);if(Z(a))return;let c=this.g(e.right,n,o);return Mo[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ae(r,n,o),c=this.g(e.right,n,o);return Mo[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return x(r)&&(r.s=Io),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,n,s)}}g(e,n,o){let r=B(this[e.type](e,n,o));return this.Ue=e.type,r}_e(e,n,o,r){let s=this.g(n,o,r);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:o,refs:r}=Xt(()=>this.g(e,-1,n)),s={value:o,refs:r};return this.je()&&(s.ref=this.O),s}E(e,n,o,...r){let s=r.map(i=>i&&this.g(i,e,n));return o(...s)}He(e,n,o,...r){let s=this.Ie;if(!s)return this.E(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,yn(f,n)):this.g(a,e,n)));return o(...i)}},Io=Symbol("s"),ko=t=>t?.s===Io,Do=(t,e,n,o,r,s,i)=>new gn(e,n,o,r,i).eval(t,s);var Uo={},It=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,o=this.u.map(r=>r.components).filter(r=>!!r).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,o,r,s){let i=z([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=Do(d,u,p,n,o,T,r);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Uo[e]??Ao("["+e+"]");Uo[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Ho=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},Xr=(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},Yr=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!Ho(t[n]))return null;let o=n;for(;n<t.length&&Ho(t[n]);)++n;return{start:o,end:n}},_o=new Set(["table","thead","tbody","tfoot"]),Zr=new Set(["thead","tbody","tfoot"]),es=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Dt=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=Xr(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=Yr(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=o[o.length-1];m?(o.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),_o.has(m.effectiveTag)&&--r):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=o[o.length-1],u=null;if(r===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):Zr.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=es.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;o.push({replacementHost:u,effectiveTag:m}),_o.has(m)&&++r}e=i+1}return n.join("")};var ts="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",ns=new Set(ts.toUpperCase().split(",")),os="http://www.w3.org/2000/svg",Bo=(t,e)=>{re(t)?t.content.appendChild(e):t.appendChild(e)},bn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&ns.has(r.toUpperCase())?document.createElementNS(os,r.toLowerCase()):document.createElement(r),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,o),l)}let c=t.c;if(c)for(let f of c)bn(f,i,n,o);Bo(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)Bo(e,i);else throw new Error("unsupported node type.")}},$e=(t,e,n)=>{n??=te.getDefault();let o=document.createDocumentFragment();if(!x(t))return bn(t,o,!!e,n),o;for(let r of t)bn(r,o,!!e,n);return o};var rs=(t,e={selector:"#app"},n)=>{U(e)&&(e={selector:"#app",template:e}),Dn(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!ve(o))throw I(0);n||(n=te.getDefault());let r=()=>{for(let a of[...o.childNodes])j(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Dt(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=$e(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&St(o,n),new Tn(t,o,n).T(),H(o,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{j(o)},unbind:()=>{ae(o)}}},Tn=class{Et;Fe;o;h;p;constructor(e,n,o){this.Et=e,this.Fe=n,this.o=o,this.h=new It([e],o),this.p=new Ct(this.h)}T(){this.p.H(this.Fe)}};var et=t=>{if(x(t))return t.map(r=>et(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=pe(t);return o.length>0&&(e.c=[...o].map(r=>et(r))),e};var ss=(t,e={})=>{x(e)&&(e={props:e}),U(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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Dt(t.template));t.element=s}else t.json&&(t.element=$e(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&St(t.element,e.config??te.getDefault());let r=t.element;if(!o&&((t.isSVG??(Ge(r)&&r.hasAttribute?.("isSVG")))||Ge(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=et(i);t.element=$e(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var is=t=>{Ee()?.onMounted.push(t)};var as=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=cs(t,n),e(...r))};return o[W]=1,Te(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},cs=(t,e)=>{let n=e.ref??z(null);e.ref=n,e.isStopped=!1;let o=0,r=Ue(()=>{if(o>0){r(),e.isStopped=!0,F(n);return}n(t()),++o});return n.stop=r,n};var ps=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=fs(t,e,n),o(...s))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},fs=(t,e,n)=>{let o=n.ref??z(null);n.ref=o,n.isStopped=!1;let r=0,s=a=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(...t.map(c=>c()))),++r},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),o.stop=()=>{i.forEach(a=>{a()})},o};var ls=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=us(t,e,n),o(...s))};return r[W]=1,Te(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},us=(t,e,n)=>{let o=n.ref??z(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=w(t,s=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(s)),++r},!0),o};var ms=t=>(t[ct]=1,t);var ds=(t,e)=>{if(!e)throw I(5);let o=De(t)?fe:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=Ue(r);return K(i,!0),t};var Vo=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},hs=Vo;var ys=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(w(i,r));n&&r();let s=()=>{for(let i of o)i()};return K(s,!0),s};var gs=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var bs=t=>{Po();try{t()}finally{jo()}},Po=()=>{se.stack||(se.stack=[]),se.stack.push(new Set)},jo=()=>{let t=se.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 se.stack;for(let n of e)try{F(n)}catch(o){console.error(o)}};export{Ke as ComponentHead,te as RegorConfig,H as addUnbinder,bs as batch,Xt as collectRefs,ps as computeMany,ls as computeRef,as as computed,rs as createApp,ss as createComponent,jo as endBatch,Qe as entangle,J as flatten,Ce as getBindData,Vo as html,De as isDeepRef,Xe as isRaw,h as isRef,ms as markRaw,w as observe,ys as observeMany,gs as observerCount,is as onMounted,K as onUnmounted,on as pause,ds as persist,hs as raw,fe as ref,j as removeNode,rn as resume,Qt as silence,z as sref,Po as startBatch,$e as toFragment,et as toJsonTemplate,F as trigger,ae as unbind,B as unref,Jt as useScope,it as warningHandler,Ue as watchEffect};
@@ -1,4 +1,4 @@
1
- "use strict";var Regor=(()=>{var Ft=Object.defineProperty;var eo=Object.getOwnPropertyDescriptor;var to=Object.getOwnPropertyNames;var no=Object.prototype.hasOwnProperty;var ro=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},oo=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of to(e))!no.call(t,o)&&o!==n&&Ft(t,o,{get:()=>e[o],enumerable:!(r=eo(e,o))||r.enumerable});return t};var so=t=>oo(Ft({},"__esModule",{value:!0}),t);var ws={};ro(ws,{ComponentHead:()=>Ie,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>Zr,collectRefs:()=>gt,computeMany:()=>Kr,computeRef:()=>Wr,computed:()=>zr,createApp:()=>$r,createComponent:()=>Fr,endBatch:()=>Cn,entangle:()=>Be,flatten:()=>J,getBindData:()=>ge,html:()=>xn,isDeepRef:()=>Se,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Gr,observe:()=>w,observeMany:()=>Xr,observerCount:()=>Yr,onMounted:()=>qr,onUnmounted:()=>K,pause:()=>At,persist:()=>Jr,raw:()=>Qr,ref:()=>ae,removeNode:()=>V,resume:()=>Nt,silence:()=>yt,sref:()=>q,startBatch:()=>vn,toFragment:()=>Ae,toJsonTemplate:()=>Ke,trigger:()=>F,unbind:()=>re,unref:()=>B,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>we});var Le=Symbol(":regor");var re=t=>{let e=[t];for(;e.length>0;){let n=e.shift();io(n);let r=n.childNodes;if(r)for(let o of r)e.push(o)}},io=t=>{let e=t[Le];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Le]}};var V=t=>{t.remove(),setTimeout(()=>re(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),ao=Object.prototype.toString,qt=t=>ao.call(t),he=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Je=t=>typeof t=="symbol",E=Array.isArray,A=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var st=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},ve=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=ve();return t&&Wt(t),st.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let r=ve();if(n===r)return;r.onMounted.length>0&&n.onMounted.push(...r.onMounted),r.onUnmounted.length>0&&n.onUnmounted.push(...r.onUnmounted);return}e[Kt]=ve()},it=t=>t[Kt];var ye=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ie=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,r,o,s){this.props=e,this.pe=n,this.ctx=r,this.start=o,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let r of this.ctx)ye(r)}};var ge=t=>{let e=t[Le];if(e)return e;let n={unbinders:[],data:{}};return t[Le]=n,n};var D=(t,e)=>{ge(t).unbinders.push(e)};var Mn={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,r)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[r]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},L=(t,...e)=>{let n=Mn[t],r=U(n)?n.call(Mn,...e):n,o=Qe.warning;o&&(H(r)?o(r):o(r,...r.args))},Qe={warning:console.warn};var K=(t,e)=>{ve(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let o=t(void 0,void 0,0,e);return K(o,!0),o};var ft={},pt={},kn=1,Ln=t=>{let e=(kn++).toString();return ft[e]=t,pt[e]=0,e},Gt=t=>{pt[t]+=1},Jt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},In=t=>ft[t],Qt=()=>kn!==1&&Object.keys(ft).length>0,Xe="r-switch",co=t=>{let e=t.filter(r=>Ce(r)).map(r=>[...r.querySelectorAll("[r-switch]")].map(o=>o.getAttribute(Xe))),n=new Set;return e.forEach(r=>{r.forEach(o=>o&&n.add(o))}),[...n]},De=(t,e)=>{if(!Qt())return;let n=co(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,r)=>{let o=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,r),o.push(i)}Te(e,o)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=He(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(e,n){let r=e.parentElement;for(;r!==null&&r!==document.documentElement;){if(r.hasAttribute(n))return!0;r=r.parentElement}return!1}N(e){let n=e.hasAttribute(this.B),r=be(e,this.K);for(let o of r)this.T(o);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,be(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,r){let o=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${r??""}`);s.insertBefore(i,e),De(i,o),o.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${r??""}`);return s.insertBefore(a,i.nextSibling),{nodes:o,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let r=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(o,this.p,s,a)},unmount:()=>{pe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let o=e.getAttribute(this.W);if(!o)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${o} `),f=this.p.h.C(o),p=f.value,l=this.ce(r,n),g=[];D(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{pe(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let r=e.nextElementSibling,{nodes:o,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(Xt(o,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{pe(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(r,d),m=[];D(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var Ue=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let r=n?.tagName;return r!=="SCRIPT"&&r!=="STYLE"})},Te=(t,e)=>{for(let n of e)Un(n)||t.H(n)},be=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,Ce=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,fe=t=>se(t)?t.content.childNodes:t.childNodes,pe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let r=n.nextSibling;V(n),n=r}},Ee=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},He=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},po=/-(\w)/g,_=Zt(t=>t&&t.replace(po,(e,n)=>n?n.toUpperCase():"")),fo=/\B([A-Z])/g,_e=Zt(t=>t&&t.replace(fo,"-$1").toLowerCase()),Ze=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),ht=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>ye(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>A(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let r=e.value(),o=e.context,s=r[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=o[a];f!==c&&(h(f)?f(c):o[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),r=e.context,o=n[0];if(!A(o))return()=>{};for(let s of Object.entries(o)){let i=s[0],a=s[1],c=r[i];c!==a&&(h(c)?c(a):r[i]=a)}return()=>{}}};var Be=(t,e)=>{if(t===e)return()=>{};let n=w(t,o=>e(o)),r=w(e,o=>t(o));return e(t()),()=>{n(),r()}};var Ve=t=>!!t&&t[ct]===1;var Se=t=>t?.[at]===1;var te=[],jn=t=>{te.length!==0&&te[te.length-1]?.add(t)},we=t=>{if(!t)return()=>{};let e={stop:()=>{}};return lo(t,e),K(()=>e.stop(),!0),e.stop},lo=(t,e)=>{if(!t)return;let n=[],r=!1,o=()=>{for(let s of n)s();n=[],r=!0};e.stop=o;try{let s=new Set;if(te.push(s),t(i=>n.push(i)),r)return;for(let i of[...s]){let a=w(i,()=>{o(),we(t)});n.push(a)}}finally{te.pop()}},yt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},gt=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var F=(t,e,n)=>{if(!h(t))return;let r=t;if(r(void 0,e,1),!n)return;let o=r();if(o){if(E(o)||X(o))for(let s of o)F(s,e,!0);else if(he(o))for(let s of o)F(s[0],e,!0),F(s[1],e,!0);if(A(o))for(let s in o)F(o[s],e,!0)}};function uo(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Pe=(t,e,n)=>{n.forEach(function(r){let o=t[r];uo(e,r,function(...i){let a=o.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var $n=Array.prototype,tn=Object.create($n),mo=["push","pop","shift","unshift","splice","sort","reverse"];Pe($n,tn,mo);var Fn=Map.prototype,Tt=Object.create(Fn),ho=["set","clear","delete"];bt(Tt,"Map");Pe(Fn,Tt,ho);var qn=Set.prototype,Et=Object.create(qn),yo=["add","clear","delete"];bt(Et,"Set");Pe(qn,Et,yo);var ie={},q=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:E(c)?(Object.setPrototypeOf(c,tn),!0):X(c)?(Object.setPrototypeOf(c,Et),!0):he(c)?(Object.setPrototypeOf(c,Tt),!0):!1:!1,r=n(t),o=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}o.size!==0&&yt(()=>{for(let p of[...o.keys()])o.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(jn(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{o.delete(g)};return o.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return o.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,Ee(a,!1),r&&i(t),a};var ae=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,E(t)){let n=t.length;for(let r=0;r<n;++r){let o=t[r];Se(o)||(t[r]=ae(o))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let r=n[1];if(Se(r))continue;let o=n[0];Je(o)||(t[o]=null,t[o]=ae(r))}return e};var zn=Symbol("modelBridge"),go=t=>!!t?.[zn],bo=t=>{t[zn]=1},To=t=>{let e=ae(t());return bo(e),e},Kn={collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(!r)return()=>{};let i=_(r),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Be(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(go(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=To(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var xt=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,r=n.h,o=n.o.fe,s=n.o.ue,i=r.me(),a=r.ze(),c=[...o.keys(),...a,...[...o.keys()].map(_e),...a.map(_e)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let We=n.o.l.props,Ge=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(y,S)=>{let x={},j=y.hasAttribute(We),z=y.hasAttribute(Ge);return r.v(S,()=>{r.S(x),j&&n.T(Vn,y,We),z&&n.T(Pn,y,Ge);let v=T.props;if(!v||v.length===0)return;v=v.map(_);let G=new Map(v.map(Q=>[Q.toLowerCase(),Q]));for(let Q of v.concat(v.map(_e))){let ce=y.getAttribute(Q);ce!==null&&(x[_(Q)]=ce,y.removeAttribute(Q))}let jt=n.J.de(y,!1);for(let[Q,ce]of jt.entries()){let[$t,Rn]=ce.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(Kn,y,Q,!0,Sn,ce.X))}}),x},me=[...r.V()],rt=()=>{let y=nt(l,me),S=new Ie(y,l,me,N,Ne),x=ht(()=>T.context(S)??{}).context;if(S.autoProps){for(let[j,z]of Object.entries(y))if(j in x){let v=x[j];if(v===z)continue;S.entangle&&h(v)&&h(z)&&D(N,Be(z,v))}else x[j]=z;S.onAutoPropsAssigned?.()}return{componentCtx:x,head:S}},{componentCtx:de,head:ot}=rt(),O=[...fe(b)],C=O.length,k=l.childNodes.length===0,P=y=>{let S=y.parentElement;if(k){for(let v of[...y.childNodes])S.insertBefore(v,y);return}let x=y.name;$(x)&&(x=y.getAttributeNames().filter(v=>v.startsWith("#"))[0],$(x)?x="default":x=x.substring(1));let j=l.querySelector(`template[name='${x}'], template[\\#${x}]`);!j&&x==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(v=>v.startsWith("#")).length>0&&(j=null));let z=v=>{ot.enableSwitch&&r.v(me,()=>{r.S(de);let G=nt(y,r.V());r.v(me,()=>{r.S(G);let jt=r.V(),Q=Ln(jt);for(let ce of v)Ce(ce)&&(ce.setAttribute(Xe,Q),Gt(Q),D(ce,()=>{Jt(Q)}))})})};if(j){let v=[...fe(j)];for(let G of v)S.insertBefore(G,y);z(v)}else{if(x!=="default"){for(let G of[...fe(y)])S.insertBefore(G,y);return}let v=[...fe(l)].filter(G=>!se(G));for(let G of v)S.insertBefore(G,y);z(v)}},R=y=>{if(!Ce(y))return;let S=y.querySelectorAll("slot");if(Hn(y)){P(y),y.remove();return}for(let x of S)P(x),x.remove()};(()=>{for(let y=0;y<C;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(Ne,d);let Me=()=>{if(!T.inheritAttrs)return;let y=O.filter(x=>x.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(x=>x.hasAttribute(this.le)));let S=y[0];if(S)for(let x of l.getAttributeNames()){if(x===We||x===Ge)continue;let j=l.getAttribute(x);if(x==="class")S.classList.add(...j.split(" "));else if(x==="style"){let z=S.style,v=l.style;for(let G of v)z.setProperty(G,v.getPropertyValue(G))}else S.setAttribute(ut(x,n.o),j)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},ke=()=>{Me(),ne(),r.S(de),n.ye(l,!1),de.$emit=ot.emit,Te(n,O),D(l,()=>{ye(de)}),D(N,()=>{re(l)}),dt(de)};r.v(me,ke)}}};var nn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let r=e.indexOf("."),o=this.Q=(r<0?e:e.substring(0,r)).split(/[:@]/);if($(o[0])&&(o[0]=n?".":e[0]),r>=0){let s=this.X=e.slice(r+1).split(".");if(s.includes("camel")){let i=o.length-1;o[i]=_(o[i])}s.includes("prop")&&(o[0]=".")}}},vt=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let r=new Map;if(!Ye(e))return r;let o=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>o.some(p=>f.startsWith(p)));for(let f of c)r.has(f)||r.set(f,new nn(f)),r.get(f).ge.push(a)};if(s(e),!n)return r;let i=e.querySelectorAll("*");for(let a of i)s(a);return r}};var Eo=(t,e)=>{for(let n of t){let r=n.cloneNode(!0);e.appendChild(r)}},Ct=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),r=be(e,this.xe);for(let o of r)this.T(o);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let r=n.slice(2).trim().toLowerCase();if(!r)return;let o=e.parentNode;if(!o)return;let s=document.createElement(r);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);o.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let r=Ue(e),o=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);o.insertBefore(s,e),De(s,r),r.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return o.insertBefore(i,s.nextSibling),{nodes:r,parent:o,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:r,parent:o,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=se(e)?r:[...r[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!H(b)||$(b)){pe(s,i);return}if(l.name===b)return;pe(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));Eo(g,M),o.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];D(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var et=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let r=this.w;for(let o=e;o<r;++o)this.R[o].order=o+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let r=e;r<n;++r)this.R[r].order=r}Re(e){let n=this.w;for(let r=e;r<n;++r)this.ee(r);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var rn=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=He(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),r=be(e,this.ne);for(let o of r)this.Xe(o);return n}G(e){return e[rn]?!0:(e[rn]=!0,be(e,this.ne).forEach(n=>n[rn]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ee(e)?[]:(U(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(r=>({*[Symbol.iterator](){for(let o=1;o<=r;o++)yield o}}))(e):Object.entries(e))}Ye(e,n){let r=this.Ze(n);if(!r?.list){L(1,this.b,n,e);return}let o=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(o)??e.getAttribute(s);e.removeAttribute(o),e.removeAttribute(s);let a=i?C=>B(B(C)?.[i]):C=>C,c=(C,k)=>a(C)===a(k),f=Ue(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),De(g,f),f.forEach(C=>{V(C)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(C,k,P)=>{let R=r.createContext(k,C),Z=et.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Me=d.parentNode??g.parentNode;if(!Me)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=P.previousSibling,ke=[];for(let y of f){let S=y.cloneNode(!0);Me.insertBefore(S,P),ke.push(S)}for(Te(u,ke),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(C,k)=>{let P=O.D(C).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);O.te(C,b(C,k,R))},N=(C,k)=>{O.S(b(C,k,d))},Ne=C=>{for(let k of O.D(C).items)V(k)},We=C=>{let k=O.w;for(let P=C;P<k;++P)O.D(P).index(P)},Ge=C=>{let k=O.w;U(C)&&(C=C());let P=B(C[0]);if(E(P)&&P.length===0){pe(g,d),O.Re(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,Me=k,ne=this.p.o.forGrowThreshold,ke=()=>O.w<Me+ne;for(let S of this.Ee(C[0])){let x=()=>{if(R<k){let j=O.D(R++);if(c(j.value,S))return;let z=O.Qe(a(S));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),O.Te(R),--k,z>R+1)for(let v=R;v<z-1&&v<k&&!c(O.D(R).value,S);)++v,Ne(R),O.Te(R),--k;x();return}ke()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,S)}else N(R++,S)};x()}let y=R;for(k=O.w;R<k;)Ne(R++);O.Re(y),We(Z)},Pt=()=>{de=w(rt,Ge)},nt=()=>{me.stop(),de()},me=m.C(r.list),rt=me.value,de,ot=0,O=new et(a);for(let C of this.Ee(rt()[0]))O.S(b(ot++,C,d));D(g,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let r=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),o=r.length>1?r.length-1:-1,s=o!==-1&&(r[o]==="index"||r[o]?.startsWith("#"))?r[o]:"";s&&r.splice(o,1);let i=n[3];if(!i||r.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&r.length===1)p[r[0]]=c;else if(E(l)){let d=0;for(let u of r)p[u]=l[d++]}else for(let d of r)p[d]=l[d];let g={ctx:p,index:q(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),g}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new lt(this),this.Se=new Ct(this),this.we=new xt(this),this.J=new vt(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let r of n){if(r.hasAttribute(this.x))continue;let o=r.parentNode;if(!o)continue;let s=r.nextSibling;if(r.remove(),!r.content)continue;let i=[...r.content.childNodes];for(let a of i)o.insertBefore(a,s);Te(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let r=this.J.de(e,n),o=this.o.j;for(let[s,i]of r.entries()){let[a,c]=i.Q,f=o[s]??o[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,r,o,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(r);n.removeAttribute(r);let c=f=>{let p=f.getAttribute(Xe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,r){if(e!==mt)return!1;if($(r))return!0;let o=document.querySelector(r);if(o){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${r}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),o.appendChild(n)}return!0}L(e,n,r,o,s){if(n.nodeType!==Node.ELEMENT_NODE||r==null||this.nt(e,n,r))return;let i=this.h.C(r,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=_n(o,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=o,o),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,r,o,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Wn="http://www.w3.org/1999/xlink",xo={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 vo(t){return!!t||t===""}var on={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),wt(t,r,e[0],o);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;wt(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,r)=>{if(r&&r!==e&&t.removeAttribute(r),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Wn,e.slice(6,e.length)):t.setAttributeNS(Wn,e,n);return}let o=e in xo;ee(n)||o&&!vo(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)};var sn={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)Gn(t,s[c],i?.[c])}else Gn(t,s,i)}}},Gn=(t,e,n)=>{let r=t.classList,o=H(e),s=H(n);if(e&&!o){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&r.remove(i);for(let i in e)e[i]&&r.add(i)}else o?n!==e&&(s&&r.remove(...n.trim().split(/\s+/)),r.add(...e.trim().split(/\s+/))):n&&s&&r.remove(...n.trim().split(/\s+/))};var Jn={onChange:(t,e)=>{let[n,r]=e;U(r)?r(t,n):t.innerHTML=n?.toString()}};function Co(t,e){if(t.length!==e.length)return!1;let n=!0;for(let r=0;n&&r<t.length;r++)n=le(t[r],e[r]);return n}function le(t,e){if(t===e)return!0;let n=zt(t),r=zt(e);if(n||r)return n&&r?t.getTime()===e.getTime():!1;if(n=Je(t),r=Je(e),n||r)return t===e;if(n=E(t),r=E(e),n||r)return n&&r?Co(t,e):!1;if(n=A(t),r=A(e),n||r){if(!n||!r)return!1;let o=Object.keys(t).length,s=Object.keys(e).length;if(o!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>le(n,e))}var Qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Yn={onChange:(t,e)=>{Ro(t,e[0])},onBind:(t,e,n,r,o,s)=>So(t,e,s)},Ro=(t,e)=>{let n=nr(t);if(n&&Zn(t))E(e)?e=Ot(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=ko(t,e),t.checked=e;else if(n&&er(t))t.checked=le(e,ue(t));else if(n||rr(t))tr(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(or(t)){let r=t.options,o=r.length,s=t.multiple;for(let i=0;i<o;i++){let a=r[i],c=ue(a);if(s)E(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(h(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Zn=t=>t.type==="checkbox",er=t=>t.type==="radio",tr=t=>t.type==="number"||t.type==="range",nr=t=>t.tagName==="INPUT",rr=t=>t.tagName==="TEXTAREA",or=t=>t.tagName==="SELECT",So=(t,e,n)=>{let r=e.value,o=tt(n?.join(",")),s=tt(r()[1]),i={int:o.int||s.int,lazy:o.lazy||s.lazy,number:o.number||s.number,trim:o.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=nr(t);return c&&Zn(t)?Oo(t,a):c&&er(t)?Lo(t,a):c||rr(t)?wo(t,i,a,r):or(t)?Io(t,a,r):(L(7,t),()=>{})},Xn=/[.,' ·٫]/,wo=(t,e,n,r)=>{let s=e.lazy?"change":"input",i=tr(t),a=()=>{!e.trim&&!tt(r()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=tt(r()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Xn.test(m[m.length-1])&&m.split(Xn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},Oo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(E(c)){let f=Ot(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(Mo(t,a))};return t.addEventListener(n,o),r},ue=t=>"_value"in t?t._value:t.value,sr="trueValue",Ao="falseValue",ir="true-value",No="false-value",Mo=(t,e)=>{let n=e?sr:Ao;if(n in t)return t[n];let r=e?ir:No;return t.hasAttribute(r)?t.getAttribute(r):e},ko=(t,e)=>{if(sr in t)return le(e,t.trueValue);let r=ir;return t.hasAttribute(r)?le(e,t.getAttribute(r)):le(e,!0)},Lo=(t,e)=>{let n="change",r=()=>{t.removeEventListener(n,o)},o=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,o),r},Io=(t,e,n)=>{let r="change",o=()=>{t.removeEventListener(r,s)},s=()=>{let i=e();if(!i)return;let c=tt(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Qn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(At(i),X(p)){p.clear();for(let l of f)p.add(l)}else E(p)?(p.splice(0),p.push(...f)):i(f)}finally{Nt(i),F(i)}}else i(f[0])};return t.addEventListener(r,s),o};var Do=["stop","prevent","capture","self","once","left","right","middle","passive"],Uo=t=>{let e={};if($(t))return;let n=t.split(",");for(let r of Do)e[r]=n.includes(r);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,r,o,s)=>{if(o){let p=e.value(),l=B(o.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(r){let p=e.value();return an(t,_(r),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return U(T)&&(T=T()),T=T[d],U(T)&&(T=T()),T},m=l[d+"_flags"];i.push(an(t,d,u,m))}else L(2,name,t)}return a}},Ho=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let r=n[1],o=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(o&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return r?[t,f=>c(f)?f.key.toUpperCase()===r.toUpperCase():!1]:[t,c]}return[t,n=>!0]},an=(t,e,n,r)=>{if($(e))return L(5,name,t),()=>{};let o=Uo(r),s=o?{capture:o.capture,passive:o.passive,once:o.once}:void 0,i;[e,i]=Ho(e,r);let a=p=>{if(!i(p)||!n&&e==="submit"&&o?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!o){a(p);return}try{if(o.left&&p.button!==0||o.middle&&p.button!==1||o.right&&p.button!==2||o.self&&p.target!==t)return;o.stop&&p.stopPropagation(),o.prevent&&p.preventDefault(),a(p)}finally{o.once&&c()}};return t.addEventListener(e,f,s),c};var ar={onChange:(t,e,n,r,o,s)=>{if(r){s&&s.includes("camel")&&(r=_(r)),je(t,r,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(E(c)){let f=c[0],p=c[1];je(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];je(t,p,l)}else{let f=e[a++],p=e[a];je(t,f,p)}}}};function _o(t){return!!t||t===""}var je=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(re),1),t[e]=n??"";return}let r=t.tagName;if(e==="value"&&r!=="PROGRESS"&&!r.includes("-")){t._value=n;let s=r==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let o=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=_o(n):n==null&&s==="string"?(n="",o=!0):s==="number"&&(n=0,o=!0)}try{t[e]=n}catch(s){o||L(4,e,r,n,s)}o&&t.removeAttribute(e)};var cr={once:!0,onBind:(t,e,n)=>{let r=e.value()[0],o=E(r),s=e.refs[0];return o?r.push(t):s?s?.(t):e.context[n]=t,()=>{if(o){let i=r.indexOf(t);i!==-1&&r.splice(i,1)}else s?.(null)}}};var pr={onChange:(t,e)=>{let n=ge(t).data,r=n._ord;wn(r)&&(r=n._ord=t.style.display),!!e[0]?t.style.display=r:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let r=e.length;for(let o=0;o<r;++o){let s=e[o],i=n?.[o];if(E(s)){let a=s.length;for(let c=0;c<a;++c)fr(t,s[c],i?.[c])}else fr(t,s,i)}}},fr=(t,e,n)=>{let r=t.style,o=H(e);if(e&&!o){if(n&&!H(n))for(let s in n)e[s]==null&&fn(r,s,"");for(let s in e)fn(r,s,e[s])}else{let s=r.display;if(o?n!==e&&(r.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;r.display=s}},lr=/\s*!important$/;function fn(t,e,n){if(E(n))n.forEach(r=>{fn(t,e,r)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let r=Bo(t,e);lr.test(n)?t.setProperty(_e(r),n.replace(lr,""),"important"):t[r]=n}}var ur=["Webkit","Moz","ms"],pn={};function Bo(t,e){let n=pn[e];if(n)return n;let r=_(e);if(r!=="filter"&&r in t)return pn[e]=r;r=Ze(r);for(let o=0;o<ur.length;o++){let s=ur[o]+r;if(s in t)return pn[e]=s}return e}var J=t=>mr(B(t)),mr=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(E(t))return t.map(J);if(X(t)){let r=new Set;for(let o of t.keys())r.add(J(o));return r}if(he(t)){let r=new Map;for(let o of t)r.set(J(o[0]),J(o[1]));return r}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let r of Object.entries(n))n[r[0]]=mr(B(r[1]),e);return n};var dr={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var hr={onChange:(t,e)=>{je(t,"value",e[0])}};var Y=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let r of t.rt.split(","))e[r]=n[r];return e.ref=ae,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ar,":":on,"@":cn,[`${e}on`]:cn,[`${e}bind`]:on,[`${e}html`]:Jn,[`${e}text`]:dr,[`${e}show`]:pr,[`${e}model`]:Yn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":cr,":value":hr,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let r=(e??Y.getDefault()).l,o=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Po(t,r.pre,s))Vo(i,r.text,o,s)},Vo=(t,e,n,r)=>{let o=t.textContent;if(!o)return;let s=n,i=o.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=yr(c,r);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=yr(c,r);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Po=(t,e,n)=>{let r=[],o=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&r.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of fe(s))o(i)}};return o(t),r},yr=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var jo=9,$o=10,Fo=13,qo=32,xe=46,kt=44,zo=39,Ko=34,Lt=40,$e=41,It=91,Dt=93,un=63,Wo=59,gr=58,Go=123,Ut=125,dn=43,Jo=45,br=96,Tr=47,Qo=92,Er=[2,3],xr=[dn,Jo],Or={"-":1,"!":1,"~":1,"+":1,new:1},Ar={"=":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},qe={"=>":2,...Ar,"||":3,"??":3,"&&":4,"|":5,"^":6,"&":7,"==":8,"!=":8,"===":8,"!==":8,"<":9,">":9,"<=":9,">=":9,in:9,"<<":10,">>":10,">>>":10,"+":11,"-":11,"*":12,"/":12,"%":12,"**":13},Nr=Object.keys(Ar),Xo=new Set(Nr),Ht=new Set;Ht.add("=>");Nr.forEach(t=>Ht.add(t));var Yo=new Set(["$","_"]),vr={true:!0,false:!1,null:null},Zo="this";function Mr(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var es=Mr(Or),ts=Mr(qe),ze="Expected ",Oe="Unexpected ",yn="Unclosed ",ns=ze+":",Cr=ze+"expression",rs="missing }",os=Oe+"object property",ss=yn+"(",Rr=ze+"comma",Sr=Oe+"token ",is=Oe+"period",mn=ze+"expression after ",as="missing unaryOp argument",cs=yn+"[",ps=ze+"exponent (",fs="Variable names cannot start with a number (",ls=yn+'quote after "';var Fe=t=>t>=48&&t<=57,wr=t=>qe[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in qe)||Yo.has(n)}re(e){return this.U(e)||Fe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,r){let o=this.st[e];if(!o)return r;let s={node:r},i=a=>{a.call(this,s)};return n===0?o.forEach(i):o.find(i),s.node}y(){let e=this.f,n=this.r,r=this.e;for(;e===qo||e===jo||e===$o||e===Fo;)e=n.charCodeAt(++r);this.e=r}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let r=this.f;if(r===Wo||r===kt)this.e++;else{let o=this.A();if(o)n.push(o);else if(this.e<this.r.length){if(r===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,r=n.substr(e,ts),o=r.length;for(;o>0;){if(r in qe&&(!this.U(this.f)||e+r.length<n.length&&!this.re(n.charCodeAt(e+r.length))))return e+=o,this.e=e,r;r=r.substr(0,--o)}return!1}Me(){let e,n,r,o,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(o={value:n,prec:wr(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,o,i];for(;n=this.se();){if(r=wr(n),r===0){this.e-=n.length;break}o={value:n,prec:r,right_a:Ht.has(n)},c=n;let p=l=>o.right_a&&l.right_a?r>l.prec:r<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(o,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,r;if(this.y(),r=this.k(2,1),r)return this.k(3,0,r);let o=this.f;if(Fe(o)||o===xe)return this.gt();if(o===zo||o===Ko)r=this.bt();else if(o===It)r=this.xt();else{for(e=this.r.substr(this.e,es),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Or,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(as);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(o)?(r=this.ie(),r.name in vr?r={type:4,value:vr[r.name],raw:r.name}:r.name===Zo&&(r={type:5})):o===Lt&&(r=this.Tt())}return r?(r=this.F(r),this.k(3,0,r)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===xe||n===It||n===Lt||n===un;){let r;if(n===un){if(this.r.charCodeAt(this.e+1)!==xe)break;r=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Dt)throw this.i(cs);this.e++}else n===Lt?e={type:6,arguments:this.ke($e),callee:e}:(n===xe||r)&&(r&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});r&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Fe(this.f);)e+=this.r.charAt(this.e++);if(this.m(xe))for(e+=this.r.charAt(this.e++);Fe(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Fe(this.f);)e+=this.r.charAt(this.e++);if(!Fe(this.r.charCodeAt(this.e-1)))throw this.i(ps+e+this.M+")")}let r=this.f;if(this.U(r))throw this.i(fs+e+this.M+")");if(r===xe||e.length===1&&e.charCodeAt(0)===xe)throw this.i(is);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,r=this.r.charAt(this.e++),o=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===r){o=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
- `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!o)throw this.i(ls+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],r=!1,o=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(r=!0,this.e++,e===$e&&o&&o>=n.length)throw this.i(Sr+String.fromCharCode(e));break}else if(s===kt){if(this.e++,o++,o!==n.length){if(e===$e)throw this.i(Sr+",");if(e===Dt)for(let i=n.length;i<o;i++)n.push(null)}}else{if(n.length!==o&&o!==0)throw this.i(Rr);{let i=this.A();if(!i||i.type===0)throw this.i(Rr);n.push(i)}}}if(!r)throw this.i(ze+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe($e);if(this.m($e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ss)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(Go)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let r=this.A();if(!r)break;if(this.y(),r.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:r,value:r,shorthand:!0});else if(this.m(gr)){this.e++;let o=this.A();if(!o)throw this.i(os);let s=r.type===9;n.push({type:12,computed:s,key:s?r.elements[0]:r,value:o,shorthand:!1}),this.y()}else r&&n.push(r);this.m(kt)&&this.e++}throw this.i(rs)}}ft(e){let n=this.f;if(xr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){this.e+=2;let r=e.node={type:13,operator:n===dn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!r.argument||!Er.includes(r.argument.type))throw this.i(Oe+r.operator)}}yt(e){if(e.node){let n=this.f;if(xr.some(r=>r===n&&r===this.r.charCodeAt(this.e+1))){if(!Er.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===dn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===xe)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(un)){this.e++;let n=e.node,r=this.A();if(!r)throw this.i(Cr);if(this.y(),this.m(gr)){this.e++;let o=this.A();if(!o)throw this.i(Cr);if(e.node={type:11,test:n,consequent:r,alternate:o},n.operator&&qe[n.operator]<=.9){let s=n;for(;s.right.operator&&qe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ns)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m($e)){this.e++;let r=this.se();if(r==="=>"){let o=this.Me();if(!o)throw this.i(mn+r);e.node={type:15,params:null,body:o};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Xo.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(br)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(br))return;let n={type:19,quasis:[],expressions:[]},r="",o="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:o,cooked:r},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),o="",r="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(o+=c,c=this.r.charAt(++this.e),o+=c,c){case"n":r+=`
3
- `;break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=c}else r+=c,o+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let r=e.node;for(;r.type===3||r.type===6&&r?.callee?.type===3;)r=r.type===3?r.object:r.callee.object;r.type=20}mt(e){if(!this.m(Tr))return;let n=++this.e,r=!1;for(;this.e<this.r.length;){if(this.f===Tr&&!r){let o=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(o,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?r=!0:r&&this.m(Dt)&&(r=!1),this.e+=this.m(Qo)?2:1}throw this.i("Unclosed Regex")}},kr=t=>new hn(t).parse();var us={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},ms={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Ur=t=>{if(!t?.some(Dr))return t;let e=[];return t.forEach(n=>Dr(n)?e.push(...n):e.push(n)),e},Lr=(...t)=>Ur(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ds={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(++r),r}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(--r),r}return--t[e]}},hs={"++":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r+1),r}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let r=n();return n(r-1),r}return t[e]--}},Ir={"=":(t,e,n)=>{let r=t[e];return h(r)?r(n):t[e]=n},"+=":(t,e,n)=>{let r=t[e];return h(r)?r(r()+n):t[e]+=n},"-=":(t,e,n)=>{let r=t[e];return h(r)?r(r()-n):t[e]-=n},"*=":(t,e,n)=>{let r=t[e];return h(r)?r(r()*n):t[e]*=n},"/=":(t,e,n)=>{let r=t[e];return h(r)?r(r()/n):t[e]/=n},"%=":(t,e,n)=>{let r=t[e];return h(r)?r(r()%n):t[e]%=n},"**=":(t,e,n)=>{let r=t[e];return h(r)?r(r()**n):t[e]**=n},"<<=":(t,e,n)=>{let r=t[e];return h(r)?r(r()<<n):t[e]<<=n},">>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let r=t[e];return h(r)?r(r()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let r=t[e];return h(r)?r(r()|n):t[e]|=n},"&=":(t,e,n)=>{let r=t[e];return h(r)?r(r()&n):t[e]&=n},"^=":(t,e,n)=>{let r=t[e];return h(r)?r(r()^n):t[e]^=n}},_t=(t,e)=>U(t)?t.bind(e):t,bn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,r,o,s){this.u=E(e)?e:[e],this.Ve=n,this.Ie=r,this.De=o,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let r of this.u)if(e in r)return r}2(e,n,r){let o=e.name;if(o==="$root")return this.u[this.u.length-1];if(o==="$parent")return this.u[1];if(o==="$ctx")return[...this.u];if(r&&o in r)return this.O=r[o],_t(B(r[o]),r);for(let i of this.u)if(o in i)return this.O=i[o],_t(B(i[o]),i);let s=this.Ve;if(s&&o in s)return this.O=s[o],_t(B(s[o]),s)}5(e,n,r){return this.u[0]}0(e,n,r){return this.He(n,r,Lr,...e.body)}1(e,n,r){return this.E(n,r,(...o)=>o.pop(),...e.expressions)}3(e,n,r){let{obj:o,key:s}=this.ae(e,n,r),i=o?.[s];return this.O=i,_t(B(i),o)}4(e,n,r){return e.value}6(e,n,r){let o=(i,...a)=>U(i)?i(...Ur(a)):i,s=this.E(++n,r,o,e.callee,...e.arguments);return this.O=s,s}7(e,n,r){return this.E(n,r,ms[e.operator],e.argument)}8(e,n,r){let o=us[e.operator];switch(e.operator){case"||":case"&&":case"??":return o(()=>this.g(e.left,n,r),()=>this.g(e.right,n,r))}return this.E(n,r,o,e.left,e.right)}9(e,n,r){return this.He(++n,r,Lr,...e.elements)}10(e,n,r){let o={},s=(...i)=>{i.forEach(a=>{Object.assign(o,a)})};return this.E(++n,r,s,...e.properties),o}11(e,n,r){return this.E(n,r,o=>this.g(o?e.consequent:e.alternate,n,r),e.test)}12(e,n,r){let o={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,gn(p,r)),f=p=>this._e(a,e.value,n,gn(p,r));if(e.shorthand){let p=e.key.name;o[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());o[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;o[p]=s(e.value)&&i(p,n)?()=>f:f()}return o}ae(e,n,r){let o=this.g(e.object,n,r),s=e.computed?this.g(e.property,n,r):e.property.name;return{obj:o,key:s}}13(e,n,r){let o=e.argument,s=e.operator,i=e.prefix?ds:hs;if(o.type===2){let a=o.name,c=this.Pe(a,r);return ee(c)?void 0:i[s](c,a)}if(o.type===3){let{obj:a,key:c}=this.ae(o,n,r);return i[s](a,c)}}16(e,n,r){let o=e.left,s=e.operator;if(o.type===2){let i=o.name,a=this.Pe(i,r);if(ee(a))return;let c=this.g(e.right,n,r);return Ir[s](a,i,c)}if(o.type===3){let{obj:i,key:a}=this.ae(o,n,r),c=this.g(e.right,n,r);return Ir[s](i,a,c)}}14(e,n,r){let o=this.g(e.argument,n,r);return E(o)&&(o.s=Hr),o}17(e,n,r){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,r)}19(e,n,r){let o=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,r,o,...e.expressions)}18(e,n,r){return e.value.cooked}20(e,n,r){let o=(s,...i)=>new s(...i);return this.E(n,r,o,e.callee,...e.arguments)}15(e,n,r){return(...o)=>{let s=Object.create(r??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=o[a++]}return this.g(e.body,n,s)}}g(e,n,r){let o=B(this[e.type](e,n,r));return this.Ue=e.type,o}_e(e,n,r,o){let s=this.g(n,r,o);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:r,refs:o}=gt(()=>this.g(e,-1,n)),s={value:r,refs:o};return this.je()&&(s.ref=this.O),s}E(e,n,r,...o){let s=o.map(i=>i&&this.g(i,e,n));return r(...s)}He(e,n,r,...o){let s=this.Ie;if(!s)return this.E(e,n,r,...o);let i=o.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,gn(f,n)):this.g(a,e,n)));return r(...i)}},Hr=Symbol("s"),Dr=t=>t?.s===Hr,_r=(t,e,n,r,o,s,i)=>new bn(e,n,r,o,i).eval(t,s);var Br={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,r)=>{for(let[o,s]of Object.entries(r))n[o.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,r=this.u.map(o=>o.components).filter(o=>!!o).reverse();for(let o of r)for(let s of Object.keys(o))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,r,o,s){let i=q([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=_r(d,u,p,n,r,T,o);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Br[e]??kr("["+e+"]");Br[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Vr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ys=(t,e)=>{let n="";for(let r=e;r<t.length;++r){let o=t[r];if(n){o===n&&(n="");continue}if(o==='"'||o==="'"){n=o;continue}if(o===">")return r}return-1},gs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
- `);)++n;if(n>=t.length||!Vr(t[n]))return null;let r=n;for(;n<t.length&&Vr(t[n]);)++n;return{start:r,end:n}},Pr=new Set(["table","thead","tbody","tfoot"]),bs=new Set(["thead","tbody","tfoot"]),Ts=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=t=>{let e=0,n=[],r=[],o=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=ys(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=gs(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=r[r.length-1];m?(r.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),Pr.has(m.effectiveTag)&&--o):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=r[r.length-1],u=null;if(o===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):bs.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=Ts.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;r.push({replacementHost:u,effectiveTag:m}),Pr.has(m)&&++o}e=i+1}return n.join("")};var Es="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",xs=new Set(Es.toUpperCase().split(",")),vs="http://www.w3.org/2000/svg",jr=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},Tn=(t,e,n,r)=>{let o=t.t;if(o){let i=n&&xs.has(o.toUpperCase())?document.createElementNS(vs,o.toLowerCase()):document.createElement(o),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,r),l)}let c=t.c;if(c)for(let f of c)Tn(f,i,n,r);jr(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)jr(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let r=document.createDocumentFragment();if(!E(t))return Tn(t,r,!!e,n),r;for(let o of t)Tn(o,r,!!e,n);return r};var $r=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),Bn(t)&&(t=t.context);let r=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!r||!Ce(r))throw I(0);n||(n=Y.getDefault());let o=()=>{for(let a of[...r.childNodes])V(a)},s=a=>{for(let c of a)r.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));o(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);o(),s(a.childNodes)}return n.useInterpolation&&Mt(r,n),new En(t,r,n).T(),D(r,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{V(r)},unbind:()=>{re(r)}}},En=class{Et;Fe;o;h;p;constructor(e,n,r){this.Et=e,this.Fe=n,this.o=r,this.h=new Bt([e],r),this.p=new St(this.h)}T(){this.p.H(this.Fe)}};var Ke=t=>{if(E(t))return t.map(o=>Ke(o));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(o=>[o,t.getAttribute(o)??""])));let r=fe(t);return r.length>0&&(e.c=[...r].map(o=>Ke(o))),e};var Fr=(t,e={})=>{E(e)&&(e={props:e}),H(t)&&(t={template:t});let n=e.context??(()=>({})),r=!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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Vt(t.template));t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),r=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let o=t.element;if(!r&&((t.isSVG??(Ye(o)&&o.hasAttribute?.("isSVG")))||Ye(o)&&o.querySelector("[isSVG]"))){let s=o.content,i=s?[...s.childNodes]:[...o.childNodes],a=Ke(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var qr=t=>{ve()?.onMounted.push(t)};var zr=t=>{let e,n={},r=(...o)=>{if(o.length<=2&&0 in o)throw I(4);return e&&!n.isStopped?e(...o):(e=Cs(t,n),e(...o))};return r[W]=1,Ee(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Cs=(t,e)=>{let n=e.ref??q(null);e.ref=n,e.isStopped=!1;let r=0,o=we(()=>{if(r>0){o(),e.isStopped=!0,F(n);return}n(t()),++r});return n.stop=o,n};var Kr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Rs(t,e,n),r(...s))};return o[W]=1,Ee(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Rs=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0,s=a=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(...t.map(c=>c()))),++o},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),r.stop=()=>{i.forEach(a=>{a()})},r};var Wr=(t,e)=>{let n={},r,o=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return r&&!n.isStopped?r(...s):(r=Ss(t,e,n),r(...s))};return o[W]=1,Ee(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},Ss=(t,e,n)=>{let r=n.ref??q(null);n.ref=r,n.isStopped=!1;let o=0;return r.stop=w(t,s=>{if(o>0){r.stop(),n.isStopped=!0,F(r);return}r(e(s)),++o},!0),r};var Gr=t=>(t[ct]=1,t);var Jr=(t,e)=>{if(!e)throw I(5);let r=Se(t)?ae:a=>a,o=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(r(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),o()}else o();let i=we(o);return K(i,!0),t};var xn=(t,...e)=>{let n="",r=t,o=e,s=r.length,i=o.length;for(let a=0;a<s;++a)n+=r[a],a<i&&(n+=o[a]);return n},Qr=xn;var Xr=(t,e,n)=>{let r=[],o=()=>{e(t.map(i=>i()))};for(let i of t)r.push(w(i,o));n&&o();let s=()=>{for(let i of r)i()};return K(s,!0),s};var Yr=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var Zr=t=>{vn();try{t()}finally{Cn()}},vn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},Cn=()=>{let t=ie.stack;if(!t||t.length===0)return;let e=t.pop();if(t.length){let n=t[t.length-1];for(let r of e)n.add(r);return}delete ie.stack;for(let n of e)try{F(n)}catch(r){console.error(r)}};return so(ws);})();
1
+ "use strict";var Regor=(()=>{var Ft=Object.defineProperty;var tr=Object.getOwnPropertyDescriptor;var nr=Object.getOwnPropertyNames;var or=Object.prototype.hasOwnProperty;var rr=(t,e)=>{for(var n in e)Ft(t,n,{get:e[n],enumerable:!0})},sr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of nr(e))!or.call(t,r)&&r!==n&&Ft(t,r,{get:()=>e[r],enumerable:!(o=tr(e,r))||o.enumerable});return t};var ir=t=>sr(Ft({},"__esModule",{value:!0}),t);var ws={};rr(ws,{ComponentHead:()=>Ie,RegorConfig:()=>Y,addUnbinder:()=>D,batch:()=>er,collectRefs:()=>gt,computeMany:()=>Wo,computeRef:()=>Go,computed:()=>Ko,createApp:()=>Fo,createComponent:()=>qo,endBatch:()=>vn,entangle:()=>Be,flatten:()=>J,getBindData:()=>ge,html:()=>En,isDeepRef:()=>Se,isRaw:()=>Ve,isRef:()=>h,markRaw:()=>Jo,observe:()=>w,observeMany:()=>Yo,observerCount:()=>Zo,onMounted:()=>zo,onUnmounted:()=>K,pause:()=>At,persist:()=>Qo,raw:()=>Xo,ref:()=>ae,removeNode:()=>V,resume:()=>Nt,silence:()=>yt,sref:()=>q,startBatch:()=>Cn,toFragment:()=>Ae,toJsonTemplate:()=>Ke,trigger:()=>F,unbind:()=>oe,unref:()=>B,useScope:()=>ht,warningHandler:()=>Qe,watchEffect:()=>we});var Le=Symbol(":regor");var oe=t=>{let e=[t];for(;e.length>0;){let n=e.shift();ar(n);let o=n.childNodes;if(o)for(let r of o)e.push(r)}},ar=t=>{let e=t[Le];if(e){for(let n of e.unbinders)n();e.unbinders.splice(0),delete t[Le]}};var V=t=>{t.remove(),setTimeout(()=>oe(t),1)};var U=t=>typeof t=="function",H=t=>typeof t=="string",wn=t=>typeof t>"u",ee=t=>t==null||typeof t>"u",$=t=>typeof t!="string"||!t?.trim(),cr=Object.prototype.toString,qt=t=>cr.call(t),he=t=>qt(t)==="[object Map]",X=t=>qt(t)==="[object Set]",zt=t=>qt(t)==="[object Date]",Je=t=>typeof t=="symbol",x=Array.isArray,A=t=>t!==null&&typeof t=="object";var On={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."},I=(t,...e)=>{let n=On[t];return new Error(U(n)?n.call(On,...e):n)};var st=[],An=()=>{let t={onMounted:[],onUnmounted:[]};return st.push(t),t},Ce=t=>{let e=st[st.length-1];if(!e&&!t)throw I(2);return e},Nn=t=>{let e=Ce();return t&&Wt(t),st.pop(),e},Kt=Symbol("csp"),Wt=t=>{let e=t,n=e[Kt];if(n){let o=Ce();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Kt]=Ce()},it=t=>t[Kt];var ye=t=>{it(t)?.onUnmounted?.forEach(n=>{n()}),t.unmounted?.()};var Ie=class{props;start;end;ctx;autoProps=!0;entangle=!0;enableSwitch=!1;onAutoPropsAssigned;pe;constructor(e,n,o,r,s){this.props=e,this.pe=n,this.ctx=o,this.start=r,this.end=s}emit=(e,n)=>{this.pe.dispatchEvent(new CustomEvent(e,{detail:n}))};unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)V(e),e=e.nextSibling;for(let o of this.ctx)ye(o)}};var ge=t=>{let e=t[Le];if(e)return e;let n={unbinders:[],data:{}};return t[Le]=n,n};var D=(t,e)=>{ge(t).unbinders.push(e)};var Mn={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]})},L=(t,...e)=>{let n=Mn[t],o=U(n)?n.call(Mn,...e):n,r=Qe.warning;r&&(H(o)?r(o):r(o,...o.args))},Qe={warning:console.warn};var K=(t,e)=>{Ce(e)?.onUnmounted.push(t)};var at=Symbol("ref"),W=Symbol("sref"),ct=Symbol("raw");var h=t=>t?.[W]===1;var w=(t,e,n)=>{if(!h(t))throw I(3,"observe");n&&e(t());let r=t(void 0,void 0,0,e);return K(r,!0),r};var ft={},pt={},kn=1,Ln=t=>{let e=(kn++).toString();return ft[e]=t,pt[e]=0,e},Gt=t=>{pt[t]+=1},Jt=t=>{--pt[t]===0&&(delete ft[t],delete pt[t])},In=t=>ft[t],Qt=()=>kn!==1&&Object.keys(ft).length>0,Xe="r-switch",pr=t=>{let e=t.filter(o=>ve(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(Xe))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},De=(t,e)=>{if(!Qt())return;let n=pr(e);n.length!==0&&(n.forEach(Gt),D(t,()=>{n.forEach(Jt)}))};var Xt=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Te(e,r)},Yt=Symbol("r-if"),Dn=Symbol("r-else"),Un=t=>t[Dn]===1,lt=class{p;B;K;z;W;b;x;constructor(e){this.p=e,this.B=e.o.l.if,this.K=He(e.o.l.if),this.z=e.o.l.else,this.W=e.o.l.elseif,this.b=e.o.l.for,this.x=e.o.l.pre}qe(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.B),o=be(e,this.K);for(let r of o)this.T(r);return n}G(e){return e[Yt]?!0:(e[Yt]=!0,be(e,this.K).forEach(n=>n[Yt]=!0),!1)}T(e){if(e.hasAttribute(this.x)||this.G(e)||this.qe(e,this.b))return;let n=e.getAttribute(this.B);if(!n){L(0,this.B,e);return}e.removeAttribute(this.B),this.L(e,n)}P(e,n,o){let r=Ue(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o??""}`);s.insertBefore(i,e),De(i,r),r.forEach(c=>{V(c)}),e.remove(),n!=="if"&&(e[Dn]=1);let a=document.createComment(`__end__ :${n}${o??""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}ce(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.z)){e.removeAttribute(this.z);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"else");return[{mount:()=>{Xt(r,this.p,s,a)},unmount:()=>{pe(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.W);if(!r)return[];e.removeAttribute(this.W);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.P(e,"elseif",` => ${r} `),f=this.p.h.C(r),p=f.value,l=this.ce(o,n),g=[];D(a,()=>{f.stop();for(let m of g)m();g.length=0});let u=w(p,n);return g.push(u),[{mount:()=>{Xt(s,this.p,i,c)},unmount:()=>{pe(a,c)},isTrue:()=>!!p()[0],isMounted:!1}].concat(l)}}L(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.P(e,"if",` => ${n} `),c=this.p.h.C(n),f=c.value,p=!1,l=this.p.h,g=l.V(),d=()=>{l.v(g,()=>{if(f()[0])p||(Xt(r,this.p,s,a),p=!0),u.forEach(M=>{M.unmount(),M.isMounted=!1});else{pe(i,a),p=!1;let M=!1;for(let N of u)!M&&N.isTrue()?(N.isMounted||(N.mount(),N.isMounted=!0),M=!0):(N.unmount(),N.isMounted=!1)}})},u=this.ce(o,d),m=[];D(i,()=>{c.stop();for(let M of m)M();m.length=0}),d();let b=w(f,d);m.push(b)}};var Ue=t=>{let e=se(t)?t.content.childNodes:[t];return Array.from(e).filter(n=>{let o=n?.tagName;return o!=="SCRIPT"&&o!=="STYLE"})},Te=(t,e)=>{for(let n of e)Un(n)||t.H(n)},be=(t,e)=>{let n=t.querySelectorAll(e);return t.matches?.(e)?[t,...n]:n},se=t=>t instanceof HTMLTemplateElement,ve=t=>t.nodeType===Node.ELEMENT_NODE,Ye=t=>t.nodeType===Node.ELEMENT_NODE,Hn=t=>t instanceof HTMLSlotElement,fe=t=>se(t)?t.content.childNodes:t.childNodes,pe=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;V(n),n=o}},xe=(t,e)=>{Object.defineProperty(t,"value",{get(){return t()},set(n){if(e)throw new Error("value is readonly.");return t(n)},enumerable:!0,configurable:!1})},_n=(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},He=t=>`[${CSS.escape(t)}]`,ut=(t,e)=>(t.startsWith("@")&&(t=e.l.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.l.dynamic)),t),Zt=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},fr=/-(\w)/g,_=Zt(t=>t&&t.replace(fr,(e,n)=>n?n.toUpperCase():"")),lr=/\B([A-Z])/g,_e=Zt(t=>t&&t.replace(lr,"-$1").toLowerCase()),Ze=Zt(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var mt={};var dt=t=>{it(t)?.onMounted?.forEach(n=>{n()}),t.mounted?.()};var en=Symbol("scope"),ht=t=>{try{An();let e=t();Wt(e);let n={context:e,unmount:()=>ye(e),[en]:1};return n[en]=1,n}finally{Nn()}},Bn=t=>A(t)?en in t:!1;var Vn={collectRefObj:!0,onBind:(t,e)=>w(e.value,()=>{let o=e.value(),r=e.context,s=o[0];if(A(s))for(let i of Object.entries(s)){let a=i[0],c=i[1],f=r[a];f!==c&&(h(f)?f(c):r[a]=c)}},!0)};var Pn={collectRefObj:!0,once:!0,onBind:(t,e)=>{let n=e.value(),o=e.context,r=n[0];if(!A(r))return()=>{};for(let s of Object.entries(r)){let i=s[0],a=s[1],c=o[i];c!==a&&(h(c)?c(a):o[i]=a)}return()=>{}}};var Be=(t,e)=>{if(t===e)return()=>{};let n=w(t,r=>e(r)),o=w(e,r=>t(r));return e(t()),()=>{n(),o()}};var Ve=t=>!!t&&t[ct]===1;var Se=t=>t?.[at]===1;var te=[],jn=t=>{te.length!==0&&te[te.length-1]?.add(t)},we=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ur(t,e),K(()=>e.stop(),!0),e.stop},ur=(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(te.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=w(i,()=>{r(),we(t)});n.push(a)}}finally{te.pop()}},yt=t=>{let e=te.length,n=e>0&&te[e-1];try{return n&&te.push(null),t()}finally{n&&te.pop()}},gt=t=>{try{let e=new Set;return te.push(e),{value:t(),refs:[...e]}}finally{te.pop()}};var F=(t,e,n)=>{if(!h(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(x(r)||X(r))for(let s of r)F(s,e,!0);else if(he(r))for(let s of r)F(s[0],e,!0),F(s[1],e,!0);if(A(r))for(let s in r)F(r[s],e,!0)}};function mr(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var Pe=(t,e,n)=>{n.forEach(function(o){let r=t[o];mr(e,o,function(...i){let a=r.apply(this,i),c=this[W];for(let f of c)F(f);return a})})},bt=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var $n=Array.prototype,tn=Object.create($n),dr=["push","pop","shift","unshift","splice","sort","reverse"];Pe($n,tn,dr);var Fn=Map.prototype,Tt=Object.create(Fn),hr=["set","clear","delete"];bt(Tt,"Map");Pe(Fn,Tt,hr);var qn=Set.prototype,xt=Object.create(qn),yr=["add","clear","delete"];bt(xt,"Set");Pe(qn,xt,yr);var ie={},q=t=>{if(h(t)||Ve(t))return t;let e={auto:!0,_value:t},n=c=>A(c)?W in c?!0:x(c)?(Object.setPrototypeOf(c,tn),!0):X(c)?(Object.setPrototypeOf(c,xt),!0):he(c)?(Object.setPrototypeOf(c,Tt),!0):!1:!1,o=n(t),r=new Set,s=(c,f)=>{if(ie.stack&&ie.stack.length){ie.stack[ie.stack.length-1].add(a);return}r.size!==0&&yt(()=>{for(let p of[...r.keys()])r.has(p)&&p(c,f)})},i=c=>{let f=c[W];f||(c[W]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let p=c[0],l=c[1];return 0 in c?e._value===p||h(p)&&(p=p(),e._value===p)?p:(n(p)&&i(p),e._value=p,e.auto&&s(p,l),e._value):(jn(a),e._value)}switch(c[2]){case 0:{let p=c[3];if(!p)return()=>{};let l=g=>{r.delete(g)};return r.add(p),()=>{l(p)}}case 1:{let p=c[1],l=e._value;s(l,p);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[W]=1,xe(a,!1),o&&i(t),a};var ae=t=>{if(Ve(t))return t;let e;if(h(t)?(e=t,t=e()):e=q(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[at]=1,x(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];Se(r)||(t[o]=ae(r))}return e}if(!A(t))return e;for(let n of Object.entries(t)){let o=n[1];if(Se(o))continue;let r=n[0];Je(r)||(t[r]=null,t[r]=ae(o))}return e};var zn=Symbol("modelBridge"),gr=t=>!!t?.[zn],br=t=>{t[zn]=1},Tr=t=>{let e=ae(t());return br(e),e},Kn={collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(!o)return()=>{};let i=_(o),a,c,f=()=>{},p=()=>{f(),f=()=>{},a=void 0,c=void 0},l=()=>{f(),f=()=>{}},g=(u,m)=>{a!==u&&(l(),f=Be(u,m),a=u)},d=w(e.value,()=>{let u=e.refs[0]??e.value()[0],m=e.context,T=m[i];if(!h(u)){if(c&&T===c){c(u);return}if(p(),h(T)){T(u);return}m[i]=u;return}if(gr(u)){if(T===u)return;h(T)?g(u,T):m[i]=u;return}c||(c=Tr(u)),m[i]=c,g(u,c)},!0);return()=>{f(),d()}}};var Et=class{p;le;constructor(e){this.p=e,this.le=e.o.l.inherit}N(e){this.Ke(e)}Ke(e){let n=this.p,o=n.h,r=n.o.fe,s=n.o.ue,i=o.me(),a=o.ze(),c=[...r.keys(),...a,...[...r.keys()].map(_e),...a.map(_e)].join(",");if($(c))return;let f=e.querySelectorAll(c),p=e.matches?.(c)?[e,...f]:f;for(let l of p){if(l.hasAttribute(n.x))continue;let g=l.parentNode;if(!g)continue;let d=l.nextSibling,u=_(l.tagName).toUpperCase(),T=i[u]??s.get(u);if(!T)continue;let b=T.template;if(!b)continue;let M=l.parentElement;if(!M)continue;let N=new Comment(" begin component: "+l.tagName),Ne=new Comment(" end component: "+l.tagName);M.insertBefore(N,l),l.remove();let We=n.o.l.props,Ge=n.o.l.propsOnce,Pt=n.o.l.bind,nt=(y,S)=>{let E={},j=y.hasAttribute(We),z=y.hasAttribute(Ge);return o.v(S,()=>{o.S(E),j&&n.T(Vn,y,We),z&&n.T(Pn,y,Ge);let C=T.props;if(!C||C.length===0)return;C=C.map(_);let G=new Map(C.map(Q=>[Q.toLowerCase(),Q]));for(let Q of C.concat(C.map(_e))){let ce=y.getAttribute(Q);ce!==null&&(E[_(Q)]=ce,y.removeAttribute(Q))}let jt=n.J.de(y,!1);for(let[Q,ce]of jt.entries()){let[$t,Rn]=ce.Q;if(!Rn)continue;let Sn=G.get(_(Rn).toLowerCase());Sn&&($t!=="."&&$t!==":"&&$t!==Pt||n.T(Kn,y,Q,!0,Sn,ce.X))}}),E},me=[...o.V()],ot=()=>{let y=nt(l,me),S=new Ie(y,l,me,N,Ne),E=ht(()=>T.context(S)??{}).context;if(S.autoProps){for(let[j,z]of Object.entries(y))if(j in E){let C=E[j];if(C===z)continue;S.entangle&&h(C)&&h(z)&&D(N,Be(z,C))}else E[j]=z;S.onAutoPropsAssigned?.()}return{componentCtx:E,head:S}},{componentCtx:de,head:rt}=ot(),O=[...fe(b)],v=O.length,k=l.childNodes.length===0,P=y=>{let S=y.parentElement;if(k){for(let C of[...y.childNodes])S.insertBefore(C,y);return}let E=y.name;$(E)&&(E=y.getAttributeNames().filter(C=>C.startsWith("#"))[0],$(E)?E="default":E=E.substring(1));let j=l.querySelector(`template[name='${E}'], template[\\#${E}]`);!j&&E==="default"&&(j=l.querySelector("template:not([name])"),j&&j.getAttributeNames().filter(C=>C.startsWith("#")).length>0&&(j=null));let z=C=>{rt.enableSwitch&&o.v(me,()=>{o.S(de);let G=nt(y,o.V());o.v(me,()=>{o.S(G);let jt=o.V(),Q=Ln(jt);for(let ce of C)ve(ce)&&(ce.setAttribute(Xe,Q),Gt(Q),D(ce,()=>{Jt(Q)}))})})};if(j){let C=[...fe(j)];for(let G of C)S.insertBefore(G,y);z(C)}else{if(E!=="default"){for(let G of[...fe(y)])S.insertBefore(G,y);return}let C=[...fe(l)].filter(G=>!se(G));for(let G of C)S.insertBefore(G,y);z(C)}},R=y=>{if(!ve(y))return;let S=y.querySelectorAll("slot");if(Hn(y)){P(y),y.remove();return}for(let E of S)P(E),E.remove()};(()=>{for(let y=0;y<v;++y)O[y]=O[y].cloneNode(!0),g.insertBefore(O[y],d),R(O[y])})(),M.insertBefore(Ne,d);let Me=()=>{if(!T.inheritAttrs)return;let y=O.filter(E=>E.nodeType===Node.ELEMENT_NODE);y.length>1&&(y=y.filter(E=>E.hasAttribute(this.le)));let S=y[0];if(S)for(let E of l.getAttributeNames()){if(E===We||E===Ge)continue;let j=l.getAttribute(E);if(E==="class")S.classList.add(...j.split(" "));else if(E==="style"){let z=S.style,C=l.style;for(let G of C)z.setProperty(G,C.getPropertyValue(G))}else S.setAttribute(ut(E,n.o),j)}},ne=()=>{for(let y of l.getAttributeNames())!y.startsWith("@")&&!y.startsWith(n.o.l.on)&&l.removeAttribute(y)},ke=()=>{Me(),ne(),o.S(de),n.ye(l,!1),de.$emit=rt.emit,Te(n,O),D(l,()=>{ye(de)}),D(N,()=>{oe(l)}),dt(de)};o.v(me,ke)}}};var nn=class{he;Q=[];X=[];ge=[];constructor(e){this.he=e,this.C()}C(){let e=this.he,n=e.startsWith(".");n&&(e=":"+e.slice(1));let o=e.indexOf("."),r=this.Q=(o<0?e:e.substring(0,o)).split(/[:@]/);if($(r[0])&&(r[0]=n?".":e[0]),o>=0){let s=this.X=e.slice(o+1).split(".");if(s.includes("camel")){let i=r.length-1;r[i]=_(r[i])}s.includes("prop")&&(r[0]=".")}}},Ct=class{p;be;constructor(e){this.p=e,this.be=e.o.We()}de(e,n){let o=new Map;if(!Ye(e))return o;let r=this.be,s=a=>{let c=a.getAttributeNames().filter(f=>r.some(p=>f.startsWith(p)));for(let f of c)o.has(f)||o.set(f,new nn(f)),o.get(f).ge.push(a)};if(s(e),!n)return o;let i=e.querySelectorAll("*");for(let a of i)s(a);return o}};var xr=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},vt=class{p;I;xe;constructor(e){this.p=e,this.I=e.o.l.is,this.xe=He(this.I)+", [is]"}N(e){let n=e.hasAttribute(this.I),o=be(e,this.xe);for(let r of o)this.T(r);return n}T(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.p.H(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.L(e,n)}P(e,n){let o=Ue(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n??""}`);r.insertBefore(s,e),De(s,o),o.forEach(a=>{V(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n??""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}L(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.P(e,` => ${n} `),a=this.p.h.C(n),c=a.value,f=this.p.h,p=f.V(),l={name:""},g=se(e)?o:[...o[0].childNodes],d=()=>{f.v(p,()=>{let b=c()[0];if(A(b)&&(b.name?b=b.name:b=Object.entries(f.me()).filter(N=>N[1]===b)[0]?.[0]),!H(b)||$(b)){pe(s,i);return}if(l.name===b)return;pe(s,i);let M=document.createElement(b);for(let N of e.getAttributeNames())N!==this.I&&M.setAttribute(N,e.getAttribute(N));xr(g,M),r.insertBefore(M,i),this.p.H(M),l.name=b})},u=[];D(s,()=>{a.stop();for(let b of u)b();u.length=0}),d();let T=w(c,d);u.push(T)}};var B=t=>h(t)?t():t;var et=class{R=[];_=new Map;get w(){return this.R.length}Y;constructor(e){this.Y=e}Z(e){let n=this.Y(e.value);n!==void 0&&this._.set(n,e)}ee(e){let n=this.Y(this.R[e]?.value);n!==void 0&&this._.delete(n)}static Ge(e,n){return{items:[],index:e,value:n,order:-1}}S(e){e.order=this.w,this.R.push(e),this.Z(e)}Je(e,n){let o=this.w;for(let r=e;r<o;++r)this.R[r].order=r+1;n.order=e,this.R.splice(e,0,n),this.Z(n)}D(e){return this.R[e]}te(e,n){this.ee(e),this.R[e]=n,this.Z(n),n.order=e}Te(e){this.ee(e),this.R.splice(e,1);let n=this.w;for(let o=e;o<n;++o)this.R[o].order=o}Re(e){let n=this.w;for(let o=e;o<n;++o)this.ee(o);this.R.splice(e)}Ct(e){return this._.has(e)}Qe(e){return this._.get(e)?.order??-1}};var on=Symbol("r-for"),Rt=class t{p;b;ne;x;constructor(e){this.p=e,this.b=e.o.l.for,this.ne=He(this.b),this.x=e.o.l.pre}N(e){let n=e.hasAttribute(this.b),o=be(e,this.ne);for(let r of o)this.Xe(r);return n}G(e){return e[on]?!0:(e[on]=!0,be(e,this.ne).forEach(n=>n[on]=!0),!1)}Xe(e){if(e.hasAttribute(this.x)||this.G(e))return;let n=e.getAttribute(this.b);if(!n){L(0,this.b,e);return}e.removeAttribute(this.b),this.Ye(e,n)}Ee(e){return ee(e)?[]:(U(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))}Ye(e,n){let o=this.Ze(n);if(!o?.list){L(1,this.b,n,e);return}let r=this.p.o.l.key,s=this.p.o.l.keyBind,i=e.getAttribute(r)??e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=i?v=>B(B(v)?.[i]):v=>v,c=(v,k)=>a(v)===a(k),f=Ue(e),p=e.parentNode;if(!p)return;let l=`${this.b} => ${n}`,g=new Comment(`__begin__ ${l}`);p.insertBefore(g,e),De(g,f),f.forEach(v=>{V(v)}),e.remove();let d=new Comment(`__end__ ${l}`);p.insertBefore(d,g.nextSibling);let u=this.p,m=u.h,T=m.V(),b=(v,k,P)=>{let R=o.createContext(k,v),Z=et.Ge(R.index,k);return m.v(T,()=>{m.S(R.ctx);let Me=d.parentNode??g.parentNode;if(!Me)throw new Error("[r-for] cannot mount: missing anchor parent");let ne=P.previousSibling,ke=[];for(let y of f){let S=y.cloneNode(!0);Me.insertBefore(S,P),ke.push(S)}for(Te(u,ke),ne=ne.nextSibling;ne!==P;)Z.items.push(ne),ne=ne.nextSibling}),Z},M=(v,k)=>{let P=O.D(v).items,R=P[P.length-1].nextSibling;for(let Z of P)V(Z);O.te(v,b(v,k,R))},N=(v,k)=>{O.S(b(v,k,d))},Ne=v=>{for(let k of O.D(v).items)V(k)},We=v=>{let k=O.w;for(let P=v;P<k;++P)O.D(P).index(P)},Ge=v=>{let k=O.w;U(v)&&(v=v());let P=B(v[0]);if(x(P)&&P.length===0){pe(g,d),O.Re(0);return}let R=0,Z=Number.MAX_SAFE_INTEGER,Me=k,ne=this.p.o.forGrowThreshold,ke=()=>O.w<Me+ne;for(let S of this.Ee(v[0])){let E=()=>{if(R<k){let j=O.D(R++);if(c(j.value,S))return;let z=O.Qe(a(S));if(z>=R&&z-R<10){if(--R,Z=Math.min(Z,R),Ne(R),O.Te(R),--k,z>R+1)for(let C=R;C<z-1&&C<k&&!c(O.D(R).value,S);)++C,Ne(R),O.Te(R),--k;E();return}ke()?(O.Je(R-1,b(R,S,O.D(R-1).items[0])),Z=Math.min(Z,R-1),++k):M(R-1,S)}else N(R++,S)};E()}let y=R;for(k=O.w;R<k;)Ne(R++);O.Re(y),We(Z)},Pt=()=>{de=w(ot,Ge)},nt=()=>{me.stop(),de()},me=m.C(o.list),ot=me.value,de,rt=0,O=new et(a);for(let v of this.Ee(ot()[0]))O.S(b(rt++,v,d));D(g,nt),Pt()}static et=/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/;Ze(e){let n=t.et.exec(e);if(!n)return;let o=(n[1]+(n[2]??"")).split(",").map(c=>c.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||o[r]?.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(c,f)=>{let p={},l=B(c);if(!a&&o.length===1)p[o[0]]=c;else if(x(l)){let d=0;for(let u of o)p[u]=l[d++]}else for(let d of o)p[d]=l[d];let g={ctx:p,index:q(-1)};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=q(f)),g}}}};var St=class{h;Ce;ve;Se;we;J;o;x;Ae;constructor(e){this.h=e,this.o=e.o,this.ve=new Rt(this),this.Ce=new lt(this),this.Se=new vt(this),this.we=new Et(this),this.J=new Ct(this),this.x=this.o.l.pre,this.Ae=this.o.l.dynamic}tt(e){let n=se(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.x))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Te(this,i)}}H(e){e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.x)||this.Ce.N(e)||this.ve.N(e)||this.Se.N(e)||(this.we.N(e),this.tt(e),this.ye(e,!0))}ye(e,n){let o=this.J.de(e,n),r=this.o.j;for(let[s,i]of o.entries()){let[a,c]=i.Q,f=r[s]??r[a];if(!f){console.error("directive not found:",a);continue}i.ge.forEach(p=>{this.T(f,p,s,!1,c,i.X)})}}T(e,n,o,r,s,i){if(n.hasAttribute(this.x))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=f=>{let p=f.getAttribute(Xe);return p||(f.parentElement?c(f.parentElement):null)};if(Qt()){let f=c(n);if(f){this.h.v(In(f),()=>{this.L(e,n,a,s,i)});return}}this.L(e,n,a,s,i)}nt(e,n,o){if(e!==mt)return!1;if($(o))return!0;let r=document.querySelector(o);if(r){let s=n.parentElement;if(!s)return!0;let i=new Comment(`teleported => '${o}'`);s.insertBefore(i,n),n.teleportedFrom=i,i.teleportedTo=n,D(i,()=>{V(n)}),r.appendChild(n)}return!0}L(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.nt(e,n,o))return;let i=this.h.C(o,e.isLazy,e.isLazyKey,e.collectRefObj,e.once),a=[];D(n,()=>{i.stop(),p?.stop();for(let T of a)T();a.length=0});let f=_n(r,this.Ae),p;f&&(p=this.h.C(_(f),void 0,void 0,void 0,e.once));let l,g=()=>(l=i.value(),l),d,u=()=>p?(d=p.value()[0],d):(d=r,r),m=()=>{if(!e.onChange)return;let T=w(i.value,b=>{let M=l,N=d;e.onChange?.(n,g(),M,u(),N,s)});if(a.push(T),p){let b=w(p.value,M=>{let N=d;e.onChange?.(n,g(),N,u(),N,s)});a.push(b)}};e.once||m(),e.onBind&&a.push(e.onBind(n,i,o,r,p,s)),e.onChange?.(n,g(),void 0,u(),void 0,s)}};var Wn="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 Cr(t){return!!t||t===""}var rn={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),wt(t,o,e[0],r);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=n?.[a]?.[0],p=c[0],l=c[1];wt(t,p,l,f)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1],g=n?.[a],d=g&&p in g?p:void 0;wt(t,p,l,d)}else{let f=n?.[a],p=e[a++],l=e[a];wt(t,p,l,f)}}}},wt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),ee(e)){L(3,name,t);return}if(!H(e)){L(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){ee(n)?t.removeAttributeNS(Wn,e.slice(6,e.length)):t.setAttributeNS(Wn,e,n);return}let r=e in Er;ee(n)||r&&!Cr(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var sn={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)Gn(t,s[c],i?.[c])}else Gn(t,s,i)}}},Gn=(t,e,n)=>{let o=t.classList,r=H(e),s=H(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else r?n!==e&&(s&&o.remove(...n.trim().split(/\s+/)),o.add(...e.trim().split(/\s+/))):n&&s&&o.remove(...n.trim().split(/\s+/))};var Jn={onChange:(t,e)=>{let[n,o]=e;U(o)?o(t,n):t.innerHTML=n?.toString()}};function vr(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=le(t[o],e[o]);return n}function le(t,e){if(t===e)return!0;let n=zt(t),o=zt(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=Je(t),o=Je(e),n||o)return t===e;if(n=x(t),o=x(e),n||o)return n&&o?vr(t,e):!1;if(n=A(t),o=A(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=t.hasOwnProperty(i),c=e.hasOwnProperty(i);if(a&&!c||!a&&c||!le(t[i],e[i]))return!1}}return String(t)===String(e)}function Ot(t,e){return t.findIndex(n=>le(n,e))}var Qn=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var At=t=>{if(!h(t))throw I(3,"pause");t(void 0,void 0,3)};var Nt=t=>{if(!h(t))throw I(3,"resume");t(void 0,void 0,4)};var Yn={onChange:(t,e)=>{Rr(t,e[0])},onBind:(t,e,n,o,r,s)=>Sr(t,e,s)},Rr=(t,e)=>{let n=no(t);if(n&&Zn(t))x(e)?e=Ot(e,ue(t))>-1:X(e)?e=e.has(ue(t)):e=kr(t,e),t.checked=e;else if(n&&eo(t))t.checked=le(e,ue(t));else if(n||oo(t))to(t)?t.value!==e?.toString()&&(t.value=e):t.value!==e&&(t.value=e);else if(ro(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=ue(a);if(s)x(e)?a.selected=Ot(e,c)>-1:a.selected=e.has(c);else if(le(ue(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else L(7,t)},tt=t=>(h(t)&&(t=t()),U(t)&&(t=t()),t?H(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}),Zn=t=>t.type==="checkbox",eo=t=>t.type==="radio",to=t=>t.type==="number"||t.type==="range",no=t=>t.tagName==="INPUT",oo=t=>t.tagName==="TEXTAREA",ro=t=>t.tagName==="SELECT",Sr=(t,e,n)=>{let o=e.value,r=tt(n?.join(",")),s=tt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return L(8,t),()=>{};let a=()=>e.refs[0],c=no(t);return c&&Zn(t)?Or(t,a):c&&eo(t)?Lr(t,a):c||oo(t)?wr(t,i,a,o):ro(t)?Ir(t,a,o):(L(7,t),()=>{})},Xn=/[.,' ·٫]/,wr=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=to(t),a=()=>{!e.trim&&!tt(o()[1]).trim||(t.value=t.value.trim())},c=g=>{let d=g.target;d.composing=1},f=g=>{let d=g.target;d.composing&&(d.composing=0,d.dispatchEvent(new Event(s)))},p=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=g=>{let d=n();if(!d)return;let u=g.target;if(!u||u.composing)return;let m=u.value,T=tt(o()[1]);if(i||T.number||T.int){if(T.int)m=parseInt(m);else{if(Xn.test(m[m.length-1])&&m.split(Xn).length===2){if(m+="0",m=parseFloat(m),isNaN(m))m="";else if(d()===m)return}m=parseFloat(m)}isNaN(m)&&(m=""),t.value=m}else T.trim&&(m=m.trim());d(m)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),p},Or=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t),a=t.checked,c=s();if(x(c)){let f=Ot(c,i),p=f!==-1;a&&!p?c.push(i):!a&&p&&c.splice(f,1)}else X(c)?a?c.add(i):c.delete(i):s(Mr(t,a))};return t.addEventListener(n,r),o},ue=t=>"_value"in t?t._value:t.value,so="trueValue",Ar="falseValue",io="true-value",Nr="false-value",Mr=(t,e)=>{let n=e?so:Ar;if(n in t)return t[n];let o=e?io:Nr;return t.hasAttribute(o)?t.getAttribute(o):e},kr=(t,e)=>{if(so in t)return le(e,t.trueValue);let o=io;return t.hasAttribute(o)?le(e,t.getAttribute(o)):le(e,!0)},Lr=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=ue(t);s(i)};return t.addEventListener(n,r),o},Ir=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=tt(n()[1]).number,f=Array.prototype.filter.call(t.options,p=>p.selected).map(p=>c?Qn(ue(p)):ue(p));if(t.multiple){let p=i();try{if(At(i),X(p)){p.clear();for(let l of f)p.add(l)}else x(p)?(p.splice(0),p.push(...f)):i(f)}finally{Nt(i),F(i)}}else i(f[0])};return t.addEventListener(o,s),r};var Dr=["stop","prevent","capture","self","once","left","right","middle","passive"],Ur=t=>{let e={};if($(t))return;let n=t.split(",");for(let o of Dr)e[o]=n.includes(o);return e},cn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,onBind:(t,e,n,o,r,s)=>{if(r){let p=e.value(),l=B(r.value()[0]);return H(l)?an(t,_(l),()=>e.value()[0],s?.join(",")??p[1]):()=>{}}else if(o){let p=e.value();return an(t,_(o),()=>e.value()[0],s?.join(",")??p[1])}let i=[],a=()=>{i.forEach(p=>p())},c=e.value(),f=c.length;for(let p=0;p<f;++p){let l=c[p];if(U(l)&&(l=l()),A(l))for(let g of Object.entries(l)){let d=g[0],u=()=>{let T=e.value()[p];return U(T)&&(T=T()),T=T[d],U(T)&&(T=T()),T},m=l[d+"_flags"];i.push(an(t,d,u,m))}else L(2,name,t)}return a}},Hr=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e??="";let n=t.split(".").concat(e.split(","));t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=f=>!(r&&!f.ctrlKey||s&&!f.shiftKey||i&&!f.altKey||a&&!f.metaKey);return o?[t,f=>c(f)?f.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},an=(t,e,n,o)=>{if($(e))return L(5,name,t),()=>{};let r=Ur(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Hr(e,o);let a=p=>{if(!i(p)||!n&&e==="submit"&&r?.prevent)return;let l=n(p);U(l)&&(l=l(p)),U(l)&&l(p)},c=()=>{t.removeEventListener(e,f,s)},f=p=>{if(!r){a(p);return}try{if(r.left&&p.button!==0||r.middle&&p.button!==1||r.right&&p.button!==2||r.self&&p.target!==t)return;r.stop&&p.stopPropagation(),r.prevent&&p.preventDefault(),a(p)}finally{r.once&&c()}};return t.addEventListener(e,f,s),c};var ao={onChange:(t,e,n,o,r,s)=>{if(o){s&&s.includes("camel")&&(o=_(o)),je(t,o,e[0]);return}let i=e.length;for(let a=0;a<i;++a){let c=e[a];if(x(c)){let f=c[0],p=c[1];je(t,f,p)}else if(A(c))for(let f of Object.entries(c)){let p=f[0],l=f[1];je(t,p,l)}else{let f=e[a++],p=e[a];je(t,f,p)}}}};function _r(t){return!!t||t===""}var je=(t,e,n)=>{if(ee(e)){L(3,name,t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(oe),1),t[e]=n??"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n??"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=_r(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||L(4,e,o,n,s)}r&&t.removeAttribute(e)};var co={once:!0,onBind:(t,e,n)=>{let o=e.value()[0],r=x(o),s=e.refs[0];return r?o.push(t):s?s?.(t):e.context[n]=t,()=>{if(r){let i=o.indexOf(t);i!==-1&&o.splice(i,1)}else s?.(null)}}};var po={onChange:(t,e)=>{let n=ge(t).data,o=n._ord;wn(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"}};var ln={onChange:(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n?.[r];if(x(s)){let a=s.length;for(let c=0;c<a;++c)fo(t,s[c],i?.[c])}else fo(t,s,i)}}},fo=(t,e,n)=>{let o=t.style,r=H(e);if(e&&!r){if(n&&!H(n))for(let s in n)e[s]==null&&fn(o,s,"");for(let s in e)fn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in ge(t).data)return;o.display=s}},lo=/\s*!important$/;function fn(t,e,n){if(x(n))n.forEach(o=>{fn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Br(t,e);lo.test(n)?t.setProperty(_e(o),n.replace(lo,""),"important"):t[o]=n}}var uo=["Webkit","Moz","ms"],pn={};function Br(t,e){let n=pn[e];if(n)return n;let o=_(e);if(o!=="filter"&&o in t)return pn[e]=o;o=Ze(o);for(let r=0;r<uo.length;r++){let s=uo[r]+o;if(s in t)return pn[e]=s}return e}var J=t=>mo(B(t)),mo=(t,e=new WeakMap)=>{if(!t||!A(t))return t;if(x(t))return t.map(J);if(X(t)){let o=new Set;for(let r of t.keys())o.add(J(r));return o}if(he(t)){let o=new Map;for(let r of t)o.set(J(r[0]),J(r[1]));return o}if(e.has(t))return B(e.get(t));let n={...t};e.set(t,n);for(let o of Object.entries(n))n[o[0]]=mo(B(o[1]),e);return n};var ho={onChange:(t,e)=>{let n=e[0];t.textContent=X(n)?JSON.stringify(J([...n])):he(n)?JSON.stringify(J([...n])):A(n)?JSON.stringify(J(n)):n?.toString()??""}};var yo={onChange:(t,e)=>{je(t,"value",e[0])}};var Y=class t{static getDefault(){return t.Oe??(t.Oe=new t)}j={};l={};We=()=>Object.keys(this.j).filter(e=>e.length===1||!e.startsWith(":"));fe=new Map;ue=new Map;static Oe;static rt="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.ot()}ot(){let e={},n=globalThis;for(let o of t.rt.split(","))e[o]=n[o];return e.ref=ae,e.sref=q,e.flatten=J,e}addComponent(...e){for(let n of e){if(!n.defaultName){Qe.warning("Registered component's default name is not defined",n);continue}this.fe.set(Ze(n.defaultName),n),this.ue.set(Ze(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.j={".":ao,":":rn,"@":cn,[`${e}on`]:cn,[`${e}bind`]:rn,[`${e}html`]:Jn,[`${e}text`]:ho,[`${e}show`]:po,[`${e}model`]:Yn,":style":ln,[`${e}bind:style`]:ln,":class":sn,[`${e}bind:class`]:sn,":ref":co,":value":yo,[`${e}teleport`]:mt},this.l={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,props:":props",propsOnce:":props-once",bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.j,this.l)}};var Mt=(t,e)=>{if(!t)return;let o=(e??Y.getDefault()).l,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Pr(t,o.pre,s))Vr(i,o.text,r,s)},Vr=(t,e,n,o)=>{let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(t.parentElement?.childNodes.length===1&&i.length===3){let c=i[1],f=go(c,o);if(f&&$(i[0])&&$(i[2])){let p=t.parentElement;p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),p.innerText="";return}}let a=document.createDocumentFragment();for(let c of i){let f=go(c,o);if(f){let p=document.createElement("span");p.setAttribute(e,c.substring(f.start.length,c.length-f.end.length)),a.appendChild(p)}else a.appendChild(document.createTextNode(c))}t.replaceWith(a)},Pr=(t,e,n)=>{let o=[],r=s=>{if(s.nodeType===Node.TEXT_NODE)n.some(i=>s.textContent?.includes(i.start))&&o.push(s);else{if(s?.hasAttribute?.(e))return;for(let i of fe(s))r(i)}};return r(t),o},go=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var jr=9,$r=10,Fr=13,qr=32,Ee=46,kt=44,zr=39,Kr=34,Lt=40,$e=41,It=91,Dt=93,un=63,Wr=59,bo=58,Gr=123,Ut=125,dn=43,Jr=45,To=96,xo=47,Qr=92,Eo=[2,3],Co=[dn,Jr],Ao={"-":1,"!":1,"~":1,"+":1,new:1},No={"=":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},qe={"=>":2,...No,"||":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},Mo=Object.keys(No),Xr=new Set(Mo),Ht=new Set;Ht.add("=>");Mo.forEach(t=>Ht.add(t));var Yr=new Set(["$","_"]),vo={true:!0,false:!1,null:null},Zr="this";function ko(t){return Math.max(0,...Object.keys(t).map(e=>e.length))}var es=ko(Ao),ts=ko(qe),ze="Expected ",Oe="Unexpected ",yn="Unclosed ",ns=ze+":",Ro=ze+"expression",os="missing }",rs=Oe+"object property",ss=yn+"(",So=ze+"comma",wo=Oe+"token ",is=Oe+"period",mn=ze+"expression after ",as="missing unaryOp argument",cs=yn+"[",ps=ze+"exponent (",fs="Variable names cannot start with a number (",ls=yn+'quote after "';var Fe=t=>t>=48&&t<=57,Oo=t=>qe[t]||0,hn=class{st={0:[this.it],1:[this.at,this.pt,this.ct],2:[this.lt,this.ft,this.ut,this.Ne,this.mt],3:[this.dt,this.yt,this.ht]};r;e;get M(){return this.r.charAt(this.e)}get f(){return this.r.charCodeAt(this.e)}m(e){return this.r.charCodeAt(this.e)===e}constructor(e){this.r=e,this.e=0}U(e){let n=String.fromCharCode(e);return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!(n in qe)||Yr.has(n)}re(e){return this.U(e)||Fe(e)}i(e){return new Error(`${e} at character ${this.e}`)}k(e,n,o){let r=this.st[e];if(!r)return o;let s={node:o},i=a=>{a.call(this,s)};return n===0?r.forEach(i):r.find(i),s.node}y(){let e=this.f,n=this.r,o=this.e;for(;e===qr||e===jr||e===$r||e===Fr;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.oe();return e.length===1?e[0]:{type:0,body:e}}oe(e){let n=[];for(;this.e<this.r.length;){let o=this.f;if(o===Wr||o===kt)this.e++;else{let r=this.A();if(r)n.push(r);else if(this.e<this.r.length){if(o===e)break;throw this.i(Oe+'"'+this.M+'"')}}}return n}A(){let e=this.k(0,1)??this.Me();return this.y(),this.k(1,0,e)}se(){this.y();let e=this.e,n=this.r,o=n.substr(e,ts),r=o.length;for(;r>0;){if(o in qe&&(!this.U(this.f)||e+o.length<n.length&&!this.re(n.charCodeAt(e+o.length))))return e+=r,this.e=e,o;o=o.substr(0,--r)}return!1}Me(){let e,n,o,r,s,i,a,c;if(s=this.$(),!s||(n=this.se(),!n))return s;if(r={value:n,prec:Oo(n),right_a:Ht.has(n)},i=this.$(),!i)throw this.i(mn+n);let f=[s,r,i];for(;n=this.se();){if(o=Oo(n),o===0){this.e-=n.length;break}r={value:n,prec:o,right_a:Ht.has(n)},c=n;let p=l=>r.right_a&&l.right_a?o>l.prec:o<=l.prec;for(;f.length>2&&p(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e={type:8,operator:n,left:s,right:i},f.push(e);if(e=this.$(),!e)throw this.i(mn+c);f.push(r,e)}for(a=f.length-1,e=f[a];a>1;)e={type:8,operator:f[a-1].value,left:f[a-2],right:e},a-=2;return e}$(){let e,n,o;if(this.y(),o=this.k(2,1),o)return this.k(3,0,o);let r=this.f;if(Fe(r)||r===Ee)return this.gt();if(r===zr||r===Kr)o=this.bt();else if(r===It)o=this.xt();else{for(e=this.r.substr(this.e,es),n=e.length;n>0;){if(Object.prototype.hasOwnProperty.call(Ao,e)&&(!this.U(this.f)||this.e+e.length<this.r.length&&!this.re(this.r.charCodeAt(this.e+e.length)))){this.e+=n;let s=this.$();if(!s)throw this.i(as);return this.k(3,0,{type:7,operator:e,argument:s})}e=e.substr(0,--n)}this.U(r)?(o=this.ie(),o.name in vo?o={type:4,value:vo[o.name],raw:o.name}:o.name===Zr&&(o={type:5})):r===Lt&&(o=this.Tt())}return o?(o=this.F(o),this.k(3,0,o)):this.k(3,0,!1)}F(e){this.y();let n=this.f;for(;n===Ee||n===It||n===Lt||n===un;){let o;if(n===un){if(this.r.charCodeAt(this.e+1)!==Ee)break;o=!0,this.e+=2,this.y(),n=this.f}if(this.e++,n===It){if(e={type:3,computed:!0,object:e,property:this.A()},this.y(),n=this.f,n!==Dt)throw this.i(cs);this.e++}else n===Lt?e={type:6,arguments:this.ke($e),callee:e}:(n===Ee||o)&&(o&&this.e--,this.y(),e={type:3,computed:!1,object:e,property:this.ie()});o&&(e.optional=!0),this.y(),n=this.f}return e}gt(){let e="",n;for(;Fe(this.f);)e+=this.r.charAt(this.e++);if(this.m(Ee))for(e+=this.r.charAt(this.e++);Fe(this.f);)e+=this.r.charAt(this.e++);if(n=this.M,n==="e"||n==="E"){for(e+=this.r.charAt(this.e++),n=this.M,(n==="+"||n==="-")&&(e+=this.r.charAt(this.e++));Fe(this.f);)e+=this.r.charAt(this.e++);if(!Fe(this.r.charCodeAt(this.e-1)))throw this.i(ps+e+this.M+")")}let o=this.f;if(this.U(o))throw this.i(fs+e+this.M+")");if(o===Ee||e.length===1&&e.charCodeAt(0)===Ee)throw this.i(is);return{type:4,value:parseFloat(e),raw:e}}bt(){let e="",n=this.e,o=this.r.charAt(this.e++),r=!1;for(;this.e<this.r.length;){let s=this.r.charAt(this.e++);if(s===o){r=!0;break}else if(s==="\\")switch(s=this.r.charAt(this.e++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}if(!r)throw this.i(ls+e+'"');return{type:4,value:e,raw:this.r.substring(n,this.e)}}ie(){let e=this.f,n=this.e;if(this.U(e))this.e++;else throw this.i(Oe+this.M);for(;this.e<this.r.length&&(e=this.f,this.re(e));)this.e++;return{type:2,name:this.r.slice(n,this.e)}}ke(e){let n=[],o=!1,r=0;for(;this.e<this.r.length;){this.y();let s=this.f;if(s===e){if(o=!0,this.e++,e===$e&&r&&r>=n.length)throw this.i(wo+String.fromCharCode(e));break}else if(s===kt){if(this.e++,r++,r!==n.length){if(e===$e)throw this.i(wo+",");if(e===Dt)for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(So);{let i=this.A();if(!i||i.type===0)throw this.i(So);n.push(i)}}}if(!o)throw this.i(ze+String.fromCharCode(e));return n}Tt(){this.e++;let e=this.oe($e);if(this.m($e))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(ss)}xt(){return this.e++,{type:9,elements:this.ke(Dt)}}lt(e){if(this.m(Gr)){this.e++;let n=[];for(;!isNaN(this.f);){if(this.y(),this.m(Ut)){this.e++,e.node=this.F({type:10,properties:n});return}let o=this.A();if(!o)break;if(this.y(),o.type===2&&(this.m(kt)||this.m(Ut)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.m(bo)){this.e++;let r=this.A();if(!r)throw this.i(rs);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.y()}else o&&n.push(o);this.m(kt)&&this.e++}throw this.i(os)}}ft(e){let n=this.f;if(Co.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){this.e+=2;let o=e.node={type:13,operator:n===dn?"++":"--",argument:this.F(this.ie()),prefix:!0};if(!o.argument||!Eo.includes(o.argument.type))throw this.i(Oe+o.operator)}}yt(e){if(e.node){let n=this.f;if(Co.some(o=>o===n&&o===this.r.charCodeAt(this.e+1))){if(!Eo.includes(e.node.type))throw this.i(Oe+e.node.operator);this.e+=2,e.node={type:13,operator:n===dn?"++":"--",argument:e.node,prefix:!1}}}}ut(e){[0,1,2].every(n=>this.r.charCodeAt(this.e+n)===Ee)&&(this.e+=3,e.node={type:14,argument:this.A()})}ct(e){if(e.node&&this.m(un)){this.e++;let n=e.node,o=this.A();if(!o)throw this.i(Ro);if(this.y(),this.m(bo)){this.e++;let r=this.A();if(!r)throw this.i(Ro);if(e.node={type:11,test:n,consequent:o,alternate:r},n.operator&&qe[n.operator]<=.9){let s=n;for(;s.right.operator&&qe[s.right.operator]<=.9;)s=s.right;e.node.test=s.right,s.right=e.node,e.node=n}}else throw this.i(ns)}}it(e){if(this.y(),this.m(Lt)){let n=this.e;if(this.e++,this.y(),this.m($e)){this.e++;let o=this.se();if(o==="=>"){let r=this.Me();if(!r)throw this.i(mn+o);e.node={type:15,params:null,body:r};return}}this.e=n}}at(e){this.Le(e.node)}Le(e){e&&(Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.Le(n)}),e.operator==="=>"&&(e.type=15,e.params=e.left?[e.left]:null,e.body=e.right,e.params&&e.params[0].type===1&&(e.params=e.params[0].expressions),delete e.left,delete e.right,delete e.operator))}pt(e){e.node&&this.q(e.node)}q(e){Xr.has(e.operator)?(e.type=16,this.q(e.left),this.q(e.right)):e.operator||Object.values(e).forEach(n=>{n&&typeof n=="object"&&this.q(n)})}ht(e){if(!e.node)return;let n=e.node.type;(n===2||n===3)&&this.m(To)&&(e.node={type:17,tag:e.node,quasi:this.Ne(e)})}Ne(e){if(!this.m(To))return;let n={type:19,quasis:[],expressions:[]},o="",r="",s=!1,i=this.r.length,a=()=>n.quasis.push({type:18,value:{raw:r,cooked:o},tail:s});for(;this.e<i;){let c=this.r.charAt(++this.e);if(c==="`")return this.e+=1,s=!0,a(),e.node=n,n;if(c==="$"&&this.r.charAt(this.e+1)==="{"){if(this.e+=2,a(),r="",o="",n.expressions.push(...this.oe(Ut)),!this.m(Ut))throw this.i("unclosed ${")}else if(c==="\\")switch(r+=c,c=this.r.charAt(++this.e),r+=c,c){case"n":o+=`
3
+ `;break;case"r":o+="\r";break;case"t":o+=" ";break;case"b":o+="\b";break;case"f":o+="\f";break;case"v":o+="\v";break;default:o+=c}else o+=c,r+=c}throw this.i("Unclosed `")}dt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o?.callee?.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}mt(e){if(!this.m(xo))return;let n=++this.e,o=!1;for(;this.e<this.r.length;){if(this.f===xo&&!o){let r=this.r.slice(n,this.e),s="";for(;++this.e<this.r.length;){let a=this.f;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.M;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.r.slice(n-1,this.e)},e.node=this.F(e.node),e.node}this.m(It)?o=!0:o&&this.m(Dt)&&(o=!1),this.e+=this.m(Qr)?2:1}throw this.i("Unclosed Regex")}},Lo=t=>new hn(t).parse();var us={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>t()??e(),"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(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},ms={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},Ho=t=>{if(!t?.some(Uo))return t;let e=[];return t.forEach(n=>Uo(n)?e.push(...n):e.push(n)),e},Io=(...t)=>Ho(t),gn=(t,e)=>{if(!t)return e;let n=Object.create(e??{});return n.$event=t,n},ds={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(--o),o}return--t[e]}},hs={"++":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(h(n)){let o=n();return n(o-1),o}return t[e]--}},Do={"=":(t,e,n)=>{let o=t[e];return h(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return h(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return h(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return h(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return h(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return h(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return h(o)?o(o()**n):t[e]**=n},"<<=":(t,e,n)=>{let o=t[e];return h(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return h(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return h(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return h(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return h(o)?o(o()^n):t[e]^=n}},_t=(t,e)=>U(t)?t.bind(e):t,bn=class{u;Ve;Ie;De;O;Ue;Be;constructor(e,n,o,r,s){this.u=x(e)?e:[e],this.Ve=n,this.Ie=o,this.De=r,this.Be=!!s}Pe(e,n){if(n&&e in n)return n;for(let o of this.u)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.u[this.u.length-1];if(r==="$parent")return this.u[1];if(r==="$ctx")return[...this.u];if(o&&r in o)return this.O=o[r],_t(B(o[r]),o);for(let i of this.u)if(r in i)return this.O=i[r],_t(B(i[r]),i);let s=this.Ve;if(s&&r in s)return this.O=s[r],_t(B(s[r]),s)}5(e,n,o){return this.u[0]}0(e,n,o){return this.He(n,o,Io,...e.body)}1(e,n,o){return this.E(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.ae(e,n,o),i=r?.[s];return this.O=i,_t(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>U(i)?i(...Ho(a)):i,s=this.E(++n,o,r,e.callee,...e.arguments);return this.O=s,s}7(e,n,o){return this.E(n,o,ms[e.operator],e.argument)}8(e,n,o){let r=us[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.g(e.left,n,o),()=>this.g(e.right,n,o))}return this.E(n,o,r,e.left,e.right)}9(e,n,o){return this.He(++n,o,Io,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.E(++n,o,s,...e.properties),r}11(e,n,o){return this.E(n,o,r=>this.g(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){let r={},s=p=>p?.type!==15,i=this.De??(()=>!1),a=n===0&&this.Be,c=p=>this._e(a,e.key,n,gn(p,o)),f=p=>this._e(a,e.value,n,gn(p,o));if(e.shorthand){let p=e.key.name;r[p]=s(e.key)&&i(p,n)?c:c()}else if(e.computed){let p=B(c());r[p]=s(e.value)&&i(p,n)?f:f()}else{let p=e.key.type===4?e.key.value:e.key.name;r[p]=s(e.value)&&i(p,n)?()=>f:f()}return r}ae(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,i=e.prefix?ds:hs;if(r.type===2){let a=r.name,c=this.Pe(a,o);return ee(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.ae(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Pe(i,o);if(ee(a))return;let c=this.g(e.right,n,o);return Do[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.ae(r,n,o),c=this.g(e.right,n,o);return Do[s](i,a,c)}}14(e,n,o){let r=this.g(e.argument,n,o);return x(r)&&(r.s=_o),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.E(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.E(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o??{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.g(e.body,n,s)}}g(e,n,o){let r=B(this[e.type](e,n,o));return this.Ue=e.type,r}_e(e,n,o,r){let s=this.g(n,o,r);return e&&this.je()?this.O:s}je(){let e=this.Ue;return(e===2||e===3||e===6)&&h(this.O)}eval(e,n){let{value:o,refs:r}=gt(()=>this.g(e,-1,n)),s={value:o,refs:r};return this.je()&&(s.ref=this.O),s}E(e,n,o,...r){let s=r.map(i=>i&&this.g(i,e,n));return o(...s)}He(e,n,o,...r){let s=this.Ie;if(!s)return this.E(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.g(a,e,gn(f,n)):this.g(a,e,n)));return o(...i)}},_o=Symbol("s"),Uo=t=>t?.s===_o,Bo=(t,e,n,o,r,s,i)=>new bn(e,n,o,r,i).eval(t,s);var Vo={},Bt=class{u;o;constructor(e,n){this.u=e,this.o=n}S(e){this.u=[e,...this.u]}me(){return this.u.map(n=>n.components).filter(n=>!!n).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ze(){let e=[],n=new Set,o=this.u.map(r=>r.components).filter(r=>!!r).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}C(e,n,o,r,s){let i=q([]),a=[],c=()=>{for(let d of a)d();a.length=0},f={value:i,stop:c,refs:[],context:this.u[0]};if($(e))return f;let p=this.o.globalContext,l=[],g=(d,u,m,T)=>{try{let b=Bo(d,u,p,n,o,T,r);return m&&l.push(...b.refs),{value:b.value,refs:b.refs,ref:b.ref}}catch(b){L(6,`evaluation error: ${e}`,b)}return{value:void 0,refs:[]}};try{let d=Vo[e]??Lo("["+e+"]");Vo[e]=d;let u=this.u,m=()=>{l.splice(0),c();let T=d.elements.map((b,M)=>n?.(M,-1)?{value:N=>g(b,u,!1,{$event:N}).value,refs:[]}:g(b,u,!0));if(!s)for(let b of l){let M=w(b,m);a.push(M)}f.refs=T.map(b=>b.ref),i(T.map(b=>b.value))};m()}catch(d){L(6,`parse error: ${e}`,d)}return f}V(){return this.u}$e=[];te(e){this.$e.push(this.u),this.u=e}v(e,n){try{this.te(e),n()}finally{this.Rt()}}Rt(){this.u=this.$e.pop()??[]}};var Po=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},ys=(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},gs=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
4
+ `);)++n;if(n>=t.length||!Po(t[n]))return null;let o=n;for(;n<t.length&&Po(t[n]);)++n;return{start:o,end:n}},jo=new Set(["table","thead","tbody","tfoot"]),bs=new Set(["thead","tbody","tfoot"]),Ts=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Vt=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 m=t.indexOf("-->",s+4);if(m===-1){n.push(t.slice(s));break}n.push(t.slice(s,m+3)),e=m+3;continue}let i=ys(t,s);if(i===-1){n.push(t.slice(s));break}let a=t.slice(s,i+1),c=a.startsWith("</");if(a.startsWith("<!")||a.startsWith("<?")){n.push(a),e=i+1;continue}let p=gs(a,c);if(!p){n.push(a),e=i+1;continue}let l=a.slice(p.start,p.end);if(c){let m=o[o.length-1];m?(o.pop(),n.push(m.replacementHost?`</${m.replacementHost}>`:a),jo.has(m.effectiveTag)&&--r):n.push(a),e=i+1;continue}let g=a.charCodeAt(a.length-2)===47,d=o[o.length-1],u=null;if(r===0?l==="tr"?u="trx":l==="td"?u="tdx":l==="th"&&(u="thx"):bs.has(d?.effectiveTag??"")?u=l==="tr"?null:"tr":d?.effectiveTag==="table"?u=Ts.has(l)?null:"tr":d?.effectiveTag==="tr"&&(u=l==="td"||l==="th"?null:"td"),u){let m=u==="trx"||u==="tdx"||u==="thx";n.push(`${a.slice(0,p.start)}${u} is="${m?`r-${l}`:`regor:${l}`}"${a.slice(p.end)}`)}else g&&d?.effectiveTag==="tr"?n.push(`${a.slice(0,a.length-2)}></${l}>`):n.push(a);if(!g){let m=u==="trx"?"tr":u==="tdx"?"td":u==="thx"?"th":u||l;o.push({replacementHost:u,effectiveTag:m}),jo.has(m)&&++r}e=i+1}return n.join("")};var xs="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",Es=new Set(xs.toUpperCase().split(",")),Cs="http://www.w3.org/2000/svg",$o=(t,e)=>{se(t)?t.content.appendChild(e):t.appendChild(e)},Tn=(t,e,n,o)=>{let r=t.t;if(r){let i=n&&Es.has(r.toUpperCase())?document.createElementNS(Cs,r.toLowerCase()):document.createElement(r),a=t.a;if(a)for(let f of Object.entries(a)){let p=f[0],l=f[1];p.startsWith("#")&&(l=p.substring(1),p="name"),i.setAttribute(ut(p,o),l)}let c=t.c;if(c)for(let f of c)Tn(f,i,n,o);$o(e,i);return}let s=t.d;if(s){let i;switch(t.n??Node.TEXT_NODE){case Node.COMMENT_NODE:i=document.createComment(s);break;case Node.TEXT_NODE:i=document.createTextNode(s);break}if(i)$o(e,i);else throw new Error("unsupported node type.")}},Ae=(t,e,n)=>{n??=Y.getDefault();let o=document.createDocumentFragment();if(!x(t))return Tn(t,o,!!e,n),o;for(let r of t)Tn(r,o,!!e,n);return o};var Fo=(t,e={selector:"#app"},n)=>{H(e)&&(e={selector:"#app",template:e}),Bn(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!ve(o))throw I(0);n||(n=Y.getDefault());let r=()=>{for(let a of[...o.childNodes])V(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(Vt(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=Ae(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&Mt(o,n),new xn(t,o,n).T(),D(o,()=>{ye(t)}),dt(t),{context:t,unmount:()=>{V(o)},unbind:()=>{oe(o)}}},xn=class{Et;Fe;o;h;p;constructor(e,n,o){this.Et=e,this.Fe=n,this.o=o,this.h=new Bt([e],o),this.p=new St(this.h)}T(){this.p.H(this.Fe)}};var Ke=t=>{if(x(t))return t.map(r=>Ke(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=fe(t);return o.length>0&&(e.c=[...o].map(r=>Ke(r))),e};var qo=(t,e={})=>{x(e)&&(e={props:e}),H(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 I(1,t.selector);s.remove(),t.element=s}else if(t.template){let s=document.createRange().createContextualFragment(Vt(t.template));t.element=s}else t.json&&(t.element=Ae(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),(e.useInterpolation??!0)&&Mt(t.element,e.config??Y.getDefault());let r=t.element;if(!o&&((t.isSVG??(Ye(r)&&r.hasAttribute?.("isSVG")))||Ye(r)&&r.querySelector("[isSVG]"))){let s=r.content,i=s?[...s.childNodes]:[...r.childNodes],a=Ke(i);t.element=Ae(a,!0,e.config)}return{context:n,template:t.element,inheritAttrs:e.inheritAttrs??!0,props:e.props,defaultName:e.defaultName}};var zo=t=>{Ce()?.onMounted.push(t)};var Ko=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw I(4);return e&&!n.isStopped?e(...r):(e=vs(t,n),e(...r))};return o[W]=1,xe(o,!0),o.stop=()=>n.ref?.stop?.(),K(()=>o.stop(),!0),o},vs=(t,e)=>{let n=e.ref??q(null);e.ref=n,e.isStopped=!1;let o=0,r=we(()=>{if(o>0){r(),e.isStopped=!0,F(n);return}n(t()),++o});return n.stop=r,n};var Wo=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Rs(t,e,n),o(...s))};return r[W]=1,xe(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Rs=(t,e,n)=>{let o=n.ref??q(null);n.ref=o,n.isStopped=!1;let r=0,s=a=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(...t.map(c=>c()))),++r},i=[];for(let a of t){let c=w(a,s);i.push(c)}return s(null),o.stop=()=>{i.forEach(a=>{a()})},o};var Go=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw I(4);return o&&!n.isStopped?o(...s):(o=Ss(t,e,n),o(...s))};return r[W]=1,xe(r,!0),r.stop=()=>n.ref?.stop?.(),K(()=>r.stop(),!0),r},Ss=(t,e,n)=>{let o=n.ref??q(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=w(t,s=>{if(r>0){o.stop(),n.isStopped=!0,F(o);return}o(e(s)),++r},!0),o};var Jo=t=>(t[ct]=1,t);var Qo=(t,e)=>{if(!e)throw I(5);let o=Se(t)?ae:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(J(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){L(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=we(r);return K(i,!0),t};var En=(t,...e)=>{let n="",o=t,r=e,s=o.length,i=r.length;for(let a=0;a<s;++a)n+=o[a],a<i&&(n+=r[a]);return n},Xo=En;var Yo=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(w(i,r));n&&r();let s=()=>{for(let i of o)i()};return K(s,!0),s};var Zo=t=>{if(!h(t))throw I(3,"observerCount");return t(void 0,void 0,2)};var er=t=>{Cn();try{t()}finally{vn()}},Cn=()=>{ie.stack||(ie.stack=[]),ie.stack.push(new Set)},vn=()=>{let t=ie.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 ie.stack;for(let n of e)try{F(n)}catch(o){console.error(o)}};return ir(ws);})();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "regor",
3
- "version": "1.2.9",
3
+ "version": "1.3.1",
4
4
  "description": "A modern UI framework for web and desktop applications, inspired by Vue's concepts and powered by simplicity and flexibility.",
5
5
  "author": "Ahmed Yasin Koculu",
6
6
  "license": "MIT",