jq79 0.7.11 → 0.7.13

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/jq79.d.ts CHANGED
@@ -2,7 +2,7 @@ import type { ReactiveDeepData, EffectScope } from "./reactive";
2
2
  import { type TagBlock, type TemplateNode } from "./source";
3
3
  export { $, $$, $create } from "./dom";
4
4
  export type { QueryOne, QueryAll } from "./dom";
5
- export { $reactive, $toRaw, $computed } from "./reactive";
5
+ export { $reactive, $toRaw, $computed, $batch } from "./reactive";
6
6
  export type { Computed } from "./reactive";
7
7
  type SlotRenderer = (props: Record<string, () => any>, slotScope: Record<string, any>, fx: EffectScope, shadow: boolean) => Node;
8
8
  type SlotMap = Record<string, SlotRenderer>;
@@ -1,20 +1,19 @@
1
- var jq79=(()=>{var Ie=Object.defineProperty;var Xs=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Js=Object.prototype.hasOwnProperty;var er=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var tr=(e,t)=>{for(var n in t)Ie(e,n,{get:t[n],enumerable:!0})},nr=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Ys(t))!Js.call(e,r)&&r!==n&&Ie(e,r,{get:()=>t[r],enumerable:!(s=Xs(t,r))||s.enumerable});return e};var sr=e=>nr(Ie({},"__esModule",{value:!0}),e);var A=(e,t,n)=>er(e,typeof t!="symbol"?t+"":t,n);var Li={};tr(Li,{$:()=>$e,$$:()=>qe,$computed:()=>Ue,$create:()=>He,$reactive:()=>Ne,$toRaw:()=>V,C79:()=>le,Component79:()=>le,PendingComponent79:()=>ut,enableHotReload:()=>Bs,hotUpdate:()=>Us,parseComponent:()=>ji,renderComponent:()=>ti});function $e(e,t){return typeof e=="string"?document.querySelector(e):e.querySelector(t)}function qe(e,t){return Array.from(typeof e=="string"?document.querySelectorAll(e):e.querySelectorAll(t))}var He=(e,t={})=>{let n=document.createElement(e);for(let[s,r]of Object.entries(t))if(s==="className")n.className=Array.isArray(r)?r.join(" "):r;else if(s==="textContent")n.textContent=r;else if(s==="children")for(let i of r)n.appendChild(i);else n.setAttribute(s,r);return n},rr=new Set(["a","b","i","em","strong","p","br","ul","ol","li","blockquote","code","pre","span","div","h1","h2","h3","h4","h5","h6","img"]),an={a:new Set(["href","title"]),img:new Set(["src","alt"]),"*":new Set(["class"])},or=new Set(["http:","https:","mailto:"]);function ir(e){try{let t=new URL(e,"https://example.com");return or.has(t.protocol)}catch{return!1}}var ar={"https:":"443","http:":"80"};function lr(e){let t=e.trim().toLowerCase().match(/^([a-z\d*][a-z\d.*-]*?)(?::(\d{1,5}|\*))?$/);if(!t)return null;let[,n,s]=t,r=n.split(".");return r.some(o=>o!=="*"&&!/^[a-z\d-]+$/.test(o))?null:{host:new RegExp(`^${r.map(o=>o==="*"?"[^.]+":o).join("\\.")}$`),port:!s||s==="*"?null:s}}var cn=e=>{let t=(Array.isArray(e)?e:e.split(",")).map(lr).filter(n=>n!==null);return n=>{let s=n.hostname.toLowerCase(),r=n.port||ar[n.protocol]||"";return t.some(i=>i.host.test(s)&&(i.port===null||i.port===r))}};function cr(e,t,n,s){try{return!!e(new URL(t,document.baseURI),n,s)}catch{return!1}}var ln=512;function dn(e,t,n,s){if(n>ln)throw new RangeError(`jq79: sanitizeHTML input nests deeper than ${ln} elements`);for(let r of Array.from(e.childNodes))if(r.nodeType===Node.ELEMENT_NODE){let i=dr(r,n,s);i&&t.appendChild(i)}else r.nodeType===Node.TEXT_NODE&&t.appendChild(r.cloneNode())}function dr(e,t,n){let s=e.tagName.toLowerCase();if(!rr.has(s))return null;let r=document.createElement(s);for(let i of Array.from(e.attributes)){let o=i.name.toLowerCase(),a=an[s]?.has(o),l=an["*"]?.has(o);!a&&!l||(o==="href"||o==="src")&&(!ir(i.value)||n&&!cr(n,i.value,s,o))||r.setAttribute(o,i.value)}return s==="a"&&r.setAttribute("rel","noopener noreferrer"),dn(e,r,t+1,n),r}function ht(e,t){let n=document.createElement("template");n.innerHTML=e;let s=document.createElement("div");return dn(n.content,s,0,t?.allowUrl),s.innerHTML}var ur=(e,t)=>t.split(".").reduce((n,s)=>n?.[s],e),We=e=>{if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},yn=(e,t,n)=>{Object.entries(e).forEach(([s,r])=>{let i=t?`${t}.${s}`:s;r&&typeof r=="object"&&We(r)?yn(r,i,n):n(i,r)})},fr=(e,t)=>{e.own===null?e.own=t:e.own!==t&&(e.ownMany??(e.ownMany=new Set)).add(t)},pr=(e,t)=>{e.deep===null?e.deep=t:e.deep!==t&&(e.deepMany??(e.deepMany=new Set)).add(t)},hr=(e,t)=>{e.own===t?e.own=null:e.ownMany?.delete(t)&&e.ownMany.size===0&&(e.ownMany=null)},gr=(e,t)=>{e.deep===t?e.deep=null:e.deepMany?.delete(t)&&e.deepMany.size===0&&(e.deepMany=null)},Re=(e,t)=>{e.own!==null&&t(e.own),e.ownMany?.forEach(t)},Me=(e,t)=>{e.deep!==null&&t(e.deep),e.deepMany?.forEach(t)},un=" keys",gt=e=>e?`${e}.${un}`:un,fn=".length",pn=(e,t)=>({children:null,own:null,ownMany:null,deep:null,deepMany:null,parent:e,segment:t}),mr=e=>e.own===null&&e.deep===null&&!e.ownMany?.size&&!e.deepMany?.size&&!e.children?.size,yt=Symbol("jq79.raw"),V=e=>{let t=e;for(;t!==null&&typeof t=="object"&&t[yt];)t=t[yt];return t},En=Symbol("jq79.store"),me=e=>e!==null&&typeof e=="object"&&e[En]===!0,Et=null,fe=[],Y=null,xe=e=>{fe.push(new Set);let t=Y;Y=null;try{return e()}finally{fe.pop(),Y=t}},yr=e=>{e.adopted.forEach((t,n)=>{e.read?.has(n)||(t(),e.adopted.delete(n))})},hn=e=>{e.adopted?.forEach(t=>t()),e.adopted=null},Er=0,mt=new Set,gn="$__attach",mn="$__holds",Fe=Symbol("jq79.alsoWakenBy"),St=Symbol("jq79.owner"),Ne=e=>{let t=new Map,n=new Set,s=new Set,r=new WeakMap,i=Object.create(null),o=pn(null,""),a=(f,u)=>{let m=o;return f.split(".").forEach(h=>{let S=m.children??(m.children=new Map),g=S.get(h);g||(g=pn(m,h),S.set(h,g)),m=g}),u.deep?pr(m,u):fr(m,u),m},l=(f,u)=>{u.deep?gr(f,u):hr(f,u);let m=f;for(;m?.parent&&mr(m);)m.parent.children.delete(m.segment),m=m.parent},c=f=>{let u=o;for(let m of f.split("."))if(u=u.children?.get(m),!u)return;return u},d=f=>{let u=new Set,m=E=>{let T=E.children?[...E.children.values()]:[];for(;T.length;){let R=T.pop();Re(R,k=>u.add(k)),Me(R,k=>u.add(k)),R.children?.forEach(k=>T.push(k))}},h=o,S=f.split("."),g="";for(let E=0;E<S.length-1;E++){if(h=h.children?.get(S[E]),!h)return u;g=g?`${g}.${S[E]}`:S[E],Me(h,R=>u.add(R));let T=x.get(g);T&&Re(h,R=>{T.store[mn](R)||u.add(R)}),E===S.length-2&&S[E+1]==="length"&&(Re(h,R=>u.add(R)),m(h))}return h=h.children?.get(S[S.length-1]),h&&(Re(h,E=>u.add(E)),Me(h,E=>u.add(E)),m(h)),u},p=(f,u,m)=>{if(u===m)return!1;for(let h=u;h<m;h++){let S=f.charCodeAt(h);if(S<48||S>57)return!1}return!0},w=(f,u)=>{if(f.deep||u.size<2)return u;let m=new Set;u.forEach(g=>{g.endsWith(fn)&&m.add(g.slice(0,-fn.length))});let h=new Set;if(u.forEach(g=>{let E=0,T="";for(let R=g.indexOf(".");R!==-1;R=g.indexOf(".",R+1)){let k=g.slice(0,R);(!(E>0&&p(g,E,R))||m.has(T))&&h.add(k),T=k,E=R+1}}),!h.size)return u;let S=new Set;return u.forEach(g=>{h.has(g)||S.add(g)}),S},_=f=>{let u=null,m=null,h=null,S=mt,g=N=>h?h.has(N):u===N,E=N=>{let K=a(N,f);h?h.set(N,K):u===null?(u=N,m=K):(h=new Map([[u,m],[N,K]]),u=m=null)},T=N=>{if(h){h.forEach((K,F)=>{N.has(F)||(l(K,f),h.delete(F))});return}u!==null&&!N.has(u)&&(l(m,f),u=m=null)},R=()=>{h?h.forEach(N=>l(N,f)):m&&l(m,f),h=null,u=m=null},k=N=>{if(N.size===S.size){let F=!0;if(N.forEach(ge=>{F&&(F=S.has(ge))}),F)return}S=N;let K=w(f,N);T(K),K.forEach(F=>{g(F)||E(F)})};return f.reindex.add(k),k(f.deps),()=>{f.reindex.delete(k),R(),S=mt}},I=f=>{let u=c(f);if(u){let m=new Set;Re(u,h=>m.add(h)),Me(u,h=>m.add(h)),j(m)}},z=f=>I(gt(f)),j=f=>{let u=Array.from(f),m=!0;for(let h=1;m&&h<u.length;h++)m=u[h-1].order<u[h].order;m||u.sort((h,S)=>h.order-S.order),u.forEach(h=>{s.has(h)&&h.run()})},b=(f,u,m=!1)=>{t.get(f)?.forEach(h=>h(u,f)),n.forEach(h=>h(f,u)),m?s.forEach(h=>h.run()):j(d(f))},H=(f,u)=>f!==u&&f!==null&&u!==null&&typeof f=="object"&&typeof u=="object"&&!me(f)&&!me(u)&&We(f)&&We(u)&&Array.isArray(f)===Array.isArray(u),D=null,L=-1,U=(f,u)=>{let m=u.length>f.length,h=m?f:u,S=m?u:f,g=0;for(;g<h.length&&Object.is(V(h[g]),V(S[g]));)g++;for(let E=g;E<h.length;E++)if(!Object.is(V(h[E]),V(S[E+1])))return L;return g},se=(f,u)=>{if(Array.isArray(u)){let T=f.length,R=u.length,k=T!==R;if(!T||!R)return D;let N=Math.max(T,R);if(Math.abs(T-R)===1){let F=U(f,u);if(F!==L){let ge=[];for(let pt=F;pt<N;pt++)ge.push(String(pt));return{keys:ge,exact:!0,keysChanged:k}}}let K=[];for(let F=0;F<N;F++)if(!Object.is(V(f[F]),V(u[F]))&&(K.push(String(F)),K.length*2>=N))return D;return{keys:K,exact:!1,keysChanged:k}}let m=Object.keys(f),h=Object.keys(u),S=new Set([...m,...h]);if(!S.size)return D;let g=[];S.forEach(T=>{Object.is(V(f[T]),V(u[T]))||g.push(T)});let E=m.length!==h.length||m.some((T,R)=>T!==h[R]);return g.length*2>=S.size?D:{keys:g,exact:!1,keysChanged:E}},P=(f,u,m,h)=>{let S=new Set,g=T=>{let R=c(T);R&&(Re(R,k=>S.add(k)),Me(R,k=>S.add(k)))},E=se(u,m);if(!E)return b(f,h);if(t.get(f)?.forEach(T=>T(h,f)),n.forEach(T=>T(f,h)),g(f),E.keys.forEach(T=>{let R=`${f}.${T}`,k=t.get(R);if(k){let N=V(m[T]),K=M(N)?G(N,R):N;k.forEach(F=>F(K,R))}E.exact?g(R):d(R).forEach(N=>S.add(N))}),E.keysChanged&&g(gt(f)),Array.isArray(m)&&u.length!==m.length){let T=`${f}.length`;t.get(T)?.forEach(R=>R(m.length,T)),g(T)}j(S)},M=f=>f!==null&&typeof f=="object"&&We(f),x=new Map,q=(f,u)=>{let m=x.get(u);m?.store!==f&&(m?.unsubscribe(),x.set(u,{store:f,unsubscribe:f.$onAny((h,S)=>b(`${u}.${h}`,S))}))},ee=f=>{x.get(f)?.unsubscribe(),x.delete(f)},G=(f,u)=>{let m=r.get(f);if(m)return m;let h=null,S=new Proxy(f,{has(g,E){return Reflect.has(g,E)||typeof E=="string"&&h?.has(E)===!0},ownKeys(g){return fe[fe.length-1]?.add(gt(u)),Y!==null&&Y.home!==s&&W(Y),Reflect.ownKeys(g)},get(g,E,T){if(E===yt)return g;if(E===En)return u==="";if(typeof E!="string")return Reflect.get(g,E,T);if(u===""&&E in i)return i[E];let R=u?`${u}.${E}`:E;fe[fe.length-1]?.add(R),Y!==null&&Y.home!==s&&W(Y);let k=Reflect.get(g,E,T);if(me(k))return q(k,R),k;let N=V(k);return M(N)?G(N,R):N},set(g,E,T,R){if(R!==S&&!Object.prototype.hasOwnProperty.call(g,E))return Reflect.set(g,E,T,R);let k=u?`${u}.${E}`:E,N=me(T)?T:V(T),K=!Object.prototype.hasOwnProperty.call(g,E);if(!K&&Object.is(g[E],N)&&(N===null||typeof N!="object"))return!0;let F=g[E];g[E]=N,h?.delete(E),me(N)?q(N,k):ee(k);let ge=me(N)||!M(N)?N:G(N,k);return!K&&H(F,N)?P(k,F,N,ge):b(k,ge,K),!0},deleteProperty(g,E){if(typeof E!="string")return Reflect.deleteProperty(g,E);let T=Object.prototype.hasOwnProperty.call(g,E),R=Reflect.deleteProperty(g,E);if(R&&T){let k=u?`${u}.${E}`:E;(h??(h=new Set)).add(E),ee(k),b(k,void 0),z(u)}return R}});return r.set(f,S),S},Z=G(V(e),"");Object.entries(V(e)).forEach(([f,u])=>{me(u)&&q(u,f)});let y=(f,u,{immediate:m=!1}={})=>(t.has(f)||t.set(f,new Set),t.get(f).add(u),m&&u(ur(Z,f),f),()=>t.get(f)?.delete(u)),v=(f,{immediate:u=!1}={})=>(n.add(f),u&&yn(Z,"",(m,h)=>f(m,h)),()=>n.delete(f)),C=(f,{deep:u=!1,alsoWakenBy:m}={})=>{let h=!1,S=!1,g={deps:mt,reindex:new Set,deep:u,order:Er++,home:s,adopted:null,read:null,run:()=>{if(h){S=!0;return}h=!0;try{let R=0;do{S=!1,g.read=null;let k=new Set;fe.push(k);let N=Y;Y=g;try{f()}finally{fe.pop(),Y=N,g.deps=k}}while(S&&++R<100);S&&console.error("jq79: an effect re-woke itself 100 times in a row (it writes what it reads); giving up on it settling")}finally{h=!1,g.adopted&&yr(g),g.reindex.forEach(R=>R(g.deps))}}};s.add(g);let E=_(g),T=()=>{s.delete(g),E(),hn(g)};return m?.length?Q(g,m,T):(g.run(),Et=g,T)},Q=(f,u,m)=>{let h=u.map(S=>S?.[gn]?.(f)).filter(Boolean);return f.run(),Et=f,()=>{m(),h.forEach(S=>S())}},$=f=>{s.add(f);let u=_(f);return()=>{s.delete(f),u()}},W=f=>{(f.read??(f.read=new Set)).add(s),!(f.adopted?.has(s)||s.has(f))&&(f.adopted??(f.adopted=new Map)).set(s,$(f))},B=()=>{x.forEach(({unsubscribe:f})=>f()),x.clear(),s.forEach(f=>{f.home===s&&hn(f)})};return i.$on=y,i.$onAny=v,i.$effect=C,i.$dispose=B,i[gn]=$,i[mn]=f=>s.has(f),Z},wt=class{constructor(t,n){A(this,"scope",t);A(this,"disposers",null);A(this,"runs",null);A(this,"children",null);A(this,"owners",null);A(this,"options");let s=t[Fe];this.options=n||s?{deep:n,alsoWakenBy:s}:void 0,this.ownedBy(t)}ownedBy(t){let n=t[St];!n||this.owners?.includes(n)||((this.owners??(this.owners=[])).push(n),(n.children??(n.children=new Set)).add(this))}effect(t){(this.disposers??(this.disposers=[])).push(this.scope.$effect(t,this.options)),(this.runs??(this.runs=[])).push(Et)}onDispose(t){(this.disposers??(this.disposers=[])).push(t)}refresh(){this.runs?.forEach(t=>t.run())}rerun(){let t=this.runs?[...this.runs]:null,n=this.children?[...this.children]:null;t?.forEach(s=>{this.runs&&s.run()}),n?.forEach(s=>s.rerun())}dispose(){let t=this.disposers;if(this.disposers=null,this.runs=null,this.children=null,this.owners?.forEach(n=>n.children?.delete(this)),this.owners=null,t)for(let n=0;n<t.length;n++)t[n]()}},ye=(e,t=!1)=>new wt(e,t),Ue=e=>{let t=Ne({value:void 0});t.$effect(()=>{let s;try{s=e()}catch(r){console.error("jq79: error in $computed, keeping its last value",r);return}t.value=s});let n=(s,r)=>(console.warn(`jq79: a $computed is read-only - the write to ${String(r)} was ignored`),!0);return new Proxy(t,{set:n,deleteProperty:n,defineProperty:n})};var Be=/(?:let|var|const)(?:\s+(?=[A-Za-z_$])|\s*(?=[{[]))/y,wn=/\$:\s*/y,Ke=/import(?=\s*\()/y,Sn=/\$:\s*([A-Za-z_$][\w$]*)\s*=(?!=)/y,re=(e,t)=>{let n=e[t],s=t+1;for(;s<e.length;){if(e[s]==="\\"){s+=2;continue}if(e[s]===n)return s+1;s++}return e.length},te=(e,t)=>{let n=e.indexOf(`
2
- `,t);return n===-1?e.length:n},ne=(e,t)=>{let n=e.indexOf("*/",t+2);return n===-1?e.length:n+2},ce=(e,t)=>{let n=t;for(;n<e.length;){if(/\s/.test(e[n])){n++;continue}if(e[n]==="/"&&e[n+1]==="/"){n=te(e,n);continue}if(e[n]==="/"&&e[n+1]==="*"){n=ne(e,n);continue}break}return n},wr=new Set(["return","typeof","case","in","instanceof","new","delete","void","do","else","yield","await"]),oe=(e,t)=>{let n=t-1;for(;n>=0;){let r=e[n];if(/\s/.test(r)){n--;continue}if(r==="/"&&e[n-1]==="*"){let i=e.lastIndexOf("/*",n-2);if(i===-1)return!0;n=i-1;continue}break}if(n<0)return!0;let s=e[n];if(/[\w$]/.test(s)){let r=n;for(;r>0&&/[\w$]/.test(e[r-1]);)r--;return wr.has(e.slice(r,n+1))}return(s==="+"||s==="-")&&e[n-1]===s?!1:!")]}\"'`.".includes(s)},ie=(e,t)=>{let n=t+1,s=!1;for(;n<e.length;){let r=e[n];if(r==="\\"){n+=2;continue}if(r===`
3
- `)return n;if(r==="[")s=!0;else if(r==="]")s=!1;else if(r==="/"&&!s){for(n++;n<e.length&&/[a-z]/i.test(e[n]);)n++;return n}n++}return e.length},Sr=/^(\?\.|\?\?|&&|\|\||\*\*|[.,+\-*/%&|^<>=?:([])/,br=(e,t)=>{let n=t-1;for(;n>=0;){let s=e[n];if(/\s/.test(s)){n--;continue}if(s==="/"&&e[n-1]==="*"){let r=e.lastIndexOf("/*",n-2);if(r===-1)return"";n=r-1;continue}return s}return""},$t=(e,t)=>{let n=0,s=t;for(;s<e.length;){let r=e[s];if(r==="'"||r==='"'||r==="`"){s=re(e,s);continue}if(r==="/"&&e[s+1]==="/"){s=te(e,s);continue}if(r==="/"&&e[s+1]==="*"){s=ne(e,s);continue}if(r==="/"&&oe(e,s)){s=ie(e,s);continue}if("([{".includes(r))n++;else if(")]}".includes(r))n--;else{if(n<=0&&r===";")return s;if(n<=0&&r===`
4
- `){let i=ce(e,s+1);if(!(i<e.length&&(Sr.test(e.slice(i,i+2))||[",","="].includes(br(e,s)))))return s;s=i;continue}}s++}return e.length},bn=e=>{let t=[],n=0,s=0,r=0,i=a=>{t.push({raw:e.slice(s,a),codeEnd:Math.max(0,r-s)}),s=a+1,r=s},o=0;for(;o<e.length;){let a=e[o];if(a==="'"||a==='"'||a==="`"){o=re(e,o),r=o;continue}if(a==="/"&&e[o+1]==="/"){o=te(e,o);continue}if(a==="/"&&e[o+1]==="*"){o=ne(e,o);continue}if(a==="/"&&oe(e,o)){o=ie(e,o),r=o;continue}if("([{".includes(a))n++;else if(")]}".includes(a))n--;else if(a===","&&n<=0){i(o),o++;continue}/\s/.test(a)||(r=o+1),o++}return i(e.length),t},ze=e=>{let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return Ze.test(t)?[t]:[];let n=[];for(let s of xt(t.slice(1,Tn(t)))){s.startsWith("...")&&(s=s.slice(3).trim());let r=Xe(s);if(r!==-1&&(s=s.slice(0,r).trim()),t.startsWith("{")){let i=Rt(s,":");if(i!==-1){n.push(...ze(s.slice(i+1)));continue}}n.push(...ze(s))}return n},Tr=e=>{let t=[],n=bn(e).map(({raw:i,codeEnd:o})=>{let a=i.match(/^\s*/)[0];if(o<=a.length)return{text:i,empty:!0};let l=i.slice(a.length,o),c=i.slice(o),d=Xe(l),p=(d===-1?l:l.slice(0,d)).trim(),w=l[0]==="{"||l[0]==="[";w?t.push(...ze(p)):Ze.test(p)&&t.push(p);let _=Qe(l).code;return{text:`${a}${w?`(${_})`:_}${c}`,empty:!1}}),s=[];for(;n.length&&n[n.length-1].empty;)s.unshift(n.pop().text);let r=n.map(i=>i.text).join(",")+s.join("");return r.trimStart().startsWith("(")&&(r=`;${r}`),{vars:t,code:r}},Qe=e=>{let t=[],n="",s=0,r=0,i=!0;for(;s<e.length;){let o=e[s],a=e[s+1];if(o==="'"||o==='"'||o==="`"){let l=re(e,s);n+=e.slice(s,l),s=l,i=!1;continue}if(o==="/"&&(a==="/"||a==="*")){let l=a==="/"?te(e,s):ne(e,s);n+=e.slice(s,l),s=l;continue}if(o==="/"&&oe(e,s)){let l=ie(e,s);n+=e.slice(s,l),s=l,i=!1;continue}if(o==="i"&&(s===0||!/[\w$.]/.test(e[s-1]))&&(Ke.lastIndex=s,Ke.test(e))){n+="$__import",s+=6,i=!1;continue}if(r===0&&i){Be.lastIndex=s;let l=Be.exec(e);if(l){let d=s+l[0].length,p=$t(e,d),{vars:w,code:_}=Tr(e.slice(d,p));t.push(...w),n+=_,s=p,i=!1;continue}wn.lastIndex=s;let c=wn.exec(e);if(c){Sn.lastIndex=s;let d=Sn.exec(e);d&&t.push(d[1]);let p=s+c[0].length,w=$t(e,p);n+=`$__effect(() => { ${Qe(e.slice(p,w)).code} });`,s=w;continue}}"([{".includes(o)?r++:")]}".includes(o)&&(r=Math.max(0,r-1)),o===`
5
- `||o===";"||o==="}"?i=!0:/\s/.test(o)||(i=!1),n+=o,s++}return{vars:t,code:n}},Ge=/export\s+default(?![\w$])/y,Ve=/import\s*(?:([\w$\s,{}*]+?)\s*from\s*)?(["'])([^"'\n]+)\2/y,$r=e=>{let t=[],n=0,s=0;for(let r=0;r<=e.length;r++){let i=e[r];if(i==="{")n++;else if(i==="}")n--;else if(r===e.length||i===","&&n===0){let o=e.slice(s,r).trim();o&&t.push(o),s=r+1}}return t},Rr=(e,t,n)=>{let s=`await $__import(${JSON.stringify(t)})`;if(e===void 0)return s;let r=$r(e),i=[],o=s;if(r.length>1){let a=`$__mod${n}`;i.push(`${a} = ${s}`),o=a}for(let a of r)a.startsWith("{")?i.push(`${a.replace(/\s+as\s+/g,": ")} = ${o}`):a.startsWith("*")?i.push(`${a.replace(/^\*\s*as\s+/,"")} = ${o}`):i.push(`${a} = $__default(${o})`);return`const ${i.join(", ")}`},Ze=/^[A-Za-z_$][\w$]*$/,Tn=e=>{let t=0,n=0;for(;n<e.length;){let s=e[n];if(s==="'"||s==='"'||s==="`"){n=re(e,n);continue}if(s==="/"&&e[n+1]==="/"){n=te(e,n);continue}if(s==="/"&&e[n+1]==="*"){n=ne(e,n);continue}if(s==="/"&&oe(e,n)){n=ie(e,n);continue}if("([{".includes(s))t++;else if(")]}".includes(s)&&--t===0)return n;n++}return e.length},Rt=(e,t)=>{let n=0,s=0;for(;s<e.length;){let r=e[s];if(r==="'"||r==='"'||r==="`"){s=re(e,s);continue}if(r==="/"&&e[s+1]==="/"){s=te(e,s);continue}if(r==="/"&&e[s+1]==="*"){s=ne(e,s);continue}if(r==="/"&&r!==t&&oe(e,s)){s=ie(e,s);continue}if("([{".includes(r))n++;else if(")]}".includes(r))n--;else if(n===0&&r===t)return s;s++}return-1},xt=e=>{let t=[],n=0,s=0,r=0;for(;r<=e.length;){let i=e[r];if(i==="'"||i==='"'||i==="`"){r=re(e,r);continue}if(i==="/"&&e[r+1]==="/"){r=te(e,r);continue}if(i==="/"&&e[r+1]==="*"){r=ne(e,r);continue}if(i==="/"&&oe(e,r)){r=ie(e,r);continue}if(i!==void 0&&"([{".includes(i))n++;else if(i!==void 0&&")]}".includes(i))n--;else if(r===e.length||i===","&&n===0){let o=e.slice(s,r).trim();o&&t.push(o),s=r+1}r++}return t},Xe=e=>{let t=0;for(;t<e.length;){let n=Rt(e.slice(t),"=");if(n===-1)return-1;let s=t+n;if(e[s+1]!=="="&&e[s+1]!==">"&&e[s-1]!=="="&&e[s-1]!=="!")return s;t=s+1}return-1},ke=e=>{let t=(e??"").trim();if(!t.startsWith("{"))return null;let n=Tn(t);if(n>=t.length)return null;let s=[];for(let r of xt(t.slice(1,n))){if(r.startsWith("..."))continue;let i=Xe(r),o=i===-1?r:r.slice(0,i),a=i===-1?void 0:r.slice(i+1).trim(),l=Rt(o,":"),c=(l===-1?o:o.slice(0,l)).trim();if(!Ze.test(c))continue;let d={name:c};a!==void 0&&(d.default=a);let p=l===-1?"":o.slice(l+1).trim();Ze.test(p)&&(d.as=p),s.push(d)}return s},xr=e=>{let t=0,n=0,s=!0;for(;t<e.length;){let r=e[t];if(r==="'"||r==='"'||r==="`"){t=re(e,t),s=!1;continue}if(r==="/"&&e[t+1]==="/"){t=te(e,t);continue}if(r==="/"&&e[t+1]==="*"){t=ne(e,t);continue}if(r==="/"&&oe(e,t)){t=ie(e,t),s=!1;continue}if(r==="e"&&n===0&&s&&(t===0||!/[\w$.]/.test(e[t-1]))){Ge.lastIndex=t;let i=Ge.exec(e);if(i)return t+i[0].length}"([{".includes(r)?n++:")]}".includes(r)&&(n=Math.max(0,n-1)),r===`
6
- `||r===";"||r==="}"?s=!0:/\s/.test(r)||(s=!1),t++}return-1},Nr=/^async(?![\w$])/,Pr=/^function(?![\w$])\s*\*?\s*[A-Za-z_$][\w$]*|^function(?![\w$])\s*\*?/,vr=e=>{let t=xr(e);if(t===-1)return null;let n=ce(e,t),s=e.slice(n);Nr.test(s)&&(n=ce(e,n+5));let r=Pr.exec(e.slice(n));if(r&&(n=ce(e,n+r[0].length)),e[n]!=="(")return null;let i=0,o=n;for(;o<e.length;){let a=e[o];if(a==="'"||a==='"'||a==="`"){o=re(e,o);continue}if(a==="/"&&e[o+1]==="/"){o=te(e,o);continue}if(a==="/"&&e[o+1]==="*"){o=ne(e,o);continue}if(a==="/"&&oe(e,o)){o=ie(e,o);continue}if("([{".includes(a))i++;else if(")]}".includes(a)&&--i===0)break;o++}return xt(e.slice(n+1,o))[0]??""},_e=e=>{let t=vr(e);if(t===null)return null;let n=ke(t),s=n?.find(r=>r.name.startsWith("$"))?.name;if(s)throw new Error(`jq79: the factory signature is (props, ctx), so \`${s}\` can't be destructured from the first parameter. Write \`export default (props, { ${s} }) => \u2026\`, or \`_\` in place of props if the component takes none.`);return n},$n=e=>{let t="",n=0,s=0,r=!0,i=!1,o=0;for(;n<e.length;){let a=e[n],l=e[n+1],c=n===0||!/[\w$.]/.test(e[n-1]);if(a==="'"||a==='"'||a==="`"){let d=re(e,n);t+=e.slice(n,d),n=d,r=!1;continue}if(a==="/"&&(l==="/"||l==="*")){let d=l==="/"?te(e,n):ne(e,n);t+=e.slice(n,d),n=d;continue}if(a==="/"&&oe(e,n)){let d=ie(e,n);t+=e.slice(n,d),n=d,r=!1;continue}if(a==="i"&&c){if(Ke.lastIndex=n,Ke.test(e)){t+="$__import",n+=6,r=!1;continue}if(s===0&&r){Ve.lastIndex=n;let d=Ve.exec(e);if(d){t+=Rr(d[1],d[3],o++),n+=d[0].length,r=!1;continue}}}if(a==="e"&&c&&s===0&&r){Ge.lastIndex=n;let d=Ge.exec(e);if(d){i=!0,t+="$__exports.default =",n+=d[0].length,r=!1;continue}}"([{".includes(a)?s++:")]}".includes(a)&&(s=Math.max(0,s-1)),a===`
7
- `||a===";"||a==="}"?r=!0:/\s/.test(a)||(r=!1),t+=a,n++}return i?t:null},Cr=new Set(["true","false","null","undefined","this","typeof","instanceof","in","new","void","delete","of","await","yield","NaN","Infinity","arguments","case","do","else","return"]),Ar=new Set(["function","class","let","const","var","eval","with"]),Mr=new Set(["$scope","$r","$t"]),kr=/^(?:\+\+|--|=>|\*\*=|<<=|>>>=|>>=|&&=|\|\|=|\?\?=|[+\-*/%&|^]=(?!=))/,_r=/^(?:>>>|===|!==|\*\*|<<|>>|==|!=|<=|>=|&&|\|\||\?\?|\?\.)/,Or=e=>/[A-Za-z_$]/.test(e),jr=/^(?:0[xXbBoO][\da-fA-F_]+|\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?\d+)?)n?/,Nt=e=>{let t=new Set,n=[0],s=[],r=!1,i="",o=0;for(;o<e.length;){let a=e[o];if(/\s/.test(a)){o++;continue}if(a==="/"&&e[o+1]==="/"){o=te(e,o);continue}if(a==="/"&&e[o+1]==="*"){o=ne(e,o);continue}if(a==="/"&&oe(e,o)){o=ie(e,o),i="value";continue}if(a==='"'||a==="'"){o=re(e,o),i="value";continue}if(a==="`"){let d=o+1;for(;d<e.length;){if(e[d]==="\\"){d+=2;continue}if(e[d]==="`"){d++;break}if(e[d]==="$"&&e[d+1]==="{"){let p=1,w=d+=2;for(;d<e.length&&p>0;)e[d]==="{"?p++:e[d]==="}"&&p--,d++;let _=Nt(e.slice(w,d-1));if(_===null)return null;_.forEach(I=>t.add(I));continue}d++}o=d,i="value";continue}if(/\d/.test(a)&&i!=="."&&i!=="?."){let d=jr.exec(e.slice(o));o+=d?d[0].length:1,i="value";continue}if(Or(a)){let d=o;for(;d<e.length&&/[\w$]/.test(e[d]);)d++;let p=e.slice(o,d);if(o=d,Ar.has(p))return null;if(i==="."||i==="?."){i="value";continue}if(Cr.has(p)){i=p==="this"?"value":"op";continue}if(Mr.has(p))return null;let w=o;for(;w<e.length&&/\s/.test(e[w]);)w++;if(e[w]==="(")return null;e[w]===":"&&e[w+1]!==":"&&s[s.length-1]==="{"&&n[n.length-1]===0||t.add(p),i="value";continue}let l=e.slice(o);if(kr.test(l))return null;let c=_r.exec(l);if(c){(c[0]==="&&"||c[0]==="||"||c[0]==="??")&&(r=!0),i=c[0]==="?."?"?.":"op",o+=c[0].length;continue}if(a==="=")return null;a==="("||a==="["||a==="{"?(s.push(a),n.push(0)):a===")"||a==="]"||a==="}"?(s.pop(),n.length>1&&n.pop()):a==="?"?(n[n.length-1]++,r=!0):a===":"&&n[n.length-1]>0&&n[n.length-1]--,i=a,o++}return r&&t.size>1?null:[...t]},bt=/(?:await\s+)?(?:import\s*\(|(\$importAll)\s*\(\s*\[|(C79|Component79)\s*\.\s*(fetch|fetchAll|importAll)\s*\(\s*(\[)?)/y,Tt=/(["'])([^"'\n\\]+)\1/y,Lr=/^(?:(?:if|for|while|with)\b[\s\S]*\)|[\s\S]*\b(?:else|do))$/,Dr=(e,t)=>{bt.lastIndex=0;let n=bt.exec(e);if(!n)return[];let[,s,r,i,o]=n;if(t.has(s??r??""))return[];let a=s!==void 0||o!==void 0;if(i!==void 0&&i==="fetch"===a)return[];let l=r===void 0?"component":i==="importAll"?"page":"fetch",c=[],d=ce(e,bt.lastIndex);for(;;){Tt.lastIndex=d;let p=Tt.exec(e);if(!p)return c;let w=ce(e,Tt.lastIndex),_=e[w];if(!a)return _===")"||_===","?[{spec:p[2],kind:l}]:[];if(_!==","&&_!=="]"||(c.push({spec:p[2],kind:l}),_==="]"))return c;d=ce(e,w+1)}},Rn=e=>{let t=[];for(let o=ce(e,0);o<e.length;o=ce(e,o+1)){let a=$t(e,o);t.push(e.slice(o,a).trim().replace(/^export\s+(?!default\b)/,"")),o=a}let n=o=>{Be.lastIndex=0;let a=Be.exec(o);return a?bn(o.slice(a[0].length)).map(({raw:l})=>{let c=l.trim(),d=Xe(c);return d===-1?{target:c,init:""}:{target:c.slice(0,d).trim(),init:c.slice(d+1).trim()}}):null},s=new Set;t.forEach(o=>n(o)?.forEach(({target:a})=>ze(a).forEach(l=>s.add(l))));let r=[],i=!1;for(let o of t){if(!i){Ve.lastIndex=0;let a=Ve.exec(o);if(a)/^type\s/.test(a[1]??"")||r.push({spec:a[3],kind:"component"});else{let l=n(o);for(let c of l?l.map(({init:d})=>d):[o])r.push(...Dr(c,s))}}i=Lr.test(o)}return r};var ae=e=>e.replace(/-(\w)/g,(t,n)=>n.toUpperCase()),Ye=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Ir=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),qr=/<([A-Za-z][\w.-]*)((?:"[^"]*"|'[^']*'|[^>"'])*?)\/>/g,vt=/(<script[\s\S]*?<\/script\s*>|<style[\s\S]*?<\/style\s*>)/gi,Hr=e=>e.split(vt).map((t,n)=>n%2===1?t:t.replace(qr,(s,r,i)=>Ir.has(r.toLowerCase())?s:`<${r}${i}></${r}>`)).join(""),Nn=/<([A-Za-z][\w.-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,Wr=/"[^"]*"|'[^']*'|(^|\s)\.\.\.([A-Za-z_$][\w$.]*)/g,Fr=e=>e.split(vt).map((t,n)=>n%2===1?t:t.replace(Nn,(s,r,i)=>{let o=0,a=i.replace(Wr,(l,c,d)=>d===void 0?l:`${c}:props.${o++}="${d}"`);return`<${r}${a}>`})).join(""),Ur=/"[^"]*"|'[^']*'|(^|\s)(:[\w.$-]+)/g,Br=/<\/slot\.([\w.$-]+)(\s*)>/gi,Kr=/^slot\./i,zr=e=>Kr.test(e)?`slot.${Ye(e.slice(5))}`:e,Oe=":jq79-component",Pn=/^[A-Z]/,Gr="c79-",je=e=>`${Gr}${Ye(e[0].toLowerCase()+e.slice(1))}`,Vr=e=>Pn.test(e)?je(e):zr(e),Zr=/<\/([A-Z][\w.-]*)(\s*)>/g,Qr=/\/\s*$/,Xr=(e,t)=>{if(!Pn.test(e))return t;let n=` ${Oe}="${e}"`,s=Qr.exec(t);return s?`${t.slice(0,s.index)}${n}${s[0]}`:`${t}${n}`},Yr=e=>e.split(vt).map((t,n)=>n%2===1?t:t.replace(Nn,(s,r,i)=>{let o=i.replace(Ur,(a,l,c)=>c===void 0?a:`${l}${Ye(c)}`);return`<${Vr(r)}${Xr(r,o)}>`}).replace(Br,(s,r,i)=>`</slot.${Ye(r)}${i}>`).replace(Zr,(s,r,i)=>`</${je(r)}${i}>`)).join(""),vn=e=>Hr(Fr(Yr(e))),Cn=/^[A-Z][A-Za-z0-9]*$/,Pt=/{{\s*([\s\S]+?)\s*}}/g,xn=new Map,Ct=e=>{let t=xn.get(e);if(t)return t;let n=[],s=0;Pt.lastIndex=0;for(let r=Pt.exec(e);r;r=Pt.exec(e))r.index>s&&n.push(e.slice(s,r.index)),n.push({expr:r[1]}),s=r.index+r[0].length;return s<e.length&&n.push(e.slice(s)),xn.set(e,n),n},At=new Set([":class",":value",":checked",":selected",":if",":elseif",":else",":each",":key",":with",":text",":html",":html.allowed",":props"]),Ee=e=>At.has(e)||e.startsWith(":class.")||e.startsWith(":props.")||e===":slot"||e.startsWith(":slot."),An=/^\s*\(?\s*(\w+)\s*(?:,\s*(\w+))?\s*\)?\s+in\s+([\s\S]+)$/,Je=e=>e==="slot"||e.startsWith("slot."),Mt=e=>e?ae(e):"default",kt=e=>`${e}
8
- = $value`,_t=["$scope","$r"],Mn=e=>`with ($scope) { return (${e}
9
- ); }`,kn=(e,t)=>{let n=Nt(e);if(n===null)return null;let s=n.filter(i=>!t.includes(i));return`${s.length===0?"":`let $t; ${s.map(i=>`const ${i} = ($t = $scope.${i}) !== undefined ? $t : $r($scope, ${JSON.stringify(i)});`).join(" ")}`} return (${e}
10
- );`},et=(e,t)=>`${e.join(",")}
11
- ${t}`,Ot=e=>`await $mounted();${e}`,_n=e=>["$scope","$__effect","$__import","$__state",...e],On=e=>`return (async () => { with ($scope) { ${e} }
12
- ;$__state.done = true })()`,jn=e=>["$__exports","$__default","$__import",...e],Ln=e=>`return (async () => { "use strict";
1
+ var jq79=(()=>{var He=Object.defineProperty;var cr=Object.getOwnPropertyDescriptor;var dr=Object.getOwnPropertyNames;var ur=Object.prototype.hasOwnProperty;var fr=(e,t,n)=>t in e?He(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var pr=(e,t)=>{for(var n in t)He(e,n,{get:t[n],enumerable:!0})},hr=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of dr(t))!ur.call(e,r)&&r!==n&&He(e,r,{get:()=>t[r],enumerable:!(s=cr(t,r))||s.enumerable});return e};var gr=e=>hr(He({},"__esModule",{value:!0}),e);var k=(e,t,n)=>fr(e,typeof t!="symbol"?t+"":t,n);var sl={};pr(sl,{$:()=>xe,$$:()=>We,$batch:()=>_e,$computed:()=>ze,$create:()=>Fe,$reactive:()=>Ee,$toRaw:()=>Q,C79:()=>ae,Component79:()=>ae,PendingComponent79:()=>ht,enableHotReload:()=>nr,hotUpdate:()=>tr,parseComponent:()=>nl,renderComponent:()=>yi});function xe(e,t){return typeof e=="string"?document.querySelector(e):e.querySelector(t)}function We(e,t){return Array.from(typeof e=="string"?document.querySelectorAll(e):e.querySelectorAll(t))}var Fe=(e,t={})=>{let n=document.createElement(e);for(let[s,r]of Object.entries(t))if(s==="className")n.className=Array.isArray(r)?r.join(" "):r;else if(s==="textContent")n.textContent=r;else if(s==="children")for(let i of r)n.appendChild(i);else n.setAttribute(s,r);return n},mr=new Set(["a","b","i","em","strong","p","br","ul","ol","li","blockquote","code","pre","span","div","h1","h2","h3","h4","h5","h6","img"]),hn={a:new Set(["href","title"]),img:new Set(["src","alt"]),"*":new Set(["class"])},yr=new Set(["http:","https:","mailto:"]);function Er(e){try{let t=new URL(e,"https://example.com");return yr.has(t.protocol)}catch{return!1}}var wr={"https:":"443","http:":"80"};function Sr(e){let t=e.trim().toLowerCase().match(/^([a-z\d*][a-z\d.*-]*?)(?::(\d{1,5}|\*))?$/);if(!t)return null;let[,n,s]=t,r=n.split(".");return r.some(o=>o!=="*"&&!/^[a-z\d-]+$/.test(o))?null:{host:new RegExp(`^${r.map(o=>o==="*"?"[^.]+":o).join("\\.")}$`),port:!s||s==="*"?null:s}}var mn=e=>{let t=(Array.isArray(e)?e:e.split(",")).map(Sr).filter(n=>n!==null);return n=>{let s=n.hostname.toLowerCase(),r=n.port||wr[n.protocol]||"";return t.some(i=>i.host.test(s)&&(i.port===null||i.port===r))}};function br(e,t,n,s){try{return!!e(new URL(t,document.baseURI),n,s)}catch{return!1}}var gn=512;function yn(e,t,n,s){if(n>gn)throw new RangeError(`jq79: sanitizeHTML input nests deeper than ${gn} elements`);for(let r of Array.from(e.childNodes))if(r.nodeType===Node.ELEMENT_NODE){let i=Tr(r,n,s);i&&t.appendChild(i)}else r.nodeType===Node.TEXT_NODE&&t.appendChild(r.cloneNode())}function Tr(e,t,n){let s=e.tagName.toLowerCase();if(!mr.has(s))return null;let r=document.createElement(s);for(let i of Array.from(e.attributes)){let o=i.name.toLowerCase(),l=hn[s]?.has(o),a=hn["*"]?.has(o);!l&&!a||(o==="href"||o==="src")&&(!Er(i.value)||n&&!br(n,i.value,s,o))||r.setAttribute(o,i.value)}return s==="a"&&r.setAttribute("rel","noopener noreferrer"),yn(e,r,t+1,n),r}function Et(e,t){let n=document.createElement("template");n.innerHTML=e;let s=document.createElement("div");return yn(n.content,s,0,t?.allowUrl),s.innerHTML}var $r=(e,t)=>t.split(".").reduce((n,s)=>n?.[s],e),Be=e=>{if(Array.isArray(e))return!0;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},xn=(e,t,n)=>{Object.entries(e).forEach(([s,r])=>{let i=t?`${t}.${s}`:s;r&&typeof r=="object"&&Be(r)?xn(r,i,n):n(i,r)})},Rr=(e,t)=>{e.own===null?e.own=t:e.own!==t&&(e.ownMany??(e.ownMany=new Set)).add(t)},xr=(e,t)=>{e.deep===null?e.deep=t:e.deep!==t&&(e.deepMany??(e.deepMany=new Set)).add(t)},Nr=(e,t)=>{e.own===t?e.own=null:e.ownMany?.delete(t)&&e.ownMany.size===0&&(e.ownMany=null)},vr=(e,t)=>{e.deep===t?e.deep=null:e.deepMany?.delete(t)&&e.deepMany.size===0&&(e.deepMany=null)},Ne=(e,t)=>{e.own!==null&&t(e.own),e.ownMany?.forEach(t)},Oe=(e,t)=>{e.deep!==null&&t(e.deep),e.deepMany?.forEach(t)},En=" keys",wt=e=>e?`${e}.${En}`:En,wn=".length",Sn=(e,t)=>({children:null,own:null,ownMany:null,deep:null,deepMany:null,parent:e,segment:t}),Pr=e=>e.own===null&&e.deep===null&&!e.ownMany?.size&&!e.deepMany?.size&&!e.children?.size,bt=Symbol("jq79.raw"),Q=e=>{let t=e;for(;t!==null&&typeof t=="object"&&t[bt];)t=t[bt];return t},Nn=Symbol("jq79.store"),ye=e=>e!==null&&typeof e=="object"&&e[Nn]===!0,Tt=null,fe=[],J=null,Pe=e=>{fe.push(new Set);let t=J;J=null;try{return e()}finally{fe.pop(),J=t}},Cr=e=>{e.adopted.forEach((t,n)=>{e.read?.has(n)||(t(),e.adopted.delete(n))})},bn=e=>{e.adopted?.forEach(t=>t()),e.adopted=null},Mr=0,ve=0,pe=null,Tn=(e,t)=>{for(let n of e)pe.has(n)||pe.set(n,t)},Ar=()=>{for(let e=0;pe.size;e++){if(e===100){console.error("jq79: a $batch kept waking effects for 100 rounds (an effect writes what it reads); giving up on it settling"),pe.clear();return}let t=pe;pe=new Map,Array.from(t.keys()).sort((s,r)=>s.order-r.order).forEach(s=>{t.get(s).has(s)&&s.run()})}},_e=e=>{ve++===0&&(pe=new Map);try{return e()}finally{if(ve===1)try{Ar()}finally{ve=0,pe=null}else ve--}},St=new Set,$n="$__attach",Rn="$__holds",Ue=Symbol("jq79.alsoWakenBy"),Rt=Symbol("jq79.owner"),Ee=e=>{let t=new Map,n=new Set,s=new Set,r=new WeakMap,i=Object.create(null),o=Sn(null,""),l=(f,d)=>{let m=o;return f.split(".").forEach(h=>{let S=m.children??(m.children=new Map),g=S.get(h);g||(g=Sn(m,h),S.set(h,g)),m=g}),d.deep?xr(m,d):Rr(m,d),m},a=(f,d)=>{d.deep?vr(f,d):Nr(f,d);let m=f;for(;m?.parent&&Pr(m);)m.parent.children.delete(m.segment),m=m.parent},c=f=>{let d=o;for(let m of f.split("."))if(d=d.children?.get(m),!d)return;return d},u=f=>{let d=new Set,m=E=>{let $=E.children?[...E.children.values()]:[];for(;$.length;){let x=$.pop();Ne(x,v=>d.add(v)),Oe(x,v=>d.add(v)),x.children?.forEach(v=>$.push(v))}},h=o,S=f.split("."),g="";for(let E=0;E<S.length-1;E++){if(h=h.children?.get(S[E]),!h)return d;g=g?`${g}.${S[E]}`:S[E],Oe(h,x=>d.add(x));let $=T.get(g);$&&Ne(h,x=>{$.store[Rn](x)||d.add(x)}),E===S.length-2&&S[E+1]==="length"&&(Ne(h,x=>d.add(x)),m(h))}return h=h.children?.get(S[S.length-1]),h&&(Ne(h,E=>d.add(E)),Oe(h,E=>d.add(E)),m(h)),d},p=(f,d,m)=>{if(d===m)return!1;for(let h=d;h<m;h++){let S=f.charCodeAt(h);if(S<48||S>57)return!1}return!0},b=(f,d)=>{if(f.deep||d.size<2)return d;let m=new Set;d.forEach(g=>{g.endsWith(wn)&&m.add(g.slice(0,-wn.length))});let h=new Set;if(d.forEach(g=>{let E=0,$="";for(let x=g.indexOf(".");x!==-1;x=g.indexOf(".",x+1)){let v=g.slice(0,x);(!(E>0&&p(g,E,x))||m.has($))&&h.add(v),$=v,E=x+1}}),!h.size)return d;let S=new Set;return d.forEach(g=>{h.has(g)||S.add(g)}),S},M=f=>{let d=null,m=null,h=null,S=St,g=C=>h?h.has(C):d===C,E=C=>{let Z=l(C,f);h?h.set(C,Z):d===null?(d=C,m=Z):(h=new Map([[d,m],[C,Z]]),d=m=null)},$=C=>{if(h){h.forEach((Z,U)=>{C.has(U)||(a(Z,f),h.delete(U))});return}d!==null&&!C.has(d)&&(a(m,f),d=m=null)},x=()=>{h?h.forEach(C=>a(C,f)):m&&a(m,f),h=null,d=m=null},v=C=>{if(C.size===S.size){let U=!0;if(C.forEach(me=>{U&&(U=S.has(me))}),U)return}S=C;let Z=b(f,C);$(Z),Z.forEach(U=>{g(U)||E(U)})};return f.reindex.add(v),v(f.deps),()=>{f.reindex.delete(v),x(),S=St}},H=f=>{let d=c(f);if(d){let m=new Set;Ne(d,h=>m.add(h)),Oe(d,h=>m.add(h)),D(m)}},q=f=>H(wt(f)),D=f=>{if(ve)return Tn(f,s);let d=Array.from(f),m=!0;for(let h=1;m&&h<d.length;h++)m=d[h-1].order<d[h].order;m||d.sort((h,S)=>h.order-S.order),d.forEach(h=>{s.has(h)&&h.run()})},R=(f,d,m=!1)=>{t.get(f)?.forEach(h=>h(d,f)),n.forEach(h=>h(f,d)),m?ve?Tn(s,s):s.forEach(h=>h.run()):D(u(f))},j=(f,d)=>f!==d&&f!==null&&d!==null&&typeof f=="object"&&typeof d=="object"&&!ye(f)&&!ye(d)&&Be(f)&&Be(d)&&Array.isArray(f)===Array.isArray(d),O=null,W=-1,z=(f,d)=>{let m=d.length>f.length,h=m?f:d,S=m?d:f,g=0;for(;g<h.length&&Object.is(Q(h[g]),Q(S[g]));)g++;for(let E=g;E<h.length;E++)if(!Object.is(Q(h[E]),Q(S[E+1])))return W;return g},K=(f,d)=>{if(Array.isArray(d)){let $=f.length,x=d.length,v=$!==x;if(!$||!x)return O;let C=Math.max($,x);if(Math.abs($-x)===1){let U=z(f,d);if(U!==W){let me=[];for(let yt=U;yt<C;yt++)me.push(String(yt));return{keys:me,exact:!0,keysChanged:v}}}let Z=[];for(let U=0;U<C;U++)if(!Object.is(Q(f[U]),Q(d[U]))&&(Z.push(String(U)),Z.length*2>=C))return O;return{keys:Z,exact:!1,keysChanged:v}}let m=Object.keys(f),h=Object.keys(d),S=new Set([...m,...h]);if(!S.size)return O;let g=[];S.forEach($=>{Object.is(Q(f[$]),Q(d[$]))||g.push($)});let E=m.length!==h.length||m.some(($,x)=>$!==h[x]);return g.length*2>=S.size?O:{keys:g,exact:!1,keysChanged:E}},X=(f,d,m,h)=>{let S=new Set,g=$=>{let x=c($);x&&(Ne(x,v=>S.add(v)),Oe(x,v=>S.add(v)))},E=K(d,m);if(!E)return R(f,h);if(t.get(f)?.forEach($=>$(h,f)),n.forEach($=>$(f,h)),g(f),E.keys.forEach($=>{let x=`${f}.${$}`,v=t.get(x);if(v){let C=Q(m[$]),Z=y(C)?F(C,x):C;v.forEach(U=>U(Z,x))}E.exact?g(x):u(x).forEach(C=>S.add(C))}),E.keysChanged&&g(wt(f)),Array.isArray(m)&&d.length!==m.length){let $=`${f}.length`;t.get($)?.forEach(x=>x(m.length,$)),g($)}D(S)},y=f=>f!==null&&typeof f=="object"&&Be(f),T=new Map,N=(f,d)=>{let m=T.get(d);m?.store!==f&&(m?.unsubscribe(),T.set(d,{store:f,unsubscribe:f.$onAny((h,S)=>R(`${d}.${h}`,S))}))},I=f=>{T.get(f)?.unsubscribe(),T.delete(f)},F=(f,d)=>{let m=r.get(f);if(m)return m;let h=null,S=new Proxy(f,{has(g,E){return Reflect.has(g,E)||typeof E=="string"&&h?.has(E)===!0},ownKeys(g){return fe[fe.length-1]?.add(wt(d)),J!==null&&J.home!==s&&G(J),Reflect.ownKeys(g)},get(g,E,$){if(E===bt)return g;if(E===Nn)return d==="";if(typeof E!="string")return Reflect.get(g,E,$);if(d===""&&E in i)return i[E];let x=d?`${d}.${E}`:E;fe[fe.length-1]?.add(x),J!==null&&J.home!==s&&G(J);let v=Reflect.get(g,E,$);if(ye(v))return N(v,x),v;let C=Q(v);return y(C)?F(C,x):C},set(g,E,$,x){if(x!==S&&!Object.prototype.hasOwnProperty.call(g,E))return Reflect.set(g,E,$,x);let v=d?`${d}.${E}`:E,C=ye($)?$:Q($),Z=!Object.prototype.hasOwnProperty.call(g,E);if(!Z&&Object.is(g[E],C)&&(C===null||typeof C!="object"))return!0;let U=g[E];g[E]=C,h?.delete(E),ye(C)?N(C,v):I(v);let me=ye(C)||!y(C)?C:F(C,v);return!Z&&j(U,C)?X(v,U,C,me):R(v,me,Z),!0},deleteProperty(g,E){if(typeof E!="string")return Reflect.deleteProperty(g,E);let $=Object.prototype.hasOwnProperty.call(g,E),x=Reflect.deleteProperty(g,E);if(x&&$){let v=d?`${d}.${E}`:E;(h??(h=new Set)).add(E),I(v),R(v,void 0),q(d)}return x}});return r.set(f,S),S},V=F(Q(e),"");Object.entries(Q(e)).forEach(([f,d])=>{ye(d)&&N(d,f)});let w=(f,d,{immediate:m=!1}={})=>(t.has(f)||t.set(f,new Set),t.get(f).add(d),m&&d($r(V,f),f),()=>t.get(f)?.delete(d)),A=(f,{immediate:d=!1}={})=>(n.add(f),d&&xn(V,"",(m,h)=>f(m,h)),()=>n.delete(f)),P=(f,{deep:d=!1,alsoWakenBy:m}={})=>{let h=!1,S=!1,g={deps:St,reindex:new Set,deep:d,order:Mr++,home:s,adopted:null,read:null,run:()=>{if(h){S=!0;return}h=!0;try{let x=0;do{S=!1,g.read=null;let v=new Set;fe.push(v);let C=J;J=g;try{f()}finally{fe.pop(),J=C,g.deps=v}}while(S&&++x<100);S&&console.error("jq79: an effect re-woke itself 100 times in a row (it writes what it reads); giving up on it settling")}finally{h=!1,g.adopted&&Cr(g),g.reindex.forEach(x=>x(g.deps))}}};s.add(g);let E=M(g),$=()=>{s.delete(g),E(),bn(g)};return m?.length?L(g,m,$):(g.run(),Tt=g,$)},L=(f,d,m)=>{let h=d.map(S=>S?.[$n]?.(f)).filter(Boolean);return f.run(),Tt=f,()=>{m(),h.forEach(S=>S())}},B=f=>{s.add(f);let d=M(f);return()=>{s.delete(f),d()}},G=f=>{(f.read??(f.read=new Set)).add(s),!(f.adopted?.has(s)||s.has(f))&&(f.adopted??(f.adopted=new Map)).set(s,B(f))},te=()=>{T.forEach(({unsubscribe:f})=>f()),T.clear(),s.forEach(f=>{f.home===s&&bn(f)})};return i.$on=w,i.$onAny=A,i.$effect=P,i.$dispose=te,i[$n]=B,i[Rn]=f=>s.has(f),V},$t=class{constructor(t,n){k(this,"scope",t);k(this,"disposers",null);k(this,"runs",null);k(this,"children",null);k(this,"owners",null);k(this,"options");let s=t[Ue];this.options=n||s?{deep:n,alsoWakenBy:s}:void 0,this.ownedBy(t)}ownedBy(t){let n=t[Rt];!n||this.owners?.includes(n)||((this.owners??(this.owners=[])).push(n),(n.children??(n.children=new Set)).add(this))}effect(t){(this.disposers??(this.disposers=[])).push(this.scope.$effect(t,this.options)),(this.runs??(this.runs=[])).push(Tt)}onDispose(t){(this.disposers??(this.disposers=[])).push(t)}refresh(){this.runs?.forEach(t=>t.run())}rerun(){let t=this.runs?[...this.runs]:null,n=this.children?[...this.children]:null;t?.forEach(s=>{this.runs&&s.run()}),n?.forEach(s=>s.rerun())}dispose(){let t=this.disposers;if(this.disposers=null,this.runs=null,this.children=null,this.owners?.forEach(n=>n.children?.delete(this)),this.owners=null,t)for(let n=0;n<t.length;n++)t[n]()}},we=(e,t=!1)=>new $t(e,t),ze=e=>{let t=Ee({value:void 0});t.$effect(()=>{let s;try{s=e()}catch(r){console.error("jq79: error in $computed, keeping its last value",r);return}t.value=s});let n=(s,r)=>(console.warn(`jq79: a $computed is read-only - the write to ${String(r)} was ignored`),!0);return new Proxy(t,{set:n,deleteProperty:n,defineProperty:n})};var Ke=/(?:let|var|const)(?:\s+(?=[A-Za-z_$])|\s*(?=[{[]))/y,vn=/\$:\s*/y,Ge=/import(?=\s*\()/y,Pn=/\$:\s*([A-Za-z_$][\w$]*)\s*=(?!=)/y,re=(e,t)=>{let n=e[t],s=t+1;for(;s<e.length;){if(e[s]==="\\"){s+=2;continue}if(e[s]===n)return s+1;s++}return e.length},ne=(e,t)=>{let n=e.indexOf(`
2
+ `,t);return n===-1?e.length:n},se=(e,t)=>{let n=e.indexOf("*/",t+2);return n===-1?e.length:n+2},ce=(e,t)=>{let n=t;for(;n<e.length;){if(/\s/.test(e[n])){n++;continue}if(e[n]==="/"&&e[n+1]==="/"){n=ne(e,n);continue}if(e[n]==="/"&&e[n+1]==="*"){n=se(e,n);continue}break}return n},kr=new Set(["return","typeof","case","in","instanceof","new","delete","void","do","else","yield","await"]),oe=(e,t)=>{let n=t-1;for(;n>=0;){let r=e[n];if(/\s/.test(r)){n--;continue}if(r==="/"&&e[n-1]==="*"){let i=e.lastIndexOf("/*",n-2);if(i===-1)return!0;n=i-1;continue}break}if(n<0)return!0;let s=e[n];if(/[\w$]/.test(s)){let r=n;for(;r>0&&/[\w$]/.test(e[r-1]);)r--;return kr.has(e.slice(r,n+1))}return(s==="+"||s==="-")&&e[n-1]===s?!1:!")]}\"'`.".includes(s)},ie=(e,t)=>{let n=t+1,s=!1;for(;n<e.length;){let r=e[n];if(r==="\\"){n+=2;continue}if(r===`
3
+ `)return n;if(r==="[")s=!0;else if(r==="]")s=!1;else if(r==="/"&&!s){for(n++;n<e.length&&/[a-z]/i.test(e[n]);)n++;return n}n++}return e.length},Or=/^(\?\.|\?\?|&&|\|\||\*\*|[.,+\-*/%&|^<>=?:([])/,_r=(e,t)=>{let n=t-1;for(;n>=0;){let s=e[n];if(/\s/.test(s)){n--;continue}if(s==="/"&&e[n-1]==="*"){let r=e.lastIndexOf("/*",n-2);if(r===-1)return"";n=r-1;continue}return s}return""},vt=(e,t)=>{let n=0,s=t;for(;s<e.length;){let r=e[s];if(r==="'"||r==='"'||r==="`"){s=re(e,s);continue}if(r==="/"&&e[s+1]==="/"){s=ne(e,s);continue}if(r==="/"&&e[s+1]==="*"){s=se(e,s);continue}if(r==="/"&&oe(e,s)){s=ie(e,s);continue}if("([{".includes(r))n++;else if(")]}".includes(r))n--;else{if(n<=0&&r===";")return s;if(n<=0&&r===`
4
+ `){let i=ce(e,s+1);if(!(i<e.length&&(Or.test(e.slice(i,i+2))||[",","="].includes(_r(e,s)))))return s;s=i;continue}}s++}return e.length},Cn=e=>{let t=[],n=0,s=0,r=0,i=l=>{t.push({raw:e.slice(s,l),codeEnd:Math.max(0,r-s)}),s=l+1,r=s},o=0;for(;o<e.length;){let l=e[o];if(l==="'"||l==='"'||l==="`"){o=re(e,o),r=o;continue}if(l==="/"&&e[o+1]==="/"){o=ne(e,o);continue}if(l==="/"&&e[o+1]==="*"){o=se(e,o);continue}if(l==="/"&&oe(e,o)){o=ie(e,o),r=o;continue}if("([{".includes(l))n++;else if(")]}".includes(l))n--;else if(l===","&&n<=0){i(o),o++;continue}/\s/.test(l)||(r=o+1),o++}return i(e.length),t},Ve=e=>{let t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return Xe.test(t)?[t]:[];let n=[];for(let s of Ct(t.slice(1,Mn(t)))){s.startsWith("...")&&(s=s.slice(3).trim());let r=Je(s);if(r!==-1&&(s=s.slice(0,r).trim()),t.startsWith("{")){let i=Pt(s,":");if(i!==-1){n.push(...Ve(s.slice(i+1)));continue}}n.push(...Ve(s))}return n},jr=e=>{let t=[],n=Cn(e).map(({raw:i,codeEnd:o})=>{let l=i.match(/^\s*/)[0];if(o<=l.length)return{text:i,empty:!0};let a=i.slice(l.length,o),c=i.slice(o),u=Je(a),p=(u===-1?a:a.slice(0,u)).trim(),b=a[0]==="{"||a[0]==="[";b?t.push(...Ve(p)):Xe.test(p)&&t.push(p);let M=Ye(a).code;return{text:`${l}${b?`(${M})`:M}${c}`,empty:!1}}),s=[];for(;n.length&&n[n.length-1].empty;)s.unshift(n.pop().text);let r=n.map(i=>i.text).join(",")+s.join("");return r.trimStart().startsWith("(")&&(r=`;${r}`),{vars:t,code:r}},Ye=e=>{let t=[],n="",s=0,r=0,i=!0;for(;s<e.length;){let o=e[s],l=e[s+1];if(o==="'"||o==='"'||o==="`"){let a=re(e,s);n+=e.slice(s,a),s=a,i=!1;continue}if(o==="/"&&(l==="/"||l==="*")){let a=l==="/"?ne(e,s):se(e,s);n+=e.slice(s,a),s=a;continue}if(o==="/"&&oe(e,s)){let a=ie(e,s);n+=e.slice(s,a),s=a,i=!1;continue}if(o==="i"&&(s===0||!/[\w$.]/.test(e[s-1]))&&(Ge.lastIndex=s,Ge.test(e))){n+="$__import",s+=6,i=!1;continue}if(r===0&&i){Ke.lastIndex=s;let a=Ke.exec(e);if(a){let u=s+a[0].length,p=vt(e,u),{vars:b,code:M}=jr(e.slice(u,p));t.push(...b),n+=M,s=p,i=!1;continue}vn.lastIndex=s;let c=vn.exec(e);if(c){Pn.lastIndex=s;let u=Pn.exec(e);u&&t.push(u[1]);let p=s+c[0].length,b=vt(e,p);n+=`$__effect(() => { ${Ye(e.slice(p,b)).code} });`,s=b;continue}}"([{".includes(o)?r++:")]}".includes(o)&&(r=Math.max(0,r-1)),o===`
5
+ `||o===";"||o==="}"?i=!0:/\s/.test(o)||(i=!1),n+=o,s++}return{vars:t,code:n}},Ze=/export\s+default(?![\w$])/y,Qe=/import\s*(?:([\w$\s,{}*]+?)\s*from\s*)?(["'])([^"'\n]+)\2/y,Lr=e=>{let t=[],n=0,s=0;for(let r=0;r<=e.length;r++){let i=e[r];if(i==="{")n++;else if(i==="}")n--;else if(r===e.length||i===","&&n===0){let o=e.slice(s,r).trim();o&&t.push(o),s=r+1}}return t},Dr=(e,t,n)=>{let s=`await $__import(${JSON.stringify(t)})`;if(e===void 0)return s;let r=Lr(e),i=[],o=s;if(r.length>1){let l=`$__mod${n}`;i.push(`${l} = ${s}`),o=l}for(let l of r)l.startsWith("{")?i.push(`${l.replace(/\s+as\s+/g,": ")} = ${o}`):l.startsWith("*")?i.push(`${l.replace(/^\*\s*as\s+/,"")} = ${o}`):i.push(`${l} = $__default(${o})`);return`const ${i.join(", ")}`},Xe=/^[A-Za-z_$][\w$]*$/,Mn=e=>{let t=0,n=0;for(;n<e.length;){let s=e[n];if(s==="'"||s==='"'||s==="`"){n=re(e,n);continue}if(s==="/"&&e[n+1]==="/"){n=ne(e,n);continue}if(s==="/"&&e[n+1]==="*"){n=se(e,n);continue}if(s==="/"&&oe(e,n)){n=ie(e,n);continue}if("([{".includes(s))t++;else if(")]}".includes(s)&&--t===0)return n;n++}return e.length},Pt=(e,t)=>{let n=0,s=0;for(;s<e.length;){let r=e[s];if(r==="'"||r==='"'||r==="`"){s=re(e,s);continue}if(r==="/"&&e[s+1]==="/"){s=ne(e,s);continue}if(r==="/"&&e[s+1]==="*"){s=se(e,s);continue}if(r==="/"&&r!==t&&oe(e,s)){s=ie(e,s);continue}if("([{".includes(r))n++;else if(")]}".includes(r))n--;else if(n===0&&r===t)return s;s++}return-1},Ct=e=>{let t=[],n=0,s=0,r=0;for(;r<=e.length;){let i=e[r];if(i==="'"||i==='"'||i==="`"){r=re(e,r);continue}if(i==="/"&&e[r+1]==="/"){r=ne(e,r);continue}if(i==="/"&&e[r+1]==="*"){r=se(e,r);continue}if(i==="/"&&oe(e,r)){r=ie(e,r);continue}if(i!==void 0&&"([{".includes(i))n++;else if(i!==void 0&&")]}".includes(i))n--;else if(r===e.length||i===","&&n===0){let o=e.slice(s,r).trim();o&&t.push(o),s=r+1}r++}return t},Je=e=>{let t=0;for(;t<e.length;){let n=Pt(e.slice(t),"=");if(n===-1)return-1;let s=t+n;if(e[s+1]!=="="&&e[s+1]!==">"&&e[s-1]!=="="&&e[s-1]!=="!")return s;t=s+1}return-1},je=e=>{let t=(e??"").trim();if(!t.startsWith("{"))return null;let n=Mn(t);if(n>=t.length)return null;let s=[];for(let r of Ct(t.slice(1,n))){if(r.startsWith("..."))continue;let i=Je(r),o=i===-1?r:r.slice(0,i),l=i===-1?void 0:r.slice(i+1).trim(),a=Pt(o,":"),c=(a===-1?o:o.slice(0,a)).trim();if(!Xe.test(c))continue;let u={name:c};l!==void 0&&(u.default=l);let p=a===-1?"":o.slice(a+1).trim();Xe.test(p)&&(u.as=p),s.push(u)}return s},Ir=e=>{let t=0,n=0,s=!0;for(;t<e.length;){let r=e[t];if(r==="'"||r==='"'||r==="`"){t=re(e,t),s=!1;continue}if(r==="/"&&e[t+1]==="/"){t=ne(e,t);continue}if(r==="/"&&e[t+1]==="*"){t=se(e,t);continue}if(r==="/"&&oe(e,t)){t=ie(e,t),s=!1;continue}if(r==="e"&&n===0&&s&&(t===0||!/[\w$.]/.test(e[t-1]))){Ze.lastIndex=t;let i=Ze.exec(e);if(i)return t+i[0].length}"([{".includes(r)?n++:")]}".includes(r)&&(n=Math.max(0,n-1)),r===`
6
+ `||r===";"||r==="}"?s=!0:/\s/.test(r)||(s=!1),t++}return-1},qr=/^async(?![\w$])/,Hr=/^function(?![\w$])\s*\*?\s*[A-Za-z_$][\w$]*|^function(?![\w$])\s*\*?/,Wr=e=>{let t=Ir(e);if(t===-1)return null;let n=ce(e,t),s=e.slice(n);qr.test(s)&&(n=ce(e,n+5));let r=Hr.exec(e.slice(n));if(r&&(n=ce(e,n+r[0].length)),e[n]!=="(")return null;let i=0,o=n;for(;o<e.length;){let l=e[o];if(l==="'"||l==='"'||l==="`"){o=re(e,o);continue}if(l==="/"&&e[o+1]==="/"){o=ne(e,o);continue}if(l==="/"&&e[o+1]==="*"){o=se(e,o);continue}if(l==="/"&&oe(e,o)){o=ie(e,o);continue}if("([{".includes(l))i++;else if(")]}".includes(l)&&--i===0)break;o++}return Ct(e.slice(n+1,o))[0]??""},et=e=>{let t=Wr(e);if(t===null)return null;let n=je(t),s=n?.find(r=>r.name.startsWith("$"))?.name;if(s)throw new Error(`jq79: the factory signature is (props, ctx), so \`${s}\` can't be destructured from the first parameter. Write \`export default (props, { ${s} }) => \u2026\`, or \`_\` in place of props if the component takes none.`);return n},An=e=>{let t="",n=0,s=0,r=!0,i=!1,o=0;for(;n<e.length;){let l=e[n],a=e[n+1],c=n===0||!/[\w$.]/.test(e[n-1]);if(l==="'"||l==='"'||l==="`"){let u=re(e,n);t+=e.slice(n,u),n=u,r=!1;continue}if(l==="/"&&(a==="/"||a==="*")){let u=a==="/"?ne(e,n):se(e,n);t+=e.slice(n,u),n=u;continue}if(l==="/"&&oe(e,n)){let u=ie(e,n);t+=e.slice(n,u),n=u,r=!1;continue}if(l==="i"&&c){if(Ge.lastIndex=n,Ge.test(e)){t+="$__import",n+=6,r=!1;continue}if(s===0&&r){Qe.lastIndex=n;let u=Qe.exec(e);if(u){t+=Dr(u[1],u[3],o++),n+=u[0].length,r=!1;continue}}}if(l==="e"&&c&&s===0&&r){Ze.lastIndex=n;let u=Ze.exec(e);if(u){i=!0,t+="$__exports.default =",n+=u[0].length,r=!1;continue}}"([{".includes(l)?s++:")]}".includes(l)&&(s=Math.max(0,s-1)),l===`
7
+ `||l===";"||l==="}"?r=!0:/\s/.test(l)||(r=!1),t+=l,n++}return i?t:null},Fr=new Set(["true","false","null","undefined","this","typeof","instanceof","in","new","void","delete","of","await","yield","NaN","Infinity","arguments","case","do","else","return"]),Br=new Set(["function","class","let","const","var","eval","with"]),Ur=new Set(["$scope","$r","$t"]),zr=/^(?:\+\+|--|=>|\*\*=|<<=|>>>=|>>=|&&=|\|\|=|\?\?=|[+\-*/%&|^]=(?!=))/,Kr=/^(?:>>>|===|!==|\*\*|<<|>>|==|!=|<=|>=|&&|\|\||\?\?|\?\.)/,Gr=e=>/[A-Za-z_$]/.test(e),Vr=/^(?:0[xXbBoO][\da-fA-F_]+|\d[\d_]*(?:\.[\d_]*)?(?:[eE][+-]?\d+)?)n?/,Mt=e=>{let t=new Set,n=[0],s=[],r=!1,i="",o=0;for(;o<e.length;){let l=e[o];if(/\s/.test(l)){o++;continue}if(l==="/"&&e[o+1]==="/"){o=ne(e,o);continue}if(l==="/"&&e[o+1]==="*"){o=se(e,o);continue}if(l==="/"&&oe(e,o)){o=ie(e,o),i="value";continue}if(l==='"'||l==="'"){o=re(e,o),i="value";continue}if(l==="`"){let u=o+1;for(;u<e.length;){if(e[u]==="\\"){u+=2;continue}if(e[u]==="`"){u++;break}if(e[u]==="$"&&e[u+1]==="{"){let p=1,b=u+=2;for(;u<e.length&&p>0;)e[u]==="{"?p++:e[u]==="}"&&p--,u++;let M=Mt(e.slice(b,u-1));if(M===null)return null;M.forEach(H=>t.add(H));continue}u++}o=u,i="value";continue}if(/\d/.test(l)&&i!=="."&&i!=="?."){let u=Vr.exec(e.slice(o));o+=u?u[0].length:1,i="value";continue}if(Gr(l)){let u=o;for(;u<e.length&&/[\w$]/.test(e[u]);)u++;let p=e.slice(o,u);if(o=u,Br.has(p))return null;if(i==="."||i==="?."){i="value";continue}if(Fr.has(p)){i=p==="this"?"value":"op";continue}if(Ur.has(p))return null;let b=o;for(;b<e.length&&/\s/.test(e[b]);)b++;if(e[b]==="(")return null;e[b]===":"&&e[b+1]!==":"&&s[s.length-1]==="{"&&n[n.length-1]===0||t.add(p),i="value";continue}let a=e.slice(o);if(zr.test(a))return null;let c=Kr.exec(a);if(c){(c[0]==="&&"||c[0]==="||"||c[0]==="??")&&(r=!0),i=c[0]==="?."?"?.":"op",o+=c[0].length;continue}if(l==="=")return null;l==="("||l==="["||l==="{"?(s.push(l),n.push(0)):l===")"||l==="]"||l==="}"?(s.pop(),n.length>1&&n.pop()):l==="?"?(n[n.length-1]++,r=!0):l===":"&&n[n.length-1]>0&&n[n.length-1]--,i=l,o++}return r&&t.size>1?null:[...t]},xt=/(?:await\s+)?(?:import\s*\(|(\$importAll)\s*\(\s*\[|(C79|Component79)\s*\.\s*(fetch|fetchAll|importAll)\s*\(\s*(\[)?)/y,Nt=/(["'])([^"'\n\\]+)\1/y,Zr=/^(?:(?:if|for|while|with)\b[\s\S]*\)|[\s\S]*\b(?:else|do))$/,Qr=(e,t)=>{xt.lastIndex=0;let n=xt.exec(e);if(!n)return[];let[,s,r,i,o]=n;if(t.has(s??r??""))return[];let l=s!==void 0||o!==void 0;if(i!==void 0&&i==="fetch"===l)return[];let a=r===void 0?"component":i==="importAll"?"page":"fetch",c=[],u=ce(e,xt.lastIndex);for(;;){Nt.lastIndex=u;let p=Nt.exec(e);if(!p)return c;let b=ce(e,Nt.lastIndex),M=e[b];if(!l)return M===")"||M===","?[{spec:p[2],kind:a}]:[];if(M!==","&&M!=="]"||(c.push({spec:p[2],kind:a}),M==="]"))return c;u=ce(e,b+1)}},kn=e=>{let t=[];for(let o=ce(e,0);o<e.length;o=ce(e,o+1)){let l=vt(e,o);t.push(e.slice(o,l).trim().replace(/^export\s+(?!default\b)/,"")),o=l}let n=o=>{Ke.lastIndex=0;let l=Ke.exec(o);return l?Cn(o.slice(l[0].length)).map(({raw:a})=>{let c=a.trim(),u=Je(c);return u===-1?{target:c,init:""}:{target:c.slice(0,u).trim(),init:c.slice(u+1).trim()}}):null},s=new Set;t.forEach(o=>n(o)?.forEach(({target:l})=>Ve(l).forEach(a=>s.add(a))));let r=[],i=!1;for(let o of t){if(!i){Qe.lastIndex=0;let l=Qe.exec(o);if(l)/^type\s/.test(l[1]??"")||r.push({spec:l[3],kind:"component"});else{let a=n(o);for(let c of a?a.map(({init:u})=>u):[o])r.push(...Qr(c,s))}}i=Zr.test(o)}return r};var le=e=>e.replace(/-(\w)/g,(t,n)=>n.toUpperCase()),tt=e=>e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Xr=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Yr=/<([A-Za-z][\w.-]*)((?:"[^"]*"|'[^']*'|[^>"'])*?)\/>/g,kt=/(<script[\s\S]*?<\/script\s*>|<style[\s\S]*?<\/style\s*>)/gi,Jr=e=>e.split(kt).map((t,n)=>n%2===1?t:t.replace(Yr,(s,r,i)=>Xr.has(r.toLowerCase())?s:`<${r}${i}></${r}>`)).join(""),_n=/<([A-Za-z][\w.-]*)((?:"[^"]*"|'[^']*'|[^>"'])*)>/g,eo=/"[^"]*"|'[^']*'|(^|\s)\.\.\.([A-Za-z_$][\w$.]*)/g,to=e=>e.split(kt).map((t,n)=>n%2===1?t:t.replace(_n,(s,r,i)=>{let o=0,l=i.replace(eo,(a,c,u)=>u===void 0?a:`${c}:props.${o++}="${u}"`);return`<${r}${l}>`})).join(""),no=/"[^"]*"|'[^']*'|(^|\s)(:[\w.$-]+)/g,so=/<\/slot\.([\w.$-]+)(\s*)>/gi,ro=/^slot\./i,oo=e=>ro.test(e)?`slot.${tt(e.slice(5))}`:e,Le=":jq79-component",jn=/^[A-Z]/,io="c79-",De=e=>`${io}${tt(e[0].toLowerCase()+e.slice(1))}`,lo=e=>jn.test(e)?De(e):oo(e),ao=/<\/([A-Z][\w.-]*)(\s*)>/g,co=/\/\s*$/,uo=(e,t)=>{if(!jn.test(e))return t;let n=` ${Le}="${e}"`,s=co.exec(t);return s?`${t.slice(0,s.index)}${n}${s[0]}`:`${t}${n}`},fo=e=>e.split(kt).map((t,n)=>n%2===1?t:t.replace(_n,(s,r,i)=>{let o=i.replace(no,(l,a,c)=>c===void 0?l:`${a}${tt(c)}`);return`<${lo(r)}${uo(r,o)}>`}).replace(so,(s,r,i)=>`</slot.${tt(r)}${i}>`).replace(ao,(s,r,i)=>`</${De(r)}${i}>`)).join(""),Ln=e=>Jr(to(fo(e))),Dn=/^[A-Z][A-Za-z0-9]*$/,At=/{{\s*([\s\S]+?)\s*}}/g,On=new Map,Ot=e=>{let t=On.get(e);if(t)return t;let n=[],s=0;At.lastIndex=0;for(let r=At.exec(e);r;r=At.exec(e))r.index>s&&n.push(e.slice(s,r.index)),n.push({expr:r[1]}),s=r.index+r[0].length;return s<e.length&&n.push(e.slice(s)),On.set(e,n),n},_t=new Set([":class",":value",":checked",":selected",":if",":elseif",":else",":each",":key",":window",":with",":text",":html",":html.allowed",":props"]),Se=e=>_t.has(e)||e.startsWith(":class.")||e.startsWith(":props.")||e===":slot"||e.startsWith(":slot."),In=/^\s*\(?\s*(\w+)\s*(?:,\s*(\w+))?\s*\)?\s+in\s+([\s\S]+)$/,nt=e=>e==="slot"||e.startsWith("slot."),jt=e=>e?le(e):"default",Lt=e=>`${e}
8
+ = $value`,Dt=["$scope","$r"],qn=e=>`with ($scope) { return (${e}
9
+ ); }`,Hn=(e,t)=>{let n=Mt(e);if(n===null)return null;let s=n.filter(i=>!t.includes(i));return`${s.length===0?"":`let $t; ${s.map(i=>`const ${i} = ($t = $scope.${i}) !== undefined ? $t : $r($scope, ${JSON.stringify(i)});`).join(" ")}`} return (${e}
10
+ );`},st=(e,t)=>`${e.join(",")}
11
+ ${t}`,It=e=>`await $mounted();${e}`,Wn=e=>["$scope","$__effect","$__import","$__state",...e],Fn=e=>`return (async () => { with ($scope) { ${e} }
12
+ ;$__state.done = true })()`,Bn=e=>["$__exports","$__default","$__import",...e],Un=e=>`return (async () => { "use strict";
13
13
  ${e}
14
- ;$__exports.done = true })()`,Dn=e=>{let t=e.attrs[":setup"];return t===void 0?null:t.trim()===""?[]:ke(t)},In=(e,t)=>{let n=new Set;return e.forEach(s=>{(_e(s.content)??t(s))?.forEach(({name:i})=>n.add(i))}),n};var qn="__jq79precompiled",Hn="jq79-precompiled",Wn=(e,t)=>`function anonymous(${e.join(",")}
14
+ ;$__exports.done = true })()`,zn=e=>{let t=e.attrs[":setup"];return t===void 0?null:t.trim()===""?[]:je(t)},Kn=(e,t,n=et)=>{let s=new Set;return e.forEach(r=>{(n(r.content)??t(r))?.forEach(({name:o})=>s.add(o))}),s};var Gn="__jq79precompiled",Vn="jq79-precompiled",Zn=(e,t)=>`function anonymous(${e.join(",")}
15
15
  ) {
16
16
  ${t}
17
- }`;var Di={};var Jr="0.7.11",fs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),ps="http://www.w3.org/1999/xhtml",hs=e=>{let t=fs(e),n=e.namespaceURI,s=t[Oe];delete t[Oe];let r=n!==null&&n!==ps;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(i=>{if(i.nodeType===Node.TEXT_NODE){let o=i.textContent??"";return o?[o]:[]}return i.nodeType===Node.ELEMENT_NODE?[hs(i)]:[]})}},st=new Map,nt=new Map,Xt=!1,Ft,Ce=class extends Error{constructor(n,s){super(`${n}. ${s}`);A(this,"reason",n);A(this,"hint",s)}},eo=()=>new Ce("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),to=(e,t)=>{let n=globalThis[qn];if(Array.isArray(n)&&n.length>0)for(let[s,r,i]of n.splice(0))nt.set(et(s,r),i);return nt.size===0?void 0:nt.get(et(e,t))},Yt=(e,t,n="")=>{let s=to(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(Ft!==void 0)return no(e,t,n,Ft);if(Xt)throw eo();return new Function(...e,t+n)},Jt=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},Fn="__jq79built",no=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${Fn} = ${Wn(e,t)}${n}`;let i,o=l=>{i=l.error??new SyntaxError(l.message),l.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let a=r[Fn];if(typeof a=="function")return nt.set(et(e,t),a),a;throw i!==void 0?i:new Ce("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},Un=new Set,so=(e,t)=>{Un.has(e)||(Un.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},jt=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},gs=(e,t)=>{try{return Yt([..._t,...t],Mn(e))}catch(n){return n instanceof Ce&&so(e,n),null}},ro=(e,t)=>{if(!de.scopedNames)return null;let n=kn(e,t);if(n===null)return null;try{return Yt([..._t,...t],n)}catch{return null}},ms=(e,t,n)=>{let s=st.get(e);if(s===void 0){let r=ro(t,n);s=r?{fn:r,scoped:!0}:{fn:gs(t,n),scoped:!1},st.set(e,s)}return s},ys=(e,t)=>`${t.join(",")}|${e}`,oo=(e,t)=>ms(ys(e,t),e,t).fn,io=(e,t,n)=>{let s=gs(t,n);return st.set(e,{fn:s,scoped:!1}),s},ao=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,lo=100,Se=new Map,en=new Set,rt=0,Ut=!1,Bt=new Set,co=()=>{Ut=!1,!(rt>0)&&(Se.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(en.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Se.clear())},Es=()=>{Ut||rt>0||!Se.size||(Ut=!0,queueMicrotask(co))},ws=e=>{rt++;let t=()=>{rt--,Es()};e.then(t,t)},uo=(e,t)=>{if(Bt.has(e))return;Bt.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},Ss=(e,t,n)=>{if(!(n instanceof ReferenceError))return uo(e,n);let s=ao.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let i=`${r}|${e}`;en.has(i)||Se.has(i)||Se.size>=lo||(Se.set(i,{name:r,expr:e,scope:t}),Es())},bs=(e,t,n)=>{let s=n?Object.keys(n):[],r=ys(e,s),{fn:i,scoped:o}=ms(r,e,s);if(!i)return;let a=n?Object.values(n):[];if(!o)return i(t,jt,...a);try{return i(t,jt,...a)}catch(l){if(!(l instanceof ReferenceError))throw l;let c=io(r,e,s);if(!c)throw l;return c(t,jt,...a)}},O=(e,t,n)=>{try{return bs(e,t,n)}catch(s){Ss(e,t,s);return}},Ts=(e,t,n)=>{try{return bs(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;Ss(e,t,s);return}},$s=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(O(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(O(s.expr,t)??"");return n},Rs=(e,t,n,s)=>{let[r,...i]=t.slice(1).split("."),o=new Set(i);e.addEventListener(r,a=>{if(o.has("self")&&a.target!==e)return;o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation();let l=Ts(n,s,{$event:a});typeof l=="function"&&l.call(e,a)},{once:o.has("once"),capture:o.has("capture")})},fo=(e,t,n,s)=>{let[r,...i]=t.slice(1).split("."),o=new Set(i),a=l=>{o.has("prevent")&&l.preventDefault(),o.has("stop")&&l.stopPropagation(),o.has("once")&&e.off(r,a),xe(()=>{let c=Ts(n,s,{$event:l});typeof c=="function"&&c(l)})};e.on(r,a)},tn=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},ft=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},po=e=>{e.forEach(t=>{if(t.first===t.last)return ft(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},ho=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},go=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let i=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=i}},Bn=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},we=null,ot=null,xs=new WeakSet,mo=e=>{let t={memo:we,base:ot};return we=new Map,ot=e,t},yo=e=>{we=e.memo,ot=e.base},Kn=(e,t)=>e.component!==void 0?zn(t,e.component):e.tag.includes("-")?zn(t,e.tag):null,X=e=>e.component??e.tag,zn=(e,t)=>{if(!we)return Bn(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===ot){if(we.has(t))return we.get(t);let r=Bn(s,t);return we.set(t,r),r}if(!xs.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Eo=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},wo=(e,t)=>{let n=Eo(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},Gn=100,Lt=0,Ns=Symbol("jq79.slots"),De=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),So=e=>e==="default"?":slot":`:slot.${e}`,bo=e=>typeof e!="string"||e.trim()!=="",To=e=>{let t={},n=[];e.children.forEach(r=>{let i=typeof r=="object"&&r.tag==="template"?De(r):void 0;if(typeof r=="string"||i===void 0){n.push(r);return}let o=Mt(i.slice(6));if(o in t){console.warn(`jq79: two <template ${So(o)}> in <${X(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[i]||void 0}});let s=n.some(bo);return s&&"default"in t?console.warn(`jq79: <${X(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},$o=(e,t,n)=>{ke(t)?.forEach(({name:s,as:r,default:i})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let a=n[s]?.();return a===void 0&&i!==void 0?O(i,e):a},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Ro=e=>{let t=De(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},xo=(e,t)=>{let n=Object.entries(To(e));if(!n.length)return null;let s={};return n.forEach(([r,i])=>{s[r]=No(i,t)}),s},No=(e,t)=>(n,s,r,i)=>{let o=Object.create(t);$o(o,e.binder,n);let a=o[Fe]??[];Object.defineProperty(o,Fe,{value:[...a,s]});let l=ye(o);return l.ownedBy(s),r.onDispose(()=>l.dispose()),Te(e.nodes,o,l,i)},Po=(e,t,n,s)=>{let r=Mt(e.tag.slice(5)),i=document.createDocumentFragment(),o=document.createComment(e.tag),a=document.createComment(`/${e.tag}`);i.append(o,a);let l=t[Ns]?.[r];if(!l)return i.insertBefore(Te(e.children,t,n,s),a),i;let c={};return Object.entries(e.attrs).forEach(([d,p])=>{if(!(d===Ae||Ee(d)||d.startsWith("@")))if(d.startsWith(":")){let w=p||d.slice(1);c[ae(d.slice(1))]=()=>O(w,t)}else c[ae(d)]=()=>p}),i.insertBefore(l(c,t,n,s),a),i},Ps="data-c79-box",vo=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(je(e));s.setAttribute(Ps,"");let r=t.attrs[Ae];return r!==void 0&&s.setAttribute(Ae,r),n||hi(),s},Vn=new WeakSet,Co=(e,t)=>{if(e.ns===void 0||Vn.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;Vn.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${X(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},Zn=(e,t,n,s,r)=>{let i=vo(e,t,r),o=!(i instanceof DocumentFragment),a=o?null:document.createComment(`/${e}`);o||i.append(document.createComment(e),a);let l=xo(t,n),c={},d={},p=[],w=[],_=!1;Object.entries(t.attrs).forEach(([P,M])=>{if(P!==Ae){if(P===":props"||P.startsWith(":props.")){_=!0,w.push({expr:M});return}if(!Ee(P))if(P.startsWith("@"))p.push([P,M]);else if(P===":model"||P.startsWith(":model.")){let x=P===":model"?"default":ae(P.slice(7));d[x]=M||(P===":model"?"model":x)}else if(P.startsWith(":")){let x=ae(P.slice(1));c[x]=M||x,w.push({name:x,expr:M||x})}else{let x=ae(P),q=JSON.stringify(M);c[x]=q,w.push({name:x,expr:q})}}});let I=P=>P==="default"?":model":`:model.${P}`,z=P=>P==="default"?"model":P,j=new Set;Object.entries(d).forEach(([P,M])=>{let x=z(P);c[x]!==void 0&&console.warn(`jq79: <${X(t)}> binds prop "${x}" through both :${x} and ${I(P)} - ${I(P)} wins`),c[x]=M,oo(kt(M),["$value"])===null&&(j.add(P),console.warn(`jq79: ${I(P)}="${M}" is not assignable - updates from <${X(t)}> will be dropped`))});let b=()=>{let P={};return w.forEach(({name:M,expr:x})=>{if(M!==void 0)P[M]=O(x,n);else{let q=O(x,n);q!==null&&typeof q=="object"&&Object.assign(P,q)}}),Object.entries(d).forEach(([M,x])=>{P[z(M)]=O(x,n)}),P},H=null,D=null,L=null,U=new Set,se=P=>{if(P==null){if(!n[Fs]?.has(e)||U.has("unfilled"))return;U.add("unfilled"),console.error(`jq79: <${X(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}U.has("type")||(U.add("type"),console.error(`jq79: <${X(t)}> is ${typeof P}, not a component - nothing renders here`))};return s.effect(()=>{let P=O(e,n),M=P instanceof le?P:null;if(M||se(P),M===D||(L?.dispose(),L=null,H?.destroy(),H=null,D=M,!M))return;Co(t,M);let x=new le({template:M.template,scripts:M.scripts,styles:M.styles,modules:M.modules,filename:M.filename,siblings:M.siblings,name:M.name});if(l&&(x.slots=l),Object.keys(d).length){let v=new Set;x.modelWriteback=(C,Q)=>{let $=C==null?"default":ae(String(C)),W=d[$];return W===void 0?(v.has($)||(v.add($),console.warn(`jq79: <${X(t)}> has no ${I($)} - bound: ${Object.keys(d).map(I).join(", ")}`)),!1):j.has($)?!1:(xe(()=>O(kt(W),n,{$value:Q})),!0)}}p.forEach(([v,C])=>fo(x,v,C,n));let q=wi(x.scripts);Si(t,e,Object.keys(c),q);let ee=is(xe(b),q),G=document.createDocumentFragment();if(Lt>=Gn){console.error(`jq79: <${X(t)}> is ${Gn} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Lt++;try{(r?x.renderShadow(ee):x.render(ee)).mount(G)}finally{Lt--}let Z=n[ct];Z&&x.holdOwner(Z.owner),a?a.parentNode.insertBefore(G,a):i.appendChild(G);let y=ye(n,!0);if(_){let v=[];y.effect(()=>{let C=is(b(),q),Q=Object.keys(C);v.forEach($=>{$ in C||(x.data[$]=void 0)}),Q.forEach($=>{x.data[$]=C[$]}),v=Q})}else Object.entries(c).forEach(([v,C])=>{q!==null&&!q.has(v)||y.effect(()=>{x.data[v]=O(C,n)})});L=y,H=x}),s.onDispose(()=>{L?.dispose(),H?.destroy()}),i},Ao=(e,t)=>{let n=()=>{let s=O(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let i=n();return i!==null&&Reflect.has(i,r)||Reflect.has(s,r)},get(s,r){let i=n();return i!==null&&Reflect.has(i,r)?i[r]:Reflect.get(s,r)},set(s,r,i){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=i,!0):Reflect.set(s,r,i)}})},he=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(he):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?he(t):[]):[],Mo=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?cn(e):()=>!1,ko=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),vs=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),_o={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},Qn=new Map,Oo=(e,t)=>{let n=`${e} ${t}`,s=Qn.get(n);if(s!==void 0)return s;let r=_o[e],i=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,a]=r;i=new DOMParser().parseFromString(`<${o}><${a} ${t}="x"/></${o}>`,"text/html").querySelector(a)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return Qn.set(n,i),i},Cs=(e,t)=>{let n=e.namespaceURI;if(n===null||n===ps)return t;let s=t.replace(/-/g,"").toLowerCase(),r=Oo(n,s);return r===s?t:r},As=(e,t,n)=>{let s=ko.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},de={cloneSkeletons:!0,scopedNames:!0},jo=new Set([":text",":html",":value",":checked",":selected"]),Lo=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||jo.has(e)?!0:e.startsWith(":")?e===":model"?!1:!Ee(e)&&!e.includes("."):e!==Oe,Ms=e=>{if(e.component||e.tag.includes("-")||Je(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!Lo(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||Ms(t))},ks=(e,t,n)=>{let s=vs(e),r,i=null;for(let p in e.attrs){let w=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:w});else if(p===":class")r=w;else if(p.startsWith(":class."))(i??(i=[])).push([p.slice(7),w]);else if(!Ee(p))if(p.startsWith(":")){let _=p.slice(1);n.push({kind:"attr",path:t,name:Cs(s,_),expr:w||ae(_)})}else s.setAttribute(p,w)}(r!==void 0||i)&&n.push({kind:"class",path:t,classExpr:r,toggles:i,staticClasses:new Set(he(e.attrs.class??""))});let o=e.attrs[":text"],a=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):a!==void 0?n.push({kind:"html",path:t,expr:a}):e.children.forEach((p,w)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,w],parts:Ct(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(ks(p,[...t,w],n))});let l=e.attrs[":value"];l!==void 0&&n.push({kind:"value",path:t,expr:l});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let d=e.attrs[":selected"];return d!==void 0&&n.push({kind:"selected",path:t,expr:d}),s},Do=3,_s=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:_s(n)),0),Xn=new WeakMap,Yn=new WeakSet,Io=e=>{let t=Xn.get(e);if(t!==void 0)return t;if(!Yn.has(e))return Yn.add(e),null;let n=null;if(Ms(e)&&_s(e)>=Do){let s=[];n={skeleton:ks(e,[],s),ops:s}}return Xn.set(e,n),n},qo=(e,t)=>{let n=e;for(let s=0;s<t.length;s++)n=n.childNodes[t[s]];return n},Ho=(e,t,n)=>{let s=e.skeleton.cloneNode(!0);for(let r of e.ops){let i=r.path.length===0?s:qo(s,r.path);if(r.kind==="text"){let o=i,a=r.parts;n.effect(()=>{let l=$s(a,t);o.textContent!==l&&(o.textContent=l)})}else if(r.kind==="event")Rs(i,r.attr,r.expr,t);else if(r.kind==="attr"){let o=i,{name:a,expr:l}=r;n.effect(()=>As(o,a,O(l,t)))}else if(r.kind==="class"){let o=i,{classExpr:a,toggles:l,staticClasses:c}=r,d=[];n.effect(()=>{let p=a!==void 0?he(O(a,t)):[];l?.forEach(([w,_])=>{O(_,t)&&p.push(...he(w))}),d.forEach(w=>{!p.includes(w)&&!c.has(w)&&o.classList.remove(w)}),o.classList.add(...p),d=p})}else if(r.kind==="textContent"){let o=i,{expr:a}=r;n.effect(()=>{let l=String(O(a,t)??"");o.textContent!==l&&(o.textContent=l)})}else if(r.kind==="html"){let o=i,{expr:a}=r;n.effect(()=>{o.innerHTML=ht(String(O(a,t)??""))})}else if(r.kind==="value"){let o=i,{expr:a}=r;n.effect(()=>{let l=String(O(a,t)??"");o.value!==l&&(o.value=l)})}else if(r.kind==="checked"){let o=i,{expr:a}=r;n.effect(()=>{let l=!!O(a,t);o.checked!==l&&(o.checked=l)})}else if(r.kind==="selected"){let o=i,{expr:a}=r;n.effect(()=>{let l=!!O(a,t);o.selected!==l&&(o.selected=l)})}else{let o=r}}return s},nn=(e,t,n,s)=>{let r=e.attrs[":with"],i=r!==void 0?Ao(r,t):t;if(Je(e.tag))return Po(e,i,n,s);if(e.tag==="template"&&De(e)!==void 0)return Ro(e);let o=Kn(e,i);if(o)return Zn(o,e,i,n,s);if(de.cloneSkeletons){let b=Io(e);if(b)return Ho(b,i,n)}let a=vs(e);if(e.component!==void 0&&i[ct]?.count===0)throw wo(e.component,i);let l=e.ns===void 0&&(e.component!==void 0||e.tag.includes("-"));if(l){let b=!1;n.effect(()=>{if(b)return;let H=Kn(e,i);if(!H)return;b=!0;let D=Zn(H,e,i,n,s),L=tn(D);n.onDispose(()=>ft(L)),a.replaceWith(D)})}for(let b in e.attrs){let H=e.attrs[b];if(b.startsWith("@"))Rs(a,b,H,i);else if(b===":model"||b.startsWith(":model."))l||console.warn(`jq79: ${b} on <${X(e)}> does nothing - :model binds component tags only (for now)`);else if(!Ee(b))if(b.startsWith(":"))if(l)a.setAttribute(b,H);else{let D=b.slice(1),L=H||ae(D),U=Cs(a,D);n.effect(()=>As(a,U,O(L,i)))}else a.setAttribute(b,H)}let c=e.attrs[":class"],d=null;for(let b in e.attrs)b.startsWith(":class.")&&(d??(d=[])).push([b.slice(7),e.attrs[b]]);if(c!==void 0||d){let b=new Set(he(e.attrs.class??"")),H=[];n.effect(()=>{let D=c!==void 0?he(O(c,i)):[];d?.forEach(([L,U])=>{O(U,i)&&D.push(...he(L))}),H.forEach(L=>{!D.includes(L)&&!b.has(L)&&a.classList.remove(L)}),a.classList.add(...D),H=D})}let p=e.attrs[":text"],w=e.attrs[":html"],_=e.attrs[":html.allowed"];_!==void 0&&w===void 0&&console.warn("jq79: :html.allowed without :html on the same element does nothing"),p!==void 0?n.effect(()=>{let b=String(O(p,i)??"");a.textContent!==b&&(a.textContent=b)}):w!==void 0?n.effect(()=>{let b=_!==void 0?{allowUrl:Mo(O(_,i))}:void 0;a.innerHTML=ht(String(O(w,i)??""),b)}):a instanceof HTMLTemplateElement?Te(e.children,i,n,s,a.content):Te(e.children,i,n,s,a);let I=e.attrs[":value"];I!==void 0&&n.effect(()=>{let b=String(O(I,i)??"");a.value!==b&&(a.value=b)});let z=e.attrs[":checked"];z!==void 0&&n.effect(()=>{let b=!!O(z,i);a.checked!==b&&(a.checked=b)});let j=e.attrs[":selected"];return j!==void 0&&n.effect(()=>{let b=!!O(j,i);a.selected!==b&&(a.selected=b)}),a},Wo=(e,t,n,s)=>{let r=document.createComment("if"),i=document.createDocumentFragment();i.appendChild(r);let o=null,a=null,l=null;return n.effect(()=>{let c=e.find(p=>p.expr===void 0||O(p.expr,t))??null;if(c===a||(l?.dispose(),o&&ft(o),o=null,a=c,!c))return;l=ye(t);let d=nn(c.node,t,l,s);o=tn(d),r.parentNode.insertBefore(d,r.nextSibling)}),n.onDispose(()=>l?.dispose()),i},Pe=(e,t,n)=>{Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})},Fo=e=>{let t=new Uint8Array(e.length),n=[],s=new Int32Array(e.length).fill(-1);for(let r=0;r<e.length;r++){let i=e[r];if(i<0)continue;let o=0,a=n.length;for(;o<a;){let l=o+a>>1;e[n[l]]<i?o=l+1:a=l}o>0&&(s[r]=n[o-1]),n[o]=r}for(let r=n.length?n[n.length-1]:-1;r!==-1;r=s[r])t[r]=1;return t},Uo=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},Os=(e,t)=>typeof e=="string"?t.some(n=>es(e,n)):Object.values(e.attrs).some(n=>t.some(s=>es(n,s)))||e.children.some(n=>Os(n,t)),js=e=>typeof e!="string"&&(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs||":each"in e.attrs||e.component!==void 0||e.tag.includes("-")||Je(e.tag)||e.children.some(js)),Jn=/[A-Za-z0-9_$]/,Bo=/^[A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*$/,es=(e,t)=>{for(let n=e.indexOf(t);n!==-1;n=e.indexOf(t,n+1)){let s=n===0?"":e[n-1],r=e[n+t.length]??"";if(!Jn.test(s)&&!Jn.test(r))return!0}return!1},Dt=new WeakMap,Ko=e=>{let t=Dt.get(e);if(t!==void 0)return t;let n=e.attrs[":each"].match(An);if(!n)return Dt.set(e,null),null;let[,s,r,i]=n,o=e.attrs[":key"],a=o===s,l=o!==void 0&&!a&&Bo.test(o)&&o.startsWith(`${s}.`)?o.slice(s.length+1):void 0,{[":each"]:c,[":key"]:d,...p}=e.attrs,w={...e,attrs:p},_=["$index",...r?[r]:[]],I=Os(w,_),z=/^[A-Z]/.test(s)||r!==void 0&&/^[A-Z]/.test(r),j=o!==void 0&&js(w),b={itemName:s,atName:r,listExpr:i,keyExpr:o,keyIsItem:a,keyProp:l,itemNode:w,readsPosition:I,namesComponent:z,nestsScopes:j};return Dt.set(e,b),b},zo=(e,t,n,s)=>{let r=Ko(e);if(!r)return document.createComment(`invalid :each expression "${e.attrs[":each"]}"`);let{itemName:i,atName:o,listExpr:a,keyExpr:l,keyIsItem:c,keyProp:d,itemNode:p,readsPosition:w,namesComponent:_,nestsScopes:I}=r,z=document.createComment("each"),j=document.createDocumentFragment();j.appendChild(z),(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs)&&console.warn("jq79: :if/:elseif/:else on a :each element is ignored; filter the list expression instead");let b=[],H=!1;return n.effect(()=>{let D=mo(t);try{let L=O(a,t),U=Array.isArray(L),se=U?null:Uo(L)?Object.keys(L):[],P=U?L.length:se.length,M=new Map;b.forEach(($,W)=>{$.pos=W;let B=M.get($.key);B?B.push($):M.set($.key,[$])});let x=new Set,q=[],ee=[],G=[],Z=[],y;for(let $=0;$<P;$++){let W=U?$:se[$],B=U?L[$]:L[W],f=W;c?f=B:d!==void 0&&B!==null&&typeof B=="object"?f=B[d]:l!==void 0&&(y===void 0?(y=Object.create(t),Pe(y,i,B),o&&Pe(y,o,W),Pe(y,"$index",$)):(y[i]=B,o&&(y[o]=W),y.$index=$),f=O(l,y)),x.has(f)&&!H&&(H=!0,console.warn(`jq79: duplicate :key in :each "${e.attrs[":each"]}"; duplicates pair up by position`)),x.add(f);let u=M.get(f)?.shift();if(u&&Object.is(u.item,B)){let g=u.scope;g.$index!==$&&(w&&q.push(u),g.$index=$),o&&g[o]!==W&&(g[o]=W),G.push(u),Z.push(u.pos);continue}if(u&&l!==void 0){let g=u.scope;g[i]=B,g.$index!==$&&(g.$index=$),o&&g[o]!==W&&(g[o]=W),u.item=B,ee.push(u),G.push(u),Z.push(u.pos);continue}u&&(u.fx.dispose(),ft(u.range));let m=Object.create(t);Pe(m,i,B),o&&Pe(m,o,W),Pe(m,"$index",$),_||xs.add(m);let h=ye(t);I&&Object.defineProperty(m,St,{value:h});let S=tn(nn(p,m,h,s));G.push({key:f,item:B,scope:m,fx:h,range:S,pos:$}),Z.push(-1)}let v=new Set;M.forEach($=>$.forEach(W=>v.add(W))),v.size&&(v.forEach($=>{$.dead=!0,$.fx.dispose()}),po(ho(b,$=>$.dead===!0)));let C=z,Q=Fo(Z);G.forEach(($,W)=>{!Q[W]&&C.nextSibling!==$.range.first&&go($.range,C),C=$.range.last}),q.forEach($=>xe(()=>$.fx.refresh())),ee.forEach($=>xe(()=>$.fx.rerun())),b=G}finally{yo(D)}}),n.onDispose(()=>b.forEach(D=>D.fx.dispose())),j},Ls=(e,t)=>{let n=t;for(;n<e.length&&typeof e[n]=="string"&&!e[n].trim();)n++;return n},It=e=>{let t=":if"in e.attrs,n=":elseif"in e.attrs,s=":else"in e.attrs;if((t?1:0)+(n?1:0)+(s?1:0)<2)return;let r=[t?":if":null,n?":elseif":null,s?":else":null].filter(Boolean);console.warn(`jq79: ${r.join(" and ")} on the same <${X(e)}> - only ${r[0]} applies; the branches of a chain are sibling elements, one directive each`)},Go=(e,t)=>{let n=":elseif"in e.attrs?":elseif":":else";console.warn(t?`jq79: a second ${n} on <${X(e)}> - the chain before it already ended with :else, which closes it. One :if, any number of :elseif, at most one :else`:`jq79: ${n} on <${X(e)}> continues no :if - it renders unconditionally. A chain is :if, then :elseif, then :else, on adjacent siblings: anything but whitespace between them breaks it`)},Vo=[":if",":elseif",":else",":each"],Zo=(e,t)=>{if(e.tag!=="template"||e.ns!==void 0)return;let n=Vo.find(s=>s in e.attrs);if(n!==void 0){if(De(e)!==void 0){if(t?.component===void 0)return;console.warn(`jq79: ${n} on <template ${De(e)}> is ignored - a slot is filled with its children as written. Put ${n} on the elements inside it, or on the component's tag`);return}console.warn(`jq79: ${n} on a nested <template> shows nothing - a <template>'s children live in its .content and never reach the page. Put ${n} on the elements themselves`)}},Qo=[...At,":model",":slot"].map(e=>e.slice(1)),Xo={":attrs":':attrs was removed in 0.7 - it now binds an attribute called "attrs". Bind them one at a time (:disabled="x", :title="y"), or :class for classes'},Yo=e=>{for(let t in e.attrs){let n=Xo[t];n!==void 0&&console.warn(`jq79: ${n}`)}},Jo=e=>{if(!(e.component!==void 0||e.tag.includes("-")))for(let t in e.attrs){if(!t.startsWith(":")||Ee(t)||t===":model"||t.startsWith(":model."))continue;let n=t.slice(1);if(n.includes(".")){console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". Dotted modifiers belong to an event: if you meant @${n}, that is the spelling`);continue}let s=Qo.find(r=>n!==r&&n.startsWith(r));s!==void 0&&console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". A ":name" jq79 does not recognize binds that attribute (which is what :src and :disabled are). If you meant :${s}, that is the spelling`)}},Ds=(e,t)=>{e.forEach(s=>{typeof s!="string"&&(Zo(s,t),Yo(s),Jo(s),Ds(s.children,s))});let n=!1;for(let s=0;s<e.length;){let r=e[s];if(typeof r=="string"){r.trim()&&(n=!1),s++;continue}if(":each"in r.attrs){n=!1,s++;continue}if(It(r),":if"in r.attrs){s++;let i=a=>{let l=Ls(e,s),c=e[l];if(typeof c=="object"&&a in c.attrs)return s=l+1,c};for(let a=i(":elseif");a;a=i(":elseif"))It(a);let o=i(":else");o&&It(o),n=o!==void 0;continue}(":elseif"in r.attrs||":else"in r.attrs)&&Go(r,n),n=!1,s++}},ts=new WeakMap,ei=(e,t,n)=>{let s=ts.get(t);if(s)return s;let r=[{expr:t.attrs[":if"],node:t}],i=n+1,o=c=>{let d=Ls(e,i),p=e[d];if(typeof p=="object"&&c in p.attrs)return i=d+1,p};for(let c=o(":elseif");c;c=o(":elseif"))r.push({expr:c.attrs[":elseif"],node:c});let a=o(":else");a&&r.push({node:a});let l={branches:r,next:i};return ts.set(t,l),l},Te=(e,t,n,s=!1,r)=>{let i=r??document.createDocumentFragment(),o=0;for(;o<e.length;){let a=e[o];if(typeof a=="string"){let l=document.createTextNode(a);if(a.includes("{{")){let c=Ct(a);n.effect(()=>{let d=$s(c,t);l.textContent!==d&&(l.textContent=d)})}i.appendChild(l),o++;continue}if(":each"in a.attrs){i.appendChild(zo(a,t,n,s)),o++;continue}if(":if"in a.attrs){let l=ei(e,a,o);i.appendChild(Wo(l.branches,t,n,s)),o=l.next;continue}i.appendChild(nn(a,t,n,s)),o++}return i},ti=(e,t,n=!1)=>Te(e.template,t,ye(t),n),Ae="data-jq79",ni=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0).toString(36)},Is=(e,t)=>{e.forEach(n=>{typeof n!="string"&&(n.attrs[Ae]=t,Is(n.children,t))})},si=(e,t)=>e.split(",").map(n=>{let s=n.trim(),r=s.indexOf("::"),i=r===-1?s:s.slice(0,r),o=r===-1?"":s.slice(r);return`${i}[${Ae}="${t}"]${o}`}).join(", "),qs=(e,t)=>{Array.from(e).forEach(n=>{n instanceof CSSStyleRule?n.selectorText=si(n.selectorText,t):n instanceof CSSGroupingRule&&qs(n.cssRules,t)})},ri=/(^|[\s>+~,(])([A-Z][A-Za-z0-9]*)(?![\w-])/g,oi=/[a-z]/,ii=e=>e.replace(ri,(t,n,s)=>oi.test(s)?`${n}${je(s)}`:t),ai=/^\s*@(media|supports|container|layer|scope|document)\b/i,li=/^\s*@/,ci=e=>{let t="",n="",s="",r=[],i=()=>r.length===0||r[r.length-1],o=()=>{t+=i()&&!li.test(s)?ii(n):n,n=""},a=c=>{o(),t+=c,s+=c},l=(c,d)=>{o(),t+=c,s="",d!==void 0?r.push(d):c==="}"&&r.pop()};for(let c=0;c<e.length;){let d=e[c];if(d==="/"&&e[c+1]==="*"){let p=e.indexOf("*/",c+2),w=p===-1?e.length:p+2;a(e.slice(c,w)),c=w}else if(d==='"'||d==="'"){let p=c+1;for(;p<e.length&&e[p]!==d;)p+=e[p]==="\\"?2:1;a(e.slice(c,Math.min(p+1,e.length))),c=p+1}else d==="{"?(l("{",ai.test(s)),c++):d==="}"||d===";"?(l(d),c++):(n+=d,s+=d,c++)}return o(),t},di=(e,t)=>{/:deep\(|::v-deep|>>>/.test(e)&&console.warn("jq79: :deep()/::v-deep/>>> are not supported in <style scoped>; the rule will be dropped by the browser");let n=new CSSStyleSheet;return n.replaceSync(e),qs(n.cssRules,t),Array.from(n.cssRules).map(s=>s.cssText).join(`
18
- `)},Kt=e=>{let t=vn(e),s=new DOMParser().parseFromString(`<template>${t}</template>`,"text/html").querySelector("template"),r=[],i=[];Array.from(s.content.children).forEach(l=>{l.tagName==="TEMPLATE"?i.push(l):r.push(l)});let o=ns(r,e),a={};return i.forEach(l=>{let c=l.getAttribute("name");if(c===null){console.warn("jq79: a top-level <template> without a name declares nothing and was ignored");return}if(!Cn.test(c)){console.warn(`jq79: <template name="${c}"> was ignored - a component name has to be PascalCase, or no tag could ever reference it (only capitalized names resolve as components)`);return}if(c in a){console.warn(`jq79: two <template name="${c}"> in one file; the second was ignored`);return}a[c]=new le({...ns(Array.from(l.content.children),l.innerHTML),siblings:a,name:c})}),Object.keys(a).length&&(o.siblings=a),o},ui=/^(?:text|application)\/(?:x-)?typescript$/i,fi=e=>"lang"in e?`lang="${e.lang}"`:ui.test(e.type?.trim()??"")?`type="${e.type}"`:null,ns=(e,t)=>{let n=[],s=[],r=[];e.forEach(o=>{let a={attrs:fs(o),content:o.textContent??""};o.tagName==="SCRIPT"?n.push(a):o.tagName==="STYLE"?s.push(a):r.push(hs(o))}),n.forEach(o=>{let a=fi(o.attrs);a&&console.warn(`jq79: <script ${a}> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its types were never stripped: the script will throw, or - for a plain \`let x: T = ...\` - silently fail to declare x.`)}),s.forEach(o=>{"lang"in o.attrs&&console.warn(`jq79: <style lang="${o.attrs.lang}"> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its styles were left uncompiled and the browser will ignore them.`)}),s.forEach(o=>{"lang"in o.attrs||(o.content=ci(o.content))});let i=o=>"scoped"in o.attrs&&!("lang"in o.attrs);if(s.some(i)){let o=ni(t);Is(r,o),s.forEach(a=>{i(a)&&(a.scoped=di(a.content,o))})}return Ds(r),{template:r,scripts:n,styles:s}},Hs=/\.html?([?#]|$)/,it=e=>Hs.test(e)?Qt(e):import(e),sn=/^(?:\.\.?\/|\/|[a-z][a-z0-9+.-]*:)/i,zt=(e,t)=>{if(!sn.test(e))return e;try{return new URL(e,new URL(t??"",document.baseURI)).href}catch{return e}},pi=(e,t)=>e?`
19
- //# sourceURL=${e}?jq79-script=${t}`:"",Ws=(e,t,n)=>{try{return Yt(e,t,pi(n.filename,n.index??0))}catch(s){throw s instanceof Ce?new Error(`jq79: safeEval() is on, and script ${n.index??0} of ${n.filename??"a component built from a string"} ${s.reason}. ${s.hint}`):s}},ss=e=>e.scoped??e.content,Le=`:where([${Ps}]) { display: contents }`,rn=()=>Xt&&typeof Document<"u"&&"adoptedStyleSheets"in Document.prototype,at=e=>{let t=new CSSStyleSheet;return t.replaceSync(e),t},on=(e,t)=>{e.adoptedStyleSheets.includes(t)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])},Gt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(n=>n!==t)},tt=null,Vt=null,hi=()=>{if(rn()){on(document,Vt??(Vt=at(Le)));return}tt?.isConnected||(tt=document.createElement("style"),tt.textContent=Le,document.head.appendChild(tt))},lt=new Map,gi=e=>{let t=lt.get(e);if(!t){if(rn()){let n=at(e);on(document,n),t={sheet:n,count:0}}else{let n=document.createElement("style");n.textContent=e,document.head.appendChild(n),t={el:n,count:0}}lt.set(e,t)}t.count++},mi=e=>{let t=lt.get(e);t&&--t.count<=0&&(t.sheet?Gt(document,t.sheet):t.el?.remove(),lt.delete(e))},yi=(e,t,n,s={},r=it,i={})=>{let o={...Qs,...s},a=new Proxy(t,{has:(d,p)=>p!=="$__effect"&&p!=="$__import"&&p!=="$__state"&&(Reflect.has(d,p)||!(p in globalThis)&&!(p in o))}),l={},c=Ws(_n(Object.keys(o)),On(e),i)(a,n,r,l,...Object.values(o));return c.catch(d=>console.error("jq79: error in :setup script",d)),ws(c),{settled:c,sync:l.done===!0}},rs=(e,t)=>{t?.forEach(({name:n,default:s})=>{e[n]===void 0&&(e[n]=s===void 0?void 0:O(s,e))})},Zt=e=>{let t=Dn(e);return!t&&e.attrs[":setup"]!==void 0&&Ei(e,e.attrs[":setup"]),t},os=new WeakSet,Ei=(e,t)=>{t.trim()==="_"||os.has(e)||(os.add(e),console.warn(`jq79: :setup="${t}" is not a props pattern, so this component declares no signature and takes whatever a parent passes - write the props it takes ("{ a, b }"), a bare :setup for none, or "_" to stay open on purpose`))},wi=e=>{let t=null;return e.forEach(n=>{let s=_e(n.content)??Zt(n);if(!s)return;let r=t??(t=new Set);s.forEach(({name:i})=>r.add(i))}),t},is=(e,t)=>{if(t===null)return e;let n={};return Object.keys(e).forEach(s=>{t.has(s)&&(n[s]=e[s])}),n},as=new WeakMap,Si=(e,t,n,s)=>{if(s===null)return;let r=as.get(e)??new Set;as.set(e,r),n.forEach(i=>{s.has(i)||r.has(i)||(r.add(i),console.warn(`jq79: :${i} is not declared by <${t}> - add it to the :setup signature, or drop it`))})},bi=(e,t)=>{if(!e)return null;let n=Object.create(null),s=!1;return Object.entries(e).forEach(([r,i])=>{t.has(r)||(n[r]=i,s=!0)}),s?n:null},Fs=Symbol("jq79.unfilledProps"),ct=Symbol("jq79.pendingScripts"),Ti=e=>e&&e.default!==void 0?e.default:e,$i=(e,t,n,s={},r=it,i={})=>{let o={...Qs,...s},a={},l=Ws(jn(Object.keys(o)),Ln(e),i)(a,Ti,r,...Object.values(o)),c=I=>console.error("jq79: error in factory script",I),d=!1,p,w=()=>{if(d)return p;d=!0;let I=a.default;if(typeof I!="function")return;let z=j=>{j&&typeof j=="object"&&Object.assign(t,j)};try{let j=I(t,{$data:t,$props:t,$effect:n,...s});j instanceof Promise?p=j.then(z).catch(c):z(j)}catch(j){c(j)}return p},_=l.then(w,c);return ws(_),a.done&&w(),{settled:_,sync:a.done===!0&&p===void 0}},Ri="__JQ79_HMR_ENABLED__",xi="__JQ79_HMR__",be=null,Ni=e=>{if(!be||!e.filename)return;let t=be.get(e.filename);t||be.set(e.filename,t=new Set),t.add(new WeakRef(e))},qt=e=>{try{return new URL(e,document.baseURI).pathname}catch{return e}},Us=(e,t)=>{if(!be)return 0;let n=qt(e),s=Kt(t);J?.forEach((a,l)=>{qt(l)===n&&J.set(l,Promise.resolve(t))});let r=!1,i=a=>a.name===void 0?s:s.siblings?.[a.name]??null,o=0;for(let[a,l]of be)if(qt(a)===n){for(let c of l){let d=c.deref();if(!d){l.delete(c);continue}let p=i(d);if(!p){r=!0;continue}d.hotReplace(p)&&o++}l.size||be.delete(a)}return r?0:o},Bs=()=>{be??(be=new Map),globalThis[xi]={update:Us}},ls=3e3,Pi=(e,t)=>{let n=setTimeout(()=>{console.warn(`jq79: ${e.name?`<${e.name}>`:"a component"}${e.filename?` (${e.filename})`:""} has been waiting ${ls/1e3}s for a :setup script and has rendered nothing. The template waits until every script returns or calls $mounted() - add an await $mounted() above the slow part to render first and fill in after.`)},ls);n?.unref?.(),Promise.all(t).then(()=>clearTimeout(n))},Ks=e=>{if(sn.test(e))return e;let t=Di.resolve;if(typeof t!="function")return e;try{return t(e)}catch{return e}},J=new Map,zs=e=>{try{return new URL(e,document.baseURI).href.replace(/#.*$/,"")}catch{return e}},cs=e=>Promise.all([fetch(e).then(t=>{if(!t.ok)throw new Error(`failed to fetch component from ${e}: ${t.status}`);return t.text()}),Zs?.then(()=>Oi(e))]).then(([t])=>t),Gs=e=>{if(!J)return cs(e);let t=zs(e),n=J.get(t);if(!n){n=cs(e),J.set(t,n);let s=n;s.catch(()=>{J?.get(t)===s&&J.delete(t)})}return n},Qt=async e=>{let t=Ks(e),n=await Gs(t);return new le(n,{filename:t})},ds=new WeakSet,us=new Set,vi=e=>{if(us.has(e))return;us.add(e);let t=document.createElement("link");t.rel="modulepreload";let n=Jt();n&&t.setAttribute("nonce",n),t.href=e,document.head.append(t)},Ci=/<script\b(?:"[^"]*"|'[^']*'|[^>"'])*>([\s\S]*?)<\/script\s*>/gi,dt=new Set,Vs=(e,t,n)=>{for(let{spec:s,kind:r}of Rn(e)){if(r==="component"&&n&&s in n)continue;let i=Ks(r==="fetch"?s:zt(s,r==="component"?t:void 0));r==="fetch"||Hs.test(i)?J&&Gs(i).then(o=>Ai(o,i),()=>{}):sn.test(i)&&vi(i)}},Ai=(e,t)=>{let n=zs(t);if(!dt.has(n)){dt.add(n);for(let[,s]of e.matchAll(Ci))Vs(s,t,void 0)}},Mi=(e,t,n)=>{for(let s of e)ds.has(s)||(ds.add(s),Vs(s.content,t,n))},Zs,ki="/jq79-sw.js",_i=async e=>{let t=typeof navigator>"u"?void 0:navigator.serviceWorker;if(!t)throw new Error("jq79: safeEval() compiles components in a service worker, and this page can't have one - service workers need https (or localhost). Precompile with the jq79/vite plugin instead, or use safeEval({ nonce: true }) on a page whose server issues a nonce.");let n;try{n=await t.register(e)}catch(s){throw new Error(`jq79: safeEval() couldn't register its service worker at ${e} (${s.message}). Serve jq79-sw.js from the jq79 package at your site's root, or pass its URL: safeEval({ worker: "/path/jq79-sw.js" }).`)}await t.ready,!t.controller&&await new Promise(s=>{t.addEventListener("controllerchange",()=>s(),{once:!0}),t.controller?s():n.active?.postMessage("jq79:claim")})},Oi=e=>{let t=new URL(e,document.baseURI);return t.hash="",t.searchParams.set(Hn,""),new Promise((n,s)=>{let r=document.createElement("script"),i=Jt();i&&r.setAttribute("nonce",i),r.src=t.href,r.onload=()=>{r.remove(),n()},r.onerror=()=>{r.remove(),s(new Error(`jq79: the precompiled functions of ${e} did not load, and safeEval() can't render it without them`))},document.head.append(r)})},ue=class ue{constructor(t,n={}){A(this,"template");A(this,"scripts");A(this,"styles");A(this,"modules");A(this,"filename");A(this,"siblings");A(this,"name");A(this,"slots");A(this,"modelWriteback");A(this,"data",null);A(this,"fx",null);A(this,"content",null);A(this,"startMarker",null);A(this,"endMarker",null);A(this,"styleEls",[]);A(this,"shadowCss",null);A(this,"shadowSheets",[]);A(this,"sheetRoot",null);A(this,"ownsSharedStyles",!1);A(this,"useShadow",!1);A(this,"mountRoot",null);A(this,"resolveMounted",null);A(this,"renderDone",!1);A(this,"held",0);A(this,"onPaint",null);A(this,"destroyHooks",null);A(this,"attachHooks",null);A(this,"detachHooks",null);A(this,"onPage",!1);A(this,"emitListeners",new Map);let s=typeof t=="string"?Kt(t):t;this.template=s.template,this.scripts=s.scripts,this.styles=s.styles,this.modules=n.modules??(typeof t=="string"?void 0:t.modules),this.filename=n.filename??(typeof t=="string"?void 0:t.filename),this.siblings=s.siblings,this.name=s.name,this.adoptSiblings(),Ni(this)}adoptSiblings(){this.siblings&&Object.entries(this.siblings).forEach(([t,n])=>{n.filename??(n.filename=this.filename),n.modules??(n.modules=this.modules),this.name||(this[t]=n)})}hotReplace(t){let n=typeof t=="string"?Kt(t):t;en.clear(),Se.clear(),Bt.clear();let s=this.startMarker,r=!!(s&&this.content),i=r&&s.isConnected,o=i?s.parentNode:null,a=i?this.endMarker.nextSibling:null,l={...this.data},c=this.useShadow;return r&&this.destroy(),this.template=n.template,this.scripts=n.scripts,this.styles=n.styles,this.siblings=n.siblings,this.adoptSiblings(),!r||(this.renderWith(l,c),!o)?!1:(c&&this.placeShadowStyles(o,a),o.insertBefore(this.content,a),this.mountRoot=o,this.settleMounted(),!0)}static debug(t){if(t){let n=de.scopedNames;for(let s in t){let r=t[s];Object.prototype.hasOwnProperty.call(de,s)?typeof r=="boolean"?de[s]=r:console.warn(`jq79: Component79.debug ignored "${s}" - the flags are booleans, and the ones it knows are: ${Object.keys(de).join(", ")}`):console.warn(`jq79: Component79.debug does not know "${s}" - the flags it has are: ${Object.keys(de).join(", ")}`)}de.scopedNames!==n&&st.clear()}return{...de}}static safeEval(t={}){Xt=!0;let n=[];if(t.nonce){let r=Jt();r===void 0?n.push(Promise.reject(new Error("jq79: safeEval({ nonce: true }) found no nonce on this page - no <script> carries one. The nonce belongs on the script that loads the page, the one the CSP names."))):Ft=r}let s=t.worker??(t.nonce?!1:ki);return s!==!1&&n.push(Zs??(Zs=_i(s))),Promise.all(n).then(()=>{})}static cache(t){return t===!1?(J=null,dt.clear()):t===!0&&(J??(J=new Map)),!!J}static clearCache(){J?.clear(),dt.clear()}static fetch(t){if(Array.isArray(t))throw new TypeError("Component79.fetch takes one URL; use fetchAll for an array");return new ut(Qt(t))}static fetchAll(t){return Promise.all(t.map(Qt))}static importAll(t){if(!Array.isArray(t))throw new TypeError("Component79.importAll takes an array; use import() for one");return Promise.all(t.map(n=>it(zt(n,void 0))))}on(t,n){return this.emitListeners.has(t)||this.emitListeners.set(t,new Set),this.emitListeners.get(t).add(n),this}off(t,n){return this.emitListeners.get(t)?.delete(n),this}render(t={}){return this.renderWith(t,!1)}renderShadow(t={}){return this.renderWith(t,!0)}renderWith(t,n){this.destroy();let s=In(this.scripts,Zt),r=bi(this.siblings,s),i=r?Object.assign(Object.create(r),t):{...t},o=new Set([...s].filter(y=>!(y in t)));o.size&&Object.defineProperty(i,Fs,{value:o}),this.slots&&Object.defineProperty(i,Ns,{value:this.slots}),Object.defineProperty(i,ct,{value:{count:0,owner:this}});let a=Ne(i),l=ye(a);this.data=a,this.fx=l,this.useShadow=n,this.startMarker=document.createComment("jq79"),this.endMarker=document.createComment("/jq79");let c=this.startMarker,d=!1,p=(y,v)=>{y==="model:update"&&!d&&(d=!0,console.warn("jq79: $emit('model:update', \u2026) no longer feeds :model - call $updateModel(value) or $updateModel(name, value) instead"));let C=new CustomEvent(y,{detail:v,bubbles:!0,composed:!0,cancelable:!0});return c===this.startMarker&&this.emitListeners.get(y)?.forEach(Q=>Q(C,v)),C.cancelBubble||c.dispatchEvent(C),!C.defaultPrevented},w,_=new Promise(y=>{w=y});this.resolveMounted=w,this.renderDone=!1,this.held=0;let I=y=>{if(typeof y!="function")throw new TypeError("jq79: $destroyed expects a function");return c!==this.startMarker?(ve(y,"$destroyed"),()=>{}):Ht(this.destroyHooks??(this.destroyHooks=[]),y)},z=(y,{immediate:v=!0}={})=>{if(typeof y!="function")throw new TypeError("jq79: $attached expects a function");if(c!==this.startMarker)return()=>{};this.watchPage();let C=Ht(this.attachHooks??(this.attachHooks=[]),y);return v&&this.onPage&&ve(y,"$attached"),C},j=y=>{if(typeof y!="function")throw new TypeError("jq79: $detached expects a function");return c!==this.startMarker?(ve(y,"$detached"),()=>{}):(this.watchPage(),Ht(this.detachHooks??(this.detachHooks=[]),y))},b=y=>{let v=Ue(y);return I(()=>v.$dispose()),v},H=this.endMarker,D=(y=>{let v=[];for(let C=c.nextSibling;C&&C!==H;C=C.nextSibling)C instanceof Element&&(C.matches(y)&&v.push(C),v.push(...Array.from(C.querySelectorAll(y))));return v}),L=(y=>D(y)[0]??null),U=this.modules,se=y=>U&&y in U?Promise.resolve(U[y]):it(zt(y,this.filename)),P=y=>{if(!Array.isArray(y))throw new TypeError("$importAll takes an array; use import() for one");return Promise.all(y.map(se))},x=Object.assign(Object.create(null),{$emit:p,$updateModel:(...y)=>{let[v,C]=y.length>1?y:[void 0,y[0]];return c!==this.startMarker?!1:this.modelWriteback?.(v,C)??!1},$slots:Object.fromEntries(Object.keys(this.slots??{}).map(y=>[y,!0]))}),q=[],ee=!0;Mi(this.scripts,this.filename,this.modules),this.scripts.forEach((y,v)=>{let C;q.push(new Promise(S=>{C=S}));let Q=!1,$=()=>{Q=!0,C()},B={$mounted:()=>($(),_),$destroyed:I,$attached:z,$detached:j,$computed:b,$self:L,$$self:D,...x,$importAll:P,...r},f={filename:this.filename,index:v},u=":mounted"in y.attrs,m=$n(y.content),h=(()=>{if(m!==null){u&&console.warn("jq79: :mounted on a factory script renders the template before the factory has returned, so none of its bindings exist yet - await $mounted() inside the factory instead."),rs(a,_e(y.content));let T=u?Ot(m):m;return $i(T,a,R=>l.effect(R),B,se,f)}let{vars:S,code:g}=Qe(y.content);rs(a,Zt(y)),S.forEach(T=>{T in a||(a[T]=void 0)});let E=u?Ot(g):g;return yi(E,a,T=>l.effect(T),B,se,f)})();if(h.sync)h.settled.then($,$);else{let S=i[ct];S.count++;let g=()=>{S.count--,$()};h.settled.then(g,g)}!h.sync&&!Q&&(ee=!1)});let G=document.createDocumentFragment(),Z=new Proxy(a,{has:(y,v)=>typeof v=="string"&&v in x||Reflect.has(y,v),get:(y,v,C)=>typeof v=="string"&&v in x&&!Reflect.has(y,v)?x[v]:Reflect.get(y,v,C)});if(G.append(this.startMarker,this.endMarker),this.content=G,ee?(this.endMarker.parentNode.insertBefore(Te(this.template,Z,l,n),this.endMarker),this.renderDone=!0,this.settleMounted()):(Promise.all(q).then(()=>{c===this.startMarker&&(this.endMarker.parentNode.insertBefore(Te(this.template,Z,l,n),this.endMarker),this.renderDone=!0,this.settleMounted(),ue.settleAttached())}),Pi(this,q)),n)if(rn())this.shadowCss=[...this.styles.map(y=>y.content),Le];else{let y=document.createElement("style");y.textContent=Le,this.styleEls=[...this.styles.map(v=>{let C=document.createElement("style");return C.textContent=v.content,C}),y]}else this.styles.forEach(y=>gi(ss(y))),this.ownsSharedStyles=!0;return this}mount(t,n){let s=typeof t=="string"?$e(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0)&&this.renderWith(n??{},this.useShadow),this.attach(s)}mountShadow(t,n){let s=typeof t=="string"?$e(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0||!this.useShadow)&&this.renderWith(n??{},!0),this.attach(s)}attach(t){this.mountRoot&&this.detach();let n=this.useShadow&&t instanceof Element?t.shadowRoot??t.attachShadow({mode:"open"}):t;return this.useShadow&&this.placeShadowStyles(n,null),n.appendChild(this.content),this.mountRoot=n,this.settleMounted(),ue.settleAttached(),this}isOnPage(){return this.renderDone&&this.startMarker?.isConnected===!0}watchPage(){pe.has(this)||(pe.add(this),this.onPage=this.isOnPage(),this.onPage||ue.queueSettle())}static queueSettle(){Wt||(Wt=!0,queueMicrotask(()=>{Wt=!1,ue.settleAttached()}))}static settleAttached(){if(pe.size===0)return;let t=[...pe].filter(n=>!n.onPage&&n.isOnPage());ue.inDocumentOrder(t).forEach(n=>{n.onPage||!pe.has(n)||(n.onPage=!0,n.attachHooks?.slice().forEach(s=>ve(s,"$attached")))})}notifyDetached(){if(pe.size===0)return;let t=[];if(this.startMarker?.isConnected){let n=new Set;for(let r=this.startMarker;r&&(n.add(r),r!==this.endMarker);r=r.nextSibling);let s=r=>{for(;r;r=r.parentNode)if(n.has(r))return!0;return!1};t=ue.inDocumentOrder([...pe].filter(r=>r.onPage&&s(r.startMarker)))}else this.onPage&&(t=[this]);t.forEach(n=>{n.onPage&&(n.onPage=!1,n.detachHooks?.slice().forEach(s=>ve(s,"$detached")))})}static inDocumentOrder(t){return t.sort((n,s)=>n.startMarker.compareDocumentPosition(s.startMarker)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}placeShadowStyles(t,n){if(this.shadowCss&&typeof ShadowRoot<"u"&&t instanceof ShadowRoot){this.sheetRoot&&this.sheetRoot!==t&&this.shadowSheets.forEach(s=>Gt(this.sheetRoot,s)),this.shadowSheets.length===0&&(this.shadowSheets=this.shadowCss.map(s=>s===Le?Vt??(Vt=at(s)):at(s))),this.shadowSheets.forEach(s=>on(t,s)),this.sheetRoot=t;return}this.shadowCss&&this.styleEls.length===0&&(this.styleEls=this.shadowCss.map(s=>{let r=document.createElement("style");return r.textContent=s,r})),this.styleEls.forEach(s=>t.insertBefore(s,n))}settleMounted(){if(!this.renderDone||this.held>0)return;let t=this.onPaint;this.onPaint=null,t?.(),this.mountRoot&&this.resolveMounted?.()}holdOwner(t){this.renderDone&&this.held===0||(t.held++,this.onPaint=()=>{t.held--,t.settleMounted()})}detach(){if(!this.mountRoot||!this.content||!this.startMarker||!this.endMarker)return this;this.notifyDetached();let t=this.startMarker;for(;t;){let n=t.nextSibling;if(this.content.appendChild(t),t===this.endMarker)break;t=n}return this.mountRoot=null,this}destroy(){this.notifyDetached(),pe.delete(this),this.attachHooks=null,this.detachHooks=null,this.onPage=!1;let t=this.destroyHooks;this.destroyHooks=null,t?.forEach(s=>ve(s,"$destroyed")),this.resolveMounted=null;let n=this.onPaint;return this.onPaint=null,n?.(),this.detach(),this.fx?.dispose(),this.fx=null,this.data?.$dispose(),this.styleEls.forEach(s=>s.parentNode?.removeChild(s)),this.styleEls=[],this.sheetRoot&&this.shadowSheets.forEach(s=>{s!==Vt&&Gt(this.sheetRoot,s)}),this.shadowCss=null,this.shadowSheets=[],this.sheetRoot=null,this.ownsSharedStyles&&(this.styles.forEach(s=>mi(ss(s))),this.ownsSharedStyles=!1),this.content=null,this.startMarker=null,this.endMarker=null,this.renderDone=!1,this.data=null,this.resolveMounted=null,this}};A(ue,"version",Jr);var le=ue,ut=class{constructor(t){A(this,"chain");this.chain=t}queue(t){return this.chain=this.chain.then(n=>(t(n),n)),this}then(t,n){return this.chain.then(t,n)}catch(t){return this.chain.catch(t)}finally(t){return this.chain.finally(t)}mount(t,n){return this.queue(s=>s.mount(t,n))}mountShadow(t,n){return this.queue(s=>s.mountShadow(t,n))}render(t={}){return this.queue(n=>n.render(t))}renderShadow(t={}){return this.queue(n=>n.renderShadow(t))}on(t,n){return this.queue(s=>s.on(t,n))}off(t,n){return this.queue(s=>s.off(t,n))}detach(){return this.queue(t=>t.detach())}destroy(){return this.queue(t=>t.destroy())}};var ji=e=>new le(e),ve=(e,t)=>{try{e()}catch(n){console.error(`jq79: error in a ${t} hook`,n)}},Ht=(e,t)=>(e.push(t),()=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}),pe=new Set,Wt=!1,Qs={$:$e,$$:qe,$create:He,$reactive:Ne,$toRaw:V,Component79:le,C79:le};typeof globalThis<"u"&&globalThis[Ri]&&Bs();return sr(Li);})();
17
+ }`;var rl={};var po="0.7.13",bs=e=>Object.fromEntries(Array.from(e.attributes).map(t=>[t.name,t.value])),Ts="http://www.w3.org/1999/xhtml",$s=e=>{let t=bs(e),n=e.namespaceURI,s=t[Le];delete t[Le];let r=n!==null&&n!==Ts;return{tag:r?e.tagName:e.tagName.toLowerCase(),attrs:t,...s===void 0?{}:{component:s},...r?{ns:n}:{},children:Array.from((e instanceof HTMLTemplateElement?e.content:e).childNodes).flatMap(i=>{if(i.nodeType===Node.TEXT_NODE){let o=i.textContent??"";return o?[o]:[]}return i.nodeType===Node.ELEMENT_NODE?[$s(i)]:[]})}},it=new Map,ot=new Map,sn=!1,Gt,Ae=class extends Error{constructor(n,s){super(`${n}. ${s}`);k(this,"reason",n);k(this,"hint",s)}},ho=()=>new Ae("was not precompiled","Safe mode never builds code at runtime: the component's precompiled functions did not reach the page."),go=(e,t)=>{let n=globalThis[Gn];if(Array.isArray(n)&&n.length>0)for(let[s,r,i]of n.splice(0))ot.set(st(s,r),i);return ot.size===0?void 0:ot.get(st(e,t))},rn=(e,t,n="")=>{let s=go(e,t);if(s===null)throw new SyntaxError("jq79: this code did not compile when it was precompiled");if(s!==void 0)return s;if(Gt!==void 0)return mo(e,t,n,Gt);if(sn)throw ho();return new Function(...e,t+n)},on=()=>{if(!(typeof document>"u"))for(let e of Array.from(document.querySelectorAll("script[nonce]"))){let t=e.nonce||e.getAttribute("nonce");if(t)return t}},Qn="__jq79built",mo=(e,t,n,s)=>{let r=document.createElement("script");r.setAttribute("nonce",s),r.textContent=`document.currentScript.${Qn} = ${Zn(e,t)}${n}`;let i,o=a=>{i=a.error??new SyntaxError(a.message),a.preventDefault()};window.addEventListener("error",o);try{(document.head??document.documentElement).append(r)}finally{window.removeEventListener("error",o),r.remove()}let l=r[Qn];if(typeof l=="function")return ot.set(st(e,t),l),l;throw i!==void 0?i:new Ae("could not be built","The page's CSP refused a <script> carrying the nonce jq79 read from the page.")},Xn=new Set,yo=(e,t)=>{Xn.has(e)||(Xn.add(e),console.error(`jq79: safeEval() is on, and "${e}" ${t.reason}, so it rendered as nothing. ${t.hint}`))},qt=(e,t)=>{if(!(t in e)){if(t in globalThis)return globalThis[t];throw new ReferenceError(`${t} is not defined`)}},Rs=(e,t)=>{try{return rn([...Dt,...t],qn(e))}catch(n){return n instanceof Ae&&yo(e,n),null}},Eo=(e,t)=>{if(!de.scopedNames)return null;let n=Hn(e,t);if(n===null)return null;try{return rn([...Dt,...t],n)}catch{return null}},xs=(e,t,n)=>{let s=it.get(e);if(s===void 0){let r=Eo(t,n);s=r?{fn:r,scoped:!0}:{fn:Rs(t,n),scoped:!1},it.set(e,s)}return s},Ns=(e,t)=>`${t.join(",")}|${e}`,wo=(e,t)=>xs(Ns(e,t),e,t).fn,So=(e,t,n)=>{let s=Rs(t,n);return it.set(e,{fn:s,scoped:!1}),s},bo=/^(?:([\w$]+) is not defined|Can't find variable: ([\w$]+))/,To=100,Te=new Map,ln=new Set,lt=0,Vt=!1,Zt=new Set,$o=()=>{Vt=!1,!(lt>0)&&(Te.forEach(({name:e,expr:t,scope:n},s)=>{e in n||(ln.add(s),console.warn(`jq79: ${e} is not defined - evaluating "${t}". Template expressions resolve against the component store: a top-level let/var/const in a :setup script, a declared prop, or a global. Note a "function name() {}" declaration is not on the store - write "const name = () => {}".`))}),Te.clear())},vs=()=>{Vt||lt>0||!Te.size||(Vt=!0,queueMicrotask($o))},Ps=e=>{lt++;let t=()=>{lt--,vs()};e.then(t,t)},Ro=(e,t)=>{if(Zt.has(e))return;Zt.add(e);let n=t?.message||String(t);console.error(`jq79: ${n} - evaluating "${e}". The expression rendered as nothing. If the value arrives later, guard it - "a?.b", or :if on the element.`)},Cs=(e,t,n)=>{if(!(n instanceof ReferenceError))return Ro(e,n);let s=bo.exec(n.message),r=s?.[1]??s?.[2];if(!r)return;let i=`${r}|${e}`;ln.has(i)||Te.has(i)||Te.size>=To||(Te.set(i,{name:r,expr:e,scope:t}),vs())},Ms=(e,t,n)=>{let s=n?Object.keys(n):[],r=Ns(e,s),{fn:i,scoped:o}=xs(r,e,s);if(!i)return;let l=n?Object.values(n):[];if(!o)return i(t,qt,...l);try{return i(t,qt,...l)}catch(a){if(!(a instanceof ReferenceError))throw a;let c=So(r,e,s);if(!c)throw a;return c(t,qt,...l)}},_=(e,t,n)=>{try{return Ms(e,t,n)}catch(s){Cs(e,t,s);return}},As=(e,t,n)=>{try{return Ms(e,t,n)}catch(s){if(!(s instanceof ReferenceError))throw s;Cs(e,t,s);return}},ks=(e,t)=>{if(e.length===1){let s=e[0];return typeof s=="string"?s:String(_(s.expr,t)??"")}let n="";for(let s of e)n+=typeof s=="string"?s:String(_(s.expr,t)??"");return n},Os=(e,t,n,s)=>{let[r,...i]=t.slice(1).split("."),o=new Set(i);e.addEventListener(r,l=>{if(o.has("self")&&l.target!==e)return;o.has("prevent")&&l.preventDefault(),o.has("stop")&&l.stopPropagation();let a=As(n,s,{$event:l});typeof a=="function"&&a.call(e,l)},{once:o.has("once"),capture:o.has("capture")})},xo=(e,t,n,s)=>{let[r,...i]=t.slice(1).split("."),o=new Set(i),l=a=>{o.has("prevent")&&a.preventDefault(),o.has("stop")&&a.stopPropagation(),o.has("once")&&e.off(r,l),Pe(()=>{let c=As(n,s,{$event:a});typeof c=="function"&&c(a)})};e.on(r,l)},an=e=>e instanceof DocumentFragment?{first:e.firstChild,last:e.lastChild}:{first:e,last:e},gt=({first:e,last:t})=>{for(let n=e;n;){let s=n===t?null:n.nextSibling;n.parentNode?.removeChild(n),n=s}},No=e=>{e.forEach(t=>{if(t.first===t.last)return gt(t);if(!t.first.parentNode)return;let s=document.createRange();s.setStartBefore(t.first),s.setEndAfter(t.last),s.deleteContents()})},vo=(e,t)=>{let n=[],s=null;return e.forEach(r=>{if(!t(r)){s=null;return}s&&s.last.nextSibling===r.range.first?s.last=r.range.last:n.push(s={first:r.range.first,last:r.range.last})}),n},Po=({first:e,last:t},n)=>{let s=n.nextSibling;for(let r=e;r;){let i=r===t?null:r.nextSibling;n.parentNode.insertBefore(r,s),r=i}},Yn=(e,t)=>{let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s))for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r;return null},be=null,at=null,_s=new WeakSet,Co=e=>{let t={memo:be,base:at};return be=new Map,at=e,t},Mo=e=>{be=e.memo,at=e.base},Jn=(e,t)=>e.component!==void 0?es(t,e.component):e.tag.includes("-")?es(t,e.tag):null,Y=e=>e.component??e.tag,es=(e,t)=>{if(!be)return Yn(e,t);let n=t.replace(/-/g,"").toLowerCase();for(let s=e;s&&s!==Object.prototype;s=Object.getPrototypeOf(s)){if(s===at){if(be.has(t))return be.get(t);let r=Yn(s,t);return be.set(t,r),r}if(!_s.has(s)){for(let r of Object.keys(s))if(/^[A-Z]/.test(r)&&r.replace(/-/g,"").toLowerCase()===n)return r}}return null},Ao=e=>{let t=new Set;for(let n=e;n&&n!==Object.prototype;n=Object.getPrototypeOf(n))for(let s of Object.keys(n))/^[A-Z]/.test(s)&&t.add(s);return[...t].sort()},ko=(e,t)=>{let n=Ao(t);return new Error(`jq79: <${e}> is not defined - no component of that name is in scope, and nothing renders here. Import it in a :setup script, declare it as a prop, or add a <template name="${e}"> to this file. In scope: ${n.length?n.join(", "):"(none)"}.`)},ts=100,Ht=0,js=Symbol("jq79.slots"),qe=e=>Object.keys(e.attrs).find(t=>t===":slot"||t.startsWith(":slot.")),Oo=e=>e==="default"?":slot":`:slot.${e}`,_o=e=>typeof e!="string"||e.trim()!=="",jo=e=>{let t={},n=[];e.children.forEach(r=>{let i=typeof r=="object"&&r.tag==="template"?qe(r):void 0;if(typeof r=="string"||i===void 0){n.push(r);return}let o=jt(i.slice(6));if(o in t){console.warn(`jq79: two <template ${Oo(o)}> in <${Y(e)}>; the second was ignored`);return}t[o]={nodes:r.children,binder:r.attrs[i]||void 0}});let s=n.some(_o);return s&&"default"in t?console.warn(`jq79: <${Y(e)}> has both a <template :slot> and content outside it - the <template> is the default slot's content, and the rest was ignored`):s&&(t.default={nodes:n,binder:e.attrs[":slot"]||void 0}),t},Lo=(e,t,n)=>{je(t)?.forEach(({name:s,as:r,default:i})=>{let o=r??s;Object.defineProperty(e,o,{enumerable:!0,configurable:!0,get:()=>{let l=n[s]?.();return l===void 0&&i!==void 0?_(i,e):l},set:()=>console.warn(`jq79: "${o}" is a slot prop - it comes from the component, so assigning to it does nothing`)})})},Do=e=>{let t=qe(e);return console.warn(`jq79: <template ${t}> fills a slot only as a direct child of a component tag; here it rendered nothing`),document.createComment(`misplaced ${t}`)},Io=(e,t)=>{let n=Object.entries(jo(e));if(!n.length)return null;let s={};return n.forEach(([r,i])=>{s[r]=qo(i,t)}),s},qo=(e,t)=>(n,s,r,i)=>{let o=Object.create(t);Lo(o,e.binder,n);let l=o[Ue]??[];Object.defineProperty(o,Ue,{value:[...l,s]});let a=we(o);return a.ownedBy(s),r.onDispose(()=>a.dispose()),Re(e.nodes,o,a,i)},Ho=(e,t,n,s)=>{let r=jt(e.tag.slice(5)),i=document.createDocumentFragment(),o=document.createComment(e.tag),l=document.createComment(`/${e.tag}`);i.append(o,l);let a=t[js]?.[r];if(!a)return i.insertBefore(Re(e.children,t,n,s),l),i;let c={};return Object.entries(e.attrs).forEach(([u,p])=>{if(!(u===ke||Se(u)||u.startsWith("@")))if(u.startsWith(":")){let b=p||u.slice(1);c[le(u.slice(1))]=()=>_(b,t)}else c[le(u)]=()=>p}),i.insertBefore(a(c,t,n,s),l),i},Ls="data-c79-box",Wo=(e,t,n)=>{if(t.ns!==void 0)return document.createDocumentFragment();let s=document.createElement(De(e));s.setAttribute(Ls,"");let r=t.attrs[ke];return r!==void 0&&s.setAttribute(ke,r),n||Mi(),s},ns=new WeakSet,Fo=(e,t)=>{if(e.ns===void 0||ns.has(e))return;let n=t.template.find(r=>typeof r=="object");if(n===void 0||n.ns!==void 0)return;ns.add(e);let s=e.ns==="http://www.w3.org/1998/Math/MathML"?"<math>":"<svg>";console.warn(`jq79: <${Y(e)}> is used inside ${s} and its template starts with <${n.tag.toLowerCase()}>, which is parsed as HTML - it renders and never draws. A component's template decides its own namespace, so root it at ${s}`)},ss=(e,t,n,s,r)=>{let i=Wo(e,t,r),o=!(i instanceof DocumentFragment),l=o?null:document.createComment(`/${e}`);o||i.append(document.createComment(e),l);let a=Io(t,n),c={},u={},p=[],b=[],M=!1,H;Object.entries(t.attrs).forEach(([y,T])=>{if(y!==ke){if(y===":props"||y.startsWith(":props.")){M=!0,b.push({expr:T});return}if(Se(y)){Hi.has(y)&&(H??(H=[])).push(y.slice(1));return}if(y.startsWith("@"))p.push([y,T]);else if(y===":model"||y.startsWith(":model.")){let N=y===":model"?"default":le(y.slice(7));u[N]=T||(y===":model"?"model":N)}else if(y.startsWith(":")){let N=le(y.slice(1));c[N]=T||N,b.push({name:N,expr:T||N})}else{let N=le(y),I=JSON.stringify(T);c[N]=I,b.push({name:N,expr:I})}}});let q=y=>y==="default"?":model":`:model.${y}`,D=y=>y==="default"?"model":y,R=new Set;Object.entries(u).forEach(([y,T])=>{let N=D(y);c[N]!==void 0&&console.warn(`jq79: <${Y(t)}> binds prop "${N}" through both :${N} and ${q(y)} - ${q(y)} wins`),c[N]=T,wo(Lt(T),["$value"])===null&&(R.add(y),console.warn(`jq79: ${q(y)}="${T}" is not assignable - updates from <${Y(t)}> will be dropped`))});let j=()=>{let y={};return b.forEach(({name:T,expr:N})=>{if(T!==void 0)y[T]=_(N,n);else{let I=_(N,n);I!==null&&typeof I=="object"&&Object.assign(y,I)}}),Object.entries(u).forEach(([T,N])=>{y[D(T)]=_(N,n)}),y},O=null,W=null,z=null,K=new Set,X=y=>{if(y==null){if(!n[er]?.has(e)||K.has("unfilled"))return;K.add("unfilled"),console.error(`jq79: <${Y(t)}> is declared as a prop and the parent passed nothing - nothing renders here. Pass it (:${e}="\u2026"), or drop it from the signature to use the one declared in this file.`);return}K.has("type")||(K.add("type"),console.error(`jq79: <${Y(t)}> is ${typeof y}, not a component - nothing renders here`))};return s.effect(()=>{let y=_(e,n),T=y instanceof ae?y:null;if(T||X(y),T===W||(z?.dispose(),z=null,O?.destroy(),O=null,W=T,!T))return;Fo(t,T);let N=new ae({template:T.template,scripts:T.scripts,styles:T.styles,modules:T.modules,filename:T.filename,siblings:T.siblings,name:T.name});if(a&&(N.slots=a),Object.keys(u).length){let P=new Set;N.modelWriteback=(L,B)=>{let G=L==null?"default":le(String(L)),te=u[G];return te===void 0?(P.has(G)||(P.add(G),console.warn(`jq79: <${Y(t)}> has no ${q(G)} - bound: ${Object.keys(u).map(q).join(", ")}`)),!1):R.has(G)?!1:(Pe(()=>_(Lt(te),n,{$value:B})),!0)}}p.forEach(([P,L])=>xo(N,P,L,n));let I=Ii(N.scripts);qi(t,e,Object.keys(c),I),H&&Wi(t,e,H,I);let F=hs(Pe(j),I),V=document.createDocumentFragment();if(Ht>=ts){console.error(`jq79: <${Y(t)}> is ${ts} levels deep inside itself; giving up here. A component that renders itself stops when its data stops - is there a cycle in it?`);return}Ht++;try{(r?N.renderShadow(F):N.render(F)).mount(V)}finally{Ht--}let w=n[ft];w&&N.holdOwner(w.owner),l?l.parentNode.insertBefore(V,l):i.appendChild(V);let A=we(n,!0);if(M){let P=[];A.effect(()=>{let L=hs(j(),I),B=Object.keys(L);P.forEach(G=>{G in L||(N.data[G]=void 0)}),B.forEach(G=>{N.data[G]=L[G]}),P=B})}else Object.entries(c).forEach(([P,L])=>{I!==null&&!I.has(P)||A.effect(()=>{N.data[P]=_(L,n)})});z=A,O=N}),s.onDispose(()=>{z?.dispose(),O?.destroy()}),i},Bo=(e,t)=>{let n=()=>{let s=_(e,t);return s!==null&&typeof s=="object"?s:null};return new Proxy(t,{has(s,r){let i=n();return i!==null&&Reflect.has(i,r)||Reflect.has(s,r)},get(s,r){let i=n();return i!==null&&Reflect.has(i,r)?i[r]:Reflect.get(s,r)},set(s,r,i){let o=n();return o!==null&&Reflect.has(o,r)?(o[r]=i,!0):Reflect.set(s,r,i)}})},ge=e=>typeof e=="string"?e.split(/\s+/).filter(Boolean):Array.isArray(e)?e.flatMap(ge):e!==null&&typeof e=="object"?Object.entries(e).flatMap(([t,n])=>n?ge(t):[]):[],Uo=e=>typeof e=="function"?(t,n,s)=>{try{return!!e(t,n,s)}catch{return!1}}:typeof e=="string"||Array.isArray(e)?mn(e):()=>!1,zo=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),cn=e=>e.ns===void 0?document.createElement(e.tag):document.createElementNS(e.ns,e.tag),Ko={"http://www.w3.org/2000/svg":["svg","feGaussianBlur"],"http://www.w3.org/1998/Math/MathML":["math","mi"]},rs=new Map,Go=(e,t)=>{let n=`${e} ${t}`,s=rs.get(n);if(s!==void 0)return s;let r=Ko[e],i=t;if(r!==void 0&&typeof DOMParser<"u"&&/^[a-z][a-z0-9]*$/.test(t)){let[o,l]=r;i=new DOMParser().parseFromString(`<${o}><${l} ${t}="x"/></${o}>`,"text/html").querySelector(l)?.getAttributeNames().find(c=>c.toLowerCase()===t)??t}return rs.set(n,i),i},Ds=(e,t)=>{let n=e.namespaceURI;if(n===null||n===Ts)return t;let s=t.replace(/-/g,"").toLowerCase(),r=Go(n,s);return r===s?t:r},Is=(e,t,n)=>{let s=zo.has(t);(s?!n:n==null)?e.removeAttribute(t):e.setAttribute(t,s?"":String(n))},de={cloneSkeletons:!0,scopedNames:!0},Vo=new Set([":text",":html",":value",":checked",":selected"]),Zo=e=>e.startsWith("@")||e===":class"||e.startsWith(":class.")||Vo.has(e)?!0:e.startsWith(":")?e===":model"?!1:!Se(e)&&!e.includes("."):e!==Le,qs=e=>{if(e.component||e.tag.includes("-")||nt(e.tag)||e.tag==="template"||e.ns===void 0&&document.createElement(e.tag)instanceof HTMLUnknownElement)return!1;for(let t in e.attrs)if(!Zo(t))return!1;return e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?!0:e.children.every(t=>typeof t=="string"||qs(t))},Hs=(e,t,n)=>{let s=cn(e),r,i=null;for(let p in e.attrs){let b=e.attrs[p];if(p.startsWith("@"))n.push({kind:"event",path:t,attr:p,expr:b});else if(p===":class")r=b;else if(p.startsWith(":class."))(i??(i=[])).push([p.slice(7),b]);else if(!Se(p))if(p.startsWith(":")){let M=p.slice(1);n.push({kind:"attr",path:t,name:Ds(s,M),expr:b||le(M)})}else s.setAttribute(p,b)}(r!==void 0||i)&&n.push({kind:"class",path:t,classExpr:r,toggles:i,staticClasses:new Set(ge(e.attrs.class??""))});let o=e.attrs[":text"],l=e.attrs[":html"];o!==void 0?n.push({kind:"textContent",path:t,expr:o}):l!==void 0?n.push({kind:"html",path:t,expr:l}):e.children.forEach((p,b)=>{if(typeof p=="string"){p.includes("{{")?(n.push({kind:"text",path:[...t,b],parts:Ot(p)}),s.appendChild(document.createTextNode(""))):s.appendChild(document.createTextNode(p));return}s.appendChild(Hs(p,[...t,b],n))});let a=e.attrs[":value"];a!==void 0&&n.push({kind:"value",path:t,expr:a});let c=e.attrs[":checked"];c!==void 0&&n.push({kind:"checked",path:t,expr:c});let u=e.attrs[":selected"];return u!==void 0&&n.push({kind:"selected",path:t,expr:u}),s},Qo=3,Ws=e=>e.attrs[":text"]!==void 0||e.attrs[":html"]!==void 0?1:1+e.children.reduce((t,n)=>t+(typeof n=="string"?0:Ws(n)),0),os=new WeakMap,is=new WeakSet,Xo=e=>{let t=os.get(e);if(t!==void 0)return t;if(!is.has(e))return is.add(e),null;let n=null;if(qs(e)&&Ws(e)>=Qo){let s=[];n={skeleton:Hs(e,[],s),ops:s}}return os.set(e,n),n},Yo=(e,t)=>{let n=e;for(let s=0;s<t.length;s++)n=n.childNodes[t[s]];return n},Jo=(e,t,n)=>{let s=e.skeleton.cloneNode(!0);for(let r of e.ops){let i=r.path.length===0?s:Yo(s,r.path);if(r.kind==="text"){let o=i,l=r.parts;n.effect(()=>{let a=ks(l,t);o.textContent!==a&&(o.textContent=a)})}else if(r.kind==="event")Os(i,r.attr,r.expr,t);else if(r.kind==="attr"){let o=i,{name:l,expr:a}=r;n.effect(()=>Is(o,l,_(a,t)))}else if(r.kind==="class"){let o=i,{classExpr:l,toggles:a,staticClasses:c}=r,u=[];n.effect(()=>{let p=l!==void 0?ge(_(l,t)):[];a?.forEach(([b,M])=>{_(M,t)&&p.push(...ge(b))}),u.forEach(b=>{!p.includes(b)&&!c.has(b)&&o.classList.remove(b)}),o.classList.add(...p),u=p})}else if(r.kind==="textContent"){let o=i,{expr:l}=r;n.effect(()=>{let a=String(_(l,t)??"");o.textContent!==a&&(o.textContent=a)})}else if(r.kind==="html"){let o=i,{expr:l}=r;n.effect(()=>{o.innerHTML=Et(String(_(l,t)??""))})}else if(r.kind==="value"){let o=i,{expr:l}=r;n.effect(()=>{let a=String(_(l,t)??"");o.value!==a&&(o.value=a)})}else if(r.kind==="checked"){let o=i,{expr:l}=r;n.effect(()=>{let a=!!_(l,t);o.checked!==a&&(o.checked=a)})}else if(r.kind==="selected"){let o=i,{expr:l}=r;n.effect(()=>{let a=!!_(l,t);o.selected!==a&&(o.selected=a)})}else{let o=r}}return s},dn=(e,t,n,s)=>{let r=e.attrs[":with"],i=r!==void 0?Bo(r,t):t;if(nt(e.tag))return Ho(e,i,n,s);if(e.tag==="template"&&qe(e)!==void 0)return Do(e);let o=Jn(e,i);if(o)return ss(o,e,i,n,s);if(de.cloneSkeletons){let R=Xo(e);if(R)return Jo(R,i,n)}let l=cn(e);if(e.component!==void 0&&i[ft]?.count===0)throw ko(e.component,i);let a=e.ns===void 0&&(e.component!==void 0||e.tag.includes("-"));if(a){let R=!1;n.effect(()=>{if(R)return;let j=Jn(e,i);if(!j)return;R=!0;let O=ss(j,e,i,n,s),W=an(O);n.onDispose(()=>gt(W)),l.replaceWith(O)})}for(let R in e.attrs){let j=e.attrs[R];if(R.startsWith("@"))Os(l,R,j,i);else if(R===":model"||R.startsWith(":model."))a||console.warn(`jq79: ${R} on <${Y(e)}> does nothing - :model binds component tags only (for now)`);else if(!Se(R))if(R.startsWith(":"))if(a)l.setAttribute(R,j);else{let O=R.slice(1),W=j||le(O),z=Ds(l,O);n.effect(()=>Is(l,z,_(W,i)))}else l.setAttribute(R,j)}let c=e.attrs[":class"],u=null;for(let R in e.attrs)R.startsWith(":class.")&&(u??(u=[])).push([R.slice(7),e.attrs[R]]);if(c!==void 0||u){let R=new Set(ge(e.attrs.class??"")),j=[];n.effect(()=>{let O=c!==void 0?ge(_(c,i)):[];u?.forEach(([W,z])=>{_(z,i)&&O.push(...ge(W))}),j.forEach(W=>{!O.includes(W)&&!R.has(W)&&l.classList.remove(W)}),l.classList.add(...O),j=O})}let p=e.attrs[":text"],b=e.attrs[":html"],M=e.attrs[":html.allowed"];M!==void 0&&b===void 0&&console.warn("jq79: :html.allowed without :html on the same element does nothing"),p!==void 0?n.effect(()=>{let R=String(_(p,i)??"");l.textContent!==R&&(l.textContent=R)}):b!==void 0?n.effect(()=>{let R=M!==void 0?{allowUrl:Uo(_(M,i))}:void 0;l.innerHTML=Et(String(_(b,i)??""),R)}):l instanceof HTMLTemplateElement?Re(e.children,i,n,s,l.content):Re(e.children,i,n,s,l);let H=e.attrs[":value"];H!==void 0&&n.effect(()=>{let R=String(_(H,i)??"");l.value!==R&&(l.value=R)});let q=e.attrs[":checked"];q!==void 0&&n.effect(()=>{let R=!!_(q,i);l.checked!==R&&(l.checked=R)});let D=e.attrs[":selected"];return D!==void 0&&n.effect(()=>{let R=!!_(D,i);l.selected!==R&&(l.selected=R)}),l},ei=(e,t,n,s)=>{let r=document.createComment("if"),i=document.createDocumentFragment();i.appendChild(r);let o=null,l=null,a=null;return n.effect(()=>{let c=e.find(p=>p.expr===void 0||_(p.expr,t))??null;if(c===l||(a?.dispose(),o&&gt(o),o=null,l=c,!c))return;a=we(t);let u=dn(c.node,t,a,s);o=an(u),r.parentNode.insertBefore(u,r.nextSibling)}),n.onDispose(()=>a?.dispose()),i},Ce=(e,t,n)=>{Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})},ti=e=>{let t=new Uint8Array(e.length),n=[],s=new Int32Array(e.length).fill(-1);for(let r=0;r<e.length;r++){let i=e[r];if(i<0)continue;let o=0,l=n.length;for(;o<l;){let a=o+l>>1;e[n[a]]<i?o=a+1:l=a}o>0&&(s[r]=n[o-1]),n[o]=r}for(let r=n.length?n[n.length-1]:-1;r!==-1;r=s[r])t[r]=1;return t},ni=e=>{if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null},Fs=(e,t)=>typeof e=="string"?t.some(n=>as(e,n)):Object.values(e.attrs).some(n=>t.some(s=>as(n,s)))||e.children.some(n=>Fs(n,t)),Bs=e=>typeof e!="string"&&(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs||":each"in e.attrs||e.component!==void 0||e.tag.includes("-")||nt(e.tag)||e.children.some(Bs)),ls=/[A-Za-z0-9_$]/,si=/^[A-Za-z_$][\w$]*\.[A-Za-z_$][\w$]*$/,as=(e,t)=>{for(let n=e.indexOf(t);n!==-1;n=e.indexOf(t,n+1)){let s=n===0?"":e[n-1],r=e[n+t.length]??"";if(!ls.test(s)&&!ls.test(r))return!0}return!1},Wt=new WeakMap,ri=e=>{let t=Wt.get(e);if(t!==void 0)return t;let n=e.attrs[":each"].match(In);if(!n)return Wt.set(e,null),null;let[,s,r,i]=n,o=e.attrs[":key"],l=o===s,a=o!==void 0&&!l&&si.test(o)&&o.startsWith(`${s}.`)?o.slice(s.length+1):void 0,{[":each"]:c,[":key"]:u,[":window"]:p,...b}=e.attrs,M={...e,attrs:b},H=["$index",...r?[r]:[]],q=Fs(M,H),D=/^[A-Z]/.test(s)||r!==void 0&&/^[A-Z]/.test(r),R=o!==void 0&&Bs(M),j={itemName:s,atName:r,listExpr:i,keyExpr:o,keyIsItem:l,keyProp:a,itemNode:M,readsPosition:q,namesComponent:D,nestsScopes:R,windowExpr:p};return Wt.set(e,j),j},Ft=8,oi=/^(auto|scroll|overlay)$/,ii=e=>{for(let t=e;t;t=t instanceof ShadowRoot?t.host:t.parentNode)if(!(!(t instanceof HTMLElement)||t===document.body||t===document.documentElement)&&oi.test(getComputedStyle(t).overflowY))return t;return null},li=(e,t,n,s,r)=>{let i=()=>{let y=e.component!==void 0||e.tag.includes("-")?document.createElement("div"):cn(e);return y.setAttribute("aria-hidden","true"),y.setAttribute("style","height: 0px; margin: 0; padding: 0; border: 0; list-style: none; visibility: hidden"),y},o=i(),l=i(),a=Ee({start:0,count:-1}),c=0,u=0,p=null,b=!1,M=0,H=null,q=null,D=y=>Math.ceil(y/c)+1+2*Ft,R=(y,T)=>{y=Math.max(0,Math.min(y,Math.max(0,u-T))),(a.start!==y||a.count!==T)&&_e(()=>{a.start=y,a.count=T})},j=()=>{let y=o.getBoundingClientRect().top;if(p){let T=p.getBoundingClientRect(),N=p.scrollTop;return{listTop:y-T.top-p.clientTop+N,scrollTop:N,height:p.clientHeight||window.innerHeight}}return{listTop:y+window.scrollY,scrollTop:window.scrollY,height:window.innerHeight}},O=()=>{if(M=0,!(c>0)||!o.isConnected)return;let{listTop:y,scrollTop:T,height:N}=j();R(Math.floor((T-y)/c)-Ft,D(N))},W=()=>{M||(M=typeof requestAnimationFrame=="function"?requestAnimationFrame(O):setTimeout(O,16))},z=(y,{block:T="nearest"}={})=>{if(K(),c>0&&o.isConnected){let{listTop:F,scrollTop:V,height:w}=j(),A=F+y*c,P=A+c,L=V;T==="start"?L=A:T==="end"?L=P-w:T==="center"?L=A-(w-c)/2:A<V?L=A:P>V+w&&(L=P-w),L!==V&&(p?p.scrollTop=L:window.scrollTo(window.scrollX,L)),O()}let N=a.count>0?a.count:D(window.innerHeight||800);(y<a.start||y>=a.start+N)&&R(y-Ft,N);let I=r().find(F=>F.scope.$index===y);return I?I.range.first:null},K=()=>{b||!o.isConnected||(b=!0,q=o.parentElement,p=ii(o.parentNode),(p??window).addEventListener("scroll",W,{passive:!0}),window.addEventListener("resize",W),p&&typeof ResizeObserver=="function"&&(H=new ResizeObserver(W),H.observe(p)),q&&Object.defineProperty(q,"$scrollTo",{value:z,configurable:!0,writable:!0}),O())};s.onDispose(()=>{M&&(typeof cancelAnimationFrame=="function"?cancelAnimationFrame:clearTimeout)(M),b&&((p??window).removeEventListener("scroll",W),window.removeEventListener("resize",W),H?.disconnect(),q&&q.$scrollTo===z&&delete q.$scrollTo)});let X=!1;return{top:o,bottom:l,range:y=>{u=y;let T=Number(_(t,n));if(c=T>0?T:0,!c)return o.style.height=l.style.height="0px",[0,y];let N=a.count>0?a.count:D(window.innerHeight||800),I=Math.max(0,Math.min(a.start,y-N)),F=Math.min(y,I+N);return o.style.height=`${I*c}px`,l.style.height=`${(y-F)*c}px`,[I,F]},settled:()=>{b||X||(X=!0,queueMicrotask(()=>{X=!1,K()}))}}},ai=(e,t,n,s)=>{let r=ri(e);if(!r)return document.createComment(`invalid :each expression "${e.attrs[":each"]}"`);let{itemName:i,atName:o,listExpr:l,keyExpr:a,keyIsItem:c,keyProp:u,itemNode:p,readsPosition:b,namesComponent:M,nestsScopes:H,windowExpr:q}=r,D=document.createComment("each"),R=document.createDocumentFragment();R.appendChild(D);let j=q===void 0?null:li(p,q,t,n,()=>O);j&&R.append(j.top,j.bottom),(":if"in e.attrs||":elseif"in e.attrs||":else"in e.attrs)&&console.warn("jq79: :if/:elseif/:else on a :each element is ignored; filter the list expression instead");let O=[],W=!1;return n.effect(()=>{let z=Co(t);try{let K=_(l,t),X=Array.isArray(K),y=X?null:ni(K)?Object.keys(K):[],T=X?K.length:y.length,[N,I]=j?j.range(T):[0,T],F=new Map;O.forEach((d,m)=>{d.pos=m;let h=F.get(d.key);h?h.push(d):F.set(d.key,[d])});let V=new Set,w=[],A=[],P=[],L=[],B;for(let d=N;d<I;d++){let m=X?d:y[d],h=X?K[d]:K[m],S=m;c?S=h:u!==void 0&&h!==null&&typeof h=="object"?S=h[u]:a!==void 0&&(B===void 0?(B=Object.create(t),Ce(B,i,h),o&&Ce(B,o,m),Ce(B,"$index",d)):(B[i]=h,o&&(B[o]=m),B.$index=d),S=_(a,B)),V.has(S)&&!W&&(W=!0,console.warn(`jq79: duplicate :key in :each "${e.attrs[":each"]}"; duplicates pair up by position`)),V.add(S);let g=F.get(S)?.shift();if(g&&Object.is(g.item,h)){let v=g.scope;v.$index!==d&&(b&&w.push(g),v.$index=d),o&&v[o]!==m&&(v[o]=m),P.push(g),L.push(g.pos);continue}if(g&&a!==void 0){let v=g.scope;v[i]=h,v.$index!==d&&(v.$index=d),o&&v[o]!==m&&(v[o]=m),g.item=h,A.push(g),P.push(g),L.push(g.pos);continue}g&&(g.fx.dispose(),gt(g.range));let E=Object.create(t);Ce(E,i,h),o&&Ce(E,o,m),Ce(E,"$index",d),M||_s.add(E);let $=we(t);H&&Object.defineProperty(E,Rt,{value:$});let x=an(dn(p,E,$,s));P.push({key:S,item:h,scope:E,fx:$,range:x,pos:d}),L.push(-1)}let G=new Set;F.forEach(d=>d.forEach(m=>G.add(m))),G.size&&(G.forEach(d=>{d.dead=!0,d.fx.dispose()}),No(vo(O,d=>d.dead===!0)));let te=j?j.top:D,f=ti(L);P.forEach((d,m)=>{!f[m]&&te.nextSibling!==d.range.first&&Po(d.range,te),te=d.range.last}),w.forEach(d=>Pe(()=>d.fx.refresh())),A.forEach(d=>Pe(()=>d.fx.rerun())),O=P}finally{Mo(z)}j?.settled()}),n.onDispose(()=>O.forEach(z=>z.fx.dispose())),R},Us=(e,t)=>{let n=t;for(;n<e.length&&typeof e[n]=="string"&&!e[n].trim();)n++;return n},Bt=e=>{let t=":if"in e.attrs,n=":elseif"in e.attrs,s=":else"in e.attrs;if((t?1:0)+(n?1:0)+(s?1:0)<2)return;let r=[t?":if":null,n?":elseif":null,s?":else":null].filter(Boolean);console.warn(`jq79: ${r.join(" and ")} on the same <${Y(e)}> - only ${r[0]} applies; the branches of a chain are sibling elements, one directive each`)},ci=(e,t)=>{let n=":elseif"in e.attrs?":elseif":":else";console.warn(t?`jq79: a second ${n} on <${Y(e)}> - the chain before it already ended with :else, which closes it. One :if, any number of :elseif, at most one :else`:`jq79: ${n} on <${Y(e)}> continues no :if - it renders unconditionally. A chain is :if, then :elseif, then :else, on adjacent siblings: anything but whitespace between them breaks it`)},di=[":if",":elseif",":else",":each"],ui=(e,t)=>{if(e.tag!=="template"||e.ns!==void 0)return;let n=di.find(s=>s in e.attrs);if(n!==void 0){if(qe(e)!==void 0){if(t?.component===void 0)return;console.warn(`jq79: ${n} on <template ${qe(e)}> is ignored - a slot is filled with its children as written. Put ${n} on the elements inside it, or on the component's tag`);return}console.warn(`jq79: ${n} on a nested <template> shows nothing - a <template>'s children live in its .content and never reach the page. Put ${n} on the elements themselves`)}},fi=[..._t,":model",":slot"].map(e=>e.slice(1)),pi={":attrs":':attrs was removed in 0.7 - it now binds an attribute called "attrs". Bind them one at a time (:disabled="x", :title="y"), or :class for classes'},hi=e=>{for(let t in e.attrs){let n=pi[t];n!==void 0&&console.warn(`jq79: ${n}`)}},gi=e=>{if(!(e.component!==void 0||e.tag.includes("-")))for(let t in e.attrs){if(!t.startsWith(":")||Se(t)||t===":model"||t.startsWith(":model."))continue;let n=t.slice(1);if(n.includes(".")){console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". Dotted modifiers belong to an event: if you meant @${n}, that is the spelling`);continue}let s=fi.find(r=>n!==r&&n.startsWith(r));s!==void 0&&console.warn(`jq79: ${t} is not a directive - it bound an attribute named "${n}". A ":name" jq79 does not recognize binds that attribute (which is what :src and :disabled are). If you meant :${s}, that is the spelling`)}},zs=(e,t)=>{e.forEach(s=>{typeof s!="string"&&(ui(s,t),hi(s),gi(s),zs(s.children,s))});let n=!1;for(let s=0;s<e.length;){let r=e[s];if(typeof r=="string"){r.trim()&&(n=!1),s++;continue}if(":each"in r.attrs){n=!1,s++;continue}if(Bt(r),":if"in r.attrs){s++;let i=l=>{let a=Us(e,s),c=e[a];if(typeof c=="object"&&l in c.attrs)return s=a+1,c};for(let l=i(":elseif");l;l=i(":elseif"))Bt(l);let o=i(":else");o&&Bt(o),n=o!==void 0;continue}(":elseif"in r.attrs||":else"in r.attrs)&&ci(r,n),n=!1,s++}},cs=new WeakMap,mi=(e,t,n)=>{let s=cs.get(t);if(s)return s;let r=[{expr:t.attrs[":if"],node:t}],i=n+1,o=c=>{let u=Us(e,i),p=e[u];if(typeof p=="object"&&c in p.attrs)return i=u+1,p};for(let c=o(":elseif");c;c=o(":elseif"))r.push({expr:c.attrs[":elseif"],node:c});let l=o(":else");l&&r.push({node:l});let a={branches:r,next:i};return cs.set(t,a),a},Re=(e,t,n,s=!1,r)=>{let i=r??document.createDocumentFragment(),o=0;for(;o<e.length;){let l=e[o];if(typeof l=="string"){let a=document.createTextNode(l);if(l.includes("{{")){let c=Ot(l);n.effect(()=>{let u=ks(c,t);a.textContent!==u&&(a.textContent=u)})}i.appendChild(a),o++;continue}if(":each"in l.attrs){i.appendChild(ai(l,t,n,s)),o++;continue}if(":if"in l.attrs){let a=mi(e,l,o);i.appendChild(ei(a.branches,t,n,s)),o=a.next;continue}i.appendChild(dn(l,t,n,s)),o++}return i},yi=(e,t,n=!1)=>Re(e.template,t,we(t),n),ke="data-jq79",Ei=e=>{let t=2166136261;for(let n=0;n<e.length;n++)t=Math.imul(t^e.charCodeAt(n),16777619);return(t>>>0).toString(36)},Ks=(e,t)=>{e.forEach(n=>{typeof n!="string"&&(n.attrs[ke]=t,Ks(n.children,t))})},wi=/^:(before|after|first-line|first-letter)(?![\w-])/i,Gs=(e,t)=>{let n=0;for(let s=0;s<e.length;s++){let r=e[s];if(r==="\\")s++;else if(r==='"'||r==="'")for(s++;s<e.length&&e[s]!==r;)s+=e[s]==="\\"?2:1;else if(r==="("||r==="[")n++;else if(r===")"||r==="]")n--;else if(n===0&&t(s))return}},Si=(e,t)=>{let n=e.length;return Gs(e,s=>e[s]!==":"||e[s+1]!==":"&&!wi.test(e.slice(s))?!1:(n=s,!0)),`${e.slice(0,n)}[${ke}="${t}"]${e.slice(n)}`},bi=(e,t)=>{let n=Vs(e),s=n.match(/^\s*/)[0],r=n.match(/\s*$/)[0],i=n.slice(s.length,n.length-r.length);if(!i)return e;let o=[],l=0;return Gs(i,a=>{i[a]===","&&(o.push(i.slice(l,a)),l=a+1)}),o.push(i.slice(l)),s+o.map(a=>a.trim()&&Si(a.trim(),t)).join(", ")+r},Vs=e=>{let t="";for(let n=0;n<e.length;){let s=e[n];if(s==="/"&&e[n+1]==="*"){let r=e.indexOf("*/",n+2);n=r===-1?e.length:r+2}else if(s==='"'||s==="'"){let r=n+1;for(;r<e.length&&e[r]!==s;)r+=e[r]==="\\"?2:1;t+=e.slice(n,r+1),n=r+1}else s==="\\"?(t+=e.slice(n,n+2),n+=2):(t+=s,n++)}return t},Ti=/(^|[\s>+~,(])([A-Z][A-Za-z0-9]*)(?![\w-])/g,$i=/[a-z]/,Ri=e=>e.replace(Ti,(t,n,s)=>$i.test(s)?`${n}${De(s)}`:t),Zs=/^\s*@(media|supports|container|layer|scope|document)\b/i,Qs=/^\s*@/,xi=e=>{let t="",n="",s="",r=[],i=()=>r.length===0||r[r.length-1],o=()=>{t+=i()&&!Qs.test(s)?Ri(n):n,n=""},l=c=>{o(),t+=c,s+=c},a=(c,u)=>{o(),t+=c,s="",u!==void 0?r.push(u):c==="}"&&r.pop()};for(let c=0;c<e.length;){let u=e[c];if(u==="/"&&e[c+1]==="*"){let p=e.indexOf("*/",c+2),b=p===-1?e.length:p+2;l(e.slice(c,b)),c=b}else if(u==='"'||u==="'"){let p=c+1;for(;p<e.length&&e[p]!==u;)p+=e[p]==="\\"?2:1;l(e.slice(c,Math.min(p+1,e.length))),c=p+1}else u==="{"?(a("{",Zs.test(s)),c++):u==="}"||u===";"?(a(u),c++):(n+=u,s+=u,c++)}return o(),t},Ni=(e,t)=>{/:deep\(|::v-deep|>>>/.test(e)&&console.warn("jq79: :deep()/::v-deep/>>> are not supported in <style scoped>; the rule will be dropped by the browser");let n="",s="",r=[],i=()=>r.length===0||r[r.length-1];for(let o=0;o<e.length;){let l=e[o],a=l;if(l==="/"&&e[o+1]==="*"){let c=e.indexOf("*/",o+2);a=e.slice(o,c===-1?e.length:c+2)}else if(l==='"'||l==="'"){let c=o+1;for(;c<e.length&&e[c]!==l;)c+=e[c]==="\\"?2:1;a=e.slice(o,c+1)}else l==="\\"&&(a=e.slice(o,o+2));if(o+=a.length,!i())n+=a,a==="{"?r.push(!1):a==="}"&&r.pop();else if(a==="{"){let c=Vs(s),u=Qs.test(c);n+=(u?s:bi(s,t))+"{",r.push(u&&Zs.test(c)),s=""}else a==="}"||a===";"?(n+=s+a,s="",a==="}"&&r.pop()):s+=a}return n+s},Qt=e=>{let t=Ln(e),s=new DOMParser().parseFromString(`<template>${t}</template>`,"text/html").querySelector("template"),r=[],i=[];Array.from(s.content.children).forEach(a=>{a.tagName==="TEMPLATE"?i.push(a):r.push(a)});let o=ds(r,e),l={};return i.forEach(a=>{let c=a.getAttribute("name");if(c===null){console.warn("jq79: a top-level <template> without a name declares nothing and was ignored");return}if(!Dn.test(c)){console.warn(`jq79: <template name="${c}"> was ignored - a component name has to be PascalCase, or no tag could ever reference it (only capitalized names resolve as components)`);return}if(c in l){console.warn(`jq79: two <template name="${c}"> in one file; the second was ignored`);return}l[c]=new ae({...ds(Array.from(a.content.children),a.innerHTML),siblings:l,name:c})}),Object.keys(l).length&&(o.siblings=l),o},vi=/^(?:text|application)\/(?:x-)?typescript$/i,Pi=e=>"lang"in e?`lang="${e.lang}"`:vi.test(e.type?.trim()??"")?`type="${e.type}"`:null,ds=(e,t)=>{let n=[],s=[],r=[];e.forEach(o=>{let l={attrs:bs(o),content:o.textContent??""};o.tagName==="SCRIPT"?n.push(l):o.tagName==="STYLE"?s.push(l):r.push($s(o))}),n.forEach(o=>{let l=Pi(o.attrs);l&&console.warn(`jq79: <script ${l}> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its types were never stripped: the script will throw, or - for a plain \`let x: T = ...\` - silently fail to declare x.`)}),s.forEach(o=>{"lang"in o.attrs&&console.warn(`jq79: <style lang="${o.attrs.lang}"> needs the jq79/vite plugin to compile it. This component didn't go through the bundler, so its styles were left uncompiled and the browser will ignore them.`)}),s.forEach(o=>{"lang"in o.attrs||(o.content=xi(o.content))});let i=o=>"scoped"in o.attrs&&!("lang"in o.attrs);if(s.some(i)){let o=Ei(t);Ks(r,o),s.forEach(l=>{i(l)&&(l.scoped=Ni(l.content,o))})}return zs(r),{template:r,scripts:n,styles:s}},Xs=/\.html?([?#]|$)/,ct=e=>Xs.test(e)?nn(e):import(e),un=/^(?:\.\.?\/|\/|[a-z][a-z0-9+.-]*:)/i,Xt=(e,t)=>{if(!un.test(e))return e;try{return new URL(e,new URL(t??"",document.baseURI)).href}catch{return e}},Ci=(e,t)=>e?`
18
+ //# sourceURL=${e}?jq79-script=${t}`:"",Ys=(e,t,n)=>{try{return rn(e,t,Ci(n.filename,n.index??0))}catch(s){throw s instanceof Ae?new Error(`jq79: safeEval() is on, and script ${n.index??0} of ${n.filename??"a component built from a string"} ${s.reason}. ${s.hint}`):s}},us=e=>e.scoped??e.content,Ie=`:where([${Ls}]) { display: contents }`,fn=()=>sn&&typeof Document<"u"&&"adoptedStyleSheets"in Document.prototype,dt=e=>{let t=new CSSStyleSheet;return t.replaceSync(e),t},pn=(e,t)=>{e.adoptedStyleSheets.includes(t)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,t])},Yt=(e,t)=>{e.adoptedStyleSheets=e.adoptedStyleSheets.filter(n=>n!==t)},rt=null,Jt=null,Mi=()=>{if(fn()){pn(document,Jt??(Jt=dt(Ie)));return}rt?.isConnected||(rt=document.createElement("style"),rt.textContent=Ie,document.head.appendChild(rt))},ut=new Map,Ai=e=>{let t=ut.get(e);if(!t){if(fn()){let n=dt(e);pn(document,n),t={sheet:n,count:0}}else{let n=document.createElement("style");n.textContent=e,document.head.appendChild(n),t={el:n,count:0}}ut.set(e,t)}t.count++},ki=e=>{let t=ut.get(e);t&&--t.count<=0&&(t.sheet?Yt(document,t.sheet):t.el?.remove(),ut.delete(e))},Oi=(e,t,n,s={},r=ct,i={})=>{let o={...ar,...s},l=new Proxy(t,{has:(u,p)=>p!=="$__effect"&&p!=="$__import"&&p!=="$__state"&&(Reflect.has(u,p)||!(p in globalThis)&&!(p in o))}),a={},c=Ys(Wn(Object.keys(o)),Fn(e),i)(l,n,r,a,...Object.values(o));return c.catch(u=>console.error("jq79: error in :setup script",u)),Ps(c),{settled:c,sync:a.done===!0}},fs=(e,t)=>{t?.forEach(({name:n,default:s})=>{e[n]===void 0&&(e[n]=s===void 0?void 0:_(s,e))})},mt=e=>{let t=new Map;return n=>{if(t.has(n))return t.get(n);let s=e(n);return t.set(n,s),s}},Js=e=>(e?.forEach(t=>Object.freeze(t)),e&&Object.freeze(e),e),_i=mt(An),en=mt(e=>Js(et(e))),ji=mt(e=>{let t=Ye(e);return Object.freeze(t.vars),Object.freeze(t)}),Li=mt(e=>Js(zn({attrs:{":setup":e},content:""}))),tn=e=>{let t=e.attrs[":setup"],n=t===void 0?null:Li(t);return!n&&e.attrs[":setup"]!==void 0&&Di(e,e.attrs[":setup"]),n},ps=new WeakSet,Di=(e,t)=>{t.trim()==="_"||ps.has(e)||(ps.add(e),console.warn(`jq79: :setup="${t}" is not a props pattern, so this component declares no signature and takes whatever a parent passes - write the props it takes ("{ a, b }"), a bare :setup for none, or "_" to stay open on purpose`))},Ii=e=>{let t=null;return e.forEach(n=>{let s=en(n.content)??tn(n);if(!s)return;let r=t??(t=new Set);s.forEach(({name:i})=>r.add(i))}),t},hs=(e,t)=>{if(t===null)return e;let n={};return Object.keys(e).forEach(s=>{t.has(s)&&(n[s]=e[s])}),n},gs=new WeakMap,qi=(e,t,n,s)=>{if(s===null)return;let r=gs.get(e)??new Set;gs.set(e,r),n.forEach(i=>{s.has(i)||r.has(i)||(r.add(i),console.warn(`jq79: :${i} is not declared by <${t}> - add it to the :setup signature, or drop it`))})},Hi=new Set([":value",":checked",":selected",":text",":html",":class"]),ms=new WeakSet,Wi=(e,t,n,s)=>{if(s===null||ms.has(e))return;let r=n.filter(i=>s.has(i));r.length&&(ms.add(e),r.forEach(i=>console.warn(`jq79: :${i} on <${t}> is a directive, not a prop - <${t}> never receives its "${i}". Rename the prop (${r.map(o=>`:${o}`).join(", ")} are reserved on a component tag), or use :model for a value that goes both ways`)))},Fi=(e,t)=>{if(!e)return null;let n=Object.create(null),s=!1;return Object.entries(e).forEach(([r,i])=>{t.has(r)||(n[r]=i,s=!0)}),s?n:null},er=Symbol("jq79.unfilledProps"),ft=Symbol("jq79.pendingScripts"),Bi=e=>e&&e.default!==void 0?e.default:e,Ui=(e,t,n,s={},r=ct,i={})=>{let o={...ar,...s},l={},a=Ys(Bn(Object.keys(o)),Un(e),i)(l,Bi,r,...Object.values(o)),c=H=>console.error("jq79: error in factory script",H),u=!1,p,b=()=>{if(u)return p;u=!0;let H=l.default;if(typeof H!="function")return;let q=D=>{D&&typeof D=="object"&&Object.assign(t,D)};try{let D=H(t,{$data:t,$props:t,$effect:n,...s});D instanceof Promise?p=D.then(q).catch(c):q(D)}catch(D){c(D)}return p},M=a.then(b,c);return Ps(M),l.done&&b(),{settled:M,sync:l.done===!0&&p===void 0}},zi="__JQ79_HMR_ENABLED__",Ki="__JQ79_HMR__",$e=null,Gi=e=>{if(!$e||!e.filename)return;let t=$e.get(e.filename);t||$e.set(e.filename,t=new Set),t.add(new WeakRef(e))},Ut=e=>{try{return new URL(e,document.baseURI).pathname}catch{return e}},tr=(e,t)=>{if(!$e)return 0;let n=Ut(e),s=Qt(t);ee?.forEach((l,a)=>{Ut(a)===n&&ee.set(a,Promise.resolve(t))});let r=!1,i=l=>l.name===void 0?s:s.siblings?.[l.name]??null,o=0;for(let[l,a]of $e)if(Ut(l)===n){for(let c of a){let u=c.deref();if(!u){a.delete(c);continue}let p=i(u);if(!p){r=!0;continue}u.hotReplace(p)&&o++}a.size||$e.delete(l)}return r?0:o},nr=()=>{$e??($e=new Map),globalThis[Ki]={update:tr}},ys=3e3,Vi=(e,t)=>{let n=setTimeout(()=>{console.warn(`jq79: ${e.name?`<${e.name}>`:"a component"}${e.filename?` (${e.filename})`:""} has been waiting ${ys/1e3}s for a :setup script and has rendered nothing. The template waits until every script returns or calls $mounted() - add an await $mounted() above the slow part to render first and fill in after.`)},ys);n?.unref?.(),Promise.all(t).then(()=>clearTimeout(n))},sr=e=>{if(un.test(e))return e;let t=rl.resolve;if(typeof t!="function")return e;try{return t(e)}catch{return e}},ee=new Map,rr=e=>{try{return new URL(e,document.baseURI).href.replace(/#.*$/,"")}catch{return e}},Es=e=>Promise.all([fetch(e).then(t=>{if(!t.ok)throw new Error(`failed to fetch component from ${e}: ${t.status}`);return t.text()}),lr?.then(()=>tl(e))]).then(([t])=>t),or=e=>{if(!ee)return Es(e);let t=rr(e),n=ee.get(t);if(!n){n=Es(e),ee.set(t,n);let s=n;s.catch(()=>{ee?.get(t)===s&&ee.delete(t)})}return n},nn=async e=>{let t=sr(e),n=await or(t);return new ae(n,{filename:t})},ws=new WeakSet,Ss=new Set,Zi=e=>{if(Ss.has(e))return;Ss.add(e);let t=document.createElement("link");t.rel="modulepreload";let n=on();n&&t.setAttribute("nonce",n),t.href=e,document.head.append(t)},Qi=/<script\b(?:"[^"]*"|'[^']*'|[^>"'])*>([\s\S]*?)<\/script\s*>/gi,pt=new Set,ir=(e,t,n)=>{for(let{spec:s,kind:r}of kn(e)){if(r==="component"&&n&&s in n)continue;let i=sr(r==="fetch"?s:Xt(s,r==="component"?t:void 0));r==="fetch"||Xs.test(i)?ee&&or(i).then(o=>Xi(o,i),()=>{}):un.test(i)&&Zi(i)}},Xi=(e,t)=>{let n=rr(t);if(!pt.has(n)){pt.add(n);for(let[,s]of e.matchAll(Qi))ir(s,t,void 0)}},Yi=(e,t,n)=>{for(let s of e)ws.has(s)||(ws.add(s),ir(s.content,t,n))},lr,Ji="/jq79-sw.js",el=async e=>{let t=typeof navigator>"u"?void 0:navigator.serviceWorker;if(!t)throw new Error("jq79: safeEval() compiles components in a service worker, and this page can't have one - service workers need https (or localhost). Precompile with the jq79/vite plugin instead, or use safeEval({ nonce: true }) on a page whose server issues a nonce.");let n;try{n=await t.register(e)}catch(s){throw new Error(`jq79: safeEval() couldn't register its service worker at ${e} (${s.message}). Serve jq79-sw.js from the jq79 package at your site's root, or pass its URL: safeEval({ worker: "/path/jq79-sw.js" }).`)}await t.ready,!t.controller&&await new Promise(s=>{t.addEventListener("controllerchange",()=>s(),{once:!0}),t.controller?s():n.active?.postMessage("jq79:claim")})},tl=e=>{let t=new URL(e,document.baseURI);return t.hash="",t.searchParams.set(Vn,""),new Promise((n,s)=>{let r=document.createElement("script"),i=on();i&&r.setAttribute("nonce",i),r.src=t.href,r.onload=()=>{r.remove(),n()},r.onerror=()=>{r.remove(),s(new Error(`jq79: the precompiled functions of ${e} did not load, and safeEval() can't render it without them`))},document.head.append(r)})},ue=class ue{constructor(t,n={}){k(this,"template");k(this,"scripts");k(this,"styles");k(this,"modules");k(this,"filename");k(this,"siblings");k(this,"name");k(this,"slots");k(this,"modelWriteback");k(this,"data",null);k(this,"fx",null);k(this,"content",null);k(this,"startMarker",null);k(this,"endMarker",null);k(this,"styleEls",[]);k(this,"shadowCss",null);k(this,"shadowSheets",[]);k(this,"sheetRoot",null);k(this,"ownsSharedStyles",!1);k(this,"useShadow",!1);k(this,"mountRoot",null);k(this,"resolveMounted",null);k(this,"renderDone",!1);k(this,"held",0);k(this,"onPaint",null);k(this,"destroyHooks",null);k(this,"attachHooks",null);k(this,"detachHooks",null);k(this,"onPage",!1);k(this,"emitListeners",new Map);let s=typeof t=="string"?Qt(t):t;this.template=s.template,this.scripts=s.scripts,this.styles=s.styles,this.modules=n.modules??(typeof t=="string"?void 0:t.modules),this.filename=n.filename??(typeof t=="string"?void 0:t.filename),this.siblings=s.siblings,this.name=s.name,this.adoptSiblings(),Gi(this)}adoptSiblings(){this.siblings&&Object.entries(this.siblings).forEach(([t,n])=>{n.filename??(n.filename=this.filename),n.modules??(n.modules=this.modules),this.name||(this[t]=n)})}hotReplace(t){let n=typeof t=="string"?Qt(t):t;ln.clear(),Te.clear(),Zt.clear();let s=this.startMarker,r=!!(s&&this.content),i=r&&s.isConnected,o=i?s.parentNode:null,l=i?this.endMarker.nextSibling:null,a={...this.data},c=this.useShadow;return r&&this.destroy(),this.template=n.template,this.scripts=n.scripts,this.styles=n.styles,this.siblings=n.siblings,this.adoptSiblings(),!r||(this.renderWith(a,c),!o)?!1:(c&&this.placeShadowStyles(o,l),o.insertBefore(this.content,l),this.mountRoot=o,this.settleMounted(),!0)}static debug(t){if(t){let n=de.scopedNames;for(let s in t){let r=t[s];Object.prototype.hasOwnProperty.call(de,s)?typeof r=="boolean"?de[s]=r:console.warn(`jq79: Component79.debug ignored "${s}" - the flags are booleans, and the ones it knows are: ${Object.keys(de).join(", ")}`):console.warn(`jq79: Component79.debug does not know "${s}" - the flags it has are: ${Object.keys(de).join(", ")}`)}de.scopedNames!==n&&it.clear()}return{...de}}static safeEval(t={}){sn=!0;let n=[];if(t.nonce){let r=on();r===void 0?n.push(Promise.reject(new Error("jq79: safeEval({ nonce: true }) found no nonce on this page - no <script> carries one. The nonce belongs on the script that loads the page, the one the CSP names."))):Gt=r}let s=t.worker??(t.nonce?!1:Ji);return s!==!1&&n.push(lr??(lr=el(s))),Promise.all(n).then(()=>{})}static cache(t){return t===!1?(ee=null,pt.clear()):t===!0&&(ee??(ee=new Map)),!!ee}static clearCache(){ee?.clear(),pt.clear()}static fetch(t){if(Array.isArray(t))throw new TypeError("Component79.fetch takes one URL; use fetchAll for an array");return new ht(nn(t))}static fetchAll(t){return Promise.all(t.map(nn))}static importAll(t){if(!Array.isArray(t))throw new TypeError("Component79.importAll takes an array; use import() for one");return Promise.all(t.map(n=>ct(Xt(n,void 0))))}on(t,n){return this.emitListeners.has(t)||this.emitListeners.set(t,new Set),this.emitListeners.get(t).add(n),this}off(t,n){return this.emitListeners.get(t)?.delete(n),this}render(t={}){return this.renderWith(t,!1)}renderShadow(t={}){return this.renderWith(t,!0)}renderWith(t,n){this.destroy();let s=Kn(this.scripts,tn,en),r=Fi(this.siblings,s),i=r?Object.assign(Object.create(r),t):{...t},o=new Set([...s].filter(w=>!(w in t)));o.size&&Object.defineProperty(i,er,{value:o}),this.slots&&Object.defineProperty(i,js,{value:this.slots}),Object.defineProperty(i,ft,{value:{count:0,owner:this}});let l=Ee(i),a=we(l);this.data=l,this.fx=a,this.useShadow=n,this.startMarker=document.createComment("jq79"),this.endMarker=document.createComment("/jq79");let c=this.startMarker,u=!1,p=(w,A)=>{w==="model:update"&&!u&&(u=!0,console.warn("jq79: $emit('model:update', \u2026) no longer feeds :model - call $updateModel(value) or $updateModel(name, value) instead"));let P=new CustomEvent(w,{detail:A,bubbles:!0,composed:!0,cancelable:!0});return c===this.startMarker&&this.emitListeners.get(w)?.forEach(L=>L(P,A)),P.cancelBubble||c.dispatchEvent(P),!P.defaultPrevented},b,M=new Promise(w=>{b=w});this.resolveMounted=b,this.renderDone=!1,this.held=0;let H=w=>{if(typeof w!="function")throw new TypeError("jq79: $destroyed expects a function");return c!==this.startMarker?(Me(w,"$destroyed"),()=>{}):zt(this.destroyHooks??(this.destroyHooks=[]),w)},q=(w,{immediate:A=!0}={})=>{if(typeof w!="function")throw new TypeError("jq79: $attached expects a function");if(c!==this.startMarker)return()=>{};this.watchPage();let P=zt(this.attachHooks??(this.attachHooks=[]),w);return A&&this.onPage&&Me(w,"$attached"),P},D=w=>{if(typeof w!="function")throw new TypeError("jq79: $detached expects a function");return c!==this.startMarker?(Me(w,"$detached"),()=>{}):(this.watchPage(),zt(this.detachHooks??(this.detachHooks=[]),w))},R=w=>{let A=ze(w);return H(()=>A.$dispose()),A},j=this.endMarker,O=(w=>{let A=[];for(let P=c.nextSibling;P&&P!==j;P=P.nextSibling)P instanceof Element&&(P.matches(w)&&A.push(P),A.push(...Array.from(P.querySelectorAll(w))));return A}),W=(w=>O(w)[0]??null),z=this.modules,K=w=>z&&w in z?Promise.resolve(z[w]):ct(Xt(w,this.filename)),X=w=>{if(!Array.isArray(w))throw new TypeError("$importAll takes an array; use import() for one");return Promise.all(w.map(K))},T=Object.assign(Object.create(null),{$emit:p,$updateModel:(...w)=>{let[A,P]=w.length>1?w:[void 0,w[0]];return c!==this.startMarker?!1:this.modelWriteback?.(A,P)??!1},$slots:Object.fromEntries(Object.keys(this.slots??{}).map(w=>[w,!0]))}),N=[],I=!0;Yi(this.scripts,this.filename,this.modules),this.scripts.forEach((w,A)=>{let P;N.push(new Promise(S=>{P=S}));let L=!1,B=()=>{L=!0,P()},te={$mounted:()=>(B(),M),$destroyed:H,$attached:q,$detached:D,$computed:R,$self:W,$$self:O,...T,$importAll:X,...r},f={filename:this.filename,index:A},d=":mounted"in w.attrs,m=_i(w.content),h=(()=>{if(m!==null){d&&console.warn("jq79: :mounted on a factory script renders the template before the factory has returned, so none of its bindings exist yet - await $mounted() inside the factory instead."),fs(l,en(w.content));let $=d?It(m):m;return Ui($,l,x=>a.effect(x),te,K,f)}let{vars:S,code:g}=ji(w.content);fs(l,tn(w)),S.forEach($=>{$ in l||(l[$]=void 0)});let E=d?It(g):g;return Oi(E,l,$=>a.effect($),te,K,f)})();if(h.sync)h.settled.then(B,B);else{let S=i[ft];S.count++;let g=()=>{S.count--,B()};h.settled.then(g,g)}!h.sync&&!L&&(I=!1)});let F=document.createDocumentFragment(),V=new Proxy(l,{has:(w,A)=>typeof A=="string"&&A in T||Reflect.has(w,A),get:(w,A,P)=>typeof A=="string"&&A in T&&!Reflect.has(w,A)?T[A]:Reflect.get(w,A,P)});if(F.append(this.startMarker,this.endMarker),this.content=F,I?(this.endMarker.parentNode.insertBefore(Re(this.template,V,a,n),this.endMarker),this.renderDone=!0,this.settleMounted()):(Promise.all(N).then(()=>{c===this.startMarker&&(this.endMarker.parentNode.insertBefore(Re(this.template,V,a,n),this.endMarker),this.renderDone=!0,this.settleMounted(),ue.settleAttached())}),Vi(this,N)),n)if(fn())this.shadowCss=[...this.styles.map(w=>w.content),Ie];else{let w=document.createElement("style");w.textContent=Ie,this.styleEls=[...this.styles.map(A=>{let P=document.createElement("style");return P.textContent=A.content,P}),w]}else this.styles.forEach(w=>Ai(us(w))),this.ownsSharedStyles=!0;return this}mount(t,n){let s=typeof t=="string"?xe(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0)&&this.renderWith(n??{},this.useShadow),this.attach(s)}mountShadow(t,n){let s=typeof t=="string"?xe(t):t;if(!s)throw new Error(`mount target not found: ${t}`);return(!this.content||n!==void 0||!this.useShadow)&&this.renderWith(n??{},!0),this.attach(s)}attach(t){this.mountRoot&&this.detach();let n=this.useShadow&&t instanceof Element?t.shadowRoot??t.attachShadow({mode:"open"}):t;return this.useShadow&&this.placeShadowStyles(n,null),n.appendChild(this.content),this.mountRoot=n,this.settleMounted(),ue.settleAttached(),this}isOnPage(){return this.renderDone&&this.startMarker?.isConnected===!0}watchPage(){he.has(this)||(he.add(this),this.onPage=this.isOnPage(),this.onPage||ue.queueSettle())}static queueSettle(){Kt||(Kt=!0,queueMicrotask(()=>{Kt=!1,ue.settleAttached()}))}static settleAttached(){if(he.size===0)return;let t=[...he].filter(n=>!n.onPage&&n.isOnPage());ue.inDocumentOrder(t).forEach(n=>{n.onPage||!he.has(n)||(n.onPage=!0,n.attachHooks?.slice().forEach(s=>Me(s,"$attached")))})}notifyDetached(){if(he.size===0)return;let t=[];if(this.startMarker?.isConnected){let n=new Set;for(let r=this.startMarker;r&&(n.add(r),r!==this.endMarker);r=r.nextSibling);let s=r=>{for(;r;r=r.parentNode)if(n.has(r))return!0;return!1};t=ue.inDocumentOrder([...he].filter(r=>r.onPage&&s(r.startMarker)))}else this.onPage&&(t=[this]);t.forEach(n=>{n.onPage&&(n.onPage=!1,n.detachHooks?.slice().forEach(s=>Me(s,"$detached")))})}static inDocumentOrder(t){return t.sort((n,s)=>n.startMarker.compareDocumentPosition(s.startMarker)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}placeShadowStyles(t,n){if(this.shadowCss&&typeof ShadowRoot<"u"&&t instanceof ShadowRoot){this.sheetRoot&&this.sheetRoot!==t&&this.shadowSheets.forEach(s=>Yt(this.sheetRoot,s)),this.shadowSheets.length===0&&(this.shadowSheets=this.shadowCss.map(s=>s===Ie?Jt??(Jt=dt(s)):dt(s))),this.shadowSheets.forEach(s=>pn(t,s)),this.sheetRoot=t;return}this.shadowCss&&this.styleEls.length===0&&(this.styleEls=this.shadowCss.map(s=>{let r=document.createElement("style");return r.textContent=s,r})),this.styleEls.forEach(s=>t.insertBefore(s,n))}settleMounted(){if(!this.renderDone||this.held>0)return;let t=this.onPaint;this.onPaint=null,t?.(),this.mountRoot&&this.resolveMounted?.()}holdOwner(t){this.renderDone&&this.held===0||(t.held++,this.onPaint=()=>{t.held--,t.settleMounted()})}detach(){if(!this.mountRoot||!this.content||!this.startMarker||!this.endMarker)return this;this.notifyDetached();let t=this.startMarker;for(;t;){let n=t.nextSibling;if(this.content.appendChild(t),t===this.endMarker)break;t=n}return this.mountRoot=null,this}destroy(){this.notifyDetached(),he.delete(this),this.attachHooks=null,this.detachHooks=null,this.onPage=!1;let t=this.destroyHooks;this.destroyHooks=null,t?.forEach(s=>Me(s,"$destroyed")),this.resolveMounted=null;let n=this.onPaint;return this.onPaint=null,n?.(),this.detach(),this.fx?.dispose(),this.fx=null,this.data?.$dispose(),this.styleEls.forEach(s=>s.parentNode?.removeChild(s)),this.styleEls=[],this.sheetRoot&&this.shadowSheets.forEach(s=>{s!==Jt&&Yt(this.sheetRoot,s)}),this.shadowCss=null,this.shadowSheets=[],this.sheetRoot=null,this.ownsSharedStyles&&(this.styles.forEach(s=>ki(us(s))),this.ownsSharedStyles=!1),this.content=null,this.startMarker=null,this.endMarker=null,this.renderDone=!1,this.data=null,this.resolveMounted=null,this}};k(ue,"version",po);var ae=ue,ht=class{constructor(t){k(this,"chain");this.chain=t}queue(t){return this.chain=this.chain.then(n=>(t(n),n)),this}then(t,n){return this.chain.then(t,n)}catch(t){return this.chain.catch(t)}finally(t){return this.chain.finally(t)}mount(t,n){return this.queue(s=>s.mount(t,n))}mountShadow(t,n){return this.queue(s=>s.mountShadow(t,n))}render(t={}){return this.queue(n=>n.render(t))}renderShadow(t={}){return this.queue(n=>n.renderShadow(t))}on(t,n){return this.queue(s=>s.on(t,n))}off(t,n){return this.queue(s=>s.off(t,n))}detach(){return this.queue(t=>t.detach())}destroy(){return this.queue(t=>t.destroy())}};var nl=e=>new ae(e),Me=(e,t)=>{try{e()}catch(n){console.error(`jq79: error in a ${t} hook`,n)}},zt=(e,t)=>(e.push(t),()=>{let n=e.indexOf(t);n!==-1&&e.splice(n,1)}),he=new Set,Kt=!1,ar={$:xe,$$:We,$create:Fe,$reactive:Ee,$toRaw:Q,$batch:_e,Component79:ae,C79:ae};typeof globalThis<"u"&&globalThis[zi]&&nr();return gr(sl);})();
20
19
  //# sourceMappingURL=jq79.global.js.map