@stacksjs/stx 0.2.818 → 0.2.819

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 (81) hide show
  1. package/dist/{chunk-h8x56dq5.js → chunk-0633xsmx.js} +1 -1
  2. package/dist/{chunk-y3zjmv9e.js → chunk-0s93s6ep.js} +1 -1
  3. package/dist/{chunk-5zf566bv.js → chunk-0wrmcexg.js} +1 -1
  4. package/dist/{chunk-8gcg9maj.js → chunk-12sd0ep5.js} +4 -4
  5. package/dist/{chunk-mm8ak4w2.js → chunk-1p3vmy65.js} +2 -2
  6. package/dist/chunk-2k3ga51z.js +2 -0
  7. package/dist/{chunk-casvvt3k.js → chunk-3dg2zg8d.js} +1 -1
  8. package/dist/{chunk-7ac98ja7.js → chunk-4gg9594a.js} +4 -4
  9. package/dist/{chunk-e9w8qav3.js → chunk-4jaet63w.js} +1 -1
  10. package/dist/chunk-54kn2jtw.js +2 -0
  11. package/dist/{chunk-qek9bcjt.js → chunk-54mc7876.js} +1 -1
  12. package/dist/{chunk-zme16hcr.js → chunk-6a0ekt1n.js} +1 -1
  13. package/dist/{chunk-j24psz0z.js → chunk-7c5b0th8.js} +1 -1
  14. package/dist/{chunk-fvs15n0s.js → chunk-7p7hdn42.js} +1 -1
  15. package/dist/{chunk-8hfgvs0x.js → chunk-93f6kwht.js} +1 -1
  16. package/dist/chunk-9b52cnzm.js +2 -0
  17. package/dist/{chunk-2vaap97d.js → chunk-9bhvh2dc.js} +1 -1
  18. package/dist/{chunk-kgwdxx75.js → chunk-a4yzet7p.js} +1 -1
  19. package/dist/{chunk-8wdy7kdq.js → chunk-ax16vnn5.js} +4 -4
  20. package/dist/{chunk-sf4rntqj.js → chunk-bnewgd23.js} +1 -1
  21. package/dist/{chunk-n4s0se11.js → chunk-brbqz5he.js} +5 -5
  22. package/dist/{chunk-9gj702tw.js → chunk-cbt1dchd.js} +2 -2
  23. package/dist/chunk-d7p5jr31.js +2 -0
  24. package/dist/{chunk-46sej67y.js → chunk-dzp2a775.js} +1 -1
  25. package/dist/{chunk-x34me5ar.js → chunk-e4d0jgcw.js} +2 -2
  26. package/dist/{chunk-9tzcvsv0.js → chunk-e758jz81.js} +2 -2
  27. package/dist/{chunk-dpn314z2.js → chunk-ek5ynvqh.js} +1 -1
  28. package/dist/{chunk-em7kntfc.js → chunk-f86ehf7n.js} +1 -1
  29. package/dist/{chunk-99zwpazg.js → chunk-fn2cqvb1.js} +1 -1
  30. package/dist/chunk-fzj3e3zk.js +2 -0
  31. package/dist/{chunk-cf196sv5.js → chunk-gahpv8ce.js} +1 -1
  32. package/dist/chunk-gsc617cx.js +2 -0
  33. package/dist/{chunk-2bnbcr22.js → chunk-he8rmsdq.js} +1 -1
  34. package/dist/{chunk-qr14xvwb.js → chunk-j476jghg.js} +1 -1
  35. package/dist/chunk-jcz6rd9n.js +2 -0
  36. package/dist/{chunk-a1cy78h3.js → chunk-jdddw8en.js} +1 -1
  37. package/dist/{chunk-9487tyfa.js → chunk-jgj16jmg.js} +1 -1
  38. package/dist/{chunk-j65nf7mt.js → chunk-jw7cakxt.js} +2 -2
  39. package/dist/{chunk-gvthmy3a.js → chunk-k5nd8zqh.js} +1 -1
  40. package/dist/{chunk-r8ydxe4z.js → chunk-kz6qw9fm.js} +1 -1
  41. package/dist/{chunk-zgq8bfaw.js → chunk-m7kct2sg.js} +1 -1
  42. package/dist/{chunk-k01aftw0.js → chunk-m9dyqae7.js} +3 -3
  43. package/dist/chunk-mcgqgheq.js +2 -0
  44. package/dist/chunk-mz1mgfq3.js +3 -0
  45. package/dist/{chunk-a67c2xrp.js → chunk-ngh1aeff.js} +2 -2
  46. package/dist/{chunk-67k5q95t.js → chunk-nqn4dvqd.js} +1 -1
  47. package/dist/{chunk-2kt1gqtq.js → chunk-nt5dh56c.js} +1 -1
  48. package/dist/{chunk-33ewq978.js → chunk-p04dabqm.js} +1 -1
  49. package/dist/{chunk-2jn0x4sh.js → chunk-p3dc6rg2.js} +1 -1
  50. package/dist/{chunk-4h78zypb.js → chunk-p7hy0seh.js} +1 -1
  51. package/dist/{chunk-pyz2jqph.js → chunk-pe89ztq6.js} +1 -1
  52. package/dist/{chunk-qkxx34vt.js → chunk-pmq2pdr9.js} +1 -1
  53. package/dist/chunk-r3zmbpv2.js +2 -0
  54. package/dist/{chunk-x15hrtmt.js → chunk-r57s8jqs.js} +1 -1
  55. package/dist/{chunk-9xd85mvm.js → chunk-rccv14mn.js} +4 -4
  56. package/dist/{chunk-vtt2dec3.js → chunk-sjd6rt97.js} +1 -1
  57. package/dist/{chunk-hntm02x0.js → chunk-v041eh5f.js} +1 -1
  58. package/dist/chunk-v7h8vd9n.js +2 -0
  59. package/dist/{chunk-ymypc1rp.js → chunk-vhzngsmd.js} +6 -6
  60. package/dist/{chunk-d4pmddb9.js → chunk-vvcfrsjg.js} +1 -1
  61. package/dist/{chunk-p13wg97w.js → chunk-x46hqa74.js} +1 -1
  62. package/dist/{chunk-swbrvrgr.js → chunk-xka9fdye.js} +1 -1
  63. package/dist/{chunk-c179xpsq.js → chunk-xsck49x5.js} +1 -1
  64. package/dist/{chunk-ydt1pbhx.js → chunk-z0c35c5c.js} +1 -1
  65. package/dist/cli.js +7 -7
  66. package/dist/craft-entry.js +1 -1
  67. package/dist/craft.js +1 -1
  68. package/dist/pwa.js +1 -1
  69. package/dist/ssg.js +2 -2
  70. package/package.json +5 -5
  71. package/dist/chunk-3m342maz.js +0 -2
  72. package/dist/chunk-7q79h0j4.js +0 -2
  73. package/dist/chunk-9e5gamvs.js +0 -2
  74. package/dist/chunk-bbxzkcsk.js +0 -2
  75. package/dist/chunk-enm79dwe.js +0 -2
  76. package/dist/chunk-q51w24br.js +0 -2
  77. package/dist/chunk-s9b49v74.js +0 -3
  78. package/dist/chunk-tmcgpf68.js +0 -2
  79. package/dist/chunk-vpazz8ca.js +0 -2
  80. package/dist/chunk-xha2gt0n.js +0 -2
  81. package/dist/chunk-z8ywxqqg.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{vf,xf,he,Sf,ec,en,tn,kh,tc,nn,Qn,kf,_f,Cf,ss,rn,Ef,sn,nc,_h}from"./chunk-vtt2dec3.js";import"./chunk-p13wg97w.js";import"./chunk-7sh9fa3q.js";import"./chunk-j65nf7mt.js";import"./chunk-casvvt3k.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-ymypc1rp.js";import"./chunk-sf4rntqj.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Qn as MODULE_SPECIFIER_PREFIX,vf as bundleCacheDir,xf as bundleCacheEntryLimit,_h as bundleClientEntriesSplit,sn as bundleClientScript,tn as clearBundleFailures,he as clientBundleDependencies,en as getBundleFailures,nn as hasUserImports,rn as moduleSubstitutionKey,_f as normalizeRegistrySpecifiers,Ef as queueClientBundleBuild,ec as recordBundleFailure,kf as registryIdForPath,tc as resolveBundlerFallback,Cf as rewriteRegistryImports,kh as setBundlerFallbackMode,Sf as shouldLogBundlerDiagnostics,nc as tempBuildName,ss as withModuleSubstitutes};
2
+ import{vf,xf,he,Sf,ec,en,tn,kh,tc,nn,Qn,kf,_f,Cf,ss,rn,Ef,sn,nc,_h}from"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Qn as MODULE_SPECIFIER_PREFIX,vf as bundleCacheDir,xf as bundleCacheEntryLimit,_h as bundleClientEntriesSplit,sn as bundleClientScript,tn as clearBundleFailures,he as clientBundleDependencies,en as getBundleFailures,nn as hasUserImports,rn as moduleSubstitutionKey,_f as normalizeRegistrySpecifiers,Ef as queueClientBundleBuild,ec as recordBundleFailure,kf as registryIdForPath,tc as resolveBundlerFallback,Cf as rewriteRegistryImports,kh as setBundlerFallbackMode,Sf as shouldLogBundlerDiagnostics,nc as tempBuildName,ss as withModuleSubstitutes};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{_}from"./chunk-ymypc1rp.js";import{i}from"./chunk-8gcg9maj.js";import p from"fs";import g from"path";import*as y from"readline";var e={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},u={help:{description:"Show available commands",usage:"help [command]",handler:async(t,o)=>{if(t[0]&&u[t[0]]){let n=u[t[0]];console.log(`
2
+ import{_}from"./chunk-vhzngsmd.js";import{i}from"./chunk-12sd0ep5.js";import p from"fs";import g from"path";import*as y from"readline";var e={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},u={help:{description:"Show available commands",usage:"help [command]",handler:async(t,o)=>{if(t[0]&&u[t[0]]){let n=u[t[0]];console.log(`
3
3
  ${e.bold}${t[0]}${e.reset} - ${n.description}`),console.log(` Usage: ${e.cyan}${n.usage}${e.reset}
4
4
  `)}else{console.log(`
5
5
  ${e.bold}Available Commands:${e.reset}
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{zl,mm,Hl,Vl,hm,ym}from"./chunk-9487tyfa.js";import"./chunk-ymypc1rp.js";import"./chunk-sf4rntqj.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{ym as applySlots,hm as extractSlotContent,mm as parseSlotElement,zl as parseSlots,Vl as processSlots,Hl as renderSlot};
2
+ import{zl,mm,Hl,Vl,hm,ym}from"./chunk-jgj16jmg.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{ym as applySlots,hm as extractSlotContent,mm as parseSlotElement,zl as parseSlots,Vl as processSlots,Hl as renderSlot};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Lt,ie,u,f,A,t,ae,q,l,ke,ki,F,Sn,_i,Ft,Ci,sl,$r,ol,it,il,Rr,al,kn,Ei,cl,Ar,Ir,_e,Ti}from"./chunk-72jt897s.js";import{ai,$c,o,C,Oe,pn,Ne,pe,G,vr,fn,Bs,jc,Bc,mn,_r,zs,Hs,Fc,fi,zc,Hc,Vc,Uc,De,Le,Vs,Fe,s,bn,h,p,U,Z,Se,_}from"./chunk-ymypc1rp.js";import{Dt}from"./chunk-m7hfcxt3.js";import{vn}from"./chunk-sf4rntqj.js";import{y}from"./chunk-9tzcvsv0.js";import{gr,As}from"./chunk-gtd6qs1r.js";import{pc,fc,dr,Qe,gc,I}from"./chunk-j65nf7mt.js";import{Zo,Qo,ei,ti}from"./chunk-em2yy1te.js";import{ac,us}from"./chunk-r8ydxe4z.js";import{is,as,cs}from"./chunk-7ac98ja7.js";import{gs,Uo,Wo,ms,hs,qo}from"./chunk-x34me5ar.js";import{ds,or}from"./chunk-e9w8qav3.js";import{Do}from"./chunk-c84pxd2k.js";import{se,Fo,zo,Ho}from"./chunk-f6nk205v.js";import{ar,be,lc,cr,uc}from"./chunk-9xd85mvm.js";import{j,Ye}from"./chunk-cmnze7at.js";import{mc,hc}from"./chunk-casvvt3k.js";import{E,_n,$i}from"./chunk-c5vzr1va.js";import Xn from"fs";import oe from"path";function ut(){return`
2
+ import{Lt,ie,u,f,A,t,ae,q,l,ke,ki,F,Sn,_i,Ft,Ci,sl,$r,ol,it,il,Rr,al,kn,Ei,cl,Ar,Ir,_e,Ti}from"./chunk-72jt897s.js";import{ai,$c,o,C,Oe,pn,Ne,pe,G,vr,fn,Bs,jc,Bc,mn,_r,zs,Hs,Fc,fi,zc,Hc,Vc,Uc,De,Le,Vs,Fe,s,bn,h,p,U,Z,Se,_}from"./chunk-vhzngsmd.js";import{Dt}from"./chunk-m7hfcxt3.js";import{vn}from"./chunk-bnewgd23.js";import{y}from"./chunk-e758jz81.js";import{gr,As}from"./chunk-gtd6qs1r.js";import{pc,fc,dr,Qe,gc,I}from"./chunk-jw7cakxt.js";import{Zo,Qo,ei,ti}from"./chunk-em2yy1te.js";import{ac,us}from"./chunk-kz6qw9fm.js";import{is,as,cs}from"./chunk-4gg9594a.js";import{gs,Uo,Wo,ms,hs,qo}from"./chunk-e4d0jgcw.js";import{ds,or}from"./chunk-4jaet63w.js";import{Do}from"./chunk-c84pxd2k.js";import{se,Fo,zo,Ho}from"./chunk-f6nk205v.js";import{ar,be,lc,cr,uc}from"./chunk-rccv14mn.js";import{j,Ye}from"./chunk-cmnze7at.js";import{mc,hc}from"./chunk-3dg2zg8d.js";import{E,_n,$i}from"./chunk-c5vzr1va.js";import Xn from"fs";import oe from"path";function ut(){return`
3
3
  // STX Lifecycle Runtime
4
4
  (function() {
5
5
  if (typeof window === 'undefined') return;
@@ -1293,7 +1293,7 @@ ${R}
1293
1293
  </style>`;a=a.replace(x,D),b.lastIndex=0}catch(R){}}}return a}import st from"path";var qn=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.\.?\/[^'"]*)\2/g,Vn=/(<script\b[^>]*>)([\s\S]*?)(<\/script>)/gi;function Wn(n,e){if(!e||!n.includes("/"))return n;let c=st.dirname(e);return n.replace(qn,(a,g,r,d)=>{let b=st.resolve(c,d);return`${g}${r}${b.split(st.sep).join("/")}${r}`})}function lr(n,e){if(!e||!n.includes("<script"))return n;return n.replace(Vn,(c,a,g,r)=>`${a}${Wn(g,e)}${r}`)}var Ee="<!--PARENT_CONTENT_PLACEHOLDER-->";function ur(n){return n.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function wr(n,e){let c=n.length,a=e,g=!0,r=[],d=(b)=>b+9<=c&&n[b]==="<"&&n[b+1]==="/"&&(n[b+2]==="s"||n[b+2]==="S")&&(n[b+3]==="c"||n[b+3]==="C")&&(n[b+4]==="r"||n[b+4]==="R")&&(n[b+5]==="i"||n[b+5]==="I")&&(n[b+6]==="p"||n[b+6]==="P")&&(n[b+7]==="t"||n[b+7]==="T")&&(n[b+8]===">"||/\s/.test(n[b+8]));while(a<c){let b=n[a];if(d(a))return a;if(b==="/"&&n[a+1]==="/"){if(a=n.indexOf(`
1294
1294
  `,a+2),a===-1)return-1;a+=1,g=!0;continue}if(b==="/"&&n[a+1]==="*"){let m=n.indexOf("*/",a+2);if(m===-1)return-1;a=m+2,g=!0;continue}if(b==="/"&&g){let m=a+1,x=!1;while(m<c){let w=n[m];if(w==="\\"){m+=2;continue}if(w==="[")x=!0;else if(w==="]")x=!1;else if(w==="/"&&!x){m++;break}else if(w===`
1295
1295
  `){m=-1;break}m++}if(m===-1){a++,g=!1;continue}while(m<c&&/[a-z]/.test(n[m]))m++;a=m,g=!1;continue}if(b==="'"||b==='"'){let m=b;a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]===m){a++;break}if(n[a]===`
1296
- `)break;a++}g=!1;continue}if(b==="`"){a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}if(r.length===0)g=!1;continue}if(b==="}"&&r.length>0){r.pop(),a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++,g=!1;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}continue}if(/\s/.test(b));else if(/[)\].\w$]/.test(b))g=!1;else g=!0;a++}return-1}function xr(n,e){let c=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${c}(?:\\s|=|/?>))[^>]*>`,"i").exec(n);if(!a)return null;let g=a.index+a[0].length,r=n.indexOf("</script>",g);if(r===-1)return null;let d=n.indexOf(">",r);if(d===-1)return null;return{start:a.index,end:d+1}}var zn=4096;async function ot(n,e,c){if(c.buildMode!=="serve"||e.length<zn)return null;let{registerServeModuleBundle:a}=await import("./chunk-67k5q95t.js");return`<script ${n} src="${a(e)}"></script>`}async function tr(n,e,c,a){try{let{registeredModuleIdsIn:g,buildModuleRegistryScript:r}=await o("stx/client-module-registry",()=>import("./chunk-kgwdxx75.js")),d=[],b=await r(g(...n),{minify:$i(e.buildMode,e.minifyClient),collectInputs:d});for(let m of d)c?.add(m);if(a)a.inputs=d,a.code=b??void 0;if(!b)return null;if(e.buildMode==="serve"){let{registerServeModuleBundle:m}=await import("./chunk-67k5q95t.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${m(b)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${b.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}async function Kn(n,e,c,a){let g={modulesTag:null,modulesCode:null,storeTag:null,storeCode:null,composableTag:null,composableCode:null,frameworkScript:null};try{let{getFrameworkComposableScript:k}=await o("stx/framework-composables",()=>import("./chunk-dpn314z2.js"));g.frameworkScript=await k(n)}catch{}let r=null;try{r=await o("stx/store-loader",()=>import("./chunk-bbxzkcsk.js"))}catch{}let d=e.storesDir,b=!!a.__stx_native_screen||(r?.pageStoresAll()??!0),m=b?"":n.replace(/<script\b[^>]*\bdata-stx-(?:runtime|router|hmr)\b[^>]*>[\s\S]*?<\/script>/gi,""),x=[],w=[],v=null;for(let k=0;k<8;k++){let S=null,M="",T=!1;try{if(r){let N=b?await r.getStoreScript(d).then((B)=>B?{code:B,stores:["*"],functions:null}:null):await r.getStoreScriptFor(d,[m],{reads:r.storesReadInFiles([...x,...w]),runOnce:!0});if(N)S=N.code,M=N.stores.join(","),T=!!N.functions&&!b}}catch{}if(v!==null&&M===v)break;v=M;let R=T?'data-stx-scoped data-stx-run="always" data-stx-stores':"data-stx-stores",D=S?`<script ${R}>${S}</script>`:null;g.storeCode=S,g.storeTag=S?await ot(R,S,e)??D:null;let P={};g.modulesTag=await tr([n,D],e,c,P),g.modulesCode=P.code??null,x=P.inputs??[],g.composableTag=null,g.composableCode=null,w=[];try{let{getComposableScript:N}=await o("stx/composable-loader",()=>import("./chunk-7q79h0j4.js")),B=e.composablesDir,O=[g.modulesCode??g.modulesTag,D,g.frameworkScript].filter((H)=>H!==null),L=await N(e._layerComposableDirs??B,n,O,w);if(L)g.composableCode=L,g.composableTag=await ot('data-stx-scoped data-stx-run="always" data-stx-composables',L,e)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${L}</script>`}catch{}if(b||!r)break}return g}async function Gn(n,e,c,a={}){let{withModuleSubstitutes:g,moduleSubstitutionKey:r}=await import("./chunk-h8x56dq5.js"),d=await import("./chunk-n1tbc7da.js"),{messages:b,webModules:m}=e,x=null,w=null,v=r()===""&&!a.__stx_native_screen;if(b&&d.pageMessagesEnabled(e)&&v)try{x=await d.loadPageMessages(process.cwd(),b)}catch(R){Zn(R)}if(m&&Object.keys(m).length&&v)try{w=await(await import("./chunk-skht06a2.js")).loadWebModules(process.cwd(),m)}catch(R){Jn(R)}let k=new Map([...w??[],...x?.stubs??[]]),S=()=>Kn(n,e,c,a),M=k.size?await g(k,S):await S(),T=null;if(x){let R=d.messageAreasIn(M.modulesCode,M.storeCode,M.composableCode),D=d.pageMessagesScript(x,d.pageLanguages(n,x),R);if(D)T=await ot('data-stx-scoped data-stx-run="always" data-stx-messages',D,e)??`<script data-stx-scoped data-stx-run="always" data-stx-messages>${D.replace(/<\/script/gi,"<\\/script")}</script>`}return[T,M.modulesTag,M.storeTag,M.composableTag,M.frameworkScript].filter((R)=>R!==null)}var pr=!1;function Zn(n){if(pr)return;pr=!0,console.warn(`[stx] messages: ${n instanceof Error?n.message:String(n)}; pages ship every language`)}var fr=!1;function Jn(n){if(fr)return;fr=!0,console.warn(`[stx] ${n instanceof Error?n.message:String(n)}; pages bundle the real modules`)}function Qn(n,e=""){let c=xr(n,"data-stx-runtime");if(!c)return n;let a=ar(n);if(a===-1||a===c.start){if(!e)return n;return n.slice(0,c.end)+e+n.slice(c.end)}if(a<c.start)return n.slice(0,a)+n.slice(c.start,c.end)+e+`
1296
+ `)break;a++}g=!1;continue}if(b==="`"){a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}if(r.length===0)g=!1;continue}if(b==="}"&&r.length>0){r.pop(),a++;while(a<c){if(n[a]==="\\"){a+=2;continue}if(n[a]==="`"){a++,g=!1;break}if(n[a]==="$"&&n[a+1]==="{"){r.push(!0),a+=2,g=!0;break}a++}continue}if(/\s/.test(b));else if(/[)\].\w$]/.test(b))g=!1;else g=!0;a++}return-1}function xr(n,e){let c=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(`<script\\b(?=[^>]*\\b${c}(?:\\s|=|/?>))[^>]*>`,"i").exec(n);if(!a)return null;let g=a.index+a[0].length,r=n.indexOf("</script>",g);if(r===-1)return null;let d=n.indexOf(">",r);if(d===-1)return null;return{start:a.index,end:d+1}}var zn=4096;async function ot(n,e,c){if(c.buildMode!=="serve"||e.length<zn)return null;let{registerServeModuleBundle:a}=await import("./chunk-nqn4dvqd.js");return`<script ${n} src="${a(e)}"></script>`}async function tr(n,e,c,a){try{let{registeredModuleIdsIn:g,buildModuleRegistryScript:r}=await o("stx/client-module-registry",()=>import("./chunk-a4yzet7p.js")),d=[],b=await r(g(...n),{minify:$i(e.buildMode,e.minifyClient),collectInputs:d});for(let m of d)c?.add(m);if(a)a.inputs=d,a.code=b??void 0;if(!b)return null;if(e.buildMode==="serve"){let{registerServeModuleBundle:m}=await import("./chunk-nqn4dvqd.js");return`<script data-stx-scoped data-stx-run="always" data-stx-modules src="${m(b)}"></script>`}return`<script data-stx-scoped data-stx-run="always" data-stx-modules>${b.replace(/<\/script/gi,"<\\/script")}</script>`}catch{return null}}async function Kn(n,e,c,a){let g={modulesTag:null,modulesCode:null,storeTag:null,storeCode:null,composableTag:null,composableCode:null,frameworkScript:null};try{let{getFrameworkComposableScript:k}=await o("stx/framework-composables",()=>import("./chunk-ek5ynvqh.js"));g.frameworkScript=await k(n)}catch{}let r=null;try{r=await o("stx/store-loader",()=>import("./chunk-54kn2jtw.js"))}catch{}let d=e.storesDir,b=!!a.__stx_native_screen||(r?.pageStoresAll()??!0),m=b?"":n.replace(/<script\b[^>]*\bdata-stx-(?:runtime|router|hmr)\b[^>]*>[\s\S]*?<\/script>/gi,""),x=[],w=[],v=null;for(let k=0;k<8;k++){let S=null,M="",T=!1;try{if(r){let N=b?await r.getStoreScript(d).then((B)=>B?{code:B,stores:["*"],functions:null}:null):await r.getStoreScriptFor(d,[m],{reads:r.storesReadInFiles([...x,...w]),runOnce:!0});if(N)S=N.code,M=N.stores.join(","),T=!!N.functions&&!b}}catch{}if(v!==null&&M===v)break;v=M;let R=T?'data-stx-scoped data-stx-run="always" data-stx-stores':"data-stx-stores",D=S?`<script ${R}>${S}</script>`:null;g.storeCode=S,g.storeTag=S?await ot(R,S,e)??D:null;let P={};g.modulesTag=await tr([n,D],e,c,P),g.modulesCode=P.code??null,x=P.inputs??[],g.composableTag=null,g.composableCode=null,w=[];try{let{getComposableScript:N}=await o("stx/composable-loader",()=>import("./chunk-mcgqgheq.js")),B=e.composablesDir,O=[g.modulesCode??g.modulesTag,D,g.frameworkScript].filter((H)=>H!==null),L=await N(e._layerComposableDirs??B,n,O,w);if(L)g.composableCode=L,g.composableTag=await ot('data-stx-scoped data-stx-run="always" data-stx-composables',L,e)??`<script data-stx-scoped data-stx-run="always" data-stx-composables>${L}</script>`}catch{}if(b||!r)break}return g}async function Gn(n,e,c,a={}){let{withModuleSubstitutes:g,moduleSubstitutionKey:r}=await import("./chunk-0633xsmx.js"),d=await import("./chunk-n1tbc7da.js"),{messages:b,webModules:m}=e,x=null,w=null,v=r()===""&&!a.__stx_native_screen;if(b&&d.pageMessagesEnabled(e)&&v)try{x=await d.loadPageMessages(process.cwd(),b)}catch(R){Zn(R)}if(m&&Object.keys(m).length&&v)try{w=await(await import("./chunk-skht06a2.js")).loadWebModules(process.cwd(),m)}catch(R){Jn(R)}let k=new Map([...w??[],...x?.stubs??[]]),S=()=>Kn(n,e,c,a),M=k.size?await g(k,S):await S(),T=null;if(x){let R=d.messageAreasIn(M.modulesCode,M.storeCode,M.composableCode),D=d.pageMessagesScript(x,d.pageLanguages(n,x),R);if(D)T=await ot('data-stx-scoped data-stx-run="always" data-stx-messages',D,e)??`<script data-stx-scoped data-stx-run="always" data-stx-messages>${D.replace(/<\/script/gi,"<\\/script")}</script>`}return[T,M.modulesTag,M.storeTag,M.composableTag,M.frameworkScript].filter((R)=>R!==null)}var pr=!1;function Zn(n){if(pr)return;pr=!0,console.warn(`[stx] messages: ${n instanceof Error?n.message:String(n)}; pages ship every language`)}var fr=!1;function Jn(n){if(fr)return;fr=!0,console.warn(`[stx] ${n instanceof Error?n.message:String(n)}; pages bundle the real modules`)}function Qn(n,e=""){let c=xr(n,"data-stx-runtime");if(!c)return n;let a=ar(n);if(a===-1||a===c.start){if(!e)return n;return n.slice(0,c.end)+e+n.slice(c.end)}if(a<c.start)return n.slice(0,a)+n.slice(c.start,c.end)+e+`
1297
1297
  `+n.slice(a,c.start)+n.slice(c.end);let g=n.slice(c.start,c.end),r=n.slice(0,c.start)+n.slice(c.end),d=ar(r);if(d===-1)return g+e+`
1298
1298
  `+r;return r.slice(0,d)+g+e+`
1299
1299
  `+r.slice(d)}function Yn(n){let e=/\x00STX_ESC_MUSTACHE_OPEN\x00([\s\S]*?)\x00STX_ESC_MUSTACHE_CLOSE\x00/g;return n.replace(e,(c,a,g)=>{let r=n.slice(0,g);return r.lastIndexOf("<")>r.lastIndexOf(">")?`{{${a}}}`:`{<!--stx-literal-->{${a}}}`})}async function i(n,e,c,a,g){if(a.ssr===!1&&!a.autoShell&&a.buildMode==="spa")return n;if(e.__stx_signals_gate===void 0)e.__stx_signals_gate=Se(n,c);let r=!e.__stxProcessingDepth;mn(e);for(let d of a._layerGraph?.configDependencies??[])g.add(d);if(r&&a.runtimeConfig)await vn(e,c,a.runtimeConfig);if(r)Vc(e),e.__stx_scope_seq??={n:0,key:Vs(String(e.__filename??c))},e.__stx_head_injections=Ci(),e.__stx_seo_staged=!1;if(!e.__stxProcessingDepth)e.__stxProcessingDepth=0;if(e.__stxProcessingDepth++,!e.__onceStore)e.__onceStore=new Set;if((a.debug||!E()&&!_n())&&c&&c.endsWith(".stx"))Do(n,c);try{return await ie.timeAsync("template-processing",async()=>{let d=await es(n,e,c,a,g);if(r)d=fi(d);if(r&&a.autoShell&&a.buildMode!=="compile"){let b=_e(a.app?.head,{known:Ir,source:"app.head"}),x=(e.__stx_runtime_head||null)??Ti(),w=(e.__stx_head_raw||"").trim(),v,k=w.match(/<title[^>]*>([\s\S]*?)<\/title>/i);if(k)v=k[1].trim(),w=w.replace(k[0],"").trim();let S=e.__sections?.title,M=S?_(S,e,c):void 0,T=x.title||v||M,R=!x.title&&(!!v||!!M),D=x.meta||[],P=new Set(D.map((X)=>it(X)).filter(Boolean)),N={...b,...T&&{title:T},meta:[...(b.meta||[]).filter((X)=>!P.has(it(X))),...D],link:[...b.link||[],...x.link||[]],script:[...b.script||[],...x.script||[]],headRaw:[b.headRaw,w].filter(Boolean).join(`
@@ -1308,7 +1308,7 @@ ${m.trim()}
1308
1308
  @endsection`}}if(D&&m.includes("<script")){let O=G(m),L=O.scripts.map((H)=>mr(H,c)??H);m=vr(O.output,L)}if(m=m.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(O,L,H)=>(R[L]=H,"")),m=m.replace(/@section\(\s*['"]([^'"]+)['"]\s*,\s*([^)]+?)\s*\)/g,(O,L,H)=>{if(/^(['"]).*\1$/.test(H.trim()))return O;try{let X=u(H.trim(),e);if(X===void 0)return O;let Y=(e.__stx_inline_section_values??=[]).push(X)-1;return R[L]=`{{ __stx_inline_section_values[${Y}] }}`,""}catch{return O}}),m=m.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@endsection|@show)/g,(O,L,H)=>{if(H.includes("@parent"))R[L]=H.replace("@parent",Ee);else R[L]=H.trim();return""}),e.__sections=R,m=m.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"](?:,\s*['"]([^'"]+)['"])?\)/g,(O,L,H)=>R[L]||H||""),!("slot"in e)||e.slot===void 0)m=m.replace(/\{\{\s*slot\s*\}\}/g,()=>R.content||"");if(m=cs(m,T),D){let O=[],L=G(m),H=pe(L.output,pn,(X,z)=>`\x00STX_ORPHAN_STYLE_${z}\x00`);if(m=H.output.replace(/\x00STX_(SCRIPT|ORPHAN_STYLE)_(\d+)\x00/g,(X,z,Y)=>{let ee=z==="SCRIPT"?mr(L.scripts[Number(Y)],c):H.tokens[Number(Y)];if(ee)O.push(ee);return""}),O.length>0){let X=O.join(`
1309
1309
  `);R.content=R.content?`${R.content}
1310
1310
  ${X}`:X,e.__sections=R}}if(D)try{let O;if(oe.isAbsolute(D))O=D,g.add(D);else O=await ke(()=>bn(D,c,d,g),null,()=>{throw new ae(`Failed to resolve layout path: ${D}`,c,void 0,void 0,`Layout referenced from ${c}`)});if(!O){let ee=(K)=>{if(!K)return[];try{let ge=oe.isAbsolute(K)?K:oe.resolve(process.cwd(),K);return Xn.readdirSync(ge).filter((we)=>we.endsWith(".stx")).map((we)=>we.replace(/\.stx$/,""))}catch{return[]}},te=[...ee(d.layoutsDir),...ee(d.fallbackLayoutsDir)].filter((K,ge,we)=>we.indexOf(K)===ge).sort(),ce=[d.layoutsDir,d.fallbackLayoutsDir].filter((K)=>typeof K==="string"&&K.length>0),ue=ce.length>0?` Searched: ${ce.join(", ")} (set \`layoutsDir\` to look elsewhere).`:"",ne=`Layout not found: ${D} (referenced from ${c})`+(te.length>0?`. Available layouts: ${te.join(", ")}`:d.layoutsDir?`. No .stx layouts found in ${d.layoutsDir}`:"")+ue;if(F.log(Error(ne),{layoutPath:D,filePath:c,available:te},"error"),console.error(`[stx] ${ne}`),d.debug)throw new ae(ne,c);return m}let L=await ke(()=>Bun.file(O).text(),"",()=>{throw new ae(`Failed to read layout file: ${O}`,c,void 0,void 0,"Layout content could not be loaded")});L=lr(L,O);let H=L.match(/@(?:layout|extends)\(\s*['"]([^'"]+)['"]\s*\)/);if(H){if(d.debug)console.log(`Found nested layout: ${H[1]} in ${O}`);let ee={},te=L.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ne,K,ge)=>(ee[K]=ge.trim(),""));for(let[ne,K]of Object.entries(ee))if(R[ne]&&R[ne].includes(Ee)){let ge=R[ne].indexOf(Ee);R[ne]=R[ne].slice(0,ge)+K+R[ne].slice(ge+Ee.length)}else if(!R[ne])R[ne]=K;let ce={...e,__sections:R},ue=`@layout('${H[1]}')${te}`;return await i(ue,ce,O,d,g)}let X=L.replace(/\{\{--[\s\S]*?--\}\}/g,""),z=as(X,T),Y={};return z=z.replace(/@section\(\s*['"]([^'"]+)['"]\s*\)([\s\S]*?)(?:@show|@endsection)/g,(ee,te,ce)=>(Y[te]=ce.trim(),`@slot('${te}')`)),z=z.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(ee,te,ce)=>{if(R[te]){let ue=R[te];if(ue.includes(Ee)){let ne=Y[te]||"",K=ue.indexOf(Ee);ue=ue.slice(0,K)+ne+ue.slice(K+Ee.length)}return ue}return ce||""}),z=ts(z,R),z=z.replace(/\{\{\s*slot\s*\}\}/g,()=>R.content||""),z=cs(z,T),e.__originalFilePath=c,m=await br(z,e,O,d,g),m=`<!-- stx-layout: ${D} -->
1311
- ${m}`,v(m)}catch(O){if(O instanceof q)throw O;throw new ae(`Error processing layout ${D}: ${O instanceof Error?O.message:String(O)}`,c)}return v(await br(m,e,c,d,g))}function ts(n,e){return n.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(c,a,g)=>{let r=e[a];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function rs(n,e){if(n.__stx_sfc_mode=!0,n.__stx_options=e,e.buildMode)n.__stx_buildMode=e.buildMode;let c=e.envPrefix||"STX_PUBLIC_",a={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(c)&&r!==void 0)a[g]=r;n.$env=a}async function ns(n,e){await ke(()=>Xt(n,e),void 0,(c)=>{F.log(c,{filePath:n,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${n}: ${c.message}`)})}var at="data-stx-source";function mr(n,e){if(!n)return n;let c=/^<script\b([^>]*)>/i.exec(n);if(!c||!/\bserver\b/.test(c[1])||c[1].includes(at))return n;return`<script ${at}="${encodeURIComponent(e)}"${n.slice(7)}`}function ss(n){let e=new RegExp(`${at}="([^"]*)"`).exec(n);return e?decodeURIComponent(e[1]):void 0}function hr(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function yr(n,e,c){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${hr(n)}</span><span style="display:block;margin-top:4px">${hr(c)}</span></div>`}async function ls(n,e,c,a){let{scanScriptTags:g}=await o("stx/signal-processing",()=>import("./chunk-2vaap97d.js")),r=[],d=!E()&&!_n();for(let m of g(n)){let x=m.attrs;if(!/\bserver\b/.test(x))continue;let w=m.start+m.fullMatch.indexOf(">")+1,v=wr(n,w);if(v===-1)continue;let k=n.slice(w,v);if(!k.trim())continue;let S=ss(x)??c,M={index:m.start,length:v+9-m.start};try{let{extractVariables:T}=await o("stx/variable-extractor",()=>import("./chunk-x15hrtmt.js"));await T(k,e,S,{preserveExisting:!0,onFailure:(R)=>{if(R.kind==="unknown")return;if(a?.onServerScriptError?.({sourcePath:S,kind:R.kind,message:R.message}),!d)return;r.push({...M,markup:yr(S,R.kind,R.message)})}})}catch(T){let R=T instanceof Error?T:Error(String(T));if(F.log(R,{filePath:S,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${S}: ${R.message}`),d)r.push({...M,markup:yr(S,"unknown",R.message)})}}if(r.length===0)return n;let b=n;for(let m of r.sort((x,w)=>w.index-x.index))b=b.slice(0,m.index)+m.markup+b.slice(m.index+m.length);return b}async function ps(n,e,c){try{let{interpolateScriptsInTemplate:a}=await o("stx/expressions",()=>import("./chunk-c179xpsq.js"));return a(n,e,{skipServer:!0})}catch(a){let g=a instanceof Error?a:Error(String(a));return F.log(g,{filePath:c,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${c}: ${g.message}`),n}}async function br(n,e,c,a,g){let r=n,d=a;if(r=await ls(r,e,c,a),r=await Nt(r,e,c),r=await jt(r,e,c),r=await ps(r,e,c),r=await Tt(r,e,c,d),Se(r))r=Uo(r,e),r=hs(r,e),r=ms(r,e);r=Wo(r);let{processStreamDirectives:b}=await o("stx/streaming",()=>import("./chunk-pyz2jqph.js"));r=b(r,e),r=or(r,e,c,d,!0),r=await Qt(r,e,c,d,g),r=await us(r,e,c,d,g),r=pc(r,e,c,d);let{processDeferDirectives:m}=await o("stx/defer",()=>import("./chunk-6e76tz09.js"));r=m(r,e,c);let{processTeleportDirectives:x}=await o("stx/teleport",()=>import("./chunk-03mtfndv.js"));r=x(r,e,c);let{processTransitionDirectives:w,processTransitionAttributes:v}=await o("stx/transitions",()=>import("./chunk-18qxd18d.js"));r=w(r,e,c),r=v(r);let{processErrorBoundaryDirectives:k,stripRenderFailedMarkers:S}=await o("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));r=k(r,e,c),r=S(r);let{processSuspenseDirectives:M}=await o("stx/suspense",()=>import("./chunk-avbvedyx.js"));r=M(r,e,c);let{processAsyncDirectives:T}=await o("stx/async-components",()=>import("./chunk-abzrvxct.js"));r=T(r,e,c);let{processKeepAliveDirectives:R}=await o("stx/keep-alive",()=>import("./chunk-h8kbcz9t.js"));r=R(r,e,c);let{processVirtualListDirectives:D,processVirtualGridDirectives:P,processInfiniteListDirectives:N}=await o("stx/virtual-scrolling",()=>import("./chunk-1cd0w20k.js"));r=D(r,e,c),r=P(r,e,c),r=N(r,e,c);let{processPartialHydrationDirectives:B,processStaticDirectives:O}=await o("stx/partial-hydration",()=>import("./chunk-72w08sh9.js"));r=B(r,e,c),r=O(r);let{processComputedDirectives:L,processWatchDirectives:H}=await o("stx/computed",()=>import("./chunk-1xdzcy9d.js"));r=L(r,e,c),r=H(r,e,c);let{processFormValidationDirectives:X}=await o("stx/forms-validation",()=>import("./chunk-qek9bcjt.js"));r=X(r,e,c);let{processHeadDirective:z,processTitleDirective:Y,processMetaDirective:ee,resetHead:te}=await o("stx/head",()=>import("./chunk-tsb5h4e2.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)te();let ce=z(r);if(r=ce.content,ce.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ce.headContent}
1311
+ ${m}`,v(m)}catch(O){if(O instanceof q)throw O;throw new ae(`Error processing layout ${D}: ${O instanceof Error?O.message:String(O)}`,c)}return v(await br(m,e,c,d,g))}function ts(n,e){return n.replace(/@(?:yield|slot)\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(c,a,g)=>{let r=e[a];if(r!==void 0){if(!new RegExp(`@(?:yield|slot)\\(\\s*['"]${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}['"]`).test(r))return r}return g||""})}function rs(n,e){if(n.__stx_sfc_mode=!0,n.__stx_options=e,e.buildMode)n.__stx_buildMode=e.buildMode;let c=e.envPrefix||"STX_PUBLIC_",a={};for(let[g,r]of Object.entries(process.env))if(g.startsWith(c)&&r!==void 0)a[g]=r;n.$env=a}async function ns(n,e){await ke(()=>Xt(n,e),void 0,(c)=>{F.log(c,{filePath:n,phase:"view-composer"},"warning"),console.warn(`[stx] view composer failed for ${n}: ${c.message}`)})}var at="data-stx-source";function mr(n,e){if(!n)return n;let c=/^<script\b([^>]*)>/i.exec(n);if(!c||!/\bserver\b/.test(c[1])||c[1].includes(at))return n;return`<script ${at}="${encodeURIComponent(e)}"${n.slice(7)}`}function ss(n){let e=new RegExp(`${at}="([^"]*)"`).exec(n);return e?decodeURIComponent(e[1]):void 0}function hr(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function yr(n,e,c){return`<div data-stx-server-script-error role="alert" style="padding:12px 14px;border:1px solid #f0b4b4;border-left-width:4px;background:#fff5f5;color:#7a1f1f;font:13px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace"><strong style="display:block;margin-bottom:4px">stx: a &lt;script server&gt; ${e==="module-resolution"?"imports a module that does not resolve":e==="syntax"?"does not parse":"names something that does not exist"}, so this component rendered nothing.</strong><span style="display:block;opacity:.85">${hr(n)}</span><span style="display:block;margin-top:4px">${hr(c)}</span></div>`}async function ls(n,e,c,a){let{scanScriptTags:g}=await o("stx/signal-processing",()=>import("./chunk-9bhvh2dc.js")),r=[],d=!E()&&!_n();for(let m of g(n)){let x=m.attrs;if(!/\bserver\b/.test(x))continue;let w=m.start+m.fullMatch.indexOf(">")+1,v=wr(n,w);if(v===-1)continue;let k=n.slice(w,v);if(!k.trim())continue;let S=ss(x)??c,M={index:m.start,length:v+9-m.start};try{let{extractVariables:T}=await o("stx/variable-extractor",()=>import("./chunk-r57s8jqs.js"));await T(k,e,S,{preserveExisting:!0,onFailure:(R)=>{if(R.kind==="unknown")return;if(a?.onServerScriptError?.({sourcePath:S,kind:R.kind,message:R.message}),!d)return;r.push({...M,markup:yr(S,R.kind,R.message)})}})}catch(T){let R=T instanceof Error?T:Error(String(T));if(F.log(R,{filePath:S,phase:"server-script-extraction"},"warning"),console.warn(`[stx] server <script> extraction failed in ${S}: ${R.message}`),d)r.push({...M,markup:yr(S,"unknown",R.message)})}}if(r.length===0)return n;let b=n;for(let m of r.sort((x,w)=>w.index-x.index))b=b.slice(0,m.index)+m.markup+b.slice(m.index+m.length);return b}async function ps(n,e,c){try{let{interpolateScriptsInTemplate:a}=await o("stx/expressions",()=>import("./chunk-xsck49x5.js"));return a(n,e,{skipServer:!0})}catch(a){let g=a instanceof Error?a:Error(String(a));return F.log(g,{filePath:c,phase:"script-expression-interpolation"},"warning"),console.warn(`[stx] script expression interpolation failed in ${c}: ${g.message}`),n}}async function br(n,e,c,a,g){let r=n,d=a;if(r=await ls(r,e,c,a),r=await Nt(r,e,c),r=await jt(r,e,c),r=await ps(r,e,c),r=await Tt(r,e,c,d),Se(r))r=Uo(r,e),r=hs(r,e),r=ms(r,e);r=Wo(r);let{processStreamDirectives:b}=await o("stx/streaming",()=>import("./chunk-pe89ztq6.js"));r=b(r,e),r=or(r,e,c,d,!0),r=await Qt(r,e,c,d,g),r=await us(r,e,c,d,g),r=pc(r,e,c,d);let{processDeferDirectives:m}=await o("stx/defer",()=>import("./chunk-6e76tz09.js"));r=m(r,e,c);let{processTeleportDirectives:x}=await o("stx/teleport",()=>import("./chunk-03mtfndv.js"));r=x(r,e,c);let{processTransitionDirectives:w,processTransitionAttributes:v}=await o("stx/transitions",()=>import("./chunk-18qxd18d.js"));r=w(r,e,c),r=v(r);let{processErrorBoundaryDirectives:k,stripRenderFailedMarkers:S}=await o("stx/error-boundaries",()=>import("./chunk-h85hrwkq.js"));r=k(r,e,c),r=S(r);let{processSuspenseDirectives:M}=await o("stx/suspense",()=>import("./chunk-avbvedyx.js"));r=M(r,e,c);let{processAsyncDirectives:T}=await o("stx/async-components",()=>import("./chunk-abzrvxct.js"));r=T(r,e,c);let{processKeepAliveDirectives:R}=await o("stx/keep-alive",()=>import("./chunk-h8kbcz9t.js"));r=R(r,e,c);let{processVirtualListDirectives:D,processVirtualGridDirectives:P,processInfiniteListDirectives:N}=await o("stx/virtual-scrolling",()=>import("./chunk-1cd0w20k.js"));r=D(r,e,c),r=P(r,e,c),r=N(r,e,c);let{processPartialHydrationDirectives:B,processStaticDirectives:O}=await o("stx/partial-hydration",()=>import("./chunk-72w08sh9.js"));r=B(r,e,c),r=O(r);let{processComputedDirectives:L,processWatchDirectives:H}=await o("stx/computed",()=>import("./chunk-1xdzcy9d.js"));r=L(r,e,c),r=H(r,e,c);let{processFormValidationDirectives:X}=await o("stx/forms-validation",()=>import("./chunk-54mc7876.js"));r=X(r,e,c);let{processHeadDirective:z,processTitleDirective:Y,processMetaDirective:ee,resetHead:te}=await o("stx/head",()=>import("./chunk-tsb5h4e2.js"));if(!e.__stx_head_preset&&!e.__stx_runtime_head)te();let ce=z(r);if(r=ce.content,ce.headContent)e.__stx_head_raw=`${e.__stx_head_raw||""}${ce.headContent}
1312
1312
  `;if(r=Y(r,e),r=ee(r,e,c),r=Wt(r),r=Fo(r,e),r=Et(r),r=Bt(r),r=await is(r,e,c,d,g),r=await us(r,e,c,d,g),r=r.replace(/@push\s*\(\s*['"][^'"]+['"]\s*\)[\s\S]*?@endpush/g,""),r=fi(r),r=se(r,e,c),r=ds(r),e.__stxProcessingDepth===1)r=Uc(r,e);if(r=jc(r,e,{filePath:c,buildMode:d.buildMode}),r=zo(r,e),r=Ho(r,e),r=We(r,e),r=Ot(r,e),r=Pt(r,e),r=await ht(r,e,c,d),r=await gc(r,e,c),r=await mc(r,e,c,d),r=hc(r,e,c,d),r=Zo(r,e,c,d),r=Qo(r,e,c),r=ei(r,e,c,d),r=St(r,e,c,d),r=zs(r,e),r=Hs(r),r=Fc(r),!d.skipEventDirectives)r=$c(r,e,c);if(r=Bc(r,e,c,a.skipSignalsRuntime===!0&&Number(e.__stxProcessingDepth)>0),d.debug){let V=/\bx-data\s*=/.test(r),W=gs(n);if(V&&W)console.warn(`[stx] ${c}: Template mixes Alpine-style (x-data) and signals (state/derived/effect) reactivity.
1313
1313
  Both work on the same page, but they manage separate scopes.
1314
1314
  Prefer signals (state/derived/effect) for new components.`)}r=ac(r,e),r=await _(r,e,c),r=zc(r),r=Hc(r),r=ft(r);let{processXElementDirectives:ue}=await o("stx/x-element",()=>import("./chunk-zhxdpzga.js"));r=ue(r);let ne=e.__originalFilePath||c,K=De(e);if(r=await qo(r,d,ne,K),r=Rt(r,e),r=await Vt(r,e,c,d),d.media?.image?.autoSiblings){let V=d.publicDir||"public",{rewriteImagesWithSiblings:W}=await o("stx/image-optimization/auto-sibling",()=>import("./chunk-9736003n.js"));r=await W(r,{publicDir:V})}if(d.seo?.enabled)r=ti(r,e,d);let ge=(V,W,J=!0)=>{if(!W)return V;let me=W.match(/<title\b[^>]*>[\s\S]*?<\/title>/i),re=/<head\b[^>]*>[\s\S]*?(?:<\/head\s*>|<body\b|$)/i.exec(V),de=re?/<title\b[^>]*>[\s\S]*?<\/title>/i.exec(re[0]):null;if(me&&re&&de){if(J){let Te=re.index+de.index;V=V.slice(0,Te)+me[0]+V.slice(Te+de[0].length)}if(W=W.replace(me[0],"").trim(),!W)return V}if(/<\/head>/i.test(V))return V.replace(/<\/head>/i,`${W}
@@ -1322,6 +1322,6 @@ ${ut()}
1322
1322
  `+Te}else r=r.replace("</head>",`${W}
1323
1323
  </head>`)}else if(r.includes("<body"))r=r.replace(/<body([^>]*)>/,`<body$1>
1324
1324
  ${W}`);else r=W+`
1325
- `+r}{let{scanScriptTags:V}=await o("stx/signal-processing",()=>import("./chunk-2vaap97d.js")),W=[];for(let J of V(r)){if(!/\bserver\b/i.test(J.attrs))continue;let me=J.start+J.fullMatch.indexOf(">")+1,re=wr(r,me);if(re===-1)continue;let de=re+9;while(de<r.length&&/\s/.test(r[de]))de++;W.push({start:J.start,end:de})}if(W.length>0){let J=Array(W.length+1),me=0;for(let re=0;re<W.length;re++){let{start:de,end:Te}=W[re];J[re]=r.slice(me,de),me=Te}J[W.length]=r.slice(me),r=J.join("")}}let ct=Bs(r,c);if(ct.hasScoped)r=ct.html;let Cr=e.__stx_event_bindings||[],ze=!1,lt=[],Mr=/\s:[a-z][\w.-]*\s*=/.test(r),{scanScriptTags:Dr}=await o("stx/signal-processing",()=>import("./chunk-2vaap97d.js"));for(let V of Dr(r,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))lt.push({match:V.fullMatch,attrs:V.attrs,content:V.body});for(let{match:V,attrs:W,content:J}of lt){ze=!0;let me=J;Oe(J,c,a.strict,e.__originalFilePath);let re=await Le(J,{eventBindings:Cr,attrs:W,hasColonDirectives:Mr,templateContent:n,filePath:c,projectRoot:process.cwd(),production:$i(a.buildMode,a.minifyClient),serverData:K});r=r.replace(V,()=>re)}if(ze)e.__stx_event_bindings=[];if(!ze&&e.__stxProcessingDepth===1){let V=e.__stx_event_bindings||[];if(V.length>0){let W=ai(V);if(W){let J=r.lastIndexOf("</body>");r=J===-1?r+W:r.slice(0,J)+W+`
1325
+ `+r}{let{scanScriptTags:V}=await o("stx/signal-processing",()=>import("./chunk-9bhvh2dc.js")),W=[];for(let J of V(r)){if(!/\bserver\b/i.test(J.attrs))continue;let me=J.start+J.fullMatch.indexOf(">")+1,re=wr(r,me);if(re===-1)continue;let de=re+9;while(de<r.length&&/\s/.test(r[de]))de++;W.push({start:J.start,end:de})}if(W.length>0){let J=Array(W.length+1),me=0;for(let re=0;re<W.length;re++){let{start:de,end:Te}=W[re];J[re]=r.slice(me,de),me=Te}J[W.length]=r.slice(me),r=J.join("")}}let ct=Bs(r,c);if(ct.hasScoped)r=ct.html;let Cr=e.__stx_event_bindings||[],ze=!1,lt=[],Mr=/\s:[a-z][\w.-]*\s*=/.test(r),{scanScriptTags:Dr}=await o("stx/signal-processing",()=>import("./chunk-9bhvh2dc.js"));for(let V of Dr(r,{skipAttrs:/\bserver\b|\bsrc\s*=|\bdata-stx-scoped\b|\bdata-stx-router\b|\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/}))lt.push({match:V.fullMatch,attrs:V.attrs,content:V.body});for(let{match:V,attrs:W,content:J}of lt){ze=!0;let me=J;Oe(J,c,a.strict,e.__originalFilePath);let re=await Le(J,{eventBindings:Cr,attrs:W,hasColonDirectives:Mr,templateContent:n,filePath:c,projectRoot:process.cwd(),production:$i(a.buildMode,a.minifyClient),serverData:K});r=r.replace(V,()=>re)}if(ze)e.__stx_event_bindings=[];if(!ze&&e.__stxProcessingDepth===1){let V=e.__stx_event_bindings||[];if(V.length>0){let W=ai(V);if(W){let J=r.lastIndexOf("</body>");r=J===-1?r+W:r.slice(0,J)+W+`
1326
1326
  `+r.slice(J)}e.__stx_event_bindings=[]}}if(!d.skipSignalsRuntime&&!be(r)&&lc(r))r=await cr(r,d);if(r=uc(r),d.csp?.enabled&&d.csp.useNonce&&typeof e.cspNonce==="string")r=kt(r,e.cspNonce);return r}
1327
1327
  export{yt,Re,rc,os,No,Mo,tr,i};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{de,Lc,Fs,mn,m,De,Le}from"./chunk-ymypc1rp.js";import{dr,Qe,B}from"./chunk-j65nf7mt.js";import{tr,i}from"./chunk-8gcg9maj.js";import{we}from"./chunk-9xd85mvm.js";function b(s){return s.endsWith(".md")||s.endsWith(".markdown")}function k(s){let e=[];g(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];g(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function g(n,p){let u;while((u=n.exec(s))!==null){let t=u.index,o=t+u[0].length;if(p?.some((l)=>t>=l.start&&o<=l.end))continue;e.push({start:t,end:o})}}if(e.length===0)return s;e.sort((n,p)=>n.start-p.start);let c="",a=0;for(let n of e){if(n.start<a)continue;c+=s.slice(a,n.start),c+=`@raw${s.slice(n.start,n.end)}@endraw`,a=n.end}return c+=s.slice(a),c}async function R(s,e={}){let{data:r,content:g}=dr(s),a=await(e.renderer??((n)=>Qe(n)))(g);return{html:k(a),frontmatter:r??{}}}import{dirname as v,resolve as _}from"path";function M(s){let e=s,r=de(s);if(r)e=r.content.trim();let g=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,c=[],a=[],n=[],p=(o)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(o),u;while((u=g.exec(s))!==null){let o=u[1],l=u[2],d=u[0],f=o.includes("server");if(p(l))n.push(d);else if(f)a.push(l);else c.push(d)}let t=e;{let o=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,d=[];while((l=o.exec(t))!==null){let f=l.index+l[0].length,x=t.indexOf("</script>",f);if(x===-1)continue;d.push({start:l.index,end:x+9}),o.lastIndex=x+9}for(let f=d.length-1;f>=0;f--)t=t.substring(0,d[f].start)+t.substring(d[f].end)}for(let o of c)t=t.replace(o,"");return{templateContent:t,serverScripts:a,clientScripts:c,signalsScripts:n}}function E(s,e){return`<!DOCTYPE html>
2
+ import{de,Lc,Fs,mn,m,De,Le}from"./chunk-vhzngsmd.js";import{dr,Qe,B}from"./chunk-jw7cakxt.js";import{tr,i}from"./chunk-12sd0ep5.js";import{we}from"./chunk-rccv14mn.js";function b(s){return s.endsWith(".md")||s.endsWith(".markdown")}function k(s){let e=[];g(/<pre\b[^>]*>[\s\S]*?<\/pre>/gi);let r=[...e];g(/<code\b[^>]*>[\s\S]*?<\/code>/gi,r);function g(n,p){let u;while((u=n.exec(s))!==null){let t=u.index,o=t+u[0].length;if(p?.some((l)=>t>=l.start&&o<=l.end))continue;e.push({start:t,end:o})}}if(e.length===0)return s;e.sort((n,p)=>n.start-p.start);let c="",a=0;for(let n of e){if(n.start<a)continue;c+=s.slice(a,n.start),c+=`@raw${s.slice(n.start,n.end)}@endraw`,a=n.end}return c+=s.slice(a),c}async function R(s,e={}){let{data:r,content:g}=dr(s),a=await(e.renderer??((n)=>Qe(n)))(g);return{html:k(a),frontmatter:r??{}}}import{dirname as v,resolve as _}from"path";function M(s){let e=s,r=de(s);if(r)e=r.content.trim();let g=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,c=[],a=[],n=[],p=(o)=>/\b(?:state|derived|effect|batch)\s*(?:<[^<>()]*>)?\s*\(/.test(o),u;while((u=g.exec(s))!==null){let o=u[1],l=u[2],d=u[0],f=o.includes("server");if(p(l))n.push(d);else if(f)a.push(l);else c.push(d)}let t=e;{let o=/<script\b(?![^>]*\b(?:client|type\s*=\s*["']module["']|src\s*=))[^>]*>/gi,l,d=[];while((l=o.exec(t))!==null){let f=l.index+l[0].length,x=t.indexOf("</script>",f);if(x===-1)continue;d.push({start:l.index,end:x+9}),o.lastIndex=x+9}for(let f=d.length-1;f>=0;f--)t=t.substring(0,d[f].start)+t.substring(d[f].end)}for(let o of c)t=t.replace(o,"");return{templateContent:t,serverScripts:a,clientScripts:c,signalsScripts:n}}function E(s,e){return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -14,5 +14,5 @@ ${a.join(`
14
14
  `)}`}else{if(r.processClientScripts!==!1&&a.length>0){let o=p.__stx_event_bindings||[],l=De(p),d=await Promise.all(a.map(async(w)=>{let C=w.match(/<script\b([^>]*)>/i)?.[1]||"";if(/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(C))return w;let h=w.match(/<script\b[^>]*>([\s\S]*?)<\/script>/);if(!h)return w;return await Le(h[1],{eventBindings:o,templateContent:t,serverData:l,filePath:e})})),x=[await tr(d,{...n,buildMode:"compile"}),...d].filter(Boolean).join(`
15
15
  `);if(t.match(/(<\/body>)/i))t=t.replace(/(<\/body>)/i,`${x}
16
16
  $1`);else t+=`
17
- ${x}`}t=await we(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=E(t,r.title)}if(r.injectCSS)try{let{injectCss:o}=await import("./chunk-33ewq978.js");t=await o(t)}catch{}return t}
17
+ ${x}`}t=await we(t)}if(r.wrapInDocument){if(!t.trim().toLowerCase().startsWith("<!doctype")&&!t.trim().toLowerCase().startsWith("<html"))t=E(t,r.title)}if(r.injectCSS)try{let{injectCss:o}=await import("./chunk-p04dabqm.js");t=await o(t)}catch{}return t}
18
18
  export{Ga};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{tr,i}from"./chunk-12sd0ep5.js";import"./chunk-e758jz81.js";import"./chunk-4gg9594a.js";import"./chunk-c84pxd2k.js";import"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import{we}from"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-xka9fdye.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{Oe,zs,Hs}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{tr as buildModulesTag,we as injectRouterScript,i as processDirectives,zs as processJsonDirective,Hs as processOnceDirective,Oe as validateClientScript};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{A,t,l}from"./chunk-72jt897s.js";import{Z}from"./chunk-ymypc1rp.js";import{Jo}from"./chunk-9gwhs0gk.js";import C from"path";var L;async function W(){if(L!==void 0)return L;try{let e=await import("@stacksjs/ts-i18n");L=e.loadLocale??null}catch{L=null}return L}var P={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},k={},v={},R={};function J(e,s=0){if(s<=0)return!1;return Date.now()-e.loadedAt>s}async function G(e,s){if({...P,...s.i18n}.cache&&k[e]){let r=k[e],o=s.i18n?.cacheMaxAge??0;if(!J(r,o))return r.translations}if(v[e]?.state==="loading")return v[e].promise;R[e]="loading";let n=T(e,s).then((r)=>(R[e]="loaded",delete v[e],r)).catch((r)=>{throw R[e]="error",v[e]={promise:n,state:"error",error:r instanceof Error?r:Error(String(r))},r});return v[e]={promise:n,state:"loading"},n}async function T(e,s){let i={...P,...s.i18n},n=C.isAbsolute(i.translationsDir)?i.translationsDir:C.resolve(s.root||process.cwd(),i.translationsDir);try{let r=await W(),o=r?await r(e,{translationsDir:n,defaultLocale:i.defaultLocale,sources:te(i.format)}):await Y(e,i,n);if(o===void 0){let u=e!==i.defaultLocale?await T(i.defaultLocale,s):{};if(i.cache)k[e]={translations:u,loadedAt:Date.now(),locale:e};return u}let c=o;if(i.cache)k[e]={translations:c,loadedAt:Date.now(),locale:e};return c}catch(r){if(s.debug)console.error(`Error loading translation file for locale "${e}":`,r);if(e!==i.defaultLocale)return T(i.defaultLocale,s);return{}}}async function Y(e,s,i){let n=C.join(i,`${e}${Q(s.format)}`);try{let r=await import(n);return r.default||r}catch(r){try{let o=await Bun.file(n).text();if(s.format==="yaml"||s.format==="yml")return X(o);if(s.format==="json")return JSON.parse(o);throw r}catch{return}}}function Q(e){switch(e){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function X(e){let s={},i=e.split(`
2
+ import{A,t,l}from"./chunk-72jt897s.js";import{Z}from"./chunk-vhzngsmd.js";import{Jo}from"./chunk-9gwhs0gk.js";import C from"path";var L;async function W(){if(L!==void 0)return L;try{let e=await import("@stacksjs/ts-i18n");L=e.loadLocale??null}catch{L=null}return L}var P={defaultLocale:"en",locale:"en",translationsDir:"translations",format:"yaml",fallbackToKey:!0,cache:!0},k={},v={},R={};function J(e,s=0){if(s<=0)return!1;return Date.now()-e.loadedAt>s}async function G(e,s){if({...P,...s.i18n}.cache&&k[e]){let r=k[e],o=s.i18n?.cacheMaxAge??0;if(!J(r,o))return r.translations}if(v[e]?.state==="loading")return v[e].promise;R[e]="loading";let n=T(e,s).then((r)=>(R[e]="loaded",delete v[e],r)).catch((r)=>{throw R[e]="error",v[e]={promise:n,state:"error",error:r instanceof Error?r:Error(String(r))},r});return v[e]={promise:n,state:"loading"},n}async function T(e,s){let i={...P,...s.i18n},n=C.isAbsolute(i.translationsDir)?i.translationsDir:C.resolve(s.root||process.cwd(),i.translationsDir);try{let r=await W(),o=r?await r(e,{translationsDir:n,defaultLocale:i.defaultLocale,sources:te(i.format)}):await Y(e,i,n);if(o===void 0){let u=e!==i.defaultLocale?await T(i.defaultLocale,s):{};if(i.cache)k[e]={translations:u,loadedAt:Date.now(),locale:e};return u}let c=o;if(i.cache)k[e]={translations:c,loadedAt:Date.now(),locale:e};return c}catch(r){if(s.debug)console.error(`Error loading translation file for locale "${e}":`,r);if(e!==i.defaultLocale)return T(i.defaultLocale,s);return{}}}async function Y(e,s,i){let n=C.join(i,`${e}${Q(s.format)}`);try{let r=await import(n);return r.default||r}catch(r){try{let o=await Bun.file(n).text();if(s.format==="yaml"||s.format==="yml")return X(o);if(s.format==="json")return JSON.parse(o);throw r}catch{return}}}function Q(e){switch(e){case"yaml":return".yaml";case"yml":return".yml";case"js":return".js";case"ts":return".ts";case"json":default:return".json"}}function X(e){let s={},i=e.split(`
3
3
  `),n=[{obj:s,indent:-1}];for(let r of i){let o=r.replace(/#.*$/,"").trimEnd();if(!o.trim())continue;let c=o.search(/\S/);if(c===-1)continue;while(n.length>1&&n[n.length-1].indent>=c)n.pop();let u=n[n.length-1].obj,a=o.match(/^(\s*)(\S[^:]*):\s*(.*)$/);if(a){let[,,g,p]=a,f=g.trim(),m=p.trim();if(m==="")u[f]={},n.push({obj:u[f],indent:c});else u[f]=ee(m)}}return s}function ee(e){if(e.startsWith("'")&&e.endsWith("'")||e.startsWith('"')&&e.endsWith('"'))return e.slice(1,-1);let s=e.toLowerCase();if(s==="true"||s==="yes")return!0;if(s==="false"||s==="no")return!1;if(s==="null"||s==="~")return null;let i=Number(e);if(!Number.isNaN(i)&&e!=="")return i;return e}function te(e){switch(e){case"yaml":case"yml":return["yaml"];case"js":case"ts":return["ts"];case"json":default:return["json"]}}async function re(e,s){return G(e,s)}function ne(e,s){for(let i of e){let n=i.trim(),r=n.match(/^\{(\d+)\}\s*(.*)$/);if(r){let c=Number.parseInt(r[1],10);if(s===c)return r[2];continue}let o=n.match(/^\[(\d+),(\d+|\*)\]\s*(.*)$/);if(o){let c=Number.parseInt(o[1],10),u=o[2]==="*"?Number.POSITIVE_INFINITY:Number.parseInt(o[2],10);if(s>=c&&s<=u)return o[3];continue}}if(e.length===2)return s===1?e[0].trim():e[1].trim();if(s<e.length)return e[s].trim();return e[e.length-1].trim()}function ie(e,s={}){return j(e,s)}function j(e,s){let i="",n=0;while(n<e.length)if(e[n]==="{"){let r=se(e,n);if(r===-1){i+=e[n],n++;continue}let o=e.slice(n+1,r);i+=ae(o,s),n=r+1}else if(e[n]==="'"&&n+1<e.length)if(e[n+1]==="'")i+="'",n+=2;else if(e[n+1]==="{"||e[n+1]==="}")i+=e[n+1],n+=2;else i+=e[n],n++;else i+=e[n],n++;return i}function se(e,s){let i=0;for(let n=s;n<e.length;n++)if(e[n]==="{")i++;else if(e[n]==="}"){if(i--,i===0)return n}return-1}function ae(e,s){let i=oe(e);if(i.length===0)return`{${e}}`;let n=i[0].trim(),r=s[n];if(i.length===1)return r!==void 0?String(r):`{${n}}`;switch(i[1].trim().toLowerCase()){case"plural":return le(r,i.slice(2).join(","),s);case"select":return ue(r,i.slice(2).join(","));case"selectordinal":return de(r,i.slice(2).join(","));case"number":return pe(r,i[2]?.trim());case"date":return fe(r,i[2]?.trim());case"time":return me(r,i[2]?.trim());default:return r!==void 0?String(r):`{${e}}`}}function oe(e){let s=[],i="",n=0;for(let r=0;r<e.length;r++){let o=e[r];if(o==="{")n++,i+=o;else if(o==="}")n--,i+=o;else if(o===","&&n===0)s.push(i),i="";else i+=o}if(i)s.push(i);return s}function le(e,s,i){let n=Number(e)||0,r=I(s),o=`=${n}`;if(r[o])return E(r[o],n,i);let c=ce(n);if(r[c])return E(r[c],n,i);if(r.other)return E(r.other,n,i);return String(n)}function E(e,s,i){let n=e.replace(/#/g,String(s));return j(n,i)}function ce(e){let s=Math.abs(e),i=Math.floor(s),n=String(e).includes(".")?String(e).split(".")[1].length:0;if(i===1&&n===0)return"one";return"other"}function ue(e,s){let i=String(e||""),n=I(s);if(n[i])return n[i];return n.other||String(e)}function de(e,s){let i=Number(e)||0,n=I(s),r=ge(i);if(n[r])return n[r].replace(/#/g,String(i));if(n.other)return n.other.replace(/#/g,String(i));return String(i)}function ge(e){let s=Math.abs(e),i=s%10,n=s%100;if(i===1&&n!==11)return"one";if(i===2&&n!==12)return"two";if(i===3&&n!==13)return"few";return"other"}function I(e){let s={},i=/(\w+|=\d+)\s*\{([^{}]*(?:\{[^{}]*\}[^{}]*)*)\}/g,n=i.exec(e);while(n!==null)s[n[1]]=n[2],n=i.exec(e);return s}function pe(e,s){let i=Number(e);if(Number.isNaN(i))return String(e);switch(s){case"integer":return Math.floor(i).toLocaleString();case"percent":return`${(i*100).toFixed(0)}%`;case"currency":return i.toLocaleString(void 0,{style:"currency",currency:"USD"});default:return i.toLocaleString()}}function fe(e,s){let i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e);let n={};switch(s){case"short":n.dateStyle="short";break;case"medium":n.dateStyle="medium";break;case"long":n.dateStyle="long";break;case"full":n.dateStyle="full";break;default:n.dateStyle="medium"}return i.toLocaleDateString(void 0,n)}function me(e,s){let i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e);let n={};switch(s){case"short":n.timeStyle="short";break;case"medium":n.timeStyle="medium";break;case"long":n.timeStyle="long";break;case"full":n.timeStyle="full";break;default:n.timeStyle="short"}return i.toLocaleTimeString(void 0,n)}function be(e){return/\{[^}]+,\s*(?:plural|select|selectordinal|number|date|time)\s*,/.test(e)}function O(e,s,i=!0,n={}){let r=e.split("."),o=s;for(let u of r){if(o===void 0||o===null)break;o=o[u]}if(o===void 0||o===null)return i?e:"";let c=String(o);if(be(c))return ie(c,n);if(c.includes("|")&&"count"in n){let u=Number(n.count),a=c.split("|");c=ne(a,u)}for(let[u,a]of Object.entries(n)){let g=u.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");c=c.replace(new RegExp(`:${g}`,"g"),()=>String(a))}return c}var D=new Set(["ar","arc","ckb","dv","fa","he","khw","ks","nqo","prs","ps","sd","syr","ug","ur","uz-af","yi"]),he=new Set(["adlm","arab","aran","hebr","nkoo","rohg","syrc","thaa","yezi"]);function q(e){if(!e)return"ltr";let s=e.trim().toLowerCase().replace(/_/g,"-").split("-"),i=s[0];if(!i)return"ltr";let n=s[1]?.length===4?s[1]:void 0;if(n)return he.has(n)?"rtl":"ltr";if(s.length>1&&D.has(`${i}-${s[1]}`))return"rtl";return D.has(i)?"rtl":"ltr"}async function mc(e,s,i,n){let r=e,o=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)([\s\S]*?)@endtranslate/g,c={...P,...n.i18n},u=await re(c.locale,n);s.__translations=u,s.__locale=c.locale,s.__i18nConfig=c,r=await F(r,o,async(p,f,m,w,h)=>{try{let b={};if(m)try{let d=[()=>JSON.parse(m),()=>{let x=`{"data":${m}}`,S=JSON.parse(x);return typeof S.data==="object"?S.data:{}},()=>A(m,s)];for(let x of d)try{if(b=x(),Object.keys(b).length>0)break}catch{}}catch(d){if(n.debug)console.error("Error parsing parameters for @translate directive:",d)}let y=O(f,u,c.fallbackToKey,b);return y?Z(r,h,y,!1,p.length):w.trim()}catch(b){if(n.debug)console.error("Error processing @translate directive:",b);return l("Translate",`Error in @translate('${f}'): ${b instanceof Error?b.message:String(b)}`,t.EVALUATION_ERROR)}});let a=/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]+\})\s*)?\)/g;if(n.debug){console.warn(`Processing translations in template. Sections: ${r.includes("<h2>Translation with Parameters</h2>")?"Parameters section found":"Parameters section missing"}`);let p=[...r.matchAll(a)];console.warn(`Found ${p.length} @translate matches`),p.forEach((f,m)=>console.warn(`Match ${m}: ${f[0]}, Key: ${f[1]}, Params: ${f[2]||"none"}`))}return r=await F(r,/@translate\(\s*['"]([^'"]+)['"]\s*(?:,\s*(\{[^}]*\})\s*)?\)/g,async(p,f,m,w)=>{try{let h={};if(m)try{let b=[()=>JSON.parse(m),()=>{let y=`{"data":${m}}`,d=JSON.parse(y);return typeof d.data==="object"?d.data:{}},()=>A(m,s)];for(let y of b)try{if(h=y(),Object.keys(h).length>0)break}catch{}}catch(b){if(n.debug)console.error("Error parsing parameters for @translate directive:",b)}return Z(r,w,O(f,u,c.fallbackToKey,h),!1,p.length)}catch(h){if(n.debug)console.error("Error processing @translate directive:",h);return l("Translate",`Error in @translate('${f}'): ${h instanceof Error?h.message:String(h)}`,t.EVALUATION_ERROR)}}),r}async function F(e,s,i){let n=[];return e.replace(s,(o,...c)=>{let u=i(o,...c).then((a)=>({match:o,replacement:a}));return n.push(u),o}),(await Promise.all(n)).reduce((o,{match:c,replacement:u})=>o.replace(c,()=>u),e)}function _(e,s){if(!e||q(e)!=="rtl")return!1;return!s||s.trim().toLowerCase()!=="rtl"}function V(e){if(!e)return!1;return e.trim().split(/\s+/)[0]?.toLowerCase()==="presentation"||e.trim().split(/\s+/)[0]?.toLowerCase()==="none"}function U(e,s){let i=new RegExp(`\\b${s}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i").exec(e);if(!i)return null;return i[2]??i[3]??i[4]??null}function hc(e,s,i,n){let r=e;r=r.replace(/@a11y\(\s*['"]([^'"]+)['"]\s*(?:,\s*['"]([^'"]+)['"]\s*)?\)/g,(c,u,a)=>{let p={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[u]||"Make this element accessible";return`<!-- a11y-hint: ${a||p} -->`});let o=/@screenReader\(([^@]*)\)@endScreenReader/g;return r=r.replace(o,(c,u)=>`<span class="sr-only">${u.trim()}</span>`),r=r.replace(/@ariaDescribe\(\s*['"]([^'"]+)['"]\s*,\s*['"]([^'"]+)['"]\s*\)/g,(c,u,a)=>`<span id="${`desc-${u}`}" class="sr-only">${a}</span>`),r}function ye(){return typeof globalThis.document<"u"&&typeof globalThis.document.createElement==="function"}function xe(e){let s=new Map,i=e.replace(/<(\/?)([A-Z][\w:.-]*)(?=[\s/>])/g,(r,o,c)=>{let u=s.get(c);if(!u)u=`stx-a11y-component-${s.size}`,s.set(c,u);return`<${o}${u}`}),n=new Map([...s.entries()].map(([r,o])=>[o,r]));return{protectedSource:i,restore:(r)=>r.replace(/<(\/?)(stx-a11y-component-\d+)(?=[\s/>])/g,(o,c,u)=>{let a=n.get(u);return a?`<${c}${a}`:o})}}function we(e,s){let i=[],n=/<img\s+([^>]*)>/gi,r;r=n.exec(e);while(r!==null){let d=r[1];if(!/\balt\s*=/i.test(d))i.push({type:"missing-alt",element:r[0].substring(0,100),message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"});r=n.exec(e)}let o=/<button([^>]*)>\s*<\/button>/gi;r=o.exec(e);while(r!==null){let d=r[1];if(!/\baria-label\s*=/i.test(d)&&!/\btitle\s*=/i.test(d))i.push({type:"missing-accessible-name",element:r[0].substring(0,100),message:"Empty button missing accessible name",impact:"critical",help:"Add text content, aria-label, or title",helpUrl:"https://web.dev/learn/accessibility/aria-html/"});r=o.exec(e)}let c=/<a\s+([^>]*)>\s*<\/a>/gi;r=c.exec(e);while(r!==null){let d=r[1];if(!/\baria-label\s*=/i.test(d)&&!/\btitle\s*=/i.test(d))i.push({type:"link-missing-text",element:r[0].substring(0,100),message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"});r=c.exec(e)}let u=/<(input|select|textarea)\s+([^>]*)>/gi;r=u.exec(e);while(r!==null){let d=r[2];if(/\btype\s*=\s*["']hidden["']/i.test(d)){r=u.exec(e);continue}let x=/\baria-label\s*=/i.test(d)||/\baria-labelledby\s*=/i.test(d),S=d.match(/\bid\s*=\s*["']([^"']+)["']/i);if(!x){let B=S&&new RegExp(`<label[^>]*\\bfor\\s*=\\s*["']${S[1]}["']`,"i").test(e),M=r.index,N=e.substring(0,M),Se=e.substring(M),H=(N.match(/<label\b/gi)||[]).length,z=(N.match(/<\/label>/gi)||[]).length,K=H>z;if(!B&&!K)i.push({type:"input-missing-label",element:r[0].substring(0,100),message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})}r=u.exec(e)}let a=/<h([1-6])[^>]*>/gi,g=[];r=a.exec(e);while(r!==null)g.push(Number.parseInt(r[1],10)),r=a.exec(e);let p=0;for(let d of g){if(p>0&&d>p+1)i.push({type:"heading-skip",element:`<h${d}>`,message:`Heading level skipped from h${p} to h${d}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});p=d}if(/<html\b/i.test(e)&&!/<html[^>]*\slang\s*=/i.test(e))i.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});let f=e.match(/<html\b([^>]*)>/i);if(f&&_(U(f[1],"lang"),U(f[1],"dir")))i.push({type:"missing-dir",element:f[0].substring(0,100),message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});let m=/<table([^>]*)>([\s\S]*?)<\/table>/gi;r=m.exec(e);while(r!==null){let d=r[2];if(!V(U(r[1],"role"))&&!/<th\b/i.test(d))i.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});r=m.exec(e)}let w=/<(video|audio)[^>]*\sautoplay\s[^>]*>/gi;r=w.exec(e);while(r!==null){if(!/\bmuted\b/i.test(r[0]))i.push({type:"autoplay-audio",element:`<${r[1]}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"});r=w.exec(e)}let h=/\btabindex\s*=\s*["']([1-9]\d*)["']/gi;r=h.exec(e);while(r!==null)i.push({type:"positive-tabindex",element:`tabindex="${r[1]}"`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"}),r=h.exec(e);let b=/<iframe\s+([^>]*)>/gi;r=b.exec(e);while(r!==null){let d=r[1];if(!/\btitle\s*=/i.test(d)&&!/\baria-label\s*=/i.test(d))i.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"});r=b.exec(e)}let y=/<([a-z]+)\s+([^>]*role\s*=\s*["']button["'][^>]*)>/gi;r=y.exec(e);while(r!==null){let d=r[1].toLowerCase(),x=r[2];if(d!=="button"&&!/\btabindex\s*=/i.test(x))i.push({type:"button-not-focusable",element:r[0].substring(0,100),message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"});r=y.exec(e)}return i}async function Ae(e,s){let{protectedSource:i}=xe(e);if(!ye())return we(i,s);let n=[];try{let r=globalThis.document.createElement("div");r.innerHTML=i,r.querySelectorAll("img").forEach((a)=>{if(!a.hasAttribute("alt"))n.push({type:"missing-alt",element:`<${a.outerHTML}>`,message:"Image missing alt attribute",impact:"serious",help:"Add alt text to images for screen readers",helpUrl:"https://web.dev/learn/accessibility/images/"})}),r.querySelectorAll('button, a, [role="button"]').forEach((a)=>{if(!(a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby")||a.textContent&&a.textContent.trim().length>0))n.push({type:"missing-accessible-name",element:`<${a.outerHTML}>`,message:"Interactive element missing accessible name",impact:"critical",help:"Add text content, aria-label, or aria-labelledby",helpUrl:"https://web.dev/learn/accessibility/aria-html/"})}),r.querySelectorAll("input, select, textarea").forEach((a)=>{let g=a.getAttribute("id"),p=g&&r.querySelector(`label[for="${g}"]`),f=a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby"),m=a.closest("label")!==null;if(!p&&!f&&!m)n.push({type:"input-missing-label",element:`<${a.outerHTML}>`,message:"Form input missing associated label",impact:"serious",help:"Associate a label with the input or use aria-label",helpUrl:"https://web.dev/learn/accessibility/forms/"})});let o=Array.from(r.querySelectorAll("h1, h2, h3, h4, h5, h6")),c=0;for(let a of o){let g=Number.parseInt(a.tagName.charAt(1));if(c>0&&g>c+1)n.push({type:"heading-skip",element:`<${a.outerHTML}>`,message:`Heading level skipped from h${c} to h${g}`,impact:"moderate",help:"Maintain proper heading hierarchy without skipping levels",helpUrl:"https://web.dev/learn/accessibility/structure/"});c=g}let u=r.querySelector("html");if(i.includes("<html")&&u&&!u.hasAttribute("lang"))n.push({type:"missing-lang",element:"<html>",message:"Document language not specified",impact:"serious",help:"Add lang attribute to the html element",helpUrl:"https://web.dev/learn/accessibility/more-html/#language"});if(u&&_(u.getAttribute("lang"),u.getAttribute("dir")))n.push({type:"missing-dir",element:"<html>",message:'Document language is right-to-left but dir="rtl" is not set',impact:"serious",help:'Add dir="rtl" to the html element so the layout mirrors the text',helpUrl:"https://www.w3.org/International/questions/qa-html-dir"});if(r.querySelectorAll("a").forEach((a)=>{let g=a.textContent&&a.textContent.trim().length>0,p=a.hasAttribute("aria-label")||a.hasAttribute("aria-labelledby"),f=a.hasAttribute("title"),m=a.querySelector("img[alt]");if(!g&&!p&&!f&&!m)n.push({type:"link-missing-text",element:`<${a.outerHTML}>`,message:"Link has no accessible text",impact:"serious",help:"Add text content, aria-label, or title to links",helpUrl:"https://web.dev/learn/accessibility/more-html/#links"})}),i.includes("<nav")||i.includes("<header")){if(!r.querySelector('a[href="#main"], a[href="#content"], .skip-link, [class*="skip"]')&&r.querySelectorAll("a").length>5)n.push({type:"missing-skip-link",element:"<nav>",message:"Consider adding a skip navigation link",impact:"minor",help:"Add a skip link to allow keyboard users to bypass navigation",helpUrl:"https://web.dev/learn/accessibility/focus/#skip-links"})}if(r.querySelectorAll("table").forEach((a)=>{if(V(a.getAttribute("role")))return;let g=a.querySelector("caption");if(!a.querySelector("th"))n.push({type:"table-missing-headers",element:"<table>",message:"Table missing header cells (th)",impact:"serious",help:"Use th elements for table headers",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"});if(!g&&!a.hasAttribute("aria-label")&&!a.hasAttribute("aria-labelledby"))n.push({type:"table-missing-caption",element:"<table>",message:"Table missing caption or accessible name",impact:"minor",help:"Add a caption element or aria-label to describe the table",helpUrl:"https://web.dev/learn/accessibility/more-html/#tables"})}),r.querySelectorAll('[style*="color"]').forEach((a)=>{let g=a.getAttribute("style")||"";if(g.includes("color:")&&!g.includes("background"))n.push({type:"potential-contrast-issue",element:`<${a.tagName.toLowerCase()}>`,message:"Element has inline color style - verify contrast ratio",impact:"minor",help:"Ensure text has sufficient contrast ratio (4.5:1 for normal text)",helpUrl:"https://web.dev/learn/accessibility/color-contrast/"})}),r.querySelectorAll("video[autoplay], audio[autoplay]").forEach((a)=>{if(!a.hasAttribute("muted"))n.push({type:"autoplay-audio",element:`<${a.tagName.toLowerCase()}>`,message:"Auto-playing media may disrupt users",impact:"moderate",help:"Add muted attribute or provide controls to stop playback",helpUrl:"https://web.dev/learn/accessibility/more-html/#multimedia"})}),r.querySelectorAll("[tabindex]").forEach((a)=>{if(Number.parseInt(a.getAttribute("tabindex")||"0")>0)n.push({type:"positive-tabindex",element:`<${a.tagName.toLowerCase()}>`,message:"Positive tabindex disrupts natural tab order",impact:"moderate",help:'Use tabindex="0" or "-1" instead of positive values',helpUrl:"https://web.dev/learn/accessibility/focus/#tab-index"})}),r.querySelectorAll('[role="button"]').forEach((a)=>{if(!a.hasAttribute("tabindex"))n.push({type:"button-not-focusable",element:`<${a.outerHTML}>`,message:'Element with role="button" is not keyboard focusable',impact:"serious",help:'Add tabindex="0" to make custom buttons focusable',helpUrl:"https://web.dev/learn/accessibility/focus/"})}),i.includes("<body")&&!r.querySelector('main, [role="main"]'))n.push({type:"missing-main-landmark",element:"<body>",message:"Document missing main landmark region",impact:"moderate",help:"Add a main element to identify the primary content",helpUrl:"https://web.dev/learn/accessibility/structure/#landmarks"});r.querySelectorAll("iframe").forEach((a)=>{if(!a.hasAttribute("title")&&!a.hasAttribute("aria-label"))n.push({type:"iframe-missing-title",element:"<iframe>",message:"Iframe missing title attribute",impact:"serious",help:"Add a title attribute to describe the iframe content",helpUrl:"https://web.dev/learn/accessibility/more-html/#frames"})})}catch(r){console.error(`Error checking accessibility in ${s}:`,r)}return n}async function yc(e,s={}){let i={},{recursive:n=!0,ignorePaths:r=[]}=s,o=Array.isArray(e)?e:[e],c=await Jo(o,{recursive:n,ignorePaths:r}),u=[];for(let a of c)try{let g=await Bun.file(a).text();if(a.endsWith("good-a11y.stx"))continue;let p=await Ae(g,a);if(u.push(a),p.length>0)i[a]=p}catch(g){console.error(`Error scanning ${a}:`,g)}return{results:i,scannedFiles:u}}var bc={name:"a11y",handler:(e,s,i,n)=>{if(!s.length)return e;let r=s[0].replace(/['"]/g,""),o=s.length>1?s[1].replace(/['"]/g,""):"",u={"aria-label":"Ensure interactive elements have accessible labels","alt-text":"Provide alternative text for images",focus:"Ensure the element can receive keyboard focus",landmark:"Use appropriate landmark roles","heading-order":"Maintain proper heading hierarchy","color-contrast":"Ensure sufficient color contrast","keyboard-nav":"Make sure element is keyboard navigable","screen-reader":"Optimize for screen reader users"}[r]||"Make this element accessible";return`<!-- a11y-hint: ${o||u} -->${e}`},hasEndTag:!1},wc={name:"screenReader",handler:(e)=>`<span class="sr-only">${e}</span>`,hasEndTag:!0};
4
4
  export{mc,hc,yc,bc,wc};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{T,u,f,A,d,q}from"./chunk-72jt897s.js";import{H,Ps,Oe,de,kr,je,Be,s,h,Se,_}from"./chunk-ymypc1rp.js";import{at}from"./chunk-1tzqqr0p.js";import{P}from"./chunk-r9e0r6jx.js";import{se}from"./chunk-f6nk205v.js";import{j,Ye}from"./chunk-cmnze7at.js";import{E,_n}from"./chunk-c5vzr1va.js";import C from"path";import{existsSync as St}from"fs";function ct(a,t){let c=0;for(let i=t;i<a.length;i++){let S=a[i];if(S==="("||S==="["||S==="{")c++;else if(S===")"||S==="]"||S==="}")c--;else if(S===","&&c===0)return i}return-1}function yt(a,t,c){let i=a,S=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),n=S.exec(i);while(n){let g=n.index,e=g+n[0].length-1,D=1,U=e+1;while(U<i.length&&D>0){if(i[U]==="(")D++;else if(i[U]===")")D--;U++}if(D!==0)break;let rt=i.substring(e+1,U-1),N=`${c}(${rt})`;i=i.substring(0,g)+N+i.substring(U),S.lastIndex=g+N.length,n=S.exec(i)}return i}function $t(a){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(a)}function mt(a){let t=a,c=[],i=new Set,S=0,n=0,g=t.length,e=(N)=>{n++;while(n<g){if(t[n]==="\\"){n+=2;continue}if(t[n]===N){n++;return}n++}},D=()=>{n++;while(n<g){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`"){n++;return}if(t[n]==="$"&&t[n+1]==="{"){n+=2;let N=1;while(n<g&&N>0)if(t[n]==="{")N++,n++;else if(t[n]==="}")N--,n++;else if(t[n]==="'"||t[n]==='"')e(t[n]);else if(t[n]==="`")D();else n++;continue}n++}},U=()=>{if(t[n]==="/"&&t[n+1]==="/"){while(n<g&&t[n]!==`
2
+ import{T,u,f,A,d,q}from"./chunk-72jt897s.js";import{H,Ps,Oe,de,kr,je,Be,s,h,Se,_}from"./chunk-vhzngsmd.js";import{at}from"./chunk-1tzqqr0p.js";import{P}from"./chunk-r9e0r6jx.js";import{se}from"./chunk-f6nk205v.js";import{j,Ye}from"./chunk-cmnze7at.js";import{E,_n}from"./chunk-c5vzr1va.js";import C from"path";import{existsSync as St}from"fs";function ct(a,t){let c=0;for(let i=t;i<a.length;i++){let S=a[i];if(S==="("||S==="["||S==="{")c++;else if(S===")"||S==="]"||S==="}")c--;else if(S===","&&c===0)return i}return-1}function yt(a,t,c){let i=a,S=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),n=S.exec(i);while(n){let g=n.index,e=g+n[0].length-1,D=1,U=e+1;while(U<i.length&&D>0){if(i[U]==="(")D++;else if(i[U]===")")D--;U++}if(D!==0)break;let rt=i.substring(e+1,U-1),N=`${c}(${rt})`;i=i.substring(0,g)+N+i.substring(U),S.lastIndex=g+N.length,n=S.exec(i)}return i}function $t(a){return/\b(state|derived|effect)\s*(?:<[^<>()]*>)?\s*\(/.test(a)}function mt(a){let t=a,c=[],i=new Set,S=0,n=0,g=t.length,e=(N)=>{n++;while(n<g){if(t[n]==="\\"){n+=2;continue}if(t[n]===N){n++;return}n++}},D=()=>{n++;while(n<g){if(t[n]==="\\"){n+=2;continue}if(t[n]==="`"){n++;return}if(t[n]==="$"&&t[n+1]==="{"){n+=2;let N=1;while(n<g&&N>0)if(t[n]==="{")N++,n++;else if(t[n]==="}")N--,n++;else if(t[n]==="'"||t[n]==='"')e(t[n]);else if(t[n]==="`")D();else n++;continue}n++}},U=()=>{if(t[n]==="/"&&t[n+1]==="/"){while(n<g&&t[n]!==`
3
3
  `)n++;return!0}if(t[n]==="/"&&t[n+1]==="*"){n+=2;while(n<g-1&&!(t[n]==="*"&&t[n+1]==="/"))n++;return n+=2,!0}return!1},rt=()=>{if(S!==0)return;let N=t.slice(n).match(/^(const|let|var)\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*=/);if(N){let Z=N[2];if(!i.has(Z))c.push(Z),i.add(Z);return}let et=t.slice(n).match(/^function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(et){let Z=et[1];if(!i.has(Z))c.push(Z),i.add(Z);return}let Y=t.slice(n).match(/^async\s+function\s+([a-zA-Z_$][a-zA-Z0-9_$]*)\s*\(/);if(Y){let Z=Y[1];if(!i.has(Z))c.push(Z),i.add(Z)}};while(n<g){if(U())continue;if(t[n]==="'"||t[n]==='"'){e(t[n]);continue}if(t[n]==="`"){D();continue}if(t[n]==="{"){S++,n++;continue}if(t[n]==="}"){S--,n++;continue}if(S===0&&/[a-z]/i.test(t[n])&&(n===0||/\s|[;{}()]/.test(t[n-1])))rt();n++}return c.join(", ")}function Et(a,t=""){let c=mt(a).split(",").map((i)=>i.trim()).filter(Boolean);return`
4
4
  (function() {
5
5
  ${at("var",c)}
@@ -44,10 +44,10 @@ ${n}
44
44
  }
45
45
  if (typeof window !== 'undefined') window.__STX_CURRENT_ELEMENT__ = __stxPrevEl;
46
46
  }
47
- })();`;return c+a+i}function It(a,t){if(j(a)){let S=j(a).tag.match(/data-stx-scope="([^"]*)"/);if(S)return{html:a,mergedIntoExisting:S[1],stamped:!0,root:"body"};return{html:Ye(a,(n,g)=>`<body${g} data-stx-scope="${t}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let c=a.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(c){let i=c[2]+c[3],S=c[2].slice(1),n=i.match(/data-stx-scope="([^"]*)"/);if(n)return{html:a,mergedIntoExisting:n[1],stamped:!0,root:S};let g=c[1],e=c[2],D=c[3];return{html:`${g}${e} data-stx-scope="${t}"${D}${a.slice(c[0].length)}`,mergedIntoExisting:null,stamped:!0,root:S}}return{html:a,mergedIntoExisting:null,stamped:!1,root:null}}var Mt=0;function ut(a,t){let c=C.basename(a,".stx").replace(/[^a-zA-Z0-9]/g,"_"),i=t.__stx_scope_seq;return i?`stx_scope_${c}_${++i.n}_${i.key}`:`stx_scope_${c}_${++Mt}`}var lt=new Set,pt=new Set;function Rh(){lt.clear(),pt.clear()}var Tt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function If(a){let t=(e)=>e.replace(/[^\n]/g," "),c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,t).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,t).replace(/<!--[\s\S]*?-->/g,t).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,t).replace(/\{\{[\s\S]*?\}\}/g,t).replace(/\{!![\s\S]*?!!\}/g,t),i=[],S=0,n=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,g;while((g=n.exec(c))!==null){let e=g[1]==="/",D=g[2],U=g[3]==="/"||Tt.has(D.toLowerCase());if(e){S=Math.max(0,S-1);continue}if(S===0)i.push(D);if(!U)S++}return i}function ft(a){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(a)}var Je=new T(500),ic=new Set;function Ah(){ic.clear()}function Ct(a){if(a.__onceStore instanceof Set)return a.__onceStore;return ic}async function is(a,t,c,i,S,n=new Set){let g=i.partialsDir||C.join(C.dirname(c),"partials");if(g&&!C.isAbsolute(g))g=C.resolve(process.cwd(),g);let e=yt(a,"@partial","@include"),D=Ct(t);e=e.replace(/@once([\s\S]*?)@endonce/g,(m,k,x)=>{let p=k.trim(),r=`${c}:${p}`;if(D.has(r))return"";return D.add(r),k});{let m=/@includeIf\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")")r--;w++}if(r!==0)break;let l=e.substring(p+1,w-1),o=l.match(/^\s*['"]([^'"]+)['"]/);if(!o){m.lastIndex=w;continue}let O=o[1],W=U(O,g,c),R="";if(W&&await Bun.file(W).exists())S.add(W),R=`@include(${l})`;e=e.substring(0,x)+R+e.substring(w),m.lastIndex=0}}for(let[m,k]of[["@includeWhen",!1],["@includeUnless",!0]]){let x=new RegExp(`${m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),p;while((p=x.exec(e))!==null){let r=p.index,w=r+p[0].length-1,l=1,o=w+1;while(o<e.length&&l>0){if(e[o]==="(")l++;else if(e[o]===")")l--;o++}if(l!==0)break;let O=e.substring(w+1,o-1),W=ct(O,0);if(W===-1){x.lastIndex=o;continue}let R=O.substring(0,W).trim(),V=O.substring(W+1).trim(),z=V.match(/^\s*['"]([^'"]+)['"]/);if(!z){x.lastIndex=o;continue}let b=z[1],J=V.substring(z[0].length),B,I=ct(J,0);if(I!==-1)B=J.substring(I+1).trim();try{let M=`Boolean(${R})`,L;if(f(M)){let it=d(M,Object.keys(t));L=Boolean(it(...Object.values(t)))}else L=Boolean(u(M,t));let tt=k?!L:L,nt="";if(tt){let it=U(b,g,c);if(it&&await Bun.file(it).exists())S.add(it);nt=`@include('${b}'${B?`, ${B}`:""})`}e=e.substring(0,r)+nt+e.substring(o),x.lastIndex=0}catch(M){let L=M instanceof Error?M.message:String(M),tt=h("Include",`Error evaluating ${m} condition: ${L}`,c,a,r);e=e.substring(0,r)+tt+e.substring(o),x.lastIndex=0}}}{let m=/@each\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")"){if(r--,r===0)break}w++}if(r!==0)break;let l=e.substring(p+1,w),o=e.substring(x,w+1),O=l.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!O){m.lastIndex=0,e=e.replace(o,"");continue}let[,W,R,V,z]=O;try{let b,J=R.trim();if(f(J))b=d(J,Object.keys(t))(...Object.values(t));else b=u(J,t);let B="";if(Array.isArray(b)&&b.length>0)for(let I of b){let M={...t,[V]:I},L=await et(W,M,a,x);B+=L}else if(z)B=await et(z,{},a,x);e=e.substring(0,x)+B+e.substring(w+1),m.lastIndex=0}catch(b){let J=b instanceof Error?b.message:String(b);e=e.substring(0,x)+h("Each",`Error in @each: ${J}`,c,a,x)+e.substring(w+1),m.lastIndex=0}}}{let m=/@includeFirst\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")"){if(r--,r===0)break}w++}if(r!==0)break;let l=e.substring(p+1,w),o=e.substring(x,w+1),O=l.match(/^\s*(\[[^\]]+\])/);if(!O){m.lastIndex=0,e=e.replace(o,"");continue}let W=O[1],R=l.slice(O[0].length),V,z=R.match(/^\s*,\s*\{/);if(z){R=R.slice(z[0].length-1);let B=1,I=1;while(I<R.length&&B>0){if(R[I]==="{")B++;else if(R[I]==="}"){if(B--,B===0)break}I++}V=R.substring(0,I+1),R=R.slice(I+1)}let b,J=R.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(J)b=J[1];try{let B=JSON.parse(W.replace(/'/g,'"')),I={};if(V)try{I=A(V,t)}catch(L){let tt=L instanceof Error?L.message:String(L);if(i.debug){let nt=h("Include",`Error parsing includeFirst variables: ${tt}`,c,a,x,o);e=e.replace(o,()=>nt)}else e=e.replace(o,()=>b||"");continue}let M=!1;for(let L of B){let tt=U(L,g,c);if(!tt)continue;if(await s(tt)){let nt=await et(L,I,a,x);e=e.replace(o,()=>nt),M=!0;break}}if(!M)if(b!==void 0)e=e.replace(o,()=>b);else if(i.debug){let L=h("Include",`None of the includeFirst paths exist: ${W}`,c,a,x,o);e=e.replace(o,()=>L)}else e=e.replace(o,"")}catch(B){let I=B instanceof Error?B.message:String(B),M=h("Include",`Error processing @includeFirst: ${I}`,c,a,x,o);e=e.replace(o,()=>M)}m.lastIndex=0}}function U(m,k,x){try{let p=m;if(!m.endsWith(".stx"))p=`${m}.stx`;let r=C.resolve(k),w=C.resolve(C.dirname(x)),l;if(!p.startsWith("./")&&!p.startsWith("../")){for(let z of i._layerPartialDirs??[]){let b=C.resolve(z,p);if(b.startsWith(`${C.resolve(z)}${C.sep}`)&&St(b))return b}l=C.resolve(k,p)}else l=C.resolve(w,p);let o=C.normalize(l),O=o.startsWith(r+C.sep)||o===r,W=o.startsWith(w+C.sep)||o===w,R=!1,V=C.dirname(w);if(o.startsWith(V+C.sep)){if(!C.relative(V,o).split(C.sep).some((B)=>B.startsWith(".")&&B!=="."&&B!==".."))R=!0}if(!O&&!W&&!R)return console.error(`Security: Path traversal attempt blocked for include path: ${m}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${r}, ${w}`),null;return o}catch(p){return console.error(`Error resolving path ${m}: ${p}`),null}}let rt=C.resolve(c);n.add(rt);function N(m,k,x,p){return i.onIncludeError?.({includePath:m,templatePath:c,message:k,partialsDir:g}),h("Include",k,c,x,p)}async function et(m,k={},x,p){let r=U(m,g,c);if(!r)return N(m,`Could not resolve path for include: ${m}`,x,p);let w=C.resolve(r);if(n.has(w)){let l=[...n,w].map((o)=>C.basename(o)).join(" -> ");return N(m,`Circular include detected: ${l}`,x,p)}try{S.add(r);let l;if(!l)try{l=await Bun.file(r).text()}catch(v){let K=v instanceof Error?v.message:String(v);return N(m,`Error loading include file ${m}: ${K}`,x,p)}if(l)l=l.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(l&&l.includes("@stream")){let{processStreamDirectives:v}=await import("./chunk-pyz2jqph.js");l=v(l,t)}if(l&&(i.debug||!E()&&!_n()))try{let{warnUnbalancedTags:v}=await import("./chunk-kgn911k7.js");v(l,r)}catch{}try{let{processESImports:v}=await import("./chunk-46sej67y.js");l=await v(l,t,r,i,S)}catch(v){if(i.debug)console.warn(`[stx] partial ES import extraction skipped for ${r}:`,v instanceof Error?v.message:v)}let o=l,O=de(o);if(O)o=O.content.trim();let R=l.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),V="";if(R)V=`<style${R[1]}>${R[2]}</style>`;let z=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(v,K,y)=>{if(!ft(K))return"";return z.push({attrs:K,body:y}),`__STX_DATA_BLOCK_${z.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let b={...t};b.__stx_signals_gate=Se(l,r);for(let[v,K]of Object.entries(k))b[v]=K;let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,B=[...l.matchAll(J)].sort((v,K)=>{let y=(v[1]||"").includes("server"),X=(K[1]||"").includes("server");return Number(X)-Number(y)}),I="",M=null,L=!1,tt=!1;for(let v of B){let K=v[1]||"",y=v[2]||"";if(ft(K))continue;let X=K.includes("server"),wt=je(K);if(!X&&!/\bsrc\s*=/i.test(K))Oe(y,r,i.strict);if(!X&&y.trim()){let{interpolateScriptExpressions:F}=await import("./chunk-c179xpsq.js");y=F(y,b,m)}let ot="";try{let{extractAndStripCssImports:F,renderVendorStyleTags:Q}=await import("./chunk-2kt1gqtq.js"),st=F(y,{filePath:r,projectRoot:process.cwd()});y=st.code,ot=Q(st.styles)}catch(F){if(i.debug)console.warn(`[stx] vendor-css extractor skipped for ${r}:`,F instanceof Error?F.message:F)}if(wt&&y.trim())y=Be(y);if(!X){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-2kt1gqtq.js");y=Q(y).code;let{hasUserImports:st,bundleClientScript:bt}=await import("./chunk-h8x56dq5.js");if(st(y))y=await bt(y,r,{projectRoot:process.cwd()})}catch(Q){if(i.debug)console.warn(`[stx] bundler skipped for ${r}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:F}=await import("./chunk-2vaap97d.js");y=F(y)}let dt=$t(y);if(!X){let{extractBridgeData:F,generateServerDataBridge:Q}=await import("./chunk-2kt1gqtq.js"),st=Q(y,F(b));if(st)y=`${st}
47
+ })();`;return c+a+i}function It(a,t){if(j(a)){let S=j(a).tag.match(/data-stx-scope="([^"]*)"/);if(S)return{html:a,mergedIntoExisting:S[1],stamped:!0,root:"body"};return{html:Ye(a,(n,g)=>`<body${g} data-stx-scope="${t}">`),mergedIntoExisting:null,stamped:!0,root:"body"}}let c=a.match(/^(\s*(?:(?:<!--[\s\S]*?-->|\x00STX_HTML_COMMENT_\d+\x00)\s*)*)(<[a-zA-Z][a-zA-Z0-9-]*)(\s[^>]*>|>)/s);if(c){let i=c[2]+c[3],S=c[2].slice(1),n=i.match(/data-stx-scope="([^"]*)"/);if(n)return{html:a,mergedIntoExisting:n[1],stamped:!0,root:S};let g=c[1],e=c[2],D=c[3];return{html:`${g}${e} data-stx-scope="${t}"${D}${a.slice(c[0].length)}`,mergedIntoExisting:null,stamped:!0,root:S}}return{html:a,mergedIntoExisting:null,stamped:!1,root:null}}var Mt=0;function ut(a,t){let c=C.basename(a,".stx").replace(/[^a-zA-Z0-9]/g,"_"),i=t.__stx_scope_seq;return i?`stx_scope_${c}_${++i.n}_${i.key}`:`stx_scope_${c}_${++Mt}`}var lt=new Set,pt=new Set;function Rh(){lt.clear(),pt.clear()}var Tt=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);function If(a){let t=(e)=>e.replace(/[^\n]/g," "),c=a.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,t).replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,t).replace(/<!--[\s\S]*?-->/g,t).replace(/\x00STX_HTML_COMMENT_\d+\x00/g,t).replace(/\{\{[\s\S]*?\}\}/g,t).replace(/\{!![\s\S]*?!!\}/g,t),i=[],S=0,n=/<(\/?)([A-Za-z][\w-]*)\b(?:[^<>"']|"[^"]*"|'[^']*')*?(\/?)>/g,g;while((g=n.exec(c))!==null){let e=g[1]==="/",D=g[2],U=g[3]==="/"||Tt.has(D.toLowerCase());if(e){S=Math.max(0,S-1);continue}if(S===0)i.push(D);if(!U)S++}return i}function ft(a){return/\btype\s*=\s*["'](?!(?:text\/javascript|application\/javascript|module)["'])[^"']*["']/i.test(a)}var Je=new T(500),ic=new Set;function Ah(){ic.clear()}function Ct(a){if(a.__onceStore instanceof Set)return a.__onceStore;return ic}async function is(a,t,c,i,S,n=new Set){let g=i.partialsDir||C.join(C.dirname(c),"partials");if(g&&!C.isAbsolute(g))g=C.resolve(process.cwd(),g);let e=yt(a,"@partial","@include"),D=Ct(t);e=e.replace(/@once([\s\S]*?)@endonce/g,(m,k,x)=>{let p=k.trim(),r=`${c}:${p}`;if(D.has(r))return"";return D.add(r),k});{let m=/@includeIf\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")")r--;w++}if(r!==0)break;let l=e.substring(p+1,w-1),o=l.match(/^\s*['"]([^'"]+)['"]/);if(!o){m.lastIndex=w;continue}let O=o[1],W=U(O,g,c),R="";if(W&&await Bun.file(W).exists())S.add(W),R=`@include(${l})`;e=e.substring(0,x)+R+e.substring(w),m.lastIndex=0}}for(let[m,k]of[["@includeWhen",!1],["@includeUnless",!0]]){let x=new RegExp(`${m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\s*\\(`,"g"),p;while((p=x.exec(e))!==null){let r=p.index,w=r+p[0].length-1,l=1,o=w+1;while(o<e.length&&l>0){if(e[o]==="(")l++;else if(e[o]===")")l--;o++}if(l!==0)break;let O=e.substring(w+1,o-1),W=ct(O,0);if(W===-1){x.lastIndex=o;continue}let R=O.substring(0,W).trim(),V=O.substring(W+1).trim(),z=V.match(/^\s*['"]([^'"]+)['"]/);if(!z){x.lastIndex=o;continue}let b=z[1],J=V.substring(z[0].length),B,I=ct(J,0);if(I!==-1)B=J.substring(I+1).trim();try{let M=`Boolean(${R})`,L;if(f(M)){let it=d(M,Object.keys(t));L=Boolean(it(...Object.values(t)))}else L=Boolean(u(M,t));let tt=k?!L:L,nt="";if(tt){let it=U(b,g,c);if(it&&await Bun.file(it).exists())S.add(it);nt=`@include('${b}'${B?`, ${B}`:""})`}e=e.substring(0,r)+nt+e.substring(o),x.lastIndex=0}catch(M){let L=M instanceof Error?M.message:String(M),tt=h("Include",`Error evaluating ${m} condition: ${L}`,c,a,r);e=e.substring(0,r)+tt+e.substring(o),x.lastIndex=0}}}{let m=/@each\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")"){if(r--,r===0)break}w++}if(r!==0)break;let l=e.substring(p+1,w),o=e.substring(x,w+1),O=l.match(/^\s*['"]([^'"]+)['"]\s*,\s*([^,]+)\s*,\s*['"]([^'"]+)['"](?:\s*,\s*['"]([^'"]+)['"])?\s*$/);if(!O){m.lastIndex=0,e=e.replace(o,"");continue}let[,W,R,V,z]=O;try{let b,J=R.trim();if(f(J))b=d(J,Object.keys(t))(...Object.values(t));else b=u(J,t);let B="";if(Array.isArray(b)&&b.length>0)for(let I of b){let M={...t,[V]:I},L=await et(W,M,a,x);B+=L}else if(z)B=await et(z,{},a,x);e=e.substring(0,x)+B+e.substring(w+1),m.lastIndex=0}catch(b){let J=b instanceof Error?b.message:String(b);e=e.substring(0,x)+h("Each",`Error in @each: ${J}`,c,a,x)+e.substring(w+1),m.lastIndex=0}}}{let m=/@includeFirst\s*\(/g,k;while((k=m.exec(e))!==null){let x=k.index,p=x+k[0].length-1,r=1,w=p+1;while(w<e.length&&r>0){if(e[w]==="(")r++;else if(e[w]===")"){if(r--,r===0)break}w++}if(r!==0)break;let l=e.substring(p+1,w),o=e.substring(x,w+1),O=l.match(/^\s*(\[[^\]]+\])/);if(!O){m.lastIndex=0,e=e.replace(o,"");continue}let W=O[1],R=l.slice(O[0].length),V,z=R.match(/^\s*,\s*\{/);if(z){R=R.slice(z[0].length-1);let B=1,I=1;while(I<R.length&&B>0){if(R[I]==="{")B++;else if(R[I]==="}"){if(B--,B===0)break}I++}V=R.substring(0,I+1),R=R.slice(I+1)}let b,J=R.match(/^\s*,\s*['"]([^'"]*)['"]\s*$/);if(J)b=J[1];try{let B=JSON.parse(W.replace(/'/g,'"')),I={};if(V)try{I=A(V,t)}catch(L){let tt=L instanceof Error?L.message:String(L);if(i.debug){let nt=h("Include",`Error parsing includeFirst variables: ${tt}`,c,a,x,o);e=e.replace(o,()=>nt)}else e=e.replace(o,()=>b||"");continue}let M=!1;for(let L of B){let tt=U(L,g,c);if(!tt)continue;if(await s(tt)){let nt=await et(L,I,a,x);e=e.replace(o,()=>nt),M=!0;break}}if(!M)if(b!==void 0)e=e.replace(o,()=>b);else if(i.debug){let L=h("Include",`None of the includeFirst paths exist: ${W}`,c,a,x,o);e=e.replace(o,()=>L)}else e=e.replace(o,"")}catch(B){let I=B instanceof Error?B.message:String(B),M=h("Include",`Error processing @includeFirst: ${I}`,c,a,x,o);e=e.replace(o,()=>M)}m.lastIndex=0}}function U(m,k,x){try{let p=m;if(!m.endsWith(".stx"))p=`${m}.stx`;let r=C.resolve(k),w=C.resolve(C.dirname(x)),l;if(!p.startsWith("./")&&!p.startsWith("../")){for(let z of i._layerPartialDirs??[]){let b=C.resolve(z,p);if(b.startsWith(`${C.resolve(z)}${C.sep}`)&&St(b))return b}l=C.resolve(k,p)}else l=C.resolve(w,p);let o=C.normalize(l),O=o.startsWith(r+C.sep)||o===r,W=o.startsWith(w+C.sep)||o===w,R=!1,V=C.dirname(w);if(o.startsWith(V+C.sep)){if(!C.relative(V,o).split(C.sep).some((B)=>B.startsWith(".")&&B!=="."&&B!==".."))R=!0}if(!O&&!W&&!R)return console.error(`Security: Path traversal attempt blocked for include path: ${m}`),console.error(` Resolved to: ${o}`),console.error(` Allowed dirs: ${r}, ${w}`),null;return o}catch(p){return console.error(`Error resolving path ${m}: ${p}`),null}}let rt=C.resolve(c);n.add(rt);function N(m,k,x,p){return i.onIncludeError?.({includePath:m,templatePath:c,message:k,partialsDir:g}),h("Include",k,c,x,p)}async function et(m,k={},x,p){let r=U(m,g,c);if(!r)return N(m,`Could not resolve path for include: ${m}`,x,p);let w=C.resolve(r);if(n.has(w)){let l=[...n,w].map((o)=>C.basename(o)).join(" -> ");return N(m,`Circular include detected: ${l}`,x,p)}try{S.add(r);let l;if(!l)try{l=await Bun.file(r).text()}catch(v){let K=v instanceof Error?v.message:String(v);return N(m,`Error loading include file ${m}: ${K}`,x,p)}if(l)l=l.replace(/\{\{--[\s\S]*?--\}\}/g,"");if(l&&l.includes("@stream")){let{processStreamDirectives:v}=await import("./chunk-pe89ztq6.js");l=v(l,t)}if(l&&(i.debug||!E()&&!_n()))try{let{warnUnbalancedTags:v}=await import("./chunk-kgn911k7.js");v(l,r)}catch{}try{let{processESImports:v}=await import("./chunk-dzp2a775.js");l=await v(l,t,r,i,S)}catch(v){if(i.debug)console.warn(`[stx] partial ES import extraction skipped for ${r}:`,v instanceof Error?v.message:v)}let o=l,O=de(o);if(O)o=O.content.trim();let R=l.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").match(/<style\b([^>]*)>([\s\S]*?)<\/style>/i),V="";if(R)V=`<style${R[1]}>${R[2]}</style>`;let z=[];o=o.replace(/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,(v,K,y)=>{if(!ft(K))return"";return z.push({attrs:K,body:y}),`__STX_DATA_BLOCK_${z.length-1}__`}),o=o.replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"");let b={...t};b.__stx_signals_gate=Se(l,r);for(let[v,K]of Object.entries(k))b[v]=K;let J=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,B=[...l.matchAll(J)].sort((v,K)=>{let y=(v[1]||"").includes("server"),X=(K[1]||"").includes("server");return Number(X)-Number(y)}),I="",M=null,L=!1,tt=!1;for(let v of B){let K=v[1]||"",y=v[2]||"";if(ft(K))continue;let X=K.includes("server"),wt=je(K);if(!X&&!/\bsrc\s*=/i.test(K))Oe(y,r,i.strict);if(!X&&y.trim()){let{interpolateScriptExpressions:F}=await import("./chunk-xsck49x5.js");y=F(y,b,m)}let ot="";try{let{extractAndStripCssImports:F,renderVendorStyleTags:Q}=await import("./chunk-nt5dh56c.js"),st=F(y,{filePath:r,projectRoot:process.cwd()});y=st.code,ot=Q(st.styles)}catch(F){if(i.debug)console.warn(`[stx] vendor-css extractor skipped for ${r}:`,F instanceof Error?F.message:F)}if(wt&&y.trim())y=Be(y);if(!X){try{let{injectBrowserCoreAutoImports:Q}=await import("./chunk-nt5dh56c.js");y=Q(y).code;let{hasUserImports:st,bundleClientScript:bt}=await import("./chunk-0633xsmx.js");if(st(y))y=await bt(y,r,{projectRoot:process.cwd()})}catch(Q){if(i.debug)console.warn(`[stx] bundler skipped for ${r}:`,Q instanceof Error?Q.message:Q)}let{stripStxRuntimeImports:F}=await import("./chunk-9bhvh2dc.js");y=F(y)}let dt=$t(y);if(!X){let{extractBridgeData:F,generateServerDataBridge:Q}=await import("./chunk-nt5dh56c.js"),st=Q(y,F(b));if(st)y=`${st}
48
48
  ${y}`}if(dt&&!X){L=!0,M=ut(r,t);let F=P(y),Q=gt(F,M);I+=`${ot}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}">${Q}</script>
49
- `;continue}if(X)try{let{extractVariables:F}=await import("./chunk-x15hrtmt.js");await F(y,b,r)}catch(F){if(i.debug)console.warn(`Warning: Could not extract variables from server script in ${r}:`,F)}if(!X&&!dt){let F=K.replace(/\bclient\b/i,"").trim();M=ut(r,t);let Q=P(y),st=gt(Q,M);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(st))tt=!0;I+=`${ot}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}"${F?` ${F}`:""}>${st}</script>
50
- `}}if(z.length>0){let{interpolateScriptExpressions:v}=await import("./chunk-c179xpsq.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(K,y)=>{let X=z[Number(y)];return`<script${X.attrs}>${v(X.body,b,m)}</script>`})}if(M){let v=It(o,M);if(o=v.html,v.mergedIntoExisting){let y=M,X=v.mergedIntoExisting;I=I.split(`'${y}'`).join(`'${X}'`).split(`"${y}"`).join(`"${X}"`),M=X}else if(!v.stamped&&L&&!lt.has(r))lt.add(r),console.warn(`[stx] ${C.relative(process.cwd(),r)} 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(v.stamped&&v.root!=="body"&&(L||tt)&&!pt.has(r)){let y=If(o);if(y.length>1)pt.add(r),console.warn(`[stx] ${C.relative(process.cwd(),r)} declares ${L?"signals":"bindings"} and has ${y.length} top-level elements (${y.map((X)=>`<${X}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let K=v.stamped&&v.root!==null&&kr(v.root);I=Rt(I,K?M:null)}if(o.includes("@include")||o.includes("@partial"))o=await is(o,b,r,i,S,n);let{processLoops:nt,reportDeferredLoopWarnings:it}=await import("./chunk-z8ywxqqg.js"),G=nt(o,b,r,void 0,!0);G=se(G,b,r),G=it(G);let{processMetaDirectives:ht,processSeoDirective:xt,processStructuredData:_t}=await import("./chunk-v8h2kns0.js");if(G=ht(G,b,r,i),G=_t(G,b,r),G=xt(G,b,r,i),G=_(G,b,r),V)G+=`
49
+ `;continue}if(X)try{let{extractVariables:F}=await import("./chunk-r57s8jqs.js");await F(y,b,r)}catch(F){if(i.debug)console.warn(`Warning: Could not extract variables from server script in ${r}:`,F)}if(!X&&!dt){let F=K.replace(/\bclient\b/i,"").trim();M=ut(r,t);let Q=P(y),st=gt(Q,M);if(/__scopeRegistration\["(?!__stx)[^"]+"\]\s*=|Object\.defineProperty\(__scopeRegistration, "(?!__stx)/.test(st))tt=!0;I+=`${ot}<script data-stx-scoped data-stx-run="always" data-stx-owner="${M}"${F?` ${F}`:""}>${st}</script>
50
+ `}}if(z.length>0){let{interpolateScriptExpressions:v}=await import("./chunk-xsck49x5.js");o=o.replace(/__STX_DATA_BLOCK_(\d+)__/g,(K,y)=>{let X=z[Number(y)];return`<script${X.attrs}>${v(X.body,b,m)}</script>`})}if(M){let v=It(o,M);if(o=v.html,v.mergedIntoExisting){let y=M,X=v.mergedIntoExisting;I=I.split(`'${y}'`).join(`'${X}'`).split(`"${y}"`).join(`"${X}"`),M=X}else if(!v.stamped&&L&&!lt.has(r))lt.add(r),console.warn(`[stx] ${C.relative(process.cwd(),r)} 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(v.stamped&&v.root!=="body"&&(L||tt)&&!pt.has(r)){let y=If(o);if(y.length>1)pt.add(r),console.warn(`[stx] ${C.relative(process.cwd(),r)} declares ${L?"signals":"bindings"} and has ${y.length} top-level elements (${y.map((X)=>`<${X}>`).join(", ")}). Only the first is scoped, so bindings in the others cannot see what this partial's script declares. Wrap the partial's markup in a single root element.`)}let K=v.stamped&&v.root!==null&&kr(v.root);I=Rt(I,K?M:null)}if(o.includes("@include")||o.includes("@partial"))o=await is(o,b,r,i,S,n);let{processLoops:nt,reportDeferredLoopWarnings:it}=await import("./chunk-fzj3e3zk.js"),G=nt(o,b,r,void 0,!0);G=se(G,b,r),G=it(G);let{processMetaDirectives:ht,processSeoDirective:xt,processStructuredData:_t}=await import("./chunk-v8h2kns0.js");if(G=ht(G,b,r,i),G=_t(G,b,r),G=xt(G,b,r,i),G=_(G,b,r),V)G+=`
51
51
  `+V;if(I)G+=`
52
52
  `+I;return G}catch(l){if(l instanceof q)throw l;let o=l instanceof Error?l.message:String(l);return N(m,`Error processing include ${m}: ${o}`,x,p)}}let Y=/@include\s*\(/g,Z;while((Z=Y.exec(e))!==null){let m=Z.index,k=m+Z[0].length-1,x=1,p=k+1;while(p<e.length&&x>0){if(e[p]==="(")x++;else if(e[p]===")")x--;p++}if(x!==0)break;let r=e.substring(m,p),w=e.substring(k+1,p-1),l=w.match(/^\s*['"]([^'"]+)['"]/);if(!l){Y.lastIndex=p;continue}let o=l[1],O,W=w.substring(l[0].length),R=ct(W,0);if(R!==-1)O=W.substring(R+1).trim();let V={};if(O)try{V=A(O,t)}catch(b){let J=b instanceof Error?b.message:String(b);e=e.replace(r,h("Include",`Error parsing include variables for ${o}: ${J}`,c,a,m)),Y.lastIndex=0;continue}let z=await et(o,V,a,m);e=e.substring(0,m)+z+e.substring(p),Y.lastIndex=0}return e}function as(a,t){let c=a;function i(S,n,g,e){let D=S,U=!0;while(U){U=!1;let rt=new RegExp(`@${n}\\(['"]([^'"]+)['"]\\)`),N=D.match(rt);if(!N||N.index===void 0)break;let et=N.index,Y=N[1],Z=et+N[0].length,m=new RegExp(`@${n}\\(`),k=new RegExp(`@${g}(?![a-z])`),x=1,p=Z,r=-1;while(x>0&&p<D.length){let l=D.slice(p),o=l.match(m),O=l.match(k),W=o?p+o.index:1/0,R=O?p+O.index:1/0;if(W<R)x++,p=W+(o[0].length||1);else if(R<1/0){if(x--,x===0){r=R;break}p=R+g.length+1}else break}if(r===-1)break;let w=D.slice(Z,r);if(!t[Y])t[Y]=[];if(e)t[Y].unshift(w);else t[Y].push(w);D=D.substring(0,et)+D.substring(r+`@${g}`.length),U=!0}return D}return c=i(c,"push","endpush",!1),c=i(c,"prepend","endprepend",!0),c}function cs(a,t){return a.replace(/@stack\(['"]([^'"]+)['"]\)/g,(c,i)=>{if(!t[i]||t[i].length===0)return"";return t[i].join(`
53
53
  `)})}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Si,Ks,u,f,A,st,d,Xs,t,l,x}from"./chunk-72jt897s.js";import{ve,At,J,O,Mt,Z,_}from"./chunk-ymypc1rp.js";import{ir}from"./chunk-x34me5ar.js";import{se}from"./chunk-f6nk205v.js";import{bs}from"./chunk-fmawgk87.js";var de=1000,pe=!1;function he(n,r){let c=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,i;while((i=c.exec(n))!==null){let g=i.index+i[0].length,y=i.index+i[0].indexOf("("),b=x(n,"(",")",y);if(b===-1)continue;let p=n.slice(g,b).trim();if(!p)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(p)))continue;let m;try{let a=A(p,r);if(!a||typeof a!=="object")continue;m=JSON.stringify(a)}catch{continue}e+=n.slice(o,g)+m,o=b,c.lastIndex=b}return o===0?n:e+n.slice(o)}function me(n,r){let c=/@component\s*\(/g,e=n,o,i=[];while((o=c.exec(e))!==null){let g=o.index,y=g+o[0].length-1,b=1,p=y+1;while(p<e.length&&b>0){if(e[p]==="(")b++;else if(e[p]===")"){if(b--,b===0)break}p++}if(b!==0)continue;let s=e.substring(y+1,p),m=p+1,a=s.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let E=a[1],h=s.slice(a[0].length),k=h.match(/^\s*,\s*/);if(!k)continue;let S=h.slice(k[0].length).trim();if(!S)continue;try{let v=A(S,r),W=JSON.stringify(v),F=`@component('${E}', ${W})`;i.push({start:g,end:m,replacement:F})}catch{continue}}for(let g=i.length-1;g>=0;g--){let{start:y,end:b,replacement:p}=i[g];e=e.substring(0,y)+p+e.substring(b)}return e}function oe(n,r,c){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),i;while((i=o.exec(e))!==null){let g=i.index,y=g+i[0].length-1,b=1,p=y+1,s=null,m=!1;while(p<e.length&&b>0){let h=e[p];if(m){m=!1,p++;continue}if(h==="\\"&&s){m=!0,p++;continue}if(s){if(h===s)s=null;p++;continue}if(h==='"'||h==="'"||h==="`"){s=h,p++;continue}if(h==="(")b++;else if(h===")"){if(b--,b===0)break}p++}if(b!==0)break;let a=e.substring(y+1,p),E=c(a);e=e.substring(0,g)+E+e.substring(p+1)}return e}function be(n,r){let c=n;return c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,i)=>{try{if(O(i,r.__stx_client_signal_names||[]))return e;let g=Object.keys(r),y=Object.values(r);Si(i);let b=!1,s=d(i,g,()=>{b=!0})(...y);if(b)return e;let m=JSON.stringify(s);if(m===void 0){if(!st(i).some((h)=>!(h in r)))return"";return e}let a=Buffer.from(m,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(g){return e}}),c}var ee="<!--__STX_BREAK__-->",ne="<!--__STX_CONTINUE__-->";function le(n,r){let c=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let i=c.exec(n);i;i=c.exec(n)){if(!i[1]){let p=i[0].length===3&&i[0]==="{{{"?3:2,s=i[0]==="{!!"?n.indexOf("!!}",c.lastIndex):ve(n,i.index,p);if(s<0)break;c.lastIndex=s+(i[0]==="{!!"?3:p);continue}let g=c.lastIndex,y=!0,b=/^\s*\(/.exec(n.slice(g));if(b){let p=g+b[0].length-1,s=x(n,"(",")",p);if(s<0)break;g=s+1;try{let m=`!!(${n.slice(p+1,s).trim()})`;y=f(m)?Boolean(d(m,Object.keys(r))(...Object.values(r))):Boolean(u(m,r))}catch{y=!1}}if(e+=n.slice(o,i.index),y)return e+(i[1]==="break"?ee:ne);o=g,c.lastIndex=g}return e+n.slice(o)}function ae(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),c="",e=0;return Mt(n,(o,i,g)=>(c+=ie(r(n.slice(e,g))),c+=`\${__stxRenderLoopValue(${g}, (${i}), ${o.length})}`,e=g+o.length,o)),c+ie(r(n.slice(e)))}function ue(n,r,c,e){return Z(n,r,c==null?"":String(c),!1,e)}function ie(n){let r=n;return r=oe(r,"@break",(c)=>{let e=c.trim();if(!Xs(e))return"";return`\`; if (${e}) { break; } result += \``}),r=oe(r,"@continue",(c)=>{let e=c.trim();if(!Xs(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function xe(n){let r=/@forelse\s*\(/g,c,e=[],o=/@foreach\s*\(/g,i=/@endforeach/g,g;while((g=o.exec(n))!==null)e.push({pos:g.index,delta:1});while((g=i.exec(n))!==null)e.push({pos:g.index,delta:-1});e.sort((s,m)=>s.pos-m.pos);let y=[],b=0;for(let s of e)b+=s.delta,y.push({pos:s.pos,depth:b});function p(s){let m=0,a=y.length-1,E=0;while(m<=a){let h=m+a>>1;if(y[h].pos<=s)E=y[h].depth,m=h+1;else a=h-1}return E}while((c=r.exec(n))!==null){if(p(c.index)>0)continue;let s=c.index,m=c.index+c[0].length-1,a=1,E=m+1,h=-1;while(E<n.length&&a>0){if(n[E]==="(")a++;else if(n[E]===")"){if(a--,a===0){h=E;break}}E++}if(h===-1)continue;let k=n.substring(m+1,h),S=At(k);if(!S)continue;let{arrayExpr:v,itemVar:W}=S,F=h+1,w=1,B=F,D=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(w>0&&B<n.length){D.lastIndex=B,L.lastIndex=B;let P=D.exec(n),R=L.exec(n);if(!R)break;if(P&&P.index<R.index)w++,B=P.index+P[0].length;else{if(w--,w===0){V=R.index;break}B=R.index+11}}if(V===-1)continue;let I=n.substring(F,V),K=V+11,U=-1,z=0,N=0;while(N<I.length){let P=I.indexOf("@",N);if(P===-1)break;let R=I.substring(P);if(/^@forelse\s*\(/.test(R))z++,N=P+1;else if(R.startsWith("@endforelse"))z--,N=P+11;else if(z===0&&R.startsWith("@empty")){if(I.length<=P+6||!/[a-z]/i.test(I[P+6])){U=P;break}N=P+1}else N=P+1}if(U===-1)continue;return{start:s,end:K,arrayExpr:v,itemVar:W,foreachContent:I.substring(0,U),emptyContent:I.substring(U+6)}}return null}function ce(n,r){let c=n;while(!0){let e=xe(c);if(!e)break;let{start:o,end:i,arrayExpr:g,itemVar:y,foreachContent:b,emptyContent:p}=e;try{let s;if(f(g))s=d(g,Object.keys(r))(...Object.values(r));else s=u(g,r);let m;if(!Array.isArray(s)||s.length===0)m=p;else m=`@foreach (${g} as ${y})${b}@endforeach`;c=c.substring(0,o)+m+c.substring(i)}catch(s){let m=s instanceof Error?s.message:String(s),a=l("Forelse",`Error in @forelse(${g} as ${y}): ${m}`,t.EVALUATION_ERROR);c=c.substring(0,o)+a+c.substring(i)}}return c}var fe="<!--stx:foreach-not-iterable:",ye=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function Ee(n,r){return`${fe}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function _e(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function ds(n){if(!n.includes(fe))return n;return n.replace(ye,(r,c,e)=>(_e(decodeURIComponent(c),decodeURIComponent(e)),""))}function or(n,r,c,e,o=!1){let i=n,g=new Set(r.__stx_client_signal_names||[]);for(let s of ir(n))g.add(s);if(g.size)r={...r,__stx_client_signal_names:[...g]};i=ce(i,r);function y(s){let m=/@foreach\s*\(/g,a;while((a=m.exec(s))!==null){let E=a.index,h=a.index+a[0].length-1,k=1,S=h+1,v=-1;while(S<s.length&&k>0){if(s[S]==="(")k++;else if(s[S]===")"){if(k--,k===0){v=S;break}}S++}if(v===-1)continue;let W=s.substring(h+1,v),F=At(W);if(!F)continue;let w=E,{arrayExpr:B,itemVar:D}=F,L=v+1,V=1,I=L,K=/@foreach\s*\(/g,U=/@endforeach/g;while(V>0&&I<s.length){K.lastIndex=I,U.lastIndex=I;let z=K.exec(s),N=U.exec(s);if(!N)break;if(z&&z.index<N.index)V++,I=z.index+z[0].length;else{if(V--,V===0){let P=s.substring(L,N.index),R=N.index+11;return{start:w,end:R,arrayExpr:B,itemVar:D,content:P}}I=N.index+11}}}return null}function b(s,m){let a=s;while(!0){let E=y(a);if(!E)break;let{start:h,end:k,arrayExpr:S,itemVar:v,content:W}=E;try{let F=S.trim(),w;if(f(F))w=d(F,Object.keys(m))(...Object.values(m));else w=u(F,m);let B=!1;if(!Array.isArray(w))if(w instanceof Map)w=Array.from(w),B=!0;else if(w instanceof Set)w=Array.from(w);else if(typeof w==="string")w=Array.from(w);else if(w&&typeof w==="object"&&!(w instanceof Date)&&!(w instanceof RegExp))w=Object.entries(w),B=!0;else{let R=Ee(F,c)+l("Foreach",`Error in @foreach: ${F} is not iterable`,t.TYPE_ERROR);a=a.substring(0,h)+R+a.substring(k);continue}let D=e?.loops?.useAltLoopVariable??pe,L=v.trim(),V=null,I,K=!1;if(L.includes("=>")){let R=L.split("=>").map((j)=>j.trim());if(R.length===2&&R[0]&&R[1])V=R[0],I=R[1];else I=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let R=L.split(",").map((j)=>j.trim());if(R.length===2&&R[0]&&R[1])I=R[0],V=R[1],K=!0;else I=L}else I=L;let U="",z=new Set(J(`${S} as ${v}`)),N=w,P=m[Ks]??new WeakMap;for(let R=0;R<N.length;R++){let j=N[R],te={index:R,iteration:R+1,first:R===0,last:R===N.length-1,count:N.length},M={...m,loop:te,$loop:te,[Ks]:P};if(Array.isArray(m.__stx_client_signal_names))M.__stx_client_signal_names=m.__stx_client_signal_names.filter((H)=>!z.has(H));if(I.startsWith("[")&&I.endsWith("]")){let H=I.slice(1,-1).split(",").map((T)=>T.trim());if(Array.isArray(j))H.forEach((T,X)=>{if(T)M[T]=j[X]});else M[I]=j}else if(I.startsWith("{")&&I.endsWith("}")){let H=I.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean);if(j!==null&&typeof j==="object")H.forEach((T)=>{let X=T.indexOf(":"),Q=(X===-1?T:T.slice(0,X)).trim(),re=X===-1?Q:T.slice(X+1).trim();if(Q&&re)M[re]=j[Q]});else M[I]=j}else M[I]=j;if(V)if(!K&&B&&Array.isArray(j)&&j.length===2)M[V]=j[0],M[I]=j[1];else M[V]=R;let C=ce(W,M);C=or(C,M,c,e,!0),C=se(C,M,c),C=le(C,M);let q=C.indexOf(ee),G=C.indexOf(ne),Y=q<0?G:G<0?q:Math.min(q,G);if(Y>=0)C=C.slice(0,Y);if(C=_(C,M,c),C=be(C,M),C=me(C,M),C=he(C,M),U+=C,Y>=0&&Y===q)break}a=a.substring(0,h)+U+a.substring(k)}catch(F){let w=l("Foreach",`Error in @foreach(${S.trim()} as ${v.trim()}): ${F instanceof Error?F.message:String(F)}`,t.EVALUATION_ERROR);a=a.substring(0,h)+w+a.substring(k)}}return a}i=b(i,r),i=$e(i,r,c,e);let p=e?.loops?.maxWhileIterations??de;return i=we(i,r,p),o?i:ds(i)}function Nf(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function ge(n){return Xs(n)}function $e(n,r,c,e){let o=n,i=!0;while(i){i=!1;let g=o.match(/@for\s*\(/);if(!g||g.index===void 0)break;let y=g.index,b=y+g[0].length-1,p=x(o,"(",")",b);if(p===-1)break;let s=Nf(o.slice(b+1,p)),m=p+1,a=bs(o.slice(y),"for","endfor");if(a.length===0)break;let E=a[0].content,h=y+a[0].end;if(!ge(s)){let k=l("For",`Unsafe expression in @for: ${s}`,t.UNSAFE_EXPRESSION);o=o.substring(0,y)+k+o.substring(h),i=!0;continue}try{let k=Ae(s),S=/@(?:for|foreach|if|unless)\s*\(/.test(E);if(k.length>0&&S){let D=Re({forExpr:s,content:E,iterVarNames:k,context:r,filePath:c,options:e});o=o.substring(0,y)+D+o.substring(h),i=!0;continue}let v=Object.keys(r),W=Object.values(r),F=ae(E),B=Function(...v,"__stxRenderLoopValue",`
2
+ import{Si,Ks,u,f,A,st,d,Xs,t,l,x}from"./chunk-72jt897s.js";import{ve,At,J,O,Mt,Z,_}from"./chunk-vhzngsmd.js";import{ir}from"./chunk-e4d0jgcw.js";import{se}from"./chunk-f6nk205v.js";import{bs}from"./chunk-fmawgk87.js";var de=1000,pe=!1;function he(n,r){let c=/@(include|partial)\s*\(\s*(['"])([^'"]+)\2\s*,\s*/g,e="",o=0,i;while((i=c.exec(n))!==null){let g=i.index+i[0].length,y=i.index+i[0].indexOf("("),b=x(n,"(",")",y);if(b===-1)continue;let p=n.slice(g,b).trim();if(!p)continue;if(!Object.keys(r).some((a)=>new RegExp(`(?:^|[^\\w$.])${a.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(?![\\w$])`).test(p)))continue;let m;try{let a=A(p,r);if(!a||typeof a!=="object")continue;m=JSON.stringify(a)}catch{continue}e+=n.slice(o,g)+m,o=b,c.lastIndex=b}return o===0?n:e+n.slice(o)}function me(n,r){let c=/@component\s*\(/g,e=n,o,i=[];while((o=c.exec(e))!==null){let g=o.index,y=g+o[0].length-1,b=1,p=y+1;while(p<e.length&&b>0){if(e[p]==="(")b++;else if(e[p]===")"){if(b--,b===0)break}p++}if(b!==0)continue;let s=e.substring(y+1,p),m=p+1,a=s.match(/^\s*['"]([^'"]+)['"]/);if(!a)continue;let E=a[1],h=s.slice(a[0].length),k=h.match(/^\s*,\s*/);if(!k)continue;let S=h.slice(k[0].length).trim();if(!S)continue;try{let v=A(S,r),W=JSON.stringify(v),F=`@component('${E}', ${W})`;i.push({start:g,end:m,replacement:F})}catch{continue}}for(let g=i.length-1;g>=0;g--){let{start:y,end:b,replacement:p}=i[g];e=e.substring(0,y)+p+e.substring(b)}return e}function oe(n,r,c){let e=n,o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\(`),i;while((i=o.exec(e))!==null){let g=i.index,y=g+i[0].length-1,b=1,p=y+1,s=null,m=!1;while(p<e.length&&b>0){let h=e[p];if(m){m=!1,p++;continue}if(h==="\\"&&s){m=!0,p++;continue}if(s){if(h===s)s=null;p++;continue}if(h==='"'||h==="'"||h==="`"){s=h,p++;continue}if(h==="(")b++;else if(h===")"){if(b--,b===0)break}p++}if(b!==0)break;let a=e.substring(y+1,p),E=c(a);e=e.substring(0,g)+E+e.substring(p+1)}return e}function be(n,r){let c=n;return c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)(?=\s+[^=]|\s*\/?>|\s*$)/g,(e,o)=>{if(o in r)return`:${o}="${o}"`;return e}),c=c.replace(/:([a-zA-Z_][a-zA-Z0-9_-]*)\s*=\s*"([^"]*)"/g,(e,o,i)=>{try{if(O(i,r.__stx_client_signal_names||[]))return e;let g=Object.keys(r),y=Object.values(r);Si(i);let b=!1,s=d(i,g,()=>{b=!0})(...y);if(b)return e;let m=JSON.stringify(s);if(m===void 0){if(!st(i).some((h)=>!(h in r)))return"";return e}let a=Buffer.from(m,"utf8").toString("base64");return`__stx_${o}="${a}"`}catch(g){return e}}),c}var ee="<!--__STX_BREAK__-->",ne="<!--__STX_CONTINUE__-->";function le(n,r){let c=/\{\{\{?|\{!!|@(break|continue)(?![\w$])/g,e="",o=0;for(let i=c.exec(n);i;i=c.exec(n)){if(!i[1]){let p=i[0].length===3&&i[0]==="{{{"?3:2,s=i[0]==="{!!"?n.indexOf("!!}",c.lastIndex):ve(n,i.index,p);if(s<0)break;c.lastIndex=s+(i[0]==="{!!"?3:p);continue}let g=c.lastIndex,y=!0,b=/^\s*\(/.exec(n.slice(g));if(b){let p=g+b[0].length-1,s=x(n,"(",")",p);if(s<0)break;g=s+1;try{let m=`!!(${n.slice(p+1,s).trim()})`;y=f(m)?Boolean(d(m,Object.keys(r))(...Object.values(r))):Boolean(u(m,r))}catch{y=!1}}if(e+=n.slice(o,i.index),y)return e+(i[1]==="break"?ee:ne);o=g,c.lastIndex=g}return e+n.slice(o)}function ae(n){let r=(o)=>o.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$\{/g,"\\${"),c="",e=0;return Mt(n,(o,i,g)=>(c+=ie(r(n.slice(e,g))),c+=`\${__stxRenderLoopValue(${g}, (${i}), ${o.length})}`,e=g+o.length,o)),c+ie(r(n.slice(e)))}function ue(n,r,c,e){return Z(n,r,c==null?"":String(c),!1,e)}function ie(n){let r=n;return r=oe(r,"@break",(c)=>{let e=c.trim();if(!Xs(e))return"";return`\`; if (${e}) { break; } result += \``}),r=oe(r,"@continue",(c)=>{let e=c.trim();if(!Xs(e))return"";return`\`; if (${e}) { continue; } result += \``}),r=r.replace(/@break(?!\()/g,"`; break; result += `"),r=r.replace(/@continue(?!\()/g,"`; continue; result += `"),r}function xe(n){let r=/@forelse\s*\(/g,c,e=[],o=/@foreach\s*\(/g,i=/@endforeach/g,g;while((g=o.exec(n))!==null)e.push({pos:g.index,delta:1});while((g=i.exec(n))!==null)e.push({pos:g.index,delta:-1});e.sort((s,m)=>s.pos-m.pos);let y=[],b=0;for(let s of e)b+=s.delta,y.push({pos:s.pos,depth:b});function p(s){let m=0,a=y.length-1,E=0;while(m<=a){let h=m+a>>1;if(y[h].pos<=s)E=y[h].depth,m=h+1;else a=h-1}return E}while((c=r.exec(n))!==null){if(p(c.index)>0)continue;let s=c.index,m=c.index+c[0].length-1,a=1,E=m+1,h=-1;while(E<n.length&&a>0){if(n[E]==="(")a++;else if(n[E]===")"){if(a--,a===0){h=E;break}}E++}if(h===-1)continue;let k=n.substring(m+1,h),S=At(k);if(!S)continue;let{arrayExpr:v,itemVar:W}=S,F=h+1,w=1,B=F,D=/@forelse\s*\(/g,L=/@endforelse/g,V=-1;while(w>0&&B<n.length){D.lastIndex=B,L.lastIndex=B;let P=D.exec(n),R=L.exec(n);if(!R)break;if(P&&P.index<R.index)w++,B=P.index+P[0].length;else{if(w--,w===0){V=R.index;break}B=R.index+11}}if(V===-1)continue;let I=n.substring(F,V),K=V+11,U=-1,z=0,N=0;while(N<I.length){let P=I.indexOf("@",N);if(P===-1)break;let R=I.substring(P);if(/^@forelse\s*\(/.test(R))z++,N=P+1;else if(R.startsWith("@endforelse"))z--,N=P+11;else if(z===0&&R.startsWith("@empty")){if(I.length<=P+6||!/[a-z]/i.test(I[P+6])){U=P;break}N=P+1}else N=P+1}if(U===-1)continue;return{start:s,end:K,arrayExpr:v,itemVar:W,foreachContent:I.substring(0,U),emptyContent:I.substring(U+6)}}return null}function ce(n,r){let c=n;while(!0){let e=xe(c);if(!e)break;let{start:o,end:i,arrayExpr:g,itemVar:y,foreachContent:b,emptyContent:p}=e;try{let s;if(f(g))s=d(g,Object.keys(r))(...Object.values(r));else s=u(g,r);let m;if(!Array.isArray(s)||s.length===0)m=p;else m=`@foreach (${g} as ${y})${b}@endforeach`;c=c.substring(0,o)+m+c.substring(i)}catch(s){let m=s instanceof Error?s.message:String(s),a=l("Forelse",`Error in @forelse(${g} as ${y}): ${m}`,t.EVALUATION_ERROR);c=c.substring(0,o)+a+c.substring(i)}}return c}var fe="<!--stx:foreach-not-iterable:",ye=/<!--stx:foreach-not-iterable:([^|>]*)\|([^>]*?)-->/g;function Ee(n,r){return`${fe}${encodeURIComponent(n)}|${encodeURIComponent(r)}-->`}function _e(n,r){console.warn(`[stx] @foreach(${n}) in ${r}: ${n} is not iterable server-side, so the loop rendered nothing. `+"Values a server loop reads must come from <script server> or the page context \u2014 "+"a plain <script> runs in the browser.")}function ds(n){if(!n.includes(fe))return n;return n.replace(ye,(r,c,e)=>(_e(decodeURIComponent(c),decodeURIComponent(e)),""))}function or(n,r,c,e,o=!1){let i=n,g=new Set(r.__stx_client_signal_names||[]);for(let s of ir(n))g.add(s);if(g.size)r={...r,__stx_client_signal_names:[...g]};i=ce(i,r);function y(s){let m=/@foreach\s*\(/g,a;while((a=m.exec(s))!==null){let E=a.index,h=a.index+a[0].length-1,k=1,S=h+1,v=-1;while(S<s.length&&k>0){if(s[S]==="(")k++;else if(s[S]===")"){if(k--,k===0){v=S;break}}S++}if(v===-1)continue;let W=s.substring(h+1,v),F=At(W);if(!F)continue;let w=E,{arrayExpr:B,itemVar:D}=F,L=v+1,V=1,I=L,K=/@foreach\s*\(/g,U=/@endforeach/g;while(V>0&&I<s.length){K.lastIndex=I,U.lastIndex=I;let z=K.exec(s),N=U.exec(s);if(!N)break;if(z&&z.index<N.index)V++,I=z.index+z[0].length;else{if(V--,V===0){let P=s.substring(L,N.index),R=N.index+11;return{start:w,end:R,arrayExpr:B,itemVar:D,content:P}}I=N.index+11}}}return null}function b(s,m){let a=s;while(!0){let E=y(a);if(!E)break;let{start:h,end:k,arrayExpr:S,itemVar:v,content:W}=E;try{let F=S.trim(),w;if(f(F))w=d(F,Object.keys(m))(...Object.values(m));else w=u(F,m);let B=!1;if(!Array.isArray(w))if(w instanceof Map)w=Array.from(w),B=!0;else if(w instanceof Set)w=Array.from(w);else if(typeof w==="string")w=Array.from(w);else if(w&&typeof w==="object"&&!(w instanceof Date)&&!(w instanceof RegExp))w=Object.entries(w),B=!0;else{let R=Ee(F,c)+l("Foreach",`Error in @foreach: ${F} is not iterable`,t.TYPE_ERROR);a=a.substring(0,h)+R+a.substring(k);continue}let D=e?.loops?.useAltLoopVariable??pe,L=v.trim(),V=null,I,K=!1;if(L.includes("=>")){let R=L.split("=>").map((j)=>j.trim());if(R.length===2&&R[0]&&R[1])V=R[0],I=R[1];else I=L}else if(!L.startsWith("[")&&!L.startsWith("{")&&L.includes(",")){let R=L.split(",").map((j)=>j.trim());if(R.length===2&&R[0]&&R[1])I=R[0],V=R[1],K=!0;else I=L}else I=L;let U="",z=new Set(J(`${S} as ${v}`)),N=w,P=m[Ks]??new WeakMap;for(let R=0;R<N.length;R++){let j=N[R],te={index:R,iteration:R+1,first:R===0,last:R===N.length-1,count:N.length},M={...m,loop:te,$loop:te,[Ks]:P};if(Array.isArray(m.__stx_client_signal_names))M.__stx_client_signal_names=m.__stx_client_signal_names.filter((H)=>!z.has(H));if(I.startsWith("[")&&I.endsWith("]")){let H=I.slice(1,-1).split(",").map((T)=>T.trim());if(Array.isArray(j))H.forEach((T,X)=>{if(T)M[T]=j[X]});else M[I]=j}else if(I.startsWith("{")&&I.endsWith("}")){let H=I.slice(1,-1).split(",").map((T)=>T.trim()).filter(Boolean);if(j!==null&&typeof j==="object")H.forEach((T)=>{let X=T.indexOf(":"),Q=(X===-1?T:T.slice(0,X)).trim(),re=X===-1?Q:T.slice(X+1).trim();if(Q&&re)M[re]=j[Q]});else M[I]=j}else M[I]=j;if(V)if(!K&&B&&Array.isArray(j)&&j.length===2)M[V]=j[0],M[I]=j[1];else M[V]=R;let C=ce(W,M);C=or(C,M,c,e,!0),C=se(C,M,c),C=le(C,M);let q=C.indexOf(ee),G=C.indexOf(ne),Y=q<0?G:G<0?q:Math.min(q,G);if(Y>=0)C=C.slice(0,Y);if(C=_(C,M,c),C=be(C,M),C=me(C,M),C=he(C,M),U+=C,Y>=0&&Y===q)break}a=a.substring(0,h)+U+a.substring(k)}catch(F){let w=l("Foreach",`Error in @foreach(${S.trim()} as ${v.trim()}): ${F instanceof Error?F.message:String(F)}`,t.EVALUATION_ERROR);a=a.substring(0,h)+w+a.substring(k)}}return a}i=b(i,r),i=$e(i,r,c,e);let p=e?.loops?.maxWhileIterations??de;return i=we(i,r,p),o?i:ds(i)}function Nf(n){let r=/^(\s*)([A-Za-z_$][\w$]*|\[[^\]]*\]|\{[^}]*\})(\s+(?:of|in)\s)/.exec(n);if(!r||/^(?:const|let|var)$/.test(r[2]))return n;return`${r[1]}let ${n.slice(r[1].length)}`}function ge(n){return Xs(n)}function $e(n,r,c,e){let o=n,i=!0;while(i){i=!1;let g=o.match(/@for\s*\(/);if(!g||g.index===void 0)break;let y=g.index,b=y+g[0].length-1,p=x(o,"(",")",b);if(p===-1)break;let s=Nf(o.slice(b+1,p)),m=p+1,a=bs(o.slice(y),"for","endfor");if(a.length===0)break;let E=a[0].content,h=y+a[0].end;if(!ge(s)){let k=l("For",`Unsafe expression in @for: ${s}`,t.UNSAFE_EXPRESSION);o=o.substring(0,y)+k+o.substring(h),i=!0;continue}try{let k=Ae(s),S=/@(?:for|foreach|if|unless)\s*\(/.test(E);if(k.length>0&&S){let D=Re({forExpr:s,content:E,iterVarNames:k,context:r,filePath:c,options:e});o=o.substring(0,y)+D+o.substring(h),i=!0;continue}let v=Object.keys(r),W=Object.values(r),F=ae(E),B=Function(...v,"__stxRenderLoopValue",`
3
3
  let result = '';
4
4
  for (${s}) {
5
5
  result += \`${F}\`;
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{sh,bo,oh,ih,ah,ch}from"./chunk-m7kct2sg.js";import"./chunk-sjd6rt97.js";import"./chunk-x46hqa74.js";import"./chunk-7sh9fa3q.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{ch as clearStoreCache,sh as getStoreScript,ah as getStoreScriptFor,ih as pageStoresAll,bo as storesRead,oh as storesReadInFiles};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ya,iu,Fn,Im,au,cu,lu,Om}from"./chunk-hntm02x0.js";import"./chunk-ymypc1rp.js";import"./chunk-sf4rntqj.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Fn as Validator,iu as defineForm,au as processErrorDirective,cu as processErrorsDirective,Om as processFormValidationDirectives,lu as processHasErrorsDirective,ya as useForm,Im as v};
2
+ import{ya,iu,Fn,Im,au,cu,lu,Om}from"./chunk-v041eh5f.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Fn as Validator,iu as defineForm,au as processErrorDirective,cu as processErrorsDirective,Om as processFormValidationDirectives,lu as processHasErrorsDirective,ya as useForm,Im as v};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ie,b,S,C,Y}from"./chunk-ymypc1rp.js";import{k}from"./chunk-1tzqqr0p.js";import{P,En}from"./chunk-r9e0r6jx.js";import{a}from"./chunk-j65nf7mt.js";import{he,nn,rn,sn}from"./chunk-vtt2dec3.js";import{wt}from"./chunk-x34me5ar.js";import{mt,zn,Gt,ce}from"./chunk-tsvnhc0c.js";import{E,Cn}from"./chunk-c5vzr1va.js";import h from"path";var v=new Map,A=new Map,I=b(64),F=new Map,V=["composables","functions"];function H(e){let s=h.basename(e,".ts");return s==="index"||s==="types"||e.endsWith(".d.ts")}async function ee(e){if(e)return h.resolve(e);let s=`<default>:${process.cwd()}`,r=F.get(s);if(r!==void 0)return r;let t=await te();if(t!==null)F.set(s,t);return t}async function te(){let e=await a(),s=e.root||process.cwd(),r=e.composablesDir;if(r)return h.resolve(s,r);for(let t of V){let n=h.resolve(s,t);try{let c=new Bun.Glob("**/*.ts");for await(let i of c.scan({cwd:n,absolute:!0}))if(!H(i))return n}catch{}}return null}async function W(e){let s=Array.isArray(e)?e:e?[h.resolve(e)]:(await a())._layerComposableDirs??[await ee()].filter((t)=>!!t),r=new Map;for(let t of s){let n=new Bun.Glob("**/*.ts");try{for await(let c of n.scan({cwd:t,absolute:!0})){let i=h.relative(t,c);if(!H(c)&&!r.has(i))r.set(i,c)}}catch{}}return{key:s.join("\x00"),files:[...r.values()].sort()}}async function wo(e){let{files:s}=await W(e),r=Y({loader:"ts",target:"browser",define:C()}),t=[];for(let n of s)try{let c=await Bun.file(n).text(),i=r.scan(c).exports.filter((u)=>u!=="default");if(i.length>0)t.push({file:n,names:i})}catch{}return t}function ne(e,s){return new RegExp(`\\b${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(e)}function R(e,s){let r=new Set(e.match(/\w+/g)),t=new Set;for(let n of s)if(/^\w+$/.test(n)?r.has(n):ne(e,n))t.add(n);return t}var J=b(64);function X(e,s){let r=S(e,s.size),t=J.get(r);if(t)return t;let n;try{n=Ie(e,s)}catch{n=R(e,s)}let c=[...e.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...e.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let i of c)for(let u of i[1].split(",")){let f=u.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(f&&s.has(f))n.add(f)}return J.set(r,n),n}function se(e){return!e||/^(?:module|(?:text|application)\/(?:java|ecma)script|application\/stx-[\w-]+)$/i.test(e)}var L=b(256);function oe(e,s){let r=new Set(s),t="",n=0,c=new Set;for(let i of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi)){t+=e.slice(n,i.index),n=i.index+i[0].length;let u=i[1]??"",f=i[2]??"",d=/\btype\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(u),m=d?(d[1]??d[2]??d[3]??"").trim():void 0;if(!se(m)){if(!/json/i.test(m??""))t+=` ${f} `;continue}let y=R(f,r);if(y.size===0)continue;let _=S(f,[...y].sort().join(",")),w=L.get(_);if(!w)w=X(f,y),L.set(_,w);for(let B of w)c.add(B)}t+=e.slice(n);for(let i of R(t,r))c.add(i);return c}function ie(e,s,r){let t=new Map;for(let{file:f,names:d}of e)for(let m of d)if(!t.has(m))t.set(m,f);let n=new Set(t.keys()),c=(f)=>{let d=[];for(let m of X(f,n))d.push(t.get(m));return d},i=new Set,u=r.flatMap((f,d)=>d===0?[...oe(f,t.keys())].map((m)=>t.get(m)):c(f));while(u.length>0){let f=[];for(let d of u){if(i.has(d))continue;i.add(d);for(let m of c(s.get(d)??""))if(!i.has(m))f.push(m)}u=f}return i}async function lh(e,s,r,t){let{key:n,files:c}=await W(e);if(!n)return null;let i=()=>[...new Set([...c,...c.flatMap((o)=>he(o))])],u=mt(i());if(c.length===0)return ce(v,n,u,""),null;c.sort();let f=Y({loader:"ts",target:"browser",define:C()}),d=Gt(A,n,u);if(!d){let o=new Map,l=[];for(let p of c)try{let x=await Bun.file(p).text();o.set(p,x);let g=f.scan(x).exports.filter((Q)=>Q!=="default");if(g.length>0)l.push({file:p,names:g})}catch{o.set(p,"")}d=ce(A,n,u,{codeByFile:o,modules:l})}let{codeByFile:m,modules:y}=d,_;if(s===void 0)_=new Set(c);else{let o=r?[s,...r]:[s],l=S(o.join("\x00"),n,o.length,u),p=I.get(l);if(_=p??ie(y,m,o),!p)I.set(l,_)}if(_.size===0)return null;let w=c.filter((o)=>_.has(o)),B=()=>{if(!t)return;for(let o of w)t.push(o,...he(o))},N=`${n}\x00${w.join("\x00")}\x00${rn()}`,U=Gt(v,N,u);if(U!==void 0)return B(),U||null;let D=[],M=new Set,T=new Set;for(let o of w)try{let l=m.get(o)??await Bun.file(o).text(),p=h.basename(o,".ts");for(let g of l.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(g[1])T.add(g[1]);let x=[];try{for(let g of f.scan(l).exports)if(g!=="default")M.add(g),x.push(g)}catch{}if(l=P(l),nn(l))l=await sn(l,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:x}),l=wt(l);l=En(l),l=l.replace(/^export\s+(default\s+)?/gm,""),l=f.transformSync(l),D.push(`// Composable: ${p}
2
+ import{Ie,b,S,C,Y}from"./chunk-vhzngsmd.js";import{k}from"./chunk-1tzqqr0p.js";import{P,En}from"./chunk-r9e0r6jx.js";import{a}from"./chunk-jw7cakxt.js";import{he,nn,rn,sn}from"./chunk-sjd6rt97.js";import{wt}from"./chunk-e4d0jgcw.js";import{mt,zn,Gt,ce}from"./chunk-tsvnhc0c.js";import{E,Cn}from"./chunk-c5vzr1va.js";import h from"path";var v=new Map,A=new Map,I=b(64),F=new Map,V=["composables","functions"];function H(e){let s=h.basename(e,".ts");return s==="index"||s==="types"||e.endsWith(".d.ts")}async function ee(e){if(e)return h.resolve(e);let s=`<default>:${process.cwd()}`,r=F.get(s);if(r!==void 0)return r;let t=await te();if(t!==null)F.set(s,t);return t}async function te(){let e=await a(),s=e.root||process.cwd(),r=e.composablesDir;if(r)return h.resolve(s,r);for(let t of V){let n=h.resolve(s,t);try{let c=new Bun.Glob("**/*.ts");for await(let i of c.scan({cwd:n,absolute:!0}))if(!H(i))return n}catch{}}return null}async function W(e){let s=Array.isArray(e)?e:e?[h.resolve(e)]:(await a())._layerComposableDirs??[await ee()].filter((t)=>!!t),r=new Map;for(let t of s){let n=new Bun.Glob("**/*.ts");try{for await(let c of n.scan({cwd:t,absolute:!0})){let i=h.relative(t,c);if(!H(c)&&!r.has(i))r.set(i,c)}}catch{}}return{key:s.join("\x00"),files:[...r.values()].sort()}}async function wo(e){let{files:s}=await W(e),r=Y({loader:"ts",target:"browser",define:C()}),t=[];for(let n of s)try{let c=await Bun.file(n).text(),i=r.scan(c).exports.filter((u)=>u!=="default");if(i.length>0)t.push({file:n,names:i})}catch{}return t}function ne(e,s){return new RegExp(`\\b${s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}\\b`).test(e)}function R(e,s){let r=new Set(e.match(/\w+/g)),t=new Set;for(let n of s)if(/^\w+$/.test(n)?r.has(n):ne(e,n))t.add(n);return t}var J=b(64);function X(e,s){let r=S(e,s.size),t=J.get(r);if(t)return t;let n;try{n=Ie(e,s)}catch{n=R(e,s)}let c=[...e.matchAll(/(?:const|let|var)\s*\{([^}]*)\}\s*=\s*window\.__composables\u0008/g),...e.matchAll(/import\s*\{([^}]*)\}\s*from\s*['"]@composables['"]/g)];for(let i of c)for(let u of i[1].split(",")){let f=u.trim().split(/\s*(?::|\u0008as\u0008)\s*/)[0];if(f&&s.has(f))n.add(f)}return J.set(r,n),n}function se(e){return!e||/^(?:module|(?:text|application)\/(?:java|ecma)script|application\/stx-[\w-]+)$/i.test(e)}var L=b(256);function oe(e,s){let r=new Set(s),t="",n=0,c=new Set;for(let i of e.matchAll(/<script\b([^>]*)>([\s\S]*?)<\/script\s*>/gi)){t+=e.slice(n,i.index),n=i.index+i[0].length;let u=i[1]??"",f=i[2]??"",d=/\btype\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+))/i.exec(u),m=d?(d[1]??d[2]??d[3]??"").trim():void 0;if(!se(m)){if(!/json/i.test(m??""))t+=` ${f} `;continue}let y=R(f,r);if(y.size===0)continue;let _=S(f,[...y].sort().join(",")),w=L.get(_);if(!w)w=X(f,y),L.set(_,w);for(let B of w)c.add(B)}t+=e.slice(n);for(let i of R(t,r))c.add(i);return c}function ie(e,s,r){let t=new Map;for(let{file:f,names:d}of e)for(let m of d)if(!t.has(m))t.set(m,f);let n=new Set(t.keys()),c=(f)=>{let d=[];for(let m of X(f,n))d.push(t.get(m));return d},i=new Set,u=r.flatMap((f,d)=>d===0?[...oe(f,t.keys())].map((m)=>t.get(m)):c(f));while(u.length>0){let f=[];for(let d of u){if(i.has(d))continue;i.add(d);for(let m of c(s.get(d)??""))if(!i.has(m))f.push(m)}u=f}return i}async function lh(e,s,r,t){let{key:n,files:c}=await W(e);if(!n)return null;let i=()=>[...new Set([...c,...c.flatMap((o)=>he(o))])],u=mt(i());if(c.length===0)return ce(v,n,u,""),null;c.sort();let f=Y({loader:"ts",target:"browser",define:C()}),d=Gt(A,n,u);if(!d){let o=new Map,l=[];for(let p of c)try{let x=await Bun.file(p).text();o.set(p,x);let g=f.scan(x).exports.filter((Q)=>Q!=="default");if(g.length>0)l.push({file:p,names:g})}catch{o.set(p,"")}d=ce(A,n,u,{codeByFile:o,modules:l})}let{codeByFile:m,modules:y}=d,_;if(s===void 0)_=new Set(c);else{let o=r?[s,...r]:[s],l=S(o.join("\x00"),n,o.length,u),p=I.get(l);if(_=p??ie(y,m,o),!p)I.set(l,_)}if(_.size===0)return null;let w=c.filter((o)=>_.has(o)),B=()=>{if(!t)return;for(let o of w)t.push(o,...he(o))},N=`${n}\x00${w.join("\x00")}\x00${rn()}`,U=Gt(v,N,u);if(U!==void 0)return B(),U||null;let D=[],M=new Set,T=new Set;for(let o of w)try{let l=m.get(o)??await Bun.file(o).text(),p=h.basename(o,".ts");for(let g of l.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(g[1])T.add(g[1]);let x=[];try{for(let g of f.scan(l).exports)if(g!=="default")M.add(g),x.push(g)}catch{}if(l=P(l),nn(l))l=await sn(l,o,{projectRoot:process.cwd(),externalizeUserModules:!1,expose:x}),l=wt(l);l=En(l),l=l.replace(/^export\s+(default\s+)?/gm,""),l=f.transformSync(l),D.push(`// Composable: ${p}
3
3
  ${l.trim()}`)}catch(l){console.warn(`[stx] Failed to load composable ${o}:`,l)}if(D.length===0||M.size===0)return ce(v,N,u,""),null;let Z=[...M].map((o)=>` try { if (!(${JSON.stringify(o)} in __c)) __c[${JSON.stringify(o)}] = ${o}; } catch (e) {}`).join(`
4
4
  `),z=JSON.stringify([...M]),j=D.join(`
5
5
 
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{xe,Pt,ci,Ls,Pc,Ic,Oc,Nc,js,ui,Mc,Dc,di,hn}from"./chunk-ymypc1rp.js";import{k}from"./chunk-1tzqqr0p.js";import{a}from"./chunk-j65nf7mt.js";import{wo}from"./chunk-zme16hcr.js";import{c}from"./chunk-0rjcbqk3.js";import{existsSync as B,readFileSync as K}from"fs";import h from"path";var ge=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),ee=hn.filter((e)=>!ge.has(e)).sort(),te=[...k].sort(),he=[...new Set([...ee,...te])].sort(),be=new Set(ee),ye=new Set(te),Se=new Set(he),Y=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function ke(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ne(e,t){let s=[];for(let f of t){if(f.offset===void 0)continue;let i=f.kind==="server"?be:ye;Y.lastIndex=0;for(let p of f.code.matchAll(Y)){let g=p.index+p[0].indexOf("{")+1;for(let d of p[1].matchAll(/[^,]+/g)){let y=d[0];if(/^\s*type\s/.test(y))continue;let b=/^\s*([A-Za-z_$][\w$]*)/.exec(y);if(!b)continue;let r=b[1];if(!Se.has(r)||i.has(r))continue;let o=f.offset+g+d.index+b[0].length-r.length,u=e.slice(0,o),S=u.split(`
2
+ import{xe,Pt,ci,Ls,Pc,Ic,Oc,Nc,js,ui,Mc,Dc,di,hn}from"./chunk-vhzngsmd.js";import{k}from"./chunk-1tzqqr0p.js";import{a}from"./chunk-jw7cakxt.js";import{wo}from"./chunk-6a0ekt1n.js";import{c}from"./chunk-0rjcbqk3.js";import{existsSync as B,readFileSync as K}from"fs";import h from"path";var ge=new Set(["module","exports","require","$bool","$num","window","document","console","confirm","alert","fetch"]),ee=hn.filter((e)=>!ge.has(e)).sort(),te=[...k].sort(),he=[...new Set([...ee,...te])].sort(),be=new Set(ee),ye=new Set(te),Se=new Set(he),Y=/\bimport\s+(?!type[\s{])\{([^}]*)\}\s*from\s*(['"])stx\2/g;function ke(e,t){if(t==="server")return`'${e}' is not provided by 'stx' in a <script server> block. The engine binds only its own names there (defineProps, state, useHead, ...); any other name becomes \`await import('stx')\`, which does not resolve, so the whole script fails when the page renders. Import it from '@stacksjs/stx' instead.`;return`'${e}' is not provided by 'stx' in a client <script> block. The import is replaced by the window.stx runtime, which has no '${e}', so it is undefined in the browser.`}function ne(e,t){let s=[];for(let f of t){if(f.offset===void 0)continue;let i=f.kind==="server"?be:ye;Y.lastIndex=0;for(let p of f.code.matchAll(Y)){let g=p.index+p[0].indexOf("{")+1;for(let d of p[1].matchAll(/[^,]+/g)){let y=d[0];if(/^\s*type\s/.test(y))continue;let b=/^\s*([A-Za-z_$][\w$]*)/.exec(y);if(!b)continue;let r=b[1];if(!Se.has(r)||i.has(r))continue;let o=f.offset+g+d.index+b[0].length-r.length,u=e.slice(0,o),S=u.split(`
3
3
  `).length;s.push({line:S,column:o-(u.lastIndexOf(`
4
4
  `)+1)+1,offset:o,length:r.length,name:r,kind:f.kind,message:ke(r,f.kind)})}}}return s}import E from"path";var we="@stacksjs/stx-typescript-plugin";function $e(e,t){let s=E.resolve(e);for(;;){let f=E.join(s,"tsconfig.json");if(t(f))return f;let i=E.dirname(s);if(i===s)return;s=i}}function ie(e,t,s){let f=$e(e,s);if(!f)return;let i=new Set,p=(g)=>{if(i.has(g))return;i.add(g);let d=t(g);if(!d)return;let y=d.compilerOptions?.plugins;if(Array.isArray(y)){let r=y.find((u)=>u?.name===we),o=Array.isArray(r?.libs)?r.libs.filter((u)=>typeof u==="string"):[];return r?{configPath:g,libs:o.map((u)=>E.resolve(E.dirname(g),u))}:null}let b=typeof d.extends==="string"?[d.extends]:Array.isArray(d.extends)?d.extends:[];for(let r of[...b].reverse()){if(typeof r!=="string"||!r.startsWith("."))continue;let o=E.resolve(E.dirname(g),r.endsWith(".json")?r:`${r}.json`),u=p(o);if(u!==void 0)return u}return};return p(f)??void 0}function oa(e,t="",s=""){let f=e.startLine>1?`
5
5
  `.repeat(e.startLine-1):"",i=ci(ui(e)+e.code,t),p=Ls(i.code),g=e.kind==="client"||e.kind==="plain"?Oc(t,e.code):"",d=(f+p).split(`
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{B,Ff,Go,a,I,zh,Hh}from"./chunk-j65nf7mt.js";import"./chunk-casvvt3k.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-ymypc1rp.js";import"./chunk-sf4rntqj.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{I as config,B as defaultConfig,zh as defineStxConfig,Go as discoverConfig,a as loadStxConfig,Ff as resolveStxDirectories,Hh as validateConfig};
2
+ import{B,Ff,Go,a,I,zh,Hh}from"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{I as config,B as defaultConfig,zh as defineStxConfig,Go as discoverConfig,a as loadStxConfig,Ff as resolveStxDirectories,Hh as validateConfig};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{a}from"./chunk-j65nf7mt.js";import{yo}from"./chunk-j3st59hv.js";import p from"path";async function Kg(t={}){let l=performance.now(),s=t.root||process.cwd(),e=await a(s),o=t.ssr?.routeRules??e.routeRules??{};if(yo(o),!e.ssr&&Object.keys(o).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let u,n;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");u=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-tmcgpf68.js");n=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let d=Math.round(performance.now()-l);return{mode:r,ssg:u,ssr:n,duration:d}}
2
+ import{a}from"./chunk-jw7cakxt.js";import{yo}from"./chunk-j3st59hv.js";import p from"path";async function Kg(t={}){let l=performance.now(),s=t.root||process.cwd(),e=await a(s),o=t.ssr?.routeRules??e.routeRules??{};if(yo(o),!e.ssr&&Object.keys(o).length)throw Error("routeRules require ssr: true and the production server; flat SSG output cannot apply request/cache policies");if(!e.ssr&&(t.ssr?.serverApi??e.serverApi))throw Error("serverApi requires ssr: true; flat SSG output cannot execute API endpoints");let r=e.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${r.toUpperCase()}${e.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let u,n;if(r==="ssg"){let{generateStaticSite:i}=await import("./ssg.js");u=await i({pagesDir:p.join(e.root||".",e.pagesDir||e.build?.pagesDir||"pages"),publicDir:e.publicDir||e.build?.publicDir||"public",outputDir:e.build?.outputDir||"dist",generate404:e.build?.generate404??!0,minify:e.build?.minify??!0,cleanOutput:e.build?.cleanOutput??!0,router:e.router,...t.ssg})}else{let{buildForProduction:i}=await import("./chunk-r3zmbpv2.js");n=await i({root:s,outputDir:".output",debug:t.debug,...t.ssr})}let d=Math.round(performance.now()-l);return{mode:r,ssg:u,ssr:n,duration:d}}
3
3
  export{Kg};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ca,Ea,Ta,$a,Sh}from"./chunk-he8rmsdq.js";import"./chunk-gcje06er.js";import"./chunk-1p3vmy65.js";import"./chunk-baj6w8ja.js";import"./chunk-12sd0ep5.js";import"./chunk-e758jz81.js";import"./chunk-4gg9594a.js";import"./chunk-c84pxd2k.js";import"./chunk-kz6qw9fm.js";import"./chunk-mz1mgfq3.js";import"./chunk-4jaet63w.js";import"./chunk-f6nk205v.js";import"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-xka9fdye.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Ca as buildNative,Sh as default,Ea as findCraftBinary,$a as getAvailableFormats,Ta as getAvailableTargets};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Oh,ps,Vo,gs,ir,Uo,Wo,Mf,ms,hs,ys,qo,cc,Df,wt}from"./chunk-x34me5ar.js";import"./chunk-9xd85mvm.js";import"./chunk-fmawgk87.js";import"./chunk-j65nf7mt.js";import"./chunk-casvvt3k.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{H}from"./chunk-ymypc1rp.js";import"./chunk-sf4rntqj.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Mf as bindLoopInterpolations,Oh as clearScriptScanCache,ms as convertServerLoopAttributesToDirectives,Uo as convertSignalDirectivesToAttributes,hs as convertSignalLoopsToAttributes,ir as extractClientSignalNames,H as extractExports,cc as findMarkupIndexOutsideScripts,gs as hasSignalsSyntax,Vo as parseLoopExpression,Wo as preEvalLiteralReactiveIfs,ys as processScriptSetup,qo as processSignals,Df as rewriteStxImportSpecifiers,ps as scanScriptTags,wt as stripStxRuntimeImports};
2
+ import{Oh,ps,Vo,gs,ir,Uo,Wo,Mf,ms,hs,ys,qo,cc,Df,wt}from"./chunk-e4d0jgcw.js";import"./chunk-rccv14mn.js";import"./chunk-fmawgk87.js";import"./chunk-jw7cakxt.js";import"./chunk-3dg2zg8d.js";import"./chunk-9gwhs0gk.js";import"./chunk-t2sg2tp2.js";import"./chunk-em2yy1te.js";import"./chunk-gtd6qs1r.js";import{H}from"./chunk-vhzngsmd.js";import"./chunk-bnewgd23.js";import"./chunk-m7hfcxt3.js";import"./chunk-72jt897s.js";import"./chunk-r9e0r6jx.js";import"./chunk-1tzqqr0p.js";export{Mf as bindLoopInterpolations,Oh as clearScriptScanCache,ms as convertServerLoopAttributesToDirectives,Uo as convertSignalDirectivesToAttributes,hs as convertSignalLoopsToAttributes,ir as extractClientSignalNames,H as extractExports,cc as findMarkupIndexOutsideScripts,gs as hasSignalsSyntax,Vo as parseLoopExpression,Wo as preEvalLiteralReactiveIfs,ys as processScriptSetup,qo as processSignals,Df as rewriteStxImportSpecifiers,ps as scanScriptTags,wt as stripStxRuntimeImports};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Lr,so,Bg,Cl,oo}from"./chunk-9gj702tw.js";export{Bg as buildModuleRegistryScript,oo as buildSharedModuleRegistries,Cl as exportsMutableBinding,Lr as registeredModuleIdsIn,so as registeredModuleNamesIn};
2
+ import{Lr,so,Bg,Cl,oo}from"./chunk-cbt1dchd.js";export{Bg as buildModuleRegistryScript,oo as buildSharedModuleRegistries,Cl as exportsMutableBinding,Lr as registeredModuleIdsIn,so as registeredModuleNamesIn};