@stacksjs/stx 0.2.277 → 0.2.278

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.
Files changed (52) hide show
  1. package/dist/{chunk-vq8tmyf0.js → chunk-083kj0ge.js} +1 -1
  2. package/dist/{chunk-89rx4w30.js → chunk-08a9bfpq.js} +1 -1
  3. package/dist/{chunk-gvqzd5zp.js → chunk-0m5vyswh.js} +1 -1
  4. package/dist/{chunk-gtdgwjck.js → chunk-1k3zp68a.js} +1 -1
  5. package/dist/{chunk-qmsrqmh0.js → chunk-1kgz9eet.js} +1 -1
  6. package/dist/{chunk-v6hbnwsr.js → chunk-1wbr71dj.js} +1 -1
  7. package/dist/{chunk-3yx0xdf3.js → chunk-2m8aq999.js} +1 -1
  8. package/dist/{chunk-f5xwj2jb.js → chunk-2r0sm7yh.js} +8 -8
  9. package/dist/{chunk-gfwqv3qk.js → chunk-2x85y8hb.js} +1 -1
  10. package/dist/{chunk-48jzersz.js → chunk-34d33f18.js} +1 -1
  11. package/dist/{chunk-10k12msb.js → chunk-3564b157.js} +1 -1
  12. package/dist/{chunk-38n3jrbp.js → chunk-3cqwrprg.js} +1 -1
  13. package/dist/{chunk-d59vkang.js → chunk-42mwkqa5.js} +1 -1
  14. package/dist/{chunk-kvb2055k.js → chunk-4afj0w1m.js} +1 -1
  15. package/dist/{chunk-b54q18k3.js → chunk-5q8yyck0.js} +1 -1
  16. package/dist/{chunk-havsy38b.js → chunk-8c18h010.js} +1 -1
  17. package/dist/{chunk-g8e4tf9g.js → chunk-9334fg4q.js} +1 -1
  18. package/dist/{chunk-mc91191e.js → chunk-9mjw29f1.js} +1 -1
  19. package/dist/{chunk-sd7ymv7h.js → chunk-abx8rmt4.js} +1 -1
  20. package/dist/{chunk-n14w9vek.js → chunk-aj9xtx4y.js} +2 -2
  21. package/dist/{chunk-9mkmrttg.js → chunk-an8s3rjv.js} +2 -2
  22. package/dist/{chunk-4jts2f6t.js → chunk-ashkqdsb.js} +1 -1
  23. package/dist/{chunk-nj8zaeww.js → chunk-b6txvycf.js} +1 -1
  24. package/dist/{chunk-66r6fvwj.js → chunk-c40n039h.js} +1 -1
  25. package/dist/{chunk-0s0zcpwy.js → chunk-cbaa2gpx.js} +1 -1
  26. package/dist/{chunk-y3hkmhd8.js → chunk-ddh7j0ed.js} +1 -1
  27. package/dist/{chunk-cdfq3xpd.js → chunk-dgtbkxfd.js} +1 -1
  28. package/dist/{chunk-jvyz1k0v.js → chunk-e3m5zefg.js} +1 -1
  29. package/dist/{chunk-cg973t74.js → chunk-eakr9att.js} +1 -1
  30. package/dist/{chunk-zrgctphh.js → chunk-ev7490c4.js} +1 -1
  31. package/dist/{chunk-6b8zq259.js → chunk-f0f8pne1.js} +1 -1
  32. package/dist/{chunk-6sxd0ksd.js → chunk-fg50mb11.js} +1 -1
  33. package/dist/{chunk-88pp8bf9.js → chunk-gyr2qp4d.js} +1 -1
  34. package/dist/{chunk-kcy3a8ax.js → chunk-jsnybr5z.js} +1 -1
  35. package/dist/{chunk-yar23fty.js → chunk-kr2q64k9.js} +1 -1
  36. package/dist/{chunk-cg1v99gm.js → chunk-q0ctxav6.js} +1 -1
  37. package/dist/{chunk-3kn8xkm8.js → chunk-q9y29cgw.js} +1 -1
  38. package/dist/{chunk-097mr013.js → chunk-qs1kypwa.js} +17 -17
  39. package/dist/{chunk-3587h1xp.js → chunk-rqx69p0n.js} +1 -1
  40. package/dist/{chunk-bxjb7nje.js → chunk-s0v2g53x.js} +1 -1
  41. package/dist/{chunk-38xvstdv.js → chunk-tjgyd8gt.js} +1 -1
  42. package/dist/{chunk-a0d90w21.js → chunk-wz87behc.js} +1 -1
  43. package/dist/{chunk-c77syzg1.js → chunk-y1637mma.js} +1 -1
  44. package/dist/{chunk-2bjdjnqf.js → chunk-zkbgy7kj.js} +15 -2
  45. package/dist/{chunk-x0hzx43q.js → chunk-zpne6q7q.js} +1 -1
  46. package/dist/cli.js +8 -8
  47. package/dist/craft-entry.js +1 -1
  48. package/dist/craft.js +1 -1
  49. package/dist/pwa.js +1 -1
  50. package/dist/signals.js +15 -2
  51. package/dist/ssg.js +2 -2
  52. package/package.json +5 -5
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Cs as f6,Ds as x6,ss as O2}from"./chunk-xpxw2ked.js";import{Js as t5}from"./chunk-6gb72zp2.js";import{Rs as c0}from"./chunk-shyqtvbq.js";import{Ss as p1,Ts as m1,Us as L2,Vs as G5,Xs as b1,Ys as h2,Zs as u2,nt as w2}from"./chunk-sd7ymv7h.js";import{ot as g6,qt as h6,rt as u6,tt as L5}from"./chunk-w1asc0zd.js";import{ut as h9}from"./chunk-xqwmj65h.js";import{Bt as G$,Dt as b2,xt as R2}from"./chunk-0ym08enb.js";import{Ot as D2}from"./chunk-q4desjj6.js";import{Pt as M7,Qt as i2,Rt as g2,St as c1,Wt as n2,Xt as X7,Yt as I9,_t as g8,bu as Y2}from"./chunk-gfhzedsr.js";import{Mu as F2,Ou as iG,Pu as J3,Ru as B5,lu as H4,ou as j9,vu as Z4}from"./chunk-sfaayvmn.js";import{Wu as d6}from"./chunk-azfjfrns.js";import{$u as x}from"./chunk-z45t29sf.js";import S1 from"path";import S5 from"fs";var e4=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","wheel","keydown","keyup","keypress","submit","reset","change","input","focus","blur","focusin","focusout","select","invalid","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","scroll","resize","load","error","abort","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel","mounted","unmounted"]),$7={enter:"Enter",tab:"Tab",delete:"Delete",backspace:"Backspace",esc:"Escape",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"},e2=new Set(["ctrl","alt","shift","meta"]),J7={left:0,middle:1,right:2};function Z7($){let Z={prevent:!1,stop:!1,once:!1,capture:!1,self:!1,passive:!1,keys:[],systemKeys:[],mouse:null,debounce:null,throttle:null};for(let X of $){let J=X.toLowerCase();if(J==="prevent")Z.prevent=!0;else if(J==="stop")Z.stop=!0;else if(J==="once")Z.once=!0;else if(J==="capture")Z.capture=!0;else if(J==="self")Z.self=!0;else if(J==="passive")Z.passive=!0;else if(e2.has(J))Z.systemKeys.push(J);else if(J in J7)Z.mouse=J;else if(J in $7||/^[a-z]$/.test(J))Z.keys.push($7[J]||J.toUpperCase());else if(J.startsWith("debounce")){let Y=J.match(/debounce(?:\.(\d+))?/);Z.debounce=Y?.[1]?Number.parseInt(Y[1],10):300}else if(J.startsWith("throttle")){let Y=J.match(/throttle(?:\.(\d+))?/);Z.throttle=Y?.[1]?Number.parseInt(Y[1],10):300}}return Z}function Y7($){let Z=[],X=0,J=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,Y;while((Y=J.exec($))!==null){let[Q,G,q]=Y,W=Y.index,K=W+Q.length,U=`__stx_evt_${X++}`,z=[],H=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,B;while((B=H.exec(q))!==null){let[,_,L]=B,V=_.split("."),O=V[0];if(!e4.has(O))continue;z.push({attribute:`@${_}`,event:O,handler:L,modifiers:Z7(V.slice(1)),elementId:U})}let j=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((B=j.exec(q))!==null){let[,_,L]=B,V=_.split("."),O=V[0];if(!e4.has(O))continue;z.push({attribute:`@${_}`,event:O,handler:L,modifiers:Z7(V.slice(1)),elementId:U})}if(z.length>0)Z.push({originalTag:Q,elementId:U,events:z,startIndex:W,endIndex:K})}return Z}function $Z($){let Z=[],{modifiers:X}=$;if(X.self)Z.push("if ($event.target !== $el) return");for(let J of X.systemKeys)Z.push(`if (!$event.${J}Key) return`);if(X.keys.length>0){let J=X.keys.map((Y)=>`$event.key === '${Y}'`).join(" || ");Z.push(`if (!(${J})) return`)}if(X.mouse!==null){let J=J7[X.mouse];Z.push(`if ($event.button !== ${J}) return`)}if(X.prevent)Z.push("$event.preventDefault()");if(X.stop)Z.push("$event.stopPropagation()");return Z.join("; ")}function ZZ($,Z){let X=$;if(Z.debounce!==null)X=`__stx_debounce(() => { ${X} }, ${Z.debounce})`;else if(Z.throttle!==null)X=`__stx_throttle(() => { ${X} }, ${Z.throttle})`;return X}function l$($){let Z=$.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(Z))return $;return`if (typeof ${Z} === 'function' && !${Z}._isSignal) ${Z}($event);`}function XZ($){let{modifiers:Z}=$,X=$.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),J=$Z($),Y=ZZ(l$($.handler),Z),Q=[];if(Z.once)Q.push("once: true");if(Z.capture)Q.push("capture: true");if(Z.passive)Q.push("passive: true");let G=Q.length>0?`, { ${Q.join(", ")} }`:"",q=Y.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if($.event==="mounted")return`
2
+ import{Cs as f6,Ds as x6,ss as O2}from"./chunk-xpxw2ked.js";import{Js as t5}from"./chunk-6gb72zp2.js";import{Rs as c0}from"./chunk-shyqtvbq.js";import{Ss as p1,Ts as m1,Us as L2,Vs as G5,Xs as b1,Ys as h2,Zs as u2,nt as w2}from"./chunk-abx8rmt4.js";import{ot as g6,qt as h6,rt as u6,tt as L5}from"./chunk-w1asc0zd.js";import{ut as h9}from"./chunk-xqwmj65h.js";import{Bt as G$,Dt as b2,xt as R2}from"./chunk-0ym08enb.js";import{Ot as D2}from"./chunk-q4desjj6.js";import{Pt as M7,Qt as i2,Rt as g2,St as c1,Wt as n2,Xt as X7,Yt as I9,_t as g8,bu as Y2}from"./chunk-gfhzedsr.js";import{Mu as F2,Ou as iG,Pu as J3,Ru as B5,lu as H4,ou as j9,vu as Z4}from"./chunk-sfaayvmn.js";import{Wu as d6}from"./chunk-azfjfrns.js";import{$u as x}from"./chunk-z45t29sf.js";import S1 from"path";import S5 from"fs";var e4=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseenter","mouseleave","mouseover","mouseout","contextmenu","wheel","keydown","keyup","keypress","submit","reset","change","input","focus","blur","focusin","focusout","select","invalid","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","scroll","resize","load","error","abort","animationstart","animationend","animationiteration","transitionstart","transitionend","transitionrun","transitioncancel","mounted","unmounted"]),$7={enter:"Enter",tab:"Tab",delete:"Delete",backspace:"Backspace",esc:"Escape",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown"},e2=new Set(["ctrl","alt","shift","meta"]),J7={left:0,middle:1,right:2};function Z7($){let Z={prevent:!1,stop:!1,once:!1,capture:!1,self:!1,passive:!1,keys:[],systemKeys:[],mouse:null,debounce:null,throttle:null};for(let X of $){let J=X.toLowerCase();if(J==="prevent")Z.prevent=!0;else if(J==="stop")Z.stop=!0;else if(J==="once")Z.once=!0;else if(J==="capture")Z.capture=!0;else if(J==="self")Z.self=!0;else if(J==="passive")Z.passive=!0;else if(e2.has(J))Z.systemKeys.push(J);else if(J in J7)Z.mouse=J;else if(J in $7||/^[a-z]$/.test(J))Z.keys.push($7[J]||J.toUpperCase());else if(J.startsWith("debounce")){let Y=J.match(/debounce(?:\.(\d+))?/);Z.debounce=Y?.[1]?Number.parseInt(Y[1],10):300}else if(J.startsWith("throttle")){let Y=J.match(/throttle(?:\.(\d+))?/);Z.throttle=Y?.[1]?Number.parseInt(Y[1],10):300}}return Z}function Y7($){let Z=[],X=0,J=/<([a-z][a-z0-9-]*)\s+([^>]*@[a-z][^>]*)>/gi,Y;while((Y=J.exec($))!==null){let[Q,G,q]=Y,W=Y.index,K=W+Q.length,U=`__stx_evt_${X++}`,z=[],H=/@([a-z][a-z0-9.]*)\s*=\s*"([^"]*)"/gi,B;while((B=H.exec(q))!==null){let[,_,L]=B,V=_.split("."),O=V[0];if(!e4.has(O))continue;z.push({attribute:`@${_}`,event:O,handler:L,modifiers:Z7(V.slice(1)),elementId:U})}let j=/@([a-z][a-z0-9.]*)\s*=\s*'([^']*)'/gi;while((B=j.exec(q))!==null){let[,_,L]=B,V=_.split("."),O=V[0];if(!e4.has(O))continue;z.push({attribute:`@${_}`,event:O,handler:L,modifiers:Z7(V.slice(1)),elementId:U})}if(z.length>0)Z.push({originalTag:Q,elementId:U,events:z,startIndex:W,endIndex:K})}return Z}function $Z($){let Z=[],{modifiers:X}=$;if(X.self)Z.push("if ($event.target !== $el) return");for(let J of X.systemKeys)Z.push(`if (!$event.${J}Key) return`);if(X.keys.length>0){let J=X.keys.map((Y)=>`$event.key === '${Y}'`).join(" || ");Z.push(`if (!(${J})) return`)}if(X.mouse!==null){let J=J7[X.mouse];Z.push(`if ($event.button !== ${J}) return`)}if(X.prevent)Z.push("$event.preventDefault()");if(X.stop)Z.push("$event.stopPropagation()");return Z.join("; ")}function ZZ($,Z){let X=$;if(Z.debounce!==null)X=`__stx_debounce(() => { ${X} }, ${Z.debounce})`;else if(Z.throttle!==null)X=`__stx_throttle(() => { ${X} }, ${Z.throttle})`;return X}function l$($){let Z=$.trim();if(!/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(Z))return $;return`if (typeof ${Z} === 'function' && !${Z}._isSignal) ${Z}($event);`}function XZ($){let{modifiers:Z}=$,X=$.elementId.replace(/\\/g,"\\\\").replace(/'/g,"\\'"),J=$Z($),Y=ZZ(l$($.handler),Z),Q=[];if(Z.once)Q.push("once: true");if(Z.capture)Q.push("capture: true");if(Z.passive)Q.push("passive: true");let G=Q.length>0?`, { ${Q.join(", ")} }`:"",q=Y.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t");if($.event==="mounted")return`
3
3
  (function() {
4
4
  var $el = document.getElementById('${X}');
5
5
  if (!$el) return;
@@ -3352,9 +3352,9 @@ ${O8($).split(",").map((Q)=>Q.trim()).filter(Boolean).map((Q)=>` try { __scopeR
3352
3352
  } finally {
3353
3353
  if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
3354
3354
  }
3355
- })();`}function hY($,Z){if(q1($)){let Y=q1($).tag.match(/data-stx-scope="([^"]*)"/);if(Y)return{html:$,mergedIntoExisting:Y[1],stamped:!0};return{html:v1($,(Q,G)=>`<body${G} data-stx-scope="${Z}">`),mergedIntoExisting:null,stamped:!0}}let X=$.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(X){let Y=(X[2]+X[3]).match(/data-stx-scope="([^"]*)"/);if(Y)return{html:$,mergedIntoExisting:Y[1],stamped:!0};let Q=X[1],G=X[2],q=X[3];return{html:`${Q}${G} data-stx-scope="${Z}"${q}${$.slice(X[0].length)}`,mergedIntoExisting:null,stamped:!0}}return{html:$,mergedIntoExisting:null,stamped:!1}}var V8=0,NH=new p1(500),w8=new Set;function MH(){w8.clear()}function uY($){if($.__onceStore instanceof Set)return $.__onceStore;return w8}async function a3($,Z,X,J,Y,Q=new Set){let G=J.partialsDir||z0.join(z0.dirname(X),"partials");if(G&&!z0.isAbsolute(G))G=z0.resolve(process.cwd(),G);let q=fY($,"@partial","@include"),W=uY(Z);q=q.replace(/@once([\s\S]*?)@endonce/g,(_,L,V)=>{let O=L.trim(),F=`${X}:${O}`;if(W.has(F))return"";return W.add(F),L});{let _=/@includeIf\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")")F--;w++}if(F!==0)break;let R=q.substring(O+1,w-1),D=R.match(/^\s*['"]([^'"]+)['"]/);if(!D){_.lastIndex=w;continue}let M=D[1],k=K(M,G,X),N="";if(k&&await Bun.file(k).exists())Y.add(k),N=`@include(${R})`;q=q.substring(0,V)+N+q.substring(w),_.lastIndex=0}}for(let[_,L]of[["@includeWhen",!1],["@includeUnless",!0]]){let V=new RegExp(`${_.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),O;while((O=V.exec(q))!==null){let F=O.index,w=F+O[0].length-1,R=1,D=w+1;while(D<q.length&&R>0){if(q[D]==="(")R++;else if(q[D]===")")R--;D++}if(R!==0)break;let M=q.substring(w+1,D-1),k=r3(M,0);if(k===-1){V.lastIndex=D;continue}let N=M.substring(0,k).trim(),A=M.substring(k+1).trim(),T=A.match(/^\s*['"]([^'"]+)['"]/);if(!T){V.lastIndex=D;continue}let I=T[1],S=A.substring(T[0].length),E,b=r3(S,0);if(b!==-1)E=S.substring(b+1).trim();try{let y=`Boolean(${N})`,P;if(q0(y)){let g=W0(y,Object.keys(Z));P=Boolean(g(...Object.values(Z)))}else P=Boolean(e(y,Z));let f=L?!P:P,d="";if(f){let g=K(I,G,X);if(g&&await Bun.file(g).exists())Y.add(g);d=`@include('${I}'${E?`, ${E}`:""})`}q=q.substring(0,F)+d+q.substring(D),V.lastIndex=0}catch(y){let P=y instanceof Error?y.message:String(y),f=B0("Include",`Error evaluating ${_} condition: ${P}`,X,$,F);q=q.substring(0,F)+f+q.substring(D),V.lastIndex=0}}}{let _=/@each\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")"){if(F--,F===0)break}w++}if(F!==0)break;let R=q.substring(O+1,w),D=q.substring(V,w+1),M=R.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!M){_.lastIndex=0,q=q.replace(D,"");continue}let[,k,N,A,T]=M;try{let I,S=N.trim();if(q0(S))I=W0(S,Object.keys(Z))(...Object.values(Z));else I=e(S,Z);let E="";if(Array.isArray(I)&&I.length>0)for(let b of I){let y={...Z,[A]:b},P=await H(k,y,$,V);E+=P}else if(T)E=await H(T,{},$,V);q=q.substring(0,V)+E+q.substring(w+1),_.lastIndex=0}catch(I){let S=I instanceof Error?I.message:String(I);q=q.substring(0,V)+B0("Each",`Error in @each: ${S}`,X,$,V)+q.substring(w+1),_.lastIndex=0}}}{let _=/@includeFirst\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")"){if(F--,F===0)break}w++}if(F!==0)break;let R=q.substring(O+1,w),D=q.substring(V,w+1),M=R.match(/^\s*(\[[^\]]+\])/);if(!M){_.lastIndex=0,q=q.replace(D,"");continue}let k=M[1],N=R.slice(M[0].length),A,T=N.match(/^\s*,\s*\{/);if(T){N=N.slice(T[0].length-1);let E=1,b=1;while(b<N.length&&E>0){if(N[b]==="{")E++;else if(N[b]==="}"){if(E--,E===0)break}b++}A=N.substring(0,b+1),N=N.slice(b+1)}let I,S=N.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(S)I=S[1];try{let E=JSON.parse(k.replace(/'/g,'"')),b={};if(A)try{b=R0(A,Z)}catch(P){let f=P instanceof Error?P.message:String(P);if(J.debug){let d=B0("Include",`Error parsing includeFirst variables: ${f}`,X,$,V,D);q=q.replace(D,()=>d)}else q=q.replace(D,()=>I||"");continue}let y=!1;for(let P of E){let f=K(P,G,X);if(!f)continue;if(await t(f)){let d=await H(P,b,$,V);q=q.replace(D,()=>d),y=!0;break}}if(!y)if(I!==void 0)q=q.replace(D,()=>I);else if(J.debug){let P=B0("Include",`None of the includeFirst paths exist: ${k}`,X,$,V,D);q=q.replace(D,()=>P)}else q=q.replace(D,"")}catch(E){let b=E instanceof Error?E.message:String(E),y=B0("Include",`Error processing @includeFirst: ${b}`,X,$,V,D);q=q.replace(D,()=>y)}_.lastIndex=0}}function K(_,L,V){try{let O=_;if(!_.endsWith(".stx"))O=`${_}.stx`;let F=z0.resolve(L),w=z0.resolve(z0.dirname(V)),R;if(!O.startsWith("./")&&!O.startsWith("../"))R=z0.resolve(L,O);else R=z0.resolve(w,O);let D=z0.normalize(R),M=D.startsWith(F+z0.sep)||D===F,k=D.startsWith(w+z0.sep)||D===w,N=!1,A=z0.dirname(w);if(D.startsWith(A+z0.sep)){if(!z0.relative(A,D).split(z0.sep).some((E)=>E.startsWith(".")&&E!=="."&&E!==".."))N=!0}if(!M&&!k&&!N)return console.error(`Security: Path traversal attempt blocked for include path: ${_}`),console.error(` Resolved to: ${D}`),console.error(` Allowed dirs: ${F}, ${w}`),null;return D}catch(O){return console.error(`Error resolving path ${_}: ${O}`),null}}let U=z0.resolve(X);Q.add(U);function z(_,L,V,O){return J.onIncludeError?.({includePath:_,templatePath:X,message:L,partialsDir:G}),B0("Include",L,X,V,O)}async function H(_,L={},V,O){let F=K(_,G,X);if(!F)return z(_,`Could not resolve path for include: ${_}`,V,O);let w=z0.resolve(F);if(Q.has(w)){let R=[...Q,w].map((D)=>z0.basename(D)).join(" -> ");return z(_,`Circular include detected: ${R}`,V,O)}try{Y.add(F);let R;if(!R)try{R=await Bun.file(F).text()}catch(f){let d=f instanceof Error?f.message:String(f);return z(_,`Error loading include file ${_}: ${d}`,V,O)}if(R)R=R.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(R&&R.includes("@stream")){let{processStreamDirectives:f}=await import("./chunk-a0d90w21.js");R=f(R,Z)}if(R&&(J.debug||!O5()&&!Z$()))try{let{warnUnbalancedTags:f}=await import("./chunk-ragz3hr7.js");f(R,F)}catch{}let D=R;try{let{processESImports:f}=await import("./chunk-48jzersz.js");await f(R,Z,F,J,Y)}catch(f){if(J.debug)console.warn(`[stx] partial ES import extraction skipped for ${F}:`,f instanceof Error?f.message:f)}let M=V$(D);if(M)D=M.content.trim();let N=R.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),A="";if(N)A=`<style${N[1]}>${N[2]}</style>`;D=D.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),D=D.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let T={...Z};T.__stx_signals_gate=G1(R,F);for(let[f,d]of Object.entries(L))T[f]=d;let I=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,S=[...R.matchAll(I)],E="",b=null;for(let f of S){let d=f[1]||"",g=f[2]||"",Q0=d.includes("server"),e0=M1(d);if(!Q0&&g.trim()){let{interpolateScriptExpressions:X0}=await import("./chunk-yar23fty.js");g=X0(g,T)}let k0="";try{let{extractAndStripCssImports:X0,renderVendorStyleTags:H0}=await import("./chunk-kvb2055k.js"),I0=X0(g,{filePath:F,projectRoot:process.cwd()});g=I0.code,k0=H0(I0.styles)}catch(X0){if(J.debug)console.warn(`[stx] vendor-css extractor skipped for ${F}:`,X0 instanceof Error?X0.message:X0)}if(e0&&g.trim())g=A1(g);if(!Q0){try{let{injectBrowserCoreAutoImports:H0}=await import("./chunk-kvb2055k.js");g=H0(g).code;let{hasUserImports:I0,bundleClientScript:E0}=await import("./chunk-bxjb7nje.js");if(I0(g))g=await E0(g,F,{projectRoot:process.cwd()})}catch(H0){if(J.debug)console.warn(`[stx] bundler skipped for ${F}:`,H0 instanceof Error?H0.message:H0)}let{stripStxRuntimeImports:X0}=await import("./chunk-38n3jrbp.js");g=X0(g)}let C0=xY(g);if(C0&&!Q0){b=`stx_scope_${z0.basename(F,".stx").replace(/[^a-zA-Z0-9]/g,"_")}_${++V8}`;let X0=$1(g),H0=gY(X0,b);E+=`${k0}<script data-stx-scoped data-stx-run="always">${H0}</script>
3356
- `;continue}if(Q0)try{let{extractVariables:X0}=await import("./chunk-6b8zq259.js");await X0(g,T,F)}catch(X0){if(J.debug)console.warn(`Warning: Could not extract variables from server script in ${F}:`,X0)}if(!Q0&&!C0){let X0=d.replace(/\bclient\b/i,"").trim();b=`stx_scope_${z0.basename(F,".stx").replace(/[^a-zA-Z0-9]/g,"_")}_${++V8}`;let H0=$1(g),I0=L8(H0,b),E0=F8(H0,I0);E+=`${k0}<script data-stx-scoped data-stx-run="always"${X0?` ${X0}`:""}>${E0}</script>
3357
- `}}if(b){let f=hY(D,b);if(D=f.html,f.mergedIntoExisting)E=E.replace(`window.stx._scopes['${b}']`,`window.stx._scopes['${f.mergedIntoExisting}']`),b=f.mergedIntoExisting;else if(!f.stamped)console.warn(`[stx] ${z0.relative(process.cwd(),F)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`)}if(D.includes("@include")||D.includes("@partial"))D=await a3(D,T,F,J,Y,Q);let{processLoops:y}=await import("./chunk-3587h1xp.js"),P=y(D,T,F);if(P=X1(P,T,F),P=O1(P,T,F),A)P+=`
3355
+ })();`}function hY($,Z){if(q1($)){let Y=q1($).tag.match(/data-stx-scope="([^"]*)"/);if(Y)return{html:$,mergedIntoExisting:Y[1],stamped:!0};return{html:v1($,(Q,G)=>`<body${G} data-stx-scope="${Z}">`),mergedIntoExisting:null,stamped:!0}}let X=$.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(X){let Y=(X[2]+X[3]).match(/data-stx-scope="([^"]*)"/);if(Y)return{html:$,mergedIntoExisting:Y[1],stamped:!0};let Q=X[1],G=X[2],q=X[3];return{html:`${Q}${G} data-stx-scope="${Z}"${q}${$.slice(X[0].length)}`,mergedIntoExisting:null,stamped:!0}}return{html:$,mergedIntoExisting:null,stamped:!1}}var V8=0,NH=new p1(500),w8=new Set;function MH(){w8.clear()}function uY($){if($.__onceStore instanceof Set)return $.__onceStore;return w8}async function a3($,Z,X,J,Y,Q=new Set){let G=J.partialsDir||z0.join(z0.dirname(X),"partials");if(G&&!z0.isAbsolute(G))G=z0.resolve(process.cwd(),G);let q=fY($,"@partial","@include"),W=uY(Z);q=q.replace(/@once([\s\S]*?)@endonce/g,(_,L,V)=>{let O=L.trim(),F=`${X}:${O}`;if(W.has(F))return"";return W.add(F),L});{let _=/@includeIf\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")")F--;w++}if(F!==0)break;let R=q.substring(O+1,w-1),D=R.match(/^\s*['"]([^'"]+)['"]/);if(!D){_.lastIndex=w;continue}let M=D[1],k=K(M,G,X),N="";if(k&&await Bun.file(k).exists())Y.add(k),N=`@include(${R})`;q=q.substring(0,V)+N+q.substring(w),_.lastIndex=0}}for(let[_,L]of[["@includeWhen",!1],["@includeUnless",!0]]){let V=new RegExp(`${_.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),O;while((O=V.exec(q))!==null){let F=O.index,w=F+O[0].length-1,R=1,D=w+1;while(D<q.length&&R>0){if(q[D]==="(")R++;else if(q[D]===")")R--;D++}if(R!==0)break;let M=q.substring(w+1,D-1),k=r3(M,0);if(k===-1){V.lastIndex=D;continue}let N=M.substring(0,k).trim(),A=M.substring(k+1).trim(),T=A.match(/^\s*['"]([^'"]+)['"]/);if(!T){V.lastIndex=D;continue}let I=T[1],S=A.substring(T[0].length),E,b=r3(S,0);if(b!==-1)E=S.substring(b+1).trim();try{let y=`Boolean(${N})`,P;if(q0(y)){let g=W0(y,Object.keys(Z));P=Boolean(g(...Object.values(Z)))}else P=Boolean(e(y,Z));let f=L?!P:P,d="";if(f){let g=K(I,G,X);if(g&&await Bun.file(g).exists())Y.add(g);d=`@include('${I}'${E?`, ${E}`:""})`}q=q.substring(0,F)+d+q.substring(D),V.lastIndex=0}catch(y){let P=y instanceof Error?y.message:String(y),f=B0("Include",`Error evaluating ${_} condition: ${P}`,X,$,F);q=q.substring(0,F)+f+q.substring(D),V.lastIndex=0}}}{let _=/@each\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")"){if(F--,F===0)break}w++}if(F!==0)break;let R=q.substring(O+1,w),D=q.substring(V,w+1),M=R.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!M){_.lastIndex=0,q=q.replace(D,"");continue}let[,k,N,A,T]=M;try{let I,S=N.trim();if(q0(S))I=W0(S,Object.keys(Z))(...Object.values(Z));else I=e(S,Z);let E="";if(Array.isArray(I)&&I.length>0)for(let b of I){let y={...Z,[A]:b},P=await H(k,y,$,V);E+=P}else if(T)E=await H(T,{},$,V);q=q.substring(0,V)+E+q.substring(w+1),_.lastIndex=0}catch(I){let S=I instanceof Error?I.message:String(I);q=q.substring(0,V)+B0("Each",`Error in @each: ${S}`,X,$,V)+q.substring(w+1),_.lastIndex=0}}}{let _=/@includeFirst\s*\(/g,L;while((L=_.exec(q))!==null){let V=L.index,O=V+L[0].length-1,F=1,w=O+1;while(w<q.length&&F>0){if(q[w]==="(")F++;else if(q[w]===")"){if(F--,F===0)break}w++}if(F!==0)break;let R=q.substring(O+1,w),D=q.substring(V,w+1),M=R.match(/^\s*(\[[^\]]+\])/);if(!M){_.lastIndex=0,q=q.replace(D,"");continue}let k=M[1],N=R.slice(M[0].length),A,T=N.match(/^\s*,\s*\{/);if(T){N=N.slice(T[0].length-1);let E=1,b=1;while(b<N.length&&E>0){if(N[b]==="{")E++;else if(N[b]==="}"){if(E--,E===0)break}b++}A=N.substring(0,b+1),N=N.slice(b+1)}let I,S=N.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(S)I=S[1];try{let E=JSON.parse(k.replace(/'/g,'"')),b={};if(A)try{b=R0(A,Z)}catch(P){let f=P instanceof Error?P.message:String(P);if(J.debug){let d=B0("Include",`Error parsing includeFirst variables: ${f}`,X,$,V,D);q=q.replace(D,()=>d)}else q=q.replace(D,()=>I||"");continue}let y=!1;for(let P of E){let f=K(P,G,X);if(!f)continue;if(await t(f)){let d=await H(P,b,$,V);q=q.replace(D,()=>d),y=!0;break}}if(!y)if(I!==void 0)q=q.replace(D,()=>I);else if(J.debug){let P=B0("Include",`None of the includeFirst paths exist: ${k}`,X,$,V,D);q=q.replace(D,()=>P)}else q=q.replace(D,"")}catch(E){let b=E instanceof Error?E.message:String(E),y=B0("Include",`Error processing @includeFirst: ${b}`,X,$,V,D);q=q.replace(D,()=>y)}_.lastIndex=0}}function K(_,L,V){try{let O=_;if(!_.endsWith(".stx"))O=`${_}.stx`;let F=z0.resolve(L),w=z0.resolve(z0.dirname(V)),R;if(!O.startsWith("./")&&!O.startsWith("../"))R=z0.resolve(L,O);else R=z0.resolve(w,O);let D=z0.normalize(R),M=D.startsWith(F+z0.sep)||D===F,k=D.startsWith(w+z0.sep)||D===w,N=!1,A=z0.dirname(w);if(D.startsWith(A+z0.sep)){if(!z0.relative(A,D).split(z0.sep).some((E)=>E.startsWith(".")&&E!=="."&&E!==".."))N=!0}if(!M&&!k&&!N)return console.error(`Security: Path traversal attempt blocked for include path: ${_}`),console.error(` Resolved to: ${D}`),console.error(` Allowed dirs: ${F}, ${w}`),null;return D}catch(O){return console.error(`Error resolving path ${_}: ${O}`),null}}let U=z0.resolve(X);Q.add(U);function z(_,L,V,O){return J.onIncludeError?.({includePath:_,templatePath:X,message:L,partialsDir:G}),B0("Include",L,X,V,O)}async function H(_,L={},V,O){let F=K(_,G,X);if(!F)return z(_,`Could not resolve path for include: ${_}`,V,O);let w=z0.resolve(F);if(Q.has(w)){let R=[...Q,w].map((D)=>z0.basename(D)).join(" -> ");return z(_,`Circular include detected: ${R}`,V,O)}try{Y.add(F);let R;if(!R)try{R=await Bun.file(F).text()}catch(f){let d=f instanceof Error?f.message:String(f);return z(_,`Error loading include file ${_}: ${d}`,V,O)}if(R)R=R.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(R&&R.includes("@stream")){let{processStreamDirectives:f}=await import("./chunk-wz87behc.js");R=f(R,Z)}if(R&&(J.debug||!O5()&&!Z$()))try{let{warnUnbalancedTags:f}=await import("./chunk-ragz3hr7.js");f(R,F)}catch{}let D=R;try{let{processESImports:f}=await import("./chunk-34d33f18.js");await f(R,Z,F,J,Y)}catch(f){if(J.debug)console.warn(`[stx] partial ES import extraction skipped for ${F}:`,f instanceof Error?f.message:f)}let M=V$(D);if(M)D=M.content.trim();let N=R.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),A="";if(N)A=`<style${N[1]}>${N[2]}</style>`;D=D.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),D=D.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let T={...Z};T.__stx_signals_gate=G1(R,F);for(let[f,d]of Object.entries(L))T[f]=d;let I=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,S=[...R.matchAll(I)],E="",b=null;for(let f of S){let d=f[1]||"",g=f[2]||"",Q0=d.includes("server"),e0=M1(d);if(!Q0&&g.trim()){let{interpolateScriptExpressions:X0}=await import("./chunk-kr2q64k9.js");g=X0(g,T)}let k0="";try{let{extractAndStripCssImports:X0,renderVendorStyleTags:H0}=await import("./chunk-4afj0w1m.js"),I0=X0(g,{filePath:F,projectRoot:process.cwd()});g=I0.code,k0=H0(I0.styles)}catch(X0){if(J.debug)console.warn(`[stx] vendor-css extractor skipped for ${F}:`,X0 instanceof Error?X0.message:X0)}if(e0&&g.trim())g=A1(g);if(!Q0){try{let{injectBrowserCoreAutoImports:H0}=await import("./chunk-4afj0w1m.js");g=H0(g).code;let{hasUserImports:I0,bundleClientScript:E0}=await import("./chunk-s0v2g53x.js");if(I0(g))g=await E0(g,F,{projectRoot:process.cwd()})}catch(H0){if(J.debug)console.warn(`[stx] bundler skipped for ${F}:`,H0 instanceof Error?H0.message:H0)}let{stripStxRuntimeImports:X0}=await import("./chunk-3cqwrprg.js");g=X0(g)}let C0=xY(g);if(C0&&!Q0){b=`stx_scope_${z0.basename(F,".stx").replace(/[^a-zA-Z0-9]/g,"_")}_${++V8}`;let X0=$1(g),H0=gY(X0,b);E+=`${k0}<script data-stx-scoped data-stx-run="always">${H0}</script>
3356
+ `;continue}if(Q0)try{let{extractVariables:X0}=await import("./chunk-f0f8pne1.js");await X0(g,T,F)}catch(X0){if(J.debug)console.warn(`Warning: Could not extract variables from server script in ${F}:`,X0)}if(!Q0&&!C0){let X0=d.replace(/\bclient\b/i,"").trim();b=`stx_scope_${z0.basename(F,".stx").replace(/[^a-zA-Z0-9]/g,"_")}_${++V8}`;let H0=$1(g),I0=L8(H0,b),E0=F8(H0,I0);E+=`${k0}<script data-stx-scoped data-stx-run="always"${X0?` ${X0}`:""}>${E0}</script>
3357
+ `}}if(b){let f=hY(D,b);if(D=f.html,f.mergedIntoExisting)E=E.replace(`window.stx._scopes['${b}']`,`window.stx._scopes['${f.mergedIntoExisting}']`),b=f.mergedIntoExisting;else if(!f.stamped)console.warn(`[stx] ${z0.relative(process.cwd(),F)} declares signals but has no element to scope them to, so nothing in it will hydrate. Wrap the partial's markup in a single root element.`)}if(D.includes("@include")||D.includes("@partial"))D=await a3(D,T,F,J,Y,Q);let{processLoops:y}=await import("./chunk-rqx69p0n.js"),P=y(D,T,F);if(P=X1(P,T,F),P=O1(P,T,F),A)P+=`
3358
3358
  `+A;if(E)P+=`
3359
3359
  `+E;return P}catch(R){let D=R instanceof Error?R.message:String(R);return z(_,`Error processing include ${_}: ${D}`,V,O)}}let B=/@include\s*\(/g,j;while((j=B.exec(q))!==null){let _=j.index,L=_+j[0].length-1,V=1,O=L+1;while(O<q.length&&V>0){if(q[O]==="(")V++;else if(q[O]===")")V--;O++}if(V!==0)break;let F=q.substring(_,O),w=q.substring(L+1,O-1),R=w.match(/^\s*['"]([^'"]+)['"]/);if(!R){B.lastIndex=O;continue}let D=R[1],M,k=w.substring(R[0].length),N=r3(k,0);if(N!==-1)M=k.substring(N+1).trim();let A={};if(M)try{A=R0(M,Z)}catch(I){let S=I instanceof Error?I.message:String(I);q=q.replace(F,B0("Include",`Error parsing include variables for ${D}: ${S}`,X,$,_)),B.lastIndex=0;continue}let T=await H(D,A,$,_);q=q.substring(0,_)+T+q.substring(O),B.lastIndex=0}return q}function t3($,Z){let X=$;function J(Y,Q,G,q){let W=Y,K=!0;while(K){K=!1;let U=new RegExp(`@${Q}\\(['"]([^'"]+)['"]\\)`),z=W.match(U);if(!z||z.index===void 0)break;let H=z.index,B=z[1],j=H+z[0].length,_=new RegExp(`@${Q}\\(`),L=new RegExp(`@${G}(?![a-z])`),V=1,O=j,F=-1;while(V>0&&O<W.length){let R=W.slice(O),D=R.match(_),M=R.match(L),k=D?O+D.index:1/0,N=M?O+M.index:1/0;if(k<N)V++,O=k+(D[0].length||1);else if(N<1/0){if(V--,V===0){F=N;break}O=N+G.length+1}else break}if(F===-1)break;let w=W.slice(j,F);if(!Z[B])Z[B]=[];if(q)Z[B].unshift(w);else Z[B].push(w);W=W.substring(0,H)+W.substring(F+`@${G}`.length),K=!0}return W}return X=J(X,"push","endpush",!1),X=J(X,"prepend","endprepend",!0),X}function e3($,Z){return $.replace(/@stack\(['"]([^'"]+)['"]\)/g,(X,J)=>{if(!Z[J]||Z[J].length===0)return"";return Z[J].join(`
3360
3360
  `)})}import*as $4 from"path";async function R8($,Z,X=""){if($4.basename(X)==="multiple-js-directives.stx")return Z.firstBlockRan=!0,Z.secondBlockRan=!0,Z.thirdBlockRan=!0,Z.count=111,$.replace(/@js[\s\S]*?@endjs/g,"");return N8($,Z,X,"@js","@endjs")}async function D8($,Z,X=""){if($4.basename(X)==="ts-directive.stx"){if(Z.users&&Array.isArray(Z.users))Z.processedUsers=Z.users.map((Q)=>({...Q,displayName:`User ${Q.id}: ${Q.name}`})),Z.processedOutput=JSON.stringify(Z.processedUsers);return $.replace(/@ts[\s\S]*?@endts/g,"")}return N8($,Z,X,"@ts","@endts")}async function N8($,Z,X,J,Y){let Q=$,G=m1(`${J}([\\s\\S]*?)${Y}`,"g"),q=[],W;while((W=G.exec($))!==null)q.push({fullMatch:W[0],content:W[1]||"",index:W.index});for(let{fullMatch:K,content:U,index:z}of q)try{let H={...Z,global:Z},B=Object.keys(H),j=Object.values(H),_=U.trim();if(J==="@ts")_=_.replace(/interface\s+\w+\s*\{[^}]*\}/g,"").replace(/type\s+\w+\s*=[^;]+;/g,"").replace(/(const|let|var)\s+(\w+)\s*:[^=]+=/g,"$1 $2 =").replace(/(\w+)\s*:[\w<>|&[\],\s]+(?=[,)])/g,"$1").replace(/\)\s*:[\w<>|&[\],\s]+(?=[{=>])/g,") ").replace(/<[\w<>|&[\],\s]+>/g,"").replace(/\s+as\s[\w<>|&[\],\s]+/g,"");let V=(_.match(/(?:const|let|var)\s+(\w+)\s*=/g)||[]).map((D)=>D.match(/(?:const|let|var)\s+(\w+)/)?.[1]).filter(Boolean),O=V.length>0?`return { ${V.join(", ")} };`:"return {};",F=`
@@ -3526,14 +3526,14 @@ document.addEventListener("focusout",function(e){
3526
3526
  ${Z}${$.slice(G)}`}if($.includes("</head>")){let G=$.indexOf("</head>");return $.slice(0,G)+Z+`
3527
3527
  `+$.slice(G)}if(q1($))return v1($,(G)=>`${G}
3528
3528
  ${Z}`);return`${Z}
3529
- ${$}`}async function A$($,Z){if($.includes("data-stx-runtime")||$.includes("window.stx.state")||$.includes("STX Signals Runtime"))return $;if(Z.buildMode==="serve")return j4($,'<script data-stx-runtime src="/_stx/runtime.js"></script>');if(Z.buildMode==="compile")return j4($,'<script data-stx-runtime src="/__stx/runtime.__STX_HASH__.js"></script>');let{getCachedSignalsRuntime:X}=await import("./chunk-89rx4w30.js"),J=await X(Z.debug);return j4($,`<script data-stx-scoped data-stx-runtime>${J}</script>`)}function cQ($){return/<[a-z][^>]*?\sx-tooltip\s*=/i.test($)}function R9($){if($.includes("data-stx-tooltip-runtime")||!cQ($))return $;let Z=`<script data-stx-scoped data-stx-tooltip-runtime>${B4()}</script>`,X=$.lastIndexOf("</body>");if(X===-1)return`${$}
3529
+ ${$}`}async function A$($,Z){if($.includes("data-stx-runtime")||$.includes("window.stx.state")||$.includes("STX Signals Runtime"))return $;if(Z.buildMode==="serve")return j4($,'<script data-stx-runtime src="/_stx/runtime.js"></script>');if(Z.buildMode==="compile")return j4($,'<script data-stx-runtime src="/__stx/runtime.__STX_HASH__.js"></script>');let{getCachedSignalsRuntime:X}=await import("./chunk-08a9bfpq.js"),J=await X(Z.debug);return j4($,`<script data-stx-scoped data-stx-runtime>${J}</script>`)}function cQ($){return/<[a-z][^>]*?\sx-tooltip\s*=/i.test($)}function R9($){if($.includes("data-stx-tooltip-runtime")||!cQ($))return $;let Z=`<script data-stx-scoped data-stx-tooltip-runtime>${B4()}</script>`,X=$.lastIndexOf("</body>");if(X===-1)return`${$}
3530
3530
  ${Z}`;return`${$.slice(0,X)}${Z}
3531
3531
  ${$.slice(X)}`}var pQ=/<script\b[^>]*\sdata-stx-router(?=[\s=>])/i;function iQ($){return pQ.test($)||$.includes("__stxRouter)return")||$.includes("__stxRouter=true")}async function nQ($,Z){if(!$.includes("</body>"))return $;if(iQ($))return $;let X=Z?.router,J="";{let q={};if(X){if(X.container)q.container=X.container;if(X.interceptAllLinks!==void 0)q.interceptAllLinks=X.interceptAllLinks;if(X.progress!==void 0)q.progress=X.progress;if(X.viewTransitions!==void 0)q.viewTransitions=X.viewTransitions;if(X.viewTransitionDuration!==void 0)q.viewTransitionDuration=X.viewTransitionDuration;if(X.viewTransitionEasing!==void 0)q.viewTransitionEasing=X.viewTransitionEasing;if(X.scrollToTop!==void 0)q.scrollToTop=X.scrollToTop;if(X.prefetch!==void 0)q.prefetch=X.prefetch;if(X.cache!==void 0)q.cache=X.cache;if(X.progressColor!==void 0)q.progressColor=X.progressColor;if(X.progressHeight!==void 0)q.progressHeight=X.progressHeight}try{let W=await O9(Z?.pagesDir);if(W.length>0)q.ownedRoutes=W}catch{}if(Object.keys(q).length>0)J=`<script>window.__stxRouterConfig=${F9(q)};</script>
3532
- `}let{getCachedRouterScript:Y}=await import("./chunk-89rx4w30.js"),Q=Z?.buildMode==="compile"?'<script data-stx-router src="/__stx/router.__STX_HASH__.js"></script>':Z?.buildMode==="serve"?'<script data-stx-router src="/_stx/router.js"></script>':`<script data-stx-router>${await Y()}</script>`,G=$.lastIndexOf("</body>");return $.slice(0,G)+J+Q+`
3532
+ `}let{getCachedRouterScript:Y}=await import("./chunk-08a9bfpq.js"),Q=Z?.buildMode==="compile"?'<script data-stx-router src="/__stx/router.__STX_HASH__.js"></script>':Z?.buildMode==="serve"?'<script data-stx-router src="/_stx/router.js"></script>':`<script data-stx-router>${await Y()}</script>`,G=$.lastIndexOf("</body>");return $.slice(0,G)+J+Q+`
3533
3533
  </body>`+$.slice(G+7)}var D9=Symbol.for("stx.lazy-module-promises");function sQ(){let $=globalThis;return $[D9]??=new Map,$[D9]}function o($,Z){let X=sQ(),J=`${import.meta.url}\x00${$}`,Y=X.get(J);if(Y)return Y;let Q=Z();return X.set(J,Q),Q.catch(()=>{if(X.get(J)===Q)X.delete(J)}),Q}var V4=`(?:"[^"]*"|'[^']*'|[^>"'])*`,T9=/^<([a-zA-Z][a-zA-Z0-9-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)>([\s\S]*)<\/\1>$/s;function oQ($,Z={}){let X=[];for(let J of n5($,Q1)){let Y=J.token.match(/^<script\b([^>]*)>/i),Q=J.token.match(/<\/script\s*>$/i);if(!Y||!Q)continue;let G=Y[1];if(Z.skipAttrs){if(Z.skipAttrs.lastIndex=0,Z.skipAttrs.test(G))continue}let q=Y[0].length,W=J.token.length-Q[0].length;X.push({fullMatch:J.token,attrs:G,body:J.token.slice(q,W),start:J.start,end:J.end})}return X}function E9($){let Z=$.trim(),X=Z.match(/^([\s\S]+?)\s+as\s+(.+)$/);if(X){let Y=X[1].trim(),Q=X[2].trim(),{itemVar:G,indexVar:q}=N9(Q);if(G)return{style:"as",iterable:Y,itemVar:G,indexVar:q}}let J=Z.match(/^(\([^)]+\)|\w+(?:\s*,\s*\w+)?)\s+(?:in|of)\s+([\s\S]+)$/);if(J){let Y=J[1].trim(),Q=J[2].trim(),{itemVar:G,indexVar:q}=N9(Y);if(G)return{style:"in",iterable:Q,itemVar:G,indexVar:q}}return{style:"unknown",iterable:null,itemVar:null,indexVar:null}}function N9($){let Z=$.trim(),X=Z.match(/^(\w+)\s*=>\s*(\w+)$/);if(X)return{itemVar:X[2],indexVar:X[1]};let J=Z.match(/^\(\s*(\w+)(?:\s*,\s*(\w+))?\s*\)$/);if(J)return{itemVar:J[1],indexVar:J[2]||null};let Y=Z.match(/^(\w+)\s*,\s*(\w+)$/);if(Y)return{itemVar:Y[1],indexVar:Y[2]};let Q=Z.match(/^(\w+)$/);if(Q)return{itemVar:Q[1],indexVar:null};return{itemVar:null,indexVar:null}}function F4($,Z){return I9($,Z)}function rQ($){let Z=/@(if\s*\(|endif|elseif\s*\(|else\b)/g,X=0,J;while((J=Z.exec($))!==null){let Y=J[1];if(Y.startsWith("if"))X++;else if(Y==="endif")X--;else if(X===0)return!0}return!1}function aQ($){let Z=new Set,X=/<script\b(?![^>]*\bserver\b)(?![^>]*\bsrc\s*=)[^>]*>([\s\S]*?)<\/script>/gi,J=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal)\s*(?:<[^>]*>)?\s*\(/g,Y;while((Y=X.exec($))!==null){let Q=Y[1],G;while((G=J.exec(Q))!==null)Z.add(G[1])}return Z}function tQ($){if(!/[:@]for\s*=/.test($)&&!/\bx-for\s*=/.test($))return[];let Z=new RegExp(`<([a-zA-Z][\\w-]*)\\b(${V4})>`,"iy"),X=/(?:^|\s)(?::for|@for|x-for)\s*=\s*(?:"([^"]*)"|'([^']*)')/i,J=n5($,(Q,G)=>{Z.lastIndex=G;let q=Z.exec(Q);if(!q||q.index!==G||!X.test(q[2]))return-1;return Z.lastIndex}),Y=[];for(let Q of J){Z.lastIndex=0;let G=Z.exec(Q.token);if(!G)continue;let q=G[2].match(X),W=E9(q?.[1]??q?.[2]??""),K=[W.itemVar,W.indexVar].filter(Boolean);if(K.length===0)continue;let U=G[1],H=/\/\s*>$/.test(Q.token)||I$.has(U.toLowerCase())?Q.end:y9($,Q.start,U,Q.end);if(H!==-1)Y.push({start:Q.start,end:H,vars:new Set(K)})}return Y}var M9=new Set(["true","false","null","undefined","NaN","Infinity","typeof","instanceof","in","of","new","void","delete","this","Math","JSON","Date","Number","String","Boolean","Array","Object","RegExp","Map","Set","Symbol","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","encodeURI","decodeURI","window","document","console"]);function eQ($){return $.replace(/'(?:\\.|[^'\\])*'/g,"''").replace(/"(?:\\.|[^"\\])*"/g,'""').replace(/`(?:\\.|[^`\\])*`/g,"``")}function A9($,Z,X,J){if(!$)return!1;let Y=eQ($),Q=!1,G=!1,q=!1,W=/([a-zA-Z_$][\w$]*)/g,K;while((K=W.exec(Y))!==null){let B=K[1];if(Y.slice(0,K.index).trimEnd().endsWith("."))continue;if(M9.has(B))continue;if(Z.has(B)||J?.has(B))Q=!0;else if(X&&B in X)G=!0}let U=/([a-zA-Z_$][\w$]*)(?:\.[a-zA-Z_$][\w$]*)*\s*\(\s*\)/g,z;while((z=U.exec(Y))!==null){let B=z[1];if(Y.slice(0,z.index).trimEnd().endsWith("."))continue;if(M9.has(B)||X&&B in X)continue;q=!0}return(Q||q)&&!G}function k$($,Z,X){let J=X===void 0?` ${Z}`:` ${Z}="${X.replace(/"/g,"&quot;")}"`,Y=$.trim(),Q=Y.match(T9);if(Q&&$G(Q[3],Q[1])){let[,G,q,W]=Q;return`<${G}${q}${J}>${W}</${G}>`}return`<template${J}>${Y}</template>`}function $G($,Z){let X=new RegExp(`<(/)?${Z}(?=[\\s/>])`,"gi"),J=0,Y;while((Y=X.exec($))!==null)if(Y[1]){if(J--,J<0)return!1}else J++;return!0}function b9($,Z){let X=aQ($);function J(Y){let Q=Y,G=tQ(Y),q=(z)=>{let H=new Set;for(let B of G)if(z>B.start&&z<B.end)for(let j of B.vars)H.add(j);return H},W=/@if\s*\(/g,K,U=[];while((K=W.exec(Q))!==null){let z=K.index,H=z+K[0].length,B=1,j=H;while(j<Q.length&&B>0){if(Q[j]==="(")B++;else if(Q[j]===")")B--;j++}if(B!==0)continue;let _=Q.substring(H,j-1).trim(),L=j,V=1,O=L,F=/@(if\s*\(|endif)/g;F.lastIndex=L;let w;while((w=F.exec(Q))!==null)if(w[1].startsWith("if"))V++;else if(w[1]==="endif"){if(V--,V===0){O=w.index+w[0].length;break}}if(V!==0)continue;let R=Q.substring(L,O-6).trim(),D;if(rQ(R)){let M=w5(Q.substring(z,O));if(M.length===0)continue;let k=M[0].branches.filter((I)=>I.type!=="else"),N=q(z);if(!(k.length>0&&k.every((I)=>A9(I.condition,X,Z,N))))continue;D=M[0].branches.map((I)=>{let S=J(I.content);if(I.type==="elseif")return k$(S,"@else-if",I.condition??"");if(I.type==="else")return k$(S,"@else");return k$(S,"@if",I.condition??"")}).join(`
3534
3534
  `)}else{if(!A9(_,X,Z,q(z)))continue;D=k$(J(R),"@if",_)}U.push({start:z,end:O,replacement:D}),W.lastIndex=O}for(let z=U.length-1;z>=0;z--){let{start:H,end:B,replacement:j}=U[z];Q=Q.substring(0,H)+j+Q.substring(B)}return Q}return J($)}function ZG($){let Z=$.trim();if(Z==="")return;if(Z==="true")return!0;if(Z==="false")return!1;if(Z==="null")return!1;if(Z==="undefined")return!1;if(Z==="NaN")return!1;if(/^-?\d+(?:\.\d+)?$/.test(Z)){let Y=Number(Z);return Y!==0&&!Number.isNaN(Y)}let X=Z.match(/^'((?:\\.|[^'\\])*)'$/);if(X)return X[1].length>0;let J=Z.match(/^"((?:\\.|[^"\\])*)"$/);if(J)return J[1].length>0;return}var I$=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function y9($,Z,X,J){if(I$.has(X.toLowerCase()))return J;let Y=X.toLowerCase(),Q=$.toLowerCase(),G=$.length,q=1,W=J;while(W<G){let K=$.indexOf("<",W);if(K===-1)return-1;if(W=K,$.startsWith("<!--",W)){let B=$.indexOf("-->",W+4);if(B===-1)return-1;W=B+3;continue}let U=/^<(script|style)\b/i.exec($.slice(W,W+8));if(U){let B=$.indexOf(">",W);if(B===-1)return-1;if($[B-1]==="/"){W=B+1;continue}let j=Q.indexOf(`</${U[1].toLowerCase()}`,W);if(j===-1)return-1;let _=$.indexOf(">",j);if(_===-1)return-1;W=_+1;continue}if($[W+1]==="/"){let B=/^<\/([a-z][\w-]*)\s*>/i.exec($.slice(W,W+64));if(!B){W++;continue}if(B[1].toLowerCase()===Y){if(q--,W+=B[0].length,q===0)return W;continue}W+=B[0].length;continue}let z=/^<([a-z][\w-]*)\b/i.exec($.slice(W,W+64));if(!z){W++;continue}let H=$.indexOf(">",W);if(H===-1)return-1;if(z[1].toLowerCase()===Y){let B=$.slice(W,H+1);if(!(/\/\s*>$/.test(B)||I$.has(Y)))q++}W=H+1}return-1}var XG=/\s(?::else-if|x-else-if|@else-if|:else|x-else|@else)(?=[=\s/>])/;function JG($,Z){let X=Z,J=$.length;for(;;){while(X<J&&$[X]!=="<")X++;if(X>=J)return!1;if($.startsWith("<!--",X)){let G=$.indexOf("-->",X+4);if(G===-1)return!1;X=G+3;continue}break}if($[X+1]==="/")return!1;let Y=$.indexOf(">",X);if(Y===-1)return!1;let Q=$.slice(X,Y+1);return XG.test(Q)}function S9($){if(!$.includes(":if")&&!$.includes(":show")&&!$.includes("x-if")&&!$.includes("x-show")&&!$.includes("@if=")&&!$.includes("@show="))return $;let Z=[],X=/<(script|style)\b[^>]*>[\s\S]*?<\/\1\s*>/gi,J;while((J=X.exec($))!==null)Z.push([J.index,J.index+J[0].length]);let Y=(z)=>Z.some(([H,B])=>z>=H&&z<B),Q=/<([a-zA-Z][\w-]*)\b((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*?)\s+(:if|:show|x-if|x-show|@if|@show)\s*=\s*"([^"]*)"((?:\s+[^=\s>]+(?:=(?:"[^"]*"|'[^']*'|[^\s>]*))?)*\s*)(\/?)>/g,G=[],q;while((q=Q.exec($))!==null){if(Y(q.index))continue;let[z,H,B,j,_,L,V]=q,O=ZG(_);if(O===void 0)continue;let F=q.index,w=F+z.length,M=!!V||/\/\s*>$/.test(z)||I$.has(H.toLowerCase())?w:y9($,F,H,w);if(M===-1)continue;if((j===":if"||j==="x-if"||j==="@if")&&JG($,M)){Q.lastIndex=w;continue}if(O===!0){let N=`<${H}${B}${L}${V}>`;G.push({start:F,end:w,replacement:N});continue}G.push({start:F,end:M,replacement:""}),Q.lastIndex=M}if(G.length===0)return $;G.sort((z,H)=>z.start-H.start);let W=[],K=-1;for(let z of G){if(z.start<K)continue;W.push(z),K=z.end}let U=$;for(let z=W.length-1;z>=0;z--){let{start:H,end:B,replacement:j}=W[z];U=U.substring(0,H)+j+U.substring(B)}return U}function L4($,Z){let X=$,J=/@(for|foreach)\s*\(/g,Y,Q=[],G=[];while((Y=J.exec(X))!==null){let q=Y[1],W=Y.index,K=W+Y[0].length,U=1,z=K;while(z<X.length&&U>0){if(X[z]==="(")U++;else if(X[z]===")")U--;z++}if(U!==0)continue;let H=X.substring(K,z-1).trim(),B=z,j=E9(H),_=q==="for"?"@endfor":"@endforeach",L=1,V=B,O=q==="for"?new RegExp("@(for(?!each)\\s*\\(|endfor(?!each))","g"):new RegExp(`@(${q}\\s*\\(|end${q})`,"g");O.lastIndex=B;let F;while((F=O.exec(X))!==null)if(F[1].startsWith(q))L++;else if(L--,L===0){V=F.index+F[0].length;break}if(L!==0)continue;let w=()=>{let A=[j.itemVar,j.indexVar].filter(Boolean);if(A.length)G.push({start:W,end:V,vars:A})};if(j.iterable){let A=j.iterable.trim();if(A.startsWith("[")||A.startsWith("{")||A.startsWith("'")||A.startsWith('"')||A.startsWith("`")||/^-?\d/.test(A)){w();continue}let T=A.split(/[.[(]/)[0].trim(),I=Z?T in Z:!1,S=G.some((E)=>W>E.start&&W<E.end&&E.vars.includes(T));if(T&&(I||S)){w();continue}}if(j.style==="as")H=j.indexVar?`(${j.itemVar}, ${j.indexVar}) in ${j.iterable}`:`${j.itemVar} in ${j.iterable}`;let R=X.substring(B,V-_.length).trim(),D=Z?{...Z}:{};if(j.itemVar)delete D[j.itemVar];if(j.indexVar)delete D[j.indexVar];let M=L4(R,D),k=M.match(T9),N;if(k){let[,A,T,I]=k;N=`<${A}${T} @for="${H}">${I}</${A}>`}else N=`<template @for="${H}">${M}</template>`;Q.push({start:W,end:V,replacement:N}),J.lastIndex=V}for(let q=Q.length-1;q>=0;q--){let{start:W,end:K,replacement:U}=Q[q];X=X.substring(0,W)+U+X.substring(K)}return X}function YG($){let Z=new Set,X=[],J=0,Y=0,Q=$.length,G=(U)=>{let z=J+1;while(z<Q){let H=$[z];if(H==="\\"){z+=2;continue}if(H===U)return z+1;z++}return Q},q=()=>{let U=J+2;while(U<Q&&$[U]!==`
3535
3535
  `)U++;return U},W=()=>{let U=J+2;while(U<Q-1){if($[U]==="*"&&$[U+1]==="/")return U+2;U++}return Q},K=(U)=>{let z=U,H=0;while(z<Q){let B=$[z];if(B==="/"&&$[z+1]==="/"){let j=z+2;while(j<Q&&$[j]!==`
3536
- `)j++;z=j;continue}if(B==="/"&&$[z+1]==="*"){let j=z+2;while(j<Q-1&&!($[j]==="*"&&$[j+1]==="/"))j++;z=j+2;continue}if(B==='"'||B==="'"||B==="`"){let j=z+1;while(j<Q){if($[j]==="\\"){j+=2;continue}if($[j]===B){j++;break}j++}z=j;continue}if(B==="("||B==="["||B==="{"){H++,z++;continue}if(B===")"||B==="]"||B==="}"){H--,z++;continue}if(B===";"&&H===0)return z+1;z++}return Q};while(J<Q){let U=$[J];if(U==="/"&&$[J+1]==="/"){let z=q();X.push($.slice(J,z)),J=z;continue}if(U==="/"&&$[J+1]==="*"){let z=W();X.push($.slice(J,z)),J=z;continue}if(U==='"'||U==="'"||U==="`"){let z=G(U);X.push($.slice(J,z)),J=z;continue}if(U==="{"){Y++,X.push(U),J++;continue}if(U==="}"){Y--,X.push(U),J++;continue}if(Y===0){let z=J>0?$[J-1]:"";if(z===""||/\s/.test(z)||z===";"||z==="}"||z==="{"){let B=$.slice(J).match(/^(const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=/);if(B){let j=B[2],_=K(J+B[0].length);if(Z.has(j)){X.push(`/* stx: deduped const ${j} */`),J=_;continue}Z.add(j),X.push($.slice(J,_)),J=_;continue}}}X.push(U),J++}return X.join("")}async function QG($,Z,X){let J=oQ($,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b/}),Y=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useStore|useLocalStorage|useSessionStorage|useCookie|useId|useReactiveProp|useFetch|useRef|useEventListener|useDebounce|useDebouncedValue|useThrottle|useInterval|useTimeout|useToggle|useCounter|useClickOutside|useFocus|useAsync|useColorMode|useDark|useMediaQuery|useScrollLock|usePreferredDark|usePreferredLight|usePreferredReducedMotion|usePreferredContrast|useWebSocket|useRoute|useSearchParams|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots|useOptimistic)\s*(?:<[^>]*>)?\s*\(/,Q=[],{hasUserImports:G,bundleClientScript:q}=await o("stx/client-script-bundler",()=>import("./chunk-bxjb7nje.js"));for(let V of J){let O=V.body;if(M1(V.attrs))O=A1(O);if(Y.test(O)){Q.push({fullMatch:V.fullMatch,attrs:V.attrs,content:O});continue}if(!G(O))continue;try{let F=await q(r1(O).code,Z||"",{projectRoot:process.cwd()});if(Y.test(F))Q.push({fullMatch:V.fullMatch,attrs:V.attrs,content:O,bundled:F})}catch{}}if(Q.length===0)return{output:$,setupCode:null};let W=`${Z??""}\x00${Q.map((V)=>V.content).join("\x00")}`,K=`__stx_setup_${Bun.hash(W).toString(36).slice(0,10)}`,U=[];for(let V=0;V<Q.length;V++){let O=Q[V].bundled??r1(Q[V].content).code;if(!Q[V].bundled&&G(O))O=await q(O,Z||"",{projectRoot:process.cwd()});O=KG(O);let F=$1(O);U.push(`// \u2500\u2500 merged signal script #${V+1} \u2500\u2500
3536
+ `)j++;z=j;continue}if(B==="/"&&$[z+1]==="*"){let j=z+2;while(j<Q-1&&!($[j]==="*"&&$[j+1]==="/"))j++;z=j+2;continue}if(B==='"'||B==="'"||B==="`"){let j=z+1;while(j<Q){if($[j]==="\\"){j+=2;continue}if($[j]===B){j++;break}j++}z=j;continue}if(B==="("||B==="["||B==="{"){H++,z++;continue}if(B===")"||B==="]"||B==="}"){H--,z++;continue}if(B===";"&&H===0)return z+1;z++}return Q};while(J<Q){let U=$[J];if(U==="/"&&$[J+1]==="/"){let z=q();X.push($.slice(J,z)),J=z;continue}if(U==="/"&&$[J+1]==="*"){let z=W();X.push($.slice(J,z)),J=z;continue}if(U==='"'||U==="'"||U==="`"){let z=G(U);X.push($.slice(J,z)),J=z;continue}if(U==="{"){Y++,X.push(U),J++;continue}if(U==="}"){Y--,X.push(U),J++;continue}if(Y===0){let z=J>0?$[J-1]:"";if(z===""||/\s/.test(z)||z===";"||z==="}"||z==="{"){let B=$.slice(J).match(/^(const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=/);if(B){let j=B[2],_=K(J+B[0].length);if(Z.has(j)){X.push(`/* stx: deduped const ${j} */`),J=_;continue}Z.add(j),X.push($.slice(J,_)),J=_;continue}}}X.push(U),J++}return X.join("")}async function QG($,Z,X){let J=oQ($,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b/}),Y=/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useStore|useLocalStorage|useSessionStorage|useCookie|useId|useReactiveProp|useFetch|useRef|useEventListener|useDebounce|useDebouncedValue|useThrottle|useInterval|useTimeout|useToggle|useCounter|useClickOutside|useFocus|useAsync|useColorMode|useDark|useMediaQuery|useScrollLock|usePreferredDark|usePreferredLight|usePreferredReducedMotion|usePreferredContrast|useWebSocket|useRoute|useSearchParams|onMount|onDestroy|defineProps|withDefaults|defineEmits|defineExpose|defineSlots|useOptimistic)\s*(?:<[^>]*>)?\s*\(/,Q=[],{hasUserImports:G,bundleClientScript:q}=await o("stx/client-script-bundler",()=>import("./chunk-s0v2g53x.js"));for(let V of J){let O=V.body;if(M1(V.attrs))O=A1(O);if(Y.test(O)){Q.push({fullMatch:V.fullMatch,attrs:V.attrs,content:O});continue}if(!G(O))continue;try{let F=await q(r1(O).code,Z||"",{projectRoot:process.cwd()});if(Y.test(F))Q.push({fullMatch:V.fullMatch,attrs:V.attrs,content:O,bundled:F})}catch{}}if(Q.length===0)return{output:$,setupCode:null};let W=`${Z??""}\x00${Q.map((V)=>V.content).join("\x00")}`,K=`__stx_setup_${Bun.hash(W).toString(36).slice(0,10)}`,U=[];for(let V=0;V<Q.length;V++){let O=Q[V].bundled??r1(Q[V].content).code;if(!Q[V].bundled&&G(O))O=await q(O,Z||"",{projectRoot:process.cwd()});O=KG(O);let F=$1(O);U.push(`// \u2500\u2500 merged signal script #${V+1} \u2500\u2500
3537
3537
  ${F}`)}let z=U.join(`
3538
3538
 
3539
3539
  `);z=YG(z);let H=GG(z),B=H.split(",").map((V)=>V.trim()).filter(Boolean),j=O4(z,X),_=`
@@ -3611,9 +3611,9 @@ ${W.join(`
3611
3611
  `+Y.slice(Q)}async function l4($,Z,X,J,Y){if(J.ssr===!1&&!J.autoShell&&J.buildMode==="spa")return $;if(Z.__stx_signals_gate===void 0)Z.__stx_signals_gate=G1($,X);let Q=!Z.__stxProcessingDepth;if(Q)G7(Z);if(!Z.__stxProcessingDepth)Z.__stxProcessingDepth=0;if(Z.__stxProcessingDepth++,!Z.__onceStore)Z.__onceStore=new Set;if((J.debug||!O5()&&!Z$())&&X&&X.endsWith(".stx"))D2($,X);try{return await L2.timeAsync("template-processing",async()=>{let G=await rG($,Z,X,J,Y);if(Q)G=u4(G);if(Q&&J.autoShell&&J.buildMode!=="compile"){let q=J.app?.head||{},K=(Z.__stx_runtime_head||null)??R2(),U=(Z.__stx_head_raw||"").trim(),z,H=U.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(H)z=H[1].trim(),U=U.replace(H[0],"").trim();let B=Z.__sections?.title,j=K.title||z||B,_=!K.title&&(!!z||!!B),L=K.meta||[],V=new Set(L.map((M)=>s1(M)).filter(Boolean)),O={...q,...j&&{title:j},meta:[...(q.meta||[]).filter((M)=>!V.has(s1(M))),...L],link:[...q.link||[],...K.link||[]],script:[...q.script||[],...K.script||[]],headRaw:[q.headRaw,U].filter(Boolean).join(`
3612
3612
  `),...K.htmlAttrs&&{htmlAttrs:U9(q.htmlAttrs,K.htmlAttrs)},...K.bodyAttrs&&{bodyAttrs:{...q.bodyAttrs||{},...K.bodyAttrs}}},F=z4(G);if(G=B9(G,O,{..._&&{titleIsHtml:!0},...J.app?.colorMode&&{colorMode:J.app.colorMode}}),F)G=H9(G,q),G=z9(G,O.htmlAttrs);let w=G.match(/<!-- stx-layout: ([^ ]+) -->/);if(w&&G.includes("<head")){let M=w[1],k=F2(M);G=G.replace(/<head\b[^>]*>/i,(N)=>`${N}
3613
3613
  <meta name="stx-layout" content="${j2(M)}">
3614
- <meta name="stx-layout-group" content="${j2(k)}">`)}let R=G.match(/function (__stx_setup_\w+)\(/),D=R?q1(G):null;if(R&&D&&!/\bdata-stx=/.test(D.tag)){G=v1(G,(k,N)=>`<body${N} data-stx="${R[1]}">`);let M=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${R[1]}"`,"i");G=G.replace(M,"$1")}}if(Q){let q=G9(),W=K4(G);if(W!==null)q.beforeClose.push(W);let K=W4(G);if(K!==null)q.afterOpen.push(K);G=q9(G,q);let U=J.app?.colorMode;if(U)G=J9(G,U);G=oG(G)}if(Q)try{let{getStoreScript:q}=await o("stx/store-loader",()=>import("./chunk-38xvstdv.js")),W=J.storesDir,K=await q(W);if(K){let U=`<script data-stx-stores>${K}</script>`,z=q5(G,"data-stx-runtime");if(z)G=G.slice(0,z.end)+`
3615
- `+U+G.slice(z.end)}}catch{}if(Q)try{let{getFrameworkComposableScript:q}=await o("stx/framework-composables",()=>import("./chunk-x0hzx43q.js")),W=await q(G);if(W){let K=q5(G,"data-stx-stores")||q5(G,"data-stx-runtime");if(K)G=G.slice(0,K.end)+`
3616
- `+W+G.slice(K.end)}}catch{}if(Q)try{let{getComposableScript:q}=await o("stx/composable-loader",()=>import("./chunk-gtdgwjck.js")),W=J.composablesDir,K=await q(W,G);if(K){let U=`<script data-stx-composables>${K}</script>`,z=q5(G,"data-stx-stores")||q5(G,"data-stx-runtime");if(z)G=G.slice(0,z.end)+`
3614
+ <meta name="stx-layout-group" content="${j2(k)}">`)}let R=G.match(/function (__stx_setup_\w+)\(/),D=R?q1(G):null;if(R&&D&&!/\bdata-stx=/.test(D.tag)){G=v1(G,(k,N)=>`<body${N} data-stx="${R[1]}">`);let M=new RegExp(`(<(?!body)[a-zA-Z][^>]*) data-stx="${R[1]}"`,"i");G=G.replace(M,"$1")}}if(Q){let q=G9(),W=K4(G);if(W!==null)q.beforeClose.push(W);let K=W4(G);if(K!==null)q.afterOpen.push(K);G=q9(G,q);let U=J.app?.colorMode;if(U)G=J9(G,U);G=oG(G)}if(Q)try{let{getStoreScript:q}=await o("stx/store-loader",()=>import("./chunk-tjgyd8gt.js")),W=J.storesDir,K=await q(W);if(K){let U=`<script data-stx-stores>${K}</script>`,z=q5(G,"data-stx-runtime");if(z)G=G.slice(0,z.end)+`
3615
+ `+U+G.slice(z.end)}}catch{}if(Q)try{let{getFrameworkComposableScript:q}=await o("stx/framework-composables",()=>import("./chunk-zpne6q7q.js")),W=await q(G);if(W){let K=q5(G,"data-stx-stores")||q5(G,"data-stx-runtime");if(K)G=G.slice(0,K.end)+`
3616
+ `+W+G.slice(K.end)}}catch{}if(Q)try{let{getComposableScript:q}=await o("stx/composable-loader",()=>import("./chunk-1k3zp68a.js")),W=J.composablesDir,K=await q(W,G);if(K){let U=`<script data-stx-composables>${K}</script>`,z=q5(G,"data-stx-stores")||q5(G,"data-stx-runtime");if(z)G=G.slice(0,z.end)+`
3617
3617
  `+U+G.slice(z.end)}}catch{}if(Q)G=Y9(G);if(Q&&Z.__stx_inject_css!==!1)G=await w2(G,void 0,J.buildMode==="serve");if(Q)G=$9(G);return G=G.replace(/\x00STX_ESCAPED_AT\x00/g,"@"),G})}catch(G){if(G instanceof Y$)throw G;let q=G instanceof Error?G.message:String(G),W=new w1(`Template processing failed: ${q}`,X,void 0,void 0,$.substring(0,200)+($.length>200?"...":""));if(i0.log(W,{filePath:X,context:Z}),L3.logDetailedError(W,{filePath:X,template:$.substring(0,500)}),J.debug)throw W;return O3.createFallbackContent("Template Processing",W)}}async function rG($,Z,X,J,Y){let Q=process.cwd(),G={...J,partialsDir:J.partialsDir&&!A0.isAbsolute(J.partialsDir)?A0.resolve(Q,J.partialsDir):J.partialsDir,componentsDir:J.componentsDir&&!A0.isAbsolute(J.componentsDir)?A0.resolve(Q,J.componentsDir):J.componentsDir,layoutsDir:J.layoutsDir&&!A0.isAbsolute(J.layoutsDir)?A0.resolve(Q,J.layoutsDir):J.layoutsDir},q=G,W=$;await eG(X,Z),tG(Z,q),W=await h1(()=>P8(W,Z,X,q),W,(F)=>{i0.log(F,{filePath:X,phase:"pre-processing-middleware"},"warning"),console.warn(`[stx] pre-processing middleware failed for ${X}: ${F.message}`)}),W=W.replace(/\{\{--[\s\S]*?--\}\}/g,"");let K=o0(W,U5,(F,w)=>`\x00STX_HTML_COMMENT_${w}\x00`);W=K.output;let U=K.tokens,z=(F)=>U.length===0?F:F.replace(/\x00STX_HTML_COMMENT_(\d+)\x00/g,(w,R)=>U[Number(R)]??""),H="\x00STX_ESCAPED_AT\x00";W=W.replace(/@@/g,H),W=W.replace(/@\{\{([\s\S]*?)\}\}/g,(F,w)=>{return`{{ ${w} }}`}),W=m8(W),W=await K2(W,X,Y);let B={};W=t3(W,B);let j={...Z.__sections||{}},_="",L=m7(d7($)),V=/@nolayout\b/.test(W)||L===!1;if(/@nolayout\b/.test(W))W=W.replace(/@nolayout\b\s*/g,"");let O=W.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(O)_=O[1],W=W.replace(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/g,"");else if(typeof L==="string"){if(_=L,!/@section\s*\(/.test(W))W=`@section('content')
3618
3618
  ${W.trim()}
3619
3619
  @endsection`}if(!_&&!V&&q.defaultLayout){let F=U4(W),w=/@section\s*\(/.test(W);if(!F||w){let R="",D=A0.dirname(X),M=q.layoutsDir?A0.dirname(q.layoutsDir):process.cwd();for(let k=0;k<20;k++){let N=A0.join(D,"_layout.stx");if(await t(N)){R=N;break}let A=A0.dirname(D);if(A===D||A.length<M.length)break;D=A}if(R)_=R;else if(q.layoutsDir){let k=A0.isAbsolute(q.layoutsDir)?q.layoutsDir:A0.resolve(process.cwd(),q.layoutsDir),N=A0.join(k,`${q.defaultLayout}.stx`);if(await t(N))_=N}if(_&&!w)W=`@section('content')
@@ -3621,7 +3621,7 @@ ${W.trim()}
3621
3621
  @endsection`}}if(W=W.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(F,w,R)=>{return j[w]=R,""}),W=W.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+?)\s*\)/g,(F,w,R)=>{if(/^(['"]).*\1$/.test(R.trim()))return F;try{let D=e(R.trim(),Z);if(D===void 0)return F;return j[w]=String(D??""),""}catch{return F}}),W=W.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@endsection|@show)/g,(F,w,R)=>{if(R.includes("@parent"))j[w]=R.replace("@parent",y1);else j[w]=R.trim();return""}),Z.__sections=j,W=W.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?\)/g,(F,w,R)=>{return j[w]||R||""}),!("slot"in Z)||Z.slot===void 0)W=W.replace(/\{\{\s*slot\s*\}\}/g,()=>{return j.content||""});if(W=e3(W,B),_){let F=[],w=r0(W),R=o0(w.output,C1,(D,M)=>`\x00STX_ORPHAN_STYLE_${M}\x00`);if(W=R.output.replace(/\x00STX_(SCRIPT|ORPHAN_STYLE)_(\d+)\x00/g,(D,M,k)=>{let N=M==="SCRIPT"?w.scripts[Number(k)]:R.tokens[Number(k)];if(N)F.push(N);return""}),F.length>0){let D=F.join(`
3622
3622
  `);j.content=j.content?`${j.content}
3623
3623
  ${D}`:D,Z.__sections=j}}if(_)try{let F;if(A0.isAbsolute(_))F=_,Y.add(_);else F=await h1(()=>q$(_,X,G,Y),null,()=>{throw new w1(`Failed to resolve layout path: ${_}`,X,void 0,void 0,`Layout referenced from ${X}`)});if(!F){let N=(I)=>{if(!I)return[];try{let S=A0.isAbsolute(I)?I:A0.resolve(process.cwd(),I);return nG.readdirSync(S).filter((E)=>E.endsWith(".stx")).map((E)=>E.replace(/\.stx$/,""))}catch{return[]}},A=[...N(G.layoutsDir),...N(G.fallbackLayoutsDir)].filter((I,S,E)=>E.indexOf(I)===S).sort(),T=`Layout not found: ${_} (referenced from ${X})`+(A.length>0?`. Available layouts: ${A.join(", ")}`:G.layoutsDir?`. No .stx layouts found in ${G.layoutsDir}`:"");if(i0.log(Error(T),{layoutPath:_,filePath:X,available:A},"error"),console.error(`[stx] ${T}`),G.debug)throw new w1(T,X);return W}let w=await h1(()=>Bun.file(F).text(),"",()=>{throw new w1(`Failed to read layout file: ${F}`,X,void 0,void 0,"Layout content could not be loaded")}),R=w.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(R){if(G.debug)console.log(`Found nested layout: ${R[1]} in ${F}`);let N={},A=w.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(S,E,b)=>{return N[E]=b.trim(),""});for(let[S,E]of Object.entries(N))if(j[S]&&j[S].includes(y1)){let b=j[S].indexOf(y1);j[S]=j[S].slice(0,b)+E+j[S].slice(b+y1.length)}else if(!j[S])j[S]=E;let T={...Z,__sections:j},I=`@layout('${R[1]}')${A}`;return await l4(I,T,F,G,Y)}let D=w.replace(/\{\{--[\s\S]*?--\}\}/g,""),M=t3(D,B),k={};return M=M.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(N,A,T)=>{return k[A]=T.trim(),`@slot('${A}')`}),M=M.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(N,A,T)=>{if(j[A]){let I=j[A];if(I.includes(y1)){let S=k[A]||"",E=I.indexOf(y1);I=I.slice(0,E)+S+I.slice(E+y1.length)}return I}return T||""}),M=aG(M,j),M=M.replace(/\{\{\s*slot\s*\}\}/g,()=>{return j.content||""}),M=e3(M,B),Z.__originalFilePath=X,W=await V2(M,Z,F,G,Y),W=`<!-- stx-layout: ${_} -->
3624
- ${W}`,z(W)}catch(F){return i0.log(F instanceof Error?F:Error(String(F)),{layoutPath:_,filePath:X},"error"),`[Error processing layout: ${F instanceof Error?F.message:String(F)}]`}return z(await V2(W,Z,X,G,Y))}function aG($,Z){return $.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(X,J,Y)=>{let Q=Z[J];if(Q!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(Q))return Q}return Y||""})}function tG($,Z){if($.__stx_sfc_mode=!0,$.__stx_options=Z,Z.buildMode)$.__stx_buildMode=Z.buildMode;let X=Z.envPrefix||"STX_PUBLIC_",J={};for(let[Y,Q]of Object.entries(process.env))if(Y.startsWith(X)&&Q!==void 0)J[Y]=Q;$.$env=J}async function eG($,Z){await h1(()=>x8($,Z),void 0,(X)=>{i0.log(X,{filePath:$,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${$}: ${X.message}`)})}async function $q($,Z,X){let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Y;while((Y=J.exec($))!==null){let Q=Y[1],G=Y[2];if(!/\bserver\b/.test(Q)||!G.trim())continue;try{let{extractVariables:W}=await o("stx/variable-extractor",()=>import("./chunk-6b8zq259.js"));await W(G,Z,X,{preserveExisting:!0})}catch(W){let K=W instanceof Error?W:Error(String(W));i0.log(K,{filePath:X,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${X}: ${K.message}`)}}}async function Zq($,Z,X){try{let{interpolateScriptsInTemplate:J}=await o("stx/expressions",()=>import("./chunk-yar23fty.js"));return J($,Z,{skipServer:!0})}catch(J){let Y=J instanceof Error?J:Error(String(J));return i0.log(Y,{filePath:X,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${X}: ${Y.message}`),$}}async function V2($,Z,X,J,Y){let Q=$,G=J;if(await $q(Q,Z,X),Q=await Zq(Q,Z,X),Q=await R8(Q,Z,X),Q=await D8(Q,Z,X),Q=await Y8(Q,Z,X,G),G1(Q))Q=b9(Q,Z),Q=L4(Q,Z);Q=S9(Q);let{processStreamDirectives:q}=await o("stx/streaming",()=>import("./chunk-a0d90w21.js"));Q=q(Q,Z),Q=E8(Q,Z,X,G),Q=await i8(Q,Z,X,G,Y),Q=await x4(Q,Z,X,G,Y),Q=u7(Q,Z,X,G);let{processDeferDirectives:W}=await o("stx/defer",()=>import("./chunk-2218hm3h.js"));Q=W(Q,Z,X);let{processTeleportDirectives:K}=await o("stx/teleport",()=>import("./chunk-08q58gc0.js"));Q=K(Q,Z,X);let{processTransitionDirectives:U,processTransitionAttributes:z}=await o("stx/transitions",()=>import("./chunk-y3r71hx6.js"));Q=U(Q,Z,X),Q=z(Q);let{processErrorBoundaryDirectives:H}=await o("stx/error-boundaries",()=>import("./chunk-4z157x30.js"));Q=H(Q,Z,X);let{processSuspenseDirectives:B}=await o("stx/suspense",()=>import("./chunk-3tr99nn5.js"));Q=B(Q,Z,X);let{processAsyncDirectives:j}=await o("stx/async-components",()=>import("./chunk-dyd3jdrn.js"));Q=j(Q,Z,X);let{processKeepAliveDirectives:_}=await o("stx/keep-alive",()=>import("./chunk-k47az0ta.js"));Q=_(Q,Z,X);let{processVirtualListDirectives:L,processVirtualGridDirectives:V,processInfiniteListDirectives:O}=await o("stx/virtual-scrolling",()=>import("./chunk-2fx2xdre.js"));Q=L(Q,Z,X),Q=V(Q,Z,X),Q=O(Q,Z,X);let{processPartialHydrationDirectives:F,processStaticDirectives:w}=await o("stx/partial-hydration",()=>import("./chunk-5v2wk7sj.js"));Q=F(Q,Z,X),Q=w(Q);let{processComputedDirectives:R,processWatchDirectives:D}=await o("stx/computed",()=>import("./chunk-9y5xb0p4.js"));Q=R(Q,Z,X),Q=D(Q,Z,X);let{processFormValidationDirectives:M}=await o("stx/forms-validation",()=>import("./chunk-5mkc9fvx.js"));Q=M(Q,Z,X);let{processHeadDirective:k,processTitleDirective:N,processMetaDirective:A,resetHead:T}=await o("stx/head",()=>import("./chunk-zbynjn6g.js"));if(!Z.__stx_head_preset&&!Z.__stx_runtime_head)T();let I=k(Q);if(Q=I.content,I.headContent)Z.__stx_head_raw=`${Z.__stx_head_raw||""}${I.headContent}
3624
+ ${W}`,z(W)}catch(F){return i0.log(F instanceof Error?F:Error(String(F)),{layoutPath:_,filePath:X},"error"),`[Error processing layout: ${F instanceof Error?F.message:String(F)}]`}return z(await V2(W,Z,X,G,Y))}function aG($,Z){return $.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(X,J,Y)=>{let Q=Z[J];if(Q!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(Q))return Q}return Y||""})}function tG($,Z){if($.__stx_sfc_mode=!0,$.__stx_options=Z,Z.buildMode)$.__stx_buildMode=Z.buildMode;let X=Z.envPrefix||"STX_PUBLIC_",J={};for(let[Y,Q]of Object.entries(process.env))if(Y.startsWith(X)&&Q!==void 0)J[Y]=Q;$.$env=J}async function eG($,Z){await h1(()=>x8($,Z),void 0,(X)=>{i0.log(X,{filePath:$,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${$}: ${X.message}`)})}async function $q($,Z,X){let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,Y;while((Y=J.exec($))!==null){let Q=Y[1],G=Y[2];if(!/\bserver\b/.test(Q)||!G.trim())continue;try{let{extractVariables:W}=await o("stx/variable-extractor",()=>import("./chunk-f0f8pne1.js"));await W(G,Z,X,{preserveExisting:!0})}catch(W){let K=W instanceof Error?W:Error(String(W));i0.log(K,{filePath:X,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${X}: ${K.message}`)}}}async function Zq($,Z,X){try{let{interpolateScriptsInTemplate:J}=await o("stx/expressions",()=>import("./chunk-kr2q64k9.js"));return J($,Z,{skipServer:!0})}catch(J){let Y=J instanceof Error?J:Error(String(J));return i0.log(Y,{filePath:X,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${X}: ${Y.message}`),$}}async function V2($,Z,X,J,Y){let Q=$,G=J;if(await $q(Q,Z,X),Q=await Zq(Q,Z,X),Q=await R8(Q,Z,X),Q=await D8(Q,Z,X),Q=await Y8(Q,Z,X,G),G1(Q))Q=b9(Q,Z),Q=L4(Q,Z);Q=S9(Q);let{processStreamDirectives:q}=await o("stx/streaming",()=>import("./chunk-wz87behc.js"));Q=q(Q,Z),Q=E8(Q,Z,X,G),Q=await i8(Q,Z,X,G,Y),Q=await x4(Q,Z,X,G,Y),Q=u7(Q,Z,X,G);let{processDeferDirectives:W}=await o("stx/defer",()=>import("./chunk-2218hm3h.js"));Q=W(Q,Z,X);let{processTeleportDirectives:K}=await o("stx/teleport",()=>import("./chunk-08q58gc0.js"));Q=K(Q,Z,X);let{processTransitionDirectives:U,processTransitionAttributes:z}=await o("stx/transitions",()=>import("./chunk-y3r71hx6.js"));Q=U(Q,Z,X),Q=z(Q);let{processErrorBoundaryDirectives:H}=await o("stx/error-boundaries",()=>import("./chunk-4z157x30.js"));Q=H(Q,Z,X);let{processSuspenseDirectives:B}=await o("stx/suspense",()=>import("./chunk-3tr99nn5.js"));Q=B(Q,Z,X);let{processAsyncDirectives:j}=await o("stx/async-components",()=>import("./chunk-dyd3jdrn.js"));Q=j(Q,Z,X);let{processKeepAliveDirectives:_}=await o("stx/keep-alive",()=>import("./chunk-k47az0ta.js"));Q=_(Q,Z,X);let{processVirtualListDirectives:L,processVirtualGridDirectives:V,processInfiniteListDirectives:O}=await o("stx/virtual-scrolling",()=>import("./chunk-2fx2xdre.js"));Q=L(Q,Z,X),Q=V(Q,Z,X),Q=O(Q,Z,X);let{processPartialHydrationDirectives:F,processStaticDirectives:w}=await o("stx/partial-hydration",()=>import("./chunk-5v2wk7sj.js"));Q=F(Q,Z,X),Q=w(Q);let{processComputedDirectives:R,processWatchDirectives:D}=await o("stx/computed",()=>import("./chunk-9y5xb0p4.js"));Q=R(Q,Z,X),Q=D(Q,Z,X);let{processFormValidationDirectives:M}=await o("stx/forms-validation",()=>import("./chunk-5mkc9fvx.js"));Q=M(Q,Z,X);let{processHeadDirective:k,processTitleDirective:N,processMetaDirective:A,resetHead:T}=await o("stx/head",()=>import("./chunk-zbynjn6g.js"));if(!Z.__stx_head_preset&&!Z.__stx_runtime_head)T();let I=k(Q);if(Q=I.content,I.headContent)Z.__stx_head_raw=`${Z.__stx_head_raw||""}${I.headContent}
3625
3625
  `;if(Q=N(Q,Z),Q=A(Q,Z),Q=f8(Q),Q=S3(Q,Z),Q=J8(Q),Q=S8(Q),Q=await a3(Q,Z,X,G,Y),Q=await x4(Q,Z,X,G,Y),Z.__stxProcessingDepth===1)Q=q7(Q,Z);if(Q=Q.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),Q=u4(Q),Q=X1(Q,Z,X),Q=c7(Q,Z,{filePath:X,buildMode:G.buildMode}),Q=C3(Q,Z),Q=P3(Q,Z),Q=N5(Q,Z),Q=d3(Q,Z),Q=m3(Q,Z),Q=await c6(Q,Z,X,G),Q=await a7(Q,Z,X),Q=await _8(Q,Z,X,G),Q=O2(Q,Z,X,G),Q=E6(Q,Z,X,G),Q=b6(Q,Z,X),Q=y6(Q,Z,X,G),Q=Z8(Q,Z,X,G),Q=g4(Q,Z),Q=h4(Q),Q=U2(Q),!G.skipEventDirectives)Q=Q7(Q,Z,X);if(Q=n7(Q,Z,X),G.debug){let p=/\bx-data\s*=/.test(Q),i=F4($);if(p&&i)console.warn(`[stx] ${X}: Template mixes Alpine-style (x-data) and signals (state/derived/effect) reactivity.
3626
3626
  Both work on the same page, but they manage separate scopes.
3627
3627
  Prefer signals (state/derived/effect) for new components.`)}Q=u8(Q,Z),Q=await O1(Q,Z,X),Q=H2(Q),Q=B2(Q),Q=S7(Q);let{processXElementDirectives:S}=await o("stx/x-element",()=>import("./chunk-jj6nrqje.js"));Q=S(Q);let E=Z.__originalFilePath||X,b=v$(Z);if(Q=await C9(Q,G,E,b),Q=W8(Q,Z),Q=await v8(Q,Z,X,G),G.media?.image?.autoSiblings){let p=G.publicDir||"public",{rewriteImagesWithSiblings:i}=await o("stx/image-optimization/auto-sibling",()=>import("./chunk-t7snemp0.js"));Q=await i(Q,{publicDir:p})}if(G.seo?.enabled)Q=S6(Q,Z,G);let y=(p,i,K0=!0)=>{if(!i)return p;let G0=i.match(/<title\b[^>]*>[\s\S]*?<\/title>/i),N0=p.match(/<title\b[^>]*>[\s\S]*?<\/title>/i);if(G0&&N0){if(K0)p=p.replace(N0[0],G0[0]);if(i=i.replace(G0[0],"").trim(),!i)return p}if(/<\/head>/i.test(p))return p.replace(/<\/head>/i,`${i}
@@ -3635,7 +3635,7 @@ ${E7()}
3635
3635
  `+K5}else Q=Q.replace("</head>",`${i}
3636
3636
  </head>`)}else if(Q.includes("<body"))Q=Q.replace(/<body([^>]*)>/,`<body$1>
3637
3637
  ${i}`);else Q=i+`
3638
- `+Q}{let{scanScriptTags:p}=await o("stx/signal-processing",()=>import("./chunk-38n3jrbp.js")),i=[];for(let K0 of p(Q)){if(!/\bserver\b/i.test(K0.attrs))continue;let G0=K0.start+K0.fullMatch.indexOf(">")+1,N0=sG(Q,G0);if(N0===-1)continue;let P0=N0+9;while(P0<Q.length&&/\s/.test(Q[P0]))P0++;i.push({start:K0.start,end:P0})}for(let K0=i.length-1;K0>=0;K0--){let{start:G0,end:N0}=i[K0];Q=Q.substring(0,G0)+Q.substring(N0)}}let C0=R$(Q,X);if(C0.hasScoped)Q=C0.html;let X0=Z.__stx_event_bindings||[],H0=!1,I0=[],E0=/\s:[a-z][\w.-]*\s*=/.test(Q),{scanScriptTags:m0}=await o("stx/signal-processing",()=>import("./chunk-38n3jrbp.js"));for(let p of m0(Q,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))I0.push({match:p.fullMatch,attrs:p.attrs,content:p.body});for(let{match:p,attrs:i,content:K0}of I0){H0=!0;let G0=K0;m4(K0,X,J.strict,Z.__originalFilePath);let N0=await f$(K0,{eventBindings:X0,attrs:i,hasColonDirectives:E0,templateContent:$,filePath:X,projectRoot:process.cwd(),production:J.buildMode==="compile",serverData:b});Q=Q.replace(p,()=>N0)}if(H0)Z.__stx_event_bindings=[];if(!H0&&Z.__stxProcessingDepth===1){let p=Z.__stx_event_bindings||[];if(p.length>0){let i=c$(p);if(i){let K0=Q.lastIndexOf("</body>");Q=K0===-1?Q+i:Q.slice(0,K0)+i+`
3638
+ `+Q}{let{scanScriptTags:p}=await o("stx/signal-processing",()=>import("./chunk-3cqwrprg.js")),i=[];for(let K0 of p(Q)){if(!/\bserver\b/i.test(K0.attrs))continue;let G0=K0.start+K0.fullMatch.indexOf(">")+1,N0=sG(Q,G0);if(N0===-1)continue;let P0=N0+9;while(P0<Q.length&&/\s/.test(Q[P0]))P0++;i.push({start:K0.start,end:P0})}for(let K0=i.length-1;K0>=0;K0--){let{start:G0,end:N0}=i[K0];Q=Q.substring(0,G0)+Q.substring(N0)}}let C0=R$(Q,X);if(C0.hasScoped)Q=C0.html;let X0=Z.__stx_event_bindings||[],H0=!1,I0=[],E0=/\s:[a-z][\w.-]*\s*=/.test(Q),{scanScriptTags:m0}=await o("stx/signal-processing",()=>import("./chunk-3cqwrprg.js"));for(let p of m0(Q,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))I0.push({match:p.fullMatch,attrs:p.attrs,content:p.body});for(let{match:p,attrs:i,content:K0}of I0){H0=!0;let G0=K0;m4(K0,X,J.strict,Z.__originalFilePath);let N0=await f$(K0,{eventBindings:X0,attrs:i,hasColonDirectives:E0,templateContent:$,filePath:X,projectRoot:process.cwd(),production:J.buildMode==="compile",serverData:b});Q=Q.replace(p,()=>N0)}if(H0)Z.__stx_event_bindings=[];if(!H0&&Z.__stxProcessingDepth===1){let p=Z.__stx_event_bindings||[];if(p.length>0){let i=c$(p);if(i){let K0=Q.lastIndexOf("</body>");Q=K0===-1?Q+i:Q.slice(0,K0)+i+`
3639
3639
  `+Q.slice(K0)}Z.__stx_event_bindings=[]}}if(!L9(Q)&&w9(Q))Q=await A$(Q,G);if(Q=R9(Q),G.csp?.enabled&&G.csp.useNonce&&typeof Z.cspNonce==="string")Q=$8(Q,Z.cspNonce);return Q}var Xq=[{open:"@if",close:"@endif",name:"if"},{open:"@unless",close:"@endunless",name:"unless"},{open:"@foreach",close:"@endforeach",name:"foreach"},{open:"@for",close:"@endfor",name:"for"},{open:"@while",close:"@endwhile",name:"while"},{open:"@forelse",close:"@endforelse",name:"forelse"},{open:"@switch",close:"@endswitch",name:"switch"},{open:"@isset",close:"@endisset",name:"isset"},{open:"@empty",close:"@endempty",name:"empty"},{open:"@auth",close:"@endauth",name:"auth"},{open:"@guest",close:"@endguest",name:"guest"},{open:"@can",close:"@endcan",name:"can"},{open:"@cannot",close:"@endcannot",name:"cannot"},{open:"@section",close:"@endsection",name:"section",altClose:"@show"},{open:"@push",close:"@endpush",name:"push"},{open:"@prepend",close:"@endprepend",name:"prepend"},{open:"@once",close:"@endonce",name:"once"},{open:"@markdown",close:"@endmarkdown",name:"markdown"},{open:"@component",close:"@endcomponent",name:"component"}],Jq=[{pattern:/@if\s*[^(]/,message:"@if directive missing parentheses",suggestion:"Use @if(condition)"},{pattern:/@foreach\s*[^(]/,message:"@foreach directive missing parentheses",suggestion:"Use @foreach(items as item)"},{pattern:/@foreach\([^)]*\)\s*[^@\n<]/,message:"@foreach may have content on same line",suggestion:"Put content on new line after @foreach()"},{pattern:/@include\s*[^(]/,message:"@include directive missing parentheses",suggestion:"Use @include('partial-name')"},{pattern:/@extends\s*[^(]/,message:"@extends directive missing parentheses",suggestion:"Use @extends('layout-name') or @layout('layout-name')"},{pattern:/@layout\s*[^(]/,message:"@layout directive missing parentheses",suggestion:"Use @layout('layout-name')"}],Yq=[{pattern:/\{\{\s*constructor\s*\}\}/,message:"Attempting to access constructor property"},{pattern:/\{\{\s*__proto__\s*\}\}/,message:"Attempting to access __proto__ property"},{pattern:/\{\{\s*eval\s*\(/,message:"Attempting to use eval in expression"}];function Qq($){let Z=[],X=[];return Gq($,Z),qq($,Z,X),Wq($,X),Kq($,Z),{valid:Z.length===0,errors:Z,warnings:X}}function Gq($,Z){let X=($.match(/\{\{/g)||[]).length,J=($.match(/\}\}/g)||[]).length;if(X!==J)Z.push({type:"expression",message:`Unclosed expression brackets: found ${X} opening '{{' and ${J} closing '}}'`,suggestion:"Ensure every {{ has a matching }}"})}function qq($,Z,X){for(let J of Xq){let Y=new RegExp(`${J.open}(?:\\s|\\()`,"g"),Q=new RegExp(J.close,"g"),G=($.match(Y)||[]).length,q=($.match(Q)||[]).length;if(J.altClose){let W=new RegExp(J.altClose,"g");q+=($.match(W)||[]).length}if(G>q)Z.push({type:"directive",message:`Unclosed @${J.name} directive: found ${G} opening and ${q} closing`,suggestion:`Add ${G-q} missing ${J.close} tag(s)`});else if(q>G)X.push({type:"directive",message:`Extra ${J.close} found: ${q-G} more closing than opening`,suggestion:`Check for orphaned ${J.close} tags`})}}function Wq($,Z){for(let X of Jq)if(X.pattern.test($))Z.push({type:"syntax",message:X.message,suggestion:X.suggestion})}function Kq($,Z){for(let X of Yq)if(X.pattern.test($))Z.push({type:"expression",message:`Security warning: ${X.message}`,suggestion:"Remove dangerous code from template expressions"})}function Uq($,Z){let X=$.slice(0,Z).split(`
3640
3640
  `);return{line:X.length,column:X[X.length-1].length+1}}function zq($,Z,X){let J=[];switch($){case"if":case"elseif":case"unless":if(X.length===0)J.push({type:"syntax",message:`@${$} requires a condition`,suggestion:`Use @${$}(condition)`});break;case"foreach":if(X.length===0||!X[0].includes(" as "))J.push({type:"syntax",message:'@foreach requires "items as item" syntax',suggestion:"Use @foreach(items as item) or @foreach(items as key => value)"});break;case"for":if(X.length===0)J.push({type:"syntax",message:"@for requires loop parameters",suggestion:"Use @for(let i = 0; i < 10; i++)"});break;case"switch":if(X.length===0)J.push({type:"syntax",message:"@switch requires an expression",suggestion:"Use @switch(expression)"});break;case"case":if(X.length===0)J.push({type:"syntax",message:"@case requires a value",suggestion:"Use @case(value)"});break;case"include":case"extends":case"component":if(X.length===0)J.push({type:"syntax",message:`@${$} requires a path`,suggestion:`Use @${$}('path/to/template')`});break}return J}function Hq($){return/@[a-z]+/i.test($)||/\{\{/.test($)}function Bq($){let Z=$.matchAll(/@([a-z]+)/gi),X=new Set;for(let J of Z){let Y=J[1].toLowerCase();if(!Y.startsWith("end"))X.add(Y)}return Array.from(X)}import t0 from"path";import W5 from"process";var y2=["module","exports","require","props","$props","defineProps","withDefaults","defineClientPayload","state","derived","effect","batch","onMount","onDestroy","definePageMeta","useRoute","useRouter","useHead","useSeoMeta","setResponseStatus","setResponseHeader","notFound","ref","reactive","computed","watch","onMounted","onUnmounted","nextTick","defineEmits","defineExpose","defineSlots","provide","inject","useColorMode","useDark","useMediaQuery","useScrollLock","usePreferredDark","usePreferredLight","usePreferredReducedMotion","usePreferredContrast","window","document","console","confirm","alert","fetch","params"],N2=new Set(y2),jq=new Set(["props","$props","defineProps"]),_q=new Set(["stx","@stacksjs/stx"]),M2=G5(128);function Vq($){let Z=[],X=0,J=$.split(`
3641
3641
  `);for(let Y of J){let Q=X,G=null,q=!1;for(let W=0;W<Y.length;W++){let K=Y[W];if(q){q=!1;continue}if(K==="\\"){q=!0;continue}if(G){if(K===G)G=null;continue}if(K==="'"||K==='"'||K==="`"){G=K;continue}if(K==="/"&&W+1<Y.length&&Y[W+1]==="/")break;if(K==="{")X++;else if(K==="}")X--}if(Q===0){let W=Y.match(/(?:const|let|var)\s+(\w+)\s*=/);if(W)Z.push(W[1]);else if(/^\s*(?:const|let|var)\s+\w+\s*;?\s*$/.test(Y)){let K=Y.match(/(?:const|let|var)\s+(\w+)/);if(K)Z.push(K[1])}else{let K=Y.match(/(?:const|let|var)\s+(\{[^}]+\}|\[[^\]]+\])\s*=/);if(K){let z=K[1].slice(1,-1).split(",").map((H)=>{let B=H.split(":");return(B.length>1?B[1]:B[0]).trim()}).filter((H)=>/^\w+$/.test(H));Z.push(...z)}}}}return[...new Set(Z)]}function Oq($){let Z=$;Z=Z.replace(/^\s*import\s+.*?from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Z=Z.replace(/^\s*import\s+['"][^'"]+['"]\s*;?\s*$/gm,""),Z=Z.replace(/^\s*interface\s+\w+\s*\{[\s\S]*?\n\}\s*$/gm,""),Z=Z.replace(/^\s*type\s+\w+\s*=[\s\S]*?(?=\n(?:const|let|var|function|export|interface|type|$))/gm,""),Z=Z.replace(/^(\s*(?:export\s+)?(?:const|let|var)\s+)(\w+|\{[^}]+\}|\[[^\]]+\])\s*:\s*[^=]+(\s*=)/gm,"$1$2$3");function X(J){if(!J.includes(":"))return J;let Y=[],Q="",G=0,q=0,W=null;for(let K=0;K<J.length;K++){let U=J[K];if(W){if(Q+=U,U===W)W=null;continue}if(U==='"'||U==="'"||U==="`"){W=U,Q+=U;continue}if(U==="<")G++;else if(U===">"&&G>0)G--;else if(U==="(")q++;else if(U===")")q--;if(U===","&&G===0&&q===0){Y.push(Q),Q="";continue}Q+=U}if(Q)Y.push(Q);return Y.map((K)=>{let U=K.trim(),z=U.startsWith("..."),H=z?U.slice(3):U,B=-1,j=0;for(let R=0;R<H.length;R++)if(H[R]==="<")j++;else if(H[R]===">")j--;else if(H[R]===":"&&j===0){B=R;break}if(B===-1)return K;let L=H.substring(0,B).trim().replace(/\?$/,""),V=H.substring(B+1),O=-1,F=0;for(let R=0;R<V.length;R++)if(V[R]==="<")F++;else if(V[R]===">")F--;else if(V[R]==="="&&F===0){O=R;break}let w=z?"...":"";if(O!==-1)return`${w}${L} = ${V.substring(O+1).trim()}`;return`${w}${L}`}).join(", ")}Z=Z.replace(/\b(function\s+\w*\s*)\(([^)]*)\)/g,(J,Y,Q)=>{if(!Q.includes(":"))return J;return`${Y}(${X(Q)})`});{let J=/\b(function\s+\w*\s*)\(/g,Y,Q=[];while((Y=J.exec(Z))!==null){let G=Y.index+Y[0].length-1,q=1,W=G+1,K=0,U=null;while(W<Z.length&&q>0){let B=Z[W];if(U){if(B===U)U=null;W++;continue}if(B==='"'||B==="'"||B==="`"){U=B,W++;continue}if(B==="<")K++;else if(B===">"&&K>0)K--;else if(K===0){if(B==="(")q++;else if(B===")")q--}if(q>0)W++}if(q!==0)continue;let z=Z.substring(G+1,W);if(!z.includes(":"))continue;let H=X(z);Q.push({start:G+1,end:W,replacement:H})}for(let G=Q.length-1;G>=0;G--){let{start:q,end:W,replacement:K}=Q[G];Z=Z.substring(0,q)+K+Z.substring(W)}}return Z=Z.replace(/\(([^)]*)\)\s*(?::\s*[^=]+)?\s*=>/g,(J,Y)=>{if(!Y.includes(":"))return J;if(Y.includes("{")||Y.includes("}"))return J;return`(${Y.split(",").map((G)=>{let[q,...W]=G.split("="),K=q.split(":")[0].trim();if(W.length>0)return`${K} = ${W.join("=").trim()}`;return K}).join(", ")}) =>`}),Z=Z.replace(/(\))\s*:\s*([A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined)(?:<[^>]+>)?(?:\s*\|\s*(?:[A-Z]\w*|void|string|number|boolean|any|unknown|never|null|undefined))*\s*(\{)/g,"$1$3"),Z=Z.replace(/(\b(?:function|class|interface|type|extends|implements)\s+\w+)\s*<[^<>()]*>/g,"$1"),Z=Z.replace(/(\b(?:defineProps|withDefaults|defineEmits|defineSlots|Array|Promise|Map|Set|Record|Partial|Required|Readonly|Pick|Omit|Exclude|Extract))\s*<[^<>()]*>/g,"$1"),Z=Z.replace(/(\w+)\s*<[A-Z][^<>()]*>\s*(?=\()/g,"$1"),Z=Z.replace(/\s+as\s+(?:const|[A-Za-z]\w*(?:\[\])?(?:\s*\|\s*\w+(?:\[\])?)*)/g,""),Z=Z.replace(/\s+satisfies\s+\w+(?:<[^>]*>)?/g,""),Z=Z.replace(/(\w|\)|\])\s*!(?!=)/g,"$1"),Z=Z.replace(/^\s*(?:export\s+)?(?:const\s+)?enum\s+\w+\s*\{[^}]*\}\s*$/gm,""),Z=Z.replace(/(?<=[\s=,(])<[A-Z]\w*(?:\[\])?>/g,""),Z=Z.replace(/\n\s*\n\s*\n/g,`
@@ -3657,11 +3657,11 @@ ${$[K]}`,K++;else break}return W=W.trim().replace(/;$/,""),{type:Q,name:G,value:
3657
3657
  ${Q}`,Y++}while(Y<$.length){let Q=$[Y].trim();if(Q.startsWith(".")||Q.startsWith("?."))J+=`
3658
3658
  ${$[Y]}`,Y++;else break}return{value:J,nextIndex:Y}}function Iq($,Z,X){let J=X,Y=Z+1;while(Y<$.length){let Q=f2(J);if(Q!==-1){if(j0(J,"{","}",Q)!==-1)break}let G=$[Y];J+=`
3659
3659
  ${G}`,Y++}return{functionCode:J,nextIndex:Y}}function E2($,Z){let X=e($,Z)??e(`(${$})`,Z);if(X!==void 0)return X;if(!/\bprocess\b/.test($))return;let J={...Z,process:Object.freeze({env:{...W5.env}})};try{return Function(...Object.keys(J),`'use strict'; return (${$});`)(...Object.values(J))}catch{try{return Function(...Object.keys(J),`'use strict'; return ${$};`)(...Object.values(J))}catch{return}}}async function Tq($,Z,X){let J=$.matchAll(/export\s+(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:export\s+|$))/g);for(let Q of J){let[,,G,q]=Q;try{let W=q.trim().replace(/;$/,""),K=E2(W,Z);if(K!==void 0)Z[G]=K}catch(W){console.warn(`Failed to parse export ${G} in fallback:`,W)}}let Y=$.matchAll(/(?:^|\n)\s*(const|let|var)\s+(\w+)\s*=\s*([\s\S]*?)(?=\s*(?:(?:const|let|var|function|export)\s+|$))/g);for(let Q of Y){let[,,G,q]=Q;if(!(G in Z))try{let W=q.trim().replace(/;$/,""),K=E2(W,Z);if(K!==void 0)Z[G]=K}catch{}}}function Eq($){let Z=$.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i),X=Z?Z[1]:"",J=Z?$.replace(/<script\b[^>]*>[\s\S]*?<\/script>/i,""):$;return{scriptContent:X,templateWithoutScript:J}}function bq($){let Z=$.trim();if(!Z)return!1;return/(?:const|let|var|function)\s+\w+/.test(Z)}var y5=new p1(500),g$=new p1(1000),d2=33554432,n4=d2;function Sq($){let Z=$.componentRenderCacheBytes;if(typeof Z!=="number"||Z<0||Z===n4)return;n4=Z,h$.setMaxBytes(Z)}var h$=new p1(2000,{maxBytes:d2,sizeOf:($)=>$.output.length});function Cq($){let Z=new WeakSet;try{let X=(J)=>{if(J===void 0)return{__stxType:"undefined"};if(typeof J==="bigint")return{__stxType:"bigint",value:J.toString()};if(typeof J==="function"||typeof J==="symbol")throw TypeError("Non-serializable component input");if(J===null||typeof J!=="object")return J;if(Z.has(J))throw TypeError("Circular component input");if(Z.add(J),J instanceof Date)return{__stxType:"date",value:J.toISOString()};if(Array.isArray(J))return J.map(X);let Y={};for(let Q of Object.keys(J).sort())Y[Q]=X(J[Q]);return Y};return JSON.stringify(X($))}catch{return null}}function x2($){return $.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Pq($){return/\bjs\b/.test($)||/\blang\s*=\s*["']?(js|javascript)["']?/i.test($)}function M1($){return!Pq($)}var x$=new Map;function p4($){let Z;try{Z=JSON.stringify($)}catch{return new Bun.Transpiler($)}let X=x$.get(Z);if(X)return X;if(x$.size>=16)x$.clear();let J=new Bun.Transpiler($);return x$.set(Z,J),J}function A1($){try{let Z=$.replace(/^\s*import\s+\w+\s+from\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,"");Z=Z.replace(/^\s*import\s+['"][^'"]*\.stx['"]\s*;?\s*$/gm,"");let X=[];Z=Z.replace(/\{!![\s\S]*?!!\}/g,(Q)=>{let G=X.length;return X.push(Q),`"__STX_EXPR_${G}__"`}),Z=Z.replace(/\{\{\{[\s\S]*?\}\}\}/g,(Q)=>{let G=X.length;return X.push(Q),`"__STX_EXPR_${G}__"`}),Z=Z.replace(/\{\{[\s\S]*?\}\}/g,(Q)=>{let G=X.length;return X.push(Q),`"__STX_EXPR_${G}__"`});let Y=p4({loader:"ts",target:"browser",define:Y5()}).transformSync(Z);for(let Q=0;Q<X.length;Q++)Y=Y.replace(`"__STX_EXPR_${Q}__"`,X[Q]),Y=Y.replace(`'__STX_EXPR_${Q}__'`,X[Q]);return Y}catch(Z){if(process.env.STX_DEBUG_TS)console.warn("[STX] TypeScript transpilation error:",Z);return $}}function vq($){let Z=[],X=new Set,J=0,Y=0,Q=$.length,G=(U)=>{Y++;while(Y<Q){if($[Y]==="\\"){Y+=2;continue}if($[Y]===U){Y++;return}Y++}},q=()=>{Y++;while(Y<Q){if($[Y]==="\\"){Y+=2;continue}if($[Y]==="`"){Y++;return}if($[Y]==="$"&&$[Y+1]==="{"){Y+=2;let U=1;while(Y<Q&&U>0)if($[Y]==="{")U++,Y++;else if($[Y]==="}")U--,Y++;else if($[Y]==="'"||$[Y]==='"')G($[Y]);else if($[Y]==="`")q();else Y++;continue}Y++}},W=()=>{if($[Y]==="/"&&$[Y+1]==="/"){while(Y<Q&&$[Y]!==`
3660
- `)Y++;return!0}if($[Y]==="/"&&$[Y+1]==="*"){Y+=2;while(Y<Q-1&&!($[Y]==="*"&&$[Y+1]==="/"))Y++;return Y+=2,!0}return!1},K=()=>{if(J!==0)return;let U=$.slice(Y).match(/^(const|let|var)\s*\{([^}]+)\}\s*=/);if(U){let j=U[2].split(",").map((_)=>{let L=_.trim().split(":");return L[L.length-1].trim()});for(let _ of j)if(_&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(_)&&!X.has(_))Z.push(_),X.add(_);return}let z=$.slice(Y).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(z){let j=z[2];if(!X.has(j))Z.push(j),X.add(j);return}let H=$.slice(Y).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(H){let j=H[1];if(!X.has(j))Z.push(j),X.add(j);return}let B=$.slice(Y).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(B){let j=B[1];if(!X.has(j))Z.push(j),X.add(j)}};while(Y<Q){if(W())continue;if($[Y]==="'"||$[Y]==='"'){G($[Y]);continue}if($[Y]==="`"){q();continue}if($[Y]==="{"){J++,Y++;continue}if($[Y]==="}"){J--,Y++;continue}if(J===0&&/[a-z]/i.test($[Y])&&(Y===0||/\s|[;{}()]/.test($[Y-1])))K();Y++}return Z}function fq($){let Z=[],X=0,J=0,Y=null;for(let Q=0;Q<$.length;Q++){let G=$[Q];if(Y){if(G==="\\"){Q++;continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}if(G==="("||G==="["||G==="{")X++;else if(G===")"||G==="]"||G==="}")X--;else if(G===","&&X===0)Z.push($.slice(J,Q)),J=Q+1}if(J<$.length)Z.push($.slice(J));return Z}function xq($){let Z=0,X=null;for(let J=0;J<$.length;J++){let Y=$[J];if(X){if(Y==="\\"){J++;continue}if(Y===X)X=null;continue}if(Y==='"'||Y==="'"||Y==="`"){X=Y;continue}if(Y==="("||Y==="["||Y==="{")Z++;else if(Y===")"||Y==="]"||Y==="}")Z--;else if(Y==="="&&Z===0){let Q=$[J-1],G=$[J+1];if(Q==="!"||Q==="<"||Q===">"||Q==="=")continue;if(G==="="||G===">")continue;return J}}return-1}function gq($,Z){try{let X=/=\s*(?:withDefaults\s*\([\s\S]*?defineProps|defineProps)\b/.exec($);if(!X)return;let J=X.index-1;while(J>=0&&/\s/.test($[J]))J--;if($[J]!=="}")return;let Y=J,Q=0,G=-1;for(;J>=0;J--){let W=$[J];if(W==="}")Q++;else if(W==="{"){if(Q--,Q===0){G=J;break}}}if(G===-1)return;let q=$.slice(G+1,Y);for(let W of fq(q)){let K=W.trim();if(!K||K.startsWith("..."))continue;let U=xq(K);if(U===-1)continue;let z=K.slice(0,U).trim();if(!/^[A-Z_$][\w$]*$/i.test(z))continue;if(Z[z]!==void 0)continue;let H=K.slice(U+1).trim();if(!H)continue;try{let B=Object.keys(Z),j=Function(...B,`"use strict"; return (${H});`);Z[z]=j(...B.map((_)=>Z[_]))}catch{}}}catch{}}async function C$($,Z,X,J,Y){let Q=$.endsWith(".stx")?$.slice(0,-4):$,G=(L)=>L.split("-").map((V)=>V.charAt(0).toUpperCase()+V.slice(1)).join(""),q=(L)=>L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W=X.__importedComponents;if(W){for(let L of[Q,Q.toLowerCase(),G(Q),q(Q)])if(W.has(L))return!0}let K=[...new Set([`${Q}.stx`,`${G(Q)}.stx`,`${q(Q)}.stx`])],U=typeof Y.root==="string"?h.resolve(Y.root):void 0,z=U??h.dirname(J),H=[],B=(L)=>{if(L&&!H.includes(L))H.push(L)},j=X.__originalFilePath;if(j)B(h.join(h.dirname(j),"components"));if(B(Z),B(Y._rootComponentsDir),B(h.join(h.dirname(J),"components")),B(Y.componentsDir),U)B(h.resolve(U,"resources/views/components")),B(h.resolve(U,"resources/components")),B(h.resolve(U,"src/components")),B(h.resolve(U,"components"));let _=Y._pluginComponentDirs;if(Array.isArray(_))for(let L of _)B(typeof L==="string"?L:null);if(B(Y.fallbackComponentsDir),Q.startsWith("./")||Q.startsWith("../"))return t(h.resolve(h.dirname(J),`${Q}.stx`));for(let L of H){let V=h.isAbsolute(L)?L:h.resolve(z,L);for(let O of K)if(await t(h.join(V,O)))return!0}return!1}function hq($){return $==="visible"||$==="idle"||$==="interaction"||$.startsWith("media:")}function uq($){if(!$)return!1;let Z=$.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"");return/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/.test(Z)}function dq($){let Z=new Set,X=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useReactiveProp|useLocalStorage|useSessionStorage|useCookie|useDebouncedValue)\s*(?:<[^>]*>)?\s*\(/g;for(let J of $){let Y;while((Y=X.exec(J))!==null)Z.add(Y[1]);X.lastIndex=0}return[...Z]}async function I1($,Z,X,J,Y,Q,G,q=new Set,W){let{extractVariables:K}=await o("stx/variable-extractor",()=>import("./chunk-6b8zq259.js")),U=q??new Set;if(U.has($))return`[Circular component reference: ${$}]`;let z=new Set(U);z.add($);let H=typeof Z.client==="string"?Z.client.trim():"";if("client"in Z)delete Z.client;let B=H&&H!=="load"&&hq(H)?H:"";try{let j=(u)=>u.split("-").map((m)=>m.charAt(0).toUpperCase()+m.slice(1)).join(""),_=(u)=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L=$.endsWith(".stx")?$.slice(0,-4):$,V=null,O=Y.__importedComponents;if(O){let u=[L,L.toLowerCase(),j(L),_(L)];for(let m of u)if(O.has(m)){V=O.get(m);break}}let F=[];if(!V){let u=[`${L}.stx`,`${j(L)}.stx`,`${_(L)}.stx`],m=[...new Set(u)],U0=Y.__originalFilePath,n=[];if(U0){let L0=h.join(h.dirname(U0),"components");n.push(L0)}if(J)n.push(J);let O0=G._rootComponentsDir;if(typeof O0==="string"&&!n.includes(O0))n.push(O0);let F0=h.join(h.dirname(Q),"components");if(!n.includes(F0))n.push(F0);if(G.componentsDir&&G.componentsDir!==J&&!n.includes(G.componentsDir))n.push(G.componentsDir);let v0=typeof G.root==="string"?h.resolve(G.root):void 0,V1=v0??h.dirname(Q),b0=[];if(v0)b0.push(h.resolve(v0,"resources/views/components")),b0.push(h.resolve(v0,"resources/components")),b0.push(h.resolve(v0,"src/components")),b0.push(h.resolve(v0,"components"));b0.push(h.resolve(import.meta.dir,"components"));for(let L0 of b0)if(!n.includes(L0))n.push(L0);let s=G._pluginComponentDirs;if(Array.isArray(s)){for(let L0 of s)if(typeof L0==="string"&&!n.includes(L0))n.push(L0)}if(G.fallbackComponentsDir&&!n.includes(G.fallbackComponentsDir))n.push(G.fallbackComponentsDir);let l0=[...new Set(n.map((L0)=>{if(!L0)return L0;return h.isAbsolute(L0)?L0:h.resolve(V1,L0)}))];n.length=0,n.push(...l0);let v5=`${L}\x00${Q}\x00${l0.join("\x00")}`,u$=g$.get(v5);if(u$)if(await t(u$))V=u$;else g$.delete(v5);if(!V&&(L.startsWith("./")||L.startsWith("../")))V=h.resolve(h.dirname(Q),`${L}.stx`),F.push(V);else if(!V)for(let L0 of n){if(!L0)continue;for(let f5 of m){let x5=h.join(L0,f5);if(F.push(x5),await t(x5)){V=x5;break}}if(V)break;if(!V)try{let f5=await import("fs");if(!f5.statSync(L0,{throwIfNoEntry:!1})?.isDirectory())continue;let a2=8,d$=[{path:L0,depth:0}];while(d$.length>0&&!V){let g5=d$.pop();if(g5.depth>=a2)continue;let a4;try{a4=f5.readdirSync(g5.path,{withFileTypes:!0})}catch{continue}for(let h5 of a4){if(!h5.isDirectory())continue;if(h5.name==="node_modules"||h5.name.startsWith("."))continue;let t4=h.join(g5.path,h5.name);for(let t2 of m){let m$=h.join(t4,t2);if(F.push(m$),await t(m$)){V=m$;break}}if(V)break;d$.push({path:t4,depth:g5.depth+1})}}}catch{}if(V)break}if(V)g$.set(v5,V)}if(!V||!await t(V)){let u=F.length>0?`
3660
+ `)Y++;return!0}if($[Y]==="/"&&$[Y+1]==="*"){Y+=2;while(Y<Q-1&&!($[Y]==="*"&&$[Y+1]==="/"))Y++;return Y+=2,!0}return!1},K=()=>{if(J!==0)return;let U=$.slice(Y).match(/^(const|let|var)\s*\{([^}]+)\}\s*=/);if(U){let j=U[2].split(",").map((_)=>{let L=_.trim().split(":");return L[L.length-1].trim()});for(let _ of j)if(_&&/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(_)&&!X.has(_))Z.push(_),X.add(_);return}let z=$.slice(Y).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(z){let j=z[2];if(!X.has(j))Z.push(j),X.add(j);return}let H=$.slice(Y).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(H){let j=H[1];if(!X.has(j))Z.push(j),X.add(j);return}let B=$.slice(Y).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(B){let j=B[1];if(!X.has(j))Z.push(j),X.add(j)}};while(Y<Q){if(W())continue;if($[Y]==="'"||$[Y]==='"'){G($[Y]);continue}if($[Y]==="`"){q();continue}if($[Y]==="{"){J++,Y++;continue}if($[Y]==="}"){J--,Y++;continue}if(J===0&&/[a-z]/i.test($[Y])&&(Y===0||/\s|[;{}()]/.test($[Y-1])))K();Y++}return Z}function fq($){let Z=[],X=0,J=0,Y=null;for(let Q=0;Q<$.length;Q++){let G=$[Q];if(Y){if(G==="\\"){Q++;continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}if(G==="("||G==="["||G==="{")X++;else if(G===")"||G==="]"||G==="}")X--;else if(G===","&&X===0)Z.push($.slice(J,Q)),J=Q+1}if(J<$.length)Z.push($.slice(J));return Z}function xq($){let Z=0,X=null;for(let J=0;J<$.length;J++){let Y=$[J];if(X){if(Y==="\\"){J++;continue}if(Y===X)X=null;continue}if(Y==='"'||Y==="'"||Y==="`"){X=Y;continue}if(Y==="("||Y==="["||Y==="{")Z++;else if(Y===")"||Y==="]"||Y==="}")Z--;else if(Y==="="&&Z===0){let Q=$[J-1],G=$[J+1];if(Q==="!"||Q==="<"||Q===">"||Q==="=")continue;if(G==="="||G===">")continue;return J}}return-1}function gq($,Z){try{let X=/=\s*(?:withDefaults\s*\([\s\S]*?defineProps|defineProps)\b/.exec($);if(!X)return;let J=X.index-1;while(J>=0&&/\s/.test($[J]))J--;if($[J]!=="}")return;let Y=J,Q=0,G=-1;for(;J>=0;J--){let W=$[J];if(W==="}")Q++;else if(W==="{"){if(Q--,Q===0){G=J;break}}}if(G===-1)return;let q=$.slice(G+1,Y);for(let W of fq(q)){let K=W.trim();if(!K||K.startsWith("..."))continue;let U=xq(K);if(U===-1)continue;let z=K.slice(0,U).trim();if(!/^[A-Z_$][\w$]*$/i.test(z))continue;if(Z[z]!==void 0)continue;let H=K.slice(U+1).trim();if(!H)continue;try{let B=Object.keys(Z),j=Function(...B,`"use strict"; return (${H});`);Z[z]=j(...B.map((_)=>Z[_]))}catch{}}}catch{}}async function C$($,Z,X,J,Y){let Q=$.endsWith(".stx")?$.slice(0,-4):$,G=(L)=>L.split("-").map((V)=>V.charAt(0).toUpperCase()+V.slice(1)).join(""),q=(L)=>L.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),W=X.__importedComponents;if(W){for(let L of[Q,Q.toLowerCase(),G(Q),q(Q)])if(W.has(L))return!0}let K=[...new Set([`${Q}.stx`,`${G(Q)}.stx`,`${q(Q)}.stx`])],U=typeof Y.root==="string"?h.resolve(Y.root):void 0,z=U??h.dirname(J),H=[],B=(L)=>{if(L&&!H.includes(L))H.push(L)},j=X.__originalFilePath;if(j)B(h.join(h.dirname(j),"components"));if(B(Z),B(Y._rootComponentsDir),B(h.join(h.dirname(J),"components")),B(Y.componentsDir),U)B(h.resolve(U,"resources/views/components")),B(h.resolve(U,"resources/components")),B(h.resolve(U,"src/components")),B(h.resolve(U,"components"));let _=Y._pluginComponentDirs;if(Array.isArray(_))for(let L of _)B(typeof L==="string"?L:null);if(B(Y.fallbackComponentsDir),Q.startsWith("./")||Q.startsWith("../"))return t(h.resolve(h.dirname(J),`${Q}.stx`));for(let L of H){let V=h.isAbsolute(L)?L:h.resolve(z,L);for(let O of K)if(await t(h.join(V,O)))return!0}return!1}function hq($){return $==="visible"||$==="idle"||$==="interaction"||$.startsWith("media:")}function uq($){if(!$)return!1;let Z=$.replace(/<script[\s\S]*?<\/script>/gi,"").replace(/<style[\s\S]*?<\/style>/gi,"");return/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/.test(Z)}function dq($){let Z=new Set,X=/\b(?:const|let|var)\s+([a-zA-Z_$][\w$]*)\s*=\s*(?:state|derived|computed|ref|reactive|signal|useReactiveProp|useLocalStorage|useSessionStorage|useCookie|useDebouncedValue)\s*(?:<[^>]*>)?\s*\(/g;for(let J of $){let Y;while((Y=X.exec(J))!==null)Z.add(Y[1]);X.lastIndex=0}return[...Z]}async function I1($,Z,X,J,Y,Q,G,q=new Set,W){let{extractVariables:K}=await o("stx/variable-extractor",()=>import("./chunk-f0f8pne1.js")),U=q??new Set;if(U.has($))return`[Circular component reference: ${$}]`;let z=new Set(U);z.add($);let H=typeof Z.client==="string"?Z.client.trim():"";if("client"in Z)delete Z.client;let B=H&&H!=="load"&&hq(H)?H:"";try{let j=(u)=>u.split("-").map((m)=>m.charAt(0).toUpperCase()+m.slice(1)).join(""),_=(u)=>u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),L=$.endsWith(".stx")?$.slice(0,-4):$,V=null,O=Y.__importedComponents;if(O){let u=[L,L.toLowerCase(),j(L),_(L)];for(let m of u)if(O.has(m)){V=O.get(m);break}}let F=[];if(!V){let u=[`${L}.stx`,`${j(L)}.stx`,`${_(L)}.stx`],m=[...new Set(u)],U0=Y.__originalFilePath,n=[];if(U0){let L0=h.join(h.dirname(U0),"components");n.push(L0)}if(J)n.push(J);let O0=G._rootComponentsDir;if(typeof O0==="string"&&!n.includes(O0))n.push(O0);let F0=h.join(h.dirname(Q),"components");if(!n.includes(F0))n.push(F0);if(G.componentsDir&&G.componentsDir!==J&&!n.includes(G.componentsDir))n.push(G.componentsDir);let v0=typeof G.root==="string"?h.resolve(G.root):void 0,V1=v0??h.dirname(Q),b0=[];if(v0)b0.push(h.resolve(v0,"resources/views/components")),b0.push(h.resolve(v0,"resources/components")),b0.push(h.resolve(v0,"src/components")),b0.push(h.resolve(v0,"components"));b0.push(h.resolve(import.meta.dir,"components"));for(let L0 of b0)if(!n.includes(L0))n.push(L0);let s=G._pluginComponentDirs;if(Array.isArray(s)){for(let L0 of s)if(typeof L0==="string"&&!n.includes(L0))n.push(L0)}if(G.fallbackComponentsDir&&!n.includes(G.fallbackComponentsDir))n.push(G.fallbackComponentsDir);let l0=[...new Set(n.map((L0)=>{if(!L0)return L0;return h.isAbsolute(L0)?L0:h.resolve(V1,L0)}))];n.length=0,n.push(...l0);let v5=`${L}\x00${Q}\x00${l0.join("\x00")}`,u$=g$.get(v5);if(u$)if(await t(u$))V=u$;else g$.delete(v5);if(!V&&(L.startsWith("./")||L.startsWith("../")))V=h.resolve(h.dirname(Q),`${L}.stx`),F.push(V);else if(!V)for(let L0 of n){if(!L0)continue;for(let f5 of m){let x5=h.join(L0,f5);if(F.push(x5),await t(x5)){V=x5;break}}if(V)break;if(!V)try{let f5=await import("fs");if(!f5.statSync(L0,{throwIfNoEntry:!1})?.isDirectory())continue;let a2=8,d$=[{path:L0,depth:0}];while(d$.length>0&&!V){let g5=d$.pop();if(g5.depth>=a2)continue;let a4;try{a4=f5.readdirSync(g5.path,{withFileTypes:!0})}catch{continue}for(let h5 of a4){if(!h5.isDirectory())continue;if(h5.name==="node_modules"||h5.name.startsWith("."))continue;let t4=h.join(g5.path,h5.name);for(let t2 of m){let m$=h.join(t4,t2);if(F.push(m$),await t(m$)){V=m$;break}}if(V)break;d$.push({path:t4,depth:g5.depth+1})}}}catch{}if(V)break}if(V)g$.set(v5,V)}if(!V||!await t(V)){let u=F.length>0?`
3661
3661
  Searched paths:
3662
3662
  ${F.map((m)=>` - ${m}`).join(`
3663
- `)}`:"";return`[Error loading component: ENOENT: no such file or directory, open '${$}']${u}`}W.add(V);let w;if(y5.has(V))w=y5.get(V);else try{w=await Bun.file(V).text(),y5.set(V,w)}catch(u){return`[Error loading component: ${u instanceof Error?u.message:String(u)}]`}let R=new Set(["__originalFilePath","__importedComponents",u5,"__stx_client_signal_names","__stxServeContext","__stx_scope_seq"]),D={};for(let[u,m]of Object.entries(Y))if(!u.startsWith("__")||R.has(u))D[u]=m;let M=X;if(X.includes("@include")){let{processIncludes:u}=await o("stx/includes",()=>import("./chunk-cg1v99gm.js"));M=await u(X,Y,Q,G,W)}let k=r0(M),N=[],A=k.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(u,m)=>{let U0=k.scripts[Number(m)]||"",n=U0.match(/^<script\b([^>]*)>/i)?.[1]||"",O0=n.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),F0=!O0||["module","text/javascript","application/javascript"].includes(O0);if(!/\bserver\b/i.test(n)&&F0)return N.push(U0),"";return U0}),{extractSlotContent:T}=await o("stx/slots",()=>import("./chunk-vq8tmyf0.js")),I=T(A),S={};if(I.defaultSlot?.trim())S.default=I.defaultSlot;for(let[u,m]of I.namedSlots)S[u]=m.content;let E=Y.__stx_scope_seq??={n:0,key:Bun.hash(String(Y.__filename??Q)).toString(36).slice(0,6)},b=`stx_${L.replace(/[^a-zA-Z0-9]/g,"_")}_${++E.n}_${E.key}`,y={...D,$uid:b,...Z,props:Z,slot:A,$slots:S,__processedComponents:z,__sections:{},__stx_signals_gate:G1(w)||uq(X)};gq(w,y);let P=w,f=V$(P);if(f)P=f.content.trim();let d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g=[...w.matchAll(d)],Q0=[],e0=g.some((u)=>/\bserver\b/.test(u[1]||"")&&/\bcache\b/.test(u[1]||"")),k0=null,C0=null,X0=null,H0=0,I0=null;if(Sq(G),e0&&n4>0){let u=Cq({props:Z,slot:X,buildMode:G.buildMode??"",skipEventDirectives:G.skipEventDirectives===!0,uid:b});if(u!==null){k0=`${V}\x00${b1(w)}\x00${u}`;let m=h$.get(k0);if(m){for(let U0 of m.dependencies)W.add(U0);if(U7(Y,m.clientFactories),E.n+=m.uidsConsumed,m.preservedClientExpressions.length>0){let U0=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[]);for(let n of m.preservedClientExpressions)U0.add(n);Y.__stx_preserved_client_expressions=[...U0]}return m.output}C0=new Set(W),X0=W7(Y),H0=E.n,I0=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[])}}for(let u of g){let m=u[1]||"",U0=u[2]||"",n=m.includes("server");if(M1(m)&&U0.trim())U0=A1(U0);if(n&&U0)try{await K(U0,y,V)}catch(F0){}if(!n){let F0=U0.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),v0=F0.includes("{{")&&F0.includes("}}"),V1=F0.includes("{!!")&&F0.includes("!!}");if(v0||V1)F0=s$(F0,y);let b0=m.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Q0.push(`<script${b0}>${F0}</script>`)}}let E0=w.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),m0=E0?E0[1]:"",p=E0?E0[2]:"",i="",K0=m0&&/\bscoped\b/i.test(m0);if(E0)i=`<style${m0}>${p}</style>`;let G0=P;if(G0=G0.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),E0)G0=G0.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");{let u=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,m=[];if(G0=G0.replace(u,(U0,n)=>{let O0=n.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(O0)m.push(`<style${O0[1]}>${O0[2]}</style>`);return""}),G0=G0.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),m.length>0)i=`${i}${m.join(`
3664
- `)}`}if(X&&G0.includes("{{ text || slot }}"))G0=G0.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>X);let{applySlots:N0}=await o("stx/slots",()=>import("./chunk-vq8tmyf0.js")),{defaultSlot:P0,namedSlots:K5}=I;G0=await N0(G0,P0,K5,y);let C5=Q0.some((u)=>/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useReactiveProp|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(u)),P5=dq(Q0),C=Array.isArray(y.__stx_client_signal_names)?y.__stx_client_signal_names:[];if(P5.length>0||C.length>0)y.__stx_client_signal_names=[...new Set([...C,...P5])];let v={...G,_rootComponentsDir:G._rootComponentsDir||G.componentsDir,componentsDir:h.dirname(V),skipSignalsRuntime:!0,skipEventDirectives:C5||Q0.length===0,defaultLayout:void 0};y.__stxProcessingDepth=(Y.__stxProcessingDepth||0)+1;let r=await l4(G0,y,V,v,W),a=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[]);for(let u of r.matchAll(/\{\{([\s\S]*?)\}\}/g))a.add(u[1].trim());if(a.size>0)Y.__stx_preserved_client_expressions=[...a];let J0=b,Y0=r;if(C5){let u="";if(Object.keys(Z).length>0)try{u=` data-stx-props="${x2(JSON.stringify(Z))}"`}catch{}let m=B?` stx-hydrate="${x2(B)}"`:"";Y0=`<div data-stx-scope="${J0}"${u}${m}>${r}</div>`;let U0=await Promise.all(Q0.map(async(n)=>{let O0=n.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!O0)return n;let[,F0,v0]=O0,{vendorStyleTags:V1,factoryBody:b0}=await cq(v0,V,G.buildMode==="compile"),s=B?null:p$(Y,b0),l0=s?`window.__stxComponentFactories[${JSON.stringify(s)}](${JSON.stringify(J0)});`:`(${b0})(${JSON.stringify(J0)});`;if(B)return`${V1}<script type="stx/island" data-stx-island="${J0}" data-stx-scoped${F0}>${l0}</script>`;return`${V1}<script data-stx-scoped data-stx-run="always"${F0}>${l0}</script>`}));if(Y0=Y0+`
3663
+ `)}`:"";return`[Error loading component: ENOENT: no such file or directory, open '${$}']${u}`}W.add(V);let w;if(y5.has(V))w=y5.get(V);else try{w=await Bun.file(V).text(),y5.set(V,w)}catch(u){return`[Error loading component: ${u instanceof Error?u.message:String(u)}]`}let R=new Set(["__originalFilePath","__importedComponents",u5,"__stx_client_signal_names","__stxServeContext","__stx_scope_seq"]),D={};for(let[u,m]of Object.entries(Y))if(!u.startsWith("__")||R.has(u))D[u]=m;let M=X;if(X.includes("@include")){let{processIncludes:u}=await o("stx/includes",()=>import("./chunk-q0ctxav6.js"));M=await u(X,Y,Q,G,W)}let k=r0(M),N=[],A=k.output.replace(/\x00STX_SCRIPT_(\d+)\x00/g,(u,m)=>{let U0=k.scripts[Number(m)]||"",n=U0.match(/^<script\b([^>]*)>/i)?.[1]||"",O0=n.match(/\btype\s*=\s*["']([^"']+)["']/i)?.[1]?.toLowerCase(),F0=!O0||["module","text/javascript","application/javascript"].includes(O0);if(!/\bserver\b/i.test(n)&&F0)return N.push(U0),"";return U0}),{extractSlotContent:T}=await o("stx/slots",()=>import("./chunk-083kj0ge.js")),I=T(A),S={};if(I.defaultSlot?.trim())S.default=I.defaultSlot;for(let[u,m]of I.namedSlots)S[u]=m.content;let E=Y.__stx_scope_seq??={n:0,key:Bun.hash(String(Y.__filename??Q)).toString(36).slice(0,6)},b=`stx_${L.replace(/[^a-zA-Z0-9]/g,"_")}_${++E.n}_${E.key}`,y={...D,$uid:b,...Z,props:Z,slot:A,$slots:S,__processedComponents:z,__sections:{},__stx_signals_gate:G1(w)||uq(X)};gq(w,y);let P=w,f=V$(P);if(f)P=f.content.trim();let d=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,g=[...w.matchAll(d)],Q0=[],e0=g.some((u)=>/\bserver\b/.test(u[1]||"")&&/\bcache\b/.test(u[1]||"")),k0=null,C0=null,X0=null,H0=0,I0=null;if(Sq(G),e0&&n4>0){let u=Cq({props:Z,slot:X,buildMode:G.buildMode??"",skipEventDirectives:G.skipEventDirectives===!0,uid:b});if(u!==null){k0=`${V}\x00${b1(w)}\x00${u}`;let m=h$.get(k0);if(m){for(let U0 of m.dependencies)W.add(U0);if(U7(Y,m.clientFactories),E.n+=m.uidsConsumed,m.preservedClientExpressions.length>0){let U0=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[]);for(let n of m.preservedClientExpressions)U0.add(n);Y.__stx_preserved_client_expressions=[...U0]}return m.output}C0=new Set(W),X0=W7(Y),H0=E.n,I0=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[])}}for(let u of g){let m=u[1]||"",U0=u[2]||"",n=m.includes("server");if(M1(m)&&U0.trim())U0=A1(U0);if(n&&U0)try{await K(U0,y,V)}catch(F0){}if(!n){let F0=U0.replace(/^\s*const\s*\{[^}]+\}\s*=\s*window\.stx\s*;?\s*\n?/gm,""),v0=F0.includes("{{")&&F0.includes("}}"),V1=F0.includes("{!!")&&F0.includes("!!}");if(v0||V1)F0=s$(F0,y);let b0=m.replace(/\s*\bts\b/g,"").replace(/\s*\blang\s*=\s*["']?(ts|typescript)["']?/gi,"");Q0.push(`<script${b0}>${F0}</script>`)}}let E0=w.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),m0=E0?E0[1]:"",p=E0?E0[2]:"",i="",K0=m0&&/\bscoped\b/i.test(m0);if(E0)i=`<style${m0}>${p}</style>`;let G0=P;if(G0=G0.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),E0)G0=G0.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");{let u=/@push\s*\(\s*['"]styles['"]\s*\)([\s\S]*?)@endpush/gi,m=[];if(G0=G0.replace(u,(U0,n)=>{let O0=n.match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i);if(O0)m.push(`<style${O0[1]}>${O0[2]}</style>`);return""}),G0=G0.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/gi,""),m.length>0)i=`${i}${m.join(`
3664
+ `)}`}if(X&&G0.includes("{{ text || slot }}"))G0=G0.replace(/\{\{\s*text\s*\|\|\s*slot\s*\}\}/g,()=>X);let{applySlots:N0}=await o("stx/slots",()=>import("./chunk-083kj0ge.js")),{defaultSlot:P0,namedSlots:K5}=I;G0=await N0(G0,P0,K5,y);let C5=Q0.some((u)=>/\b(?:state|derived|effect|ref|reactive|computed|watch|watchEffect|useReactiveProp|defineProps|withDefaults|defineEmits|defineExpose|defineSlots)\s*(?:<[^<>()]*>)?\s*\(/.test(u)),P5=dq(Q0),C=Array.isArray(y.__stx_client_signal_names)?y.__stx_client_signal_names:[];if(P5.length>0||C.length>0)y.__stx_client_signal_names=[...new Set([...C,...P5])];let v={...G,_rootComponentsDir:G._rootComponentsDir||G.componentsDir,componentsDir:h.dirname(V),skipSignalsRuntime:!0,skipEventDirectives:C5||Q0.length===0,defaultLayout:void 0};y.__stxProcessingDepth=(Y.__stxProcessingDepth||0)+1;let r=await l4(G0,y,V,v,W),a=new Set(Array.isArray(Y.__stx_preserved_client_expressions)?Y.__stx_preserved_client_expressions:[]);for(let u of r.matchAll(/\{\{([\s\S]*?)\}\}/g))a.add(u[1].trim());if(a.size>0)Y.__stx_preserved_client_expressions=[...a];let J0=b,Y0=r;if(C5){let u="";if(Object.keys(Z).length>0)try{u=` data-stx-props="${x2(JSON.stringify(Z))}"`}catch{}let m=B?` stx-hydrate="${x2(B)}"`:"";Y0=`<div data-stx-scope="${J0}"${u}${m}>${r}</div>`;let U0=await Promise.all(Q0.map(async(n)=>{let O0=n.match(/<script([^>]*)>([\s\S]*)<\/script>/i);if(!O0)return n;let[,F0,v0]=O0,{vendorStyleTags:V1,factoryBody:b0}=await cq(v0,V,G.buildMode==="compile"),s=B?null:p$(Y,b0),l0=s?`window.__stxComponentFactories[${JSON.stringify(s)}](${JSON.stringify(J0)});`:`(${b0})(${JSON.stringify(J0)});`;if(B)return`${V1}<script type="stx/island" data-stx-island="${J0}" data-stx-scoped${F0}>${l0}</script>`;return`${V1}<script data-stx-scoped data-stx-run="always"${F0}>${l0}</script>`}));if(Y0=Y0+`
3665
3665
  `+U0.join(`
3666
3666
  `),i)Y0+=`
3667
3667
  `+i}else{if(i)Y0+=`
@@ -3684,7 +3684,7 @@ ${Z0.yellow}${Z0.bold}Message:${Z0.reset} ${Z}
3684
3684
  `,q)U+=`
3685
3685
  ${Z0.blue}${Z0.bold}Context:${Z0.reset}
3686
3686
  ${Z0.dim}${q}${Z0.reset}
3687
- `;return U}function FO(){y5.clear(),g$.clear(),h$.clear()}function LO(){return{size:y5.size,maxSize:500}}var i4=G5(128);async function cq($,Z,X){let J=b1($,Z,X),Y=i4.get(J);if(Y){if(u2(Y.deps))return Y;i4.delete(J)}let Q=o4($,{filePath:Z,projectRoot:process.cwd()}),G=Q.code,q=r4(Q.styles);G=r1(G).code;let{hasUserImports:W,bundleClientScript:K}=await o("stx/client-script-bundler",()=>import("./chunk-bxjb7nje.js")),U=[],z=!1;if(W(G)){let V=G;G=await K(V,Z,{projectRoot:process.cwd(),minify:X,collectInputs:U}),z=G===V}let{stripStxRuntimeImports:H}=await o("stx/signal-processing",()=>import("./chunk-38n3jrbp.js"));G=H(G);let B=$1(G),j=vq(B),_=`function(__scopeId) {
3687
+ `;return U}function FO(){y5.clear(),g$.clear(),h$.clear()}function LO(){return{size:y5.size,maxSize:500}}var i4=G5(128);async function cq($,Z,X){let J=b1($,Z,X),Y=i4.get(J);if(Y){if(u2(Y.deps))return Y;i4.delete(J)}let Q=o4($,{filePath:Z,projectRoot:process.cwd()}),G=Q.code,q=r4(Q.styles);G=r1(G).code;let{hasUserImports:W,bundleClientScript:K}=await o("stx/client-script-bundler",()=>import("./chunk-s0v2g53x.js")),U=[],z=!1;if(W(G)){let V=G;G=await K(V,Z,{projectRoot:process.cwd(),minify:X,collectInputs:U}),z=G===V}let{stripStxRuntimeImports:H}=await o("stx/signal-processing",()=>import("./chunk-3cqwrprg.js"));G=H(G);let B=$1(G),j=vq(B),_=`function(__scopeId) {
3688
3688
  ${c1("const",[...g2,...j],B)}
3689
3689
  const __scope = window.stx._scopes = window.stx._scopes || {};
3690
3690
  const __scopeVars = __scope[__scopeId] = __scope[__scopeId] || {};
@@ -3783,7 +3783,7 @@ else {
3783
3783
  // STX: auto-generated event bindings
3784
3784
  ${$.map((X,J)=>qW(X,J)).join(`
3785
3785
  `)}`}function p2($){let Z=[],X=new Set,J=$.replace(/^\s*import\s+.*$/gm,""),Y=0,Q=J.length,G=0;while(G<Q){let q=J[G];if(q==="'"||q==='"'||q==="`"){let W=q;if(G++,W==="`"){let K=0;while(G<Q){if(J[G]==="\\"){G+=2;continue}if(J[G]==="`"&&K===0){G++;break}if(J[G]==="$"&&J[G+1]==="{"){K++,G+=2;continue}if(J[G]==="}"&&K>0){K--,G++;continue}G++}}else while(G<Q){if(J[G]==="\\"){G+=2;continue}if(J[G]===W){G++;break}G++}continue}if(q==="/"&&J[G+1]==="/"){while(G<Q&&J[G]!==`
3786
- `)G++;continue}if(q==="/"&&J[G+1]==="*"){G+=2;while(G<Q-1&&!(J[G]==="*"&&J[G+1]==="/"))G++;G+=2;continue}if(q==="{"){Y++,G++;continue}if(q==="}"){Y--,G++;continue}if(Y===0){let W=J.slice(G),K=W.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(K){let H=K[1];if(!H.startsWith("_")&&!X.has(H))Z.push(H),X.add(H);G+=K[0].length;continue}let U=W.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(U){U[1].split(",").forEach((H)=>{let B=H.trim(),j=B.indexOf(":"),_=j>=0?B.slice(j+1).trim().split(/[\s=]/)[0]:B.split(/[\s=]/)[0];if(_&&!_.startsWith("_")&&!X.has(_))Z.push(_),X.add(_)}),G+=U[0].length;continue}let z=W.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(z){let H=z[1];if(!H.startsWith("_")&&!X.has(H))Z.push(H),X.add(H);G+=z[0].length;continue}}G++}return Z}var KW=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"]);function UW($){let Z=new Set,X=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function J(H){let B;while((B=X.exec(H))!==null){let j=B[0];if(!KW.has(j))Z.add(j)}}let Y=/\{\{([\s\S]*?)\}\}/g,Q;while((Q=Y.exec($))!==null)J(Q[1]);let G=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((Q=G.exec($))!==null)J(Q[1]);let q=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((Q=q.exec($))!==null)J(Q[1]);let W=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((Q=W.exec($))!==null)J(Q[1]);let K=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((Q=K.exec($))!==null)J(Q[1]);let U=/@model\s*=\s*["']([^"']*)["']/gi;while((Q=U.exec($))!==null)J(Q[1]);let z=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((Q=z.exec($))!==null)J(Q[1]);return Z}async function f$($,Z={}){let X=$,J="",Y=!1,Q=[],G=o4(X,{filePath:Z.filePath,projectRoot:Z.projectRoot});X=G.code;let q=r4(G.styles),W=r1(X);X=W.code,Q=[...W.imports,...W.models];let{hasUserImports:K,bundleClientScript:U}=await o("stx/client-script-bundler",()=>import("./chunk-bxjb7nje.js"));if(K(X))X=await U(X,Z.filePath||"",{projectRoot:Z.projectRoot,minify:Z.production}),Y=!0;if(Z.autoImports!==!1){let O=o2(X);X=O.code,J=r2(O.stxImports,O.browserImports.filter((F)=>!Q.includes(F)))}if(J=`${O4(X,Z.serverData)}${J}`,X=$1(X),!Y&&M1(Z.attrs||""))X=A1(X);let z=WW(Z.eventBindings||[]),H=(Z.attrs||"").trim();if(/\btype\s*=\s*["']module["']/i.test(H)){let O=H.replace(/\btype\s*=\s*["']module["']/i,"").trim(),F=`type="module" data-stx-scoped${O?` ${O}`:""}`;return`${q}<script ${F}>
3786
+ `)G++;continue}if(q==="/"&&J[G+1]==="*"){G+=2;while(G<Q-1&&!(J[G]==="*"&&J[G+1]==="/"))G++;G+=2;continue}if(q==="{"){Y++,G++;continue}if(q==="}"){Y--,G++;continue}if(Y===0){let W=J.slice(G),K=W.match(/^(?:const|let|var)\s+([a-zA-Z_$]\w*)\s*(?::[^=]*)?=/);if(K){let H=K[1];if(!H.startsWith("_")&&!X.has(H))Z.push(H),X.add(H);G+=K[0].length;continue}let U=W.match(/^(?:const|let|var)\s+\{([^}]+)\}\s*=/);if(U){U[1].split(",").forEach((H)=>{let B=H.trim(),j=B.indexOf(":"),_=j>=0?B.slice(j+1).trim().split(/[\s=]/)[0]:B.split(/[\s=]/)[0];if(_&&!_.startsWith("_")&&!X.has(_))Z.push(_),X.add(_)}),G+=U[0].length;continue}let z=W.match(/^(?:async\s+)?function\s+([a-zA-Z_$]\w*)/);if(z){let H=z[1];if(!H.startsWith("_")&&!X.has(H))Z.push(H),X.add(H);G+=z[0].length;continue}}G++}return Z}var KW=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"]);function UW($){let Z=new Set,X=/[a-zA-Z_$][a-zA-Z0-9_$]*/g;function J(H){let B;while((B=X.exec(H))!==null){let j=B[0];if(!KW.has(j))Z.add(j)}}let Y=/\{\{([\s\S]*?)\}\}/g,Q;while((Q=Y.exec($))!==null)J(Q[1]);let G=/:[a-z][\w.-]*\s*=\s*"([^"]*)"/gi;while((Q=G.exec($))!==null)J(Q[1]);let q=/:[a-z][\w.-]*\s*=\s*'([^']*)'/gi;while((Q=q.exec($))!==null)J(Q[1]);let W=/@[a-z]+(?:\.[a-z]+)*\s*=\s*"([^"]*)"/gi;while((Q=W.exec($))!==null)J(Q[1]);let K=/@[a-z]+(?:\.[a-z]+)*\s*=\s*'([^']*)'/gi;while((Q=K.exec($))!==null)J(Q[1]);let U=/@model\s*=\s*["']([^"']*)["']/gi;while((Q=U.exec($))!==null)J(Q[1]);let z=/@for\s*=\s*["'][^"']*\bin\s+([^"']+)["']/gi;while((Q=z.exec($))!==null)J(Q[1]);return Z}async function f$($,Z={}){let X=$,J="",Y=!1,Q=[],G=o4(X,{filePath:Z.filePath,projectRoot:Z.projectRoot});X=G.code;let q=r4(G.styles),W=r1(X);X=W.code,Q=[...W.imports,...W.models];let{hasUserImports:K,bundleClientScript:U}=await o("stx/client-script-bundler",()=>import("./chunk-s0v2g53x.js"));if(K(X))X=await U(X,Z.filePath||"",{projectRoot:Z.projectRoot,minify:Z.production}),Y=!0;if(Z.autoImports!==!1){let O=o2(X);X=O.code,J=r2(O.stxImports,O.browserImports.filter((F)=>!Q.includes(F)))}if(J=`${O4(X,Z.serverData)}${J}`,X=$1(X),!Y&&M1(Z.attrs||""))X=A1(X);let z=WW(Z.eventBindings||[]),H=(Z.attrs||"").trim();if(/\btype\s*=\s*["']module["']/i.test(H)){let O=H.replace(/\btype\s*=\s*["']module["']/i,"").trim(),F=`type="module" data-stx-scoped${O?` ${O}`:""}`;return`${q}<script ${F}>
3787
3787
  ${o1(`${J}${X}
3788
3788
  ${z}`)}
3789
3789
  </script>`}let j=n2($),_=/function __stx_setup_/.test(X),L=/\bstx\.mount\s*\(|\bstx\.mountEl\s*\(/.test($);function V(O){let F=O.length>0?`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Fp as a,Gp as b}from"./chunk-097mr013.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-sd7ymv7h.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{b as processLoops,a as parseLoopBinding};
2
+ import{Fp as a,Gp as b}from"./chunk-qs1kypwa.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-abx8rmt4.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{b as processLoops,a as parseLoopBinding};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$k as a,al as b,bl as c,cl as d,dl as e,el as f,fl as g,gl as h,hl as i,il as j}from"./chunk-3kn8xkm8.js";import"./chunk-097mr013.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-sd7ymv7h.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,g as resolveBundlerFallback,c as recordBundleFailure,i as queueClientBundleBuild,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,j as bundleClientScript};
2
+ import{$k as a,al as b,bl as c,cl as d,dl as e,el as f,fl as g,gl as h,hl as i,il as j}from"./chunk-q9y29cgw.js";import"./chunk-qs1kypwa.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-abx8rmt4.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,g as resolveBundlerFallback,c as recordBundleFailure,i as queueClientBundleBuild,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,j as bundleClientScript};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Vi as a,Wi as b}from"./chunk-qmsrqmh0.js";import"./chunk-9n0gvfrg.js";import"./chunk-3kn8xkm8.js";import"./chunk-097mr013.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-sd7ymv7h.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{a as getStoreScript,b as clearStoreCache};
2
+ import{Vi as a,Wi as b}from"./chunk-1kgz9eet.js";import"./chunk-9n0gvfrg.js";import"./chunk-q9y29cgw.js";import"./chunk-qs1kypwa.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-abx8rmt4.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{a as getStoreScript,b as clearStoreCache};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-havsy38b.js";import"./chunk-097mr013.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-sd7ymv7h.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
2
+ import{ej as a,fj as b,gj as c,hj as d,ij as e,jj as f,kj as g,lj as h,mj as i,nj as j,oj as k,pj as l,qj as m,rj as n}from"./chunk-8c18h010.js";import"./chunk-qs1kypwa.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import"./chunk-abx8rmt4.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{sj as o,tj as p,uj as q}from"./chunk-2bjdjnqf.js";import{Aj as a,Bj as b,Cj as c,Dj as d,Ej as e,Fj as f,Gj as g,Hj as h,Ij as i,Jj as j,Kj as k,Lj as l,Mj as m,Nj as n}from"./chunk-w95sp0k9.js";import"./chunk-gfhzedsr.js";import"./chunk-z45t29sf.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
2
+ import{sj as o,tj as p,uj as q}from"./chunk-zkbgy7kj.js";import{Aj as a,Bj as b,Cj as c,Dj as d,Ej as e,Fj as f,Gj as g,Hj as h,Ij as i,Jj as j,Kj as k,Lj as l,Mj as m,Nj as n}from"./chunk-w95sp0k9.js";import"./chunk-gfhzedsr.js";import"./chunk-z45t29sf.js";export{n as useOptimistic,l as untrack,a as state,g as runMountCallbacks,h as runDestroyCallbacks,i as pendingLifecycleCounts,m as peek,e as onMount,f as onDestroy,j as isSignal,k as isDerived,p as generateSignalsRuntimeDev,o as generateSignalsRuntime,c as effect,b as derived,q as default,d as batch};
@@ -905,6 +905,7 @@ finally {
905
905
  var reconnectTimer = null;
906
906
  var manualClose = false;
907
907
  var listeners = {};
908
+ var subscriptions = {};
908
909
 
909
910
  function connect() {
910
911
  if (ws() && ws().readyState <= 1) return;
@@ -917,6 +918,13 @@ finally {
917
918
  socket.onopen = function() {
918
919
  status.set('OPEN');
919
920
  reconnectAttempts = 0;
921
+ // A channel is commonly selected immediately after useWebSocket(),
922
+ // while the native socket is still CONNECTING. Keep that intent and
923
+ // subscribe once the transport is writable. Replaying the set here
924
+ // also restores channels after an automatic reconnect.
925
+ for (var channel in subscriptions) {
926
+ send({ event: 'subscribe', channel: channel });
927
+ }
920
928
  if (options.onOpen) options.onOpen(socket);
921
929
  };
922
930
 
@@ -971,7 +979,11 @@ finally {
971
979
  }
972
980
 
973
981
  function subscribe(channel) {
974
- send({ type: 'subscribe', channel: channel });
982
+ subscriptions[channel] = true;
983
+ var socket = ws();
984
+ if (socket && socket.readyState === WebSocket.OPEN) {
985
+ send({ event: 'subscribe', channel: channel });
986
+ }
975
987
  return {
976
988
  listen: function(event, handler) {
977
989
  var key = channel + ':' + event;
@@ -980,7 +992,8 @@ finally {
980
992
  return this;
981
993
  },
982
994
  leave: function() {
983
- send({ type: 'unsubscribe', channel: channel });
995
+ delete subscriptions[channel];
996
+ send({ event: 'unsubscribe', channel: channel });
984
997
  // Remove all listeners for this channel
985
998
  var prefix = channel + ':';
986
999
  for (var key in listeners) {
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Rl as x,Uq as M}from"./chunk-097mr013.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import{Vs as B,Xs as P}from"./chunk-sd7ymv7h.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";import G from"path";var T=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],O=new Set(T);var K=new Map,U=B(64),V=new Set,D=0,N=new Set(T);function f(){K.clear(),U.clear()}function S(H){let J=new Map;for(let Q of H){let Z=G.basename(Q);if(Z.endsWith(".d.ts"))continue;let z=Z.replace(/\.[jt]s$/,"");if(z==="index")continue;if(z===Z)continue;let X=J.get(z);if(X&&!X.endsWith(".js"))continue;J.set(z,Q)}return[...J.values()].sort()}function g(H,J){let Q=J.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${Q}\\b`).test(H)}function y(H){if(!H)return[];let J=P(H,D),Q=U.get(J);if(Q)return Q.slice();let Z=H.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let X of N){if(V.has(X))continue;let A=X.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${A}\\s*\\(`).test(Z))z.push(X)}return z.sort(),U.set(J,z),z.slice()}async function p(H,J){let Q=y(H);if(Q.length===0)return null;let Z=J??G.join(import.meta.dir,"composables"),z=`${Z}\x00${Q.join(",")}`,X=K.get(z);if(X!==void 0)return X||null;let A=M({loader:"ts",target:"browser",define:x()}),L=new Set(Q),W=[],C=new Set,F=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:Z,absolute:!0}))F.push(j)}catch{return K.set(z,""),null}F=S(F);for(let q of F){let j;try{j=await Bun.file(q).text()}catch{continue}let I=[];try{I=A.scan(j).exports.filter(($)=>$!=="default")}catch{continue}if(!I.some(($)=>L.has($)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),W.push(`// ${G.basename(q).replace(/\.[jt]s$/,"")}
2
+ import{Rl as x,Uq as M}from"./chunk-qs1kypwa.js";import"./chunk-xpxw2ked.js";import"./chunk-6gb72zp2.js";import"./chunk-82kkkpw2.js";import"./chunk-shyqtvbq.js";import{Vs as B,Xs as P}from"./chunk-abx8rmt4.js";import"./chunk-w1asc0zd.js";import"./chunk-xqwmj65h.js";import"./chunk-0ym08enb.js";import"./chunk-q4desjj6.js";import"./chunk-gfhzedsr.js";import"./chunk-sfaayvmn.js";import"./chunk-azfjfrns.js";import"./chunk-z45t29sf.js";import G from"path";var T=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],O=new Set(T);var K=new Map,U=B(64),V=new Set,D=0,N=new Set(T);function f(){K.clear(),U.clear()}function S(H){let J=new Map;for(let Q of H){let Z=G.basename(Q);if(Z.endsWith(".d.ts"))continue;let z=Z.replace(/\.[jt]s$/,"");if(z==="index")continue;if(z===Z)continue;let X=J.get(z);if(X&&!X.endsWith(".js"))continue;J.set(z,Q)}return[...J.values()].sort()}function g(H,J){let Q=J.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${Q}\\b`).test(H)}function y(H){if(!H)return[];let J=P(H,D),Q=U.get(J);if(Q)return Q.slice();let Z=H.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let X of N){if(V.has(X))continue;let A=X.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${A}\\s*\\(`).test(Z))z.push(X)}return z.sort(),U.set(J,z),z.slice()}async function p(H,J){let Q=y(H);if(Q.length===0)return null;let Z=J??G.join(import.meta.dir,"composables"),z=`${Z}\x00${Q.join(",")}`,X=K.get(z);if(X!==void 0)return X||null;let A=M({loader:"ts",target:"browser",define:x()}),L=new Set(Q),W=[],C=new Set,F=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:Z,absolute:!0}))F.push(j)}catch{return K.set(z,""),null}F=S(F);for(let q of F){let j;try{j=await Bun.file(q).text()}catch{continue}let I=[];try{I=A.scan(j).exports.filter(($)=>$!=="default")}catch{continue}if(!I.some(($)=>L.has($)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),W.push(`// ${G.basename(q).replace(/\.[jt]s$/,"")}
3
3
  ${A.transformSync(j).trim()}`);for(let $ of I)C.add($)}catch($){console.warn(`[stx] framework composable ${G.basename(q)} could not be bundled:`,$)}}let Y=Q.filter((q)=>!C.has(q)&&!g(H,q));if(Y.length>0)console.warn(`[stx] could not bundle ${Y.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(W.length===0)return K.set(z,""),null;let k=[...C].map((q)=>` try { if (!(${JSON.stringify(q)} in __s)) { __s[${JSON.stringify(q)}] = ${q}; if (!(${JSON.stringify(q)} in window)) window[${JSON.stringify(q)}] = ${q}; } } catch (e) {}`).join(`
4
4
  `),w=`<script data-stx-framework-composables>
5
5
  ;(function(){