@stacksjs/stx 0.2.411 → 0.2.412

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 (59) hide show
  1. package/dist/{chunk-5jy3f138.js → chunk-097jnwd5.js} +1 -1
  2. package/dist/{chunk-85sasgtc.js → chunk-18n1ftn0.js} +1 -1
  3. package/dist/{chunk-pbnz7259.js → chunk-1a0v39k5.js} +1 -1
  4. package/dist/{chunk-x99xve3y.js → chunk-24w86pek.js} +1 -1
  5. package/dist/{chunk-kj8wnz6f.js → chunk-2tbez006.js} +1 -1
  6. package/dist/chunk-3rkejwjp.js +2 -0
  7. package/dist/{chunk-2a3vwvqv.js → chunk-3t65wb35.js} +1 -1
  8. package/dist/{chunk-pan7wmdg.js → chunk-4q1c6fw2.js} +1 -1
  9. package/dist/{chunk-q2ssypg6.js → chunk-5h104qh1.js} +1 -1
  10. package/dist/{chunk-hyhba18z.js → chunk-5qjk7drw.js} +1 -1
  11. package/dist/{chunk-zyy4rakd.js → chunk-6zggmce7.js} +9 -9
  12. package/dist/{chunk-ndq5gnzs.js → chunk-7dmgt8at.js} +1 -1
  13. package/dist/{chunk-1y6ejjrk.js → chunk-8d7nf67s.js} +1 -1
  14. package/dist/{chunk-36xaycje.js → chunk-8wp64mym.js} +17 -2
  15. package/dist/{chunk-jr52y0j1.js → chunk-a7bnvz91.js} +1 -1
  16. package/dist/{chunk-21wkhpvg.js → chunk-c4511wng.js} +1 -1
  17. package/dist/{chunk-a4vf72a0.js → chunk-c4h579e3.js} +1 -1
  18. package/dist/{chunk-mm9v8t7p.js → chunk-cs54ek9m.js} +2 -2
  19. package/dist/{chunk-xv1t91fk.js → chunk-cxrgxzxc.js} +1 -1
  20. package/dist/{chunk-5f0nwne4.js → chunk-dbc5awz9.js} +2 -2
  21. package/dist/{chunk-esypgzzm.js → chunk-de8t7sc9.js} +1 -1
  22. package/dist/{chunk-nvex8g39.js → chunk-eenk6s3t.js} +1 -1
  23. package/dist/{chunk-ctpyb5qn.js → chunk-fqzcft9d.js} +1 -1
  24. package/dist/{chunk-ph5wmtr9.js → chunk-gs18069g.js} +1 -1
  25. package/dist/{chunk-bcyw6frx.js → chunk-h564hgzt.js} +1 -1
  26. package/dist/{chunk-7kpr3fcp.js → chunk-h83jrhfq.js} +1 -1
  27. package/dist/{chunk-w4nspy4b.js → chunk-hj4vpyhp.js} +1 -1
  28. package/dist/{chunk-9sxfybkc.js → chunk-hrkvsj5c.js} +1 -1
  29. package/dist/{chunk-x4wjtspw.js → chunk-hyr4ag1k.js} +1 -1
  30. package/dist/{chunk-9mm4e8hy.js → chunk-k5ptvy0b.js} +1 -1
  31. package/dist/{chunk-jecj1xg9.js → chunk-k8t2cmyd.js} +1 -1
  32. package/dist/{chunk-khmgbnsa.js → chunk-kq4b6cwj.js} +1 -1
  33. package/dist/{chunk-m0ee1f3f.js → chunk-kxc2h5vn.js} +1 -1
  34. package/dist/{chunk-32mjs2sw.js → chunk-mbxehgrq.js} +1 -1
  35. package/dist/{chunk-smfnkpny.js → chunk-mgnq5de2.js} +1 -1
  36. package/dist/{chunk-87egs73t.js → chunk-n4299xgy.js} +1 -1
  37. package/dist/{chunk-0s34z9kx.js → chunk-p4jb9v0w.js} +1 -1
  38. package/dist/{chunk-g50agfg7.js → chunk-prxwsp7n.js} +1 -1
  39. package/dist/chunk-py2r6wtv.js +2 -0
  40. package/dist/{chunk-dzk2n4tv.js → chunk-qqpqgwvb.js} +2 -2
  41. package/dist/{chunk-60q6jwym.js → chunk-rcv2ehpq.js} +2 -2
  42. package/dist/{chunk-esr0mfyc.js → chunk-rq414kn5.js} +1 -1
  43. package/dist/{chunk-y61n68ca.js → chunk-s6g8wksg.js} +1 -1
  44. package/dist/{chunk-j9760xb0.js → chunk-strcy64y.js} +1 -1
  45. package/dist/{chunk-cqn117hn.js → chunk-tat1cjec.js} +1 -1
  46. package/dist/{chunk-73z5fzkn.js → chunk-tp8pzf94.js} +1 -1
  47. package/dist/{chunk-g5ny3aka.js → chunk-twz64kvy.js} +1 -1
  48. package/dist/{chunk-8yfy9ch7.js → chunk-vzgzaw66.js} +1 -1
  49. package/dist/{chunk-92ysystz.js → chunk-wc66mcn4.js} +16 -16
  50. package/dist/{chunk-zm4jetjz.js → chunk-x8f6wqxd.js} +1 -1
  51. package/dist/{chunk-5zyeg43k.js → chunk-xwts5yky.js} +1 -1
  52. package/dist/cli.js +7 -7
  53. package/dist/craft-entry.js +1 -1
  54. package/dist/craft.js +1 -1
  55. package/dist/pwa.js +1 -1
  56. package/dist/ssg.js +2 -2
  57. package/package.json +5 -5
  58. package/dist/chunk-5f6r72kw.js +0 -2
  59. package/dist/chunk-w02zw7et.js +0 -2
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{wk as a,xk as b,yk as c,zk as d}from"./chunk-nvex8g39.js";import"./chunk-60q6jwym.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
2
+ import{wk as a,xk as b,yk as c,zk as d}from"./chunk-eenk6s3t.js";import"./chunk-rcv2ehpq.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Sg as a,Tg as b,Ug as c,Vg as d,Wg as e,Xg as f}from"./chunk-73z5fzkn.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
2
+ import{Sg as a,Tg as b,Ug as c,Vg as d,Wg as e,Xg as f}from"./chunk-tp8pzf94.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{c as renderSlot,d as processSlots,a as parseSlots,b as parseSlotElement,e as extractSlotContent,f as applySlots};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{Js as x}from"./chunk-9fqp72ze.js";import{Jt as A}from"./chunk-tkyrk66a.js";import{Zt as T,bu as q}from"./chunk-1te8k8gp.js";import{Ww as y,ow as C}from"./chunk-36xaycje.js";import{ix as P}from"./chunk-2fw05hs2.js";y();import H from"fs";import $ from"path";import{pathToFileURL as b}from"url";var R=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],O=new Set;function N(J,Y={}){let K=$.resolve(J,Y.dir??"server/api"),Q=[],Z=new Map;if(!H.existsSync(K))return Q;let B=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:K})).sort();for(let z of B){if(z.endsWith(".d.ts"))continue;let W=z.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),I=W.pop(),X=I.lastIndexOf("."),_=X>=0?I.slice(X+1):"get",F=_.toUpperCase();if(!R.includes(F)||_!==_.toLowerCase())throw Error(`Unsupported API method suffix in ${z}; use ${R.map((k)=>k.toLowerCase()).join(", ")}`);if(X>=0)I=I.slice(0,X);if(I!=="index")W.push(I);let G=new Set,j=W.map((k,S)=>{let E=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(k);if(E){if(G.has(E[2])||E[1]&&S!==W.length-1)throw Error(`Invalid API parameter in ${z}`);return G.add(E[2]),`:${E[2]}${E[1]?"*":""}`}if(!/^[\w-]+$/.test(k))throw Error(`Unsupported API path segment ${k} in ${z}`);return k}),U=`/api${j.length?`/${j.join("/")}`:""}`,L=`${F} ${U.replace(/:\w+/g,":param")}`;if(Z.has(L))throw Error(`Ambiguous API route ${F} ${U}: ${Z.get(L)} and ${z}`);Z.set(L,z);let M=$.join(K,z);O.add($.resolve(M)),O.add(H.realpathSync(M)),Q.push({pattern:U,method:F,filePath:M})}return Q.sort((z,V)=>{let W=z.pattern.split("/"),I=V.pattern.split("/"),X=(_)=>_?.endsWith("*")?0:_?.startsWith(":")?1:2;for(let _=0;_<Math.max(W.length,I.length);_++){let F=X(I[_])-X(W[_]);if(F)return F}return z.pattern.localeCompare(V.pattern)||z.method.localeCompare(V.method)})}async function w(J,Y){let K=A(J,"api-types.d.ts"),Q=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let B of Y){let z=`./${$.relative($.dirname(K),B.filePath).replace(/\\/g,"/")}`,{params:V}=C(B.pattern);Q.push(` ${JSON.stringify(`${B.method} ${B.pattern}`)}: { params: { ${V.map((W)=>`${JSON.stringify(W)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(z)}).default>> }`)}Q.push(" }","}","export {}","");let Z=Q.join(`
2
+ import{Js as x}from"./chunk-9fqp72ze.js";import{Jt as A}from"./chunk-tkyrk66a.js";import{Zt as T,bu as q}from"./chunk-1te8k8gp.js";import{Ww as y,ow as C}from"./chunk-8wp64mym.js";import{ix as P}from"./chunk-2fw05hs2.js";y();import H from"fs";import $ from"path";import{pathToFileURL as b}from"url";var R=["GET","POST","PUT","PATCH","DELETE","HEAD","OPTIONS"],O=new Set;function N(J,Y={}){let K=$.resolve(J,Y.dir??"server/api"),Q=[],Z=new Map;if(!H.existsSync(K))return Q;let B=Array.from(new Bun.Glob("**/*.{ts,js,mts,mjs}").scanSync({cwd:K})).sort();for(let z of B){if(z.endsWith(".d.ts"))continue;let W=z.replace(/\.(?:ts|js|mts|mjs)$/,"").split("/"),I=W.pop(),X=I.lastIndexOf("."),_=X>=0?I.slice(X+1):"get",F=_.toUpperCase();if(!R.includes(F)||_!==_.toLowerCase())throw Error(`Unsupported API method suffix in ${z}; use ${R.map((k)=>k.toLowerCase()).join(", ")}`);if(X>=0)I=I.slice(0,X);if(I!=="index")W.push(I);let G=new Set,j=W.map((k,S)=>{let E=/^\[(\.\.\.)?([A-Za-z_]\w*)\]$/.exec(k);if(E){if(G.has(E[2])||E[1]&&S!==W.length-1)throw Error(`Invalid API parameter in ${z}`);return G.add(E[2]),`:${E[2]}${E[1]?"*":""}`}if(!/^[\w-]+$/.test(k))throw Error(`Unsupported API path segment ${k} in ${z}`);return k}),U=`/api${j.length?`/${j.join("/")}`:""}`,L=`${F} ${U.replace(/:\w+/g,":param")}`;if(Z.has(L))throw Error(`Ambiguous API route ${F} ${U}: ${Z.get(L)} and ${z}`);Z.set(L,z);let M=$.join(K,z);O.add($.resolve(M)),O.add(H.realpathSync(M)),Q.push({pattern:U,method:F,filePath:M})}return Q.sort((z,V)=>{let W=z.pattern.split("/"),I=V.pattern.split("/"),X=(_)=>_?.endsWith("*")?0:_?.startsWith(":")?1:2;for(let _=0;_<Math.max(W.length,I.length);_++){let F=X(I[_])-X(W[_]);if(F)return F}return z.pattern.localeCompare(V.pattern)||z.method.localeCompare(V.method)})}async function w(J,Y){let K=A(J,"api-types.d.ts"),Q=["// Generated by stx. Include this file in tsconfig.json.","declare module '@stacksjs/stx/api-client' {"," interface KnownApiRoutes {"];for(let B of Y){let z=`./${$.relative($.dirname(K),B.filePath).replace(/\\/g,"/")}`,{params:V}=C(B.pattern);Q.push(` ${JSON.stringify(`${B.method} ${B.pattern}`)}: { params: { ${V.map((W)=>`${JSON.stringify(W)}: string`).join("; ")} }; response: Awaited<ReturnType<typeof import(${JSON.stringify(z)}).default>> }`)}Q.push(" }","}","export {}","");let Z=Q.join(`
3
3
  `);if(!await Bun.file(K).exists()||await Bun.file(K).text()!==Z)await Bun.write(K,Z);return K}async function p(J,Y,K={}){let Q=N(J,K);await w(J,Q);let Z=[];for(let B of Q){let z=await Bun.build({entrypoints:[B.filePath],target:"bun",format:"esm",minify:!1,splitting:!1});if(!z.success)throw Error(`API build failed for ${B.filePath}: ${z.logs.join(`
4
- `)}`);let V=z.outputs.find((X)=>X.kind==="entry-point");if(!V)throw Error(`No API bundle for ${B.filePath}`);if(z.outputs.length!==1)throw Error(`API endpoint ${B.filePath} emits assets; package those explicitly instead`);let I=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await V.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write($.join(Y,I),V),Z.push({...B,filePath:I})}return Z}function D(J,Y){let K=J.map((Q)=>({route:Q,...C(Q.pattern)}));return async(Q)=>{let Z=new URL(Q.url).pathname,B=K.filter((G)=>G.regex.test(Z));if(!B.length)return null;let z=B[0].route.pattern,V=(G)=>G.replace(/:\w+/g,":param"),W=B.filter((G)=>V(G.route.pattern)===V(z)),I=Q.method,X=W.find((G)=>G.route.method===I)??(I==="HEAD"?W.find((G)=>G.route.method==="GET"):void 0);if(!X){let G=new Set(W.map((j)=>j.route.method));if(G.has("GET"))G.add("HEAD");return G.add("OPTIONS"),new Response(null,{status:I==="OPTIONS"?204:405,headers:{Allow:Array.from(G).sort().join(", ")}})}let _=X.regex.exec(Z),F=Object.create(null);try{X.params.forEach((G,j)=>{F[G]=decodeURIComponent(_[j+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let G=await Y(X.route);if(typeof G!=="function")throw Error(`API endpoint ${X.route.filePath} must default-export a handler`);let j=await G(Q,{params:F}),U=j instanceof Response?j:j===void 0?new Response(null,{status:204}):Response.json(j);if(I==="HEAD")return new Response(null,{status:U.status,headers:U.headers});return U}catch(G){return console.error(`[stx] API error for ${I} ${z}:`,G),Response.json({error:"Internal Server Error"},{status:500})}}}function l(J,Y){return D(Y,async(K)=>(await import(b($.resolve(J,K.filePath)).href)).default)}async function s(J,Y){if(!Y)return async()=>null;let K=Y===!0?{}:Y,Q=N(J,K);return await w(J,Q),async(Z)=>{if(!new URL(Z.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let B=N(J,K);await w(J,B);let{loadStxConfig:z}=await import("./chunk-cqn117hn.js"),V=q((await z(J)).runtimeConfig);return await T(V,()=>D(B,async(W)=>{let I=await Bun.build({entrypoints:[W.filePath],target:"bun",format:"esm",splitting:!1});if(!I.success)throw Error(I.logs.join(`
4
+ `)}`);let V=z.outputs.find((X)=>X.kind==="entry-point");if(!V)throw Error(`No API bundle for ${B.filePath}`);if(z.outputs.length!==1)throw Error(`API endpoint ${B.filePath} emits assets; package those explicitly instead`);let I=`server/api/endpoint-${new Bun.CryptoHasher("sha256").update(await V.arrayBuffer()).digest("hex").slice(0,20)}.mjs`;await Bun.write($.join(Y,I),V),Z.push({...B,filePath:I})}return Z}function D(J,Y){let K=J.map((Q)=>({route:Q,...C(Q.pattern)}));return async(Q)=>{let Z=new URL(Q.url).pathname,B=K.filter((G)=>G.regex.test(Z));if(!B.length)return null;let z=B[0].route.pattern,V=(G)=>G.replace(/:\w+/g,":param"),W=B.filter((G)=>V(G.route.pattern)===V(z)),I=Q.method,X=W.find((G)=>G.route.method===I)??(I==="HEAD"?W.find((G)=>G.route.method==="GET"):void 0);if(!X){let G=new Set(W.map((j)=>j.route.method));if(G.has("GET"))G.add("HEAD");return G.add("OPTIONS"),new Response(null,{status:I==="OPTIONS"?204:405,headers:{Allow:Array.from(G).sort().join(", ")}})}let _=X.regex.exec(Z),F=Object.create(null);try{X.params.forEach((G,j)=>{F[G]=decodeURIComponent(_[j+1])})}catch{return new Response("Invalid URL parameter encoding",{status:400})}try{let G=await Y(X.route);if(typeof G!=="function")throw Error(`API endpoint ${X.route.filePath} must default-export a handler`);let j=await G(Q,{params:F}),U=j instanceof Response?j:j===void 0?new Response(null,{status:204}):Response.json(j);if(I==="HEAD")return new Response(null,{status:U.status,headers:U.headers});return U}catch(G){return console.error(`[stx] API error for ${I} ${z}:`,G),Response.json({error:"Internal Server Error"},{status:500})}}}function l(J,Y){return D(Y,async(K)=>(await import(b($.resolve(J,K.filePath)).href)).default)}async function s(J,Y){if(!Y)return async()=>null;let K=Y===!0?{}:Y,Q=N(J,K);return await w(J,Q),async(Z)=>{if(!new URL(Z.url).pathname.match(/^\/api(?:\/|$)/))return null;try{let B=N(J,K);await w(J,B);let{loadStxConfig:z}=await import("./chunk-tat1cjec.js"),V=q((await z(J)).runtimeConfig);return await T(V,()=>D(B,async(W)=>{let I=await Bun.build({entrypoints:[W.filePath],target:"bun",format:"esm",splitting:!1});if(!I.success)throw Error(I.logs.join(`
5
5
  `));let X=I.outputs.find((_)=>_.kind==="entry-point");if(!X||I.outputs.length!==1)throw Error(`Unsupported API bundle output: ${W.filePath}`);return(await import(`data:text/javascript;base64,${Buffer.from(await X.text()).toString("base64")}`)).default})(Z))}catch(B){return console.error("[stx] API discovery failed:",B),Response.json({error:"API discovery failed; check the server log"},{status:500})}}}function u(J,Y,K){if(x(J))return!0;let Q=/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/;if(Q.test($.basename(J)))return!0;try{if(Q.test($.basename(H.realpathSync(J))))return!0}catch{}if(O.has($.resolve(J)))return!0;if(!K)return!1;let Z=$.resolve(Y,typeof K==="object"?K.dir??"server/api":"server/api"),B=(V)=>{try{return H.realpathSync(V)}catch{return $.resolve(V)}},z=B(J);return[Z,$.resolve(Y,"server"),$.resolve(Y,".output/server")].some((V)=>{let W=B(V);return z===W||z.startsWith(`${W}${$.sep}`)})}
6
6
  export{N as yl,w as zl,p as Al,D as Bl,l as Cl,s as Dl,u as El};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$i as h,Ui as a,Vi as b,Wi as c,Xi as d,Yi as e,Zi as f,_i as g,aj as i,bj as j,cj as k,dj as l,ej as m,fj as n}from"./chunk-ph5wmtr9.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
2
+ import{$i as h,Ui as a,Vi as b,Wi as c,Xi as d,Yi as e,Zi as f,_i as g,aj as i,bj as j,cj as k,dj as l,ej as m,fj as n}from"./chunk-gs18069g.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{i as streamingSuspenseDirective,m as streamToResponse,g as streamTemplateSimple,a as streamTemplate,d as renderStreamingPage,k as registerStreamingDirectives,e as processStreamDirectives,l as processSectionDirectives,j as islandDirective,n as generateHydrationRuntime,f as extractStreamBoundaries,h as createStreamRenderer,b as buildSuspenseResolveScript,c as SUSPENSE_RESOLVER_RUNTIME};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{Wo as V}from"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import{ix as F}from"./chunk-2fw05hs2.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
2
+ import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{Wo as V}from"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import{ix as F}from"./chunk-2fw05hs2.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
3
3
  <script>
4
4
  (function() {
5
5
  const ws = new WebSocket('${z}');
@@ -556,7 +556,7 @@ window.__stxPerformance = {
556
556
 
557
557
  window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
558
558
  </script>
559
- `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-kj8wnz6f.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-kj8wnz6f.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
559
+ `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-2tbez006.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-2tbez006.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
560
560
  `)}function jz(z){return z.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function A(z){let J=[],Z=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
561
561
  `)}function Dz(z,J){let Z=`<script>window.__stxProps = ${JSON.stringify(J)};</script>`;return z+Z}function Lz(z){return z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function Oz(z,J){let Z=await I(z);f(z,Z);let K=v(z.config,Z);g(z,K),console.log(` Found ${Z.length} story files`);let $=typeof J.host==="string"?J.host:J.host===!0?"0.0.0.0":"localhost",X=new k(z.root),B=new T(z.root),Y=new M(z.root),W=s(),j=Bun.serve({port:J.port,hostname:$,fetch:async(Q,D)=>{let O=new URL(Q.url).pathname;if(O==="/__hmr"){if(D.upgrade(Q,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(O.startsWith("/api/"))return Cz(z,O,Q,{presetsManager:X,bookmarksManager:B,analyticsTracker:Y});return kz(z,O,J.port)},websocket:{open(Q){W.open(Q)},close(Q){W.close(Q)},message(Q,D){W.message(Q,D)}}}),U=`http://${$}:${J.port}`,_=Uz(z,async(Q,D)=>{console.log(` [${Q}] ${D.relativePath}`);let L=await I(z);f(z,L);let O=v(z.config,L);if(g(z,O),Q==="add")a(D.id,{fileName:D.fileName});else if(Q==="unlink")o(D.id);else n(D.id,{fileName:D.fileName})});if(J.open){let Q=U;try{let{exec:D}=await import("child_process"),L=process.platform;D(`${L==="darwin"?"open":L==="win32"?"start":"xdg-open"} ${Q}`)}catch{}}return{server:j,url:U,close:async()=>{_(),j.stop()}}}async function Cz(z,J,Z,K){let{presetsManager:$,bookmarksManager:X,analyticsTracker:B}=K;if(J==="/api/stories")return Response.json({files:z.storyFiles.map((Y)=>({id:Y.id,fileName:Y.fileName,relativePath:Y.relativePath,treePath:Y.treePath})),tree:z.tree});if(J.startsWith("/api/story/")){let Y=J.slice(11),W=z.storyFiles.find((j)=>j.id===Y);if(!W)return new Response("Story not found",{status:404});try{let j=await Bun.file(W.path).text();return Response.json({id:W.id,fileName:W.fileName,relativePath:W.relativePath,content:j})}catch{return new Response("Error reading story",{status:500})}}if(J==="/api/config")return Response.json({theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets});if(J.startsWith("/api/render/")){let Y=new URL(Z.url),W=J.slice(12).split("/"),j=W[0],U=W[1]||"default",_,Q=Y.searchParams.get("props");if(Q)try{_=JSON.parse(Q)}catch{}let D=z.storyFiles.find((L)=>L.id===j);if(!D)return new Response("Story not found",{status:404});try{let L=await Bz(z,D,U,_);return Response.json({html:L.html,css:L.css,js:L.js,errors:L.errors,duration:L.duration})}catch(L){return Response.json({html:"",css:"",js:"",errors:[L instanceof Error?L.message:String(L)],duration:0},{status:500})}}if(J==="/api/presets"&&Z.method==="GET")return Response.json({presets:$.getAllPresets()});if(J==="/api/presets"&&Z.method==="POST")try{let Y=await Z.json(),W=$.createPreset(Y.name,Y.props,{componentId:Y.componentId,description:Y.description});return await $.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/presets/")&&!J.includes("/use")&&Z.method==="GET"){let Y=J.slice(13),W=$.getPreset(Y);if(!W)return new Response("Preset not found",{status:404});return Response.json(W)}if(J.endsWith("/use")&&Z.method==="POST"){let Y=J.slice(13,-4),W=$.usePreset(Y);if(!W)return new Response("Preset not found",{status:404});return await $.save(),Response.json(W)}if(J.startsWith("/api/presets/")&&Z.method==="DELETE"){let Y=J.slice(13);if(!$.deletePreset(Y))return new Response("Preset not found",{status:404});return await $.save(),Response.json({success:!0})}if(J==="/api/bookmarks"&&Z.method==="GET")return Response.json({bookmarks:X.getAllBookmarks()});if(J==="/api/bookmarks"&&Z.method==="POST")try{let Y=await Z.json(),W=X.addBookmark(Y.storyId,Y.variantId,Y.props,{name:Y.name,notes:Y.notes,color:Y.color});return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/bookmarks/toggle"&&Z.method==="POST")try{let Y=await Z.json(),W=X.toggleBookmark(Y.storyId,Y.variantId,Y.props);return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/bookmarks/")&&J!=="/api/bookmarks/toggle"&&Z.method==="GET"){let Y=J.slice(15),W=X.getBookmark(Y);if(!W)return new Response("Bookmark not found",{status:404});return Response.json(W)}if(J.startsWith("/api/bookmarks/")&&Z.method==="DELETE"){let Y=J.slice(15);if(!X.deleteBookmark(Y))return new Response("Bookmark not found",{status:404});return await X.save(),Response.json({success:!0})}if(J==="/api/analytics/track"&&Z.method==="POST")try{let Y=await Z.json();if(Y.type==="view"&&Y.componentId)B.trackView(Y.componentId,Y.variantId);else if(Y.type==="prop_change"&&Y.componentId&&Y.propName)B.trackPropChange(Y.componentId,Y.propName,null);else if(Y.type==="variant_switch"&&Y.componentId&&Y.variantId)B.trackVariantSwitch(Y.componentId,Y.variantId);else if(Y.type==="search"&&Y.query)B.trackSearch(Y.query,0);return await B.save(),Response.json({success:!0})}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/analytics/summary"&&Z.method==="GET")return Response.json({mostViewed:B.getMostViewedComponents(10),mostChangedProps:B.getMostChangedProps(10),searchAnalytics:B.getSearchAnalytics()});if(J.startsWith("/api/analytics/component/")&&Z.method==="GET"){let Y=J.slice(25),W=z.storyFiles.find((U)=>U.id===Y),j=B.getComponentAnalytics(Y,W?.fileName||Y);return Response.json(j)}return new Response("Not found",{status:404})}function kz(z,J,Z){let K=Sz(z,Z);return new Response(K,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function Sz(z,J){let{theme:Z}=z.config,K=Z.title||"STX Story",$=`ws://localhost:${J}/__hmr`,X=r($);return`<!DOCTYPE html>
562
562
  <html lang="en" class="${Z.darkClass||"dark"}">
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{El as QJ}from"./chunk-mm9v8t7p.js";import{Fl as WJ}from"./chunk-s8jd13nb.js";import{Or as XJ,Pr as qJ,mm as GJ}from"./chunk-92ysystz.js";import{Hs as ZJ,Is as $J}from"./chunk-v3nwkveg.js";import{$s as YJ,dt as u}from"./chunk-x99xve3y.js";import{Jt as c}from"./chunk-tkyrk66a.js";import X from"path";import O from"fs";function UJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function LJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of LJ(J)){if(UJ(W)){let Y=W.position||void 0;$.push({file:K||Y?.file,line:Y?.line,column:Y?.column,message:W.message??"",lineText:Y?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function t(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",Y=$.lineText?`
2
+ import{El as QJ}from"./chunk-cs54ek9m.js";import{Fl as WJ}from"./chunk-s8jd13nb.js";import{Or as XJ,Pr as qJ,mm as GJ}from"./chunk-wc66mcn4.js";import{Hs as ZJ,Is as $J}from"./chunk-v3nwkveg.js";import{$s as YJ,dt as u}from"./chunk-24w86pek.js";import{Jt as c}from"./chunk-tkyrk66a.js";import X from"path";import O from"fs";function UJ(J){if(!J||typeof J!=="object")return!1;let K=J;return typeof K.message==="string"&&(K.name==="BuildMessage"||K.name==="ResolveMessage"||("position"in K))}function LJ(J){if(J&&typeof J==="object"&&Array.isArray(J.errors))return J.errors;return[J]}function b(J,K){let $=[];for(let W of LJ(J)){if(UJ(W)){let Y=W.position||void 0;$.push({file:K||Y?.file,line:Y?.line,column:Y?.column,message:W.message??"",lineText:Y?.lineText});continue}$.push({file:K,message:W instanceof Error?W.message:String(W)})}return $}function t(J,K){return b(J,K).map(($)=>{let W=$.file?`${$.file}${$.line?`:${$.line}${$.column?`:${$.column}`:""}`:""}`:"",Y=$.lineText?`
3
3
  ${$.lineText.trim()}`:"";return W?`${W}: ${$.message}${Y}`:`${$.message}${Y}`}).join(`
4
4
  `)}var TJ=9;function P(J,K,$){return/^(?:(?:stx|ui)\.config\.[cm]?[jt]s|runtime-config-(?:server|loader)\.[cm]?[jt]s)$/.test(X.basename(J))||QJ(J,K,$)}var HJ=1,zJ=new Map,f=600,AJ=100,g=new Map;async function MJ(J){let K=g.get(J)??0;if(K>0&&K<AJ){g.set(J,K+1);return}g.set(J,1);try{let $=(await O.promises.readdir(J)).filter((z)=>z.endsWith(".js"));if($.length<=f)return;let Y=(await Promise.all($.map(async(z)=>{try{return{name:z,at:(await O.promises.stat(X.join(J,z))).mtimeMs}}catch{return null}}))).filter((z)=>z!==null);Y.sort((z,H)=>H.at-z.at);for(let z of Y.slice(f)){let H=z.name.slice(0,-3);await O.promises.rm(X.join(J,`${H}.js`),{force:!0}),await O.promises.rm(X.join(J,`${H}.deps.json`),{force:!0})}x("pruned bundle cache to",f,"entries")}catch{}}function nJ(J){return zJ.get(J)??[]}function h(J,K){if(J)zJ.set(J,K)}function CJ(J=process.env){return J.STX_DEBUG==="true"||J.STX_DEBUG==="1"}function x(...J){if(CJ())console.log("[stx:bundler]",...J)}var n=[];function r(J,K,$){n.push({filePath:J||"<inline>",message:K,details:$})}function oJ(){return n.slice()}function lJ(){n.length=0}var p;function dJ(J){p=J}function a(){if(p)return p;try{let J=qJ.strict;return typeof J==="object"&&J!==null?J.bundlerFallback??"warn":"warn"}catch{return"warn"}}var e=[/^stx$/,/^@stacksjs\/stx$/,/^@stores$/,/^stx\/stores$/,/^@composables$/];function sJ(J){let K=/^[ \t]*import[ \t]+(?!type(?:[ \t]|{))[\s\S]*?\s+from\s+['"]([^'"]+)['"][ \t]*;?/gm,$;while(($=K.exec(J))!==null){let Y=$[1];if(!e.some((H)=>H.test(Y)))return x("detected user import:",Y),!0}let W=/^[ \t]*import[ \t]+['"]([^'"]+)['"]/gm;while(($=W.exec(J))!==null){let Y=$[1];if(/\.css(?:\?.*)?$/.test(Y))continue;if(!e.some((H)=>H.test(Y)))return x("detected side-effect import:",Y),!0}return!1}var v="stx-module:",xJ=/\.(?:[cm]?[jt]sx?|json)$/i;function IJ(J,K){return X.relative(J,K).split(X.sep).join("/")}function _J(J,K){if(K.size===0)return J;return J.replace(/^([ \t]*import\s+(?:[^;"']*?\s+from\s+)?)(["'])([^"']+)\2/gm,($,W,Y,z)=>{let H=K.get(z);return H&&!z.startsWith(v)?`${W}${Y}${H}${Y}`:$})}function NJ(J,K){let $=0,W=(z)=>{let H=`__stxMod${$++}`,j=JSON.stringify(z);return K.push(`var ${H} = globalThis.__stxModules && globalThis.__stxModules[${j}];`,`if (${H} === undefined) throw new Error("[stx] module " + ${JSON.stringify(j)} + " is not registered on this page (#1957)");`),H},Y=(z,H)=>{for(let j of z.split(",")){let T=j.trim();if(!T)continue;let Q=T.match(/^("(?:[^"\\]|\\.)*"|[\w$]+)(?:\s+as\s+([\w$]+))?$/);if(!Q)continue;let Z=Q[1].startsWith('"')?JSON.parse(Q[1]):Q[1],G=Q[2]??Z;K.push(`var ${G} = ${H}[${JSON.stringify(Z)}];`)}};return J=J.replace(/^[ \t]*import\s+([^;"']*?)\s+from\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H,j)=>{let T=j.slice(v.length),Q=W(T),Z=H.trim(),G=Z.match(/^([\w$]+)\s*(?:,\s*|$)/);if(G&&!Z.startsWith("{")&&!Z.startsWith("*"))K.push(`var ${G[1]} = ${Q}.default;`),Z=Z.slice(G[0].length).trim();let q=Z.match(/^\*\s*as\s+([\w$]+)$/);if(q)K.push(`var ${q[1]} = ${Q};`);else if(Z.startsWith("{"))Y(Z.replace(/^\{|\}$/g,""),Q);return""}),J=J.replace(/^[ \t]*import\s+["'](stx-module:[^"']+)["'];?[ \t]*$/gm,(z,H)=>{return W(H.slice(v.length)),""}),J}function JJ(J){let K=[J,`${J}.ts`,`${J}.tsx`,`${J}.js`,`${J}.mjs`,`${J}.jsx`,X.join(J,"index.ts"),X.join(J,"index.tsx"),X.join(J,"index.js"),X.join(J,"index.mjs")];for(let $ of K)try{if(O.existsSync($)&&O.statSync($,{throwIfNoEntry:!1})?.isFile())return $}catch{}return}function SJ(J,K,$,W,Y,z=new Map,H){let j=(Q,Z,G)=>{if(P(Z,J,H))return null;if(!Y||Q!==$||!xJ.test(Z))return null;try{if(!O.statSync(Z,{throwIfNoEntry:!1})?.isFile())return null}catch{return null}W.add(Z);let q=`${v}${IJ(process.cwd(),Z)}`;return z.set(G,q),{path:q,external:!0}},T=(Q,Z)=>{let G=Q===$?K:X.dirname(Q),q=X.resolve(G,Z);return JJ(q)??q};return{name:"stx-client-bundle",setup(Q){if(Q.onResolve({filter:/^(stx|@stacksjs\/stx)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Z)=>({path:Z.path,external:!0})),Q.onResolve({filter:/^\//},(Z)=>{let G=JJ(Z.path);if(G){let q=j(Z.importer,G,Z.path);if(q)return q;if(G!==$)W.add(G);return{path:G}}return{path:Z.path,external:!0}}),Q.onResolve({filter:/^\.\.?\//},(Z)=>{let G=T(Z.importer,Z.path),q=j(Z.importer,G,Z.path);if(q)return q;return W.add(G),{path:G}}),Q.onResolve({filter:/^[@~]\//},(Z)=>{let G=X.resolve(J,Z.path.slice(2)),q=[G,`${G}.ts`,`${G}.tsx`,`${G}.js`,`${G}.mjs`,`${G}.jsx`,X.join(G,"index.ts"),X.join(G,"index.tsx"),X.join(G,"index.js"),X.join(G,"index.mjs")];for(let w of q)if(O.existsSync(w)&&O.statSync(w,{throwIfNoEntry:!1})?.isFile()){let y=j(Z.importer,w,Z.path);if(y)return y;return x(`resolved ${Z.path[0]}/ import:`,Z.path,"\u2192",w),W.add(w),{path:w}}return console.warn(`[stx:bundler] could not resolve ${Z.path[0]}/ import:`,Z.path),{path:G}}),Y)Q.onResolve({filter:/^(?!node:|bun:)(?:@[\w.-]+\/)?[\w.-]/},(Z)=>{if(Z.importer!==$)return;let G=`${v}npm:${Z.path}`;return z.set(Z.path,G),{path:G,external:!0}});Q.onLoad({filter:/\.(?:[cm]?[jt]sx?|json)$/},(Z)=>{if(P(Z.path,J,H))throw Error(`Server-only API source cannot be imported by a client script: ${Z.path}`);let G=X.extname(Z.path).toLowerCase(),q=G===".json"?"json":G===".tsx"?"tsx":G===".jsx"?"jsx":G===".ts"||G===".mts"||G===".cts"?"ts":"js";if(Z.path!==$)W.add(Z.path);return{contents:O.readFileSync(Z.path,"utf8"),loader:q}})}}}var m=new Map,D=YJ(64),KJ=Symbol.for("stx.client-bundle-build-queue");function yJ(J){let K=globalThis,W=(K[KJ]??Promise.resolve()).then(J,J);return K[KJ]=W.then(()=>{return},()=>{return}),W}async function iJ(J,K,$={}){let W=$.projectRoot||process.cwd(),Y=(await XJ(W)).serverApi,z=$.minify??!1,H=$.externalizeUserModules??!0,j=$.cacheDir||c(W,"bundle-cache"),T=new Bun.CryptoHasher("md5");T.update(`${TJ}\x00${WJ()}\x00${JSON.stringify(Y??!1)}\x00${H?"registry":"inline"}\x00${J}\x00${K}`);let Q=T.digest("hex").slice(0,12),Z=X.join(j,`${Q}.js`),G=D.get(Z);if(G){if(u(G.files)&&G.files.every((A)=>!P(A.path,W,Y))){x("memo hit:",Q);let A=G.files.map((M)=>M.path);return h(K,A),$.collectInputs?.push(...A),G.code}D.delete(Z),x("memo invalidated by dep change:",Q)}let q=X.join(j,`${Q}.deps.json`),w=Bun.file(Z);if(await w.exists()){let A=Bun.file(q),M=!1,U=null;if(await A.exists())try{let N=JSON.parse(await A.text());if(N.metadataVersion!==HJ||!Array.isArray(N.files))M=!1;else U=N.files,M=!0;if(U&&(!u(U)||U.some((B)=>P(B.path,W,Y))))M=!1}catch{M=!1}if(M){if(x("cache hit:",Q),U)h(K,U.map((B)=>B.path)),$.collectInputs?.push(...U.map((B)=>B.path));let N=await w.text();if(U)D.set(Z,{code:N,files:U});return N}x("cache invalidated by dep change:",Q)}let y=m.get(Q);if(y){let A=await y;if($.collectInputs)$.collectInputs.push(...(D.get(Z)?.files??[]).map((M)=>M.path));return A}let I=yJ(()=>FJ(J,K,{projectRoot:W,minify:z,cacheDir:j,hash:Q,cachePath:Z,depsPath:q,collectInputs:$.collectInputs,externalizeUserModules:H,serverApi:Y}));m.set(Q,I);try{return await I}finally{m.delete(Q)}}var BJ=0;function RJ(J){return`${J}-${process.pid}-${++BJ}`}async function FJ(J,K,$){let{projectRoot:W,minify:Y,cacheDir:z,hash:H,cachePath:j,depsPath:T,externalizeUserModules:Q}=$,Z=c(W,"bundle-tmp"),G=RJ(H),q=X.join(Z,`${G}.ts`),w=X.join(Z,"out",G);O.mkdirSync(Z,{recursive:!0}),O.mkdirSync(w,{recursive:!0});let y=X.dirname(K),I=new Set,A=/^[ \t]*(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,M=/^[ \t]*(export\s+)?(?:async\s+)?function\s+(\w+)/gm,U=ZJ(J),{depths:N,balanced:B}=$J(U),o=(L)=>!B||N[L]===0,C;while((C=A.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;if(C[2])C[2].split(",").forEach((L)=>{let k=DJ(L);if(k)I.add(k)});else if(C[3])I.add(C[3])}while((C=M.exec(U))!==null){if(C[1])continue;if(!o(C.index))continue;I.add(C[2])}let VJ=I.size>0?`
5
5
  export { ${[...I].join(", ")} }`:"";await Bun.write(q,J+VJ),x("bundling:",H,"from:",X.basename(K));let l=new Set,d=new Map;try{let L=await Bun.build({entrypoints:[q],outdir:w,target:"browser",format:"esm",minify:Y,plugins:[SJ(W,y,q,l,Q,d,$.serverApi)],define:{"process.env.NODE_ENV":Y?'"production"':'"development"',...GJ()},root:W});if(!L.success){let S=L.logs.filter((R)=>R.level==="error").map((R)=>R.message).join(", ")||`Unable to bundle ${X.basename(K)}`,F=b(L.logs,K||void 0);if(console.warn("[stx:bundler] build failed:",S),r(K||"",S,F),a()==="error")throw Error(S);return J}let k="";for(let V of L.outputs){k=await V.text();break}let _=[];for(let V of k.matchAll(/^\s*export\s*\{([^}]*)\}\s*;?\s*$/gm))for(let S of V[1].split(",")){let F=S.trim().match(/^([A-Za-z_$][\w$]*)\s+as\s+([A-Za-z_$][\w$]*)$/);if(F){_.push([F[2],F[1]]);continue}let R=S.trim();if(/^[A-Za-z_$][\w$]*$/.test(R))_.push([R,R])}let s=[];k=NJ(_J(k,d),s);let kJ=k.match(/^\s*import\s+[^;]+;?\s*$/gm)||[];k=k.replace(/^\s*import\s+[^;]+;?\s*$/gm,"").replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim();let i=`__stxBundle_${H}`,jJ=_.map(([V,S])=>`${JSON.stringify(V)}: ${S}`).join(", "),OJ=_.map(([V])=>`var ${V} = undefined;`).join(`
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Dk as m}from"./chunk-60q6jwym.js";import{ix as z}from"./chunk-2fw05hs2.js";import{existsSync as s,mkdirSync as T,copyFileSync as F,chmodSync as A}from"fs";import{join as Z,basename as Yq}from"path";import{spawn as j,execSync as Zq}from"child_process";import{tmpdir as c,homedir as P,platform as Lq}from"os";var Iq=`
2
+ import{Dk as m}from"./chunk-rcv2ehpq.js";import{ix as z}from"./chunk-2fw05hs2.js";import{existsSync as s,mkdirSync as T,copyFileSync as F,chmodSync as A}from"fs";import{join as Z,basename as Yq}from"path";import{spawn as j,execSync as Zq}from"child_process";import{tmpdir as c,homedir as P,platform as Lq}from"os";var Iq=`
3
3
  <script>
4
4
  (function() {
5
5
  'use strict';
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{_e as a}from"./chunk-jr52y0j1.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{a as startInteractive};
2
+ import{_e as a}from"./chunk-a7bnvz91.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{a as startInteractive};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Hq as x,Mm as O,Mr as g,Wo as R,aq as H}from"./chunk-92ysystz.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
2
+ import{Hq as x,Mm as O,Mr as g,Wo as R,aq as H}from"./chunk-wc66mcn4.js";import b from"path";var v={enabled:!0,bufferSize:16384,strategy:"auto",timeout:30000},M=/<!-- @section:([\w-]+) -->([\s\S]*?)<!-- @endsection:\1 -->/g;var T=/<!-- @suspense:([\w-]+) -->([\s\S]*?)<!-- @endsuspense:\1 -->/g;function f(q){let B=[],Q=0,G;T.lastIndex=0;while((G=T.exec(q))!==null){if(G.index>Q){let X=q.slice(Q,G.index);if(X.trim())B.push({type:B.length===0?"shell":"content",content:X})}let J=G[1],K=G[2];B.push({type:"suspense",name:J,content:K}),Q=G.index+G[0].length}if(Q<q.length){let J=q.slice(Q);if(J.trim())B.push({type:B.length===0?"shell":"content",content:J})}if(B.length===0)B.push({type:"shell",content:q});return B}async function r(q,B={},Q={}){let G={...g,...Q,streaming:{...v,...Q.streaming}},J=G.streaming?.bufferSize||16384;return new ReadableStream({async start(K){try{let X=await Bun.file(q).text(),z=X.match(/<script\b[^>]*\bserver\b[^>]*>([\s\S]*?)<\/script>/i),L=z?z[1]:"",Y=X.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,""),j={...B,__filename:q,__dirname:b.dirname(q)};if(L.trim())await R(L,j,q);let D=f(Y),$=new Set;if(!D.some((w)=>w.type==="suspense")){let w=G.streaming?.strategy||"auto",U=new RegExp(M.source,"g");if(!(w!=="manual"&&U.test(Y))){let F=await H(Y,j,q,G,$);for(let V=0;V<F.length;V+=J)K.enqueue(F.slice(V,V+J)),await new Promise((W)=>setTimeout(W,0))}else{let F=[],V=new RegExp(M.source,"g"),W;while((W=V.exec(Y))!==null)F.push({name:W[1],content:W[2],start:W.index,end:W.index+W[0].length});let y=0;for(let A of F){if(A.start>y){let k=Y.slice(y,A.start);if(k.trim()){let E=await H(k,j,q,G,$);K.enqueue(E),await new Promise((S)=>setTimeout(S,0))}}let I=await H(A.content,j,q,G,$);K.enqueue(I),await new Promise((k)=>setTimeout(k,0)),y=A.end}if(y<Y.length){let A=Y.slice(y);if(A.trim()){let I=await H(A,j,q,G,$);K.enqueue(I)}}}}else{let w=new Map;for(let Z of D)if(Z.type==="shell"||Z.type==="content"){let F=await H(Z.content,j,q,G,$);K.enqueue(F)}else if(Z.type==="suspense"&&Z.name){let F=`stx-suspense-${Z.name}`;K.enqueue(`<div id="${F}" data-suspense="${Z.name}" style="display:contents;">
3
3
  <template data-suspense-fallback>Loading...</template>
4
4
  </div>`),w.set(Z.name,H(Z.content,j,q,G,$))}K.enqueue(`
5
5
  <script>
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{bg as a}from"./chunk-9mm4e8hy.js";import"./chunk-dzk2n4tv.js";import"./chunk-ny67c03k.js";import"./chunk-t5ja7qkn.js";import"./chunk-9e8t0twa.js";import"./chunk-anydpa34.js";import"./chunk-mm9v8t7p.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{a as buildForProduction};
2
+ import{bg as a}from"./chunk-k5ptvy0b.js";import"./chunk-qqpqgwvb.js";import"./chunk-ny67c03k.js";import"./chunk-t5ja7qkn.js";import"./chunk-9e8t0twa.js";import"./chunk-anydpa34.js";import"./chunk-cs54ek9m.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{a as buildForProduction};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Fl as G}from"./chunk-s8jd13nb.js";import{Eq as U,Iq as B}from"./chunk-92ysystz.js";import{at as O}from"./chunk-x99xve3y.js";import{Jt as L}from"./chunk-tkyrk66a.js";import{ix as y}from"./chunk-2fw05hs2.js";import X from"fs";import Z from"path";var H=new Map,$=new Map;async function p(j){let J;for(let V=0;V<3;V++)try{let q=(await X.promises.stat(j)).mtime.getTime(),W=$.get(j);if(W&&W.mtime===q)return W.content;let I=await Bun.file(j).text(),T=(await X.promises.stat(j)).mtime.getTime();if(T!==q)continue;return $.set(j,{content:I,mtime:T}),I}catch(Q){J=Q;break}throw $.delete(j),Error(`File not found: ${j}${J?` (${J.message})`:""}`)}function m(j){$.delete(j)}function f(j){for(let z of $.keys())if(z.startsWith(j))$.delete(z)}var M=null,v=null,b=null;function r(j){b=j}async function k(j=!1){let z=b??await import("./chunk-tgrpp58r.js");if(j)return z.generateSignalsRuntimeDev();if(M===null)M=z.generateSignalsRuntime();return M}var N=null;async function R(){if(N===null){let{getRouterScript:j}=await import("./chunk-g5ny3aka.js");N=j()}return N}var x={};async function d(j,z=!1){let J=j==="runtime"?await k(z):await R(),V=j==="runtime"&&z?"runtime-debug":j,Q=x[V];if(!Q||Q.content!==J)Q={content:J,hash:Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)},x[V]=Q;return{content:J,hash:Q.hash,url:`/_stx/${j}.${Q.hash}.js`}}var E=500,Y=new Map;function w(j){return L(process.cwd(),"module-bundles",`${j}.js`)}function c(j){let z=Bun.hash(j).toString(16).padStart(16,"0").slice(0,16),J=Y.has(z);if(J)Y.delete(z);Y.set(z,j);while(Y.size>E)Y.delete(Y.keys().next().value);if(!J)try{let V=w(z);if(!X.existsSync(V))X.mkdirSync(Z.dirname(V),{recursive:!0}),X.writeFileSync(V,j)}catch{}return`/_stx/modules.${z}.js`}function l(j){if(!/^[0-9a-f]{16}$/.test(j))return;let z=Y.get(j);if(z!==void 0)return z;try{return X.readFileSync(w(j),"utf8")}catch{return}}function o(){$.clear(),B(),O(),M=null,v=null,N=null}function A(j){let z={debug:j.debug===!0,middleware:(j.middleware??[]).map((J)=>({name:J.name,timing:J.timing,handler:String(J.handler)})),customDirectives:(j.customDirectives??[]).map((J)=>({name:J.name,hasEndTag:J.hasEndTag===!0,rawParams:J.rawParams===!0,handler:String(J.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(z)).digest("hex")}async function s(j,z){try{if(!z.cachePath)return null;let J=Z.resolve(z.cachePath),V=Z.join(J,`${D(j)}.html`),Q=Z.join(J,`${D(j)}.meta.json`);if(!await U(V)||!await U(Q))return null;let q=await Bun.file(Q).text(),W=JSON.parse(q);if(W.cacheVersion!==z.cacheVersion)return null;if(W.engine!==G())return null;if(W.optionsSignature!==A(z))return null;if((await X.promises.stat(j)).mtime.getTime()>W.mtime)return null;for(let K of W.dependencies)if(await U(K)){if((await X.promises.stat(K)).mtime.getTime()>W.mtime)return null}else return null;return await Bun.file(V).text()}catch(J){return console.warn(`Cache error for ${j}:`,J),null}}async function n(j,z,J,V){try{if(!V.cachePath)return;let Q=Z.resolve(V.cachePath);await X.promises.mkdir(Q,{recursive:!0});let q=Z.join(Q,`${D(j)}.html`),W=Z.join(Q,`${D(j)}.meta.json`),I=await X.promises.stat(j);await Bun.write(q,z);let K={sourcePath:j,mtime:I.mtime.getTime(),dependencies:Array.from(J),cacheVersion:V.cacheVersion,engine:G(),optionsSignature:A(V),generatedAt:Date.now()};await Bun.write(W,JSON.stringify(K,null,2)),H.set(j,{output:z,mtime:I.mtime.getTime(),dependencies:J})}catch(Q){console.warn(`Failed to cache template ${j}:`,Q)}}var F=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,F)}
2
+ import{Fl as G}from"./chunk-s8jd13nb.js";import{Eq as U,Iq as B}from"./chunk-wc66mcn4.js";import{at as O}from"./chunk-24w86pek.js";import{Jt as L}from"./chunk-tkyrk66a.js";import{ix as y}from"./chunk-2fw05hs2.js";import X from"fs";import Z from"path";var H=new Map,$=new Map;async function p(j){let J;for(let V=0;V<3;V++)try{let q=(await X.promises.stat(j)).mtime.getTime(),W=$.get(j);if(W&&W.mtime===q)return W.content;let I=await Bun.file(j).text(),T=(await X.promises.stat(j)).mtime.getTime();if(T!==q)continue;return $.set(j,{content:I,mtime:T}),I}catch(Q){J=Q;break}throw $.delete(j),Error(`File not found: ${j}${J?` (${J.message})`:""}`)}function m(j){$.delete(j)}function f(j){for(let z of $.keys())if(z.startsWith(j))$.delete(z)}var M=null,v=null,b=null;function r(j){b=j}async function k(j=!1){let z=b??await import("./chunk-tgrpp58r.js");if(j)return z.generateSignalsRuntimeDev();if(M===null)M=z.generateSignalsRuntime();return M}var N=null;async function R(){if(N===null){let{getRouterScript:j}=await import("./chunk-twz64kvy.js");N=j()}return N}var x={};async function d(j,z=!1){let J=j==="runtime"?await k(z):await R(),V=j==="runtime"&&z?"runtime-debug":j,Q=x[V];if(!Q||Q.content!==J)Q={content:J,hash:Bun.hash(J).toString(16).padStart(16,"0").slice(0,16)},x[V]=Q;return{content:J,hash:Q.hash,url:`/_stx/${j}.${Q.hash}.js`}}var E=500,Y=new Map;function w(j){return L(process.cwd(),"module-bundles",`${j}.js`)}function c(j){let z=Bun.hash(j).toString(16).padStart(16,"0").slice(0,16),J=Y.has(z);if(J)Y.delete(z);Y.set(z,j);while(Y.size>E)Y.delete(Y.keys().next().value);if(!J)try{let V=w(z);if(!X.existsSync(V))X.mkdirSync(Z.dirname(V),{recursive:!0}),X.writeFileSync(V,j)}catch{}return`/_stx/modules.${z}.js`}function l(j){if(!/^[0-9a-f]{16}$/.test(j))return;let z=Y.get(j);if(z!==void 0)return z;try{return X.readFileSync(w(j),"utf8")}catch{return}}function o(){$.clear(),B(),O(),M=null,v=null,N=null}function A(j){let z={debug:j.debug===!0,middleware:(j.middleware??[]).map((J)=>({name:J.name,timing:J.timing,handler:String(J.handler)})),customDirectives:(j.customDirectives??[]).map((J)=>({name:J.name,hasEndTag:J.hasEndTag===!0,rawParams:J.rawParams===!0,handler:String(J.handler)}))};return new Bun.CryptoHasher("sha1").update(JSON.stringify(z)).digest("hex")}async function s(j,z){try{if(!z.cachePath)return null;let J=Z.resolve(z.cachePath),V=Z.join(J,`${D(j)}.html`),Q=Z.join(J,`${D(j)}.meta.json`);if(!await U(V)||!await U(Q))return null;let q=await Bun.file(Q).text(),W=JSON.parse(q);if(W.cacheVersion!==z.cacheVersion)return null;if(W.engine!==G())return null;if(W.optionsSignature!==A(z))return null;if((await X.promises.stat(j)).mtime.getTime()>W.mtime)return null;for(let K of W.dependencies)if(await U(K)){if((await X.promises.stat(K)).mtime.getTime()>W.mtime)return null}else return null;return await Bun.file(V).text()}catch(J){return console.warn(`Cache error for ${j}:`,J),null}}async function n(j,z,J,V){try{if(!V.cachePath)return;let Q=Z.resolve(V.cachePath);await X.promises.mkdir(Q,{recursive:!0});let q=Z.join(Q,`${D(j)}.html`),W=Z.join(Q,`${D(j)}.meta.json`),I=await X.promises.stat(j);await Bun.write(q,z);let K={sourcePath:j,mtime:I.mtime.getTime(),dependencies:Array.from(J),cacheVersion:V.cacheVersion,engine:G(),optionsSignature:A(V),generatedAt:Date.now()};await Bun.write(W,JSON.stringify(K,null,2)),H.set(j,{output:z,mtime:I.mtime.getTime(),dependencies:J})}catch(Q){console.warn(`Failed to cache template ${j}:`,Q)}}var F=16;function D(j){return new Bun.CryptoHasher("sha1").update(j).digest("hex").substring(0,F)}
3
3
  export{H as Vj,p as Wj,m as Xj,f as Yj,r as Zj,k as _j,R as $j,d as ak,c as bk,l as ck,o as dk,s as ek,n as fk,D as gk};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Fm as a,Gm as b,Hm as c,Im as d,Jm as e,Km as f,Lm as g,Mm as h,Nm as i,Om as j,Pm as k,Qm as l,Rm as m,Sm as n,Tm as o,Um as p,Vm as q,Wm as r,Xm as s}from"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{j as usesSignalsInScript,s as unescapeHtml,q as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,o as processExpressions,n as interpolateScriptsInTemplate,l as interpolateScriptExpressions,m as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,r as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,k as clientLoopScopes,e as clearCustomFilters,p as applyFilters};
2
+ import{Fm as a,Gm as b,Hm as c,Im as d,Jm as e,Km as f,Lm as g,Mm as h,Nm as i,Om as j,Pm as k,Qm as l,Rm as m,Sm as n,Tm as o,Um as p,Vm as q,Wm as r,Xm as s}from"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{j as usesSignalsInScript,s as unescapeHtml,q as resetRejectedExpressionWarnings,g as replaceInterpolations,c as registerFilters,b as registerFilter,o as processExpressions,n as interpolateScriptsInTemplate,l as interpolateScriptExpressions,m as interpolateScriptAttributes,d as getAllFilters,f as findMustacheEnd,r as evaluateExpression,i as escapeHtmlValue,h as escapeHtml,a as defaultFilters,k as clientLoopScopes,e as clearCustomFilters,p as applyFilters};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ri as O,Si as w,Ti as Z}from"./chunk-0c2h69k2.js";import{jl as R,ql as U,wl as T}from"./chunk-esypgzzm.js";import{Mo as W,Or as C,mm as M,wq as k}from"./chunk-92ysystz.js";import{Jv as E,Kv as L}from"./chunk-cj3adc77.js";import{Ov as B}from"./chunk-gbmeh7jg.js";import $ from"path";var Y=new Map;function b(Q,z){for(let J of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(J[1])z.add(J[1]);for(let J of Q.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let H of(J[1]??"").split(",")){let K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();z=$.resolve(q.root||process.cwd(),q.storesDir||"stores")}let J=new Bun.Glob("*.ts"),H=[];try{for await(let q of J.scan({cwd:z,absolute:!0})){let y=$.basename(q,".ts");if(["index","types"].includes(y))continue;if(q.includes(".d.ts"))continue;H.push(q)}}catch{return Z(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
2
+ import{Ri as O,Si as w,Ti as Z}from"./chunk-0c2h69k2.js";import{jl as R,ql as U,wl as T}from"./chunk-de8t7sc9.js";import{Mo as W,Or as C,mm as M,wq as k}from"./chunk-wc66mcn4.js";import{Jv as E,Kv as L}from"./chunk-cj3adc77.js";import{Ov as B}from"./chunk-gbmeh7jg.js";import $ from"path";var Y=new Map;function b(Q,z){for(let J of Q.matchAll(/\b(?:const|let|var|function|class)\s+([A-Z_a-z$][\w$]*)/g))if(J[1])z.add(J[1]);for(let J of Q.matchAll(/\b(?:const|let|var)\s*\{([^{}]*)\}\s*=/g))for(let H of(J[1]??"").split(",")){let K=((H.includes(":")?H.split(":").pop():H)??"").replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(K))z.add(K)}for(let J of Q.matchAll(/\b(?:const|let|var)\s*\[([^\]]*)\]\s*=/g))for(let H of(J[1]??"").split(",")){let V=H.replace(/=.*$/s,"").replace(/^\s*\.\.\./,"").trim();if(/^[A-Z_a-z$][\w$]*$/.test(V))z.add(V)}}async function l(Q){let z;if(Q)z=$.resolve(Q);else{let q=await C();z=$.resolve(q.root||process.cwd(),q.storesDir||"stores")}let J=new Bun.Glob("*.ts"),H=[];try{for await(let q of J.scan({cwd:z,absolute:!0})){let y=$.basename(q,".ts");if(["index","types"].includes(y))continue;if(q.includes(".d.ts"))continue;H.push(q)}}catch{return Z(Y,z,"",""),null}let V=()=>[...new Set([...H,...H.flatMap((q)=>R(q))])],K=O(V()),P=w(Y,z,K);if(P!==void 0)return P||null;if(H.length===0)return Z(Y,z,K,""),null;let A=[];for(let q of H){let y=await Bun.file(q).text();A.push({file:q,hasUseStore:/useStore\s*\(/.test(y)})}A.sort((q,y)=>{if(q.hasUseStore===y.hasUseStore)return 0;return q.hasUseStore?1:-1});let N=A.map((q)=>q.file),G=[],X=new Set,F=k({loader:"ts",target:"browser",define:M()});for(let q of N)try{let y=await Bun.file(q).text(),I=$.basename(q,".ts");if(b(y,X),U(y))y=await T(y,q,{projectRoot:process.cwd(),externalizeUserModules:!1});y=W(y),y=E(y),y=L(y),y=y.replace(/^export\s+(default\s+)?/gm,""),y=F.transformSync(y),G.push(`// Store: ${I}
3
3
  ${y.trim()}`)}catch(y){console.warn(`[stx] Failed to load store ${q}:`,y)}if(G.length===0)return Z(Y,z,K,""),null;let j=G.join(`
4
4
 
5
5
  `),x=`;(function(){
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$ as om,$a as so,$b as Dp,$c as Dq,$d as Dr,A as _k,Aa as Dn,Ab as Wo,Ac as cq,Ad as cr,Ae as is,B as $k,Ba as En,Bb as Yo,Bc as dq,Bd as dr,Be as js,C as al,Ca as Fn,Cb as Zo,Cc as eq,Cd as er,Ce as ks,D as bl,Da as Gn,Db as _o,Dc as fq,Dd as fr,De as ls,E as cl,Ea as Hn,Eb as $o,Ec as gq,Ed as gr,Ee as ms,F as dl,Fa as In,Fb as ap,Fc as hq,Fd as hr,Fe as ns,G as el,Ga as Jn,Gb as bp,Gc as iq,Gd as ir,Ge as os,H as fl,Ha as Kn,Hb as cp,Hc as jq,Hd as jr,He as ps,I as gl,Ia as Xn,Ib as dp,Ic as kq,Id as kr,Ie as qs,J as hl,Ja as Yn,Jb as ep,Jc as lq,Jd as lr,Je as rs,K as Zl,Ka as Zn,Kb as fp,Kc as mq,Kd as mr,Ke as ss,L as _l,La as _n,Lb as gp,Lc as nq,Ld as nr,Le as ts,M as $l,Ma as $n,Mb as hp,Mc as oq,Md as or,Me as us,N as am,Na as ao,Nb as ip,Nc as pq,Nd as pr,Ne as vs,O as bm,Oa as fo,Ob as jp,Oc as qq,Od as qr,Oe as ws,P as cm,Pa as go,Pb as kp,Pc as rq,Pd as rr,Pe as xs,Q as dm,Qa as ho,Qb as lp,Qc as sq,Qd as sr,Qe as ys,R as em,Ra as io,Rb as mp,Rc as tq,Rd as tr,S as fm,Sa as jo,Sb as np,Sc as uq,Sd as ur,T as gm,Ta as ko,Tb as vp,Tc as vq,Td as vr,U as hm,Ua as lo,Ub as wp,Uc as wq,Ud as wr,V as im,Va as mo,Vb as xp,Vc as xq,Vd as xr,W as jm,Wa as no,Wb as yp,Wc as yq,Wd as yr,X as km,Xa as oo,Xb as zp,Xc as zq,Xd as zr,Y as lm,Ya as po,Yb as Ap,Yc as Aq,Yd as Ar,Z as mm,Za as qo,Zb as Bp,Zc as Bq,Zd as Br,_ as nm,_a as ro,_b as Cp,_c as Cq,_d as Cr,aa as pm,ab as to,ac as Ep,ad as Eq,ae as Er,ba as qm,bb as uo,bc as Fp,bd as Fq,be as Fr,ca as rm,cb as vo,cc as Gp,cd as Gq,ce as Gr,da as sm,db as wo,dc as Hp,dd as Hq,de as Hr,ea as tm,eb as xo,ec as Ip,ed as Iq,ee as Ir,fa as um,fb as yo,fc as Jp,fd as Jq,fe as Jr,ga as vm,gb as zo,gc as Kp,gd as Kq,ge as Kr,ha as wm,hb as Ao,hc as Lp,hd as Lq,he as Rr,ia as xm,ib as Bo,ic as Mp,id as Mq,ie as Sr,ja as ym,jb as Co,jc as Np,jd as Nq,je as Tr,ka as zm,kb as Do,kc as Op,kd as Oq,ke as Ur,la as Am,lb as Eo,lc as Pp,ld as Pq,le as Vr,ma as Bm,mb as Fo,mc as Qp,md as Qq,me as Wr,na as Cm,nb as Go,nc as Rp,nd as Rq,ne as Xr,o as a,oa as Dm,ob as Ho,oc as Sp,od as Sq,oe as Yr,p as Lk,pa as Em,pb as Io,pc as Tp,pd as Tq,pe as Zr,q as Mk,qa as Fm,qb as Jo,qc as Up,qd as Uq,qe as _r,r as Nk,ra as Gm,rb as Ko,rc as Vp,rd as Vq,re as $r,s as Ok,sa as Hm,sb as Lo,sc as Wp,sd as Wq,se as as,t as Pk,ta as Im,tb as Oo,tc as Xp,td as Xq,te as bs,u as Qk,ua as Jm,ub as Po,uc as Yp,ud as Yq,ue as cs,v as Rk,va as yn,vb as Qo,vc as Zp,vd as Zq,ve as ds,w as Sk,wa as zn,wb as Ro,wc as _p,wd as _q,we as es,x as Tk,xa as An,xb as To,xc as $p,xd as $q,xe as fs,y as Yk,ya as Bn,yb as Uo,yc as aq,yd as ar,ye as gs,z as Zk,za as Cn,zb as Vo,zc as bq,zd as br,ze as hs}from"./chunk-zyy4rakd.js";import{Re as op,Se as pp,Te as qp,Ue as rp,Ve as sp,We as tp,Xe as up}from"./chunk-hyhba18z.js";import{Ye as Mo,Ze as No}from"./chunk-72rwcbp6.js";import{_e as So}from"./chunk-jr52y0j1.js";import{$e as xn}from"./chunk-pbnz7259.js";import{af as bo,bf as co,cf as eo,df as Xo}from"./chunk-esr0mfyc.js";import{ef as il,ff as jl,gf as kl,hf as ll,if as ml,jf as nl,kf as ol,lf as pl,mf as ql,nf as rl,of as sl,pf as tl,qf as ul,rf as vl,sf as wl}from"./chunk-6kdrncsx.js";import{Af as Ul,Bf as Vl,Cf as Wl,Df as Xl,Ef as Yl,tf as Nl,uf as Ol,vf as Pl,wf as Ql,xf as Rl,yf as Sl,zf as Tl}from"./chunk-p5wp0ce6.js";import{Ff as Ll,Gf as Ml}from"./chunk-td08rnk3.js";import{Hf as xl,If as yl,Jf as zl,Kf as Al,Lf as Bl,Mf as Cl,Nf as Dl,Pf as El,Qf as Fl,Rf as Gl,Sf as Hl,Tf as Il,Uf as Jl,Xf as Kl}from"./chunk-z5rwnnk1.js";import{$f as jn,Yf as fn,Zf as gn,_f as hn,ag as kn,bg as wn}from"./chunk-9mm4e8hy.js";import{Ag as sn,Bg as tn,Cg as un,Dg as vn,cg as Km,dg as Lm,eg as Mm,fg as Nm,gg as Om,hg as Pm,ig as Qm,jg as Rm,kg as Sm,lg as Tm,mg as Um,ng as Vm,og as Wm,pg as Xm,qg as Ym,rg as Zm,sg as _m,tg as ln,ug as mn,vg as nn,wg as on,xg as pn,yg as qn,zg as rn}from"./chunk-dzk2n4tv.js";import{Eg as $m,Fg as an}from"./chunk-ny67c03k.js";import{Gg as Ln,Hg as Mn,Ig as Nn,Jg as On,Kg as Pn,Lg as Qn,Mg as Rn,Ng as Sn,Og as Tn,Pg as Un,Qg as Vn,Rg as Wn}from"./chunk-xsng1mtq.js";import{Sg as ui,Tg as vi,Ug as wi,Vg as xi,Wg as yi,Xg as zi}from"./chunk-73z5fzkn.js";import{Yg as Pj,Zg as Qj,_g as Rj,ch as Sj,dh as Tj,eh as Uj}from"./chunk-0pkk226n.js";import{fh as _j,gh as $j,hh as ak,ih as bk,jh as ck,kh as dk,lh as ek,mh as fk,nh as gk,oh as hk,ph as ik}from"./chunk-akwd34xt.js";import{Ah as Oj,qh as Fj,rh as Gj,sh as Hj,th as Ij,uh as Jj,wh as Kj,xh as Lj,yh as Mj,zh as Nj}from"./chunk-pcxp4r9n.js";import{Bh as Ak,Dh as Bk}from"./chunk-76w34xne.js";import{Jh as Ph,Kh as Qh,Lh as Rh,Mh as Sh,Nh as Th,Oh as Uh}from"./chunk-t1tdjjht.js";import{$h as ei,Qh as Vh,Rh as Wh,Sh as Xh,Th as Yh,Uh as Zh,Vh as _h,Wh as $h,Xh as ai,Yh as bi,Zh as ci,_h as di,ai as fi,bi as gi}from"./chunk-bjar18jd.js";import{di as hi,ei as ii,fi as ji,gi as ki}from"./chunk-27fgag95.js";import{li}from"./chunk-0we9nw1d.js";import{oi as oh}from"./chunk-85sasgtc.js";import{pi as ph}from"./chunk-bwsxym3d.js";import{qi as qh,ri as rh}from"./chunk-xq1acw1r.js";import{si as sh,ti as th,ui as uh,vi as vh,wi as wh,xi as xh}from"./chunk-hx998w7n.js";import{Ai as Ah,Bi as Bh,Ci as Ch,yi as yh,zi as zh}from"./chunk-bjcsc6wx.js";import{Di as Dh,Ei as Eh,Fi as Fh,Gi as Gh,Hi as Hh}from"./chunk-qn5srnj3.js";import{Ii as Ih,Ji as Jh,Ki as Kh,Li as Lh,Mi as Mh,Ni as Nh,Oi as Oh}from"./chunk-4m7ajama.js";import{Pi as mh,Qi as nh}from"./chunk-9sxfybkc.js";import"./chunk-0c2h69k2.js";import{$i as We,Ui as Pe,Vi as Qe,Wi as Re,Xi as Se,Yi as Te,Zi as Ue,_i as Ve,aj as Xe,bj as Ye,cj as Ze,dj as _e,ej as $e,fj as af}from"./chunk-ph5wmtr9.js";import{Aj as If,gj as sf,hj as tf,ij as uf,jj as vf,kj as wf,lj as xf,mj as yf,nj as zf,oj as Af,pj as Bf,qj as Cf,rj as Df,sj as Ef,tj as Ff,uj as Gf,zj as Hf}from"./chunk-t5ja7qkn.js";import{Hj as df,Ij as ef,Jj as ff,Kj as gf,Lj as hf,Mj as jf,Nj as kf,Oj as lf,Pj as mf,Qj as nf,Rj as of,Sj as pf,Tj as qf,Uj as rf}from"./chunk-9e8t0twa.js";import{$j as Pf,Vj as Jf,Wj as Kf,Xj as Lf,Yj as Mf,Zj as Nf,_j as Of,ak as Qf,bk as Rf,ck as Sf,dk as Tf,ek as Uf,fk as Vf,gk as Wf}from"./chunk-7kpr3fcp.js";import{Ak as Lr,Bk as Mr,Ck as Nr,Dk as Or,Ek as Pr,Fk as Qr}from"./chunk-60q6jwym.js";import{Gk as Uk,Hk as Vk,Ik as Wk,Jk as Xk,Kk as bn,Lk as cn,Mk as dn,Nk as en}from"./chunk-m0ee1f3f.js";import"./chunk-anydpa34.js";import"./chunk-esypgzzm.js";import{Dl as gc,yl as ec,zl as fc}from"./chunk-mm9v8t7p.js";import{Fl as bc}from"./chunk-s8jd13nb.js";import{$l as lb,$m as bd,$n as ue,$o as ag,$p as lh,$q as oj,Am as tc,An as Fd,Ap as Mg,Aq as Gi,Ar as ok,Bm as uc,Bn as Gd,Bp as Ng,Bq as Hi,Br as pk,Cm as vc,Cn as Hd,Cp as Og,Cq as Ii,Cr as qk,Dm as wc,Dn as Id,Dp as Pg,Dq as Ji,Dr as rk,Em as xc,En as Jd,Ep as Qg,Eq as Ki,Er as sk,Fm as yc,Fn as Kd,Fp as Rg,Fq as Li,Fr as tk,Gl as xa,Gm as zc,Gn as Ld,Gp as Sg,Gq as Mi,Gr as uk,Hl as ya,Hm as Ac,Hn as Md,Hp as Tg,Hq as Ni,Hr as vk,Il as za,Im as Bc,In as Nd,Ip as Ug,Iq as Oi,Ir as wk,Jl as Aa,Jm as Cc,Jn as Od,Jp as Vg,Jq as Pi,Jr as xk,Kl as Ba,Km as Dc,Kn as Pd,Kp as Wg,Kq as Qi,Kr as yk,Ll as Ca,Lm as Ec,Ln as Qd,Lp as Xg,Lq as Ri,Lr as zk,Ml as Da,Mm as Fc,Mn as Rd,Mp as Yg,Mq as $i,Mr as Ck,Nl as Ea,Nm as Gc,Nn as Sd,Np as Zg,Nq as aj,Nr as Dk,Ol as Fa,Om as Hc,On as Td,Oo as Yf,Op as _g,Oq as bj,Or as Ek,Pl as Ga,Pm as Ic,Pn as Ud,Pp as $g,Pq as cj,Pr as Fk,Ql as Ha,Qm as Jc,Qn as Vd,Qp as ah,Qq as dj,Qr as Gk,Rl as Ia,Rm as Kc,Rn as Wd,Rp as bh,Rq as ej,Rr as Hk,Sl as Ja,Sm as Lc,Sn as Xd,Sp as ch,Sq as fj,Sr as Ik,Tl as Ka,Tm as Mc,Tn as Yd,Tp as dh,Tq as gj,Tr as Jk,Ul as La,Um as Nc,Un as Zd,Up as eh,Uq as hj,Ur as Kk,Vl as Ma,Vm as Oc,Vn as _d,Vp as fh,Vq as ij,Wl as Na,Wm as Pc,Wn as $d,Wo as Zf,Wp as gh,Wq as jj,Xl as Oa,Xm as Qc,Xn as ae,Xp as hh,Xq as kj,Yl as ib,Ym as _c,Yn as re,Yo as _f,Yp as ih,Yq as lj,Zl as jb,Zm as $c,Zn as se,Zp as jh,Zq as mj,_l as kb,_m as ad,_n as te,_o as $f,_p as kh,_q as nj,am as mb,an as cd,ao as ve,ap as bg,aq as mi,ar as pj,bm as nb,bn as dd,bo as we,bp as cg,bq as ni,br as qj,cn as ed,co as xe,cp as dg,cr as rj,do as ye,dp as eg,dr as sj,em as Kb,en as fd,eo as ze,ep as qg,eq as oi,er as tj,fm as Lb,fn as gd,fo as Ae,fp as rg,fr as uj,gm as Mb,gn as hd,go as Be,gp as sg,gr as vj,hm as Nb,hn as id,ho as Ce,hp as tg,hr as wj,im as Ob,in as jd,io as De,ip as ug,ir as xj,jm as Pb,jn as kd,jo as Ee,jp as vg,jr as yj,km as Qb,kn as ld,kp as wg,kr as zj,lm as Ub,ln as md,lo as Ie,lp as xg,lr as Aj,mm as Vb,mn as nd,mo as Je,mp as yg,mr as Bj,nm as Wb,nn as od,no as Ke,np as zg,nr as Cj,om as hc,on as pd,oo as Le,op as Ag,or as Dj,pm as ic,pn as qd,po as Me,pp as Bg,pq as pi,pr as Ej,qm as jc,qn as vd,qo as Ne,qp as Cg,qq as qi,qr as Vj,rm as kc,rn as wd,ro as Oe,rp as Dg,rq as ri,rr as Wj,sm as lc,sn as xd,sp as Eg,sq as si,sr as Xj,tm as mc,tn as yd,tp as Fg,tq as ti,tr as Yj,um as nc,un as zd,up as Gg,uq as Ai,ur as Zj,vm as oc,vn as Ad,vo as bf,vp as Hg,vq as Bi,vr as jk,wm as pc,wn as Bd,wo as cf,wp as Ig,wq as Ci,wr as kk,xm as qc,xn as Cd,xp as Jg,xq as Di,xr as lk,ym as rc,yn as Dd,yo as Xf,yp as Kg,yq as Ei,yr as mk,zm as sc,zn as Ed,zp as Lg,zq as Fi,zr as nk}from"./chunk-92ysystz.js";import{$r as S,As as ta,Bs as ua,Cs as va,Ds as wa,Vr as M,Wr as N,Xr as O,Yr as P,Zr as Q,_r as R,as as T,bs as U,cs as V,ds as W,es as X,fs as Y,gs as Z,hs as _,is as $,js as aa,ks as ba,ls as ca,ms as da,ns as ea,os as fa,ps as ia,qs as ja,rs as ka,ss as la,ts as ma,us as na,vs as oa,ws as pa,xs as qa,ys as ra,zs as sa}from"./chunk-aq1xq0r4.js";import{Es as ga,Fs as ha}from"./chunk-zcz9rs6p.js";import{Gs as Rb,Hs as Sb,Is as Tb}from"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import{Ps as Si,Qs as Ti,Rs as Ui,Ss as Vi,Ts as Wi,Us as Xi,Vs as Yi,Ws as Zi,Xs as _i}from"./chunk-0btmm4m2.js";import{Ct as Xc,Dt as Yc,Et as Zc,nt as Rc,ot as Sc,pt as Tc,qt as Uc,rt as Vc,tt as Wc}from"./chunk-x99xve3y.js";import{Ft as Xb,Gt as Yb,Ht as Zb,It as _b,Jt as $b,Kt as ac}from"./chunk-tkyrk66a.js";import{Rt as Fe,Tt as Ge,Wt as He}from"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import{$t as cc,au as dc}from"./chunk-1te8k8gp.js";import{eu as fg,fu as gg,gu as hg,hu as ig,iu as jg,ju as kg,ku as lg,mu as mg,nu as ng,ou as og,pu as pg}from"./chunk-zpcnbdhn.js";import{Du as be,Eu as ce,Fu as de,Gu as ee,Hu as fe,Iu as ge,Ju as he,Ku as ie,Lu as je,Mu as ke,Nu as le,Ou as me,Pu as ne,Qu as oe,Ru as pe,Su as qe,qu as rd,ru as sd,su as td,tu as ud}from"./chunk-rz9f3zqz.js";import{$u as m,Tu as b,Uu as c,Vu as d,Wu as e,Xu as f,Yu as g,Zu as h,_u as i,av as n,bv as o,cv as p,dv as q,ev as r,fv as s,gv as t,hv as u,iv as v,jv as w,kv as x,lv as y,mv as z,nv as A,ov as B,pv as C,qv as D,rv as E,sv as F,tv as G,uv as H,vv as I,wv as J,xv as K,yv as L}from"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import{$v as Bb,Ov as ob,Pv as pb,Qv as qb,Rv as rb,Sv as sb,Tv as tb,Uv as ub,Vv as vb,Wv as wb,Xv as xb,Yv as yb,Zv as zb,_v as Ab,aw as Cb,bw as Db,cw as Eb,dw as Fb,ew as Gb,fw as Hb,gw as Ib,hw as Jb}from"./chunk-gbmeh7jg.js";import{Bw as Ua,Cw as Va,Dw as Wa,Ew as Xa,Fw as Ya,Gw as Za,Hw as _a,Iw as $a,Jw as ab,Kw as bb,Lw as cb,Mw as db,Nw as eb,Ow as fb,Pw as gb,Rw as hb,lw as Pa,mw as Qa,pw as Ra,uw as Sa,vw as Ta}from"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import{bx as j,cx as k,dx as l}from"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{sl as writeNetlifyConfig,mn as writeManifest,Xl as writeImageManifest,Ep as wrapComponentForHMR,ls as withDefaults,zk as webComponentDirectiveHandler,tq as watermark,vr as watchViews,fm as watchMultiple,gm as watchEffect,em as watch,Me as warmImagePlaceholders,tm as waitForStore,X as waitForLocale,pp as virtualPathFor,mk as videoDirective,G as validators,ps as validated,Ce as validateValueEnhanced,pi as validateTemplate,$m as validateRouteRules,yq as validateParams,De as validateFormEnhanced,kr as validateFile,ye as validateFields,xe as validateField,ri as validateDirective,Xd as validateCspDirectives,Hk as validateConfig,zn as validateComponentScripts,Xn as validateComponentProps,lh as validateClientScript,ki as v,Hc as usesSignalsInScript,ub as usesReactiveRuntime,Fi as userComponentFileExists,Sh as useVirtualList,je as useTitle,sm as useStoreOrThrow,Wp as useStore,$k as useStorage,Af as useSlots,bl as useSessionStorage,cc as useServerRuntimeConfig,Yf as useServerData,ge as useSeoMeta,dc as useRuntimeConfig,um as useRouteParams,wm as useRouteParamOrThrow,vm as useRouteParam,je as usePageTitle,rf as useOptimistic,Ff as useModel,ym as useMiddlewareValue,xm as useMiddlewareState,al as useLocalStorage,xp as useLoadingIndicator,ee as useHead,hi as useForm,Cf as useAttrs,mr as uploadFiles,lr as uploadFile,pm as updateInstance,pf as untrack,Vi as unregisterDirective,qm as unmountInstance,Qc as unescapeHtml,tp as typecheckStxFiles,Di as transpileTypeScript,_r as translate,Ba as transitionDirective,lc as transformAutoImports,Rn as toUsers,Qn as toUser,cq as thumbnail,dr as thumbHashToRGBA,er as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Jf as templateCache,nd as syncRecordedResponse,Bp as stxClientHelpers,kg as structuredDataDirective,bs as stripLocalePrefix,Xm as stripDocumentWrapper,Sb as stripCommentsAndLiterals,Co as stringToStream,Ld as strictCspPreset,Xe as streamingSuspenseDirective,$e as streamToResponse,Ve as streamTemplateSimple,Pe as streamTemplate,Tk as stopHmrServer,Nn as stopBroadcasting,_b as stateDirName,$b as stateDir,df as state,fh as startsDocument,Xo as startProductionServer,So as startInteractive,Mn as startBroadcasting,ds as stampLocaleLayoutGroup,Ia as staggerDirective,wq as srcsetUrls,Ja as springDirective,ud as splitByPipe,Tm as spaNavVaryHeaders,qp as sourcePathFor,Dq as smartBatchSign,Hi as slotContentHasExpressions,Bq as signUrl,Bi as shouldTranspileTypeScript,Qk as shouldReloadOnChange,Gq as shouldRefreshSignature,Rk as shouldIgnoreFile,Kh as shouldCacheComponent,gq as sharpen,ss as shape,Zb as setStateDir,Cm as setRouteParams,Dm as setMiddlewareState,Zk as setKeptScope,Le as setImagePlaceholder,uf as setGlobalProvide,b as setErrorLocale,Zl as setCurrentInstance,ak as setCachedVideoResult,Rj as setCachedImageResult,Lj as setCached,vs as serveStxFile,xs as serveMultipleStxFiles,Lk as serveMarkdownFile,gp as serveFile,ys as serveApp,fp as serve,Hp as serializeState,on as serializeSetCookie,iq as sepia,he as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Ei as scopeOnRootElement,qk as scopeHTML,pk as scopeCSS,ng as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,mq as saturation,zq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,Gb as runtimeEventRegexLiteral,Eb as runtimeDirectiveNamesLiteral,yg as runPreProcessingMiddleware,zg as runPostProcessingMiddleware,rn as runPageAction,kf as runMountCallbacks,gb as runMiddleware,nm as runHooks,Tr as runDoctor,lf as runDestroyCallbacks,Cg as runComposers,nq as rotate,li as rewriteImagesWithSiblings,od as responseBindings,Li as resolveTemplatePath,ha as resolveStxTargets,Dk as resolveStxDirectories,Zr as resolveI18n,aq as resize,qg as resetUnscopedSignalWarnings,Oc as resetRejectedExpressionWarnings,sc as resetPlaceholders,de as resetHead,Gp as resetHMRHandler,o as resetErrorConfig,ns as required,cg as reportDeferredLoopWarnings,wc as replacePlaceholders,Ec as replaceInterpolations,tr as renderView,jk as renderVideoComponent,ic as renderVendorStyleTags,Cr as renderToString,Dr as renderToStream,Er as renderToDOM,cr as renderThumbhashToCanvas,Qr as renderTemplateString,Or as renderTemplate,Pr as renderString,Se as renderStreamingPage,wi as renderSlot,Ah as renderSSRSuspense,Oq as renderProtectedVideo,Nq as renderProtectedImg,Aq as renderMediaUpload,Nr as renderMarkdownView,dn as renderLayoutTypes,Vj as renderImgComponent,Nl as renderImageComponent,le as renderHtmlAttrs,ke as renderHead,wr as renderEmail,Ji as renderComponentWithSlot,me as renderBodyAttrs,Rp as render,Nd as relaxedCspPreset,we as registerValidationRule,Ze as registerStreamingDirectives,Yp as registerStoresClient,Am as registerStore,Rf as registerServeModuleBundle,lg as registerSeoDirectives,_a as registerMiddleware,Ac as registerFilters,zc as registerFilter,d as registerErrorMessages,Be as registerEnhancedValidationRule,Si as registerDirective,Wd as registerCspDirectives,_n as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,mc as referencesName,bm as ref,Ko as redirect,jd as recordResponseStatus,kd as recordResponseHeader,ac as rebaseOntoStateDir,ld as readResponseStatus,md as readResponseHeaders,Jk as readMarkdownFile,Kf as readFileCached,cm as reactive,rq as quality,Lq as pruneSignatureCache,Oj as pruneCache,sf as provide,Mr as protectCodeBlocks,ms as prop,Fg as processVueTemplate,Qh as processVirtualListDirectives,Uh as processVirtualGridDirectives,ik as processVideo,ze as processValidateDirective,ea as processTranslateDirective,uh as processTransitionDirectives,xh as processTransitionAttributes,pe as processTitleDirective,bd as processTemplateBindings,qh as processTeleportDirectives,yh as processSuspenseDirectives,gg as processStructuredData,Te as processStreamDirectives,pd as processStatusDirective,fi as processStaticDirectives,wg as processStackReplacements,vg as processStackPushDirectives,xi as processSlots,Vm as processShell,Oe as processServerBindings,hg as processSeoDirective,_e as processSectionDirectives,Vc as processScopedStyles,$c as processReactiveBindings,Pq as processProtectedMedia,_h as processPartialHydrationDirectives,kh as processOnceDirective,xg as processMiddleware,fg as processMetaDirectives,qe as processMetaDirective,Kk as processMarkdownFileDirectives,Qi as processMarkdownDirectives,dg as processLoops,Ih as processKeepAliveDirectives,jh as processJsonDirective,Th as processInfiniteListDirectives,ug as processIncludes,Xj as processImgComponents,Pl as processImageComponents,Cl as processImage,oe as processHeadDirective,se as processForms,ue as processFormInputDirectives,Mc as processExpressions,Pb as processEventDirectives,ve as processErrorDirective,Gg as processDynamicComponents,mi as processDirectives,_i as processDirectiveAttributes,ph as processDeferDirectives,$d as processCustomDirectives,Td as processCspDirectives,ts as processComponentProps,rc as processClientScript,te as processBasicFormDirectives,Dh as processAsyncDirectives,ae as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,He as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,wp as preloadIslandHandlers,Ne as preloadIconCollection,In as poolStrings,Bk as pluginManager,Je as placeholdersWarmed,th as performLeave,sh as performEnter,mf as pendingLifecycleCounts,qf as peek,rg as partialsCache,kk as parseVideoDirectiveOptions,_p as parseUrl,fr as parseThumbhashString,Ad as parseSwitchBlock,ui as parseSlots,vi as parseSlotElement,Fd as parseScriptDeclarations,xk as parseSFCComponent,Qq as parseProtectedArgs,bg as parseLoopBinding,Wj as parseImgComponent,mj as parseImageUrl,Ol as parseImageComponent,pn as parseFormBody,Cd as parseExpressionWithFilters,$n as parseDefaults,Ho as parseCookies,Mm as parseContainerSelector,xd as parseConditionalBlock,Dd as parseArguments,Ma as parseAnimationShorthand,os as optional,Jn as optimizeTemplate,Ul as optimizeImage,Vl as optimizeDirectory,qs as oneOf,sg as onceStore,km as onUpdated,_c as onUpdate,mm as onUnmounted,Hm as onServer,im as onMounted,hf as onMount,ei as onHydrated,yf as onErrorCaptured,jf as onDestroy,Oh as onDeactivated,Gm as onClient,jm as onBeforeUpdate,lm as onBeforeUnmount,hm as onBeforeMount,Nh as onActivated,_q as observeElement,Lo as notFound,Lg as normalizeCriticalHeadOrder,xf as nextTick,co as negotiateEncoding,Ua as navigateTo,om as mountInstance,Ea as motionDirective,Md as moderateCspPreset,Hn as minifyHtml,jg as metaDirective,Zg as metaDedupKey,$p as mergeParams,$g as mergeHtmlAttrs,fe as mergeHeadConfigs,Sc as mergeCssConfig,Qd as mergeCspDirectives,Ra as matchRoute,Ri as markdownDirectiveHandler,Ik as markdownCache,ga as looksLikeGlob,as as localizePath,U as loadTranslationLazy,_ as loadTranslation,Ek as loadStxConfig,db as loadMiddlewareFromDirectory,nn as loadManifest,Wq as loadElement,On as loadChannels,Lb as listensPassively,hs as lintStxStrict,Yq as lazyLoadAll,Xq as lazyLoad,Ha as keyframeDirective,gl as keptState,Ar as jsxs,Br as jsxDEV,zr as jsx,Jo as jsonResponse,Ye as islandDirective,l as isTest,Zm as isSpaNavigation,Rm as isSpaNavRequest,Eq as isSignatureValid,nf as isSignal,Al as isSharpAvailable,vo as isServerEnvironment,Em as isServer,yb as isRuntimeOwnedColonAttr,Hb as isRuntimeEventName,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Tq as isNativeLazySupported,Lr as isMarkdownPath,Q as isLoading,R as isLoaded,Ai as isJavaScriptScript,Uq as isIntersectionObserverSupported,Il as isImageFile,Bl as isImageBackendAvailable,aa as isICUFormat,di as isHydrated,Gi as isHydrateTrigger,hd as isHttpStatus,uo as isEdgeEnvironment,is as isDirectiveKind,k as isDevelopment,of as isDerived,Pk as isCssOnlyChange,bo as isCompressible,Fm as isClient,Ym as isChromeInstanceScript,Fh as isAsyncComponent,qn as isActionableMethod,jq as invert,Mf as invalidateFileCacheByDir,Lf as invalidateFileCache,Lc as interpolateScriptsInTemplate,Jc as interpolateScriptExpressions,Kc as interpolateScriptAttributes,x as inlineError,Yr as injectThemeBootstrap,ig as injectSeoTags,Vr as injectSeo,Xf as injectRouterScript,Ok as injectHotReload,kb as injectHeatmap,Zc as injectCss,Rd as injectCspMetaTag,hh as injectConfigHeadTags,Kg as injectColorModeBootScript,bh as injectCloakStyle,Rg as injectBuildId,kc as injectBrowserCoreAutoImports,dd as injectAnalytics,tf as inject,zm as initStoreRegistry,vl as initNetlify,yp as initLoadingIndicator,Vq as initLazyLoading,Ro as initFile,br as initBlurUp,hr as initAllBlurUp,Zj as imgDirective,Sl as imageDirective,un as hydrateTemplateStream,tn as hydrateTemplate,vp as hydrateIslands,ai as hydrateIsland,vn as hydrateFragment,bi as hydrateByStrategy,ci as hydrateAll,Op as hydrate,ep as htmlResponse,dh as hoistLeadingHeadTags,Mg as hoistColorModeBootScript,lb as heatmapDirective,Hj as hashString,Wf as hashFilePath,Fj as hashFile,Gj as hashBuffer,Eg as hasVueTemplateSyntax,ag as hasVariables,Tp as hasStore,xc as hasPlaceholders,tl as hasNetlifyConfig,ab as hasMiddleware,Qb as hasEventDirectives,gh as hasDocumentShell,si as hasDirectives,ma as hasDOMSupport,Ll as handleImageRequest,zf as handleError,Ir as h,Hl as groupVariantsByFormat,hq as grayscale,Zo as gitHash,Bn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,ol as getTotalSize,Fq as getTimeUntilExpiry,mh as getStoreScript,Up as getStoreNames,Sp as getStore,el as getStorageSize,dl as getStorageKeys,Mi as getSourceLineInfo,Ci as getSharedTranspiler,Sf as getServeModuleBundle,Qf as getServeClientAsset,la as getScreenReaderOnlyStyle,rk as getScopeAttribute,cf as getRouteParams,Vb as getPublicEnvDefine,Wb as getPublicEnv,qi as getPositionInfo,uc as getPlaceholderRegistry,Ej as getPlaceholderCacheStats,ce as getPageMeta,Hd as getNonce,Jl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,Ie as getImagePlaceholder,Dl as getImageMetadata,Fe as getImageDelivery,Np as getHydrationRuntime,Bm as getHydratedStoreState,Sk as getHmrServer,be as getHead,Fp as getHMRHandler,qj as getFormatExtension,Jj as getFileMtime,Gl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Ui as getDirectives,Ti as getDirective,_l as getCurrentInstance,Wc as getCssServeAsset,Pd as getCspPreset,Yd as getCspHeaderName,Pi as getComponentCacheStats,$j as getCachedVideoResult,Jq as getCachedSignature,Of as getCachedSignalsRuntime,Pf as getCachedRouterScript,Cj as getCachedPlaceholder,Qj as getCachedImageResult,Kj as getCached,Nj as getCacheStats,Pg as getBuildId,Ln as getBroadcastServer,pj as getBestVariant,Bc as getAllFilters,dj as generateWidthSrcset,Rh as generateVirtualListCSS,or as generateVideoPreview,Ee as generateValidationScript,pr as generateUploadRuntime,Cn as generateTreeShakenBundle,wh as generateTransitionRuntime,vh as generateTransitionCSS,dk as generateThumbnails,vj as generateThumbhashPlaceholder,mo as generateTemplatesDocs,Ch as generateSuspenseRuntime,Bh as generateSuspenseCSS,Ip as generateStateScript,nj as generateSrcsetData,Uj as generateSrcset,El as generateSrcSet,ek as generateSpriteSheet,xr as generateSpaShell,oj as generateSourceTags,jj as generateSizesFromBreakpoints,ij as generateSizesAttribute,Fl as generateSizes,mg as generateSitemapIndex,Wr as generateSitemap,Sq as generateSimpleMediaPicker,Mq as generateSignatureRuntime,If as generateSignalsRuntimeDev,Hf as generateSignalsRuntime,qc as generateServerDataBridge,ok as generateScopeId,yk as generateSFCWebComponent,Nb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,og as generateRobotsTxt,Xr as generateRobots,Tj as generateResponsiveVariants,uk as generateReactiveWebComponentTS,tk as generateReactiveWebComponent,wk as generateReactiveRuntime,vk as generateReactiveMixin,ck as generatePoster,Bj as generatePlaceholderStyle,Aj as generatePlaceholderCSS,uj as generatePlaceholder,$h as generatePartialHydrationCSS,Vg as generateOfflineWorker,Gd as generateNonce,pl as generateNetlifyToml,rr as generateMinifiedMediaRuntime,qr as generateMediaRuntime,Rq as generateMediaManagerEmbed,ln as generateManifest,Ap as generateLoadingIndicatorHtml,ar as generateLazyLoadRuntime,en as generateLayoutTypes,xj as generateLQIP,Mh as generateKeepAliveRuntime,Lh as generateKeepAliveCSS,gi as generateIslandManifest,nr as generateImagePreview,Wl as generateImageManifest,Mp as generateHydrationScript,af as generateHydrationRuntime,Pp as generateHydrationCSS,Vh as generateHydrationBootstrap,Nk as generateHotReloadScript,jb as generateHeatmapScript,Dp as generateHMRClientScript,fk as generateHLSManifest,Jp as generateEventBindings,hj as generateDprSrcsetWithVariableQuality,gj as generateDprSrcset,eh as generateDocumentShell,ro as generateDocs,no as generateDirectivesDocs,Zi as generateDirectiveRuntime,pg as generateDefaultRobotsTxt,gk as generateDASHManifest,Yc as generateCss,Kd as generateCspMetaTag,Jd as generateCspHeader,Ef as generateCompositionRuntime,lo as generateComponentsDocs,Wh as generateComponentManifest,jo as generateComponentDoc,zj as generateColorPlaceholder,Jg as generateColorModeBootScript,rm as generateClientRuntime,Ij as generateCacheKey,oc as generateBrowserAutoImportDestructuring,ir as generateBlurUpRuntime,jr as generateBlurUpCSS,ad as generateBindingsRuntime,ej as generateAutoWidthSrcset,nc as generateAutoImportDestructuring,Hh as generateAsyncComponentRuntime,Gh as generateAsyncComponentCSS,fc as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,cd as generateAnalyticsScript,up as formatTypecheckDiagnostics,np as formatTypeErrors,Oo as formatStxContent,nl as formatSize,Ta as formatRoutes,Po as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,Ur as formatDoctorReport,oo as formatDocsAsMarkdown,qo as formatDocsAsJson,po as formatDocsAsHtml,qq as format,hl as forgetKeptState,Gn as foldConstants,_k as flushKeptState,pq as flipVertical,oq as flipHorizontal,fn as fingerprint,sp as findStxModuleDeclarations,rp as findRuntimeTypeDeclarations,Sr as findPantryPackage,Dc as findMustacheEnd,wd as findMatchingEndTag,sd as findMatchingDelimiter,Rb as findInterpolationEnd,yd as findIfBlocks,Bd as findExpressions,Sa as findErrorPage,Tc as findDuplicateScopedStyleRanges,zd as findDirectiveBlocks,Dn as findDeadCode,Dn as findDeadBranches,Nm as findContainerRegion,ko as findComponentFiles,ws as findCommonDir,ml as filterRequiredFiles,Ki as fileExists,Zf as extractVariables,oi as extractTemplateExpressions,Ue as extractStreamBoundaries,Kp as extractState,yi as extractSlotContent,$f as extractScriptFromTemplate,ni as extractScriptBlocks,vc as extractPlaceholders,vd as extractParenthesizedExpression,id as extractPageResponseStatus,hb as extractLayoutMetadata,yj as extractDominantColor,Ed as extractDirectiveParams,ti as extractDirectiveNames,_m as extractContainerContent,ho as extractComponentProps,Xh as extractComponentName,io as extractComponentDescription,Xc as extractClassNames,pc as extractBridgeData,Yh as extractBoundProps,td as extractBalancedExpression,hc as extractAndStripCssImports,sk as extractAndScopeStyles,Ob as extractAndProcessEvents,Wk as externalizeSharedAssets,Xk as externalizeRepeatedAssets,Vk as externalizeHtml,Pc as evaluateExpression,Fn as evaluateConstant,qd as evaluateAuthExpression,Gc as escapeHtmlValue,Fc as escapeHtml,C as errorRecovery,E as errorLogger,rh as ensureTeleportTargets,ih as ensureDocumentShell,Ae as enhancedValidationRules,fo as enableDevTools,En as eliminateDeadCode,ff as effect,xq as dprUrls,so as docsCommand,ec as discoverServerApi,cn as discoverLayoutNames,$q as disconnectObserver,go as disableDevTools,F as devHelpers,Um as detectShell,to as detectRuntime,ql as detectProjectConfig,rj as detectFormat,yn as detectBuildMode,ef as derived,ul as deploy,Gk as defineStxConfig,Xp as defineStore,Bf as defineSlots,gs as defineSiteConfig,ks as definePropsWithValidation,js as defineProps,Ak as definePlugin,ie as definePageMeta,Wa as defineMiddleware,ii as defineForm,wf as defineExpose,vf as defineEmits,Wi as defineDirective,Kr as defineCustomElement,Wo as defineConfig,Xi as defineClientDirective,Eh as defineAsyncComponent,Yo as defineApiHandler,sr as defaultMediaConfig,Yl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,re as defaultFormClasses,yc as defaultFilters,_d as defaultCspConfig,Ck as defaultConfig,us as default,Rc as deepMergeThemes,Uc as dedupeScopedStyles,Qm as decodeTitleEntities,wj as decodeThumbhash,eg as declareBareLoopHead,Vd as cspNonceDirective,Ud as cspDirective,gr as crossfadeTransition,bq as crop,Ph as createVirtualList,lk as createVideoDirective,Fo as createVercelHandler,kp as createTypeChecker,fa as createTranslateFilter,Bo as createTextEncoderStream,Jr as createStxApp,Ao as createStreamingResponse,We as createStreamRenderer,Vp as createStore,Za as createStorageManager,Xa as createServerCookieManager,gc as createServerApi,am as createScope,zh as createSSRSuspense,bf as createRouter,an as createRouteRuleResolver,eb as createRouteLocation,ip as createRoute,bm as createRef,cm as createReactive,Df as createProvideContext,$o as createProject,Vo as createProductionBuild,tc as createPlaceholder,Kn as createOptimizedBuild,Go as createNetlifyHandler,il as createNetlifyClient,fb as createMiddlewareContext,hp as createMiddleware,Zq as createLazyObserver,Jh as createKeepAliveCache,xo as createKVNamespace,Zh as createIslandRegistry,Yj as createImgDirective,Tl as createImagePlugin,Ml as createImageHandler,Rl as createImageDirective,nb as createHeatmapAggregator,ll as createFileManifest,wo as createEnvAccessor,z as createEnhancedError,zo as createEdgeHandler,yo as createEdgeCache,Ni as createDetailedErrorMessage,Eo as createDenoHandler,rl as createDefaultNetlifyConfig,Zd as createCspHeaders,Io as createCookie,dm as createComputed,$l as createComponentInstance,Do as createCloudflareHandler,Ya as createClientCookieManager,Yi as createBuiltinDirectives,Jr as createApp,Ka as createAnimationTimeline,eq as cover,_f as convertToCommonJS,lq as contrast,dq as contain,y as consoleError,m as configureErrorHandling,Fk as config,dm as computed,eo as compressResponse,Bg as composerPattern,Ag as composer,Wm as composeShellWithPage,Zn as componentDirective,Ii as componentClientSignalNames,kn as compileTemplate,a as collectRepeatedFlag,kl as collectDeployFiles,ch as cloakStyleFragment,Ic as clientLoopScopes,bk as clearVideoCache,N as clearTranslationCache,nh as clearStoreCache,cl as clearStorage,Kq as clearSignatureCache,Gf as clearServerData,Dj as clearPlaceholderCache,tg as clearOnceStore,Id as clearNonce,bb as clearMiddleware,Ke as clearImagePlaceholders,Ge as clearImageDeliveryCatalog,Ql as clearImageCache,e as clearErrorMessages,Tf as clearDevCaches,Cc as clearCustomFilters,Dg as clearComposers,oh as clearComposableCache,Oi as clearComponentCache,Mj as clearCache,Ib as clearBlankCache,zp as cleanupLoadingIndicator,Km as classifyScript,Lm as classifyAllScripts,lp as checkTemplateFile,mp as checkTemplate,Uf as checkCache,Hq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Un as channel,No as captureScreenshots,Mo as captureScreenshot,Z as cancelPendingLoads,jl as calculateSha1,fj as calculateOptimalWidths,Yk as cachedQuery,Vf as cacheTemplate,bc as cacheEngineFingerprint,nk as buildWebComponents,op as buildVirtualSource,ur as buildViews,Zp as buildUrl,Qe as buildSuspenseResolveScript,fs as buildStaticSite,qb as buildRuntimeGlobalsDestructure,gn as buildRuntimeAsset,hn as buildRouterAsset,es as buildLangPickerScript,lj as buildImageUrl,Sg as buildIdFragment,_g as buildHtmlAttrs,wn as buildForProduction,ao as buildComponentLibrary,Iq as buildAuthParams,xn as buildApp,cs as buildAlternateLinks,Uo as build,Sn as broadcastPrivate,Tn as broadcastPresence,Pn as broadcast,kq as brightness,Tb as bracketDepths,fq as blur,Jb as blankInertHtmlRegions,Cq as batchSignUrls,gf as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,sq as auto,ja as attributeValue,jn as assetTags,Mb as asInvocableStatement,rs as arrayOf,$r as applyTranslations,Sj as applyTransformations,zi as applySlots,Yn as applyPropDefaults,vq as applyPreset,ah as applyHtmlAttrs,ne as applyHead,Nc as applyFilters,Sm as appendVary,Od as apiCspPreset,Da as animationGroupDirective,hk as analyzeVideo,An as analyzeUsage,Im as analyzeTemplate,Jm as analyzeProject,An as analyzeDirectiveUsage,ed as analyticsDirective,cp as addStore,bp as addPage,Sd as addNonceToInlineContent,dp as addLayout,ap as addComponent,sn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Nf as __setSignalsGeneratorsForTest,Qg as __setBuildIdForTest,_j as VideoProcessorCache,ji as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,rd as Tokenizer,jp as TemplateTypeChecker,Qo as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Fr as Show,Re as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,jc as STX_AUTO_IMPORTS,Yb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Om as SPA_NAV_HEADER,Kb as SCROLL_BLOCKING_EVENTS,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Fb as RUNTIME_EVENT_NAMES,Db as RUNTIME_DIRECTIVE_NAMES,fd as RESPONSE_STATUS_KEY,gd as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,To as ProductionBuild,Hr as Portal,_o as PROJECT_TEMPLATES,uq as PRESETS,Tg as OFFLINE_WORKER_PATH,Ug as OFFLINE_REGISTER_SCRIPT,sb as NON_CLIENT_PRIMITIVES,Qp as MemorySessionStore,cj as MIME_TYPES,$i as MEDIA_DEFAULT_WIDTHS,bj as MEDIA_DEFAULT_FORMATS,bn as LAYOUT_TYPES_FILE,fl as KEPT_STATE_PREFIX,Pj as ImageProcessorCache,Kl as ImageProcessingError,Lp as HydrationRuntime,Mk as HotReloadServer,mb as HeatmapAggregator,Yg as HTML_CLASS_MARKER,Xg as HTML_ATTRS_MARKER,yr as Fragment,Gr as For,Pm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Uk as EXTERNALIZED_ASSET_DIR,wl as DeployError,xl as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Xb as DEFAULT_STATE_DIR,zl as DEFAULT_QUALITY,sj as DEFAULT_PLACEHOLDER_OPTIONS,yl as DEFAULT_FORMATS,aj as DEFAULT_DPR_VALUES,Cp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,kj as COMMON_SIZES,Hg as COLOR_MODE_BOOT_MARKER,Ig as COLOR_MODE_BOOT_GLOBAL,Wg as CLOAK_STYLE,Wn as BroadcastServer,Vn as Broadcast,Ng as BUILD_ID_META,Og as BUILD_ID_HEADER,Ub as BROWSER_CORE_IMPORTS,tj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Rr as $path};
2
+ import{$ as om,$a as so,$b as Dp,$c as Dq,$d as Dr,A as _k,Aa as Dn,Ab as Wo,Ac as cq,Ad as cr,Ae as is,B as $k,Ba as En,Bb as Yo,Bc as dq,Bd as dr,Be as js,C as al,Ca as Fn,Cb as Zo,Cc as eq,Cd as er,Ce as ks,D as bl,Da as Gn,Db as _o,Dc as fq,Dd as fr,De as ls,E as cl,Ea as Hn,Eb as $o,Ec as gq,Ed as gr,Ee as ms,F as dl,Fa as In,Fb as ap,Fc as hq,Fd as hr,Fe as ns,G as el,Ga as Jn,Gb as bp,Gc as iq,Gd as ir,Ge as os,H as fl,Ha as Kn,Hb as cp,Hc as jq,Hd as jr,He as ps,I as gl,Ia as Xn,Ib as dp,Ic as kq,Id as kr,Ie as qs,J as hl,Ja as Yn,Jb as ep,Jc as lq,Jd as lr,Je as rs,K as Zl,Ka as Zn,Kb as fp,Kc as mq,Kd as mr,Ke as ss,L as _l,La as _n,Lb as gp,Lc as nq,Ld as nr,Le as ts,M as $l,Ma as $n,Mb as hp,Mc as oq,Md as or,Me as us,N as am,Na as ao,Nb as ip,Nc as pq,Nd as pr,Ne as vs,O as bm,Oa as fo,Ob as jp,Oc as qq,Od as qr,Oe as ws,P as cm,Pa as go,Pb as kp,Pc as rq,Pd as rr,Pe as xs,Q as dm,Qa as ho,Qb as lp,Qc as sq,Qd as sr,Qe as ys,R as em,Ra as io,Rb as mp,Rc as tq,Rd as tr,S as fm,Sa as jo,Sb as np,Sc as uq,Sd as ur,T as gm,Ta as ko,Tb as vp,Tc as vq,Td as vr,U as hm,Ua as lo,Ub as wp,Uc as wq,Ud as wr,V as im,Va as mo,Vb as xp,Vc as xq,Vd as xr,W as jm,Wa as no,Wb as yp,Wc as yq,Wd as yr,X as km,Xa as oo,Xb as zp,Xc as zq,Xd as zr,Y as lm,Ya as po,Yb as Ap,Yc as Aq,Yd as Ar,Z as mm,Za as qo,Zb as Bp,Zc as Bq,Zd as Br,_ as nm,_a as ro,_b as Cp,_c as Cq,_d as Cr,aa as pm,ab as to,ac as Ep,ad as Eq,ae as Er,ba as qm,bb as uo,bc as Fp,bd as Fq,be as Fr,ca as rm,cb as vo,cc as Gp,cd as Gq,ce as Gr,da as sm,db as wo,dc as Hp,dd as Hq,de as Hr,ea as tm,eb as xo,ec as Ip,ed as Iq,ee as Ir,fa as um,fb as yo,fc as Jp,fd as Jq,fe as Jr,ga as vm,gb as zo,gc as Kp,gd as Kq,ge as Kr,ha as wm,hb as Ao,hc as Lp,hd as Lq,he as Rr,ia as xm,ib as Bo,ic as Mp,id as Mq,ie as Sr,ja as ym,jb as Co,jc as Np,jd as Nq,je as Tr,ka as zm,kb as Do,kc as Op,kd as Oq,ke as Ur,la as Am,lb as Eo,lc as Pp,ld as Pq,le as Vr,ma as Bm,mb as Fo,mc as Qp,md as Qq,me as Wr,na as Cm,nb as Go,nc as Rp,nd as Rq,ne as Xr,o as a,oa as Dm,ob as Ho,oc as Sp,od as Sq,oe as Yr,p as Lk,pa as Em,pb as Io,pc as Tp,pd as Tq,pe as Zr,q as Mk,qa as Fm,qb as Jo,qc as Up,qd as Uq,qe as _r,r as Nk,ra as Gm,rb as Ko,rc as Vp,rd as Vq,re as $r,s as Ok,sa as Hm,sb as Lo,sc as Wp,sd as Wq,se as as,t as Pk,ta as Im,tb as Oo,tc as Xp,td as Xq,te as bs,u as Qk,ua as Jm,ub as Po,uc as Yp,ud as Yq,ue as cs,v as Rk,va as yn,vb as Qo,vc as Zp,vd as Zq,ve as ds,w as Sk,wa as zn,wb as Ro,wc as _p,wd as _q,we as es,x as Tk,xa as An,xb as To,xc as $p,xd as $q,xe as fs,y as Yk,ya as Bn,yb as Uo,yc as aq,yd as ar,ye as gs,z as Zk,za as Cn,zb as Vo,zc as bq,zd as br,ze as hs}from"./chunk-6zggmce7.js";import{Re as op,Se as pp,Te as qp,Ue as rp,Ve as sp,We as tp,Xe as up}from"./chunk-5qjk7drw.js";import{Ye as Mo,Ze as No}from"./chunk-72rwcbp6.js";import{_e as So}from"./chunk-a7bnvz91.js";import{$e as xn}from"./chunk-1a0v39k5.js";import{af as bo,bf as co,cf as eo,df as Xo}from"./chunk-rq414kn5.js";import{ef as il,ff as jl,gf as kl,hf as ll,if as ml,jf as nl,kf as ol,lf as pl,mf as ql,nf as rl,of as sl,pf as tl,qf as ul,rf as vl,sf as wl}from"./chunk-6kdrncsx.js";import{Af as Ul,Bf as Vl,Cf as Wl,Df as Xl,Ef as Yl,tf as Nl,uf as Ol,vf as Pl,wf as Ql,xf as Rl,yf as Sl,zf as Tl}from"./chunk-p5wp0ce6.js";import{Ff as Ll,Gf as Ml}from"./chunk-td08rnk3.js";import{Hf as xl,If as yl,Jf as zl,Kf as Al,Lf as Bl,Mf as Cl,Nf as Dl,Pf as El,Qf as Fl,Rf as Gl,Sf as Hl,Tf as Il,Uf as Jl,Xf as Kl}from"./chunk-z5rwnnk1.js";import{$f as jn,Yf as fn,Zf as gn,_f as hn,ag as kn,bg as wn}from"./chunk-k5ptvy0b.js";import{Ag as sn,Bg as tn,Cg as un,Dg as vn,cg as Km,dg as Lm,eg as Mm,fg as Nm,gg as Om,hg as Pm,ig as Qm,jg as Rm,kg as Sm,lg as Tm,mg as Um,ng as Vm,og as Wm,pg as Xm,qg as Ym,rg as Zm,sg as _m,tg as ln,ug as mn,vg as nn,wg as on,xg as pn,yg as qn,zg as rn}from"./chunk-qqpqgwvb.js";import{Eg as $m,Fg as an}from"./chunk-ny67c03k.js";import{Gg as Ln,Hg as Mn,Ig as Nn,Jg as On,Kg as Pn,Lg as Qn,Mg as Rn,Ng as Sn,Og as Tn,Pg as Un,Qg as Vn,Rg as Wn}from"./chunk-xsng1mtq.js";import{Sg as ui,Tg as vi,Ug as wi,Vg as xi,Wg as yi,Xg as zi}from"./chunk-tp8pzf94.js";import{Yg as Pj,Zg as Qj,_g as Rj,ch as Sj,dh as Tj,eh as Uj}from"./chunk-0pkk226n.js";import{fh as _j,gh as $j,hh as ak,ih as bk,jh as ck,kh as dk,lh as ek,mh as fk,nh as gk,oh as hk,ph as ik}from"./chunk-akwd34xt.js";import{Ah as Oj,qh as Fj,rh as Gj,sh as Hj,th as Ij,uh as Jj,wh as Kj,xh as Lj,yh as Mj,zh as Nj}from"./chunk-pcxp4r9n.js";import{Bh as Ak,Dh as Bk}from"./chunk-76w34xne.js";import{Jh as Ph,Kh as Qh,Lh as Rh,Mh as Sh,Nh as Th,Oh as Uh}from"./chunk-t1tdjjht.js";import{$h as ei,Qh as Vh,Rh as Wh,Sh as Xh,Th as Yh,Uh as Zh,Vh as _h,Wh as $h,Xh as ai,Yh as bi,Zh as ci,_h as di,ai as fi,bi as gi}from"./chunk-bjar18jd.js";import{di as hi,ei as ii,fi as ji,gi as ki}from"./chunk-27fgag95.js";import{li}from"./chunk-0we9nw1d.js";import{oi as oh}from"./chunk-18n1ftn0.js";import{pi as ph}from"./chunk-bwsxym3d.js";import{qi as qh,ri as rh}from"./chunk-xq1acw1r.js";import{si as sh,ti as th,ui as uh,vi as vh,wi as wh,xi as xh}from"./chunk-hx998w7n.js";import{Ai as Ah,Bi as Bh,Ci as Ch,yi as yh,zi as zh}from"./chunk-bjcsc6wx.js";import{Di as Dh,Ei as Eh,Fi as Fh,Gi as Gh,Hi as Hh}from"./chunk-qn5srnj3.js";import{Ii as Ih,Ji as Jh,Ki as Kh,Li as Lh,Mi as Mh,Ni as Nh,Oi as Oh}from"./chunk-4m7ajama.js";import{Pi as mh,Qi as nh}from"./chunk-hrkvsj5c.js";import"./chunk-0c2h69k2.js";import{$i as We,Ui as Pe,Vi as Qe,Wi as Re,Xi as Se,Yi as Te,Zi as Ue,_i as Ve,aj as Xe,bj as Ye,cj as Ze,dj as _e,ej as $e,fj as af}from"./chunk-gs18069g.js";import{Aj as If,gj as sf,hj as tf,ij as uf,jj as vf,kj as wf,lj as xf,mj as yf,nj as zf,oj as Af,pj as Bf,qj as Cf,rj as Df,sj as Ef,tj as Ff,uj as Gf,zj as Hf}from"./chunk-t5ja7qkn.js";import{Hj as df,Ij as ef,Jj as ff,Kj as gf,Lj as hf,Mj as jf,Nj as kf,Oj as lf,Pj as mf,Qj as nf,Rj as of,Sj as pf,Tj as qf,Uj as rf}from"./chunk-9e8t0twa.js";import{$j as Pf,Vj as Jf,Wj as Kf,Xj as Lf,Yj as Mf,Zj as Nf,_j as Of,ak as Qf,bk as Rf,ck as Sf,dk as Tf,ek as Uf,fk as Vf,gk as Wf}from"./chunk-h83jrhfq.js";import{Ak as Lr,Bk as Mr,Ck as Nr,Dk as Or,Ek as Pr,Fk as Qr}from"./chunk-rcv2ehpq.js";import{Gk as Uk,Hk as Vk,Ik as Wk,Jk as Xk,Kk as bn,Lk as cn,Mk as dn,Nk as en}from"./chunk-kxc2h5vn.js";import"./chunk-anydpa34.js";import"./chunk-de8t7sc9.js";import{Dl as gc,yl as ec,zl as fc}from"./chunk-cs54ek9m.js";import{Fl as bc}from"./chunk-s8jd13nb.js";import{$l as lb,$m as bd,$n as ue,$o as ag,$p as lh,$q as oj,Am as tc,An as Fd,Ap as Mg,Aq as Gi,Ar as ok,Bm as uc,Bn as Gd,Bp as Ng,Bq as Hi,Br as pk,Cm as vc,Cn as Hd,Cp as Og,Cq as Ii,Cr as qk,Dm as wc,Dn as Id,Dp as Pg,Dq as Ji,Dr as rk,Em as xc,En as Jd,Ep as Qg,Eq as Ki,Er as sk,Fm as yc,Fn as Kd,Fp as Rg,Fq as Li,Fr as tk,Gl as xa,Gm as zc,Gn as Ld,Gp as Sg,Gq as Mi,Gr as uk,Hl as ya,Hm as Ac,Hn as Md,Hp as Tg,Hq as Ni,Hr as vk,Il as za,Im as Bc,In as Nd,Ip as Ug,Iq as Oi,Ir as wk,Jl as Aa,Jm as Cc,Jn as Od,Jp as Vg,Jq as Pi,Jr as xk,Kl as Ba,Km as Dc,Kn as Pd,Kp as Wg,Kq as Qi,Kr as yk,Ll as Ca,Lm as Ec,Ln as Qd,Lp as Xg,Lq as Ri,Lr as zk,Ml as Da,Mm as Fc,Mn as Rd,Mp as Yg,Mq as $i,Mr as Ck,Nl as Ea,Nm as Gc,Nn as Sd,Np as Zg,Nq as aj,Nr as Dk,Ol as Fa,Om as Hc,On as Td,Oo as Yf,Op as _g,Oq as bj,Or as Ek,Pl as Ga,Pm as Ic,Pn as Ud,Pp as $g,Pq as cj,Pr as Fk,Ql as Ha,Qm as Jc,Qn as Vd,Qp as ah,Qq as dj,Qr as Gk,Rl as Ia,Rm as Kc,Rn as Wd,Rp as bh,Rq as ej,Rr as Hk,Sl as Ja,Sm as Lc,Sn as Xd,Sp as ch,Sq as fj,Sr as Ik,Tl as Ka,Tm as Mc,Tn as Yd,Tp as dh,Tq as gj,Tr as Jk,Ul as La,Um as Nc,Un as Zd,Up as eh,Uq as hj,Ur as Kk,Vl as Ma,Vm as Oc,Vn as _d,Vp as fh,Vq as ij,Wl as Na,Wm as Pc,Wn as $d,Wo as Zf,Wp as gh,Wq as jj,Xl as Oa,Xm as Qc,Xn as ae,Xp as hh,Xq as kj,Yl as ib,Ym as _c,Yn as re,Yo as _f,Yp as ih,Yq as lj,Zl as jb,Zm as $c,Zn as se,Zp as jh,Zq as mj,_l as kb,_m as ad,_n as te,_o as $f,_p as kh,_q as nj,am as mb,an as cd,ao as ve,ap as bg,aq as mi,ar as pj,bm as nb,bn as dd,bo as we,bp as cg,bq as ni,br as qj,cn as ed,co as xe,cp as dg,cr as rj,do as ye,dp as eg,dr as sj,em as Kb,en as fd,eo as ze,ep as qg,eq as oi,er as tj,fm as Lb,fn as gd,fo as Ae,fp as rg,fr as uj,gm as Mb,gn as hd,go as Be,gp as sg,gr as vj,hm as Nb,hn as id,ho as Ce,hp as tg,hr as wj,im as Ob,in as jd,io as De,ip as ug,ir as xj,jm as Pb,jn as kd,jo as Ee,jp as vg,jr as yj,km as Qb,kn as ld,kp as wg,kr as zj,lm as Ub,ln as md,lo as Ie,lp as xg,lr as Aj,mm as Vb,mn as nd,mo as Je,mp as yg,mr as Bj,nm as Wb,nn as od,no as Ke,np as zg,nr as Cj,om as hc,on as pd,oo as Le,op as Ag,or as Dj,pm as ic,pn as qd,po as Me,pp as Bg,pq as pi,pr as Ej,qm as jc,qn as vd,qo as Ne,qp as Cg,qq as qi,qr as Vj,rm as kc,rn as wd,ro as Oe,rp as Dg,rq as ri,rr as Wj,sm as lc,sn as xd,sp as Eg,sq as si,sr as Xj,tm as mc,tn as yd,tp as Fg,tq as ti,tr as Yj,um as nc,un as zd,up as Gg,uq as Ai,ur as Zj,vm as oc,vn as Ad,vo as bf,vp as Hg,vq as Bi,vr as jk,wm as pc,wn as Bd,wo as cf,wp as Ig,wq as Ci,wr as kk,xm as qc,xn as Cd,xp as Jg,xq as Di,xr as lk,ym as rc,yn as Dd,yo as Xf,yp as Kg,yq as Ei,yr as mk,zm as sc,zn as Ed,zp as Lg,zq as Fi,zr as nk}from"./chunk-wc66mcn4.js";import{$r as S,As as ta,Bs as ua,Cs as va,Ds as wa,Vr as M,Wr as N,Xr as O,Yr as P,Zr as Q,_r as R,as as T,bs as U,cs as V,ds as W,es as X,fs as Y,gs as Z,hs as _,is as $,js as aa,ks as ba,ls as ca,ms as da,ns as ea,os as fa,ps as ia,qs as ja,rs as ka,ss as la,ts as ma,us as na,vs as oa,ws as pa,xs as qa,ys as ra,zs as sa}from"./chunk-aq1xq0r4.js";import{Es as ga,Fs as ha}from"./chunk-zcz9rs6p.js";import{Gs as Rb,Hs as Sb,Is as Tb}from"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import{Ps as Si,Qs as Ti,Rs as Ui,Ss as Vi,Ts as Wi,Us as Xi,Vs as Yi,Ws as Zi,Xs as _i}from"./chunk-0btmm4m2.js";import{Ct as Xc,Dt as Yc,Et as Zc,nt as Rc,ot as Sc,pt as Tc,qt as Uc,rt as Vc,tt as Wc}from"./chunk-24w86pek.js";import{Ft as Xb,Gt as Yb,Ht as Zb,It as _b,Jt as $b,Kt as ac}from"./chunk-tkyrk66a.js";import{Rt as Fe,Tt as Ge,Wt as He}from"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import{$t as cc,au as dc}from"./chunk-1te8k8gp.js";import{eu as fg,fu as gg,gu as hg,hu as ig,iu as jg,ju as kg,ku as lg,mu as mg,nu as ng,ou as og,pu as pg}from"./chunk-zpcnbdhn.js";import{Du as be,Eu as ce,Fu as de,Gu as ee,Hu as fe,Iu as ge,Ju as he,Ku as ie,Lu as je,Mu as ke,Nu as le,Ou as me,Pu as ne,Qu as oe,Ru as pe,Su as qe,qu as rd,ru as sd,su as td,tu as ud}from"./chunk-rz9f3zqz.js";import{$u as m,Tu as b,Uu as c,Vu as d,Wu as e,Xu as f,Yu as g,Zu as h,_u as i,av as n,bv as o,cv as p,dv as q,ev as r,fv as s,gv as t,hv as u,iv as v,jv as w,kv as x,lv as y,mv as z,nv as A,ov as B,pv as C,qv as D,rv as E,sv as F,tv as G,uv as H,vv as I,wv as J,xv as K,yv as L}from"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import{$v as Bb,Ov as ob,Pv as pb,Qv as qb,Rv as rb,Sv as sb,Tv as tb,Uv as ub,Vv as vb,Wv as wb,Xv as xb,Yv as yb,Zv as zb,_v as Ab,aw as Cb,bw as Db,cw as Eb,dw as Fb,ew as Gb,fw as Hb,gw as Ib,hw as Jb}from"./chunk-gbmeh7jg.js";import{Bw as Ua,Cw as Va,Dw as Wa,Ew as Xa,Fw as Ya,Gw as Za,Hw as _a,Iw as $a,Jw as ab,Kw as bb,Lw as cb,Mw as db,Nw as eb,Ow as fb,Pw as gb,Rw as hb,lw as Pa,mw as Qa,pw as Ra,uw as Sa,vw as Ta}from"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import{bx as j,cx as k,dx as l}from"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{sl as writeNetlifyConfig,mn as writeManifest,Xl as writeImageManifest,Ep as wrapComponentForHMR,ls as withDefaults,zk as webComponentDirectiveHandler,tq as watermark,vr as watchViews,fm as watchMultiple,gm as watchEffect,em as watch,Me as warmImagePlaceholders,tm as waitForStore,X as waitForLocale,pp as virtualPathFor,mk as videoDirective,G as validators,ps as validated,Ce as validateValueEnhanced,pi as validateTemplate,$m as validateRouteRules,yq as validateParams,De as validateFormEnhanced,kr as validateFile,ye as validateFields,xe as validateField,ri as validateDirective,Xd as validateCspDirectives,Hk as validateConfig,zn as validateComponentScripts,Xn as validateComponentProps,lh as validateClientScript,ki as v,Hc as usesSignalsInScript,ub as usesReactiveRuntime,Fi as userComponentFileExists,Sh as useVirtualList,je as useTitle,sm as useStoreOrThrow,Wp as useStore,$k as useStorage,Af as useSlots,bl as useSessionStorage,cc as useServerRuntimeConfig,Yf as useServerData,ge as useSeoMeta,dc as useRuntimeConfig,um as useRouteParams,wm as useRouteParamOrThrow,vm as useRouteParam,je as usePageTitle,rf as useOptimistic,Ff as useModel,ym as useMiddlewareValue,xm as useMiddlewareState,al as useLocalStorage,xp as useLoadingIndicator,ee as useHead,hi as useForm,Cf as useAttrs,mr as uploadFiles,lr as uploadFile,pm as updateInstance,pf as untrack,Vi as unregisterDirective,qm as unmountInstance,Qc as unescapeHtml,tp as typecheckStxFiles,Di as transpileTypeScript,_r as translate,Ba as transitionDirective,lc as transformAutoImports,Rn as toUsers,Qn as toUser,cq as thumbnail,dr as thumbHashToRGBA,er as thumbHashToDataURL,wb as templateNeedsRuntime,vb as templateHasReactiveContext,Jf as templateCache,nd as syncRecordedResponse,Bp as stxClientHelpers,kg as structuredDataDirective,bs as stripLocalePrefix,Xm as stripDocumentWrapper,Sb as stripCommentsAndLiterals,Co as stringToStream,Ld as strictCspPreset,Xe as streamingSuspenseDirective,$e as streamToResponse,Ve as streamTemplateSimple,Pe as streamTemplate,Tk as stopHmrServer,Nn as stopBroadcasting,_b as stateDirName,$b as stateDir,df as state,fh as startsDocument,Xo as startProductionServer,So as startInteractive,Mn as startBroadcasting,ds as stampLocaleLayoutGroup,Ia as staggerDirective,wq as srcsetUrls,Ja as springDirective,ud as splitByPipe,Tm as spaNavVaryHeaders,qp as sourcePathFor,Dq as smartBatchSign,Hi as slotContentHasExpressions,Bq as signUrl,Bi as shouldTranspileTypeScript,Qk as shouldReloadOnChange,Gq as shouldRefreshSignature,Rk as shouldIgnoreFile,Kh as shouldCacheComponent,gq as sharpen,ss as shape,Zb as setStateDir,Cm as setRouteParams,Dm as setMiddlewareState,Zk as setKeptScope,Le as setImagePlaceholder,uf as setGlobalProvide,b as setErrorLocale,Zl as setCurrentInstance,ak as setCachedVideoResult,Rj as setCachedImageResult,Lj as setCached,vs as serveStxFile,xs as serveMultipleStxFiles,Lk as serveMarkdownFile,gp as serveFile,ys as serveApp,fp as serve,Hp as serializeState,on as serializeSetCookie,iq as sepia,he as seoMetaToHeadConfig,Ca as scrollAnimateDirective,va as screenReaderDirective,Ei as scopeOnRootElement,qk as scopeHTML,pk as scopeCSS,ng as scanForSitemapEntries,pa as scanA11yTargets,qa as scanA11yIssues,mq as saturation,zq as sanitizeParams,I as sanitizeFilePath,J as sanitizeExpression,K as sanitizeDirectiveParams,H as sanitizeDirectiveParam,L as sanitizeComponentProps,B as safeExecuteAsync,A as safeExecute,Cb as runtimeHandledXAttrsLiteral,Gb as runtimeEventRegexLiteral,Eb as runtimeDirectiveNamesLiteral,yg as runPreProcessingMiddleware,zg as runPostProcessingMiddleware,rn as runPageAction,kf as runMountCallbacks,gb as runMiddleware,nm as runHooks,Tr as runDoctor,lf as runDestroyCallbacks,Cg as runComposers,nq as rotate,li as rewriteImagesWithSiblings,od as responseBindings,Li as resolveTemplatePath,ha as resolveStxTargets,Dk as resolveStxDirectories,Zr as resolveI18n,aq as resize,qg as resetUnscopedSignalWarnings,Oc as resetRejectedExpressionWarnings,sc as resetPlaceholders,de as resetHead,Gp as resetHMRHandler,o as resetErrorConfig,ns as required,cg as reportDeferredLoopWarnings,wc as replacePlaceholders,Ec as replaceInterpolations,tr as renderView,jk as renderVideoComponent,ic as renderVendorStyleTags,Cr as renderToString,Dr as renderToStream,Er as renderToDOM,cr as renderThumbhashToCanvas,Qr as renderTemplateString,Or as renderTemplate,Pr as renderString,Se as renderStreamingPage,wi as renderSlot,Ah as renderSSRSuspense,Oq as renderProtectedVideo,Nq as renderProtectedImg,Aq as renderMediaUpload,Nr as renderMarkdownView,dn as renderLayoutTypes,Vj as renderImgComponent,Nl as renderImageComponent,le as renderHtmlAttrs,ke as renderHead,wr as renderEmail,Ji as renderComponentWithSlot,me as renderBodyAttrs,Rp as render,Nd as relaxedCspPreset,we as registerValidationRule,Ze as registerStreamingDirectives,Yp as registerStoresClient,Am as registerStore,Rf as registerServeModuleBundle,lg as registerSeoDirectives,_a as registerMiddleware,Ac as registerFilters,zc as registerFilter,d as registerErrorMessages,Be as registerEnhancedValidationRule,Si as registerDirective,Wd as registerCspDirectives,_n as registerComponentDirectives,Oa as registerAnimationDirectives,wa as registerA11yDirectives,mc as referencesName,bm as ref,Ko as redirect,jd as recordResponseStatus,kd as recordResponseHeader,ac as rebaseOntoStateDir,ld as readResponseStatus,md as readResponseHeaders,Jk as readMarkdownFile,Kf as readFileCached,cm as reactive,rq as quality,Lq as pruneSignatureCache,Oj as pruneCache,sf as provide,Mr as protectCodeBlocks,ms as prop,Fg as processVueTemplate,Qh as processVirtualListDirectives,Uh as processVirtualGridDirectives,ik as processVideo,ze as processValidateDirective,ea as processTranslateDirective,uh as processTransitionDirectives,xh as processTransitionAttributes,pe as processTitleDirective,bd as processTemplateBindings,qh as processTeleportDirectives,yh as processSuspenseDirectives,gg as processStructuredData,Te as processStreamDirectives,pd as processStatusDirective,fi as processStaticDirectives,wg as processStackReplacements,vg as processStackPushDirectives,xi as processSlots,Vm as processShell,Oe as processServerBindings,hg as processSeoDirective,_e as processSectionDirectives,Vc as processScopedStyles,$c as processReactiveBindings,Pq as processProtectedMedia,_h as processPartialHydrationDirectives,kh as processOnceDirective,xg as processMiddleware,fg as processMetaDirectives,qe as processMetaDirective,Kk as processMarkdownFileDirectives,Qi as processMarkdownDirectives,dg as processLoops,Ih as processKeepAliveDirectives,jh as processJsonDirective,Th as processInfiniteListDirectives,ug as processIncludes,Xj as processImgComponents,Pl as processImageComponents,Cl as processImage,oe as processHeadDirective,se as processForms,ue as processFormInputDirectives,Mc as processExpressions,Pb as processEventDirectives,ve as processErrorDirective,Gg as processDynamicComponents,mi as processDirectives,_i as processDirectiveAttributes,ph as processDeferDirectives,$d as processCustomDirectives,Td as processCspDirectives,ts as processComponentProps,rc as processClientScript,te as processBasicFormDirectives,Dh as processAsyncDirectives,ae as processAppearanceBootstrapDirective,Fa as processAnimationDirectives,ka as processA11yDirectives,He as prepareImageDelivery,T as preloadTranslationsBackground,S as preloadTranslations,wp as preloadIslandHandlers,Ne as preloadIconCollection,In as poolStrings,Bk as pluginManager,Je as placeholdersWarmed,th as performLeave,sh as performEnter,mf as pendingLifecycleCounts,qf as peek,rg as partialsCache,kk as parseVideoDirectiveOptions,_p as parseUrl,fr as parseThumbhashString,Ad as parseSwitchBlock,ui as parseSlots,vi as parseSlotElement,Fd as parseScriptDeclarations,xk as parseSFCComponent,Qq as parseProtectedArgs,bg as parseLoopBinding,Wj as parseImgComponent,mj as parseImageUrl,Ol as parseImageComponent,pn as parseFormBody,Cd as parseExpressionWithFilters,$n as parseDefaults,Ho as parseCookies,Mm as parseContainerSelector,xd as parseConditionalBlock,Dd as parseArguments,Ma as parseAnimationShorthand,os as optional,Jn as optimizeTemplate,Ul as optimizeImage,Vl as optimizeDirectory,qs as oneOf,sg as onceStore,km as onUpdated,_c as onUpdate,mm as onUnmounted,Hm as onServer,im as onMounted,hf as onMount,ei as onHydrated,yf as onErrorCaptured,jf as onDestroy,Oh as onDeactivated,Gm as onClient,jm as onBeforeUpdate,lm as onBeforeUnmount,hm as onBeforeMount,Nh as onActivated,_q as observeElement,Lo as notFound,Lg as normalizeCriticalHeadOrder,xf as nextTick,co as negotiateEncoding,Ua as navigateTo,om as mountInstance,Ea as motionDirective,Md as moderateCspPreset,Hn as minifyHtml,jg as metaDirective,Zg as metaDedupKey,$p as mergeParams,$g as mergeHtmlAttrs,fe as mergeHeadConfigs,Sc as mergeCssConfig,Qd as mergeCspDirectives,Ra as matchRoute,Ri as markdownDirectiveHandler,Ik as markdownCache,ga as looksLikeGlob,as as localizePath,U as loadTranslationLazy,_ as loadTranslation,Ek as loadStxConfig,db as loadMiddlewareFromDirectory,nn as loadManifest,Wq as loadElement,On as loadChannels,Lb as listensPassively,hs as lintStxStrict,Yq as lazyLoadAll,Xq as lazyLoad,Ha as keyframeDirective,gl as keptState,Ar as jsxs,Br as jsxDEV,zr as jsx,Jo as jsonResponse,Ye as islandDirective,l as isTest,Zm as isSpaNavigation,Rm as isSpaNavRequest,Eq as isSignatureValid,nf as isSignal,Al as isSharpAvailable,vo as isServerEnvironment,Em as isServer,yb as isRuntimeOwnedColonAttr,Hb as isRuntimeEventName,da as isRtlLocale,j as isProduction,ia as isPresentationalRole,Tq as isNativeLazySupported,Lr as isMarkdownPath,Q as isLoading,R as isLoaded,Ai as isJavaScriptScript,Uq as isIntersectionObserverSupported,Il as isImageFile,Bl as isImageBackendAvailable,aa as isICUFormat,di as isHydrated,Gi as isHydrateTrigger,hd as isHttpStatus,uo as isEdgeEnvironment,is as isDirectiveKind,k as isDevelopment,of as isDerived,Pk as isCssOnlyChange,bo as isCompressible,Fm as isClient,Ym as isChromeInstanceScript,Fh as isAsyncComponent,qn as isActionableMethod,jq as invert,Mf as invalidateFileCacheByDir,Lf as invalidateFileCache,Lc as interpolateScriptsInTemplate,Jc as interpolateScriptExpressions,Kc as interpolateScriptAttributes,x as inlineError,Yr as injectThemeBootstrap,ig as injectSeoTags,Vr as injectSeo,Xf as injectRouterScript,Ok as injectHotReload,kb as injectHeatmap,Zc as injectCss,Rd as injectCspMetaTag,hh as injectConfigHeadTags,Kg as injectColorModeBootScript,bh as injectCloakStyle,Rg as injectBuildId,kc as injectBrowserCoreAutoImports,dd as injectAnalytics,tf as inject,zm as initStoreRegistry,vl as initNetlify,yp as initLoadingIndicator,Vq as initLazyLoading,Ro as initFile,br as initBlurUp,hr as initAllBlurUp,Zj as imgDirective,Sl as imageDirective,un as hydrateTemplateStream,tn as hydrateTemplate,vp as hydrateIslands,ai as hydrateIsland,vn as hydrateFragment,bi as hydrateByStrategy,ci as hydrateAll,Op as hydrate,ep as htmlResponse,dh as hoistLeadingHeadTags,Mg as hoistColorModeBootScript,lb as heatmapDirective,Hj as hashString,Wf as hashFilePath,Fj as hashFile,Gj as hashBuffer,Eg as hasVueTemplateSyntax,ag as hasVariables,Tp as hasStore,xc as hasPlaceholders,tl as hasNetlifyConfig,ab as hasMiddleware,Qb as hasEventDirectives,gh as hasDocumentShell,si as hasDirectives,ma as hasDOMSupport,Ll as handleImageRequest,zf as handleError,Ir as h,Hl as groupVariantsByFormat,hq as grayscale,Zo as gitHash,Bn as getUnusedDirectives,V as getTranslationSync,O as getTranslationCacheStats,W as getTranslationAsync,ba as getTranslation,ol as getTotalSize,Fq as getTimeUntilExpiry,mh as getStoreScript,Up as getStoreNames,Sp as getStore,el as getStorageSize,dl as getStorageKeys,Mi as getSourceLineInfo,Ci as getSharedTranspiler,Sf as getServeModuleBundle,Qf as getServeClientAsset,la as getScreenReaderOnlyStyle,rk as getScopeAttribute,cf as getRouteParams,Vb as getPublicEnvDefine,Wb as getPublicEnv,qi as getPositionInfo,uc as getPlaceholderRegistry,Ej as getPlaceholderCacheStats,ce as getPageMeta,Hd as getNonce,Jl as getMimeType,cb as getMiddlewareNames,$a as getMiddleware,ca as getLocaleDirection,P as getLoadingState,Y as getLoadingLocales,Ie as getImagePlaceholder,Dl as getImageMetadata,Fe as getImageDelivery,Np as getHydrationRuntime,Bm as getHydratedStoreState,Sk as getHmrServer,be as getHead,Fp as getHMRHandler,qj as getFormatExtension,Jj as getFileMtime,Gl as getFallbackVariant,f as getErrorMessage,c as getErrorLocale,n as getErrorConfig,i as getErrorCodeName,Ui as getDirectives,Ti as getDirective,_l as getCurrentInstance,Wc as getCssServeAsset,Pd as getCspPreset,Yd as getCspHeaderName,Pi as getComponentCacheStats,$j as getCachedVideoResult,Jq as getCachedSignature,Of as getCachedSignalsRuntime,Pf as getCachedRouterScript,Cj as getCachedPlaceholder,Qj as getCachedImageResult,Kj as getCached,Nj as getCacheStats,Pg as getBuildId,Ln as getBroadcastServer,pj as getBestVariant,Bc as getAllFilters,dj as generateWidthSrcset,Rh as generateVirtualListCSS,or as generateVideoPreview,Ee as generateValidationScript,pr as generateUploadRuntime,Cn as generateTreeShakenBundle,wh as generateTransitionRuntime,vh as generateTransitionCSS,dk as generateThumbnails,vj as generateThumbhashPlaceholder,mo as generateTemplatesDocs,Ch as generateSuspenseRuntime,Bh as generateSuspenseCSS,Ip as generateStateScript,nj as generateSrcsetData,Uj as generateSrcset,El as generateSrcSet,ek as generateSpriteSheet,xr as generateSpaShell,oj as generateSourceTags,jj as generateSizesFromBreakpoints,ij as generateSizesAttribute,Fl as generateSizes,mg as generateSitemapIndex,Wr as generateSitemap,Sq as generateSimpleMediaPicker,Mq as generateSignatureRuntime,If as generateSignalsRuntimeDev,Hf as generateSignalsRuntime,qc as generateServerDataBridge,ok as generateScopeId,yk as generateSFCWebComponent,Nb as generateRuntimeScript,Pa as generateRouteTypes,Qa as generateRouteManifest,og as generateRobotsTxt,Xr as generateRobots,Tj as generateResponsiveVariants,uk as generateReactiveWebComponentTS,tk as generateReactiveWebComponent,wk as generateReactiveRuntime,vk as generateReactiveMixin,ck as generatePoster,Bj as generatePlaceholderStyle,Aj as generatePlaceholderCSS,uj as generatePlaceholder,$h as generatePartialHydrationCSS,Vg as generateOfflineWorker,Gd as generateNonce,pl as generateNetlifyToml,rr as generateMinifiedMediaRuntime,qr as generateMediaRuntime,Rq as generateMediaManagerEmbed,ln as generateManifest,Ap as generateLoadingIndicatorHtml,ar as generateLazyLoadRuntime,en as generateLayoutTypes,xj as generateLQIP,Mh as generateKeepAliveRuntime,Lh as generateKeepAliveCSS,gi as generateIslandManifest,nr as generateImagePreview,Wl as generateImageManifest,Mp as generateHydrationScript,af as generateHydrationRuntime,Pp as generateHydrationCSS,Vh as generateHydrationBootstrap,Nk as generateHotReloadScript,jb as generateHeatmapScript,Dp as generateHMRClientScript,fk as generateHLSManifest,Jp as generateEventBindings,hj as generateDprSrcsetWithVariableQuality,gj as generateDprSrcset,eh as generateDocumentShell,ro as generateDocs,no as generateDirectivesDocs,Zi as generateDirectiveRuntime,pg as generateDefaultRobotsTxt,gk as generateDASHManifest,Yc as generateCss,Kd as generateCspMetaTag,Jd as generateCspHeader,Ef as generateCompositionRuntime,lo as generateComponentsDocs,Wh as generateComponentManifest,jo as generateComponentDoc,zj as generateColorPlaceholder,Jg as generateColorModeBootScript,rm as generateClientRuntime,Ij as generateCacheKey,oc as generateBrowserAutoImportDestructuring,ir as generateBlurUpRuntime,jr as generateBlurUpCSS,ad as generateBindingsRuntime,ej as generateAutoWidthSrcset,nc as generateAutoImportDestructuring,Hh as generateAsyncComponentRuntime,Gh as generateAsyncComponentCSS,fc as generateApiTypes,Na as generateAnimationRuntime,La as generateAnimationCSS,cd as generateAnalyticsScript,up as formatTypecheckDiagnostics,np as formatTypeErrors,Oo as formatStxContent,nl as formatSize,Ta as formatRoutes,Po as formatMarkdownContent,g as formatLocalizedError,$ as formatICU,p as formatFilePath,w as formatError,Ur as formatDoctorReport,oo as formatDocsAsMarkdown,qo as formatDocsAsJson,po as formatDocsAsHtml,qq as format,hl as forgetKeptState,Gn as foldConstants,_k as flushKeptState,pq as flipVertical,oq as flipHorizontal,fn as fingerprint,sp as findStxModuleDeclarations,rp as findRuntimeTypeDeclarations,Sr as findPantryPackage,Dc as findMustacheEnd,wd as findMatchingEndTag,sd as findMatchingDelimiter,Rb as findInterpolationEnd,yd as findIfBlocks,Bd as findExpressions,Sa as findErrorPage,Tc as findDuplicateScopedStyleRanges,zd as findDirectiveBlocks,Dn as findDeadCode,Dn as findDeadBranches,Nm as findContainerRegion,ko as findComponentFiles,ws as findCommonDir,ml as filterRequiredFiles,Ki as fileExists,Zf as extractVariables,oi as extractTemplateExpressions,Ue as extractStreamBoundaries,Kp as extractState,yi as extractSlotContent,$f as extractScriptFromTemplate,ni as extractScriptBlocks,vc as extractPlaceholders,vd as extractParenthesizedExpression,id as extractPageResponseStatus,hb as extractLayoutMetadata,yj as extractDominantColor,Ed as extractDirectiveParams,ti as extractDirectiveNames,_m as extractContainerContent,ho as extractComponentProps,Xh as extractComponentName,io as extractComponentDescription,Xc as extractClassNames,pc as extractBridgeData,Yh as extractBoundProps,td as extractBalancedExpression,hc as extractAndStripCssImports,sk as extractAndScopeStyles,Ob as extractAndProcessEvents,Wk as externalizeSharedAssets,Xk as externalizeRepeatedAssets,Vk as externalizeHtml,Pc as evaluateExpression,Fn as evaluateConstant,qd as evaluateAuthExpression,Gc as escapeHtmlValue,Fc as escapeHtml,C as errorRecovery,E as errorLogger,rh as ensureTeleportTargets,ih as ensureDocumentShell,Ae as enhancedValidationRules,fo as enableDevTools,En as eliminateDeadCode,ff as effect,xq as dprUrls,so as docsCommand,ec as discoverServerApi,cn as discoverLayoutNames,$q as disconnectObserver,go as disableDevTools,F as devHelpers,Um as detectShell,to as detectRuntime,ql as detectProjectConfig,rj as detectFormat,yn as detectBuildMode,ef as derived,ul as deploy,Gk as defineStxConfig,Xp as defineStore,Bf as defineSlots,gs as defineSiteConfig,ks as definePropsWithValidation,js as defineProps,Ak as definePlugin,ie as definePageMeta,Wa as defineMiddleware,ii as defineForm,wf as defineExpose,vf as defineEmits,Wi as defineDirective,Kr as defineCustomElement,Wo as defineConfig,Xi as defineClientDirective,Eh as defineAsyncComponent,Yo as defineApiHandler,sr as defaultMediaConfig,Yl as defaultImageConfig,M as defaultI18nConfig,ib as defaultHeatmapConfig,re as defaultFormClasses,yc as defaultFilters,_d as defaultCspConfig,Ck as defaultConfig,us as default,Rc as deepMergeThemes,Uc as dedupeScopedStyles,Qm as decodeTitleEntities,wj as decodeThumbhash,eg as declareBareLoopHead,Vd as cspNonceDirective,Ud as cspDirective,gr as crossfadeTransition,bq as crop,Ph as createVirtualList,lk as createVideoDirective,Fo as createVercelHandler,kp as createTypeChecker,fa as createTranslateFilter,Bo as createTextEncoderStream,Jr as createStxApp,Ao as createStreamingResponse,We as createStreamRenderer,Vp as createStore,Za as createStorageManager,Xa as createServerCookieManager,gc as createServerApi,am as createScope,zh as createSSRSuspense,bf as createRouter,an as createRouteRuleResolver,eb as createRouteLocation,ip as createRoute,bm as createRef,cm as createReactive,Df as createProvideContext,$o as createProject,Vo as createProductionBuild,tc as createPlaceholder,Kn as createOptimizedBuild,Go as createNetlifyHandler,il as createNetlifyClient,fb as createMiddlewareContext,hp as createMiddleware,Zq as createLazyObserver,Jh as createKeepAliveCache,xo as createKVNamespace,Zh as createIslandRegistry,Yj as createImgDirective,Tl as createImagePlugin,Ml as createImageHandler,Rl as createImageDirective,nb as createHeatmapAggregator,ll as createFileManifest,wo as createEnvAccessor,z as createEnhancedError,zo as createEdgeHandler,yo as createEdgeCache,Ni as createDetailedErrorMessage,Eo as createDenoHandler,rl as createDefaultNetlifyConfig,Zd as createCspHeaders,Io as createCookie,dm as createComputed,$l as createComponentInstance,Do as createCloudflareHandler,Ya as createClientCookieManager,Yi as createBuiltinDirectives,Jr as createApp,Ka as createAnimationTimeline,eq as cover,_f as convertToCommonJS,lq as contrast,dq as contain,y as consoleError,m as configureErrorHandling,Fk as config,dm as computed,eo as compressResponse,Bg as composerPattern,Ag as composer,Wm as composeShellWithPage,Zn as componentDirective,Ii as componentClientSignalNames,kn as compileTemplate,a as collectRepeatedFlag,kl as collectDeployFiles,ch as cloakStyleFragment,Ic as clientLoopScopes,bk as clearVideoCache,N as clearTranslationCache,nh as clearStoreCache,cl as clearStorage,Kq as clearSignatureCache,Gf as clearServerData,Dj as clearPlaceholderCache,tg as clearOnceStore,Id as clearNonce,bb as clearMiddleware,Ke as clearImagePlaceholders,Ge as clearImageDeliveryCatalog,Ql as clearImageCache,e as clearErrorMessages,Tf as clearDevCaches,Cc as clearCustomFilters,Dg as clearComposers,oh as clearComposableCache,Oi as clearComponentCache,Mj as clearCache,Ib as clearBlankCache,zp as cleanupLoadingIndicator,Km as classifyScript,Lm as classifyAllScripts,lp as checkTemplateFile,mp as checkTemplate,Uf as checkCache,Hq as checkAuthAccess,na as checkA11yWithRegex,oa as checkA11y,Un as channel,No as captureScreenshots,Mo as captureScreenshot,Z as cancelPendingLoads,jl as calculateSha1,fj as calculateOptimalWidths,Yk as cachedQuery,Vf as cacheTemplate,bc as cacheEngineFingerprint,nk as buildWebComponents,op as buildVirtualSource,ur as buildViews,Zp as buildUrl,Qe as buildSuspenseResolveScript,fs as buildStaticSite,qb as buildRuntimeGlobalsDestructure,gn as buildRuntimeAsset,hn as buildRouterAsset,es as buildLangPickerScript,lj as buildImageUrl,Sg as buildIdFragment,_g as buildHtmlAttrs,wn as buildForProduction,ao as buildComponentLibrary,Iq as buildAuthParams,xn as buildApp,cs as buildAlternateLinks,Uo as build,Sn as broadcastPrivate,Tn as broadcastPresence,Pn as broadcast,kq as brightness,Tb as bracketDepths,fq as blur,Jb as blankInertHtmlRegions,Cq as batchSignUrls,gf as batch,sa as autoFixA11yFile,ta as autoFixA11yDirectory,ra as autoFixA11y,sq as auto,ja as attributeValue,jn as assetTags,Mb as asInvocableStatement,rs as arrayOf,$r as applyTranslations,Sj as applyTransformations,zi as applySlots,Yn as applyPropDefaults,vq as applyPreset,ah as applyHtmlAttrs,ne as applyHead,Nc as applyFilters,Sm as appendVary,Od as apiCspPreset,Da as animationGroupDirective,hk as analyzeVideo,An as analyzeUsage,Im as analyzeTemplate,Jm as analyzeProject,An as analyzeDirectiveUsage,ed as analyticsDirective,cp as addStore,bp as addPage,Sd as addNonceToInlineContent,dp as addLayout,ap as addComponent,sn as actionRedirectResponse,Va as abortNavigation,ua as a11yDirective,Nf as __setSignalsGeneratorsForTest,Qg as __setBuildIdForTest,_j as VideoProcessorCache,ji as Validator,xa as TransitionType,za as TransitionEase,ya as TransitionDirection,rd as Tokenizer,jp as TemplateTypeChecker,Qo as TEMPLATE_PRESETS,v as StxValidationError,r as StxSyntaxError,t as StxSecurityError,s as StxRuntimeError,u as StxFileError,q as StxError,Fr as Show,Re as SUSPENSE_RESOLVER_RUNTIME,ob as STX_RUNTIME_GLOBALS,jc as STX_AUTO_IMPORTS,Yb as STATE_DIR_ENV_VAR,Ga as SPRING_PRESETS,Om as SPA_NAV_HEADER,Kb as SCROLL_BLOCKING_EVENTS,xb as RUNTIME_OWNED_COLON_ATTRS,zb as RUNTIME_HANDLED_X_ATTRS,Fb as RUNTIME_EVENT_NAMES,Db as RUNTIME_DIRECTIVE_NAMES,fd as RESPONSE_STATUS_KEY,gd as RESPONSE_HEADERS_KEY,tb as REACTIVE_RUNTIME_GLOBALS,To as ProductionBuild,Hr as Portal,_o as PROJECT_TEMPLATES,uq as PRESETS,Tg as OFFLINE_WORKER_PATH,Ug as OFFLINE_REGISTER_SCRIPT,sb as NON_CLIENT_PRIMITIVES,Qp as MemorySessionStore,cj as MIME_TYPES,$i as MEDIA_DEFAULT_WIDTHS,bj as MEDIA_DEFAULT_FORMATS,bn as LAYOUT_TYPES_FILE,fl as KEPT_STATE_PREFIX,Pj as ImageProcessorCache,Kl as ImageProcessingError,Lp as HydrationRuntime,Mk as HotReloadServer,mb as HeatmapAggregator,Yg as HTML_CLASS_MARKER,Xg as HTML_ATTRS_MARKER,yr as Fragment,Gr as For,Pm as FRAGMENT_CACHE_CONTROL,D as ErrorLogger,h as ErrorCodes,Uk as EXTERNALIZED_ASSET_DIR,wl as DeployError,xl as DEFAULT_WIDTHS,Aa as DEFAULT_TRANSITION_OPTIONS,Xb as DEFAULT_STATE_DIR,zl as DEFAULT_QUALITY,sj as DEFAULT_PLACEHOLDER_OPTIONS,yl as DEFAULT_FORMATS,aj as DEFAULT_DPR_VALUES,Cp as ComponentHMRHandler,pb as COMPONENT_SCOPE_LOCAL_GLOBALS,Bb as COMPONENT_PASSTHROUGH_X_ATTRS,rb as COMPILE_TIME_ONLY_GLOBALS,kj as COMMON_SIZES,Hg as COLOR_MODE_BOOT_MARKER,Ig as COLOR_MODE_BOOT_GLOBAL,Wg as CLOAK_STYLE,Wn as BroadcastServer,Vn as Broadcast,Ng as BUILD_ID_META,Og as BUILD_ID_HEADER,Ub as BROWSER_CORE_IMPORTS,tj as BLUR_UP_CSS,Ab as ALPINE_BRIDGE_X_ATTRS,Rr as $path};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Cg as EF,pg as e,sg as kF,tg as UF,ug as wF}from"./chunk-dzk2n4tv.js";import{Fg as BF}from"./chunk-ny67c03k.js";import{Aj as d,zj as l}from"./chunk-t5ja7qkn.js";import{Ok as HF,Pk as IF,Qk as KF}from"./chunk-anydpa34.js";import{Al as ZF,yl as YF}from"./chunk-mm9v8t7p.js";import{Bm as i,Mr as t,Or as M,Qp as GF,Yp as VF,aq as r,fq as o,hn as s,vo as zF,yp as $F,zm as p}from"./chunk-92ysystz.js";import{Os as XF}from"./chunk-9fqp72ze.js";import{Et as qF}from"./chunk-x99xve3y.js";import{Yt as WF}from"./chunk-pan7wmdg.js";import{bu as QF}from"./chunk-1te8k8gp.js";import{Tw as h,Ww as _F}from"./chunk-36xaycje.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>o(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...t,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=e(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
2
+ import{Cg as EF,pg as e,sg as kF,tg as UF,ug as wF}from"./chunk-qqpqgwvb.js";import{Fg as BF}from"./chunk-ny67c03k.js";import{Aj as d,zj as l}from"./chunk-t5ja7qkn.js";import{Ok as HF,Pk as IF,Qk as KF}from"./chunk-anydpa34.js";import{Al as ZF,yl as YF}from"./chunk-cs54ek9m.js";import{Bm as i,Mr as t,Or as M,Qp as GF,Yp as VF,aq as r,fq as o,hn as s,vo as zF,yp as $F,zm as p}from"./chunk-wc66mcn4.js";import{Os as XF}from"./chunk-9fqp72ze.js";import{Et as qF}from"./chunk-24w86pek.js";import{Yt as WF}from"./chunk-4q1c6fw2.js";import{bu as QF}from"./chunk-1te8k8gp.js";import{Tw as h,Ww as _F}from"./chunk-8wp64mym.js";import G from"fs";import q from"path";import{createHash as NF}from"crypto";_F();function u(Q){return NF("sha256").update(Q).digest("hex").slice(0,8)}function c(Q=!1){let z=Q?d():l(),Z=u(z);return{content:z,filename:`runtime.${Z}.js`,hash:Z}}function a(){let Q=h(),z=u(Q);return{content:Q,filename:`router.${z}.js`,hash:z}}function bF(Q){return{runtimeTag:Q.runtime?`<script src="/__stx/${Q.runtime.filename}"></script>`:"",routerTag:Q.router?`<script src="/__stx/${Q.router.filename}"></script>`:"",cssTag:Q.css?`<link rel="stylesheet" href="/__stx/${Q.css.filename}">`:""}}import n from"path";import{createHash as OF}from"crypto";function TF(Q={}){let z=new Set;return{context:new Proxy(Q,{get(X,F){if(F in X)return X[F];if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return},has(X,F){if(F in X)return!0;if(typeof F==="string"&&!F.startsWith("__"))z.add(F);return!1}}),accessedKeys:z}}async function FF(Q,z,Z={}){let X=n.resolve(Q),F=await Bun.file(X).text(),U=OF("sha256").update(F).digest("hex").slice(0,16);p();let w={};try{w=await M(Z.configDir)}catch{}let H=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(F))!==null){let E=k[1];if(/\bserver\b/.test(E))H.push(k[2])}let W=new Set(H.flatMap((E)=>o(E))),{context:_}=TF({__filename:X,__dirname:n.dirname(X),__stx_serverDeclared:W}),N=new Set,x={...t,...w,...Z,buildMode:"compile",strict:!1},I=await r(F,_,X,x,N),O=e(I),j=i();return{route:z,sourceFile:Q,html:I,fragment:O,placeholders:j,hasServerScripts:H.length>0,serverScriptContent:H,dependencies:Array.from(N),contentHash:U,status:s(F),streamTemplates:_.__streamTemplates}}var MF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function JF(Q,z){let Z=0,X=0;if(!G.existsSync(Q))return{copied:Z,bytes:X};G.mkdirSync(z,{recursive:!0});function F(U,w){let H=G.readdirSync(U,{withFileTypes:!0});for(let V of H){if(MF.has(V.name))continue;let k=q.join(U,V.name),W=q.join(w,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),F(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),Z++,X+=G.statSync(W).size}}}return F(Q,z),{copied:Z,bytes:X}}async function qJ(Q={}){let z=Date.now(),Z=q.resolve(Q.root||process.cwd()),X=q.resolve(Z,Q.outputDir||".output");console.log("[stx build] Starting production build...");let F=await M(Z),U=q.resolve(Z,Q.componentsDir??F.componentsDir??"components"),w=q.resolve(Z,Q.partialsDir??F.partialsDir??"partials"),H=q.resolve(Z,Q.layoutsDir??F.layoutsDir??"layouts"),V=Q.publicDir??F.publicDir??"public",k=F.app?.head||{},W=F.app?.colorMode,_=F.router?.container||"main",N=Q.routeRules??F.routeRules??{},x=BF(N),I=Q.serverApi??F.serverApi,O=typeof I==="object"?I:{};if(I)YF(Z,O);if(F.runtimeConfig)QF(F.runtimeConfig,{});if(G.existsSync(X))G.rmSync(X,{recursive:!0});let j=[q.join(X,"public","__stx"),q.join(X,"public","assets"),q.join(X,"server","pages"),q.join(X,"server","fragments")];for(let Y of j)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let E=zF(Z,{pagesDirs:F._layerPageDirs}),LF=["components","layouts","partials"],y=E.filter((Y)=>{return!LF.some((B)=>Y.pattern.startsWith(`/${B}/`)||Y.pattern===`/${B}`)});console.log(`[stx build] Found ${y.length} page routes (${E.length-y.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let L=c(Q.debug),K=a();await Bun.write(q.join(X,"public","__stx",L.filename),L.content),await Bun.write(q.join(X,"public","__stx",K.filename),K.content),console.log(`[stx build] Runtime: ${L.filename} (${(L.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${K.filename} (${(K.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let R=[],v=[];for(let Y of y){let B=x(Y.pattern),b=B.rendering==="prerender";if(b&&(Y.pattern.includes(":")||Y.pattern.includes("[")))throw Error(`Cannot prerender parameter route ${Y.pattern}; use dynamic rendering (explicit path enumeration is not supported here)`);try{let J=await FF(Y.filePath,Y.pattern,{configDir:Z,componentsDir:U,partialsDir:w,layoutsDir:H,debug:Q.debug});if(R.push(J),J.html=J.html.replace(/runtime\.__STX_HASH__\.js/g,L.filename).replace(/router\.__STX_HASH__\.js/g,K.filename),J.html=VF(J.html,k,{bodyScripts:[`<script src="/__stx/${K.filename}"></script>`],...W&&{colorMode:W}}),W)J.html=$F(J.html,W);if(k.htmlAttrs)J.html=GF(J.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(J.html)){let $=J.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if($&&$[1]){let m=$[1];J.html=J.html.replace(" "+m,""),J.html=J.html.replace(/<body([^>]*)>/,`<body$1 ${m}>`)}}if(J.html=J.html.replace(/<style data-css="generated">[\s\S]*?<\/style>\s*/g,""),J.html=await qF(J.html),b){let $=await EF(J,{params:{},request:new Request(`http://stx.build${Y.pattern}`),method:"GET",__stx_strict_hydration:!0});if($.redirect||$.cookies?.length||$.boundaries?.length||$.headers&&Object.keys($.headers).length)throw Error(`Prerendered route ${Y.pattern} cannot set response headers/cookies, redirect or stream`);J.html=$.html,J.status=$.status??J.status,J.hasServerScripts=!1,J.serverScriptContent=[],J.placeholders={}}J.fragment=kF(J.html,_);let C=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),g=q.join("server","pages",`${C}.compiled.json`),f=q.join("server","fragments",`${C}.html`);await Bun.write(q.join(X,g),JSON.stringify(J,null,2)),await Bun.write(q.join(X,f),J.fragment),v.push({pattern:Y.pattern,compiledPath:g,fragmentPath:f,isDynamic:J.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("["),prerendered:b}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(J){if(Object.keys(B).length)throw J;console.error(`[stx build] \u2717 ${Y.pattern}:`,J instanceof Error?J.message:J)}}let P=q.resolve(Z,V);if(G.existsSync(P)){let{copied:Y,bytes:B}=JF(P,q.join(X,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${V}/`)}let A=KF(Z);if(A){let{copied:Y,bytes:B}=JF(A,q.join(X,"public",IF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(B/1024).toFixed(1)}KB) from ${HF}/`)}let S={runtime:L.filename,router:K.filename},T=UF(v,S,X);if(T.routeRules=N,T.routerContainer=_,I)T.apiRoutes=await ZF(Z,X,O);if(F.runtimeConfig)await Bun.write(q.join(X,"server/runtime-config.json"),JSON.stringify(F.runtimeConfig)),await WF(Z,F.runtimeConfig);if(F._layerGraph)await Bun.write(q.join(X,"server/layers.json"),JSON.stringify(XF(F._layerGraph),null,2));wF(T,X);let D=Date.now()-z;return console.log(`
3
3
  [stx build] Done in ${D}ms \u2014 ${R.length} pages compiled`),{pageCount:R.length,assets:S,outputDir:X,duration:D}}
4
4
  export{u as Yf,c as Zf,a as _f,bF as $f,FF as ag,qJ as bg};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{jl as a,kl as b,ll as c,ml as d,nl as e,ol as f,pl as g,ql as h,rl as i,sl as j,tl as k,ul as l,vl as m,wl as n,xl as o}from"./chunk-esypgzzm.js";import"./chunk-mm9v8t7p.js";import"./chunk-s8jd13nb.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
2
+ import{jl as a,kl as b,ll as c,ml as d,nl as e,ol as f,pl as g,ql as h,rl as i,sl as j,tl as k,ul as l,vl as m,wl as n,xl as o}from"./chunk-de8t7sc9.js";import"./chunk-cs54ek9m.js";import"./chunk-s8jd13nb.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{o as tempBuildName,b as shouldLogBundlerDiagnostics,f as setBundlerFallbackMode,l as rewriteRegistryImports,g as resolveBundlerFallback,j as registryIdForPath,c as recordBundleFailure,m as queueClientBundleBuild,k as normalizeRegistrySpecifiers,h as hasUserImports,d as getBundleFailures,a as clientBundleDependencies,e as clearBundleFailures,n as bundleClientScript,i as MODULE_SPECIFIER_PREFIX};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ap as a,bp as b,cp as c,dp as d}from"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
2
+ import{ap as a,bp as b,cp as c,dp as d}from"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as reportDeferredLoopWarnings,c as processLoops,a as parseLoopBinding,d as declareBareLoopHead};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Ww as y}from"./chunk-36xaycje.js";import N from"fs";import B from"path";var Y="_stx";function L(M){return Bun.hash(M).toString(16).slice(0,8)}function T(M){let C=[],v=(q)=>{for(let g of N.readdirSync(q,{withFileTypes:!0})){let j=B.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(N.existsSync(M))v(M);return C}var S=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-runtime src="${M}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-router src="${M}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-css="generated" rel="stylesheet" href="${M}">`}];function _(M,C=`/${Y}`){let v=[],q=new Set,g=0,j=M;for(let G of S)j=j.replace(G.pattern,(R,K,W)=>{if(/\b(?:src|href)\s*=/.test(K)||!W.trim())return R;let Q=`${G.prefix}.${L(W)}.${G.extension}`;if(!q.has(Q))q.add(Q),v.push({filename:Q,contents:W,contentType:G.contentType});return g+=W.length,G.replace(`${C}/${Q}`)});return{html:j,assets:v,bytesInlined:g}}function a(M){let C={pages:0,assets:0,bytesInlined:0},v=B.join(M,Y),q=new Set;for(let g of T(M)){let j=N.readFileSync(g,"utf8"),{html:G,assets:R,bytesInlined:K}=_(j);if(G===j)continue;for(let W of R){if(q.has(W.filename))continue;q.add(W.filename),N.mkdirSync(v,{recursive:!0}),N.writeFileSync(B.join(v,W.filename),W.contents),C.assets++}N.writeFileSync(g,G),C.bytesInlined+=K,C.pages++}return C}import z from"fs";import P from"path";var I=1024,E=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,d=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function b(M){return Bun.hash(M).toString(16).slice(0,8)}function p(M){let C=[],v=(q)=>{for(let g of z.readdirSync(q,{withFileTypes:!0})){let j=P.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(z.existsSync(M))v(M);return C}function D(M,C){let v=M.match(new RegExp(`\\b${C}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!v)return;return v[2]??v[3]??v[4]??""}function m(M,C,v){if(v.length<I)return!1;if(/\b(?:src|href)\s*=/i.test(C))return!1;if(M.toLowerCase()==="script"){if(!d.has((D(C,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function o(M){let C=[];for(let v of M.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))C.push([v.index,v.index+v[0].length]);return C}function s(M){let C={pages:0,assets:0,bytesInlined:0},v=p(M);if(v.length<2)return C;let q=new Map,g=new Map;for(let Q of v){let O=z.readFileSync(Q,"utf8");q.set(Q,O);let x=o(O);for(let U of O.matchAll(E)){let[w,V,J,$]=U;if(!m(V,J,$))continue;if(x.some(([A,k])=>U.index>=A&&U.index<k))continue;let H=`${V.toLowerCase()}\x00${$}`,X=g.get(H);if(X)X.push({file:Q,whole:w,tag:V,attrs:J,body:$});else g.set(H,[{file:Q,whole:w,tag:V,attrs:J,body:$}])}}let j=[...g.values()].filter((Q)=>new Set(Q.map((O)=>O.file)).size>1);if(j.length===0)return C;let G=P.join(M,Y),R=new Map(q),K=new Map,W=[];for(let Q of j){let{tag:O,body:x}=Q[0],U=O.toLowerCase()==="script",w=`${U?"chunk":"style"}.${b(x)}.${U?"js":"css"}`;W.push({filename:w,contents:x,contentType:U?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let V=`/${Y}/${w}`;for(let J of Q){let $=U?`<script${J.attrs} src="${V}"></script>`:`<link${J.attrs} rel="stylesheet" href="${V}">`,H=R.get(J.file),X=H.replace(J.whole,()=>$);if(X===H)continue;R.set(J.file,X),K.set(J.file,(K.get(J.file)??0)+J.body.length)}}z.mkdirSync(G,{recursive:!0});for(let Q of W)z.writeFileSync(P.join(G,Q.filename),Q.contents),C.assets++;for(let[Q,O]of R){if(O===q.get(Q))continue;z.writeFileSync(Q,O),C.pages++,C.bytesInlined+=K.get(Q)??0}return C}y();import Z from"fs";import F from"path";var h="layout-types.d.ts";function f(M){let C=[],v=(q,g)=>{let j;try{j=Z.readdirSync(q,{withFileTypes:!0})}catch{return}for(let G of j){if(G.name.startsWith("."))continue;let R=F.join(q,G.name);if(G.isDirectory())v(R,g?`${g}/${G.name}`:G.name);else if(G.isFile()&&G.name.endsWith(".stx")&&G.name!=="_layout.stx"){let K=G.name.slice(0,-4);C.push(g?`${g}/${K}`:K)}}};return v(M,""),C.sort()}function c(M){let C=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(M.length===0)return C.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),C.join(`
2
+ import{Ww as y}from"./chunk-8wp64mym.js";import N from"fs";import B from"path";var Y="_stx";function L(M){return Bun.hash(M).toString(16).slice(0,8)}function T(M){let C=[],v=(q)=>{for(let g of N.readdirSync(q,{withFileTypes:!0})){let j=B.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(N.existsSync(M))v(M);return C}var S=[{pattern:/<script\b([^>]*\bdata-stx-runtime\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"runtime",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-runtime src="${M}"></script>`},{pattern:/<script\b([^>]*\bdata-stx-router\b[^>]*)>([\s\S]*?)<\/script>/gi,prefix:"router",extension:"js",contentType:"text/javascript; charset=utf-8",replace:(M)=>`<script data-stx-router src="${M}"></script>`},{pattern:/<style\b([^>]*\bdata-css=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"css",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-css="generated" rel="stylesheet" href="${M}">`}];function _(M,C=`/${Y}`){let v=[],q=new Set,g=0,j=M;for(let G of S)j=j.replace(G.pattern,(R,K,W)=>{if(/\b(?:src|href)\s*=/.test(K)||!W.trim())return R;let Q=`${G.prefix}.${L(W)}.${G.extension}`;if(!q.has(Q))q.add(Q),v.push({filename:Q,contents:W,contentType:G.contentType});return g+=W.length,G.replace(`${C}/${Q}`)});return{html:j,assets:v,bytesInlined:g}}function a(M){let C={pages:0,assets:0,bytesInlined:0},v=B.join(M,Y),q=new Set;for(let g of T(M)){let j=N.readFileSync(g,"utf8"),{html:G,assets:R,bytesInlined:K}=_(j);if(G===j)continue;for(let W of R){if(q.has(W.filename))continue;q.add(W.filename),N.mkdirSync(v,{recursive:!0}),N.writeFileSync(B.join(v,W.filename),W.contents),C.assets++}N.writeFileSync(g,G),C.bytesInlined+=K,C.pages++}return C}import z from"fs";import P from"path";var I=1024,E=/<(script|style)\b([^>]*)>([\s\S]*?)<\/\1>/gi,d=new Set(["","module","text/javascript","application/javascript","module/javascript"]);function b(M){return Bun.hash(M).toString(16).slice(0,8)}function p(M){let C=[],v=(q)=>{for(let g of z.readdirSync(q,{withFileTypes:!0})){let j=P.join(q,g.name);if(g.isDirectory())v(j);else if(g.isFile()&&j.endsWith(".html"))C.push(j)}};if(z.existsSync(M))v(M);return C}function D(M,C){let v=M.match(new RegExp(`\\b${C}\\s*=\\s*("([^"]*)"|'([^']*)'|([^\\s>]+))`,"i"));if(!v)return;return v[2]??v[3]??v[4]??""}function m(M,C,v){if(v.length<I)return!1;if(/\b(?:src|href)\s*=/i.test(C))return!1;if(M.toLowerCase()==="script"){if(!d.has((D(C,"type")??"").trim().toLowerCase()))return!1;return!0}return!0}function o(M){let C=[];for(let v of M.matchAll(/<template\b[^>]*>[\s\S]*?<\/template>/gi))C.push([v.index,v.index+v[0].length]);return C}function s(M){let C={pages:0,assets:0,bytesInlined:0},v=p(M);if(v.length<2)return C;let q=new Map,g=new Map;for(let Q of v){let O=z.readFileSync(Q,"utf8");q.set(Q,O);let x=o(O);for(let U of O.matchAll(E)){let[w,V,J,$]=U;if(!m(V,J,$))continue;if(x.some(([A,k])=>U.index>=A&&U.index<k))continue;let H=`${V.toLowerCase()}\x00${$}`,X=g.get(H);if(X)X.push({file:Q,whole:w,tag:V,attrs:J,body:$});else g.set(H,[{file:Q,whole:w,tag:V,attrs:J,body:$}])}}let j=[...g.values()].filter((Q)=>new Set(Q.map((O)=>O.file)).size>1);if(j.length===0)return C;let G=P.join(M,Y),R=new Map(q),K=new Map,W=[];for(let Q of j){let{tag:O,body:x}=Q[0],U=O.toLowerCase()==="script",w=`${U?"chunk":"style"}.${b(x)}.${U?"js":"css"}`;W.push({filename:w,contents:x,contentType:U?"text/javascript; charset=utf-8":"text/css; charset=utf-8"});let V=`/${Y}/${w}`;for(let J of Q){let $=U?`<script${J.attrs} src="${V}"></script>`:`<link${J.attrs} rel="stylesheet" href="${V}">`,H=R.get(J.file),X=H.replace(J.whole,()=>$);if(X===H)continue;R.set(J.file,X),K.set(J.file,(K.get(J.file)??0)+J.body.length)}}z.mkdirSync(G,{recursive:!0});for(let Q of W)z.writeFileSync(P.join(G,Q.filename),Q.contents),C.assets++;for(let[Q,O]of R){if(O===q.get(Q))continue;z.writeFileSync(Q,O),C.pages++,C.bytesInlined+=K.get(Q)??0}return C}y();import Z from"fs";import F from"path";var h="layout-types.d.ts";function f(M){let C=[],v=(q,g)=>{let j;try{j=Z.readdirSync(q,{withFileTypes:!0})}catch{return}for(let G of j){if(G.name.startsWith("."))continue;let R=F.join(q,G.name);if(G.isDirectory())v(R,g?`${g}/${G.name}`:G.name);else if(G.isFile()&&G.name.endsWith(".stx")&&G.name!=="_layout.stx"){let K=G.name.slice(0,-4);C.push(g?`${g}/${K}`:K)}}};return v(M,""),C.sort()}function c(M){let C=["// Auto-generated by stx \u2014 do not edit.","//","// Makes `definePageMeta({ layout })` reject a name with no layout behind it.","// Include this file in your tsconfig (it lives in the stx state directory,","// `.stx/` by default) for the check to apply.",""];if(M.length===0)return C.push("// No layouts found \u2014 `layout` stays typed as `string`.","export {}",""),C.join(`
3
3
  `);return C.push("declare module '@stacksjs/stx' {"," interface KnownLayouts {",...M.map((v)=>` '${v}': true`)," }","}","","export {}",""),C.join(`
4
4
  `)}function HM(M,C){if(!M)return[];let v=F.isAbsolute(M)?M:F.resolve(process.cwd(),M),q=f(v),g=c(q),j=F.join(C,h);try{if(Z.existsSync(j)&&Z.readFileSync(j,"utf8")===g)return q;Z.mkdirSync(C,{recursive:!0}),Z.writeFileSync(j,g)}catch{}return q}
5
5
  export{Y as Gk,_ as Hk,a as Ik,s as Jk,h as Kk,f as Lk,c as Mk,HM as Nk};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$j as h,Vj as b,Wj as c,Xj as d,Yj as e,Zj as f,_j as g,ak as i,bk as j,ck as k,dk as l,ek as m,fk as n,gk as o}from"./chunk-7kpr3fcp.js";import{Fl as a}from"./chunk-s8jd13nb.js";import"./chunk-92ysystz.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-x99xve3y.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-pan7wmdg.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-36xaycje.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};
2
+ import{$j as h,Vj as b,Wj as c,Xj as d,Yj as e,Zj as f,_j as g,ak as i,bk as j,ck as k,dk as l,ek as m,fk as n,gk as o}from"./chunk-h83jrhfq.js";import{Fl as a}from"./chunk-s8jd13nb.js";import"./chunk-wc66mcn4.js";import"./chunk-aq1xq0r4.js";import"./chunk-zcz9rs6p.js";import"./chunk-v3nwkveg.js";import"./chunk-9fqp72ze.js";import"./chunk-0btmm4m2.js";import"./chunk-24w86pek.js";import"./chunk-tkyrk66a.js";import"./chunk-213jwgpx.js";import"./chunk-4q1c6fw2.js";import"./chunk-1te8k8gp.js";import"./chunk-zpcnbdhn.js";import"./chunk-rz9f3zqz.js";import"./chunk-bn1edb1y.js";import"./chunk-cj3adc77.js";import"./chunk-t1htzg9e.js";import"./chunk-gbmeh7jg.js";import"./chunk-8wp64mym.js";import"./chunk-vx86cf4r.js";import"./chunk-563shnkz.js";import"./chunk-2fw05hs2.js";export{b as templateCache,j as registerServeModuleBundle,c as readFileCached,e as invalidateFileCacheByDir,d as invalidateFileCache,o as hashFilePath,k as getServeModuleBundle,i as getServeClientAsset,g as getCachedSignalsRuntime,h as getCachedRouterScript,l as clearDevCaches,m as checkCache,n as cacheTemplate,a as cacheEngineFingerprint,f as __setSignalsGeneratorsForTest};