regor 1.5.5 → 1.5.7

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.
@@ -808,6 +808,17 @@ var addUnbinder = (node, unbinder) => {
808
808
  getBindData(node).unbinders.push(unbinder);
809
809
  };
810
810
 
811
+ // src/common/toBoolean.ts
812
+ var toBoolean = (value) => {
813
+ if (typeof value === "string") {
814
+ const normalized = value.trim().toLowerCase();
815
+ if (normalized === "" || normalized === "0" || normalized === "false")
816
+ return false;
817
+ if (normalized === "true") return true;
818
+ }
819
+ return !!value;
820
+ };
821
+
811
822
  // src/bind/switch.ts
812
823
  var switches = {};
813
824
  var switchCounter = {};
@@ -998,7 +1009,7 @@ var IfBinder = class {
998
1009
  unmount: () => {
999
1010
  unmount(commentBegin, commentEnd);
1000
1011
  },
1001
- isTrue: () => !!value()[0],
1012
+ isTrue: () => toBoolean(value()[0]),
1002
1013
  isMounted: false
1003
1014
  },
1004
1015
  ...remainingElses
@@ -1019,7 +1030,7 @@ var IfBinder = class {
1019
1030
  const capturedContext = parser.__capture();
1020
1031
  const refresh = () => {
1021
1032
  parser.__scoped(capturedContext, () => {
1022
- if (value()[0]) {
1033
+ if (toBoolean(value()[0])) {
1023
1034
  if (!isIfMounted) {
1024
1035
  mount(nodes, this.__binder, parent, commentEnd);
1025
1036
  isIfMounted = true;
@@ -3360,30 +3371,34 @@ var classDirective = {
3360
3371
  })
3361
3372
  };
3362
3373
  var patchClass = (el, next, prev) => {
3374
+ const nextValue = unref(next);
3375
+ const prevValue = unref(prev);
3363
3376
  const classList = el.classList;
3364
- const isClassString = isString(next);
3365
- const isPrevClassString = isString(prev);
3366
- if (next && !isClassString) {
3367
- if (prev && !isPrevClassString) {
3368
- for (const key in prev) {
3369
- if (!(key in next) || !next[key]) {
3377
+ const isClassString = isString(nextValue);
3378
+ const isPrevClassString = isString(prevValue);
3379
+ if (nextValue && !isClassString) {
3380
+ const nextMap = nextValue;
3381
+ if (prevValue && !isPrevClassString) {
3382
+ const prevMap = prevValue;
3383
+ for (const key in prevMap) {
3384
+ if (!(key in nextMap) || !unref(nextMap[key])) {
3370
3385
  classList.remove(key);
3371
3386
  }
3372
3387
  }
3373
3388
  }
3374
- for (const key in next) {
3375
- if (next[key]) classList.add(key);
3389
+ for (const key in nextMap) {
3390
+ if (unref(nextMap[key])) classList.add(key);
3376
3391
  }
3377
3392
  } else {
3378
3393
  if (isClassString) {
3379
- if (prev !== next) {
3380
- const prevTokens = isPrevClassString ? toClassTokens(prev) : [];
3381
- const nextTokens = toClassTokens(next);
3394
+ if (prevValue !== nextValue) {
3395
+ const prevTokens = isPrevClassString ? toClassTokens(prevValue) : [];
3396
+ const nextTokens = toClassTokens(nextValue);
3382
3397
  if (prevTokens.length > 0) classList.remove(...prevTokens);
3383
3398
  if (nextTokens.length > 0) classList.add(...nextTokens);
3384
3399
  }
3385
- } else if (prev) {
3386
- const prevTokens = isPrevClassString ? toClassTokens(prev) : [];
3400
+ } else if (prevValue) {
3401
+ const prevTokens = isPrevClassString ? toClassTokens(prevValue) : [];
3387
3402
  if (prevTokens.length > 0) classList.remove(...prevTokens);
3388
3403
  }
3389
3404
  }
@@ -4024,7 +4039,7 @@ var updateShow = (el, values) => {
4024
4039
  if (isUndefined(originalDisplay)) {
4025
4040
  originalDisplay = data._ord = el.style.display;
4026
4041
  }
4027
- const isVisible = !!values[0];
4042
+ const isVisible = toBoolean(values[0]);
4028
4043
  if (isVisible) el.style.display = originalDisplay;
4029
4044
  else el.style.display = "none";
4030
4045
  };
@@ -4060,26 +4075,30 @@ var styleDirective = {
4060
4075
  })
4061
4076
  };
4062
4077
  var patchStyle = (el, next, prev) => {
4078
+ const nextValue = unref(next);
4079
+ const prevValue = unref(prev);
4063
4080
  const style = el.style;
4064
- const isCssString = isString(next);
4065
- if (next && !isCssString) {
4066
- if (prev && !isString(prev)) {
4067
- for (const key in prev) {
4068
- if (next[key] == null) {
4081
+ const isCssString = isString(nextValue);
4082
+ if (nextValue && !isCssString) {
4083
+ const nextMap = nextValue;
4084
+ if (prevValue && !isString(prevValue)) {
4085
+ const prevMap = prevValue;
4086
+ for (const key in prevMap) {
4087
+ if (unref(nextMap[key]) == null) {
4069
4088
  setStyle(style, key, "");
4070
4089
  }
4071
4090
  }
4072
4091
  }
4073
- for (const key in next) {
4074
- setStyle(style, key, next[key]);
4092
+ for (const key in nextMap) {
4093
+ setStyle(style, key, nextMap[key]);
4075
4094
  }
4076
4095
  } else {
4077
4096
  const currentDisplay = style.display;
4078
4097
  if (isCssString) {
4079
- if (prev !== next) {
4080
- style.cssText = next;
4098
+ if (prevValue !== nextValue) {
4099
+ style.cssText = nextValue;
4081
4100
  }
4082
- } else if (prev) {
4101
+ } else if (prevValue) {
4083
4102
  el.removeAttribute("style");
4084
4103
  }
4085
4104
  const data = getBindData(el).data;
@@ -4089,24 +4108,25 @@ var patchStyle = (el, next, prev) => {
4089
4108
  };
4090
4109
  var importantRE = /\s*!important$/;
4091
4110
  function setStyle(style, name, val) {
4092
- if (isArray(val)) {
4093
- val.forEach((v) => {
4111
+ const value = unref(val);
4112
+ if (isArray(value)) {
4113
+ value.forEach((v) => {
4094
4114
  setStyle(style, name, v);
4095
4115
  });
4096
4116
  } else {
4097
- if (val == null) val = "";
4117
+ const cssValue = value == null ? "" : String(value);
4098
4118
  if (name.startsWith("--")) {
4099
- style.setProperty(name, val);
4119
+ style.setProperty(name, cssValue);
4100
4120
  } else {
4101
4121
  const prefixed = autoPrefix(style, name);
4102
- if (importantRE.test(val)) {
4122
+ if (importantRE.test(cssValue)) {
4103
4123
  style.setProperty(
4104
4124
  hyphenate(prefixed),
4105
- val.replace(importantRE, ""),
4125
+ cssValue.replace(importantRE, ""),
4106
4126
  "important"
4107
4127
  );
4108
4128
  } else {
4109
- style[prefixed] = val;
4129
+ style[prefixed] = cssValue;
4110
4130
  }
4111
4131
  }
4112
4132
  }
@@ -6385,8 +6405,8 @@ var createApp = (context, template = { selector: "#app" }, config) => {
6385
6405
  }
6386
6406
  };
6387
6407
  const appendChildren = (childNodes) => {
6388
- for (const child of childNodes) {
6389
- root.appendChild(child);
6408
+ while (childNodes.length > 0) {
6409
+ root.appendChild(childNodes[0]);
6390
6410
  }
6391
6411
  };
6392
6412
  if (template.template) {
@@ -1,3 +1,3 @@
1
- "use strict";var ht=Object.defineProperty,Vr=Object.defineProperties,Pr=Object.getOwnPropertyDescriptor,Dr=Object.getOwnPropertyDescriptors,Ur=Object.getOwnPropertyNames,Xn=Object.getOwnPropertySymbols;var Yn=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable;var yt=Math.pow,hn=(t,e,n)=>e in t?ht(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,gt=(t,e)=>{for(var n in e||(e={}))Yn.call(e,n)&&hn(t,n,e[n]);if(Xn)for(var n of Xn(e))Hr.call(e,n)&&hn(t,n,e[n]);return t},Zn=(t,e)=>Vr(t,Dr(e));var Br=(t,e)=>{for(var n in e)ht(t,n,{get:e[n],enumerable:!0})},jr=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Ur(e))!Yn.call(t,r)&&r!==n&&ht(t,r,{get:()=>e[r],enumerable:!(o=Pr(e,r))||o.enumerable});return t};var $r=t=>jr(ht({},"__esModule",{value:!0}),t);var m=(t,e,n)=>hn(t,typeof e!="symbol"?e+"":e,n);var eo=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(l){r(l)}},i=c=>{try{a(n.throw(c))}catch(l){r(l)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var Pi={};Br(Pi,{ComponentHead:()=>We,ContextRegistry:()=>ln,RegorConfig:()=>le,addUnbinder:()=>z,batch:()=>Ir,collectRefs:()=>Dt,computeMany:()=>Sr,computeRef:()=>vr,computed:()=>wr,createApp:()=>Cr,defineComponent:()=>Er,drainUnbind:()=>no,endBatch:()=>Qn,entangle:()=>Ye,flatten:()=>ce,getBindData:()=>Le,html:()=>pn,isDeepRef:()=>je,isRaw:()=>Ze,isRef:()=>x,markRaw:()=>Ar,observe:()=>se,observeMany:()=>kr,observerCount:()=>Lr,onMounted:()=>Rr,onUnmounted:()=>re,pause:()=>Yt,persist:()=>Nr,pval:()=>uo,raw:()=>Or,ref:()=>Ce,removeNode:()=>W,resume:()=>Zt,silence:()=>Pt,sref:()=>ae,startBatch:()=>Jn,svg:()=>Mr,toFragment:()=>qe,toJsonTemplate:()=>rt,trigger:()=>Z,unbind:()=>ge,unref:()=>B,useScope:()=>Vt,warningHandler:()=>He,watchEffect:()=>$e});module.exports=$r(Pi);var ze=Symbol(":regor");var ge=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];_r(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},_r=t=>{let e=t[ze];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[ze]=void 0};var Ke=[],bt=!1,Tt,to=()=>{if(bt=!1,Tt=void 0,Ke.length!==0){for(let t=0;t<Ke.length;++t)ge(Ke[t]);Ke.length=0}},W=t=>{t.remove(),Ke.push(t),bt||(bt=!0,Tt=setTimeout(to,1))},no=()=>eo(null,null,function*(){Ke.length===0&&!bt||(Tt&&clearTimeout(Tt),to())});var G=t=>typeof t=="function",J=t=>typeof t=="string",oo=t=>typeof t=="undefined",de=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),Fr=Object.prototype.toString,yn=t=>Fr.call(t),Oe=t=>yn(t)==="[object Map]",fe=t=>yn(t)==="[object Set]",gn=t=>yn(t)==="[object Date]",it=t=>typeof t=="symbol",w=Array.isArray,N=t=>t!==null&&typeof t=="object";var ro={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},_=(t,...e)=>{let n=ro[t];return new Error(G(n)?n.call(ro,...e):n)};var xt=[],so=()=>{let t={onMounted:[],onUnmounted:[]};return xt.push(t),t},Ue=t=>{let e=xt[xt.length-1];if(!e&&!t)throw _(2);return e},io=t=>{let e=Ue();return t&&Tn(t),xt.pop(),e},bn=Symbol("csp"),Tn=t=>{let e=t,n=e[bn];if(n){let o=Ue();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[bn]=Ue()},Ct=t=>t[bn];var Me=t=>{var n,o;let e=(n=Ct(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var ao={8:t=>`Model binding requires a ref at ${t.outerHTML}`,7:t=>`Model binding is not supported on ${t.tagName} element at ${t.outerHTML}`,0:(t,e)=>`${t} binding expression is missing at ${e.outerHTML}`,1:(t,e,n)=>`invalid ${t} expression: ${e} at ${n.outerHTML}`,2:(t,e)=>`${t} requires object expression at ${e.outerHTML}`,3:(t,e)=>`${t} binder: key is empty on ${e.outerHTML}.`,4:(t,e,n,o)=>({msg:`Failed setting prop "${t}" on <${e.toLowerCase()}>: value ${n} is invalid.`,args:[o]}),5:(t,e)=>`${t} binding missing event type at ${e.outerHTML}`,6:(t,e)=>({msg:t,args:[e]})},H=(t,...e)=>{let n=ao[t],o=G(n)?n.call(ao,...e):n,r=He.warning;r&&(J(o)?r(o):r(o,...o.args))},He={warning:console.warn};var Et=Symbol("ref"),te=Symbol("sref"),Rt=Symbol("raw");var x=t=>t!=null&&t[te]===1;var ke=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},Te=(t,e)=>{throw new ke(t,`${e}.`)},wt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(x(t))return`ref<${wt(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},qr=t=>t.length>60?`${t.slice(0,57)}...`:t,at=(t,e=0)=>{if(e>1)return"unknown";if(x(t)){let s=t();return`ref(${at(s,e+1)})`}if(typeof t=="string")return qr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>at(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(N(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let l=at(c,e+1);return`${a}: ${l}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ue=t=>{if(x(t))return`got ${wt(t)}(${at(t())})`;let e=wt(t),n=at(t);return`got ${e} (${n})`},zr=t=>t instanceof ke?t.detail:t instanceof Error?t.message:String(t),co=(t,e)=>{let n=`, ${ue(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Kr=(t,e,n)=>{if(e instanceof ke){if(e.propPath===t)return co(e.detail,n);if(e.propPath===`${t}.value`&&x(n)){let o=co(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return zr(e)},Wr=(t,e,n)=>{let o=[];for(let r of e){let s=Kr(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ue(n):o.length===1?`${o[0]}, ${ue(n)}`:`${o.join(" or ")}, ${ue(n)}`},Gr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":wt(t),Jr=(t,e)=>{typeof t!="string"&&Te(e,`expected string, ${ue(t)}`)},Qr=(t,e)=>{typeof t!="number"&&Te(e,`expected number, ${ue(t)}`)},Xr=(t,e)=>{typeof t!="boolean"&&Te(e,`expected boolean, ${ue(t)}`)},Yr=t=>(e,n)=>{e instanceof t||Te(n,`expected instance of ${t.name||"provided class"}, ${ue(e)}`)},Zr=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},es=t=>(e,n,o)=>{e!==null&&t(e,n,o)},ts=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}Te(n,Wr(n,r,e))},ns=t=>(e,n)=>{t.includes(e)||Te(n,`expected one of ${t.map(o=>Gr(o)).join(", ")}, ${ue(e)}`)},os=t=>(e,n,o)=>{w(e)||Te(n,`expected array, ${ue(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function rs(t){return(e,n,o)=>{N(e)||Te(n,`expected object, ${ue(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var ss=t=>(e,n,o)=>{if(x(e)){t(e(),`${n}.value`,o);return}Te(n,`expected ref, ${ue(e)}`)},uo={fail:Te,describe:ue,isString:Jr,isNumber:Qr,isBoolean:Xr,isClass:Yr,optional:Zr,nullable:es,or:ts,oneOf:ns,arrayOf:os,shape:rs,refOf:ss};var is=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof ke?n.propPath:e,s=n instanceof ke?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},We=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=is(this.G,o,i);if(this.J==="warn"){He.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)W(e),e=e.nextSibling;for(let o of this.ctx)Me(o)}};var Le=t=>{let e=t,n=e[ze];if(n)return n;let o={unbinders:[],data:{}};return e[ze]=o,o};var z=(t,e)=>{Le(t).unbinders.push(e)};var vt={},St={},fo=1,lo=t=>{let e=(fo++).toString();return vt[e]=t,St[e]=0,e},xn=t=>{St[t]+=1},Cn=t=>{--St[t]===0&&(delete vt[t],delete St[t])},po=t=>vt[t],En=()=>fo!==1&&Object.keys(vt).length>0,ct="r-switch",as=t=>{let e=t.filter(o=>Re(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ct))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ge=(t,e)=>{if(!En())return;let n=as(e);n.length!==0&&(n.forEach(xn),z(t,()=>{n.forEach(Cn)}))};var At=()=>{},Rn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Ie(e,r)},wn=Symbol("r-if"),mo=Symbol("r-else"),ho=t=>t[mo]===1,Nt=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=Mt(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.O.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[wn]?!0:(e[wn]=!0,Ot(e,this.ge).forEach(n=>n[wn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){H(0,this.N,e);return}e.removeAttribute(this.N),this.M(e,n)}U(e,n,o){let r=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),Ge(i,r),r.forEach(c=>{W(c)}),e.remove(),n!=="if"&&(e[mo]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{Rn(r,this.o,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),l=this.o.m.V(r),f=l.value,u=this.be(o,n),p=At;return z(a,()=>{l.stop(),p(),p=At}),p=l.subscribe(n),[{mount:()=>{Rn(s,this.o,i,c)},unmount:()=>{we(a,c)},isTrue:()=>!!f()[0],isMounted:!1},...u]}}M(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.V(n),l=c.value,f=!1,u=this.o.m,p=u.L(),h=()=>{u.E(p,()=>{if(l()[0])f||(Rn(r,this.o,s,a),f=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{we(i,a),f=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=At;z(i,()=>{c.stop(),d(),d=At}),h(),d=c.subscribe(h)}};var Je=t=>{let e=he(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Ie=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(ho(o)||t.$(o))}},Ot=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},he=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,ut=t=>t.nodeType===Node.ELEMENT_NODE,yo=t=>t instanceof HTMLSlotElement,Se=t=>he(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;W(n),n=o}},go=function(){return this()},cs=function(t){return this(t)},us=()=>{throw new Error("value is readonly.")},fs={get:go,set:cs,enumerable:!0,configurable:!1},ls={get:go,set:us,enumerable:!0,configurable:!1},Ve=(t,e)=>{Object.defineProperty(t,"value",e?ls:fs)},bo=(t,e)=>{if(!t)return!1;if(t.startsWith("["))return t.substring(1,t.length-1);let n=e.length;return t.startsWith(e)?t.substring(n,t.length-n):!1},Mt=t=>`[${CSS.escape(t)}]`,kt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),Sn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ps=/-(\w)/g,F=Sn(t=>t&&t.replace(ps,(e,n)=>n?n.toUpperCase():"")),ms=/\B([A-Z])/g,Qe=Sn(t=>t&&t.replace(ms,"-$1").toLowerCase()),ft=Sn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var Lt={mount:()=>{}};var Xe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var It=t=>{var n,o;let e=(n=Ct(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var vn=Symbol("scope"),Vt=t=>{try{so();let e=t();Tn(e);let n={context:e,unmount:()=>Me(e),[vn]:1};return n[vn]=1,n}finally{io()}},To=t=>N(t)?vn in t:!1;var An={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(N(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(x(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=Ue(e))==null||n.onUnmounted.push(t)};var se=(t,e,n,o=!0)=>{if(!x(t))throw _(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var Ye=(t,e)=>{if(t===e)return()=>{};let n=se(t,r=>e(r)),o=se(e,r=>t(r));return e(t()),()=>{n(),o()}};var Ze=t=>!!t&&t[Rt]===1;var je=t=>(t==null?void 0:t[Et])===1;var ye=[],xo=t=>{var e;ye.length!==0&&((e=ye[ye.length-1])==null||e.add(t))},$e=t=>{if(!t)return()=>{};let e={stop:()=>{}};return ds(t,e),re(()=>e.stop(),!0),e.stop},ds=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(ye.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),$e(t)});n.push(a)}}finally{ye.pop()}},Pt=t=>{let e=ye.length,n=e>0&&ye[e-1];try{return n&&ye.push(null),t()}finally{n&&ye.pop()}},Dt=t=>{try{let e=new Set;return ye.push(e),{value:t(),refs:[...e]}}finally{ye.pop()}};var Z=(t,e,n)=>{if(!x(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)Z(s,e,!0);else if(Oe(r))for(let s of r)Z(s[0],e,!0),Z(s[1],e,!0);if(N(r))for(let s in r)Z(r[s],e,!0)}};function hs(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var et=(t,e,n)=>{n.forEach(function(o){let r=t[o];hs(e,o,function(...i){let a=r.apply(this,i),c=this[te];for(let l of c)Z(l);return a})})},Ut=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Co=Array.prototype,Nn=Object.create(Co),ys=["push","pop","shift","unshift","splice","sort","reverse"];et(Co,Nn,ys);var Eo=Map.prototype,Ht=Object.create(Eo),gs=["set","clear","delete"];Ut(Ht,"Map");et(Eo,Ht,gs);var Ro=Set.prototype,Bt=Object.create(Ro),bs=["add","clear","delete"];Ut(Bt,"Set");et(Ro,Bt,bs);var xe={},ae=t=>{if(x(t)||Ze(t))return t;let e={auto:!0,_value:t},n=c=>N(c)?te in c?!0:w(c)?(Object.setPrototypeOf(c,Nn),!0):fe(c)?(Object.setPrototypeOf(c,Bt),!0):Oe(c)?(Object.setPrototypeOf(c,Ht),!0):!1:!1,o=n(t),r=new Set,s=(c,l)=>{if(xe.stack&&xe.stack.length){xe.stack[xe.stack.length-1].add(a);return}r.size!==0&&Pt(()=>{for(let f of[...r.keys()])r.has(f)&&f(c,l)})},i=c=>{let l=c[te];l||(c[te]=l=new Set),l.add(a)},a=(...c)=>{if(!(2 in c)){let f=c[0],u=c[1];return 0 in c?e._value===f||x(f)&&(f=f(),e._value===f)?f:(n(f)&&i(f),e._value=f,e.auto&&s(f,u),e._value):(xo(a),e._value)}switch(c[2]){case 0:{let f=c[3];if(!f)return()=>{};let u=p=>{r.delete(p)};return r.add(f),()=>{u(f)}}case 1:{let f=c[1],u=e._value;s(u,f);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[te]=1,Ve(a,!1),o&&i(t),a};var Ce=t=>{if(Ze(t))return t;let e;if(x(t)?(e=t,t=e()):e=ae(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Et]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];je(r)||(t[o]=Ce(r))}return e}if(!N(t))return e;for(let n of Object.entries(t)){let o=n[1];if(je(o))continue;let r=n[0];it(r)||(t[r]=null,t[r]=Ce(o))}return e};var wo=Symbol("modelBridge"),jt=()=>{},Ts=t=>!!(t!=null&&t[wo]),xs=t=>{t[wo]=1},Cs=t=>{let e=Ce(t());return xs(e),e},So={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return jt;let n=F(e),o,r,s=jt,i=()=>{s(),s=jt,o=void 0,r=void 0},a=()=>{s(),s=jt},c=(f,u)=>{o!==f&&(a(),s=Ye(f,u),o=f)},l=()=>{var h;let f=(h=t.refs[0])!=null?h:t.value()[0],u=t.context,p=u[n];if(!x(f)){if(r&&p===r){r(f);return}if(i(),x(p)){p(f);return}u[n]=f;return}if(Ts(f)){if(p===f)return;x(p)?c(f,p):u[n]=f;return}r||(r=Cs(f)),u[n]=r,c(f,r)};return{update:()=>{l()},unmount:()=>{s()}}}};var $t=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Qe)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!he(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return he(e)&&e.getAttributeNames().length===0}ot(e){var l,f;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let u of c){if(u.hasAttribute(n.R))continue;let p=u.parentNode;if(!p)continue;let h=u.nextSibling,g=F(u.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=u.parentElement;if(!R)continue;let k=new Comment(" begin component: "+u.tagName),X=new Comment(" end component: "+u.tagName);R.insertBefore(k,u),u.remove();let P=n.r.p.context,U=n.r.p.contextAlias,pe=n.r.p.bind,Y=(f=(l=E.props)==null?void 0:l.map(F))!=null?f:[],L=(C,A)=>{let y={},$=C.hasAttribute(P);return o.E(A,()=>{if(o.w(y),$?n.y(An,C,P):C.hasAttribute(U)&&n.y(An,C,U),Y.length===0)return;let D=new Map(Y.map(S=>[S.toLowerCase(),S]));for(let S of[...Y,...Y.map(Qe)]){let V=C.getAttribute(S);V!==null&&(y[F(S)]=V,C.removeAttribute(S))}let Q=n.F.Ce(C,!1);for(let[S,V]of Q.entries()){let[v,K]=V.te;if(!K)continue;let ie=D.get(F(K).toLowerCase());ie&&(v!=="."&&v!==":"&&v!==pe||n.y(So,C,S,!0,ie,V.ne))}}),y},b=[...o.L()],O=()=>{var $;let C=L(u,b),A=new We(C,u,b,k,X,n.r.propValidationMode),y=Vt(()=>{var D;return(D=E.context(A))!=null?D:{}}).context;if(A.autoProps){for(let[D,Q]of Object.entries(C))if(D in y){let S=y[D];if(S===Q)continue;if(x(S)){x(Q)?A.entangle?z(k,Ye(Q,S)):S(Q()):S(Q);continue}}else y[D]=Q;for(let D of Y)D in y||(y[D]=void 0);($=A.onAutoPropsAssigned)==null||$.call(A)}return{componentCtx:y,head:A}},{componentCtx:j,head:De}=O(),me=[...Se(T)],mn=me.length,I=u.childNodes.length===0,st=C=>{var Q;let A=C.parentElement,y=C.name;if(q(y)&&(y=C.getAttributeNames().filter(S=>S.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),I){if(y==="default"){let S=n.r.p.text,V=u.getAttribute(S);if(!q(V)){let v=document.createElement("span");v.setAttribute(S,V),A.insertBefore(v,C),u.removeAttribute(S);return}}for(let S of[...C.childNodes])A.insertBefore(S,C);return}let $=u.querySelector(`template[name='${y}'], template[\\#${y}]`);!$&&y==="default"&&($=(Q=[...u.querySelectorAll("template:not([name])")].find(V=>this.ct(V)))!=null?Q:null);let D=S=>{De.enableSwitch&&o.E(b,()=>{o.w(j);let V=L(C,o.L());o.E(b,()=>{o.w(V);let v=o.L(),K=lo(v);for(let ie of S)Re(ie)&&(ie.setAttribute(ct,K),xn(K),z(ie,()=>{Cn(K)}))})})};if($){let S=[...Se($)];for(let V of S)A.insertBefore(V,C);D(S)}else{if(y!=="default"){for(let V of[...Se(C)])A.insertBefore(V,C);return}let S=[...Se(u)].filter(V=>!this.at(V));for(let V of S)A.insertBefore(V,C);D(S)}},M=C=>{if(!Re(C))return;let A=C.querySelectorAll("slot");if(yo(C)){st(C),C.remove();return}for(let y of A)st(y),y.remove()};(()=>{for(let C=0;C<mn;++C)me[C]=me[C].cloneNode(!0),p.insertBefore(me[C],h),M(me[C])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let C=me.filter(y=>y.nodeType===Node.ELEMENT_NODE);C.length>1&&(C=C.filter(y=>y.hasAttribute(this.xe)));let A=C[0];if(A)for(let y of u.getAttributeNames()){if(y===P||y===U)continue;let $=u.getAttribute(y);if(y==="class"){let D=Xe($);D.length>0&&A.classList.add(...D)}else if(y==="style"){let D=A.style,Q=u.style;for(let S of Q)D.setProperty(S,Q.getPropertyValue(S))}else A.setAttribute(kt(y,n.r),$)}},oe=()=>{for(let C of u.getAttributeNames())!C.startsWith("@")&&!C.startsWith(n.r.p.on)&&u.removeAttribute(C)},Ee=()=>{ne(),oe(),o.w(j),n.we(u,!1),j.$emit=De.emit,Ie(n,me),z(u,()=>{Me(j)}),z(k,()=>{ge(u)}),It(j)};o.E(b,Ee)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Qe)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Re(i)&&r.push(i)}return r}return[]}};var On=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"ve",[]);this.te=e,this.ne=n}},_t=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"re");var o;this.o=e,this.Se=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],l=!1,f=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!l&&h==="camel"?l=!0:!f&&h==="prop"&&(f=!0),l&&f)break}l&&(a[a.length-1]=F(a[a.length-1])),f&&(a[0]=".");let u={terms:a,flags:c};return this.re.set(e,u),u}Ce(e,n){let o=new Map;if(!ut(e))return o;let r=this.Ae,s=(a,c)=>{var f;let l=r.get((f=c[0])!=null?f:"");if(l)for(let u=0;u<l.length;++u){if(!c.startsWith(l[u]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new On(h.terms,h.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var l;let c=a.attributes;if(!(!c||c.length===0))for(let f=0;f<c.length;++f){let u=(l=c.item(f))==null?void 0:l.name;u&&s(a,u)}};return i(e),!n||!e.firstElementChild||this.o.O.j(e,i),o}};var vo=()=>{},Es=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},Ft=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.O.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.M(e,n)}U(e,n){let o=Je(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),Ge(s,o),o.forEach(a=>{W(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}M(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.V(n),c=a.value,l=this.o.m,f=l.L(),u={name:""},p=he(e)?o:[...o[0].childNodes],h=()=>{l.E(f,()=>{var R;let E=c()[0];if(N(E)&&(E.name?E=E.name:E=(R=Object.entries(l.ee()).filter(k=>k[1]===E)[0])==null?void 0:R[0]),!J(E)||q(E)){we(s,i);return}if(u.name===E)return;we(s,i);let T=document.createElement(E);for(let k of e.getAttributeNames())k!==this.I&&T.setAttribute(k,e.getAttribute(k));Es(p,T),r.insertBefore(T,i),this.o.$(T),u.name=E})},g=vo;z(s,()=>{a.stop(),g(),g=vo}),h(),g=a.subscribe(h)}};var B=t=>{let e=t;return e!=null&&e[te]===1?e():e};var Rs=(t,e)=>{let[n,o]=e;G(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},qt={mount:()=>({update:({el:t,values:e})=>{Rs(t,e)}})};var zt=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let l=e.F,f=[],u=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=F(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let k=T.attributes;for(let X=0;X<k.length;++X){let P=(h=k.item(X))==null?void 0:h.name;if(!P)continue;if(i.has(P))return;let{terms:U,flags:pe}=l.ke(P),[Y,L]=U,b=(g=a[P])!=null?g:a[Y];if(b){if(b===qt)return;f.push({nodeIndex:u,attrName:P,directive:b,option:L,flags:pe})}}++u}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(f.length!==0)return new t(f)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var ws=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Ss=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let l=t[c];if(l===0)continue;let f=o[o.length-1];if(f===void 0||t[f]<l){n[c]=f!=null?f:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<l?r=i+1:s=i;l<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},Kt=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,l=n.length,f=o.length,u=new Array(f),p=new Set;for(let b=0;b<f;++b){let O=r(o[b]);if(O===void 0||p.has(O))return;p.add(O),u[b]=O}let h=new Array(f),g=0,d=l-1,E=f-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==u[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==u[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let O=b+1<f?h[b+1].items[0]:c;h[b]=i(b,o[b],O)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,k=E-R+1,X=new Array(k).fill(0),P=new Map;for(let b=R;b<=E;++b)P.set(u[b],b);let U=!1,pe=0;for(let b=T;b<=d;++b){let O=n[b],j=P.get(r(O.value));if(j===void 0){a(O);continue}if(!s(O.value,o[j])){a(O);continue}O.value=o[j],h[j]=O,X[j-R]=b+1,j>=pe?pe=j:U=!0}let Y=U?Ss(X):[],L=Y.length-1;for(let b=k-1;b>=0;--b){let O=R+b,j=O+1<f?h[O+1].items[0]:c;if(X[b]===0){h[O]=i(O,o[O],j);continue}let De=h[O];U&&(L>=0&&Y[L]===b?--L:De&&ws(De,j))}return h}};var lt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get v(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ie(e)}yt(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Oe(e){let n=this.v;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var Mn=Symbol("r-for"),vs=t=>-1,Ao=()=>{},Gt=class Gt{constructor(e){m(this,"o");m(this,"x");m(this,"Me");m(this,"R");this.o=e,this.x=e.r.p.for,this.Me=Mt(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Ve(e),this.o.O.j(e,o=>{o.hasAttribute(this.x)&&this.Ve(o)}),n}Y(e){return e[Mn]?!0:(e[Mn]=!0,Ot(e,this.Me).forEach(n=>n[Mn]=!0),!1)}Ve(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){H(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return de(e)?[]:(G(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var st;let o=this.bt(n);if(!(o!=null&&o.list)){H(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(st=e.getAttribute(r))!=null?st:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Je(e),c=zt.ft(this.o,a),l=e.parentNode;if(!l)return;let f=`${this.x} => ${n}`,u=new Comment(`__begin__ ${f}`);l.insertBefore(u,e),Ge(u,a),a.forEach(M=>{W(M)}),e.remove();let p=new Comment(`__end__ ${f}`);l.insertBefore(p,u.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),k=(M,ee)=>R(M)===R(ee),X=(M,ee)=>M===ee,P=(M,ee,ne)=>{let oe=o.createContext(ee,M),Ee=lt.mt(oe.index,ee),C=()=>{var D,Q;let A=(Q=(D=p.parentNode)!=null?D:u.parentNode)!=null?Q:l,y=ne.previousSibling,$=[];for(let S=0;S<a.length;++S){let V=a[S].cloneNode(!0);A.insertBefore(V,ne),$.push(V)}for(c?c.y(h,$):Ie(h,$),y=y.nextSibling;y!==ne;)Ee.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,C)):g.E(d,()=>{g.w(oe.ctx),C()}),Ee},U=(M,ee)=>{let ne=I.D(M).items,oe=ne[ne.length-1].nextSibling;for(let Ee of ne)W(Ee);I.ce(M,P(M,ee,oe))},pe=(M,ee)=>{I.w(P(M,ee,p))},Y=M=>{for(let ee of I.D(M).items)W(ee)},L=M=>{let ee=I.v;for(let ne=M;ne<ee;++ne)I.D(ne).index(ne)},b=M=>{let ee=u.parentNode,ne=p.parentNode;if(!ee||!ne)return;let oe=I.v;G(M)&&(M=M());let Ee=B(M[0]);if(w(Ee)&&Ee.length===0){we(u,p),I.Oe(0);return}let C=[];for(let v of this.Le(M[0]))C.push(v);let A=Kt.dt({oldItems:I.T,newValues:C,getKey:R,isSameValue:X,mountNewValue:(v,K,ie)=>P(v,K,ie),removeMountItem:v=>{for(let K=0;K<v.items.length;++K)W(v.items[K])},endAnchor:p});if(A){I.T=A,I.P.clear();for(let v=0;v<A.length;++v){let K=A[v];K.order=v,K.index(v);let ie=R(K.value);ie!==void 0&&I.P.set(ie,K)}return}let y=0,$=Number.MAX_SAFE_INTEGER,D=oe,Q=this.o.r.forGrowThreshold,S=()=>I.v<D+Q;for(let v of C){let K=()=>{if(y<oe){let ie=I.D(y++);if(k(ie.value,v)){if(X(ie.value,v))return;U(y-1,v);return}let dt=I.ht(R(v));if(dt>=y&&dt-y<10){if(--y,$=Math.min($,y),Y(y),I.Ne(y),--oe,dt>y+1)for(let dn=y;dn<dt-1&&dn<oe&&!k(I.D(y).value,v);)++dn,Y(y),I.Ne(y),--oe;K();return}S()?(I.yt(y-1,P(y,v,I.D(y-1).items[0])),$=Math.min($,y-1),++oe):U(y-1,v)}else pe(y++,v)};K()}let V=y;for(oe=I.v;y<oe;)Y(y++);I.Oe(V),L($)},O=()=>{j.stop(),me(),me=Ao},j=g.V(o.list),De=j.value,me=Ao,mn=0,I=new lt(R);for(let M of this.Le(De()[0]))I.w(P(mn++,M,p));z(u,O),me=j.subscribe(b)}bt(e){var c,l;let n=Gt.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(f=>f.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(l=o[r])!=null&&l.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(f,u)=>{let p={},h=B(f);if(!a&&o.length===1)p[o[0]]=f;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:vs};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ae(u)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=B(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return B((r=B(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=B(o))==null?void 0:r[s];return B(o)}};m(Gt,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Wt=Gt;var Jt=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"O");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new Wt(this),this.Pe=new Nt(this),this.Ue=new Ft(this),this.O=new $t(this),this.F=new _t(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=he(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Ie(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.O.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,z(s,()=>{W(e)}),o.appendChild(e),!0}vt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,l]=a.te,f=(s=r[i])!=null?s:r[c];if(!f){console.error("directive not found:",c);continue}let u=a.ve;for(let p=0;p<u.length;++p){let h=u[p];this.y(f,h,i,!1,l,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=l=>{let f=l;for(;f;){let u=f.getAttribute(ct);if(u)return u;f=f.parentElement}return null};if(En()){let l=c(n);if(l){this.m.E(po(l),()=>{this.M(e,n,a,s,i)});return}}this.M(e,n,a,s,i)}St(e,n,o){return e!==Lt?!1:(q(o)||this.He(n,o)||this.vt(n,o),!0)}M(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);z(n,c.stop);let l=this.Ot(n,o,a,i,r,s),f=this.Mt(e,l,c);if(!f)return;let u=this.Vt(l,a,i,r,f);u(),e.once||(c.result=a.subscribe(u),i&&(c.dynamic=i.subscribe(u)))}At(e,n){let o=bo(e,this.Be);if(o)return this.m.V(F(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.V(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Ot(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Mt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Vt(e,n,o,r,s){let i,a;return()=>{let c=n.value(),l=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=l,e.previousOption=a,i=c,a=l,s(e)}}};var No="http://www.w3.org/1999/xlink",As={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 Ns(t){return!!t||t===""}var Os=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=F(o)),Qt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let l=e[c];if(w(l)){let f=(a=n==null?void 0:n[c])==null?void 0:a[0],u=l[0],p=l[1];Qt(t,u,p,f)}else if(N(l))for(let f of Object.entries(l)){let u=f[0],p=f[1],h=n==null?void 0:n[c],g=h&&u in h?u:void 0;Qt(t,u,p,g)}else{let f=n==null?void 0:n[c],u=e[c++],p=e[c];Qt(t,u,p,f)}}},kn={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Os(t,e,n,o,r,s)}})},Qt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),de(e)){H(3,"r-bind",t);return}if(!J(e)){H(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){de(n)?t.removeAttributeNS(No,e.slice(6,e.length)):t.setAttributeNS(No,e,n);return}let r=e in As;de(n)||r&&!Ns(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var Ms=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Oo(t,s[c],i==null?void 0:i[c])}else Oo(t,s,i)}},Ln={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Ms(t,e,n)}})},Oo=(t,e,n)=>{let o=t.classList,r=J(e),s=J(n);if(e&&!r){if(n&&!s)for(let i in n)(!(i in e)||!e[i])&&o.remove(i);for(let i in e)e[i]&&o.add(i)}else if(r){if(n!==e){let i=s?Xe(n):[],a=Xe(e);i.length>0&&o.remove(...i),a.length>0&&o.add(...a)}}else if(n){let i=s?Xe(n):[];i.length>0&&o.remove(...i)}};function ks(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=ve(t[o],e[o]);return n}function ve(t,e){if(t===e)return!0;let n=gn(t),o=gn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=it(t),o=it(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?ks(t,e):!1;if(n=N(t),o=N(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!ve(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Xt(t,e){return t.findIndex(n=>ve(n,e))}var Mo=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Yt=t=>{if(!x(t))throw _(3,"pause");t(void 0,void 0,3)};var Zt=t=>{if(!x(t))throw _(3,"resume");t(void 0,void 0,4)};var Lo={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{Ls(t,o[0])},unmount:Is(t,e,n)})},Ls=(t,e)=>{let n=Do(t);if(n&&Io(t))w(e)?e=Xt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=Bs(t,e),t.checked=e;else if(n&&Vo(t))t.checked=ve(e,Ae(t));else if(n||Uo(t))Po(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Ho(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=Xt(e,c)>-1:a.selected=e.has(c);else if(ve(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else H(7,t)},pt=t=>(x(t)&&(t=t()),G(t)&&(t=t()),t?J(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}),Io=t=>t.type==="checkbox",Vo=t=>t.type==="radio",Po=t=>t.type==="number"||t.type==="range",Do=t=>t.tagName==="INPUT",Uo=t=>t.tagName==="TEXTAREA",Ho=t=>t.tagName==="SELECT",Is=(t,e,n)=>{let o=e.value,r=pt(n==null?void 0:n.join(",")),s=pt(o()[1]),i={int:r.int||s.int,lazy:r.lazy||s.lazy,number:r.number||s.number,trim:r.trim||s.trim};if(!e.refs[0])return H(8,t),()=>{};let a=()=>e.refs[0],c=Do(t);return c&&Io(t)?Ps(t,a):c&&Vo(t)?js(t,a):c||Uo(t)?Vs(t,i,a,o):Ho(t)?$s(t,a,o):(H(7,t),()=>{})},ko=/[.,' ·٫]/,Vs=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Po(t),a=()=>{!e.trim&&!pt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},l=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},f=()=>{t.removeEventListener(s,u),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",l),t.removeEventListener("change",l)},u=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=pt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(ko.test(d[d.length-1])&&d.split(ko).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,u),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",l),t.addEventListener("change",l),f},Ps=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let l=Xt(c,i),f=l!==-1;a&&!f?c.push(i):!a&&f&&c.splice(l,1)}else fe(c)?a?c.add(i):c.delete(i):s(Hs(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,Bo="trueValue",Ds="falseValue",jo="true-value",Us="false-value",Hs=(t,e)=>{let n=e?Bo:Ds;if(n in t)return t[n];let o=e?jo:Us;return t.hasAttribute(o)?t.getAttribute(o):e},Bs=(t,e)=>{if(Bo in t)return ve(e,t.trueValue);let o=jo;return t.hasAttribute(o)?ve(e,t.getAttribute(o)):ve(e,!0)},js=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},$s=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=pt(n()[1]).number,l=Array.prototype.filter.call(t.options,f=>f.selected).map(f=>c?Mo(Ae(f)):Ae(f));if(t.multiple){let f=i();try{if(Yt(i),fe(f)){f.clear();for(let u of l)f.add(u)}else w(f)?(f.splice(0),f.push(...l)):i(l)}finally{Zt(i),Z(i)}}else i(l[0])};return t.addEventListener(o,s),r};var _s=["stop","prevent","capture","self","once","left","right","middle","passive"],Fs=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of _s)e[o]=n.includes(o);return e},qs=(t,e,n,o,r)=>{var l,f;if(o){let u=e.value(),p=B(o.value()[0]);return J(p)?In(t,F(p),()=>e.value()[0],(l=r==null?void 0:r.join(","))!=null?l:u[1]):()=>{}}else if(n){let u=e.value();return In(t,F(n),()=>e.value()[0],(f=r==null?void 0:r.join(","))!=null?f:u[1])}let s=[],i=()=>{s.forEach(u=>u())},a=e.value(),c=a.length;for(let u=0;u<c;++u){let p=a[u];if(G(p)&&(p=p()),N(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[u];return G(T)&&(T=T()),T=T[g],G(T)&&(T=T()),T},E=p[g+"_flags"];s.push(In(t,g,d,E))}else H(2,"r-on",t)}return i},Vn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>qs(t,e,n,o,r)},zs=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=l=>!(r&&!l.ctrlKey||s&&!l.shiftKey||i&&!l.altKey||a&&!l.metaKey);return o?[t,l=>c(l)?l.key.toUpperCase()===o.toUpperCase():!1]:[t,c]}return[t,n=>!0]},In=(t,e,n,o)=>{if(q(e))return H(5,"r-on",t),()=>{};let r=Fs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=zs(e,o);let a=f=>{if(!i(f)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let u=n(f);G(u)&&(u=u(f)),G(u)&&u(f)},c=()=>{t.removeEventListener(e,l,s)},l=f=>{if(!r){a(f);return}try{if(r.left&&f.button!==0||r.middle&&f.button!==1||r.right&&f.button!==2||r.self&&f.target!==t)return;r.stop&&f.stopPropagation(),r.prevent&&f.preventDefault(),a(f)}finally{r.once&&c()}};return t.addEventListener(e,l,s),c};var Ks=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=F(n)),tt(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];tt(t,a,c)}else if(N(i))for(let a of Object.entries(i)){let c=a[0],l=a[1];tt(t,c,l)}else{let a=e[s++],c=e[s];tt(t,a,c)}}},$o={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Ks(t,e,n,o)}})};function Ws(t){return!!t||t===""}var tt=(t,e,n)=>{if(de(e)){H(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ge),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Ws(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||H(4,e,o,n,s)}r&&t.removeAttribute(e)};var _o={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Gs=(t,e)=>{let n=Le(t).data,o=n._ord;oo(o)&&(o=n._ord=t.style.display),!!e[0]?t.style.display=o:t.style.display="none"},Fo={mount:()=>({update:({el:t,values:e})=>{Gs(t,e)}})};var Js=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)qo(t,s[c],i==null?void 0:i[c])}else qo(t,s,i)}},en={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Js(t,e,n)}})},qo=(t,e,n)=>{let o=t.style,r=J(e);if(e&&!r){if(n&&!J(n))for(let s in n)e[s]==null&&Dn(o,s,"");for(let s in e)Dn(o,s,e[s])}else{let s=o.display;if(r?n!==e&&(o.cssText=e):n&&t.removeAttribute("style"),"_ord"in Le(t).data)return;o.display=s}},zo=/\s*!important$/;function Dn(t,e,n){if(w(n))n.forEach(o=>{Dn(t,e,o)});else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{let o=Qs(t,e);zo.test(n)?t.setProperty(Qe(o),n.replace(zo,""),"important"):t[o]=n}}var Ko=["Webkit","Moz","ms"],Pn={};function Qs(t,e){let n=Pn[e];if(n)return n;let o=F(e);if(o!=="filter"&&o in t)return Pn[e]=o;o=ft(o);for(let r=0;r<Ko.length;r++){let s=Ko[r]+o;if(s in t)return Pn[e]=s}return e}var ce=t=>Wo(B(t)),Wo=(t,e=new WeakMap)=>{if(!t||!N(t))return t;if(w(t))return t.map(ce);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ce(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ce(r[0]),ce(r[1]));return o}if(e.has(t))return B(e.get(t));let n=gt({},t);e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Wo(B(o[1]),e);return n};var Xs=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ce([...n])):Oe(n)?JSON.stringify(ce([...n])):N(n)?JSON.stringify(ce(n)):(o=n==null?void 0:n.toString())!=null?o:""},Go={mount:()=>({update:({el:t,values:e})=>{Xs(t,e)}})};var Jo={mount:()=>({update:({el:t,values:e})=>{tt(t,"value",e[0])}})};var Pe=class Pe{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Pe.je)!=null?e:Pe.je=new Pe}It(){let e={},n=globalThis;for(let o of Pe.Lt.split(","))e[o]=n[o];return e.ref=Ce,e.sref=ae,e.flatten=ce,e}addComponent(...e){for(let n of e){if(!n.defaultName){He.warning("Registered component's default name is not defined",n);continue}this.Z.set(ft(n.defaultName),n),this._.set(ft(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":$o,":":kn,"@":Vn,[`${e}on`]:Vn,[`${e}bind`]:kn,[`${e}html`]:qt,[`${e}text`]:Go,[`${e}show`]:Fo,[`${e}model`]:Lo,":style":en,[`${e}style`]:en,[`${e}bind:style`]:en,":class":Ln,[`${e}bind:class`]:Ln,":ref":_o,":value":Jo,[`${e}teleport`]:Lt},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Pe,"je"),m(Pe,"Lt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var le=Pe;var tn=(t,e)=>{if(!t)return;let o=(e!=null?e:le.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of Zs(t,o.pre,s))Ys(i,o.text,r,s)},Ys=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let l=i[1],f=Qo(l,o);if(f&&q(i[0])&&q(i[2])){let u=t.parentElement;u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),u.innerText="";return}}let a=document.createDocumentFragment();for(let l of i){let f=Qo(l,o);if(f){let u=document.createElement("span");u.setAttribute(e,l.substring(f.start.length,l.length-f.end.length)),a.appendChild(u)}else a.appendChild(document.createTextNode(l))}t.replaceWith(a)},Zs=(t,e,n)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of Se(s))r(a)}};return r(t),o},Qo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ei=9,ti=10,ni=13,oi=32,Ne=46,nn=44,ri=39,si=34,on=40,nt=41,rn=91,Un=93,Hn=63,ii=59,Xo=58,Yo=123,sn=125,_e=43,an=45,Bn=96,Zo=47,jn=92,er=new Set([2,3]),ir={"=":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},ai=Zn(gt({"=>":2},ir),{"||":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}),ar=Object.keys(ir),ci=new Set(ar),_n=new Set(["=>"]);ar.forEach(t=>_n.add(t));var tr={true:!0,false:!1,null:null},ui="this",ot="Expected ",Fe="Unexpected ",qn="Unclosed ",fi=ot+":",nr=ot+"expression",li="missing }",pi=Fe+"object property",mi=qn+"(",or=ot+"comma",rr=Fe+"token ",di=Fe+"period",$n=ot+"expression after ",hi="missing unaryOp argument",yi=qn+"[",gi=ot+"exponent (",bi="Variable names cannot start with a number (",Ti=qn+'quote after "',mt=t=>t>=48&&t<=57,sr=t=>ai[t],Fn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||mt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===oi||e===ei||e===ti||e===ni;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===ii||o===nn)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(Fe+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:sr(n),right_a:_n.has(n)},i=this.z(),!i)throw this.i($n+n);let l=[s,r,i];for(;n=this.de();){o=sr(n),r={value:n,prec:o,right_a:_n.has(n)},c=n;let f=u=>r.right_a&&u.right_a?o>u.prec:o<=u.prec;for(;l.length>2&&f(l[l.length-2]);)i=l.pop(),n=l.pop().value,s=l.pop(),e=this._e(n,s,i),l.push(e);if(e=this.z(),!e)throw this.i($n+c);l.push(r,e)}for(a=l.length-1,e=l[a];a>1;)e=this._e(l[a-1].value,l[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(mt(n)||n===Ne)return this.Bt();if(n===ri||n===si)e=this.Ht();else if(n===rn)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(hi);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in tr?e={type:4,value:tr[e.name],raw:e.name}:e.name===ui&&(e={type:5})):n===on&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return ci.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===an?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===_e?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===rn||n===on||n===Hn;){let o;if(n===Hn){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===rn){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Un)throw this.i(yi);this.e++}else n===on?e={type:6,arguments:this.qe(nt),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;mt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;mt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===_e||a===an)&&o++;let c=o;for(;mt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let l=e.slice(n,o);throw this.i(gi+l+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(bi+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(di);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,l=!1;for(;s<n;){let u=e.charCodeAt(s);if(u===r){l=!0,this.e=s+1;break}if(u===jn){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let f=c?a.join("")+e.slice(i,l?s:n):e.slice(i,l?s:n);if(!l)throw this.e=s,this.i(Ti+f+'"');return{type:4,value:f,raw:e.substring(o,this.e)}}Ke(e){switch(e){case 110:return`
2
- `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(Fe+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===nt&&r&&r>=n.length)throw this.i(rr+String.fromCharCode(e));break}else if(s===nn){if(this.e++,r++,r!==n.length){if(e===nt)throw this.i(rr+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(or);{let i=this.S();if(!i||i.type===0)throw this.i(or);n.push(i)}}}if(!o)throw this.i(ot+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(nt);if(this.f(nt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(mi)}jt(){return this.e++,{type:9,elements:this.qe(Un)}}Ft(e){if(this.f(Yo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(sn)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(nn)||this.f(sn)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Xo)){this.e++;let r=this.S();if(!r)throw this.i(pi);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(nn)&&this.e++}throw this.i(li)}}qt(e){let n=this.h;if((n===_e||n===an)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===_e?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!er.has(o.argument.type))throw this.i(Fe+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===_e||o===an)&&o===this.u.charCodeAt(this.e+1)){if(!er.has(n.type))throw this.i(Fe+(o===_e?"++":"--"));this.e+=2,e.node={type:13,operator:o===_e?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Hn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(nr);if(this.g(),this.f(Xo)){this.e++;let r=this.S();if(!r)throw this.i(nr);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(fi)}}Qt(e){if(this.g(),this.f(on)){let n=this.e;if(this.e++,this.g(),this.f(nt)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i($n+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(Bn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(Bn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,l=f=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:f})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:u,cooked:p},tail:f})};for(;this.e<o;){let f=n.charCodeAt(this.e);if(f===Bn)return l(!0),this.e+=1,e.node=r,r;if(f===36&&n.charCodeAt(this.e+1)===Yo){if(l(!1),this.e+=2,r.expressions.push(...this.fe(sn)),!this.f(sn))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(f===jn){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let u=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Ke(u)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(Zo))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===Zo&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(rn)?o=!0:o&&this.f(Un)&&(o=!1),this.e+=this.f(jn)?2:1}throw this.i("Unclosed Regex")}},cr=t=>new Fn(t).parse();var xi={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>yt(t,e)},Ci={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},pr=t=>{if(!(t!=null&&t.some(lr)))return t;let e=[];return t.forEach(n=>lr(n)?e.push(...n):e.push(n)),e},ur=(...t)=>pr(t),zn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Ei={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(--o),o}return--t[e]}},Ri={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o-1),o}return t[e]--}},fr={"=":(t,e,n)=>{let o=t[e];return x(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return x(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return x(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return x(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return x(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return x(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return x(o)?o(yt(o(),n)):t[e]=yt(t[e],n)},"<<=":(t,e,n)=>{let o=t[e];return x(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return x(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return x(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return x(o)?o(o()^n):t[e]^=n}},cn=(t,e)=>G(t)?t.bind(e):t,Kn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],cn(B(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],cn(B(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],cn(B(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,ur,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,cn(B(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>G(i)?i(...pr(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,Ci[e.operator],e.argument)}8(e,n,o){let r=xi[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,ur,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var f;let r={},s=u=>(u==null?void 0:u.type)!==15,i=(f=this.Ge)!=null?f:()=>!1,a=n===0&&this.Qe,c=u=>this.Ze(a,e.key,n,zn(u,o)),l=u=>this.Ze(a,e.value,n,zn(u,o));if(e.shorthand){let u=e.key.name;r[u]=s(e.key)&&i(u,n)?c:c()}else if(e.computed){let u=B(c());r[u]=s(e.value)&&i(u,n)?l:l()}else{let u=e.key.type===4?e.key.value:e.key.name;r[u]=s(e.value)&&i(u,n)?()=>l:l()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?Ei:Ri;if(r.type===2){let a=r.name,c=this.Xe(a,o);return de(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(de(a))return;let c=this.b(e.right,n,o);return fr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return fr[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=mr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=B(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&x(this.A)}eval(e,n){let{value:o,refs:r}=Dt(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?l=>this.b(a,e,zn(l,n)):this.b(a,e,n)));return o(...i)}},mr=Symbol("s"),lr=t=>(t==null?void 0:t.s)===mr,dr=(t,e,n,o,r,s,i)=>new Kn(e,n,o,r,i).eval(t,s);var hr={},yr=t=>!!t,un=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(yr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(yr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}V(e,n,o,r,s){var T;let i=[],a=[],c=new Set,l=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{l(),c.clear()},subscribe:(R,k)=>(c.add(R),k&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,k,X,P)=>{try{let U=dr(R,k,h,n,o,P,r);return X&&U.refs.length>0&&g.push(...U.refs),{value:U.value,refs:U.refs,ref:U.ref}}catch(U){H(6,`evaluation error: ${e}`,U)}return{value:void 0,refs:[]}};try{let R=(T=hr[e])!=null?T:cr("["+e+"]");hr[e]=R;let k=this.l.slice(),X=R.elements,P=X.length,U=new Array(P);p.refs=U;let pe=()=>{g.length=0,s||(d.clear(),l());let Y=new Array(P);for(let L=0;L<P;++L){let b=X[L];if(n!=null&&n(L,-1)){Y[L]=j=>E(b,k,!1,{$event:j}).value;continue}let O=E(b,k,!0);Y[L]=O.value,U[L]=O.ref}if(!s)for(let L of g)d.has(L)||(d.add(L),a.push(se(L,pe)));if(i=Y,c.size!==0)for(let L of c)c.has(L)&&L(i)};pe()}catch(R){H(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var gr=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},wi=(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},Si=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
- `);)++n;if(n>=t.length||!gr(t[n]))return null;let o=n;for(;n<t.length&&gr(t[n]);)++n;return{start:o,end:n}},br=new Set(["table","thead","tbody","tfoot"]),vi=new Set(["thead","tbody","tfoot"]),Ai=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Ni=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,fn=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=wi(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),l=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let u=Si(c,l);if(!u){n.push(c),e=a+1;continue}let p=c.slice(u.start,u.end);if(l){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),br.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):vi.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=Ai.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!Ni.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,u.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(u.end)}`;n.push(E?Tr(R,d):R)}else n.push(E?Tr(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),br.has(T)&&++r}e=a+1}return n.join("")};var Oi="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",Mi=new Set(Oi.toUpperCase().split(",")),ki="http://www.w3.org/2000/svg",xr=(t,e)=>{he(t)?t.content.appendChild(e):t.appendChild(e)},Wn=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&Mi.has(r.toUpperCase())?document.createElementNS(ki,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let f of Object.entries(c)){let u=f[0],p=f[1];u.startsWith("#")&&(p=u.substring(1),u="name"),a.setAttribute(kt(u,o),p)}let l=t.c;if(l)for(let f of l)Wn(f,a,n,o);xr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)xr(e,a);else throw new Error("unsupported node type.")}},qe=(t,e,n)=>{n!=null||(n=le.getDefault());let o=document.createDocumentFragment();if(!w(t))return Wn(t,o,!!e,n),o;for(let r of t)Wn(r,o,!!e,n);return o};var Cr=(t,e={selector:"#app"},n)=>{J(e)&&(e={selector:"#app",template:e}),To(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Re(o))throw _(0);n||(n=le.getDefault());let r=()=>{for(let a of[...o.childNodes])W(a)},s=a=>{for(let c of a)o.appendChild(c)};if(e.template){let a=document.createRange().createContextualFragment(fn(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=qe(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&tn(o,n),new Gn(t,o,n).y(),z(o,()=>{Me(t)}),It(t),{context:t,unmount:()=>{W(o)},unbind:()=>{ge(o)}}},Gn=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new un([e],o),this.o=new Jt(this.m)}y(){this.o.$(this.nt)}};var rt=t=>{if(w(t))return t.map(r=>rt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=Se(t);return o.length>0&&(e.c=[...o].map(r=>rt(r))),e};var Er=(t,e={})=>{var s,i,a,c,l,f;w(e)&&(e={props:e}),J(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!1;if(t.element){let u=t.element;u.remove(),t.element=u}else if(t.selector){let u=document.querySelector(t.selector);if(!u)throw _(1,t.selector);u.remove(),t.element=u}else if(t.template){let u=document.createRange().createContextualFragment(fn(t.template));t.element=u}else t.json&&(t.element=qe(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&tn(t.element,(a=e.config)!=null?a:le.getDefault());let r=t.element;if(!o&&(((l=t.isSVG)!=null?l:ut(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||ut(r)&&r.querySelector("[isSVG]"))){let u=r.content,p=u?[...u.childNodes]:[...r.childNodes],h=rt(p);t.element=qe(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(f=e.inheritAttrs)!=null?f:!0,props:e.props,defaultName:e.defaultName}};var ln=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var Rr=t=>{var e;(e=Ue())==null||e.onMounted.push(t)};var wr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw _(4);return e&&!n.isStopped?e(...r):(e=Li(t,n),e(...r))};return o[te]=1,Ve(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},Li=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ae(null);e.ref=n,e.isStopped=!1;let o=0,r=$e(()=>{if(o>0){r(),e.isStopped=!0,Z(n);return}n(t()),++o});return n.stop=r,n};var Sr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Ii(t,e,n),o(...s))};return r[te]=1,Ve(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Ii=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ae(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}let l=t.map(f=>f());o(e(...l)),++r},i=[];for(let c of t){let l=se(c,s);i.push(l)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var vr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Vi(t,e,n),o(...s))};return r[te]=1,Ve(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Vi=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ae(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=se(t,i=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}o(e(i)),++r},!0),o};var Ar=t=>(t[Rt]=1,t);var Nr=(t,e)=>{if(!e)throw _(5);let o=je(t)?Ce:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ce(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){H(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=$e(r);return re(i,!0),t};var pn=(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},Or=pn,Mr=pn;var kr=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(se(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Lr=t=>{if(!x(t))throw _(3,"observerCount");return t(void 0,void 0,2)};var Ir=t=>{Jn();try{t()}finally{Qn()}},Jn=()=>{xe.stack||(xe.stack=[]),xe.stack.push(new Set)},Qn=()=>{let t=xe.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 xe.stack;for(let n of e)try{Z(n)}catch(o){console.error(o)}};
1
+ "use strict";var yt=Object.defineProperty,Pr=Object.defineProperties,Dr=Object.getOwnPropertyDescriptor,Ur=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,Yn=Object.getOwnPropertySymbols;var Zn=Object.prototype.hasOwnProperty,Br=Object.prototype.propertyIsEnumerable;var gt=Math.pow,yn=(t,e,n)=>e in t?yt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bt=(t,e)=>{for(var n in e||(e={}))Zn.call(e,n)&&yn(t,n,e[n]);if(Yn)for(var n of Yn(e))Br.call(e,n)&&yn(t,n,e[n]);return t},eo=(t,e)=>Pr(t,Ur(e));var jr=(t,e)=>{for(var n in e)yt(t,n,{get:e[n],enumerable:!0})},$r=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of Hr(e))!Zn.call(t,r)&&r!==n&&yt(t,r,{get:()=>e[r],enumerable:!(o=Dr(e,r))||o.enumerable});return t};var _r=t=>$r(yt({},"__esModule",{value:!0}),t);var m=(t,e,n)=>yn(t,typeof e!="symbol"?e+"":e,n);var to=(t,e,n)=>new Promise((o,r)=>{var s=c=>{try{a(n.next(c))}catch(f){r(f)}},i=c=>{try{a(n.throw(c))}catch(f){r(f)}},a=c=>c.done?o(c.value):Promise.resolve(c.value).then(s,i);a((n=n.apply(t,e)).next())});var Di={};jr(Di,{ComponentHead:()=>We,ContextRegistry:()=>pn,RegorConfig:()=>le,addUnbinder:()=>z,batch:()=>Vr,collectRefs:()=>Ut,computeMany:()=>Sr,computeRef:()=>Ar,computed:()=>vr,createApp:()=>Er,defineComponent:()=>Rr,drainUnbind:()=>oo,endBatch:()=>Xn,entangle:()=>Ye,flatten:()=>ce,getBindData:()=>Le,html:()=>mn,isDeepRef:()=>je,isRaw:()=>Ze,isRef:()=>x,markRaw:()=>Nr,observe:()=>se,observeMany:()=>Lr,observerCount:()=>Ir,onMounted:()=>wr,onUnmounted:()=>re,pause:()=>Zt,persist:()=>Or,pval:()=>fo,raw:()=>Mr,ref:()=>Ce,removeNode:()=>W,resume:()=>en,silence:()=>Dt,sref:()=>ae,startBatch:()=>Qn,svg:()=>kr,toFragment:()=>qe,toJsonTemplate:()=>rt,trigger:()=>Z,unbind:()=>ge,unref:()=>S,useScope:()=>Pt,warningHandler:()=>He,watchEffect:()=>$e});module.exports=_r(Di);var ze=Symbol(":regor");var ge=t=>{let e=[t];for(let n=0;n<e.length;++n){let o=e[n];Fr(o);for(let r=o.lastChild;r!=null;r=r.previousSibling)e.push(r)}},Fr=t=>{let e=t[ze];if(!e)return;let n=e.unbinders;for(let o=0;o<n.length;++o)n[o]();n.length=0,t[ze]=void 0};var Ke=[],Tt=!1,xt,no=()=>{if(Tt=!1,xt=void 0,Ke.length!==0){for(let t=0;t<Ke.length;++t)ge(Ke[t]);Ke.length=0}},W=t=>{t.remove(),Ke.push(t),Tt||(Tt=!0,xt=setTimeout(no,1))},oo=()=>to(null,null,function*(){Ke.length===0&&!Tt||(xt&&clearTimeout(xt),no())});var G=t=>typeof t=="function",J=t=>typeof t=="string",ro=t=>typeof t=="undefined",de=t=>t==null||typeof t=="undefined",q=t=>typeof t!="string"||!(t!=null&&t.trim()),qr=Object.prototype.toString,gn=t=>qr.call(t),Oe=t=>gn(t)==="[object Map]",fe=t=>gn(t)==="[object Set]",bn=t=>gn(t)==="[object Date]",it=t=>typeof t=="symbol",w=Array.isArray,O=t=>t!==null&&typeof t=="object";var so={0:"createApp can't find root element. You must define either a valid `selector` or an `element`. Example: createApp({}, {selector: '#app', html: '...'})",1:t=>`Component template cannot be found. selector: ${t} .`,2:"Use composables in scope. usage: useScope(() => new MyApp()).",3:t=>`${t} requires ref source argument`,4:"computed is readonly.",5:"persist requires a string key."},_=(t,...e)=>{let n=so[t];return new Error(G(n)?n.call(so,...e):n)};var Ct=[],io=()=>{let t={onMounted:[],onUnmounted:[]};return Ct.push(t),t},Ue=t=>{let e=Ct[Ct.length-1];if(!e&&!t)throw _(2);return e},ao=t=>{let e=Ue();return t&&xn(t),Ct.pop(),e},Tn=Symbol("csp"),xn=t=>{let e=t,n=e[Tn];if(n){let o=Ue();if(n===o)return;o.onMounted.length>0&&n.onMounted.push(...o.onMounted),o.onUnmounted.length>0&&n.onUnmounted.push(...o.onUnmounted);return}e[Tn]=Ue()},Et=t=>t[Tn];var Me=t=>{var n,o;let e=(n=Et(t))==null?void 0:n.onUnmounted;e==null||e.forEach(r=>{r()}),(o=t.unmounted)==null||o.call(t)};var co={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]})},B=(t,...e)=>{let n=co[t],o=G(n)?n.call(co,...e):n,r=He.warning;r&&(J(o)?r(o):r(o,...o.args))},He={warning:console.warn};var Rt=Symbol("ref"),te=Symbol("sref"),wt=Symbol("raw");var x=t=>t!=null&&t[te]===1;var ke=class extends Error{constructor(n,o){super(o);m(this,"propPath");m(this,"detail");this.name="PropValidationError",this.propPath=n,this.detail=o}},Te=(t,e)=>{throw new ke(t,`${e}.`)},vt=t=>{var n;if(t===null)return"null";if(t===void 0)return"undefined";if(x(t))return`ref<${vt(t())}>`;if(typeof t=="string")return"string";if(typeof t=="number")return"number";if(typeof t=="boolean")return"boolean";if(typeof t=="bigint")return"bigint";if(typeof t=="symbol")return"symbol";if(typeof t=="function")return"function";if(w(t))return"array";if(t instanceof Date)return"Date";if(t instanceof RegExp)return"RegExp";if(t instanceof Map)return"Map";if(t instanceof Set)return"Set";let e=(n=t==null?void 0:t.constructor)==null?void 0:n.name;return e&&e!=="Object"?e:"object"},zr=t=>t.length>60?`${t.slice(0,57)}...`:t,at=(t,e=0)=>{if(e>1)return"unknown";if(x(t)){let s=t();return`ref(${at(s,e+1)})`}if(typeof t=="string")return zr(JSON.stringify(t));if(typeof t=="number"||typeof t=="boolean"||typeof t=="bigint"||typeof t=="symbol")return String(t);if(t===null)return"null";if(t===void 0)return"undefined";if(t instanceof Date)return t.toISOString();if(t instanceof RegExp)return String(t);if(w(t)){let s=t.slice(0,5).map(i=>at(i,e+1)).join(", ");return t.length>5?`[${s}, ...]`:`[${s}]`}if(O(t)){let s=Object.entries(t).slice(0,5);if(s.length===0)return"{}";let i=s.map(([a,c])=>{let f=at(c,e+1);return`${a}: ${f}`}).join(", ");return Object.keys(t).length>5?`{ ${i}, ... }`:`{ ${i} }`}return"unknown"},ue=t=>{if(x(t))return`got ${vt(t)}(${at(t())})`;let e=vt(t),n=at(t);return`got ${e} (${n})`},Kr=t=>t instanceof ke?t.detail:t instanceof Error?t.message:String(t),uo=(t,e)=>{let n=`, ${ue(e)}.`;return t.endsWith(n)?t.slice(0,-n.length):t},Wr=(t,e,n)=>{if(e instanceof ke){if(e.propPath===t)return uo(e.detail,n);if(e.propPath===`${t}.value`&&x(n)){let o=uo(e.detail,n());return o.startsWith("expected ")?`expected ref<${o.slice(9)}>`:`expected ref where ${o}`}}return Kr(e)},Gr=(t,e,n)=>{let o=[];for(let r of e){let s=Wr(t,r,n);o.includes(s)||o.push(s)}return o.length===0?ue(n):o.length===1?`${o[0]}, ${ue(n)}`:`${o.join(" or ")}, ${ue(n)}`},Jr=t=>typeof t=="string"?`"${t}"`:typeof t=="number"||typeof t=="boolean"?String(t):t===null?"null":t===void 0?"undefined":vt(t),Qr=(t,e)=>{typeof t!="string"&&Te(e,`expected string, ${ue(t)}`)},Xr=(t,e)=>{typeof t!="number"&&Te(e,`expected number, ${ue(t)}`)},Yr=(t,e)=>{typeof t!="boolean"&&Te(e,`expected boolean, ${ue(t)}`)},Zr=t=>(e,n)=>{e instanceof t||Te(n,`expected instance of ${t.name||"provided class"}, ${ue(e)}`)},es=t=>(e,n,o)=>{e!==void 0&&t(e,n,o)},ts=t=>(e,n,o)=>{e!==null&&t(e,n,o)},ns=(...t)=>(e,n,o)=>{let r=[];for(let s of t)try{s(e,n,o);return}catch(i){r.push(i)}Te(n,Gr(n,r,e))},os=t=>(e,n)=>{t.includes(e)||Te(n,`expected one of ${t.map(o=>Jr(o)).join(", ")}, ${ue(e)}`)},rs=t=>(e,n,o)=>{w(e)||Te(n,`expected array, ${ue(e)}`);let r=e;for(let s=0;s<r.length;++s)t(r[s],`${n}[${s}]`,o)};function ss(t){return(e,n,o)=>{O(e)||Te(n,`expected object, ${ue(e)}`);let r=e;for(let s in t){let i=t[s];if(!i)continue;i(r[s],`${n}.${s}`,o)}}}var is=t=>(e,n,o)=>{if(x(e)){t(e(),`${n}.value`,o);return}Te(n,`expected ref, ${ue(e)}`)},fo={fail:Te,describe:ue,isString:Qr,isNumber:Xr,isBoolean:Yr,isClass:Zr,optional:es,nullable:ts,or:ns,oneOf:os,arrayOf:rs,shape:ss,refOf:is};var as=(t,e,n)=>{var i,a;let o=((a=(i=t.tagName)==null?void 0:i.toLowerCase)==null?void 0:a.call(i))||"unknown",r=n instanceof ke?n.propPath:e,s=n instanceof ke?n.detail:n instanceof Error?n.message:String(n);return n instanceof Error?new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n}):new Error(`Invalid prop "${r}" on <${o}>: ${s}`,{cause:n})},We=class{constructor(e,n,o,r,s,i){m(this,"props");m(this,"start");m(this,"end");m(this,"ctx");m(this,"autoProps",!0);m(this,"entangle",!0);m(this,"enableSwitch",!1);m(this,"onAutoPropsAssigned");m(this,"G");m(this,"J");m(this,"emit",(e,n)=>{this.G.dispatchEvent(new CustomEvent(e,{detail:n}))});this.props=e,this.G=n,this.ctx=o,this.start=r,this.end=s,this.J=i}findContext(e,n=0){var r;if(n<0)return;let o=0;for(let s of(r=this.ctx)!=null?r:[])if(s instanceof e){if(o===n)return s;++o}}requireContext(e,n=0){let o=this.findContext(e,n);if(o!==void 0)return o;throw new Error(`${e} was not found in the context stack at occurrence ${n}.`)}validateProps(e){if(this.J==="off")return;let n=this.props;for(let o in e){let r=e[o];if(!r)continue;let s=r;try{s(n[o],o,this)}catch(i){let a=as(this.G,o,i);if(this.J==="warn"){He.warning(a.message,a);continue}throw a}}}unmount(){let e=this.start.nextSibling,n=this.end;for(;e&&e!==n;)W(e),e=e.nextSibling;for(let o of this.ctx)Me(o)}};var Le=t=>{let e=t,n=e[ze];if(n)return n;let o={unbinders:[],data:{}};return e[ze]=o,o};var z=(t,e)=>{Le(t).unbinders.push(e)};var ct=t=>{if(typeof t=="string"){let e=t.trim().toLowerCase();if(e===""||e==="0"||e==="false")return!1;if(e==="true")return!0}return!!t};var At={},St={},lo=1,po=t=>{let e=(lo++).toString();return At[e]=t,St[e]=0,e},Cn=t=>{St[t]+=1},En=t=>{--St[t]===0&&(delete At[t],delete St[t])},mo=t=>At[t],Rn=()=>lo!==1&&Object.keys(At).length>0,ut="r-switch",cs=t=>{let e=t.filter(o=>Re(o)).map(o=>[...o.querySelectorAll("[r-switch]")].map(r=>r.getAttribute(ut))),n=new Set;return e.forEach(o=>{o.forEach(r=>r&&n.add(r))}),[...n]},Ge=(t,e)=>{if(!Rn())return;let n=cs(e);n.length!==0&&(n.forEach(Cn),z(t,()=>{n.forEach(En)}))};var Nt=()=>{},wn=(t,e,n,o)=>{let r=[];for(let s of t){let i=s.cloneNode(!0);n.insertBefore(i,o),r.push(i)}Ie(e,r)},vn=Symbol("r-if"),ho=Symbol("r-else"),yo=t=>t[ho]===1,Ot=class{constructor(e){m(this,"o");m(this,"N");m(this,"ge");m(this,"Q");m(this,"X");m(this,"x");m(this,"R");this.o=e,this.N=e.r.p.if,this.ge=kt(e.r.p.if),this.Q=e.r.p.else,this.X=e.r.p.elseif,this.x=e.r.p.for,this.R=e.r.p.pre}rt(e,n){let o=e.parentElement;for(;o!==null&&o!==document.documentElement;){if(o.hasAttribute(n))return!0;o=o.parentElement}return!1}k(e){let n=e.hasAttribute(this.N);return n&&this.y(e),this.o.M.j(e,o=>{o.hasAttribute(this.N)&&this.y(o)}),n}Y(e){return e[vn]?!0:(e[vn]=!0,Mt(e,this.ge).forEach(n=>n[vn]=!0),!1)}y(e){if(e.hasAttribute(this.R)||this.Y(e)||this.rt(e,this.x))return;let n=e.getAttribute(this.N);if(!n){B(0,this.N,e);return}e.removeAttribute(this.N),this.V(e,n)}U(e,n,o){let r=Je(e),s=e.parentNode,i=document.createComment(`__begin__ :${n}${o!=null?o:""}`);s.insertBefore(i,e),Ge(i,r),r.forEach(c=>{W(c)}),e.remove(),n!=="if"&&(e[ho]=1);let a=document.createComment(`__end__ :${n}${o!=null?o:""}`);return s.insertBefore(a,i.nextSibling),{nodes:r,parent:s,commentBegin:i,commentEnd:a}}be(e,n){if(!e)return[];let o=e.nextElementSibling;if(e.hasAttribute(this.Q)){e.removeAttribute(this.Q);let{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"else");return[{mount:()=>{wn(r,this.o,s,a)},unmount:()=>{we(i,a)},isTrue:()=>!0,isMounted:!1}]}else{let r=e.getAttribute(this.X);if(!r)return[];e.removeAttribute(this.X);let{nodes:s,parent:i,commentBegin:a,commentEnd:c}=this.U(e,"elseif",` => ${r} `),f=this.o.m.O(r),u=f.value,l=this.be(o,n),p=Nt;return z(a,()=>{f.stop(),p(),p=Nt}),p=f.subscribe(n),[{mount:()=>{wn(s,this.o,i,c)},unmount:()=>{we(a,c)},isTrue:()=>ct(u()[0]),isMounted:!1},...l]}}V(e,n){let o=e.nextElementSibling,{nodes:r,parent:s,commentBegin:i,commentEnd:a}=this.U(e,"if",` => ${n} `),c=this.o.m.O(n),f=c.value,u=!1,l=this.o.m,p=l.L(),h=()=>{l.E(p,()=>{if(ct(f()[0]))u||(wn(r,this.o,s,a),u=!0),g.forEach(T=>{T.unmount(),T.isMounted=!1});else{we(i,a),u=!1;let T=!1;for(let R of g)!T&&R.isTrue()?(R.isMounted||(R.mount(),R.isMounted=!0),T=!0):(R.unmount(),R.isMounted=!1)}})},g=this.be(o,h),d=Nt;z(i,()=>{c.stop(),d(),d=Nt}),h(),d=c.subscribe(h)}};var Je=t=>{let e=he(t)?t.content.childNodes:[t],n=[];for(let o=0;o<e.length;++o){let r=e[o];if(r.nodeType===1){let s=r==null?void 0:r.tagName;if(s==="SCRIPT"||s==="STYLE")continue}n.push(r)}return n},Ie=(t,e)=>{for(let n=0;n<e.length;++n){let o=e[n];o.nodeType===Node.ELEMENT_NODE&&(yo(o)||t.$(o))}},Mt=(t,e)=>{var o;let n=t.querySelectorAll(e);return(o=t.matches)!=null&&o.call(t,e)?[t,...n]:n},he=t=>t instanceof HTMLTemplateElement,Re=t=>t.nodeType===Node.ELEMENT_NODE,ft=t=>t.nodeType===Node.ELEMENT_NODE,go=t=>t instanceof HTMLSlotElement,ve=t=>he(t)?t.content.childNodes:t.childNodes,we=(t,e)=>{let n=t.nextSibling;for(;n!=null&&n!==e;){let o=n.nextSibling;W(n),n=o}},bo=function(){return this()},us=function(t){return this(t)},fs=()=>{throw new Error("value is readonly.")},ls={get:bo,set:us,enumerable:!0,configurable:!1},ps={get:bo,set:fs,enumerable:!0,configurable:!1},Ve=(t,e)=>{Object.defineProperty(t,"value",e?ps:ls)},To=(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},kt=t=>`[${CSS.escape(t)}]`,Lt=(t,e)=>(t.startsWith("@")&&(t=e.p.on+":"+t.slice(1)),t.includes("[")&&(t=t.replace(/[[\]]/g,e.p.dynamic)),t),Sn=t=>{let e=Object.create(null);return n=>e[n]||(e[n]=t(n))},ms=/-(\w)/g,F=Sn(t=>t&&t.replace(ms,(e,n)=>n?n.toUpperCase():"")),ds=/\B([A-Z])/g,Qe=Sn(t=>t&&t.replace(ds,"-$1").toLowerCase()),lt=Sn(t=>t&&t.charAt(0).toUpperCase()+t.slice(1));var It={mount:()=>{}};var Xe=t=>{let e=t.trim();return e?e.split(/\s+/):[]};var Vt=t=>{var n,o;let e=(n=Et(t))==null?void 0:n.onMounted;e==null||e.forEach(r=>{r()}),(o=t.mounted)==null||o.call(t)};var An=Symbol("scope"),Pt=t=>{try{io();let e=t();xn(e);let n={context:e,unmount:()=>Me(e),[An]:1};return n[An]=1,n}finally{ao()}},xo=t=>O(t)?An in t:!1;var Nn={collectRefObj:!0,mount:({parseResult:t})=>({update:({values:e})=>{let n=t.context,o=e[0];if(O(o))for(let r of Object.entries(o)){let s=r[0],i=r[1],a=n[s];a!==i&&(x(a)?a(i):n[s]=i)}}})};var re=(t,e)=>{var n;(n=Ue(e))==null||n.onUnmounted.push(t)};var se=(t,e,n,o=!0)=>{if(!x(t))throw _(3,"observe");n&&e(t());let s=t(void 0,void 0,0,e);return o&&re(s,!0),s};var Ye=(t,e)=>{if(t===e)return()=>{};let n=se(t,r=>e(r)),o=se(e,r=>t(r));return e(t()),()=>{n(),o()}};var Ze=t=>!!t&&t[wt]===1;var je=t=>(t==null?void 0:t[Rt])===1;var ye=[],Co=t=>{var e;ye.length!==0&&((e=ye[ye.length-1])==null||e.add(t))},$e=t=>{if(!t)return()=>{};let e={stop:()=>{}};return hs(t,e),re(()=>e.stop(),!0),e.stop},hs=(t,e)=>{if(!t)return;let n=[],o=!1,r=()=>{for(let s of n)s();n=[],o=!0};e.stop=r;try{let s=new Set;if(ye.push(s),t(i=>n.push(i)),o)return;for(let i of[...s]){let a=se(i,()=>{r(),$e(t)});n.push(a)}}finally{ye.pop()}},Dt=t=>{let e=ye.length,n=e>0&&ye[e-1];try{return n&&ye.push(null),t()}finally{n&&ye.pop()}},Ut=t=>{try{let e=new Set;return ye.push(e),{value:t(),refs:[...e]}}finally{ye.pop()}};var Z=(t,e,n)=>{if(!x(t))return;let o=t;if(o(void 0,e,1),!n)return;let r=o();if(r){if(w(r)||fe(r))for(let s of r)Z(s,e,!0);else if(Oe(r))for(let s of r)Z(s[0],e,!0),Z(s[1],e,!0);if(O(r))for(let s in r)Z(r[s],e,!0)}};function ys(t,e,n){Object.defineProperty(t,e,{value:n,enumerable:!1,writable:!0,configurable:!0})}var et=(t,e,n)=>{n.forEach(function(o){let r=t[o];ys(e,o,function(...i){let a=r.apply(this,i),c=this[te];for(let f of c)Z(f);return a})})},Ht=(t,e)=>{Object.defineProperty(t,Symbol.toStringTag,{value:e,writable:!1,enumerable:!1,configurable:!0})};var Eo=Array.prototype,On=Object.create(Eo),gs=["push","pop","shift","unshift","splice","sort","reverse"];et(Eo,On,gs);var Ro=Map.prototype,Bt=Object.create(Ro),bs=["set","clear","delete"];Ht(Bt,"Map");et(Ro,Bt,bs);var wo=Set.prototype,jt=Object.create(wo),Ts=["add","clear","delete"];Ht(jt,"Set");et(wo,jt,Ts);var xe={},ae=t=>{if(x(t)||Ze(t))return t;let e={auto:!0,_value:t},n=c=>O(c)?te in c?!0:w(c)?(Object.setPrototypeOf(c,On),!0):fe(c)?(Object.setPrototypeOf(c,jt),!0):Oe(c)?(Object.setPrototypeOf(c,Bt),!0):!1:!1,o=n(t),r=new Set,s=(c,f)=>{if(xe.stack&&xe.stack.length){xe.stack[xe.stack.length-1].add(a);return}r.size!==0&&Dt(()=>{for(let u of[...r.keys()])r.has(u)&&u(c,f)})},i=c=>{let f=c[te];f||(c[te]=f=new Set),f.add(a)},a=(...c)=>{if(!(2 in c)){let u=c[0],l=c[1];return 0 in c?e._value===u||x(u)&&(u=u(),e._value===u)?u:(n(u)&&i(u),e._value=u,e.auto&&s(u,l),e._value):(Co(a),e._value)}switch(c[2]){case 0:{let u=c[3];if(!u)return()=>{};let l=p=>{r.delete(p)};return r.add(u),()=>{l(u)}}case 1:{let u=c[1],l=e._value;s(l,u);break}case 2:return r.size;case 3:{e.auto=!1;break}case 4:e.auto=!0}return e._value};return a[te]=1,Ve(a,!1),o&&i(t),a};var Ce=t=>{if(Ze(t))return t;let e;if(x(t)?(e=t,t=e()):e=ae(t),t instanceof Node||t instanceof Date||t instanceof RegExp||t instanceof Promise||t instanceof Error)return e;if(e[Rt]=1,w(t)){let n=t.length;for(let o=0;o<n;++o){let r=t[o];je(r)||(t[o]=Ce(r))}return e}if(!O(t))return e;for(let n of Object.entries(t)){let o=n[1];if(je(o))continue;let r=n[0];it(r)||(t[r]=null,t[r]=Ce(o))}return e};var vo=Symbol("modelBridge"),$t=()=>{},xs=t=>!!(t!=null&&t[vo]),Cs=t=>{t[vo]=1},Es=t=>{let e=Ce(t());return Cs(e),e},So={collectRefObj:!0,mount:({parseResult:t,option:e})=>{if(typeof e!="string"||!e)return $t;let n=F(e),o,r,s=$t,i=()=>{s(),s=$t,o=void 0,r=void 0},a=()=>{s(),s=$t},c=(u,l)=>{o!==u&&(a(),s=Ye(u,l),o=u)},f=()=>{var h;let u=(h=t.refs[0])!=null?h:t.value()[0],l=t.context,p=l[n];if(!x(u)){if(r&&p===r){r(u);return}if(i(),x(p)){p(u);return}l[n]=u;return}if(xs(u)){if(p===u)return;x(p)?c(u,p):l[n]=u;return}r||(r=Es(u)),l[n]=r,c(u,r)};return{update:()=>{f()},unmount:()=>{s()}}}};var _t=class{constructor(e){m(this,"o");m(this,"xe");m(this,"Te","");m(this,"Re",-1);this.o=e,this.xe=e.r.p.inherit}k(e){this.ot(e)}st(e){if(this.Re!==e.size){let n=[...e.keys()];this.Te=[...n,...n.map(Qe)].join(","),this.Re=e.size}return this.Te}it(e){var n;for(let o=0;o<e.length;++o){let r=(n=e[o])==null?void 0:n.components;if(r)for(let s in r)return!0}return!1}at(e){if(!he(e))return!1;let n=e.getAttributeNames();return e.hasAttribute("name")?!0:n.some(o=>o.startsWith("#"))}ct(e){return he(e)&&e.getAttributeNames().length===0}ot(e){var f,u;let n=this.o,o=n.m,r=n.r.Z,s=n.r._;if(r.size===0&&!this.it(o.l))return;let i=o.ee(),a=this.Ee();if(q(a))return;let c=this.pt(e,a);for(let l of c){if(l.hasAttribute(n.R))continue;let p=l.parentNode;if(!p)continue;let h=l.nextSibling,g=F(l.tagName).toUpperCase(),d=i[g],E=d!=null?d:s.get(g);if(!E)continue;let T=E.template;if(!T)continue;let R=l.parentElement;if(!R)continue;let L=new Comment(" begin component: "+l.tagName),X=new Comment(" end component: "+l.tagName);R.insertBefore(L,l),l.remove();let D=n.r.p.context,H=n.r.p.contextAlias,pe=n.r.p.bind,Y=(u=(f=E.props)==null?void 0:f.map(F))!=null?u:[],I=(C,N)=>{let y={},$=C.hasAttribute(D);return o.E(N,()=>{if(o.w(y),$?n.y(Nn,C,D):C.hasAttribute(H)&&n.y(Nn,C,H),Y.length===0)return;let U=new Map(Y.map(v=>[v.toLowerCase(),v]));for(let v of[...Y,...Y.map(Qe)]){let P=C.getAttribute(v);P!==null&&(y[F(v)]=P,C.removeAttribute(v))}let Q=n.F.Ce(C,!1);for(let[v,P]of Q.entries()){let[A,K]=P.te;if(!K)continue;let ie=U.get(F(K).toLowerCase());ie&&(A!=="."&&A!==":"&&A!==pe||n.y(So,C,v,!0,ie,P.ne))}}),y},b=[...o.L()],M=()=>{var $;let C=I(l,b),N=new We(C,l,b,L,X,n.r.propValidationMode),y=Pt(()=>{var U;return(U=E.context(N))!=null?U:{}}).context;if(N.autoProps){for(let[U,Q]of Object.entries(C))if(U in y){let v=y[U];if(v===Q)continue;if(x(v)){x(Q)?N.entangle?z(L,Ye(Q,v)):v(Q()):v(Q);continue}}else y[U]=Q;for(let U of Y)U in y||(y[U]=void 0);($=N.onAutoPropsAssigned)==null||$.call(N)}return{componentCtx:y,head:N}},{componentCtx:j,head:De}=M(),me=[...ve(T)],dn=me.length,V=l.childNodes.length===0,st=C=>{var Q;let N=C.parentElement,y=C.name;if(q(y)&&(y=C.getAttributeNames().filter(v=>v.startsWith("#"))[0],q(y)?y="default":y=y.substring(1)),V){if(y==="default"){let v=n.r.p.text,P=l.getAttribute(v);if(!q(P)){let A=document.createElement("span");A.setAttribute(v,P),N.insertBefore(A,C),l.removeAttribute(v);return}}for(let v of[...C.childNodes])N.insertBefore(v,C);return}let $=l.querySelector(`template[name='${y}'], template[\\#${y}]`);!$&&y==="default"&&($=(Q=[...l.querySelectorAll("template:not([name])")].find(P=>this.ct(P)))!=null?Q:null);let U=v=>{De.enableSwitch&&o.E(b,()=>{o.w(j);let P=I(C,o.L());o.E(b,()=>{o.w(P);let A=o.L(),K=po(A);for(let ie of v)Re(ie)&&(ie.setAttribute(ut,K),Cn(K),z(ie,()=>{En(K)}))})})};if($){let v=[...ve($)];for(let P of v)N.insertBefore(P,C);U(v)}else{if(y!=="default"){for(let P of[...ve(C)])N.insertBefore(P,C);return}let v=[...ve(l)].filter(P=>!this.at(P));for(let P of v)N.insertBefore(P,C);U(v)}},k=C=>{if(!Re(C))return;let N=C.querySelectorAll("slot");if(go(C)){st(C),C.remove();return}for(let y of N)st(y),y.remove()};(()=>{for(let C=0;C<dn;++C)me[C]=me[C].cloneNode(!0),p.insertBefore(me[C],h),k(me[C])})(),R.insertBefore(X,h);let ne=()=>{if(!E.inheritAttrs)return;let C=me.filter(y=>y.nodeType===Node.ELEMENT_NODE);C.length>1&&(C=C.filter(y=>y.hasAttribute(this.xe)));let N=C[0];if(N)for(let y of l.getAttributeNames()){if(y===D||y===H)continue;let $=l.getAttribute(y);if(y==="class"){let U=Xe($);U.length>0&&N.classList.add(...U)}else if(y==="style"){let U=N.style,Q=l.style;for(let v of Q)U.setProperty(v,Q.getPropertyValue(v))}else N.setAttribute(Lt(y,n.r),$)}},oe=()=>{for(let C of l.getAttributeNames())!C.startsWith("@")&&!C.startsWith(n.r.p.on)&&l.removeAttribute(C)},Ee=()=>{ne(),oe(),o.w(j),n.we(l,!1),j.$emit=De.emit,Ie(n,me),z(l,()=>{Me(j)}),z(L,()=>{ge(l)}),Vt(j)};o.E(b,Ee)}}Ee(){let e=this.o,n=e.m,o=e.r.Z,r=n.ut(),s=this.st(o);return[...s?[s]:[],...r,...r.map(Qe)].join(",")}pt(e,n){var s;let o=[];if(q(n))return o;if((s=e.matches)!=null&&s.call(e,n))return[e];let r=this.q(e).reverse();for(;r.length>0;){let i=r.pop();if(i.matches(n)){o.push(i);continue}r.push(...this.q(i).reverse())}return o}j(e,n){let o=this.Ee(),r=this.q(e).reverse();for(;r.length>0;){let s=r.pop();n(s),!(!q(o)&&s.matches(o))&&r.push(...this.q(s).reverse())}}q(e){let n=e==null?void 0:e.children;if((n==null?void 0:n.length)!=null){let r=[];for(let s=0;s<n.length;++s){let i=n[s];Re(i)&&r.push(i)}return r}let o=e==null?void 0:e.childNodes;if((o==null?void 0:o.length)!=null){let r=[];for(let s=0;s<o.length;++s){let i=o[s];Re(i)&&r.push(i)}return r}return[]}};var Mn=class{constructor(e,n){m(this,"te");m(this,"ne");m(this,"ve",[]);this.te=e,this.ne=n}},Ft=class{constructor(e){m(this,"o");m(this,"Se");m(this,"Ae");m(this,"re");var o;this.o=e,this.Se=e.r.lt(),this.re=new Map;let n=new Map;for(let r of this.Se){let s=(o=r[0])!=null?o:"",i=n.get(s);i?i.push(r):n.set(s,[r])}this.Ae=n}ke(e){let n=this.re.get(e);if(n)return n;let o=e,r=o.startsWith(".");r&&(o=":"+o.slice(1));let s=o.indexOf("."),a=(s<0?o:o.substring(0,s)).split(/[:@]/);q(a[0])&&(a[0]=r?".":o[0]);let c=s>=0?o.slice(s+1).split("."):[],f=!1,u=!1;for(let p=0;p<c.length;++p){let h=c[p];if(!f&&h==="camel"?f=!0:!u&&h==="prop"&&(u=!0),f&&u)break}f&&(a[a.length-1]=F(a[a.length-1])),u&&(a[0]=".");let l={terms:a,flags:c};return this.re.set(e,l),l}Ce(e,n){let o=new Map;if(!ft(e))return o;let r=this.Ae,s=(a,c)=>{var u;let f=r.get((u=c[0])!=null?u:"");if(f)for(let l=0;l<f.length;++l){if(!c.startsWith(f[l]))continue;let p=o.get(c);if(!p){let h=this.ke(c);p=new Mn(h.terms,h.flags),o.set(c,p)}p.ve.push(a);return}},i=a=>{var f;let c=a.attributes;if(!(!c||c.length===0))for(let u=0;u<c.length;++u){let l=(f=c.item(u))==null?void 0:f.name;l&&s(a,l)}};return i(e),!n||!e.firstElementChild||this.o.M.j(e,i),o}};var Ao=()=>{},Rs=(t,e)=>{for(let n of t){let o=n.cloneNode(!0);e.appendChild(o)}},qt=class{constructor(e){m(this,"o");m(this,"I");this.o=e,this.I=e.r.p.is}k(e){let n=e.hasAttribute(this.I);return(n||e.hasAttribute("is"))&&this.y(e),this.o.M.j(e,o=>{(o.hasAttribute(this.I)||o.hasAttribute("is"))&&this.y(o)}),n}y(e){let n=e.getAttribute(this.I);if(!n){if(n=e.getAttribute("is"),!n)return;if(!n.startsWith("regor:")){if(!n.startsWith("r-"))return;let o=n.slice(2).trim().toLowerCase();if(!o)return;let r=e.parentNode;if(!r)return;let s=document.createElement(o);for(let i of e.getAttributeNames())i!=="is"&&s.setAttribute(i,e.getAttribute(i));for(;e.firstChild;)s.appendChild(e.firstChild);r.insertBefore(s,e),e.remove(),this.o.$(s);return}n=`'${n.slice(6)}'`,e.removeAttribute("is")}e.removeAttribute(this.I),this.V(e,n)}U(e,n){let o=Je(e),r=e.parentNode,s=document.createComment(`__begin__ dynamic ${n!=null?n:""}`);r.insertBefore(s,e),Ge(s,o),o.forEach(a=>{W(a)}),e.remove();let i=document.createComment(`__end__ dynamic ${n!=null?n:""}`);return r.insertBefore(i,s.nextSibling),{nodes:o,parent:r,commentBegin:s,commentEnd:i}}V(e,n){let{nodes:o,parent:r,commentBegin:s,commentEnd:i}=this.U(e,` => ${n} `),a=this.o.m.O(n),c=a.value,f=this.o.m,u=f.L(),l={name:""},p=he(e)?o:[...o[0].childNodes],h=()=>{f.E(u,()=>{var R;let E=c()[0];if(O(E)&&(E.name?E=E.name:E=(R=Object.entries(f.ee()).filter(L=>L[1]===E)[0])==null?void 0:R[0]),!J(E)||q(E)){we(s,i);return}if(l.name===E)return;we(s,i);let T=document.createElement(E);for(let L of e.getAttributeNames())L!==this.I&&T.setAttribute(L,e.getAttribute(L));Rs(p,T),r.insertBefore(T,i),this.o.$(T),l.name=E})},g=Ao;z(s,()=>{a.stop(),g(),g=Ao}),h(),g=a.subscribe(h)}};var S=t=>{let e=t;return e!=null&&e[te]===1?e():e};var ws=(t,e)=>{let[n,o]=e;G(o)?o(t,n):t.innerHTML=n==null?void 0:n.toString()},zt={mount:()=>({update:({el:t,values:e})=>{ws(t,e)}})};var Kt=class t{constructor(e){m(this,"oe");this.oe=e}static ft(e,n){var h,g;let o=e.m,r=e.r,s=r.p,i=new Set([s.for,s.if,s.else,s.elseif,s.pre]),a=r.B,c=o.ee();if(Object.keys(c).length>0||r._.size>0)return;let f=e.F,u=[],l=0,p=[];for(let d=n.length-1;d>=0;--d)p.push(n[d]);for(;p.length>0;){let d=p.pop();if(d.nodeType===Node.ELEMENT_NODE){let T=d;if(T.tagName==="TEMPLATE"||T.tagName.includes("-"))return;let R=F(T.tagName).toUpperCase();if(r._.has(R)||c[R])return;let L=T.attributes;for(let X=0;X<L.length;++X){let D=(h=L.item(X))==null?void 0:h.name;if(!D)continue;if(i.has(D))return;let{terms:H,flags:pe}=f.ke(D),[Y,I]=H,b=(g=a[D])!=null?g:a[Y];if(b){if(b===zt)return;u.push({nodeIndex:l,attrName:D,directive:b,option:I,flags:pe})}}++l}let E=d.childNodes;for(let T=E.length-1;T>=0;--T)p.push(E[T])}if(u.length!==0)return new t(u)}y(e,n){let o=[],r=[];for(let s=n.length-1;s>=0;--s)r.push(n[s]);for(;r.length>0;){let s=r.pop();s.nodeType===Node.ELEMENT_NODE&&o.push(s);let i=s.childNodes;for(let a=i.length-1;a>=0;--a)r.push(i[a])}for(let s=0;s<this.oe.length;++s){let i=this.oe[s],a=o[i.nodeIndex];a&&e.y(i.directive,a,i.attrName,!1,i.option,i.flags)}}};var vs=(t,e)=>{let n=e.parentNode;if(n)for(let o=0;o<t.items.length;++o)n.insertBefore(t.items[o],e)},Ss=t=>{var a;let e=t.length,n=t.slice(),o=[],r,s,i;for(let c=0;c<e;++c){let f=t[c];if(f===0)continue;let u=o[o.length-1];if(u===void 0||t[u]<f){n[c]=u!=null?u:-1,o.push(c);continue}for(r=0,s=o.length-1;r<s;)i=r+s>>1,t[o[i]]<f?r=i+1:s=i;f<t[o[r]]&&(r>0&&(n[c]=o[r-1]),o[r]=c)}for(r=o.length,s=(a=o[r-1])!=null?a:-1;r-- >0;)o[r]=s,s=n[s];return o},Wt=class{static dt(e){let{oldItems:n,newValues:o,getKey:r,isSameValue:s,mountNewValue:i,removeMountItem:a,endAnchor:c}=e,f=n.length,u=o.length,l=new Array(u),p=new Set;for(let b=0;b<u;++b){let M=r(o[b]);if(M===void 0||p.has(M))return;p.add(M),l[b]=M}let h=new Array(u),g=0,d=f-1,E=u-1;for(;g<=d&&g<=E;){let b=n[g];if(r(b.value)!==l[g]||!s(b.value,o[g]))break;b.value=o[g],h[g]=b,++g}for(;g<=d&&g<=E;){let b=n[d];if(r(b.value)!==l[E]||!s(b.value,o[E]))break;b.value=o[E],h[E]=b,--d,--E}if(g>d){for(let b=E;b>=g;--b){let M=b+1<u?h[b+1].items[0]:c;h[b]=i(b,o[b],M)}return h}if(g>E){for(let b=g;b<=d;++b)a(n[b]);return h}let T=g,R=g,L=E-R+1,X=new Array(L).fill(0),D=new Map;for(let b=R;b<=E;++b)D.set(l[b],b);let H=!1,pe=0;for(let b=T;b<=d;++b){let M=n[b],j=D.get(r(M.value));if(j===void 0){a(M);continue}if(!s(M.value,o[j])){a(M);continue}M.value=o[j],h[j]=M,X[j-R]=b+1,j>=pe?pe=j:H=!0}let Y=H?Ss(X):[],I=Y.length-1;for(let b=L-1;b>=0;--b){let M=R+b,j=M+1<u?h[M+1].items[0]:c;if(X[b]===0){h[M]=i(M,o[M],j);continue}let De=h[M];H&&(I>=0&&Y[I]===b?--I:De&&vs(De,j))}return h}};var pt=class{constructor(e){m(this,"T",[]);m(this,"P",new Map);m(this,"se");this.se=e}get v(){return this.T.length}ie(e){let n=this.se(e.value);n!==void 0&&this.P.set(n,e)}ae(e){var o;let n=this.se((o=this.T[e])==null?void 0:o.value);n!==void 0&&this.P.delete(n)}static mt(e,n){return{items:[],index:e,value:n,order:-1}}w(e){e.order=this.v,this.T.push(e),this.ie(e)}yt(e,n){let o=this.v;for(let r=e;r<o;++r)this.T[r].order=r+1;n.order=e,this.T.splice(e,0,n),this.ie(n)}D(e){return this.T[e]}ce(e,n){this.ae(e),this.T[e]=n,this.ie(n),n.order=e}Ne(e){this.ae(e),this.T.splice(e,1);let n=this.v;for(let o=e;o<n;++o)this.T[o].order=o}Me(e){let n=this.v;for(let o=e;o<n;++o)this.ae(o);this.T.splice(e)}en(e){return this.P.has(e)}ht(e){var o;let n=this.P.get(e);return(o=n==null?void 0:n.order)!=null?o:-1}};var kn=Symbol("r-for"),As=t=>-1,No=()=>{},Jt=class Jt{constructor(e){m(this,"o");m(this,"x");m(this,"Ve");m(this,"R");this.o=e,this.x=e.r.p.for,this.Ve=kt(this.x),this.R=e.r.p.pre}k(e){let n=e.hasAttribute(this.x);return n&&this.Oe(e),this.o.M.j(e,o=>{o.hasAttribute(this.x)&&this.Oe(o)}),n}Y(e){return e[kn]?!0:(e[kn]=!0,Mt(e,this.Ve).forEach(n=>n[kn]=!0),!1)}Oe(e){if(e.hasAttribute(this.R)||this.Y(e))return;let n=e.getAttribute(this.x);if(!n){B(0,this.x,e);return}e.removeAttribute(this.x),this.gt(e,n)}Le(e){return de(e)?[]:(G(e)&&(e=e()),Symbol.iterator in Object(e)?e:typeof e=="number"?(o=>({*[Symbol.iterator](){for(let r=1;r<=o;r++)yield r}}))(e):Object.entries(e))}gt(e,n){var st;let o=this.bt(n);if(!(o!=null&&o.list)){B(1,this.x,n,e);return}let r=this.o.r.p.key,s=this.o.r.p.keyBind,i=(st=e.getAttribute(r))!=null?st:e.getAttribute(s);e.removeAttribute(r),e.removeAttribute(s);let a=Je(e),c=Kt.ft(this.o,a),f=e.parentNode;if(!f)return;let u=`${this.x} => ${n}`,l=new Comment(`__begin__ ${u}`);f.insertBefore(l,e),Ge(l,a),a.forEach(k=>{W(k)}),e.remove();let p=new Comment(`__end__ ${u}`);f.insertBefore(p,l.nextSibling);let h=this.o,g=h.m,d=g.L(),T=d.length===1?[void 0,d[0]]:void 0,R=this.xt(i),L=(k,ee)=>R(k)===R(ee),X=(k,ee)=>k===ee,D=(k,ee,ne)=>{let oe=o.createContext(ee,k),Ee=pt.mt(oe.index,ee),C=()=>{var U,Q;let N=(Q=(U=p.parentNode)!=null?U:l.parentNode)!=null?Q:f,y=ne.previousSibling,$=[];for(let v=0;v<a.length;++v){let P=a[v].cloneNode(!0);N.insertBefore(P,ne),$.push(P)}for(c?c.y(h,$):Ie(h,$),y=y.nextSibling;y!==ne;)Ee.items.push(y),y=y.nextSibling};return T?(T[0]=oe.ctx,g.E(T,C)):g.E(d,()=>{g.w(oe.ctx),C()}),Ee},H=(k,ee)=>{let ne=V.D(k).items,oe=ne[ne.length-1].nextSibling;for(let Ee of ne)W(Ee);V.ce(k,D(k,ee,oe))},pe=(k,ee)=>{V.w(D(k,ee,p))},Y=k=>{for(let ee of V.D(k).items)W(ee)},I=k=>{let ee=V.v;for(let ne=k;ne<ee;++ne)V.D(ne).index(ne)},b=k=>{let ee=l.parentNode,ne=p.parentNode;if(!ee||!ne)return;let oe=V.v;G(k)&&(k=k());let Ee=S(k[0]);if(w(Ee)&&Ee.length===0){we(l,p),V.Me(0);return}let C=[];for(let A of this.Le(k[0]))C.push(A);let N=Wt.dt({oldItems:V.T,newValues:C,getKey:R,isSameValue:X,mountNewValue:(A,K,ie)=>D(A,K,ie),removeMountItem:A=>{for(let K=0;K<A.items.length;++K)W(A.items[K])},endAnchor:p});if(N){V.T=N,V.P.clear();for(let A=0;A<N.length;++A){let K=N[A];K.order=A,K.index(A);let ie=R(K.value);ie!==void 0&&V.P.set(ie,K)}return}let y=0,$=Number.MAX_SAFE_INTEGER,U=oe,Q=this.o.r.forGrowThreshold,v=()=>V.v<U+Q;for(let A of C){let K=()=>{if(y<oe){let ie=V.D(y++);if(L(ie.value,A)){if(X(ie.value,A))return;H(y-1,A);return}let ht=V.ht(R(A));if(ht>=y&&ht-y<10){if(--y,$=Math.min($,y),Y(y),V.Ne(y),--oe,ht>y+1)for(let hn=y;hn<ht-1&&hn<oe&&!L(V.D(y).value,A);)++hn,Y(y),V.Ne(y),--oe;K();return}v()?(V.yt(y-1,D(y,A,V.D(y-1).items[0])),$=Math.min($,y-1),++oe):H(y-1,A)}else pe(y++,A)};K()}let P=y;for(oe=V.v;y<oe;)Y(y++);V.Me(P),I($)},M=()=>{j.stop(),me(),me=No},j=g.O(o.list),De=j.value,me=No,dn=0,V=new pt(R);for(let k of this.Le(De()[0]))V.w(D(dn++,k,p));z(l,M),me=j.subscribe(b)}bt(e){var c,f;let n=Jt.Tt.exec(e);if(!n)return;let o=(n[1]+((c=n[2])!=null?c:"")).split(",").map(u=>u.trim()),r=o.length>1?o.length-1:-1,s=r!==-1&&(o[r]==="index"||(f=o[r])!=null&&f.startsWith("#"))?o[r]:"";s&&o.splice(r,1);let i=n[3];if(!i||o.length===0)return;let a=/[{[]/.test(e);return{list:i,createContext:(u,l)=>{let p={},h=S(u);if(!a&&o.length===1)p[o[0]]=u;else if(w(h)){let d=0;for(let E of o)p[E]=h[d++]}else for(let d of o)p[d]=h[d];let g={ctx:p,index:As};return s&&(g.index=p[s.startsWith("#")?s.substring(1):s]=ae(l)),g}}}xt(e){if(!e)return o=>o;let n=e.trim();if(!n)return o=>o;if(n.includes(".")){let o=this.Rt(n),r=o.length>1?o.slice(1):void 0;return s=>{let i=S(s),a=this.Ie(i,o);return a!==void 0||!r?a:this.Ie(i,r)}}return o=>{var r;return S((r=S(o))==null?void 0:r[n])}}Rt(e){return e.split(".").filter(n=>n.length>0)}Ie(e,n){var r;let o=e;for(let s of n)o=(r=S(o))==null?void 0:r[s];return S(o)}};m(Jt,"Tt",/\{?\[?\(?([^)}\]]+)\)?\]?\}?([^)]+)?\s+\b(?:in|of)\b\s+(.*)\s*$/);var Gt=Jt;var Qt=class{constructor(e){m(this,"pe",0);m(this,"ue",new Map);m(this,"m");m(this,"Pe");m(this,"De");m(this,"Ue");m(this,"M");m(this,"F");m(this,"r");m(this,"R");m(this,"Be");this.m=e,this.r=e.r,this.De=new Gt(this),this.Pe=new Ot(this),this.Ue=new qt(this),this.M=new _t(this),this.F=new Ft(this),this.R=this.r.p.pre,this.Be=this.r.p.dynamic}Et(e){let n=he(e)?[e]:e.querySelectorAll("template");for(let o of n){if(o.hasAttribute(this.R))continue;let r=o.parentNode;if(!r)continue;let s=o.nextSibling;if(o.remove(),!o.content)continue;let i=[...o.content.childNodes];for(let a of i)r.insertBefore(a,s);Ie(this,i)}}$(e){++this.pe;try{if(e.nodeType!==Node.ELEMENT_NODE||e.hasAttribute(this.R)||this.Pe.k(e)||this.De.k(e)||this.Ue.k(e))return;this.M.k(e),this.Et(e),this.we(e,!0)}finally{--this.pe,this.pe===0&&this.Ct()}}wt(e,n){let o=document;if(!o){let r=e.parentNode;for(;r!=null&&r.parentNode;)r=r.parentNode;if(!r)return null;o=r}return o.querySelector(n)}He(e,n){let o=this.wt(e,n);if(!o)return!1;let r=e.parentElement;if(!r)return!1;let s=new Comment(`teleported => '${n}'`);return r.insertBefore(s,e),e.teleportedFrom=s,s.teleportedTo=e,z(s,()=>{W(e)}),o.appendChild(e),!0}vt(e,n){this.ue.set(e,n)}Ct(){let e=this.ue;if(e.size!==0){this.ue=new Map;for(let[n,o]of e.entries())this.He(n,o)}}we(e,n){var s;let o=this.F.Ce(e,n),r=this.r.B;for(let[i,a]of o.entries()){let[c,f]=a.te,u=(s=r[i])!=null?s:r[c];if(!u){console.error("directive not found:",c);continue}let l=a.ve;for(let p=0;p<l.length;++p){let h=l[p];this.y(u,h,i,!1,f,a.ne)}}}y(e,n,o,r,s,i){if(n.hasAttribute(this.R))return;let a=n.getAttribute(o);n.removeAttribute(o);let c=f=>{let u=f;for(;u;){let l=u.getAttribute(ut);if(l)return l;u=u.parentElement}return null};if(Rn()){let f=c(n);if(f){this.m.E(mo(f),()=>{this.V(e,n,a,s,i)});return}}this.V(e,n,a,s,i)}St(e,n,o){return e!==It?!1:(q(o)||this.He(n,o)||this.vt(n,o),!0)}V(e,n,o,r,s){if(n.nodeType!==Node.ELEMENT_NODE||o==null||this.St(e,n,o))return;let i=this.At(r,e.once),a=this.kt(e,o),c=this.Nt(a,i);z(n,c.stop);let f=this.Mt(n,o,a,i,r,s),u=this.Vt(e,f,c);if(!u)return;let l=this.Ot(f,a,i,r,u);l(),e.once||(c.result=a.subscribe(l),i&&(c.dynamic=i.subscribe(l)))}At(e,n){let o=To(e,this.Be);if(o)return this.m.O(F(o),void 0,void 0,void 0,n)}kt(e,n){return this.m.O(n,e.isLazy,e.isLazyKey,e.collectRefObj,e.once)}Nt(e,n){let o={stop:()=>{var r,s,i;e.stop(),n==null||n.stop(),(r=o.result)==null||r.call(o),(s=o.dynamic)==null||s.call(o),(i=o.mounted)==null||i.call(o),o.result=void 0,o.dynamic=void 0,o.mounted=void 0}};return o}Mt(e,n,o,r,s,i){return{el:e,expr:n,values:o.value(),previousValues:void 0,option:r?r.value()[0]:s,previousOption:void 0,flags:i,parseResult:o,dynamicOption:r}}Vt(e,n,o){let r=e.mount(n);if(typeof r=="function"){o.mounted=r;return}return r!=null&&r.unmount&&(o.mounted=r.unmount),r==null?void 0:r.update}Ot(e,n,o,r,s){let i,a;return()=>{let c=n.value(),f=o?o.value()[0]:r;e.values=c,e.previousValues=i,e.option=f,e.previousOption=a,i=c,a=f,s(e)}}};var Oo="http://www.w3.org/1999/xlink",Ns={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 Os(t){return!!t||t===""}var Ms=(t,e,n,o,r,s)=>{var a;if(o){s&&s.includes("camel")&&(o=F(o)),Xt(t,o,e[0],r);return}let i=e.length;for(let c=0;c<i;++c){let f=e[c];if(w(f)){let u=(a=n==null?void 0:n[c])==null?void 0:a[0],l=f[0],p=f[1];Xt(t,l,p,u)}else if(O(f))for(let u of Object.entries(f)){let l=u[0],p=u[1],h=n==null?void 0:n[c],g=h&&l in h?l:void 0;Xt(t,l,p,g)}else{let u=n==null?void 0:n[c],l=e[c++],p=e[c];Xt(t,l,p,u)}}},Ln={mount:()=>({update:({el:t,values:e,previousValues:n,option:o,previousOption:r,flags:s})=>{Ms(t,e,n,o,r,s)}})},Xt=(t,e,n,o)=>{if(o&&o!==e&&t.removeAttribute(o),de(e)){B(3,"r-bind",t);return}if(!J(e)){B(6,`Attribute key is not string at ${t.outerHTML}`,e);return}if(e.startsWith("xlink:")){de(n)?t.removeAttributeNS(Oo,e.slice(6,e.length)):t.setAttributeNS(Oo,e,n);return}let r=e in Ns;de(n)||r&&!Os(n)?t.removeAttribute(e):t.setAttribute(e,r?"":n)};var ks=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)Mo(t,s[c],i==null?void 0:i[c])}else Mo(t,s,i)}},In={mount:()=>({update:({el:t,values:e,previousValues:n})=>{ks(t,e,n)}})},Mo=(t,e,n)=>{let o=S(e),r=S(n),s=t.classList,i=J(o),a=J(r);if(o&&!i){let c=o;if(r&&!a){let f=r;for(let u in f)(!(u in c)||!S(c[u]))&&s.remove(u)}for(let f in c)S(c[f])&&s.add(f)}else if(i){if(r!==o){let c=a?Xe(r):[],f=Xe(o);c.length>0&&s.remove(...c),f.length>0&&s.add(...f)}}else if(r){let c=a?Xe(r):[];c.length>0&&s.remove(...c)}};function Ls(t,e){if(t.length!==e.length)return!1;let n=!0;for(let o=0;n&&o<t.length;o++)n=Se(t[o],e[o]);return n}function Se(t,e){if(t===e)return!0;let n=bn(t),o=bn(e);if(n||o)return n&&o?t.getTime()===e.getTime():!1;if(n=it(t),o=it(e),n||o)return t===e;if(n=w(t),o=w(e),n||o)return n&&o?Ls(t,e):!1;if(n=O(t),o=O(e),n||o){if(!n||!o)return!1;let r=Object.keys(t).length,s=Object.keys(e).length;if(r!==s)return!1;for(let i in t){let a=Object.prototype.hasOwnProperty.call(t,i),c=Object.prototype.hasOwnProperty.call(e,i);if(a&&!c||!Se(t[i],e[i]))return!1}return!0}return String(t)===String(e)}function Yt(t,e){return t.findIndex(n=>Se(n,e))}var ko=t=>{let e=parseFloat(t);return isNaN(e)?t:e};var Zt=t=>{if(!x(t))throw _(3,"pause");t(void 0,void 0,3)};var en=t=>{if(!x(t))throw _(3,"resume");t(void 0,void 0,4)};var Io={mount:({el:t,parseResult:e,flags:n})=>({update:({values:o})=>{Is(t,o[0])},unmount:Vs(t,e,n)})},Is=(t,e)=>{let n=Uo(t);if(n&&Vo(t))w(e)?e=Yt(e,Ae(t))>-1:fe(e)?e=e.has(Ae(t)):e=js(t,e),t.checked=e;else if(n&&Po(t))t.checked=Se(e,Ae(t));else if(n||Ho(t))Do(t)?t.value!==(e==null?void 0:e.toString())&&(t.value=e):t.value!==e&&(t.value=e);else if(Bo(t)){let o=t.options,r=o.length,s=t.multiple;for(let i=0;i<r;i++){let a=o[i],c=Ae(a);if(s)w(e)?a.selected=Yt(e,c)>-1:a.selected=e.has(c);else if(Se(Ae(a),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!s&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}else B(7,t)},mt=t=>(x(t)&&(t=t()),G(t)&&(t=t()),t?J(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}),Vo=t=>t.type==="checkbox",Po=t=>t.type==="radio",Do=t=>t.type==="number"||t.type==="range",Uo=t=>t.tagName==="INPUT",Ho=t=>t.tagName==="TEXTAREA",Bo=t=>t.tagName==="SELECT",Vs=(t,e,n)=>{let o=e.value,r=mt(n==null?void 0:n.join(",")),s=mt(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 B(8,t),()=>{};let a=()=>e.refs[0],c=Uo(t);return c&&Vo(t)?Ds(t,a):c&&Po(t)?$s(t,a):c||Ho(t)?Ps(t,i,a,o):Bo(t)?_s(t,a,o):(B(7,t),()=>{})},Lo=/[.,' ·٫]/,Ps=(t,e,n,o)=>{let s=e.lazy?"change":"input",i=Do(t),a=()=>{!e.trim&&!mt(o()[1]).trim||(t.value=t.value.trim())},c=p=>{let h=p.target;h.composing=1},f=p=>{let h=p.target;h.composing&&(h.composing=0,h.dispatchEvent(new Event(s)))},u=()=>{t.removeEventListener(s,l),t.removeEventListener("change",a),t.removeEventListener("compositionstart",c),t.removeEventListener("compositionend",f),t.removeEventListener("change",f)},l=p=>{let h=n();if(!h)return;let g=p.target;if(!g||g.composing)return;let d=g.value,E=mt(o()[1]);if(i||E.number||E.int){if(E.int)d=parseInt(d);else{if(Lo.test(d[d.length-1])&&d.split(Lo).length===2){if(d+="0",d=parseFloat(d),isNaN(d))d="";else if(h()===d)return}d=parseFloat(d)}isNaN(d)&&(d=""),t.value=d}else E.trim&&(d=d.trim());h(d)};return t.addEventListener(s,l),t.addEventListener("change",a),t.addEventListener("compositionstart",c),t.addEventListener("compositionend",f),t.addEventListener("change",f),u},Ds=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t),a=t.checked,c=s();if(w(c)){let f=Yt(c,i),u=f!==-1;a&&!u?c.push(i):!a&&u&&c.splice(f,1)}else fe(c)?a?c.add(i):c.delete(i):s(Bs(t,a))};return t.addEventListener(n,r),o},Ae=t=>"_value"in t?t._value:t.value,jo="trueValue",Us="falseValue",$o="true-value",Hs="false-value",Bs=(t,e)=>{let n=e?jo:Us;if(n in t)return t[n];let o=e?$o:Hs;return t.hasAttribute(o)?t.getAttribute(o):e},js=(t,e)=>{if(jo in t)return Se(e,t.trueValue);let o=$o;return t.hasAttribute(o)?Se(e,t.getAttribute(o)):Se(e,!0)},$s=(t,e)=>{let n="change",o=()=>{t.removeEventListener(n,r)},r=()=>{let s=e();if(!s)return;let i=Ae(t);s(i)};return t.addEventListener(n,r),o},_s=(t,e,n)=>{let o="change",r=()=>{t.removeEventListener(o,s)},s=()=>{let i=e();if(!i)return;let c=mt(n()[1]).number,f=Array.prototype.filter.call(t.options,u=>u.selected).map(u=>c?ko(Ae(u)):Ae(u));if(t.multiple){let u=i();try{if(Zt(i),fe(u)){u.clear();for(let l of f)u.add(l)}else w(u)?(u.splice(0),u.push(...f)):i(f)}finally{en(i),Z(i)}}else i(f[0])};return t.addEventListener(o,s),r};var Fs=["stop","prevent","capture","self","once","left","right","middle","passive"],qs=t=>{let e={};if(q(t))return;let n=t.split(",");for(let o of Fs)e[o]=n.includes(o);return e},zs=(t,e,n,o,r)=>{var f,u;if(o){let l=e.value(),p=S(o.value()[0]);return J(p)?Vn(t,F(p),()=>e.value()[0],(f=r==null?void 0:r.join(","))!=null?f:l[1]):()=>{}}else if(n){let l=e.value();return Vn(t,F(n),()=>e.value()[0],(u=r==null?void 0:r.join(","))!=null?u:l[1])}let s=[],i=()=>{s.forEach(l=>l())},a=e.value(),c=a.length;for(let l=0;l<c;++l){let p=a[l];if(G(p)&&(p=p()),O(p))for(let h of Object.entries(p)){let g=h[0],d=()=>{let T=e.value()[l];return G(T)&&(T=T()),T=T[g],G(T)&&(T=T()),T},E=p[g+"_flags"];s.push(Vn(t,g,d,E))}else B(2,"r-on",t)}return i},Pn={isLazy:(t,e)=>e===-1&&t%2===0,isLazyKey:(t,e)=>e===0&&!t.endsWith("_flags"),once:!1,collectRefObj:!0,mount:({el:t,parseResult:e,option:n,dynamicOption:o,flags:r})=>zs(t,e,n,o,r)},Ks=(t,e)=>{if(t.startsWith("keydown")||t.startsWith("keyup")||t.startsWith("keypress")){e!=null||(e="");let n=[...t.split("."),...e.split(",")];t=n[0];let o=n[1],r=n.includes("ctrl"),s=n.includes("shift"),i=n.includes("alt"),a=n.includes("meta"),c=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]},Vn=(t,e,n,o)=>{if(q(e))return B(5,"r-on",t),()=>{};let r=qs(o),s=r?{capture:r.capture,passive:r.passive,once:r.once}:void 0,i;[e,i]=Ks(e,o);let a=u=>{if(!i(u)||!n&&e==="submit"&&(r!=null&&r.prevent))return;let l=n(u);G(l)&&(l=l(u)),G(l)&&l(u)},c=()=>{t.removeEventListener(e,f,s)},f=u=>{if(!r){a(u);return}try{if(r.left&&u.button!==0||r.middle&&u.button!==1||r.right&&u.button!==2||r.self&&u.target!==t)return;r.stop&&u.stopPropagation(),r.prevent&&u.preventDefault(),a(u)}finally{r.once&&c()}};return t.addEventListener(e,f,s),c};var Ws=(t,e,n,o)=>{if(n){o&&o.includes("camel")&&(n=F(n)),tt(t,n,e[0]);return}let r=e.length;for(let s=0;s<r;++s){let i=e[s];if(w(i)){let a=i[0],c=i[1];tt(t,a,c)}else if(O(i))for(let a of Object.entries(i)){let c=a[0],f=a[1];tt(t,c,f)}else{let a=e[s++],c=e[s];tt(t,a,c)}}},_o={mount:()=>({update:({el:t,values:e,option:n,flags:o})=>{Ws(t,e,n,o)}})};function Gs(t){return!!t||t===""}var tt=(t,e,n)=>{if(de(e)){B(3,":prop",t);return}if(e==="innerHTML"||e==="textContent"){let s=[...t.childNodes];setTimeout(()=>s.forEach(ge),1),t[e]=n!=null?n:"";return}let o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){t._value=n;let s=o==="OPTION"?t.getAttribute("value"):t.value,i=n!=null?n:"";s!==i&&(t.value=i),n==null&&t.removeAttribute(e);return}let r=!1;if(n===""||n==null){let s=typeof t[e];s==="boolean"?n=Gs(n):n==null&&s==="string"?(n="",r=!0):s==="number"&&(n=0,r=!0)}try{t[e]=n}catch(s){r||B(4,e,o,n,s)}r&&t.removeAttribute(e)};var Fo={once:!0,mount:({el:t,parseResult:e,expr:n})=>{let o=e,r=o.value()[0],s=w(r),i=o.refs[0];return s?r.push(t):i?i==null||i(t):o.context[n]=t,()=>{if(s){let a=r.indexOf(t);a!==-1&&r.splice(a,1)}else i==null||i(null)}}};var Js=(t,e)=>{let n=Le(t).data,o=n._ord;ro(o)&&(o=n._ord=t.style.display),ct(e[0])?t.style.display=o:t.style.display="none"},qo={mount:()=>({update:({el:t,values:e})=>{Js(t,e)}})};var Qs=(t,e,n)=>{let o=e.length;for(let r=0;r<o;++r){let s=e[r],i=n==null?void 0:n[r];if(w(s)){let a=s.length;for(let c=0;c<a;++c)zo(t,s[c],i==null?void 0:i[c])}else zo(t,s,i)}},tn={mount:()=>({update:({el:t,values:e,previousValues:n})=>{Qs(t,e,n)}})},zo=(t,e,n)=>{let o=S(e),r=S(n),s=t.style,i=J(o);if(o&&!i){let a=o;if(r&&!J(r)){let c=r;for(let f in c)S(a[f])==null&&Un(s,f,"")}for(let c in a)Un(s,c,a[c])}else{let a=s.display;if(i?r!==o&&(s.cssText=o):r&&t.removeAttribute("style"),"_ord"in Le(t).data)return;s.display=a}},Ko=/\s*!important$/;function Un(t,e,n){let o=S(n);if(w(o))o.forEach(r=>{Un(t,e,r)});else{let r=o==null?"":String(o);if(e.startsWith("--"))t.setProperty(e,r);else{let s=Xs(t,e);Ko.test(r)?t.setProperty(Qe(s),r.replace(Ko,""),"important"):t[s]=r}}}var Wo=["Webkit","Moz","ms"],Dn={};function Xs(t,e){let n=Dn[e];if(n)return n;let o=F(e);if(o!=="filter"&&o in t)return Dn[e]=o;o=lt(o);for(let r=0;r<Wo.length;r++){let s=Wo[r]+o;if(s in t)return Dn[e]=s}return e}var ce=t=>Go(S(t)),Go=(t,e=new WeakMap)=>{if(!t||!O(t))return t;if(w(t))return t.map(ce);if(fe(t)){let o=new Set;for(let r of t.keys())o.add(ce(r));return o}if(Oe(t)){let o=new Map;for(let r of t)o.set(ce(r[0]),ce(r[1]));return o}if(e.has(t))return S(e.get(t));let n=bt({},t);e.set(t,n);for(let o of Object.entries(n))n[o[0]]=Go(S(o[1]),e);return n};var Ys=(t,e)=>{var o;let n=e[0];t.textContent=fe(n)?JSON.stringify(ce([...n])):Oe(n)?JSON.stringify(ce([...n])):O(n)?JSON.stringify(ce(n)):(o=n==null?void 0:n.toString())!=null?o:""},Jo={mount:()=>({update:({el:t,values:e})=>{Ys(t,e)}})};var Qo={mount:()=>({update:({el:t,values:e})=>{tt(t,"value",e[0])}})};var Pe=class Pe{constructor(e){m(this,"B",{});m(this,"p",{});m(this,"lt",()=>Object.keys(this.B).filter(e=>e.length===1||!e.startsWith(":")));m(this,"Z",new Map);m(this,"_",new Map);m(this,"forGrowThreshold",10);m(this,"globalContext");m(this,"useInterpolation",!0);m(this,"propValidationMode","throw");if(this.setDirectives("r-"),e){this.globalContext=e;return}this.globalContext=this.It()}static getDefault(){var e;return(e=Pe.je)!=null?e:Pe.je=new Pe}It(){let e={},n=globalThis;for(let o of Pe.Lt.split(","))e[o]=n[o];return e.ref=Ce,e.sref=ae,e.flatten=ce,e}addComponent(...e){for(let n of e){if(!n.defaultName){He.warning("Registered component's default name is not defined",n);continue}this.Z.set(lt(n.defaultName),n),this._.set(lt(n.defaultName).toLocaleUpperCase(),n)}}setDirectives(e){this.B={".":_o,":":Ln,"@":Pn,[`${e}on`]:Pn,[`${e}bind`]:Ln,[`${e}html`]:zt,[`${e}text`]:Jo,[`${e}show`]:qo,[`${e}model`]:Io,":style":tn,[`${e}style`]:tn,[`${e}bind:style`]:tn,":class":In,[`${e}bind:class`]:In,":ref":Fo,":value":Qo,[`${e}teleport`]:It},this.p={for:`${e}for`,if:`${e}if`,else:`${e}else`,elseif:`${e}else-if`,pre:`${e}pre`,inherit:`${e}inherit`,text:`${e}text`,context:":context",contextAlias:`${e}context`,bind:`${e}bind`,on:`${e}on`,keyBind:":key",key:"key",is:":is",teleport:`${e}teleport`,dynamic:"_d_"}}updateDirectives(e){e(this.B,this.p)}};m(Pe,"je"),m(Pe,"Lt","Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console");var le=Pe;var nn=(t,e)=>{if(!t)return;let o=(e!=null?e:le.getDefault()).p,r=/(\{\{[^]*?\}\}|\[\[[^]*?\]\])/g,s=[{start:"{{",end:"}}"},{start:"[[",end:"]]"}];for(let i of ei(t,o.pre,s))Zs(i,o.text,r,s)},Zs=(t,e,n,o)=>{var c;let r=t.textContent;if(!r)return;let s=n,i=r.split(s);if(i.length<=1)return;if(((c=t.parentElement)==null?void 0:c.childNodes.length)===1&&i.length===3){let f=i[1],u=Xo(f,o);if(u&&q(i[0])&&q(i[2])){let l=t.parentElement;l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),l.innerText="";return}}let a=document.createDocumentFragment();for(let f of i){let u=Xo(f,o);if(u){let l=document.createElement("span");l.setAttribute(e,f.substring(u.start.length,f.length-u.end.length)),a.appendChild(l)}else a.appendChild(document.createTextNode(f))}t.replaceWith(a)},ei=(t,e,n)=>{let o=[],r=s=>{var i;if(s.nodeType===Node.TEXT_NODE)n.some(a=>{var c;return(c=s.textContent)==null?void 0:c.includes(a.start)})&&o.push(s);else{if((i=s==null?void 0:s.hasAttribute)!=null&&i.call(s,e))return;for(let a of ve(s))r(a)}};return r(t),o},Xo=(t,e)=>e.find(n=>t.startsWith(n.start)&&t.endsWith(n.end));var ti=9,ni=10,oi=13,ri=32,Ne=46,on=44,si=39,ii=34,rn=40,nt=41,sn=91,Hn=93,Bn=63,ai=59,Yo=58,Zo=123,an=125,_e=43,cn=45,jn=96,er=47,$n=92,tr=new Set([2,3]),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},ci=eo(bt({"=>":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}),cr=Object.keys(ar),ui=new Set(cr),Fn=new Set(["=>"]);cr.forEach(t=>Fn.add(t));var nr={true:!0,false:!1,null:null},fi="this",ot="Expected ",Fe="Unexpected ",zn="Unclosed ",li=ot+":",or=ot+"expression",pi="missing }",mi=Fe+"object property",di=zn+"(",rr=ot+"comma",sr=Fe+"token ",hi=Fe+"period",_n=ot+"expression after ",yi="missing unaryOp argument",gi=zn+"[",bi=ot+"exponent (",Ti="Variable names cannot start with a number (",xi=zn+'quote after "',dt=t=>t>=48&&t<=57,ir=t=>ci[t],qn=class{constructor(e){m(this,"u");m(this,"e");this.u=e,this.e=0}get H(){return this.u.charAt(this.e)}get h(){return this.u.charCodeAt(this.e)}f(e){return this.u.charCodeAt(this.e)===e}K(e){return e>=65&&e<=90||e>=97&&e<=122||e===36||e===95||e>=128}le(e){return this.K(e)||dt(e)}i(e){return new Error(`${e} at character ${this.e}`)}g(){let e=this.h,n=this.u,o=this.e;for(;e===ri||e===ti||e===ni||e===oi;)e=n.charCodeAt(++o);this.e=o}parse(){let e=this.fe();return e.length===1?e[0]:{type:0,body:e}}fe(e){let n=[];for(;this.e<this.u.length;){let o=this.h;if(o===ai||o===on)this.e++;else{let r=this.S();if(r)n.push(r);else if(this.e<this.u.length){if(o===e)break;throw this.i(Fe+'"'+this.H+'"')}}}return n}S(){var n;let e=(n=this.Pt())!=null?n:this.$e();return this.g(),this.Dt(e)}de(){this.g();let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);if(isNaN(o))return!1;let a=!1,c=0;return o===62&&r===62&&s===62&&i===61?(a=">>>=",c=4):o===61&&r===61&&s===61?(a="===",c=3):o===33&&r===61&&s===61?(a="!==",c=3):o===62&&r===62&&s===62?(a=">>>",c=3):o===60&&r===60&&s===61?(a="<<=",c=3):o===62&&r===62&&s===61?(a=">>=",c=3):o===42&&r===42&&s===61?(a="**=",c=3):o===61&&r===62?(a="=>",c=2):o===124&&r===124?(a="||",c=2):o===63&&r===63?(a="??",c=2):o===38&&r===38?(a="&&",c=2):o===61&&r===61?(a="==",c=2):o===33&&r===61?(a="!=",c=2):o===60&&r===61?(a="<=",c=2):o===62&&r===61?(a=">=",c=2):o===60&&r===60?(a="<<",c=2):o===62&&r===62?(a=">>",c=2):o===43&&r===61?(a="+=",c=2):o===45&&r===61?(a="-=",c=2):o===42&&r===61?(a="*=",c=2):o===47&&r===61?(a="/=",c=2):o===37&&r===61?(a="%=",c=2):o===38&&r===61?(a="&=",c=2):o===94&&r===61?(a="^=",c=2):o===124&&r===61?(a="|=",c=2):o===42&&r===42?(a="**",c=2):o===105&&r===110?this.le(e.charCodeAt(n+2))||(a="in",c=2):o===61?(a="=",c=1):o===124?(a="|",c=1):o===94?(a="^",c=1):o===38?(a="&",c=1):o===60?(a="<",c=1):o===62?(a=">",c=1):o===43?(a="+",c=1):o===45?(a="-",c=1):o===42?(a="*",c=1):o===47?(a="/",c=1):o===37&&(a="%",c=1),a?(this.e+=c,a):!1}$e(){let e,n,o,r,s,i,a,c;if(s=this.z(),!s||(n=this.de(),!n))return s;if(r={value:n,prec:ir(n),right_a:Fn.has(n)},i=this.z(),!i)throw this.i(_n+n);let f=[s,r,i];for(;n=this.de();){o=ir(n),r={value:n,prec:o,right_a:Fn.has(n)},c=n;let u=l=>r.right_a&&l.right_a?o>l.prec:o<=l.prec;for(;f.length>2&&u(f[f.length-2]);)i=f.pop(),n=f.pop().value,s=f.pop(),e=this._e(n,s,i),f.push(e);if(e=this.z(),!e)throw this.i(_n+c);f.push(r,e)}for(a=f.length-1,e=f[a];a>1;)e=this._e(f[a-1].value,f[a-2],e),a-=2;return e}z(){let e;if(this.g(),e=this.Ut(),e)return this.me(e);let n=this.h;if(dt(n)||n===Ne)return this.Bt();if(n===si||n===ii)e=this.Ht();else if(n===sn)e=this.jt();else{let o=this.$t();if(o){let r=this.z();if(!r)throw this.i(yi);return this.me({type:7,operator:o,argument:r})}this.K(n)?(e=this.ye(),e.name in nr?e={type:4,value:nr[e.name],raw:e.name}:e.name===fi&&(e={type:5})):n===rn&&(e=this._t())}return e?(e=this.W(e),this.me(e)):!1}_e(e,n,o){if(e==="=>"){let r=n.type===1?n.expressions:[n];return{type:15,params:r,body:o}}return ui.has(e)?{type:16,operator:e,left:n,right:o}:{type:8,operator:e,left:n,right:o}}Ut(){let e={node:!1};return this.Ft(e),e.node||(this.qt(e),e.node)||(this.Kt(e),e.node)||(this.Fe(e),e.node)||this.zt(e),e.node}me(e){let n={node:e};return this.Wt(n),this.Gt(n),this.Jt(n),n.node}$t(){let e=this.u,n=this.e,o=e.charCodeAt(n),r=e.charCodeAt(n+1),s=e.charCodeAt(n+2),i=e.charCodeAt(n+3);return o===cn?(this.e++,"-"):o===33?(this.e++,"!"):o===126?(this.e++,"~"):o===_e?(this.e++,"+"):o===110&&r===101&&s===119&&!this.le(i)?(this.e+=3,"new"):!1}Pt(){let e={};return this.Qt(e),e.node}Dt(e){let n={node:e};return this.Xt(n),n.node}W(e){this.g();let n=this.h;for(;n===Ne||n===sn||n===rn||n===Bn;){let o;if(n===Bn){if(this.u.charCodeAt(this.e+1)!==Ne)break;o=!0,this.e+=2,this.g(),n=this.h}if(this.e++,n===sn){if(e={type:3,computed:!0,object:e,property:this.S()},this.g(),n=this.h,n!==Hn)throw this.i(gi);this.e++}else n===rn?e={type:6,arguments:this.qe(nt),callee:e}:(o&&this.e--,this.g(),e={type:3,computed:!1,object:e,property:this.ye()});o&&(e.optional=!0),this.g(),n=this.h}return e}Bt(){let e=this.u,n=this.e,o=n;for(;dt(e.charCodeAt(o));)o++;if(e.charCodeAt(o)===Ne)for(o++;dt(e.charCodeAt(o));)o++;let r=e.charCodeAt(o);if(r===101||r===69){o++;let a=e.charCodeAt(o);(a===_e||a===cn)&&o++;let c=o;for(;dt(e.charCodeAt(o));)o++;if(c===o){this.e=o;let f=e.slice(n,o);throw this.i(bi+f+this.H+")")}}this.e=o;let s=e.slice(n,o),i=e.charCodeAt(o);if(this.K(i))throw this.i(Ti+s+this.H+")");if(i===Ne||s.length===1&&s.charCodeAt(0)===Ne)throw this.i(hi);return{type:4,value:parseFloat(s),raw:s}}Ht(){let e=this.u,n=e.length,o=this.e,r=e.charCodeAt(this.e++),s=this.e,i=s,a=[],c=!1,f=!1;for(;s<n;){let l=e.charCodeAt(s);if(l===r){f=!0,this.e=s+1;break}if(l===$n){c||(c=!0),a.push(e.slice(i,s));let p=e.charCodeAt(s+1);a.push(this.Ke(p)),s+=2,i=s}else s++}let u=c?a.join("")+e.slice(i,f?s:n):e.slice(i,f?s:n);if(!f)throw this.e=s,this.i(xi+u+'"');return{type:4,value:u,raw:e.substring(o,this.e)}}Ke(e){switch(e){case 110:return`
2
+ `;case 114:return"\r";case 116:return" ";case 98:return"\b";case 102:return"\f";case 118:return"\v";default:return isNaN(e)?"":String.fromCharCode(e)}}ye(){let e=this.h,n=this.e;if(this.K(e))this.e++;else throw this.i(Fe+this.H);for(;this.e<this.u.length&&(e=this.h,this.le(e));)this.e++;return{type:2,name:this.u.slice(n,this.e)}}qe(e){let n=[],o=!1,r=0;for(;this.e<this.u.length;){this.g();let s=this.h;if(s===e){if(o=!0,this.e++,e===nt&&r&&r>=n.length)throw this.i(sr+String.fromCharCode(e));break}else if(s===on){if(this.e++,r++,r!==n.length){if(e===nt)throw this.i(sr+",");for(let i=n.length;i<r;i++)n.push(null)}}else{if(n.length!==r&&r!==0)throw this.i(rr);{let i=this.S();if(!i||i.type===0)throw this.i(rr);n.push(i)}}}if(!o)throw this.i(ot+String.fromCharCode(e));return n}_t(){this.e++;let e=this.fe(nt);if(this.f(nt))return this.e++,e.length===1?e[0]:e.length?{type:1,expressions:e}:!1;throw this.i(di)}jt(){return this.e++,{type:9,elements:this.qe(Hn)}}Ft(e){if(this.f(Zo)){this.e++;let n=[];for(;!isNaN(this.h);){if(this.g(),this.f(an)){this.e++,e.node=this.W({type:10,properties:n});return}let o=this.S();if(!o)break;if(this.g(),o.type===2&&(this.f(on)||this.f(an)))n.push({type:12,computed:!1,key:o,value:o,shorthand:!0});else if(this.f(Yo)){this.e++;let r=this.S();if(!r)throw this.i(mi);let s=o.type===9;n.push({type:12,computed:s,key:s?o.elements[0]:o,value:r,shorthand:!1}),this.g()}else n.push(o);this.f(on)&&this.e++}throw this.i(pi)}}qt(e){let n=this.h;if((n===_e||n===cn)&&n===this.u.charCodeAt(this.e+1)){this.e+=2;let o=e.node={type:13,operator:n===_e?"++":"--",argument:this.W(this.ye()),prefix:!0};if(!o.argument||!tr.has(o.argument.type))throw this.i(Fe+o.operator)}}Gt(e){let n=e.node,o=this.h;if((o===_e||o===cn)&&o===this.u.charCodeAt(this.e+1)){if(!tr.has(n.type))throw this.i(Fe+(o===_e?"++":"--"));this.e+=2,e.node={type:13,operator:o===_e?"++":"--",argument:n,prefix:!1}}}Kt(e){this.u.charCodeAt(this.e)===Ne&&this.u.charCodeAt(this.e+1)===Ne&&this.u.charCodeAt(this.e+2)===Ne&&(this.e+=3,e.node={type:14,argument:this.S()})}Xt(e){if(e.node&&this.f(Bn)){this.e++;let n=e.node,o=this.S();if(!o)throw this.i(or);if(this.g(),this.f(Yo)){this.e++;let r=this.S();if(!r)throw this.i(or);e.node={type:11,test:n,consequent:o,alternate:r}}else throw this.i(li)}}Qt(e){if(this.g(),this.f(rn)){let n=this.e;if(this.e++,this.g(),this.f(nt)){this.e++;let o=this.de();if(o==="=>"){let r=this.$e();if(!r)throw this.i(_n+o);e.node={type:15,params:null,body:r};return}}this.e=n}}Jt(e){let n=e.node,o=n.type;(o===2||o===3)&&this.f(jn)&&(e.node={type:17,tag:n,quasi:this.Fe(e)})}Fe(e){if(!this.f(jn))return;let n=this.u,o=n.length,r={type:19,quasis:[],expressions:[]},s=++this.e,i=[],a=[],c=!1,f=u=>{if(!c){let h=n.slice(s,this.e);return r.quasis.push({type:18,value:{raw:h,cooked:h},tail:u})}i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=i.join(""),p=a.join("");return i.length=0,a.length=0,c=!1,r.quasis.push({type:18,value:{raw:l,cooked:p},tail:u})};for(;this.e<o;){let u=n.charCodeAt(this.e);if(u===jn)return f(!0),this.e+=1,e.node=r,r;if(u===36&&n.charCodeAt(this.e+1)===Zo){if(f(!1),this.e+=2,r.expressions.push(...this.fe(an)),!this.f(an))throw this.i("unclosed ${");this.e+=1,s=this.e}else if(u===$n){c||(c=!0),i.push(n.slice(s,this.e)),a.push(n.slice(s,this.e));let l=n.charCodeAt(this.e+1);i.push(n.slice(this.e,this.e+2)),a.push(this.Ke(l)),this.e+=2,s=this.e}else this.e+=1}throw this.i("Unclosed `")}Wt(e){let n=e.node;if(!n||n.operator!=="new"||!n.argument)return;if(!n.argument||![6,3].includes(n.argument.type))throw this.i("Expected new function()");e.node=n.argument;let o=e.node;for(;o.type===3||o.type===6&&o.callee.type===3;)o=o.type===3?o.object:o.callee.object;o.type=20}zt(e){if(!this.f(er))return;let n=++this.e,o=!1;for(;this.e<this.u.length;){if(this.h===er&&!o){let r=this.u.slice(n,this.e),s="";for(;++this.e<this.u.length;){let a=this.h;if(a>=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57)s+=this.H;else break}let i;try{i=new RegExp(r,s)}catch(a){throw this.i(a.message)}return e.node={type:4,value:i,raw:this.u.slice(n-1,this.e)},e.node=this.W(e.node),e.node}this.f(sn)?o=!0:o&&this.f(Hn)&&(o=!1),this.e+=this.f($n)?2:1}throw this.i("Unclosed Regex")}},ur=t=>new qn(t).parse();var Ci={"=>":(t,e)=>{},"=":(t,e)=>{},"*=":(t,e)=>{},"**=":(t,e)=>{},"/=":(t,e)=>{},"%=":(t,e)=>{},"+=":(t,e)=>{},"-=":(t,e)=>{},"<<=":(t,e)=>{},">>=":(t,e)=>{},">>>=":(t,e)=>{},"&=":(t,e)=>{},"^=":(t,e)=>{},"|=":(t,e)=>{},"||":(t,e)=>t()||e(),"??":(t,e)=>{var n;return(n=t())!=null?n:e()},"&&":(t,e)=>t()&&e(),"|":(t,e)=>t|e,"^":(t,e)=>t^e,"&":(t,e)=>t&e,"==":(t,e)=>t==e,"!=":(t,e)=>t!=e,"===":(t,e)=>t===e,"!==":(t,e)=>t!==e,"<":(t,e)=>t<e,">":(t,e)=>t>e,"<=":(t,e)=>t<=e,">=":(t,e)=>t>=e,in:(t,e)=>t in e,"<<":(t,e)=>t<<e,">>":(t,e)=>t>>e,">>>":(t,e)=>t>>>e,"+":(t,e)=>t+e,"-":(t,e)=>t-e,"*":(t,e)=>t*e,"/":(t,e)=>t/e,"%":(t,e)=>t%e,"**":(t,e)=>gt(t,e)},Ei={"-":t=>-t,"+":t=>+t,"!":t=>!t,"~":t=>~t,new:t=>t},mr=t=>{if(!(t!=null&&t.some(pr)))return t;let e=[];return t.forEach(n=>pr(n)?e.push(...n):e.push(n)),e},fr=(...t)=>mr(t),Kn=(t,e)=>{if(!t)return e;let n=Object.create(e!=null?e:{});return n.$event=t,n},Ri={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(++o),o}return++t[e]},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(--o),o}return--t[e]}},wi={"++":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o+1),o}return t[e]++},"--":(t,e)=>{let n=t[e];if(x(n)){let o=n();return n(o-1),o}return t[e]--}},lr={"=":(t,e,n)=>{let o=t[e];return x(o)?o(n):t[e]=n},"+=":(t,e,n)=>{let o=t[e];return x(o)?o(o()+n):t[e]+=n},"-=":(t,e,n)=>{let o=t[e];return x(o)?o(o()-n):t[e]-=n},"*=":(t,e,n)=>{let o=t[e];return x(o)?o(o()*n):t[e]*=n},"/=":(t,e,n)=>{let o=t[e];return x(o)?o(o()/n):t[e]/=n},"%=":(t,e,n)=>{let o=t[e];return x(o)?o(o()%n):t[e]%=n},"**=":(t,e,n)=>{let o=t[e];return x(o)?o(gt(o(),n)):t[e]=gt(t[e],n)},"<<=":(t,e,n)=>{let o=t[e];return x(o)?o(o()<<n):t[e]<<=n},">>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>n):t[e]>>=n},">>>=":(t,e,n)=>{let o=t[e];return x(o)?o(o()>>>n):t[e]>>>=n},"|=":(t,e,n)=>{let o=t[e];return x(o)?o(o()|n):t[e]|=n},"&=":(t,e,n)=>{let o=t[e];return x(o)?o(o()&n):t[e]&=n},"^=":(t,e,n)=>{let o=t[e];return x(o)?o(o()^n):t[e]^=n}},un=(t,e)=>G(t)?t.bind(e):t,Wn=class{constructor(e,n,o,r,s){m(this,"l");m(this,"ze");m(this,"We");m(this,"Ge");m(this,"A");m(this,"Je");m(this,"Qe");this.l=w(e)?e:[e],this.ze=n,this.We=o,this.Ge=r,this.Qe=!!s}Xe(e,n){if(n&&e in n)return n;for(let o of this.l)if(e in o)return o}2(e,n,o){let r=e.name;if(r==="$root")return this.l[this.l.length-1];if(r==="$parent")return this.l[1];if(r==="$ctx")return[...this.l];if(o&&r in o)return this.A=o[r],un(S(o[r]),o);for(let i of this.l)if(r in i)return this.A=i[r],un(S(i[r]),i);let s=this.ze;if(s&&r in s)return this.A=s[r],un(S(s[r]),s)}5(e,n,o){return this.l[0]}0(e,n,o){return this.Ye(n,o,fr,...e.body)}1(e,n,o){return this.C(n,o,(...r)=>r.pop(),...e.expressions)}3(e,n,o){let{obj:r,key:s}=this.he(e,n,o),i=r==null?void 0:r[s];return this.A=i,un(S(i),r)}4(e,n,o){return e.value}6(e,n,o){let r=(i,...a)=>G(i)?i(...mr(a)):i,s=this.C(++n,o,r,e.callee,...e.arguments);return this.A=s,s}7(e,n,o){return this.C(n,o,Ei[e.operator],e.argument)}8(e,n,o){let r=Ci[e.operator];switch(e.operator){case"||":case"&&":case"??":return r(()=>this.b(e.left,n,o),()=>this.b(e.right,n,o))}return this.C(n,o,r,e.left,e.right)}9(e,n,o){return this.Ye(++n,o,fr,...e.elements)}10(e,n,o){let r={},s=(...i)=>{i.forEach(a=>{Object.assign(r,a)})};return this.C(++n,o,s,...e.properties),r}11(e,n,o){return this.C(n,o,r=>this.b(r?e.consequent:e.alternate,n,o),e.test)}12(e,n,o){var u;let r={},s=l=>(l==null?void 0:l.type)!==15,i=(u=this.Ge)!=null?u:()=>!1,a=n===0&&this.Qe,c=l=>this.Ze(a,e.key,n,Kn(l,o)),f=l=>this.Ze(a,e.value,n,Kn(l,o));if(e.shorthand){let l=e.key.name;r[l]=s(e.key)&&i(l,n)?c:c()}else if(e.computed){let l=S(c());r[l]=s(e.value)&&i(l,n)?f:f()}else{let l=e.key.type===4?e.key.value:e.key.name;r[l]=s(e.value)&&i(l,n)?()=>f:f()}return r}he(e,n,o){let r=this.b(e.object,n,o),s=e.computed?this.b(e.property,n,o):e.property.name;return{obj:r,key:s}}13(e,n,o){let r=e.argument,s=e.operator,i=e.prefix?Ri:wi;if(r.type===2){let a=r.name,c=this.Xe(a,o);return de(c)?void 0:i[s](c,a)}if(r.type===3){let{obj:a,key:c}=this.he(r,n,o);return i[s](a,c)}}16(e,n,o){let r=e.left,s=e.operator;if(r.type===2){let i=r.name,a=this.Xe(i,o);if(de(a))return;let c=this.b(e.right,n,o);return lr[s](a,i,c)}if(r.type===3){let{obj:i,key:a}=this.he(r,n,o),c=this.b(e.right,n,o);return lr[s](i,a,c)}}14(e,n,o){let r=this.b(e.argument,n,o);return w(r)&&(r.s=dr),r}17(e,n,o){return this[6]({type:6,callee:e.tag,arguments:[{type:9,elements:e.quasi.quasis},...e.quasi.expressions]},n,o)}19(e,n,o){let r=(...s)=>s.reduce((i,a,c)=>i+=a+e.quasis[c+1].value.cooked,e.quasis[0].value.cooked);return this.C(n,o,r,...e.expressions)}18(e,n,o){return e.value.cooked}20(e,n,o){let r=(s,...i)=>new s(...i);return this.C(n,o,r,e.callee,...e.arguments)}15(e,n,o){return(...r)=>{let s=Object.create(o!=null?o:{}),i=e.params;if(i){let a=0;for(let c of i)s[c.name]=r[a++]}return this.b(e.body,n,s)}}b(e,n,o){let r=S(this[e.type](e,n,o));return this.Je=e.type,r}Ze(e,n,o,r){let s=this.b(n,o,r);return e&&this.et()?this.A:s}et(){let e=this.Je;return(e===2||e===3||e===6)&&x(this.A)}eval(e,n){let{value:o,refs:r}=Ut(()=>this.b(e,-1,n)),s={value:o,refs:r};return this.et()&&(s.ref=this.A),s}C(e,n,o,...r){let s=r.map(i=>i&&this.b(i,e,n));return o(...s)}Ye(e,n,o,...r){let s=this.We;if(!s)return this.C(e,n,o,...r);let i=r.map((a,c)=>a&&(a.type!==15&&s(c,e)?f=>this.b(a,e,Kn(f,n)):this.b(a,e,n)));return o(...i)}},dr=Symbol("s"),pr=t=>(t==null?void 0:t.s)===dr,hr=(t,e,n,o,r,s,i)=>new Wn(e,n,o,r,i).eval(t,s);var yr={},gr=t=>!!t,fn=class{constructor(e,n){m(this,"l");m(this,"r");m(this,"tt",[]);this.l=e,this.r=n}w(e){this.l=[e,...this.l]}ee(){return this.l.map(n=>n.components).filter(gr).reverse().reduce((n,o)=>{for(let[r,s]of Object.entries(o))n[r.toUpperCase()]=s;return n},{})}ut(){let e=[],n=new Set,o=this.l.map(r=>r.components).filter(gr).reverse();for(let r of o)for(let s of Object.keys(r))n.has(s)||(n.add(s),e.push(s));return e}O(e,n,o,r,s){var T;let i=[],a=[],c=new Set,f=()=>{for(let R=0;R<a.length;++R)a[R]();a.length=0},p={value:()=>i,stop:()=>{f(),c.clear()},subscribe:(R,L)=>(c.add(R),L&&R(i),()=>{c.delete(R)}),refs:[],context:this.l[0]};if(q(e))return p;let h=this.r.globalContext,g=[],d=new Set,E=(R,L,X,D)=>{try{let H=hr(R,L,h,n,o,D,r);return X&&H.refs.length>0&&g.push(...H.refs),{value:H.value,refs:H.refs,ref:H.ref}}catch(H){B(6,`evaluation error: ${e}`,H)}return{value:void 0,refs:[]}};try{let R=(T=yr[e])!=null?T:ur("["+e+"]");yr[e]=R;let L=this.l.slice(),X=R.elements,D=X.length,H=new Array(D);p.refs=H;let pe=()=>{g.length=0,s||(d.clear(),f());let Y=new Array(D);for(let I=0;I<D;++I){let b=X[I];if(n!=null&&n(I,-1)){Y[I]=j=>E(b,L,!1,{$event:j}).value;continue}let M=E(b,L,!0);Y[I]=M.value,H[I]=M.ref}if(!s)for(let I of g)d.has(I)||(d.add(I),a.push(se(I,pe)));if(i=Y,c.size!==0)for(let I of c)c.has(I)&&I(i)};pe()}catch(R){B(6,`parse error: ${e}`,R)}return p}L(){return this.l.slice()}ce(e){this.tt.push(this.l),this.l=e}E(e,n){try{this.ce(e),n()}finally{this.Yt()}}Yt(){var e;this.l=(e=this.tt.pop())!=null?e:[]}};var br=t=>{let e=t.charCodeAt(0);return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||t==="-"||t==="_"||t===":"},vi=(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},Si=(t,e)=>{let n=e?2:1;for(;n<t.length&&(t[n]===" "||t[n]===`
3
+ `);)++n;if(n>=t.length||!br(t[n]))return null;let o=n;for(;n<t.length&&br(t[n]);)++n;return{start:o,end:n}},Tr=new Set(["table","thead","tbody","tfoot"]),Ai=new Set(["thead","tbody","tfoot"]),Ni=new Set(["caption","colgroup","thead","tbody","tfoot","tr"]),Oi=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),xr=(t,e)=>`${t.slice(0,t.length-2)}></${e}>`,ln=t=>{var s;let e=0,n=[],o=[],r=0;for(;e<t.length;){let i=t.indexOf("<",e);if(i===-1){n.push(t.slice(e));break}if(n.push(t.slice(e,i)),t.startsWith("<!--",i)){let T=t.indexOf("-->",i+4);if(T===-1){n.push(t.slice(i));break}n.push(t.slice(i,T+3)),e=T+3;continue}let a=vi(t,i);if(a===-1){n.push(t.slice(i));break}let c=t.slice(i,a+1),f=c.startsWith("</");if(c.startsWith("<!")||c.startsWith("<?")){n.push(c),e=a+1;continue}let l=Si(c,f);if(!l){n.push(c),e=a+1;continue}let p=c.slice(l.start,l.end);if(f){let T=o[o.length-1];T?(o.pop(),n.push(T.replacementHost?`</${T.replacementHost}>`:c),Tr.has(T.effectiveTag)&&--r):n.push(c),e=a+1;continue}let h=c.charCodeAt(c.length-2)===47,g=o[o.length-1],d=null;r===0?p==="tr"?d="trx":p==="td"?d="tdx":p==="th"&&(d="thx"):Ai.has((s=g==null?void 0:g.effectiveTag)!=null?s:"")?d=p==="tr"?null:"tr":(g==null?void 0:g.effectiveTag)==="table"?d=Ni.has(p)?null:"tr":(g==null?void 0:g.effectiveTag)==="tr"&&(d=p==="td"||p==="th"?null:"td");let E=h&&!Oi.has(d||p);if(d){let T=d==="trx"||d==="tdx"||d==="thx",R=`${c.slice(0,l.start)}${d} is="${T?`r-${p}`:`regor:${p}`}"${c.slice(l.end)}`;n.push(E?xr(R,d):R)}else n.push(E?xr(c,p):c);if(!h){let T=d==="trx"?"tr":d==="tdx"?"td":d==="thx"?"th":d||p;o.push({replacementHost:d,effectiveTag:T}),Tr.has(T)&&++r}e=a+1}return n.join("")};var Mi="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",ki=new Set(Mi.toUpperCase().split(",")),Li="http://www.w3.org/2000/svg",Cr=(t,e)=>{he(t)?t.content.appendChild(e):t.appendChild(e)},Gn=(t,e,n,o)=>{var i;let r=t.t;if(r){let a=n&&ki.has(r.toUpperCase())?document.createElementNS(Li,r.toLowerCase()):document.createElement(r),c=t.a;if(c)for(let u of Object.entries(c)){let l=u[0],p=u[1];l.startsWith("#")&&(p=l.substring(1),l="name"),a.setAttribute(Lt(l,o),p)}let f=t.c;if(f)for(let u of f)Gn(u,a,n,o);Cr(e,a);return}let s=t.d;if(s){let a;switch((i=t.n)!=null?i:Node.TEXT_NODE){case Node.COMMENT_NODE:a=document.createComment(s);break;case Node.TEXT_NODE:a=document.createTextNode(s);break}if(a)Cr(e,a);else throw new Error("unsupported node type.")}},qe=(t,e,n)=>{n!=null||(n=le.getDefault());let o=document.createDocumentFragment();if(!w(t))return Gn(t,o,!!e,n),o;for(let r of t)Gn(r,o,!!e,n);return o};var Er=(t,e={selector:"#app"},n)=>{J(e)&&(e={selector:"#app",template:e}),xo(t)&&(t=t.context);let o=e.element?e.element:e.selector?document.querySelector(e.selector):null;if(!o||!Re(o))throw _(0);n||(n=le.getDefault());let r=()=>{for(let a of[...o.childNodes])W(a)},s=a=>{for(;a.length>0;)o.appendChild(a[0])};if(e.template){let a=document.createRange().createContextualFragment(ln(e.template));r(),s(a.childNodes),e.element=a}else if(e.json){let a=qe(e.json,e.isSVG,n);r(),s(a.childNodes)}return n.useInterpolation&&nn(o,n),new Jn(t,o,n).y(),z(o,()=>{Me(t)}),Vt(t),{context:t,unmount:()=>{W(o)},unbind:()=>{ge(o)}}},Jn=class{constructor(e,n,o){m(this,"Zt");m(this,"nt");m(this,"r");m(this,"m");m(this,"o");this.Zt=e,this.nt=n,this.r=o,this.m=new fn([e],o),this.o=new Qt(this.m)}y(){this.o.$(this.nt)}};var rt=t=>{if(w(t))return t.map(r=>rt(r));let e={};if(t.tagName)e.t=t.tagName;else return t.nodeType===Node.COMMENT_NODE&&(e.n=Node.COMMENT_NODE),t.textContent&&(e.d=t.textContent),e;let n=t.getAttributeNames();n.length>0&&(e.a=Object.fromEntries(n.map(r=>{var s;return[r,(s=t.getAttribute(r))!=null?s:""]})));let o=ve(t);return o.length>0&&(e.c=[...o].map(r=>rt(r))),e};var Rr=(t,e={})=>{var s,i,a,c,f,u;w(e)&&(e={props:e}),J(t)&&(t={template:t});let n=(s=e.context)!=null?s:()=>({}),o=!1;if(t.element){let l=t.element;l.remove(),t.element=l}else if(t.selector){let l=document.querySelector(t.selector);if(!l)throw _(1,t.selector);l.remove(),t.element=l}else if(t.template){let l=document.createRange().createContextualFragment(ln(t.template));t.element=l}else t.json&&(t.element=qe(t.json,t.isSVG,e.config),o=!0);t.element||(t.element=document.createDocumentFragment()),((i=e.useInterpolation)==null||i)&&nn(t.element,(a=e.config)!=null?a:le.getDefault());let r=t.element;if(!o&&(((f=t.isSVG)!=null?f:ft(r)&&((c=r.hasAttribute)!=null&&c.call(r,"isSVG")))||ft(r)&&r.querySelector("[isSVG]"))){let l=r.content,p=l?[...l.childNodes]:[...r.childNodes],h=rt(p);t.element=qe(h,!0,e.config)}return{context:n,template:t.element,inheritAttrs:(u=e.inheritAttrs)!=null?u:!0,props:e.props,defaultName:e.defaultName}};var pn=class{constructor(){m(this,"byConstructor",new Map)}register(e){this.byConstructor.set(e.constructor,e)}unregisterByClass(e){this.byConstructor.delete(e)}unregister(e){let n=e.constructor;this.byConstructor.get(n)===e&&this.byConstructor.delete(n)}find(e){for(let n of this.byConstructor.values())if(n instanceof e)return n}require(e){let n=this.find(e);if(n)return n;throw new Error(`${e.name} is not registered in ContextRegistry.`)}};var wr=t=>{var e;(e=Ue())==null||e.onMounted.push(t)};var vr=t=>{let e,n={},o=(...r)=>{if(r.length<=2&&0 in r)throw _(4);return e&&!n.isStopped?e(...r):(e=Ii(t,n),e(...r))};return o[te]=1,Ve(o,!0),o.stop=()=>{var r,s;return(s=(r=n.ref)==null?void 0:r.stop)==null?void 0:s.call(r)},re(()=>o.stop(),!0),o},Ii=(t,e)=>{var s;let n=(s=e.ref)!=null?s:ae(null);e.ref=n,e.isStopped=!1;let o=0,r=$e(()=>{if(o>0){r(),e.isStopped=!0,Z(n);return}n(t()),++o});return n.stop=r,n};var Sr=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Vi(t,e,n),o(...s))};return r[te]=1,Ve(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Vi=(t,e,n)=>{var a;let o=(a=n.ref)!=null?a:ae(null);n.ref=o,n.isStopped=!1;let r=0,s=c=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}let f=t.map(u=>u());o(e(...f)),++r},i=[];for(let c of t){let f=se(c,s);i.push(f)}return s(null),o.stop=()=>{i.forEach(c=>{c()})},o};var Ar=(t,e)=>{let n={},o,r=(...s)=>{if(s.length<=2&&0 in s)throw _(4);return o&&!n.isStopped?o(...s):(o=Pi(t,e,n),o(...s))};return r[te]=1,Ve(r,!0),r.stop=()=>{var s,i;return(i=(s=n.ref)==null?void 0:s.stop)==null?void 0:i.call(s)},re(()=>r.stop(),!0),r},Pi=(t,e,n)=>{var s;let o=(s=n.ref)!=null?s:ae(null);n.ref=o,n.isStopped=!1;let r=0;return o.stop=se(t,i=>{if(r>0){o.stop(),n.isStopped=!0,Z(o);return}o(e(i)),++r},!0),o};var Nr=t=>(t[wt]=1,t);var Or=(t,e)=>{if(!e)throw _(5);let o=je(t)?Ce:a=>a,r=()=>localStorage.setItem(e,JSON.stringify(ce(t()))),s=localStorage.getItem(e);if(s!=null)try{t(o(JSON.parse(s)))}catch(a){B(6,`persist: failed to parse data for key ${e}`,a),r()}else r();let i=$e(r);return re(i,!0),t};var mn=(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},Mr=mn,kr=mn;var Lr=(t,e,n)=>{let o=[],r=()=>{e(t.map(i=>i()))};for(let i of t)o.push(se(i,r));n&&r();let s=()=>{for(let i of o)i()};return re(s,!0),s};var Ir=t=>{if(!x(t))throw _(3,"observerCount");return t(void 0,void 0,2)};var Vr=t=>{Qn();try{t()}finally{Xn()}},Qn=()=>{xe.stack||(xe.stack=[]),xe.stack.push(new Set)},Xn=()=>{let t=xe.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 xe.stack;for(let n of e)try{Z(n)}catch(o){console.error(o)}};