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