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