@stacksjs/stx 0.2.238 → 0.2.240

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 (143) hide show
  1. package/dist/{chunk-4awxsp8f.js → chunk-092sm06a.js} +2 -2
  2. package/dist/{chunk-11mxy34t.js → chunk-0cznrnwk.js} +2 -2
  3. package/dist/{chunk-mbwe1z12.js → chunk-0kq46rxg.js} +1 -1
  4. package/dist/{chunk-p4a35r71.js → chunk-0ks60fk1.js} +1 -1
  5. package/dist/{chunk-cjhpwef8.js → chunk-0s88j6n8.js} +1 -1
  6. package/dist/{chunk-bskzz385.js → chunk-15rgmdtq.js} +1 -1
  7. package/dist/{chunk-hk8j3eps.js → chunk-19m7hed6.js} +1 -1
  8. package/dist/chunk-1fj21pgq.js +2 -0
  9. package/dist/{chunk-n7w8kgfw.js → chunk-1p0r6k2f.js} +1 -1
  10. package/dist/{chunk-xgtcq9bj.js → chunk-1px4xey5.js} +1 -1
  11. package/dist/{chunk-p56hfz00.js → chunk-20q757q9.js} +1 -1
  12. package/dist/{chunk-8t7w323q.js → chunk-2p5qa9pm.js} +1 -1
  13. package/dist/{chunk-msxcd1kp.js → chunk-2qkasmq1.js} +2 -2
  14. package/dist/chunk-2vjheprp.js +2 -0
  15. package/dist/{chunk-hv6hat6p.js → chunk-33pdtz6a.js} +1 -1
  16. package/dist/{chunk-0e1pt5my.js → chunk-37nm0f2v.js} +2 -2
  17. package/dist/chunk-404eam50.js +2 -0
  18. package/dist/chunk-4t43nqtn.js +2 -0
  19. package/dist/{chunk-5q44vwmg.js → chunk-5w362c8x.js} +1 -1
  20. package/dist/chunk-6brdnp9j.js +2 -0
  21. package/dist/chunk-6fdg7043.js +2 -0
  22. package/dist/chunk-6h4f19sb.js +2 -0
  23. package/dist/{chunk-qygqf2zb.js → chunk-6mk7fd7v.js} +1 -1
  24. package/dist/{chunk-89nbkhxk.js → chunk-6mtc3b9a.js} +1 -1
  25. package/dist/{chunk-frh6b2q7.js → chunk-6qtx7w2r.js} +1 -1
  26. package/dist/{chunk-wdwf3wzg.js → chunk-78bpc81t.js} +1 -1
  27. package/dist/{chunk-4tybm7fx.js → chunk-7djq40jk.js} +1 -1
  28. package/dist/{chunk-z0y4gcsp.js → chunk-7mqbw6qv.js} +1 -1
  29. package/dist/{chunk-rkhfhfas.js → chunk-8g7xy48w.js} +1 -1
  30. package/dist/{chunk-1jcyfxq5.js → chunk-8x4h673x.js} +1 -1
  31. package/dist/{chunk-k46js7bz.js → chunk-9228drk4.js} +1 -1
  32. package/dist/{chunk-n0kbk2ge.js → chunk-98pkw4t1.js} +1 -1
  33. package/dist/chunk-9h74bkfh.js +2 -0
  34. package/dist/{chunk-2fspj91j.js → chunk-a8fx6wcb.js} +1 -1
  35. package/dist/{chunk-ggsxz07y.js → chunk-adj1k3w7.js} +1 -1
  36. package/dist/{chunk-a6m63ra1.js → chunk-ae85dv6n.js} +1 -1
  37. package/dist/{chunk-cs9cynxh.js → chunk-ajjwrrmz.js} +1 -1
  38. package/dist/{chunk-5a1b5kjt.js → chunk-ax56kn66.js} +1 -1
  39. package/dist/{chunk-8k7evyhh.js → chunk-b212gjes.js} +1 -1
  40. package/dist/{chunk-nnd1hqht.js → chunk-b220zqbz.js} +3 -3
  41. package/dist/chunk-b5w02n3z.js +22 -0
  42. package/dist/{chunk-m2v35nze.js → chunk-bn0td54v.js} +1 -1
  43. package/dist/{chunk-w56erqz5.js → chunk-brpvf652.js} +1 -1
  44. package/dist/{chunk-7qgt3b5t.js → chunk-bx4nptd2.js} +1 -1
  45. package/dist/{chunk-1xgva25g.js → chunk-by3zs4ag.js} +1 -1
  46. package/dist/{chunk-sbpzt8yd.js → chunk-c0apssp7.js} +1 -1
  47. package/dist/{chunk-v65nfy32.js → chunk-c9843bnq.js} +1 -1
  48. package/dist/{chunk-mccyah24.js → chunk-cda7v05f.js} +1 -1
  49. package/dist/chunk-cj3zqzd0.js +2 -0
  50. package/dist/chunk-ekx9j0rv.js +2 -0
  51. package/dist/{chunk-cdb8a0tx.js → chunk-enewax5b.js} +1 -1
  52. package/dist/{chunk-fee1k8c5.js → chunk-etx5vb1n.js} +1 -1
  53. package/dist/chunk-eyfmvy7z.js +2 -0
  54. package/dist/chunk-fdp386zd.js +2 -0
  55. package/dist/chunk-fethffrc.js +2 -0
  56. package/dist/{chunk-yf04htgs.js → chunk-fnty12j5.js} +1 -1
  57. package/dist/{chunk-dzr5w33y.js → chunk-ft61rs60.js} +10 -10
  58. package/dist/{chunk-qa8qmer5.js → chunk-g553n48p.js} +1 -1
  59. package/dist/{chunk-s8bx0wv7.js → chunk-gaj725dz.js} +1 -1
  60. package/dist/chunk-h4ccaa7d.js +2 -0
  61. package/dist/{chunk-acwjyext.js → chunk-j79s71z4.js} +1 -1
  62. package/dist/{chunk-8p8qa1s9.js → chunk-k26kt6fp.js} +1 -1
  63. package/dist/{chunk-2k9xsqnx.js → chunk-kq9abgx2.js} +1 -1
  64. package/dist/{chunk-x58dcsjw.js → chunk-m0xp6xjr.js} +1 -1
  65. package/dist/{chunk-vtfzc29r.js → chunk-m8h6km5v.js} +1 -1
  66. package/dist/chunk-mjck13y3.js +2 -0
  67. package/dist/{chunk-1kg9sz9a.js → chunk-mv2v3g62.js} +1 -1
  68. package/dist/{chunk-g6bdbdvj.js → chunk-myqyr2dp.js} +1 -1
  69. package/dist/{chunk-4s11yb67.js → chunk-n07dds2d.js} +1 -1
  70. package/dist/{chunk-6x3jqwxp.js → chunk-n3tj3h1q.js} +1 -1
  71. package/dist/{chunk-mxva4zmq.js → chunk-nhn7qftp.js} +1 -1
  72. package/dist/chunk-np6b30jn.js +2 -0
  73. package/dist/{chunk-y805f58c.js → chunk-nw7y6zw8.js} +1 -1
  74. package/dist/{chunk-hx0zj6c9.js → chunk-nzser3gj.js} +1 -1
  75. package/dist/chunk-p6gb0bak.js +2 -0
  76. package/dist/{chunk-frv8qh41.js → chunk-p7a8mgns.js} +1 -1
  77. package/dist/{chunk-a0zaf8r9.js → chunk-phj11c6x.js} +1 -1
  78. package/dist/{chunk-5e2j8d7r.js → chunk-q9vxc3gc.js} +1 -1
  79. package/dist/chunk-qmww6n4b.js +2 -0
  80. package/dist/{chunk-j4ze77e0.js → chunk-qs0fp63n.js} +1 -1
  81. package/dist/{chunk-9hcw5zsr.js → chunk-qv3g8tde.js} +1 -1
  82. package/dist/chunk-r2zcdk2f.js +2 -0
  83. package/dist/chunk-r4wxxggc.js +2 -0
  84. package/dist/{chunk-7y7dp1ba.js → chunk-sdfe1xce.js} +1 -1
  85. package/dist/{chunk-j2pmv4jw.js → chunk-shh4byc3.js} +1 -1
  86. package/dist/chunk-sxx50f3k.js +2 -0
  87. package/dist/{chunk-s2smc4wv.js → chunk-szchgak8.js} +1 -1
  88. package/dist/chunk-t2fwnrw9.js +2 -0
  89. package/dist/chunk-tx9zv1xv.js +2 -0
  90. package/dist/{chunk-w9yfvb4d.js → chunk-v0tmvq31.js} +1 -1
  91. package/dist/{chunk-spnkgsft.js → chunk-v2vv4etv.js} +22 -22
  92. package/dist/chunk-v8mxhfp7.js +2 -0
  93. package/dist/chunk-vd3w4q9e.js +2 -0
  94. package/dist/chunk-vgnjrgnk.js +2 -0
  95. package/dist/{chunk-d1pp19wx.js → chunk-w3pzxz3m.js} +1 -1
  96. package/dist/chunk-wjebx46w.js +2 -0
  97. package/dist/chunk-wz1gwj81.js +2 -0
  98. package/dist/{chunk-evv58hf5.js → chunk-x41v697c.js} +1 -1
  99. package/dist/{chunk-v4t1kxm7.js → chunk-xddvx94h.js} +1 -1
  100. package/dist/{chunk-7hfjv9ej.js → chunk-xj05xmfg.js} +1 -1
  101. package/dist/{chunk-r2kag877.js → chunk-z2gmz9ew.js} +2 -2
  102. package/dist/{chunk-jjehgxtc.js → chunk-z8t5cs8f.js} +1 -1
  103. package/dist/cli.js +14 -14
  104. package/dist/client-script.d.ts +6 -0
  105. package/dist/client-script.js +1 -2
  106. package/dist/craft-entry.js +1 -1
  107. package/dist/craft.js +1 -1
  108. package/dist/database.js +1 -1
  109. package/dist/pwa.js +2 -2
  110. package/dist/ssg.js +2 -2
  111. package/dist/stx-virtual-ts.d.ts +25 -2
  112. package/dist/stx-virtual-ts.js +56 -5
  113. package/dist/visual-testing.js +1 -1
  114. package/package.json +5 -5
  115. package/dist/chunk-0b88ky9d.js +0 -2
  116. package/dist/chunk-38nq2ymv.js +0 -2
  117. package/dist/chunk-412apa52.js +0 -2
  118. package/dist/chunk-7rfx2s7c.js +0 -2
  119. package/dist/chunk-9g2rhkx8.js +0 -22
  120. package/dist/chunk-9scfmhph.js +0 -2
  121. package/dist/chunk-a0aqpzm6.js +0 -2
  122. package/dist/chunk-cff5gpvr.js +0 -2
  123. package/dist/chunk-dcc04y1t.js +0 -2
  124. package/dist/chunk-e4gycrtb.js +0 -2
  125. package/dist/chunk-f7se90b8.js +0 -2
  126. package/dist/chunk-g98vjcbj.js +0 -2
  127. package/dist/chunk-gcn830km.js +0 -2
  128. package/dist/chunk-gg2epwyx.js +0 -2
  129. package/dist/chunk-h451yyp6.js +0 -2
  130. package/dist/chunk-hd1hr94w.js +0 -2
  131. package/dist/chunk-hfc4afre.js +0 -2
  132. package/dist/chunk-j5rmhyqr.js +0 -2
  133. package/dist/chunk-je7cvg5j.js +0 -2
  134. package/dist/chunk-jqnckvbk.js +0 -2
  135. package/dist/chunk-mdk3c8n2.js +0 -2
  136. package/dist/chunk-n27c7jvr.js +0 -2
  137. package/dist/chunk-nrzx6d77.js +0 -2
  138. package/dist/chunk-pz3n5qde.js +0 -2
  139. package/dist/chunk-ssbddr82.js +0 -2
  140. package/dist/chunk-wc5385mg.js +0 -2
  141. package/dist/chunk-x21s75kv.js +0 -2
  142. package/dist/chunk-xrx24ndt.js +0 -2
  143. package/dist/chunk-z54ans51.js +0 -2
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{Nu as l}from"./chunk-j4ze77e0.js";import U from"fs";import G from"path";import I from"os";import H from"crypto";import{generatePlaceholder as m,processImage as g}from"ts-images";var d=[320,640,768,1024,1280,1536,1920],h=["webp","jpeg"],b=80,u=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],P={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},N=null,W=!1;async function Y(){if(W)return N;W=!0;try{let J=await import("sharp");return N=J.default||J,N}catch{return null}}async function e(){return await Y()!==null}async function t(){return!0}async function JJ(J,K={}){let{widths:Z=d,formats:$=h,quality:q=b,fit:C="cover",placeholder:X="none",outputDir:Q=".stx/images",baseUrl:_="/images"}=K,j,x;if(typeof J==="string"){if(x=J,!await Bun.file(J).exists())throw new L(`Image not found: ${J}`,"NOT_FOUND");j=await Bun.file(J).arrayBuffer().then((V)=>Buffer.from(V))}else x="buffer-input",j=J;let w=H.createHash("sha256").update(j).digest("hex").slice(0,12),y=await O(j),{width:B,height:D}=y,A=B/D;await U.promises.mkdir(Q,{recursive:!0});let T=[],v=G.basename(x,G.extname(x)),z=Z.filter((V)=>V<=B);if(!z.includes(B)&&B<=Math.max(...Z))z.push(B);z.sort((V,R)=>V-R);for(let V of z){let R=Math.round(V/A);for(let F of $){let S=`${v}-${V}w-${w}.${F}`,k=G.join(Q,S),c=`${_}/${S}`,E=await n(j,{width:V,height:R,format:F,quality:q,fit:C});await Bun.write(k,E),T.push({path:k,url:c,width:V,height:R,format:F,size:E.length})}}let M;if(X!=="none")M=await o(j,X);return{src:x,variants:T,placeholder:M,width:B,height:D,aspectRatio:A,hash:w}}async function O(J){let K=typeof J==="string"?Buffer.from(await Bun.file(J).arrayBuffer()):J,Z=await Y();if(Z){let q=await Z(K).metadata();return{width:q.width||0,height:q.height||0,format:q.format||"unknown",hasAlpha:q.hasAlpha}}return p(K)}function p(J){if(J[0]===137&&J[1]===80&&J[2]===78&&J[3]===71){let K=J.readUInt32BE(16),Z=J.readUInt32BE(20);return{width:K,height:Z,format:"png",hasAlpha:!0}}if(J[0]===255&&J[1]===216){let K=2;while(K<J.length){if(J[K]!==255)break;let Z=J[K+1];if(Z>=192&&Z<=207&&Z!==196&&Z!==200&&Z!==204){let q=J.readUInt16BE(K+5);return{width:J.readUInt16BE(K+7),height:q,format:"jpeg",hasAlpha:!1}}let $=J.readUInt16BE(K+2);K+=2+$}}if(J.toString("utf8",0,4)==="RIFF"&&J.toString("utf8",8,12)==="WEBP"){let K=J.toString("utf8",12,16);if(K==="VP8 "){let Z=J.readUInt16LE(26)&16383,$=J.readUInt16LE(28)&16383;return{width:Z,height:$,format:"webp",hasAlpha:!1}}if(K==="VP8L"){let Z=J.readUInt32LE(21),$=(Z&16383)+1,q=(Z>>14&16383)+1;return{width:$,height:q,format:"webp",hasAlpha:!0}}}if(J.toString("utf8",0,3)==="GIF"){let K=J.readUInt16LE(6),Z=J.readUInt16LE(8);return{width:K,height:Z,format:"gif",hasAlpha:!0}}throw new L("Unable to parse image dimensions","PARSE_ERROR")}async function n(J,K){let Z=await Y();if(Z){let q=Z(J).resize(K.width,K.height,{fit:K.fit});switch(K.format){case"webp":q=q.webp({quality:K.quality});break;case"avif":q=q.avif({quality:K.quality});break;case"jpeg":q=q.jpeg({quality:K.quality});break;case"png":q=q.png({quality:K.quality});break}return q.toBuffer()}let $=G.join(I.tmpdir(),`stx-img-${H.randomBytes(8).toString("hex")}.${K.format}`);try{return await g({input:J,output:$,format:K.format,quality:K.quality,resize:{width:K.width,height:K.height,fit:K.fit}}),Buffer.from(await Bun.file($).arrayBuffer())}finally{await U.promises.unlink($).catch(()=>{})}}async function o(J,K){let Z=await Y();if(K==="blur"&&Z){let X=(await Z(J).resize(20).blur(10).toBuffer()).toString("base64"),Q=await O(J);return`data:${P[Q.format]||"image/jpeg"};base64,${X}`}if(K==="dominant-color"&&Z){let{dominant:C}=await Z(J).resize(1,1).toBuffer().then(async(X)=>{let Q=await Z(X).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${C.r}, ${C.g}, ${C.b})`}let $=await O(J),q=G.join(I.tmpdir(),`stx-ph-${H.randomBytes(8).toString("hex")}.${$.format==="unknown"?"bin":$.format}`);try{await Bun.write(q,J);let C=K==="blur"?"blur":K==="thumbhash"?"thumbhash":"dominant-color",Q=await m(q,{strategy:C,width:C==="thumbhash"?void 0:32});if(K==="dominant-color"&&Q.dominantColor)return Q.dominantColor;if(Q.dataURL)return Q.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{await U.promises.unlink(q).catch(()=>{})}}function KJ(J,K){return(K?J.filter(($)=>$.format===K):J).sort(($,q)=>$.width-q.width).map(($)=>`${$.url} ${$.width}w`).join(", ")}function ZJ(J){if(!J||Object.keys(J).length===0)return"100vw";return Object.entries(J).sort((Z,$)=>{let q=Number.parseInt(Z[0].replace(/\D/g,""))||0;return(Number.parseInt($[0].replace(/\D/g,""))||0)-q}).map(([Z,$])=>`(max-width: ${Z}) ${$}`).join(", ")+", 100vw"}function $J(J){let K=J.filter(($)=>$.format==="jpeg");if(K.length===0)return J[Math.floor(J.length/2)];let Z=K.sort(($,q)=>$.width-q.width);return Z[Math.floor(Z.length/2)]}function qJ(J){let K=new Map;for(let Z of J){let $=K.get(Z.format)||[];$.push(Z),K.set(Z.format,$)}return K}function CJ(J){let K=G.extname(J).toLowerCase();return u.includes(K)}function QJ(J){return P[J]||"application/octet-stream"}function VJ(J){return J.reduce((K,Z)=>K+Z.size,0)}function XJ(J){if(J<1024)return`${J} B`;if(J<1048576)return`${(J/1024).toFixed(1)} KB`;return`${(J/1048576).toFixed(2)} MB`}class L extends Error{code;constructor(J,K){super(J);this.name="ImageProcessingError",this.code=K}}
2
+ import{Ou as l}from"./chunk-qs0fp63n.js";import U from"fs";import G from"path";import I from"os";import H from"crypto";import{generatePlaceholder as m,processImage as g}from"ts-images";var d=[320,640,768,1024,1280,1536,1920],h=["webp","jpeg"],b=80,u=[".jpg",".jpeg",".png",".webp",".avif",".gif",".svg"],P={webp:"image/webp",avif:"image/avif",jpeg:"image/jpeg",png:"image/png"},N=null,W=!1;async function Y(){if(W)return N;W=!0;try{let J=await import("sharp");return N=J.default||J,N}catch{return null}}async function e(){return await Y()!==null}async function t(){return!0}async function JJ(J,K={}){let{widths:Z=d,formats:$=h,quality:q=b,fit:C="cover",placeholder:X="none",outputDir:Q=".stx/images",baseUrl:_="/images"}=K,j,x;if(typeof J==="string"){if(x=J,!await Bun.file(J).exists())throw new L(`Image not found: ${J}`,"NOT_FOUND");j=await Bun.file(J).arrayBuffer().then((V)=>Buffer.from(V))}else x="buffer-input",j=J;let w=H.createHash("sha256").update(j).digest("hex").slice(0,12),y=await O(j),{width:B,height:D}=y,A=B/D;await U.promises.mkdir(Q,{recursive:!0});let T=[],v=G.basename(x,G.extname(x)),z=Z.filter((V)=>V<=B);if(!z.includes(B)&&B<=Math.max(...Z))z.push(B);z.sort((V,R)=>V-R);for(let V of z){let R=Math.round(V/A);for(let F of $){let S=`${v}-${V}w-${w}.${F}`,k=G.join(Q,S),c=`${_}/${S}`,E=await n(j,{width:V,height:R,format:F,quality:q,fit:C});await Bun.write(k,E),T.push({path:k,url:c,width:V,height:R,format:F,size:E.length})}}let M;if(X!=="none")M=await o(j,X);return{src:x,variants:T,placeholder:M,width:B,height:D,aspectRatio:A,hash:w}}async function O(J){let K=typeof J==="string"?Buffer.from(await Bun.file(J).arrayBuffer()):J,Z=await Y();if(Z){let q=await Z(K).metadata();return{width:q.width||0,height:q.height||0,format:q.format||"unknown",hasAlpha:q.hasAlpha}}return p(K)}function p(J){if(J[0]===137&&J[1]===80&&J[2]===78&&J[3]===71){let K=J.readUInt32BE(16),Z=J.readUInt32BE(20);return{width:K,height:Z,format:"png",hasAlpha:!0}}if(J[0]===255&&J[1]===216){let K=2;while(K<J.length){if(J[K]!==255)break;let Z=J[K+1];if(Z>=192&&Z<=207&&Z!==196&&Z!==200&&Z!==204){let q=J.readUInt16BE(K+5);return{width:J.readUInt16BE(K+7),height:q,format:"jpeg",hasAlpha:!1}}let $=J.readUInt16BE(K+2);K+=2+$}}if(J.toString("utf8",0,4)==="RIFF"&&J.toString("utf8",8,12)==="WEBP"){let K=J.toString("utf8",12,16);if(K==="VP8 "){let Z=J.readUInt16LE(26)&16383,$=J.readUInt16LE(28)&16383;return{width:Z,height:$,format:"webp",hasAlpha:!1}}if(K==="VP8L"){let Z=J.readUInt32LE(21),$=(Z&16383)+1,q=(Z>>14&16383)+1;return{width:$,height:q,format:"webp",hasAlpha:!0}}}if(J.toString("utf8",0,3)==="GIF"){let K=J.readUInt16LE(6),Z=J.readUInt16LE(8);return{width:K,height:Z,format:"gif",hasAlpha:!0}}throw new L("Unable to parse image dimensions","PARSE_ERROR")}async function n(J,K){let Z=await Y();if(Z){let q=Z(J).resize(K.width,K.height,{fit:K.fit});switch(K.format){case"webp":q=q.webp({quality:K.quality});break;case"avif":q=q.avif({quality:K.quality});break;case"jpeg":q=q.jpeg({quality:K.quality});break;case"png":q=q.png({quality:K.quality});break}return q.toBuffer()}let $=G.join(I.tmpdir(),`stx-img-${H.randomBytes(8).toString("hex")}.${K.format}`);try{return await g({input:J,output:$,format:K.format,quality:K.quality,resize:{width:K.width,height:K.height,fit:K.fit}}),Buffer.from(await Bun.file($).arrayBuffer())}finally{await U.promises.unlink($).catch(()=>{})}}async function o(J,K){let Z=await Y();if(K==="blur"&&Z){let X=(await Z(J).resize(20).blur(10).toBuffer()).toString("base64"),Q=await O(J);return`data:${P[Q.format]||"image/jpeg"};base64,${X}`}if(K==="dominant-color"&&Z){let{dominant:C}=await Z(J).resize(1,1).toBuffer().then(async(X)=>{let Q=await Z(X).metadata();return{dominant:{r:128,g:128,b:128}}}).catch(()=>({dominant:{r:128,g:128,b:128}}));return`rgb(${C.r}, ${C.g}, ${C.b})`}let $=await O(J),q=G.join(I.tmpdir(),`stx-ph-${H.randomBytes(8).toString("hex")}.${$.format==="unknown"?"bin":$.format}`);try{await Bun.write(q,J);let C=K==="blur"?"blur":K==="thumbhash"?"thumbhash":"dominant-color",Q=await m(q,{strategy:C,width:C==="thumbhash"?void 0:32});if(K==="dominant-color"&&Q.dominantColor)return Q.dominantColor;if(Q.dataURL)return Q.dataURL;return"rgb(128, 128, 128)"}catch{return"rgb(128, 128, 128)"}finally{await U.promises.unlink(q).catch(()=>{})}}function KJ(J,K){return(K?J.filter(($)=>$.format===K):J).sort(($,q)=>$.width-q.width).map(($)=>`${$.url} ${$.width}w`).join(", ")}function ZJ(J){if(!J||Object.keys(J).length===0)return"100vw";return Object.entries(J).sort((Z,$)=>{let q=Number.parseInt(Z[0].replace(/\D/g,""))||0;return(Number.parseInt($[0].replace(/\D/g,""))||0)-q}).map(([Z,$])=>`(max-width: ${Z}) ${$}`).join(", ")+", 100vw"}function $J(J){let K=J.filter(($)=>$.format==="jpeg");if(K.length===0)return J[Math.floor(J.length/2)];let Z=K.sort(($,q)=>$.width-q.width);return Z[Math.floor(Z.length/2)]}function qJ(J){let K=new Map;for(let Z of J){let $=K.get(Z.format)||[];$.push(Z),K.set(Z.format,$)}return K}function CJ(J){let K=G.extname(J).toLowerCase();return u.includes(K)}function QJ(J){return P[J]||"application/octet-stream"}function VJ(J){return J.reduce((K,Z)=>K+Z.size,0)}function XJ(J){if(J<1024)return`${J} B`;if(J<1048576)return`${(J/1024).toFixed(1)} KB`;return`${(J/1048576).toFixed(2)} MB`}class L extends Error{code;constructor(J,K){super(J);this.name="ImageProcessingError",this.code=K}}
3
3
  export{d as dh,h as eh,b as fh,e as gh,t as hh,JJ as ih,O as jh,n as kh,KJ as lh,ZJ as mh,$J as nh,qJ as oh,CJ as ph,QJ as qh,VJ as rh,XJ as sh,L as th};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-j4ze77e0.js";var N=0;function P(){return`eb-${++N}-${Date.now().toString(36)}`}function W(q,z={},A){let j=/@errorBoundary(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@enderrorBoundary/gi;return q.replace(j,(D,F,J,K)=>{let L=P(),M=Q(F||"");return T(L,J.trim(),K.trim(),M)})}function Q(q){let z={},A=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\w+))/g,j;while((j=A.exec(q))!==null){let D=j[1],F=j[2]||j[3]||j[4];switch(D){case"id":z.id=F;break;case"logErrors":z.logErrors=F==="true";break}}return z}function T(q,z,A,j){let D=j.logErrors!==!1;return`
2
+ import"./chunk-qs0fp63n.js";var N=0;function P(){return`eb-${++N}-${Date.now().toString(36)}`}function W(q,z={},A){let j=/@errorBoundary(?:\s*\(([^)]*)\))?\s*([\s\S]*?)@fallback\s*([\s\S]*?)@enderrorBoundary/gi;return q.replace(j,(D,F,J,K)=>{let L=P(),M=Q(F||"");return T(L,J.trim(),K.trim(),M)})}function Q(q){let z={},A=/(\w+)\s*:\s*(?:'([^']*)'|"([^"]*)"|(\w+))/g,j;while((j=A.exec(q))!==null){let D=j[1],F=j[2]||j[3]||j[4];switch(D){case"id":z.id=F;break;case"logErrors":z.logErrors=F==="true";break}}return z}function T(q,z,A,j){let D=j.logErrors!==!1;return`
3
3
  <div class="stx-error-boundary" data-boundary-id="${q}" data-has-error="false">
4
4
  <div class="stx-error-boundary-content" data-boundary-content="${q}">
5
5
  ${z}
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Bq as b,Cq as c,Dq as d,Eq as e,bp as a}from"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
@@ -1,4 +1,4 @@
1
1
  // @bun
2
2
  var K={},Y=[],O={};function I(){return K}function h(){return O}function D(){K={},Y.length=0,O={}}function U(j){K=Q(K,j)}function Q(j,z){return{title:z.title??j.title,titleTemplate:z.titleTemplate??j.titleTemplate,base:z.base??j.base,meta:[...j.meta||[],...z.meta||[]],link:[...j.link||[],...z.link||[]],script:[...j.script||[],...z.script||[]],style:[...j.style||[],...z.style||[]],htmlAttrs:{...j.htmlAttrs,...z.htmlAttrs},bodyAttrs:{...j.bodyAttrs,...z.bodyAttrs}}}function Z(j){U(_(j))}function _(j){let z=[];if(j.description)z.push({name:"description",content:j.description});if(j.keywords){let L=Array.isArray(j.keywords)?j.keywords.join(", "):j.keywords;z.push({name:"keywords",content:L})}if(j.author)z.push({name:"author",content:j.author});if(j.robots)z.push({name:"robots",content:j.robots});let A=j.ogTitle??j.title,B=j.ogDescription??j.description;if(A)z.push({property:"og:title",content:A});if(B)z.push({property:"og:description",content:B});if(j.ogImage)z.push({property:"og:image",content:j.ogImage});if(j.ogUrl)z.push({property:"og:url",content:j.ogUrl});if(j.ogType)z.push({property:"og:type",content:j.ogType});if(j.ogSiteName)z.push({property:"og:site_name",content:j.ogSiteName});if(j.ogLocale)z.push({property:"og:locale",content:j.ogLocale});let E=j.twitterTitle??j.title,F=j.twitterDescription??j.description,J=j.twitterImage??j.ogImage;if(j.twitterCard)z.push({name:"twitter:card",content:j.twitterCard});if(E)z.push({name:"twitter:title",content:E});if(F)z.push({name:"twitter:description",content:F});if(J)z.push({name:"twitter:image",content:J});if(j.twitterSite)z.push({name:"twitter:site",content:j.twitterSite});if(j.twitterCreator)z.push({name:"twitter:creator",content:j.twitterCreator});if(j.articleAuthor)z.push({property:"article:author",content:j.articleAuthor});if(j.articlePublishedTime)z.push({property:"article:published_time",content:j.articlePublishedTime});if(j.articleModifiedTime)z.push({property:"article:modified_time",content:j.articleModifiedTime});if(j.articleSection)z.push({property:"article:section",content:j.articleSection});if(j.articleTags)for(let L of j.articleTags)z.push({property:"article:tag",content:L});let G=[];if(j.canonical)G.push({rel:"canonical",href:j.canonical});return{title:j.title,titleTemplate:j.titleTemplate,meta:z,link:G}}function S(j){if(O={...O,...j},j.title||j.description)Z({title:j.title,description:j.description})}function P(j){let z=typeof j==="function"?j():j;U({title:z})}function C(j=K){let z=[];if(j.title){let A=j.title;if(j.titleTemplate)A=typeof j.titleTemplate==="function"?j.titleTemplate(A):j.titleTemplate.replace("%s",A);z.push(`<title>${N(A)}</title>`)}if(j.base){let A=Object.entries(j.base).map(([B,E])=>`${B}="${N(E)}"`).join(" ");z.push(`<base ${A}>`)}for(let A of j.meta||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>{return`${E==="httpEquiv"?"http-equiv":E}="${N(String(F))}"`}).join(" ");z.push(`<meta ${B}>`)}for(let A of j.link||[]){let B=Object.entries(A).filter(([E,F])=>F!==void 0).map(([E,F])=>`${E}="${N(String(F))}"`).join(" ");z.push(`<link ${B}>`)}for(let A of j.script||[]){let{content:B,...E}=A,F=Object.entries(E).filter(([J,G])=>G!==void 0).map(([J,G])=>{if(typeof G==="boolean")return G?J:"";return`${J}="${N(String(G))}"`}).filter(Boolean).join(" ");if(B)z.push(`<script ${F}>${B}</script>`);else z.push(`<script ${F}></script>`)}for(let A of j.style||[]){let B=A.type?` type="${A.type}"`:"";z.push(`<style${B}>${A.content}</style>`)}return z.join(`
3
3
  `)}function M(j=K){if(!j.htmlAttrs)return"";return Object.entries(j.htmlAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function V(j=K){if(!j.bodyAttrs)return"";return Object.entries(j.bodyAttrs).map(([z,A])=>`${z}="${N(A)}"`).join(" ")}function N(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function w(j=K){if(typeof document>"u")return;if(j.title){let z=j.title;if(j.titleTemplate)z=typeof j.titleTemplate==="function"?j.titleTemplate(z):j.titleTemplate.replace("%s",z);document.title=z}for(let z of j.meta||[]){let A=z.name?`meta[name="${z.name}"]`:z.property?`meta[property="${z.property}"]`:null;if(A){let B=document.querySelector(A);if(!B){if(B=document.createElement("meta"),z.name)B.setAttribute("name",z.name);if(z.property)B.setAttribute("property",z.property);document.head.appendChild(B)}B.setAttribute("content",z.content)}}for(let z of j.link||[]){let A=`link[rel="${z.rel}"]${z.href?`[href="${z.href}"]`:""}`,B=document.querySelector(A);if(!B)B=document.createElement("link"),document.head.appendChild(B);for(let[E,F]of Object.entries(z))if(F!==void 0)B.setAttribute(E,String(F))}if(j.htmlAttrs)for(let[z,A]of Object.entries(j.htmlAttrs))if(z==="class")for(let B of String(A).split(/\s+/).filter(Boolean))document.documentElement.classList.add(B);else document.documentElement.setAttribute(z,A);if(j.bodyAttrs)for(let[z,A]of Object.entries(j.bodyAttrs))document.body.setAttribute(z,A)}function y(j){let z="";return{content:j.replace(/@head\s*([\s\S]*?)@endhead/g,(B,E)=>{return z+=E.trim()+`
4
- `,""}),headContent:z.trim()}}function x(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let J=B?E:z[(F||"").trim()]??F,G=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(G,{title:J}),""})}function T(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,J,G)=>{let L=F?J:G,R=F?L:z[(L||"").trim()]??L,W=E.includes(":")?{property:E,content:R}:{name:E,content:R},X=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(X,{meta:[W]}),""})}export{I as kt,h as lt,D as mt,U as nt,Q as ot,Z as pt,_ as qt,S as rt,P as st,C as tt,M as ut,V as vt,w as wt,y as xt,x as yt,T as zt};
4
+ `,""}),headContent:z.trim()}}function x(j,z){return j.replace(/@title\s*\(\s*(?:(['"`])(.+?)\1|([^)]+))\s*\)/g,(A,B,E,F)=>{let J=B?E:z[(F||"").trim()]??F,G=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(G,{title:J}),""})}function T(j,z){return j.replace(/@meta\s*\(\s*(['"`])(.+?)\1\s*,\s*(?:(['"`])(.+?)\3|([^)]+))\s*\)/g,(A,B,E,F,J,G)=>{let L=F?J:G,R=F?L:z[(L||"").trim()]??L,W=E.includes(":")?{property:E,content:R}:{name:E,content:R},X=z.__stx_runtime_head??{};return z.__stx_runtime_head=Q(X,{meta:[W]}),""})}export{I as lt,h as mt,D as nt,U as ot,Q as pt,Z as qt,_ as rt,S as st,P as tt,C as ut,M as vt,V as wt,w as xt,y as yt,x as zt,T as At};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-j4ze77e0.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
2
+ import{a as N,c as R,e as W,g as j,i as H,k as J}from"./chunk-0y46fbkx.js";import{l as k,m as w,n as B}from"./chunk-q9n5swx7.js";import"./chunk-qs0fp63n.js";import E from"fs";import K from"path";var V=[];function _(U){V=[];for(let A of U.storyFiles)if(V.push({text:A.fileName.toLowerCase(),original:A.fileName,type:"story",storyId:A.id}),V.push({text:A.relativePath.toLowerCase(),original:A.relativePath,type:"story",storyId:A.id}),A.story)for(let z of A.story.variants)V.push({text:z.title.toLowerCase(),original:z.title,type:"story",storyId:A.id,variantId:z.id})}function $(){return JSON.stringify(V)}async function O(U={}){let A=Date.now();N();let z=await k({mode:"build"});if(!z.config.enabled){W("Story feature is disabled in config.");return}let P=await H(z);w(z,P);let Y=J(z.config,P);B(z,Y),R(P.length);let X=U.outDir??z.config.outDir,Q=K.resolve(z.root,X);await E.promises.mkdir(Q,{recursive:!0}),console.log(` Building to ${X}...`);let M=F(z);await E.promises.writeFile(K.join(Q,"index.html"),M);let v={files:P.map((G)=>({id:G.id,fileName:G.fileName,relativePath:G.relativePath,treePath:G.treePath})),tree:Y};await E.promises.writeFile(K.join(Q,"stories.json"),JSON.stringify(v,null,2));let L={theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets};await E.promises.writeFile(K.join(Q,"config.json"),JSON.stringify(L,null,2));let Z=K.join(Q,"stories");await E.promises.mkdir(Z,{recursive:!0});for(let G of P){let g=await E.promises.readFile(G.path,"utf-8");await E.promises.writeFile(K.join(Z,`${G.id}.stx`),g)}_(z);let T=$();await E.promises.writeFile(K.join(Q,"search-index.json"),T);let C=Date.now()-A;j(P.length,X,C)}function F(U){let{theme:A}=U.config,z=A.title||"STX Story";return`<!DOCTYPE html>
3
3
  <html lang="en">
4
4
  <head>
5
5
  <meta charset="UTF-8">
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ms as a,Ns as b,Os as c,Ps as d,Qs as e,Rs as f,Ss as g,Ts as h,Us as i,Vs as j,Ws as k,Xs as l,Ys as m}from"./chunk-nnd1hqht.js";import"./chunk-xgtcq9bj.js";import"./chunk-j4ze77e0.js";export{f as resolveUserCrosswindConfig,c as resetCssCache,d as resetCrosswindCache,i as rebuildCrosswindCSS,e as loadCrosswindConfig,b as loadCrosswind,m as injectCrosswindCSS,a as getCrosswindServeAsset,j as getCachedCSS,l as generateCrosswindCSS,g as fingerprintConfig,k as extractClassNames,h as buildCrosswindCSS};
2
+ import{Ns as a,Os as b,Ps as c,Qs as d,Rs as e,Ss as f,Ts as g,Us as h,Vs as i,Ws as j,Xs as k,Ys as l,Zs as m}from"./chunk-b220zqbz.js";import"./chunk-1px4xey5.js";import"./chunk-qs0fp63n.js";export{f as resolveUserCrosswindConfig,c as resetCssCache,d as resetCrosswindCache,i as rebuildCrosswindCSS,e as loadCrosswindConfig,b as loadCrosswind,m as injectCrosswindCSS,a as getCrosswindServeAsset,j as getCachedCSS,l as generateCrosswindCSS,g as fingerprintConfig,k as extractClassNames,h as buildCrosswindCSS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ri as a,si as b,ti as c,ui as d,vi as e,wi as f,xi as g}from"./chunk-94fee5jw.js";import"./chunk-j4ze77e0.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
2
+ import{ri as a,si as b,ti as c,ui as d,vi as e,wi as f,xi as g}from"./chunk-94fee5jw.js";import"./chunk-qs0fp63n.js";export{c as shouldCacheComponent,a as processKeepAliveDirectives,g as onDeactivated,f as onActivated,e as generateKeepAliveRuntime,d as generateKeepAliveCSS,b as createKeepAliveCache};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
2
  var j=["batch","computed","configureFetch","defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","defineStore","derived","effect","goBack","goForward","inject","invalidateRoute","isDerived","isSignal","navigate","nextTick","onBeforeMount","onBeforeUnmount","onDestroy","onMount","onMounted","onUnmounted","peek","provide","reactive","ref","refresh","registerStoresClient","setRouteParams","state","untrack","useAsync","useClickOutside","useColorMode","useCookie","useCounter","useDark","useDebounce","useDebouncedValue","useEventListener","useFetch","useFocus","useHead","useId","useInterval","useLocalStorage","useMediaQuery","useMutation","useOptimistic","usePreferredContrast","usePreferredDark","usePreferredLight","usePreferredReducedMotion","useQuery","useReactiveProp","useRef","useRoute","useRouteParam","useRouteParams","useScrollLock","useSearchParams","useSeoMeta","useSessionStorage","useSlots","useStore","useThrottle","useTimeout","useToggle","useWebSocket","watch","watchEffect","watchMultiple","withDefaults"],X=["onMount","onDestroy"];function B(z="const",F=[],J){let Z=F.length?j.filter((Q)=>!F.includes(Q)):j;if(J!==void 0)Z=Z.filter((Q)=>{let $=Q.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(^|[^\\w$])${$}(?![\\w$])`).test(J)});return`${z} { ${Z.join(", ")} } = window.stx;`}var W=["defineEmits","defineExpose","definePageMeta","defineProps","defineSlots","withDefaults"],D={redirect:{category:"server-only",reason:"returns an HTTP Response for <script server>/edge/build; use navigate() on the client."},useAsyncData:{category:"browser-composable",reason:"inlined on demand from src/composables when a script references it; reachable, not a bare global."},Teleport:{category:"compile-time-directive",reason:"template tag resolved by processTeleportDirectives; not a script callable."},StxModalBuiltin:{category:"builtin-component",reason:"builtin component used as a template tag; drive open/close from the modal store."},StxToastBuiltin:{category:"builtin-component",reason:"builtin component used as a template tag; push toasts via the toast store."},useForm:{category:"browser-composable",reason:"reactive form primitive; lives in src/composables/use-form.ts and is inlined on demand when a <script client> references it (#1846)."},defineForm:{category:"browser-composable",reason:"deprecated alias of useForm, kept for a minor (#1843). Same delivery path \u2014 inlined on demand from src/composables/use-form.ts."},validateFields:{category:"isomorphic-import",reason:"pure validation helper; import it directly, not auto-delivered to <script client> (per client-api-delivery.test.ts)."},validateField:{category:"isomorphic-import",reason:"singular pure validation helper; same explicit-import boundary as validateFields."}},Y=j.filter((z)=>!W.includes(z));function V(z){if(!z)return!1;return Y.some((F)=>new RegExp(`\\b${F}\\s*(?:<[^>]*>)?\\s*\\(`).test(z))}var P=[/@if\s*=/,/@for\s*=/,/@show\s*=/,/@model\s*=/,/@bind:/,/@class\s*=/,/@style\s*=/,/\bx-data\s*=/,/\bstate\s*(?:<[^>]*>)?\s*\(/,/\bderived\s*(?:<[^>]*>)?\s*\(/,/\beffect\s*(?:<[^>]*>)?\s*\(/,/\bref\s*(?:<[^>]*>)?\s*\(/,/\bcomputed\s*(?:<[^>]*>)?\s*\(/,/\breactive\s*(?:<[^>]*>)?\s*\(/,/\bwatch\s*(?:<[^>]*>)?\s*\(/,/\bwatchEffect\s*(?:<[^>]*>)?\s*\(/,/\s:[a-z][\w-]*\s*=\s*["']/i,/\s:(?:if|else-if|else|for|show|text|html|model)\s*=/,/data-stx(?:-auto)?(?![-\w])/,/data-stx-scoped/],C=/\s@[a-z][\w.:-]*\s*=/i;function G(z){if(!z)return!1;let F=K(z);if(P.some((J)=>J.test(F)))return!0;return V(F)}function H(z){if(!z)return!1;return C.test(K(z))||G(z)}var f=["if","else-if","elseif","else","for","show","key","text","html","model","ref"];function w(z){return f.includes(z.toLowerCase())}var q=["x-text","x-html","x-model","x-show","x-if","x-for","x-cloak","x-ref","x-data","x-bind","x-class","x-style","x-tooltip","x-tooltip-position"],U=["x-init","x-transition","x-effect","x-on"],M=[...q,...U];function O(){return`{${q.map((z)=>`'${z}':1`).join(",")}}`}function K(z){if(!z)return z;let F=(J)=>J.replace(/(<[^>]*>)|([^<]+)/g,(Z,Q,$)=>Q??" ".repeat($.length));return z.replace(/(<pre\b[^>]*>)([\s\S]*?)(<\/pre>)/gi,(J,Z,Q,$)=>Z+F(Q)+$).replace(/(<code\b[^>]*>)([\s\S]*?)(<\/code>)/gi,(J,Z,Q,$)=>Z+F(Q)+$).replace(/<!--[\s\S]*?-->/g,(J)=>" ".repeat(J.length))}
3
- export{j as Ct,X as Dt,B as Et,W as Ft,D as Gt,Y as Ht,V as It,G as Jt,H as Kt,f as Lt,w as Mt,q as Nt,U as Ot,M as Pt,O as Qt,K as Rt};
3
+ export{j as Dt,X as Et,B as Ft,W as Gt,D as Ht,Y as It,V as Jt,G as Kt,H as Lt,f as Mt,w as Nt,q as Ot,U as Pt,M as Qt,O as Rt,K as St};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Du as y}from"./chunk-r2kag877.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-crosswind=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"crosswind",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-crosswind="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{Eu as y}from"./chunk-z2gmz9ew.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-crosswind=(?:"generated"|'generated')[^>]*)>([\s\S]*?)<\/style>/gi,prefix:"crosswind",extension:"css",contentType:"text/css; charset=utf-8",replace:(M)=>`<link data-crosswind="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 vk,_ as wk,a as xk,s as yk,h as zk,f as Ak,c as Bk,HM as Ck};
@@ -1,6 +1,6 @@
1
1
  // @bun
2
- import{it as Jq}from"./chunk-xgtcq9bj.js";import{Nu as Gq}from"./chunk-j4ze77e0.js";import $ from"path";import{hasLocalConfig as Uq}from"bunfig";var a={fg:{light:"gray-900",dark:"gray-100",description:"Primary text"},"fg-strong":{light:"gray-700",dark:"gray-300",description:"Labels, secondary headings"},"fg-muted":{light:"gray-600",dark:"gray-400",description:"Supporting text"},"fg-soft":{light:"gray-500",dark:"gray-400",description:"De-emphasised text"},"fg-subtle":{light:"gray-400",dark:"gray-500",description:"Placeholders, disabled text"},surface:{light:"gray-50",dark:"gray-800",description:"Page and panel background"},"surface-raised":{light:"gray-100",dark:"gray-700",description:"Cards, popovers"},"surface-sunken":{light:"gray-200",dark:"gray-700",description:"Wells, track backgrounds"},line:{light:"gray-200",dark:"gray-700",description:"Default border, divider"},"line-strong":{light:"gray-300",dark:"gray-600",description:"Input border, focus ring track"},accent:{light:"indigo-600",dark:"indigo-400",description:"Primary action, selected state"},info:{light:"blue-600",dark:"blue-400",description:"Informational emphasis, links"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-500",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"indigo-600",dark:"indigo-500",description:"Primary button fill"},"info-solid":{light:"blue-600",dark:"blue-500",description:"Informational fill"},"danger-solid":{light:"red-600",dark:"red-500",description:"Destructive button fill"},"success-solid":{light:"green-600",dark:"green-500",description:"Confirmation fill"}};function m(G){return`--stx-${G}`}function p(G,q){let Q=q.lastIndexOf("-");if(Q===-1)return typeof G[q]==="string"?G[q]:void 0;let J=G[q.slice(0,Q)];if(!J||typeof J!=="object")return;let Y=J[q.slice(Q+1)];return typeof Y==="string"?Y:void 0}function o(G){let q={};for(let[Q,J]of Object.entries(a)){let Y=p(G,J.light);if(Y===void 0)continue;q[Q]=`var(${m(Q)}, ${Y})`}return q}function t(G){let q=[],Q=[];for(let[J,Y]of Object.entries(a)){let Z=p(G,Y.light),U=p(G,Y.dark);if(Z===void 0)continue;if(q.push(` ${m(J)}: ${Z};`),U!==void 0)Q.push(` ${m(J)}: ${U};`)}if(q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...q,"}",".dark {",...Q,"}",""].join(`
3
- `)}function s(G){return typeof G==="object"&&G!==null&&!Array.isArray(G)}function g(G,q){let Q={...G};for(let[J,Y]of Object.entries(q))Q[J]=s(Y)&&s(Q[J])?g(Q[J],Y):Y;return Q}function e(G={},q={}){let Q=G.theme||{},J=q.theme||{},{extend:Y,...Z}=J,{extend:U,...z}=Q,X=z.colors||{};z.colors={...X,...o(X)};let A=g(z,Z),L=g(U||{},Y||{});if(Object.keys(L).length>0)A.extend=L;let H=[...G.safelist||[],...q.safelist||[]],E={...G.shortcuts||{},...q.shortcuts||{}},P=[...G.preflights||[],...q.preflights||[]];return{config:{...G,...q,theme:A,safelist:H,shortcuts:E,...P.length>0?{preflights:P}:{},content:[],output:""},safelist:H,shortcuts:E,includePreflight:q.preflight!==!1,minify:q.minify===!0,tokenCSS:t(X)}}var W={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};var F=null,C=!1,_=null,b="",K=!1,Qq=256,V=new Map,O=new Map,j=null,d=null;function S(G){return Bun.hash(G).toString(16).padStart(16,"0").slice(0,16)}function u(G,q){if(V.has(G))V.delete(G);else if(V.size>=Qq)V.delete(V.keys().next().value);V.set(G,q)}function Wq(G){let q=S(G);if(O.has(q))O.delete(q);else if(O.size>=Qq)O.delete(O.keys().next().value);return O.set(q,G),q}function Dq(G){let q=O.get(G);if(q===void 0)return;return O.delete(G),O.set(G,q),q}async function Xq(G){if(!j)return null;try{let q=Bun.file($.join(j,`cw-${S(G)}.css`));if(!await q.exists())return null;return await q.text()}catch{return null}}async function zq(G,q){if(!j)return;try{if(!fs.existsSync(j))fs.mkdirSync(j,{recursive:!0});await Bun.write($.join(j,`cw-${S(G)}.css`),q)}catch{}}async function qq(G){try{let q=await import(G);if(q&&q.CSSGenerator)return{CSSGenerator:q.CSSGenerator,config:q.config,build:q.build,defaultConfig:q.defaultConfig,extractClasses:q.extractClasses}}catch{}return null}function Iq(){let G=[],q=process.cwd();while(q!==$.dirname(q))G.push($.join(q,"node_modules","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"node_modules","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"pantry","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"pantry","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"node_modules","@stacksjs","crosswind","dist","index.js")),G.push($.join(q,"pantry","@stacksjs","crosswind","dist","index.js")),q=$.dirname(q);return G}function Oq(){let G=[],q=process.env.HOME||process.env.USERPROFILE||"";if(q){let Q=[$.join(q,"Code","Tools","crosswind","packages","crosswind","dist","index.js"),$.join(q,"Code","Tools","crosswind","packages","crosswind","src","index.ts"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","dist","index.js"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","src","index.ts"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@cwcss","crosswind","dist","index.js"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@stacksjs","crosswind","dist","index.js")];G.push(...Q)}return G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","dist","index.js")),G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","src","index.ts")),G}async function Yq(){if(C)return F;C=!0;try{let G=async(Y)=>{for(let Z of Y){if(!await Bun.file(Z).exists())continue;let U=await qq(Z);if(U){if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded from ${$.dirname($.dirname(Z))}`);return U}}return null};if(process.env.CROSSWIND_SRC){let Y=$.resolve(process.env.CROSSWIND_SRC),Z=await G([Y]);if(!Z)throw Error(`CROSSWIND_SRC did not resolve to a Crosswind module: ${Y}`);return F=Z,F}let q=await G(Iq());if(q)return F=q,F;let Q=["@cwcss/crosswind","@cwcss/crosswind/dist/index.js","@stacksjs/crosswind","@stacksjs/crosswind/dist/index.js"];for(let Y of Q){let Z=await qq(Y);if(Z){if(F=Z,!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded`);return F}}let J=await G(Oq());if(J)return F=J,F;throw Error("Crosswind CSSGenerator not found in any location")}catch{return console.warn(`${W.yellow}[Crosswind] CSS engine not available, Tailwind styles will not be generated${W.reset}`),console.warn(`${W.yellow}Run 'bun add @stacksjs/crosswind' to enable CSS generation${W.reset}`),null}}function Sq(){V.clear(),O.clear()}function xq(){F=null,C=!1,_=null,b="",V.clear(),O.clear(),d=null}async function Zq(G){try{if(!Uq({name:"crosswind",cwd:G}))return null;let{loadConfigWithResult:q}=await import("bunfig"),Q=await q({name:"crosswind",cwd:G,defaultConfig:{},checkEnv:!1,verbose:!1});if(!Q?.path||!Q.config||Object.keys(Q.config).length===0)return null;let J=$.relative(G,Q.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} Loaded config from ${J||Q.path}`);return Q.config}catch(q){if(q instanceof Error&&q.name==="ConfigNotFoundError")return null;return console.warn(`${W.yellow}[Crosswind]${W.reset} Failed to load crosswind config:`,q instanceof Error?q.message:q),null}}async function _q(G){let q=null;try{let{loadStxConfig:Q}=await import("./chunk-jqnckvbk.js"),J=await Q(G);if(J.css)if(typeof J.css==="string"){let Y=$.isAbsolute(J.css)?J.css:$.resolve(G,J.css);if(await Bun.file(Y).exists()){let Z=await import(Y);q=Z.default||Z,console.log(`${W.green}[Crosswind]${W.reset} Loaded config from stx.config.ts \u2192 ${J.css}`)}}else{if(q={...J.css,content:J.css.content||[],preflight:J.css.preflight??!0,minify:J.css.minify??!1},J.css.config){let Y=$.isAbsolute(J.css.config)?J.css.config:$.resolve(G,J.css.config);if(await Bun.file(Y).exists()){let Z=await import(Y);q={...Z.default||Z,...q}}}console.log(`${W.green}[Crosswind]${W.reset} Using inline CSS config from stx.config.ts`)}}catch{}return q||await Zq(G)}function Fq(G){try{let q=new WeakSet;return S(JSON.stringify(G??{},(Q,J)=>{if(typeof J==="function")return`[fn]${String(J)}`;if(typeof J==="object"&&J!==null){if(q.has(J))return"[circular]";q.add(J)}return J})??"")}catch{return"unhashable"}}async function Nq(G){if(K)return b;K=!0;try{let q=await Yq();if(!q||!q.build)return K=!1,"";if(!_)_=await Zq(G);if(!_)return K=!1,"";let Q=q.defaultConfig?.theme||{},J=_.theme||{},Y={...q.defaultConfig,..._,theme:{...Q,...J,extend:{...Q.extend||{},...J.extend||{}}}},Z=performance.now(),U=await q.build(Y),z=performance.now()-Z;if(b=U.css,console.log(`${W.cyan}[Crosswind]${W.reset} Built ${U.classes.size} classes in ${z.toFixed(1)}ms`),Y.output){let X=$.isAbsolute(Y.output)?Y.output:$.join(G,Y.output),A=$.dirname(X);if(!fs.existsSync(A))fs.mkdirSync(A,{recursive:!0});await Bun.write(X,U.css)}return K=!1,U.css}catch(q){return console.error(`${W.red}[Crosswind]${W.reset} Build error:`,q),K=!1,b}}async function kq(G){_=null,await Nq(G)}function wq(){return b}function Vq(G){let q=new Set,Q=/class\s*=\s*["']([^"']+)["']/gi,J=Q.exec(G);while(J!==null){for(let U of J[1].split(/\s+/))if(U.trim())q.add(U.trim());J=Q.exec(G)}let Y=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,Z=Y.exec(G);while(Z!==null){let U=Z[1].match(/'([^']+)'/g);if(U){for(let z of U)for(let X of z.slice(1,-1).split(/\s+/))if(X.trim())q.add(X.trim())}Z=Y.exec(G)}return q}async function jq(G,q){try{let Q=await Yq();if(!Q)return"";let J=typeof Q.extractClasses==="function"?Q.extractClasses(G):Vq(G);if(J.size===0)return"";let Y=q?$.resolve(q):process.cwd();if(!j)j=Jq(Y,"cache");let Z=[...J].sort().join(" "),U=`${d||"default"}::${Z}`,z=V.get(U);if(z!==void 0)return u(U,z),z;let X=await Xq(U);if(X!==null)return u(U,X),X;if(!_)_=await _q(Y),d=Fq(_);let A=Q.defaultConfig||Q.config,L=_||{},H=e(A,L),{safelist:E,includePreflight:P,minify:x,tokenCSS:$q}=H,h=H.config,R=new Q.CSSGenerator(h);for(let I of E)R.generate(I);for(let I of J)R.generate(I);let N=R.toCSS(P,x),i=h.shortcuts||L.shortcuts||{};for(let[I,k]of Object.entries(i)){if(!J.has(I)&&!E.includes(I))continue;let w=k.split(/\s+/).filter(Boolean);for(let T of w)R.generate(T)}N=R.toCSS(P,x);let B=N.split(`
2
+ import{jt as Jq}from"./chunk-1px4xey5.js";import{Ou as Gq}from"./chunk-qs0fp63n.js";import $ from"path";import{hasLocalConfig as Uq}from"bunfig";var a={fg:{light:"gray-900",dark:"gray-100",description:"Primary text"},"fg-strong":{light:"gray-700",dark:"gray-300",description:"Labels, secondary headings"},"fg-muted":{light:"gray-600",dark:"gray-400",description:"Supporting text"},"fg-soft":{light:"gray-500",dark:"gray-400",description:"De-emphasised text"},"fg-subtle":{light:"gray-400",dark:"gray-500",description:"Placeholders, disabled text"},surface:{light:"gray-50",dark:"gray-800",description:"Page and panel background"},"surface-raised":{light:"gray-100",dark:"gray-700",description:"Cards, popovers"},"surface-sunken":{light:"gray-200",dark:"gray-700",description:"Wells, track backgrounds"},line:{light:"gray-200",dark:"gray-700",description:"Default border, divider"},"line-strong":{light:"gray-300",dark:"gray-600",description:"Input border, focus ring track"},accent:{light:"indigo-600",dark:"indigo-400",description:"Primary action, selected state"},info:{light:"blue-600",dark:"blue-400",description:"Informational emphasis, links"},danger:{light:"red-600",dark:"red-400",description:"Errors, destructive actions"},success:{light:"green-600",dark:"green-400",description:"Confirmation"},warning:{light:"yellow-500",dark:"yellow-400",description:"Caution"},"accent-solid":{light:"indigo-600",dark:"indigo-500",description:"Primary button fill"},"info-solid":{light:"blue-600",dark:"blue-500",description:"Informational fill"},"danger-solid":{light:"red-600",dark:"red-500",description:"Destructive button fill"},"success-solid":{light:"green-600",dark:"green-500",description:"Confirmation fill"}};function m(G){return`--stx-${G}`}function p(G,q){let Q=q.lastIndexOf("-");if(Q===-1)return typeof G[q]==="string"?G[q]:void 0;let J=G[q.slice(0,Q)];if(!J||typeof J!=="object")return;let Y=J[q.slice(Q+1)];return typeof Y==="string"?Y:void 0}function o(G){let q={};for(let[Q,J]of Object.entries(a)){let Y=p(G,J.light);if(Y===void 0)continue;q[Q]=`var(${m(Q)}, ${Y})`}return q}function t(G){let q=[],Q=[];for(let[J,Y]of Object.entries(a)){let Z=p(G,Y.light),U=p(G,Y.dark);if(Z===void 0)continue;if(q.push(` ${m(J)}: ${Z};`),U!==void 0)Q.push(` ${m(J)}: ${U};`)}if(q.length===0)return"";return["/* stx role tokens \u2014 override any of these to re-theme by meaning. */",":root {",...q,"}",".dark {",...Q,"}",""].join(`
3
+ `)}function s(G){return typeof G==="object"&&G!==null&&!Array.isArray(G)}function g(G,q){let Q={...G};for(let[J,Y]of Object.entries(q))Q[J]=s(Y)&&s(Q[J])?g(Q[J],Y):Y;return Q}function e(G={},q={}){let Q=G.theme||{},J=q.theme||{},{extend:Y,...Z}=J,{extend:U,...z}=Q,X=z.colors||{};z.colors={...X,...o(X)};let A=g(z,Z),L=g(U||{},Y||{});if(Object.keys(L).length>0)A.extend=L;let H=[...G.safelist||[],...q.safelist||[]],E={...G.shortcuts||{},...q.shortcuts||{}},P=[...G.preflights||[],...q.preflights||[]];return{config:{...G,...q,theme:A,safelist:H,shortcuts:E,...P.length>0?{preflights:P}:{},content:[],output:""},safelist:H,shortcuts:E,includePreflight:q.preflight!==!1,minify:q.minify===!0,tokenCSS:t(X)}}var W={reset:"\x1B[0m",bright:"\x1B[1m",dim:"\x1B[2m",underscore:"\x1B[4m",blink:"\x1B[5m",reverse:"\x1B[7m",hidden:"\x1B[8m",black:"\x1B[30m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m",white:"\x1B[37m",gray:"\x1B[90m",bgBlack:"\x1B[40m",bgRed:"\x1B[41m",bgGreen:"\x1B[42m",bgYellow:"\x1B[43m",bgBlue:"\x1B[44m",bgMagenta:"\x1B[45m",bgCyan:"\x1B[46m",bgWhite:"\x1B[47m",bgGray:"\x1B[100m"};var F=null,C=!1,_=null,b="",K=!1,Qq=256,V=new Map,O=new Map,j=null,d=null;function S(G){return Bun.hash(G).toString(16).padStart(16,"0").slice(0,16)}function u(G,q){if(V.has(G))V.delete(G);else if(V.size>=Qq)V.delete(V.keys().next().value);V.set(G,q)}function Wq(G){let q=S(G);if(O.has(q))O.delete(q);else if(O.size>=Qq)O.delete(O.keys().next().value);return O.set(q,G),q}function Dq(G){let q=O.get(G);if(q===void 0)return;return O.delete(G),O.set(G,q),q}async function Xq(G){if(!j)return null;try{let q=Bun.file($.join(j,`cw-${S(G)}.css`));if(!await q.exists())return null;return await q.text()}catch{return null}}async function zq(G,q){if(!j)return;try{if(!fs.existsSync(j))fs.mkdirSync(j,{recursive:!0});await Bun.write($.join(j,`cw-${S(G)}.css`),q)}catch{}}async function qq(G){try{let q=await import(G);if(q&&q.CSSGenerator)return{CSSGenerator:q.CSSGenerator,config:q.config,build:q.build,defaultConfig:q.defaultConfig,extractClasses:q.extractClasses}}catch{}return null}function Iq(){let G=[],q=process.cwd();while(q!==$.dirname(q))G.push($.join(q,"node_modules","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"node_modules","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"pantry","@cwcss","crosswind","dist","index.js")),G.push($.join(q,"pantry","@cwcss","crosswind","src","index.ts")),G.push($.join(q,"node_modules","@stacksjs","crosswind","dist","index.js")),G.push($.join(q,"pantry","@stacksjs","crosswind","dist","index.js")),q=$.dirname(q);return G}function Oq(){let G=[],q=process.env.HOME||process.env.USERPROFILE||"";if(q){let Q=[$.join(q,"Code","Tools","crosswind","packages","crosswind","dist","index.js"),$.join(q,"Code","Tools","crosswind","packages","crosswind","src","index.ts"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","dist","index.js"),$.join(q,"repos","stacks-org","crosswind","packages","crosswind","src","index.ts"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@cwcss","crosswind","dist","index.js"),$.join(q,"Code","Tools","stx","packages","stx","node_modules","@stacksjs","crosswind","dist","index.js")];G.push(...Q)}return G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","dist","index.js")),G.push($.join(process.cwd(),"..","crosswind","packages","crosswind","src","index.ts")),G}async function Yq(){if(C)return F;C=!0;try{let G=async(Y)=>{for(let Z of Y){if(!await Bun.file(Z).exists())continue;let U=await qq(Z);if(U){if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded from ${$.dirname($.dirname(Z))}`);return U}}return null};if(process.env.CROSSWIND_SRC){let Y=$.resolve(process.env.CROSSWIND_SRC),Z=await G([Y]);if(!Z)throw Error(`CROSSWIND_SRC did not resolve to a Crosswind module: ${Y}`);return F=Z,F}let q=await G(Iq());if(q)return F=q,F;let Q=["@cwcss/crosswind","@cwcss/crosswind/dist/index.js","@stacksjs/crosswind","@stacksjs/crosswind/dist/index.js"];for(let Y of Q){let Z=await qq(Y);if(Z){if(F=Z,!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} CSS engine loaded`);return F}}let J=await G(Oq());if(J)return F=J,F;throw Error("Crosswind CSSGenerator not found in any location")}catch{return console.warn(`${W.yellow}[Crosswind] CSS engine not available, Tailwind styles will not be generated${W.reset}`),console.warn(`${W.yellow}Run 'bun add @stacksjs/crosswind' to enable CSS generation${W.reset}`),null}}function Sq(){V.clear(),O.clear()}function xq(){F=null,C=!1,_=null,b="",V.clear(),O.clear(),d=null}async function Zq(G){try{if(!Uq({name:"crosswind",cwd:G}))return null;let{loadConfigWithResult:q}=await import("bunfig"),Q=await q({name:"crosswind",cwd:G,defaultConfig:{},checkEnv:!1,verbose:!1});if(!Q?.path||!Q.config||Object.keys(Q.config).length===0)return null;let J=$.relative(G,Q.path);if(!process.env.STACKS_DEV_QUIET)console.log(`${W.green}[Crosswind]${W.reset} Loaded config from ${J||Q.path}`);return Q.config}catch(q){if(q instanceof Error&&q.name==="ConfigNotFoundError")return null;return console.warn(`${W.yellow}[Crosswind]${W.reset} Failed to load crosswind config:`,q instanceof Error?q.message:q),null}}async function _q(G){let q=null;try{let{loadStxConfig:Q}=await import("./chunk-r4wxxggc.js"),J=await Q(G);if(J.css)if(typeof J.css==="string"){let Y=$.isAbsolute(J.css)?J.css:$.resolve(G,J.css);if(await Bun.file(Y).exists()){let Z=await import(Y);q=Z.default||Z,console.log(`${W.green}[Crosswind]${W.reset} Loaded config from stx.config.ts \u2192 ${J.css}`)}}else{if(q={...J.css,content:J.css.content||[],preflight:J.css.preflight??!0,minify:J.css.minify??!1},J.css.config){let Y=$.isAbsolute(J.css.config)?J.css.config:$.resolve(G,J.css.config);if(await Bun.file(Y).exists()){let Z=await import(Y);q={...Z.default||Z,...q}}}console.log(`${W.green}[Crosswind]${W.reset} Using inline CSS config from stx.config.ts`)}}catch{}return q||await Zq(G)}function Fq(G){try{let q=new WeakSet;return S(JSON.stringify(G??{},(Q,J)=>{if(typeof J==="function")return`[fn]${String(J)}`;if(typeof J==="object"&&J!==null){if(q.has(J))return"[circular]";q.add(J)}return J})??"")}catch{return"unhashable"}}async function Nq(G){if(K)return b;K=!0;try{let q=await Yq();if(!q||!q.build)return K=!1,"";if(!_)_=await Zq(G);if(!_)return K=!1,"";let Q=q.defaultConfig?.theme||{},J=_.theme||{},Y={...q.defaultConfig,..._,theme:{...Q,...J,extend:{...Q.extend||{},...J.extend||{}}}},Z=performance.now(),U=await q.build(Y),z=performance.now()-Z;if(b=U.css,console.log(`${W.cyan}[Crosswind]${W.reset} Built ${U.classes.size} classes in ${z.toFixed(1)}ms`),Y.output){let X=$.isAbsolute(Y.output)?Y.output:$.join(G,Y.output),A=$.dirname(X);if(!fs.existsSync(A))fs.mkdirSync(A,{recursive:!0});await Bun.write(X,U.css)}return K=!1,U.css}catch(q){return console.error(`${W.red}[Crosswind]${W.reset} Build error:`,q),K=!1,b}}async function kq(G){_=null,await Nq(G)}function wq(){return b}function Vq(G){let q=new Set,Q=/class\s*=\s*["']([^"']+)["']/gi,J=Q.exec(G);while(J!==null){for(let U of J[1].split(/\s+/))if(U.trim())q.add(U.trim());J=Q.exec(G)}let Y=/(?:x-class|:class)\s*=\s*"([^"]+)"/gi,Z=Y.exec(G);while(Z!==null){let U=Z[1].match(/'([^']+)'/g);if(U){for(let z of U)for(let X of z.slice(1,-1).split(/\s+/))if(X.trim())q.add(X.trim())}Z=Y.exec(G)}return q}async function jq(G,q){try{let Q=await Yq();if(!Q)return"";let J=typeof Q.extractClasses==="function"?Q.extractClasses(G):Vq(G);if(J.size===0)return"";let Y=q?$.resolve(q):process.cwd();if(!j)j=Jq(Y,"cache");let Z=[...J].sort().join(" "),U=`${d||"default"}::${Z}`,z=V.get(U);if(z!==void 0)return u(U,z),z;let X=await Xq(U);if(X!==null)return u(U,X),X;if(!_)_=await _q(Y),d=Fq(_);let A=Q.defaultConfig||Q.config,L=_||{},H=e(A,L),{safelist:E,includePreflight:P,minify:x,tokenCSS:$q}=H,h=H.config,R=new Q.CSSGenerator(h);for(let I of E)R.generate(I);for(let I of J)R.generate(I);let N=R.toCSS(P,x),i=h.shortcuts||L.shortcuts||{};for(let[I,k]of Object.entries(i)){if(!J.has(I)&&!E.includes(I))continue;let w=k.split(/\s+/).filter(Boolean);for(let T of w)R.generate(T)}N=R.toCSS(P,x);let B=N.split(`
4
4
  `);for(let[I,k]of Object.entries(i)){if(!J.has(I)&&!E.includes(I))continue;let w=k.split(/\s+/).filter(Boolean),T=[],y=[];for(let v of w){let c=v.startsWith("dark:"),n=`.${(c?v.slice(5):v).replace(/\//g,"\\/").replace(/:/g,"\\:").replace(/\./g,"\\.").replace(/\[/g,"\\[").replace(/\]/g,"\\]").replace(/%/g,"\\%")}`;for(let M=0;M<B.length;M++){let l=B[M].trim();if(l===`${n} {`||l.startsWith(`${n} {`)){let D=M,r="";while(D<B.length){if(r+=B[D],B[D].includes("}"))break;D++}let f=r.match(/\{([^}]+)\}/);if(f)if(c)y.push(f[1].trim());else T.push(f[1].trim());break}}}if(T.length)N+=`
5
5
  .${I} { ${T.join(" ")} }`;if(y.length)N+=`
6
6
  @media (prefers-color-scheme: dark) { .dark .${I} { ${y.join(" ")} } }`}return N=$q+N,u(U,N),zq(U,N),N}catch(Q){return console.warn("Failed to generate Crosswind CSS:",Q),""}}async function yq(G,q,Q=!1){let J=await jq(G,q);if(!J)return G;let Y=Q?`<link data-crosswind="generated" rel="stylesheet" href="/_stx/crosswind.${Wq(J)}.css">`:`<style data-crosswind="generated">
@@ -8,4 +8,4 @@ ${J}
8
8
  </style>`,Z=/(?:<style\b[^>]*\bdata-crosswind=(?:"generated"|'generated')[^>]*>[\s\S]*?<\/style>|<link\b[^>]*\bdata-crosswind=(?:"generated"|'generated')[^>]*>)/g;if(Z.test(G)){let U=!1;return G.replace(Z,()=>{if(U)return"";return U=!0,Y})}if(G.includes("</head>"))return G.replace("</head>",`${Y}
9
9
  </head>`);if(G.includes("<body"))return G.replace(/<body([^>]*)>/,`<body$1>
10
10
  ${Y}`);return Y+G}
11
- export{g as Js,e as Ks,W as Ls,Dq as Ms,Yq as Ns,Sq as Os,xq as Ps,Zq as Qs,_q as Rs,Fq as Ss,Nq as Ts,kq as Us,wq as Vs,Vq as Ws,jq as Xs,yq as Ys};
11
+ export{g as Ks,e as Ls,W as Ms,Dq as Ns,Yq as Os,Sq as Ps,xq as Qs,Zq as Rs,_q as Ss,Fq as Ts,Nq as Us,kq as Vs,wq as Ws,Vq as Xs,jq as Ys,yq as Zs};
@@ -0,0 +1,22 @@
1
+ // @bun
2
+ import{Ul as C}from"./chunk-v2vv4etv.js";import{Js as Y}from"./chunk-mv2v3g62.js";import{Dt as O}from"./chunk-ax56kn66.js";import u from"path";var y=/<script(\s[^>]*)?>([\s\S]*?)<\/script>/gi;function h(K){let J=(Z)=>Z.replace(/[^\n]/g," ");return K.replace(/<!--[\s\S]*?-->/g,J).replace(/\{\{--[\s\S]*?--\}\}/g,J)}function p(K){let J=[],Z=h(K);y.lastIndex=0;let $;while(($=y.exec(Z))!==null){let j=($[1]||"").trim(),F=($[0].match(/^<script(?:\s[^>]*)?>/i)?.[0]??"<script>").length,z=($[0].match(/<\/script\s*>$/i)?.[0]??"</script>").length,W=$.index+F,Q=$.index+$[0].length-z,U=K.slice(W,Q);if(/\bsrc\s*=/.test(j))continue;let X=j.match(/\btype\s*=\s*["']([^"']+)["']/i);if(X&&!/^(?:module|text\/(?:javascript|typescript))$/i.test(X[1]))continue;let q=/\bserver\b/.test(j)?"server":/\bclient\b/.test(j)?"client":"plain",G=B(K,W);J.push({kind:q,code:U,startLine:G,attrs:j})}return J}function B(K,J){let Z=1;for(let $=0;$<J&&$<K.length;$++)if(K.charCodeAt($)===10)Z++;return Z}function N(K,J){let Z=K.lastIndexOf(`
3
+ `,J-1)+1;return J-Z+1}function I(K){let J=K.split(""),Z=(j,F)=>{for(let z=j;z<F&&z<J.length;z++)if(J[z]!==`
4
+ `)J[z]=" "},$=[/<script(?:\s[^>]*)?>[\s\S]*?<\/script>/gi,/<style(?:\s[^>]*)?>[\s\S]*?<\/style>/gi,/<!--[\s\S]*?-->/g,/\{\{--[\s\S]*?--\}\}/g,/@verbatim\b[\s\S]*?@endverbatim\b/g];for(let j of $){j.lastIndex=0;let F;while((F=j.exec(K))!==null)Z(F.index,F.index+F[0].length)}return J.join("")}function m(K){let J=0,Z="";for(let $=0;$<K.length;$++){let j=K[$];if(Z){if(j==="\\"){$++;continue}if(j===Z)Z="";continue}if(j==='"'||j==="'"||j==="`"){Z=j;continue}if(j==="("||j==="["||j==="{"){J++;continue}if(j===")"||j==="]"||j==="}"){J--;continue}if(j==="|"&&J===0){if(K[$+1]==="|"){$++;continue}if(K[$-1]==="|")continue;return K.slice(0,$)}}return K}var R=new Set([":for","x-for","v-for"]),w=/(?:^|\s)((?::|x-|v-|@)[\w.:-]+)\s*=\s*(["'])([\s\S]*?)\2/g,D="__stx_interpolated",g="__StxElement",f="__StxTemplateValue",l=`type ${f}<T> = T extends { readonly _isSignal: true } | { readonly _isDerived: true } ? (T extends () => infer V ? T & V : T) : T`;function S(K){return K.replace(/\{\{[\s\S]*?\}\}/g,D).replace(/\{!![\s\S]*?!!\}/g,D)}function qj(K){return K.replace(/\{\{[\s\S]*?\}\}|\{!![\s\S]*?!!\}/g,(J)=>{let Z=J.split(`
5
+ `).length-1,$=J.length-Z;return`0${" ".repeat(Math.max(0,$-1))}${`
6
+ `.repeat(Z)}`})}var d=["foreach","endforeach","forelse","endforelse","for","endfor","while","endwhile","empty","if","elseif","else","endif","unless","endunless","isset","endisset","switch","case","default","endswitch","auth","endauth","guest","endguest","env","endenv","once","endonce","break","continue"],i=new RegExp(String.raw`^[ \t]*@(?:${d.join("|")})\b[ \t]*(\([^\n)]*\))?[ \t]*$`,"gm");function Hj(K){return K.replace(i,(J)=>J.replace(/[^\n]/g," "))}var L=new Set(["x-cloak","x-ref","x-transition","x-teleport","v-slot","x-hydrate",":key","x-tooltip","x-tooltip-position"]);function c(K){let J=I(K),Z=[],$=/(@?)\{\{([\s\S]*?)\}\}|(@?)\{!!([\s\S]*?)!!\}/g,j;while((j=$.exec(J))!==null){if(j[1]||j[3])continue;let z=j[2]??j[4]??"",W=j[2]!==void 0?2:3,Q=m(z);if(!Q.trim())continue;let U=j.index+W+(Q.length-Q.trimStart().length);Z.push({code:Q.trim(),line:B(J,U),column:N(J,U),offset:U,kind:"interpolation"})}w.lastIndex=0;while((j=w.exec(J))!==null){let F=j[1],z=j[3]??"",W=F.replace(/\..*$/,"").replace(/^([^:].*?):.*$/,"$1");if(L.has(W)||L.has(F))continue;if(!z.trim())continue;let Q=j.index+j[0].indexOf(j[2],j[0].indexOf(F)+F.length)+1;if(R.has(W)){let X=z.match(/\s+(?:in|of)\s+/);if(!X||X.index===void 0)continue;let q=z.slice(X.index+X[0].length),G=X.index+X[0].length+(q.length-q.trimStart().length);Z.push({code:S(q.trim()),line:B(J,Q+G),column:N(J,Q+G),offset:Q+G,kind:"directive",attribute:W});continue}let U=z.length-z.trimStart().length;Z.push({code:S(z.trim()),line:B(J,Q+U),column:N(J,Q+U),offset:Q+U,kind:"directive",attribute:W})}return Z.sort((F,z)=>F.line-z.line||F.column-z.column),Z}function o(K){let J=new Map,Z=(W,Q)=>{let U=W.split(/[,[\]{}()\s]+/).filter(Boolean);for(let X of U){let q=X.replace(/^\.\.\./,"").trim();if(!/^\$?[A-Z_$][\w$]*$/i.test(q))continue;let G=U.length===1?Q:void 0,H=J.get(q);if(!H)J.set(q,{name:q,iterable:G});else if(H.iterable!==G)H.iterable=void 0}},$=/^\$?[A-Z_$][\w$]*$/i,j=(W)=>{let Q=W.trim();return $.test(Q)?Q:void 0};for(let W of K.matchAll(/@for(?:each|else)\s*\(([\s\S]*?)\)/g)){let Q=W[1].match(/^([\s\S]*?)\bas\b([\s\S]*)$/);if(!Q)continue;Z(Q[2].replace(/=>/g," "),j(Q[1]))}for(let W of K.matchAll(/@for\s*\(\s*(?:let|const|var)\s+([\w$]+)/g))Z(W[1]);let F=I(K);w.lastIndex=0;let z;while((z=w.exec(F))!==null){let W=z[1].replace(/\..*$/,"");if(!R.has(W))continue;let Q=z[3].match(/\s+(?:in|of)\s+/);if(!Q||Q.index===void 0)continue;Z(z[3].slice(0,Q.index),j(z[3].slice(Q.index+Q[0].length)))}for(let W of K.matchAll(/@(?:php|js|ts)\b([\s\S]*?)@end(?:php|js|ts)\b/g))for(let Q of W[1].matchAll(/\b(?:const|let|var|function|class)\s+([\w$]+)/g))Z(Q[1]);return[...J.values()].sort((W,Q)=>W.name.localeCompare(Q.name))}function V(K){let J=new Set;for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s+([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:async\s+)?function\s*\*?\s*([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?class\s+([\w$]+)/gm))J.add(Z[1]);for(let Z of K.matchAll(/^\s*(?:export\s+)?(?:const|let|var)\s*[[{]([^\]}]*)[\]}]/gm))for(let $ of Z[1].split(",")){let j=$.split(":").pop().split("=")[0].replace(/^\.\.\./,"").trim();if(/^[A-Z_$][\w$]*$/i.test(j))J.add(j)}return[...J].sort()}function r(){return["declare var window: any",...O.map((K)=>`declare var ${K}: any`)].join(`
7
+ `)}var n=["params","query","cookies","host","ip","setResponseStatus","setResponseHeader","notFound","request","url","definePageMeta","defineClientPayload","defineStore","props","$props"];function s(){return n.map((K)=>`declare var ${K}: any`).join(`
8
+ `)}function x(K){let J=/\bdefineClientPayload\s*\(\s*\{([\s\S]*?)\}\s*\)/g,Z,$=!1,j=new Set,F=Y(K);while((Z=J.exec(F))!==null){$=!0;for(let z of a(Z[1])){let W=z.split(":")[0].trim();if(/^[A-Za-z_$][\w$]*$/.test(W))j.add(W)}}return $?[...j]:null}function a(K){let J=[],Z=0,$="";for(let j of K){if(j===","&&Z===0){J.push($),$="";continue}if(j==="("||j==="["||j==="{")Z++;else if(j===")"||j==="]"||j==="}")Z--;$+=j}return J.push($),J.filter((j)=>j.trim().length>0)}function t(K){let J=/^[ \t]*import\b[\s\S]*?(?:from\s*['"][^'"]*['"]|['"][^'"]*['"])[ \t]*;?[ \t]*$/gm,Z=[],$=K.replace(J,(j)=>{return Z.push(j.trim()),j.split(`
9
+ `).map(()=>"").join(`
10
+ `)});return{imports:Z.join(`
11
+ `),body:$}}function T(K){let J=Y(K),Z=Array(J.length),$=0;for(let W=0;W<J.length;W++){let Q=J[W];if(Q==="}"||Q===")"||Q==="]")$=Math.max(0,$-1);if(Z[W]=$,Q==="{"||Q==="("||Q==="[")$++}let j=[],F=/^[ \t]*(?:export[ \t]+)?(interface|type)[ \t]+([A-Za-z_$][\w$]*)/gm,z;while((z=F.exec(J))!==null){if(Z[z.index]!==0)continue;let W=z[1],Q=z[2],U;if(W==="interface"){let X=J.indexOf("{",z.index);if(X===-1)continue;let q=0;U=-1;for(let G=X;G<J.length;G++)if(J[G]==="{")q++;else if(J[G]==="}"&&--q===0){U=G+1;break}if(U===-1)continue}else{let X=0;U=J.length;for(let q=J.indexOf("=",z.index)+1;q<J.length;q++){let G=J[q];if(G==="{"||G==="["||G==="("||G==="<")X++;else if(G==="}"||G==="]"||G===")"||G===">")X--;else if(X<=0&&(G===";"||G===`
12
+ `&&!/[=|&,<([{]\s*$/.test(J.slice(Math.max(0,q-40),q)))){U=G===";"?q+1:q;break}}}j.push({name:Q,text:K.slice(z.index,U).replace(/^[ \t]*export[ \t]+/,"")}),F.lastIndex=U}return j}function e(K){return new Set(T(K).map((J)=>J.name))}function Vj(K,J=""){let Z=x(K),$=e(J),j=T(K).filter((U)=>!$.has(U.name)).map((U)=>U.text);if(!Z){let U=V(K);if(U.length===0&&j.length===0)return"";return["",`// ${Jj}`,...j,...U.map((X)=>`declare var ${X}: any`)].join(`
13
+ `)}if(Z.length===0)return j.length>0?["",`// ${k}`,...j].join(`
14
+ `):"";let{imports:F,body:z}=t(K),W=z.replace(/^[ \t]*export[ \t]+(?=(?:const|let|var|function|async|class)\b)/gm,""),Q=["",`// ${k}`];if(F)Q.push(F);return Q.push(...j),Q.push(`async function ${A}() {`,W,` return { ${Z.join(", ")} }`,"}",`type ${_} = Awaited<ReturnType<typeof ${A}>>`,...Z.map((U)=>`declare var ${U}: ${_}[${JSON.stringify(U)}]`)),Q.join(`
15
+ `)}function jj(K){let Z=Y(K).split(""),$=0;for(let j=0;j<Z.length;j++){let F=Z[j];if(F==="{"||F==="("||F==="["){$++;continue}if(F==="}"||F===")"||F==="]"){$=Math.max(0,$-1);continue}if($>0&&F!==`
16
+ `)Z[j]=" "}return V(Z.join(""))}function Yj(K,J){if(x(K)!==null)return[];let Z=Y(J),$=new Set(O);return jj(K).filter((j)=>{if($.has(j))return!1;if(V(J).includes(j))return!1;return new RegExp(`(?<![.#\\w$])${j}(?![\\w$])`).test(Z)})}var k="stx: types for the declared client payload (#1868)",Jj="stx: untyped bridge names \u2014 declare a defineClientPayload to check these (#1868)",A="__stxServerScope",_="__StxClientPayload";var Kj=["$env","$user","$slot","$slots","$attrs","$props","$page","$route","$loop","loop","$errors","$csrf","props","slot"];var Qj=/^\s*[A-Z_$][\w$]*\s*=[^=]/i;function Zj(K,J){let Z=/@(if|unless|elseif|else|endif|endunless)\b\s*(\()?/g,$=[],j;while((j=Z.exec(K))!==null){if(j.index>=J)break;let F=j[1];if(F==="endif"||F==="endunless"){$.pop();continue}let z="";if(j[2]==="("){let W=0,Q=j.index+j[0].length-1,U=Q+1;for(;Q<K.length;Q++){let X=K[Q];if(X==="(")W++;else if(X===")"){if(W--,W===0)break}}z=K.slice(U,Q).trim(),Z.lastIndex=Q+1}if(F==="if")$.push({conditions:[z]});else if(F==="unless")$.push({conditions:[`!(${z})`]});else if(F==="elseif"||F==="else"){let W=$[$.length-1];if(!W)continue;let Q=W.conditions.map((U)=>`!(${U})`);W.conditions=F==="elseif"?[...Q,z]:Q}}return $.flatMap((F)=>F.conditions).filter(Boolean)}function $j(K){let J=K.code.trim();if(!J)return null;if(K.attribute?.startsWith("@")){if(Qj.test(J))return null;let $=";(($event: any): void => { ";return{text:`${$}${J} });`,prefixLength:$.length}}let Z=";void ((";return{text:`${Z}${J}));`,prefixLength:Z.length}}var zj=/(\bfrom\s*|\bimport\s*\(\s*|\bimport\s+)(['"])(\.{1,2}\/[^'"\n]*)\2/g;function Wj(K,J){if(!J)return K;return K.replace(zj,(Z,$,j,F)=>{let z=u.resolve(J,F).replace(/\\/g,"/");return`${$}${j}${z}${j}`})}function Bj(K,J={}){let Z=p(K),$=K.split(`
17
+ `),j=Array.from({length:$.length},()=>""),F=new Map;for(let W of Z)Wj(W.code,J.originDir??"").split(`
18
+ `).forEach((U,X)=>{let q=W.startLine-1+X;if(q<j.length)j[q]=U});let z=(W,Q)=>{if(j.push(W),Q)F.set(j.length,Q)};if(J.globals!==!1){if(z(""),J.runtimeGlobals!==!1)for(let Q of r().split(`
19
+ `))z(Q);for(let Q of s().split(`
20
+ `))z(Q);for(let Q of C)z(`declare var ${Q}: any`);for(let Q of Kj)z(`declare var ${Q}: any`);z(`declare var ${D}: any`);let W=new Set(Z.flatMap((Q)=>V(Q.code)));z(`type ${g}<T> = T extends readonly (infer E)[] ? E : T extends Iterable<infer E2> ? E2 : any`);for(let Q of o(K)){if(W.has(Q.name))continue;let U=Q.iterable&&W.has(Q.iterable)?`${g}<typeof ${Q.iterable}>`:"any";z(`declare var ${Q.name}: ${U}`)}}if(J.templateExpressions!==!1){let W=c(K).map((Q)=>({expression:Q,statement:$j(Q)})).filter((Q)=>Q.statement!==null);if(W.length>0){let Q=I(K),X=[...new Set(Z.flatMap((G)=>V(G.code)))].filter((G)=>/^[A-Z_$][\w$]*$/i.test(G)),q=0;if(X.length>0){z(l);for(let G of X)z(`type __StxT_${G} = ${f}<typeof ${G}>`);z(`;((${X.map((G)=>`${G}: __StxT_${G}`).join(", ")}) => {`),q=1}for(let{expression:G,statement:H}of W){let P=" ".repeat(q),M=G.offset===void 0?[]:Zj(Q,G.offset),v=M.length>0?`${M.map((b)=>`if (${b}) `).join("")}{ `:"",E=M.length>0?" }":"";z(P+v+H.text+E,{line:G.line,column:G.column,expression:G,prefixLength:H.prefixLength+P.length+v.length})}if(q>0)z("});")}}return z("export {}"),{text:j.join(`
21
+ `),lineMap:F,sourceLineCount:$.length}}function wj(K,J,Z){let $=K.lineMap.get(J);if(!$)return J<=K.sourceLineCount?{line:J,column:Z}:null;let j=Math.max(0,Z-1-($.prefixLength??0));return{line:$.line,column:$.column+j,expression:$.expression}}
22
+ export{p as Mf,qj as Nf,Hj as Of,c as Pf,V as Qf,s as Rf,Vj as Sf,Yj as Tf,Wj as Uf,Bj as Vf,wj as Wf};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-j4ze77e0.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
2
+ import"./chunk-qs0fp63n.js";function F(){return`<script data-stx-scoped data-stx-x-element-runtime data-stx-run="always">
3
3
  (function() {
4
4
  'use strict';
5
5
 
@@ -1,4 +1,4 @@
1
1
  // @bun
2
- import{Qf as p}from"./chunk-9g2rhkx8.js";import{Gg as a,Ig as JF,Jg as ZF,Kg as qF}from"./chunk-y805f58c.js";import{rj as C,sj as D}from"./chunk-qa8qmer5.js";import{Dk as QF,Ek as XF,Fk as YF}from"./chunk-frp9fc7j.js";import{Dq as c,Lm as u,Zo as o,_r as n,as as N,cm as l,em as d,eq as e,sq as t,zq as FF}from"./chunk-spnkgsft.js";import{Ys as r}from"./chunk-nnd1hqht.js";import{Bu as S,Du as WF}from"./chunk-r2kag877.js";import G from"fs";import Z from"path";import{createHash as $F}from"crypto";WF();function g(J){return $F("sha256").update(J).digest("hex").slice(0,8)}function f(J=!1){let q=J?D():C(),z=g(q);return{content:q,filename:`runtime.${z}.js`,hash:z}}function m(){let J=S(),q=g(J);return{content:J,filename:`router.${q}.js`,hash:q}}function UF(J){return{runtimeTag:J.runtime?`<script src="/__stx/${J.runtime.filename}"></script>`:"",routerTag:J.router?`<script src="/__stx/${J.router.filename}"></script>`:"",cssTag:J.css?`<link rel="stylesheet" href="/__stx/${J.css.filename}">`:""}}import h from"path";import{createHash as GF}from"crypto";function VF(J={}){let q=new Set;return{context:new Proxy(J,{get(Q,X){if(X in Q)return Q[X];if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return},has(Q,X){if(X in Q)return!0;if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return!1}}),accessedKeys:q}}async function i(J,q,z={}){let Q=h.resolve(J),X=await Bun.file(Q).text(),I=GF("sha256").update(X).digest("hex").slice(0,16);l();let K={};try{K=await N()}catch{}let B=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(X))!==null){let $=k[1];if(/\bserver\b/.test($))B.push(k[2])}let W=new Set(B.flatMap(($)=>p($))),{context:E}=VF({__filename:Q,__dirname:h.dirname(Q),__stx_serverDeclared:W}),L=new Set,_={...n,...K,...z,buildMode:"compile",strict:!1},w=await c(X,E,Q,_,L),U=a(w),H=d();return{route:q,sourceFile:J,html:w,fragment:U,placeholders:H,hasServerScripts:B.length>0,serverScriptContent:B,dependencies:Array.from(L),contentHash:I,status:u(X),streamTemplates:E.__streamTemplates}}var kF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function s(J,q){let z=0,Q=0;if(!G.existsSync(J))return{copied:z,bytes:Q};G.mkdirSync(q,{recursive:!0});function X(I,K){let B=G.readdirSync(I,{withFileTypes:!0});for(let V of B){if(kF.has(V.name))continue;let k=Z.join(I,V.name),W=Z.join(K,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),X(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),z++,Q+=G.statSync(W).size}}}return X(J,q),{copied:z,bytes:Q}}async function lF(J={}){let q=Date.now(),z=Z.resolve(J.root||process.cwd()),Q=Z.resolve(z,J.outputDir||".output");console.log("[stx build] Starting production build...");let X={};try{X=await N()}catch{}let I=J.componentsDir??X.componentsDir??"components",K=J.partialsDir??X.partialsDir??"partials",B=J.layoutsDir??X.layoutsDir??"layouts",V=J.publicDir??X.publicDir??"public",k=X.app?.head||{},W=X.app?.colorMode,E=X.router?.container||"main";if(G.existsSync(Q))G.rmSync(Q,{recursive:!0});let L=[Z.join(Q,"public","__stx"),Z.join(Q,"public","assets"),Z.join(Q,"server","pages"),Z.join(Q,"server","fragments")];for(let Y of L)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let _=o(z),w=["components","layouts","partials"],U=_.filter((Y)=>{return!w.some((F)=>Y.pattern.startsWith(`/${F}/`)||Y.pattern===`/${F}`)});console.log(`[stx build] Found ${U.length} page routes (${_.length-U.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let H=f(J.debug),$=m();await Bun.write(Z.join(Q,"public","__stx",H.filename),H.content),await Bun.write(Z.join(Q,"public","__stx",$.filename),$.content),console.log(`[stx build] Runtime: ${H.filename} (${(H.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let O=[],j=[];for(let Y of U)try{let F=await i(Y.filePath,Y.pattern,{componentsDir:I,partialsDir:K,layoutsDir:B,debug:J.debug});if(O.push(F),F.html=F.html.replace(/runtime\.__STX_HASH__\.js/g,H.filename).replace(/router\.__STX_HASH__\.js/g,$.filename),F.html=FF(F.html,k,{bodyScripts:[`<script src="/__stx/${$.filename}"></script>`],...W&&{colorMode:W}}),W)F.html=e(F.html,W);if(k.htmlAttrs)F.html=t(F.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(F.html)){let T=F.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(T&&T[1]){let P=T[1];F.html=F.html.replace(" "+P,""),F.html=F.html.replace(/<body([^>]*)>/,`<body$1 ${P}>`)}}F.html=F.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),F.html=await r(F.html),F.fragment=JF(F.html,E);let y=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),b=Z.join("server","pages",`${y}.compiled.json`),A=Z.join("server","fragments",`${y}.html`);await Bun.write(Z.join(Q,b),JSON.stringify(F,null,2)),await Bun.write(Z.join(Q,A),F.fragment),j.push({pattern:Y.pattern,compiledPath:b,fragmentPath:A,isDynamic:F.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("[")}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(F){console.error(`[stx build] \u2717 ${Y.pattern}:`,F instanceof Error?F.message:F)}let M=Z.resolve(z,V);if(G.existsSync(M)){let{copied:Y,bytes:F}=s(M,Z.join(Q,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${V}/`)}let v=YF(z);if(v){let{copied:Y,bytes:F}=s(v,Z.join(Q,"public",XF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${QF}/`)}let R={runtime:H.filename,router:$.filename},zF=ZF(j,R,Q);qF(zF,Q);let x=Date.now()-q;return console.log(`
2
+ import{Qf as p}from"./chunk-b5w02n3z.js";import{Gg as a,Ig as JF,Jg as ZF,Kg as qF}from"./chunk-nw7y6zw8.js";import{rj as C,sj as D}from"./chunk-g553n48p.js";import{Dk as QF,Ek as XF,Fk as YF}from"./chunk-frp9fc7j.js";import{$r as n,Aq as FF,Eq as c,Mm as u,_o as o,bs as N,dm as l,fm as d,fq as e,tq as t}from"./chunk-v2vv4etv.js";import{Zs as r}from"./chunk-b220zqbz.js";import{Cu as S,Eu as WF}from"./chunk-z2gmz9ew.js";import G from"fs";import Z from"path";import{createHash as $F}from"crypto";WF();function g(J){return $F("sha256").update(J).digest("hex").slice(0,8)}function f(J=!1){let q=J?D():C(),z=g(q);return{content:q,filename:`runtime.${z}.js`,hash:z}}function m(){let J=S(),q=g(J);return{content:J,filename:`router.${q}.js`,hash:q}}function UF(J){return{runtimeTag:J.runtime?`<script src="/__stx/${J.runtime.filename}"></script>`:"",routerTag:J.router?`<script src="/__stx/${J.router.filename}"></script>`:"",cssTag:J.css?`<link rel="stylesheet" href="/__stx/${J.css.filename}">`:""}}import h from"path";import{createHash as GF}from"crypto";function VF(J={}){let q=new Set;return{context:new Proxy(J,{get(Q,X){if(X in Q)return Q[X];if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return},has(Q,X){if(X in Q)return!0;if(typeof X==="string"&&!X.startsWith("__"))q.add(X);return!1}}),accessedKeys:q}}async function i(J,q,z={}){let Q=h.resolve(J),X=await Bun.file(Q).text(),I=GF("sha256").update(X).digest("hex").slice(0,16);l();let K={};try{K=await N()}catch{}let B=[],V=/<script\b([^>]*)>([\s\S]*?)<\/script>/gi,k;while((k=V.exec(X))!==null){let $=k[1];if(/\bserver\b/.test($))B.push(k[2])}let W=new Set(B.flatMap(($)=>p($))),{context:E}=VF({__filename:Q,__dirname:h.dirname(Q),__stx_serverDeclared:W}),L=new Set,_={...n,...K,...z,buildMode:"compile",strict:!1},w=await c(X,E,Q,_,L),U=a(w),H=d();return{route:q,sourceFile:J,html:w,fragment:U,placeholders:H,hasServerScripts:B.length>0,serverScriptContent:B,dependencies:Array.from(L),contentHash:I,status:u(X),streamTemplates:E.__streamTemplates}}var kF=new Set([".DS_Store","Thumbs.db","desktop.ini",".gitkeep",".gitignore"]);function s(J,q){let z=0,Q=0;if(!G.existsSync(J))return{copied:z,bytes:Q};G.mkdirSync(q,{recursive:!0});function X(I,K){let B=G.readdirSync(I,{withFileTypes:!0});for(let V of B){if(kF.has(V.name))continue;let k=Z.join(I,V.name),W=Z.join(K,V.name);if(V.isDirectory())G.mkdirSync(W,{recursive:!0}),X(k,W);else if(V.isFile()){if(G.existsSync(W))continue;G.copyFileSync(k,W),z++,Q+=G.statSync(W).size}}}return X(J,q),{copied:z,bytes:Q}}async function lF(J={}){let q=Date.now(),z=Z.resolve(J.root||process.cwd()),Q=Z.resolve(z,J.outputDir||".output");console.log("[stx build] Starting production build...");let X={};try{X=await N()}catch{}let I=J.componentsDir??X.componentsDir??"components",K=J.partialsDir??X.partialsDir??"partials",B=J.layoutsDir??X.layoutsDir??"layouts",V=J.publicDir??X.publicDir??"public",k=X.app?.head||{},W=X.app?.colorMode,E=X.router?.container||"main";if(G.existsSync(Q))G.rmSync(Q,{recursive:!0});let L=[Z.join(Q,"public","__stx"),Z.join(Q,"public","assets"),Z.join(Q,"server","pages"),Z.join(Q,"server","fragments")];for(let Y of L)G.mkdirSync(Y,{recursive:!0});console.log("[stx build] Discovering routes...");let _=o(z),w=["components","layouts","partials"],U=_.filter((Y)=>{return!w.some((F)=>Y.pattern.startsWith(`/${F}/`)||Y.pattern===`/${F}`)});console.log(`[stx build] Found ${U.length} page routes (${_.length-U.length} non-page files excluded)`),console.log("[stx build] Generating shared assets...");let H=f(J.debug),$=m();await Bun.write(Z.join(Q,"public","__stx",H.filename),H.content),await Bun.write(Z.join(Q,"public","__stx",$.filename),$.content),console.log(`[stx build] Runtime: ${H.filename} (${(H.content.length/1024).toFixed(1)}KB)`),console.log(`[stx build] Router: ${$.filename} (${($.content.length/1024).toFixed(1)}KB)`),console.log("[stx build] Compiling templates...");let O=[],j=[];for(let Y of U)try{let F=await i(Y.filePath,Y.pattern,{componentsDir:I,partialsDir:K,layoutsDir:B,debug:J.debug});if(O.push(F),F.html=F.html.replace(/runtime\.__STX_HASH__\.js/g,H.filename).replace(/router\.__STX_HASH__\.js/g,$.filename),F.html=FF(F.html,k,{bodyScripts:[`<script src="/__stx/${$.filename}"></script>`],...W&&{colorMode:W}}),W)F.html=e(F.html,W);if(k.htmlAttrs)F.html=t(F.html,k.htmlAttrs);if(!/<body[^>]*\bdata-stx=/.test(F.html)){let T=F.html.match(/<(?!body\b)[a-zA-Z][a-zA-Z0-9-]*\b[^>]*?\s(data-stx="[^"]+")[^>]*>/);if(T&&T[1]){let P=T[1];F.html=F.html.replace(" "+P,""),F.html=F.html.replace(/<body([^>]*)>/,`<body$1 ${P}>`)}}F.html=F.html.replace(/<style data-crosswind="generated">[\s\S]*?<\/style>\s*/g,""),F.html=await r(F.html),F.fragment=JF(F.html,E);let y=Y.pattern==="/"?"index":Y.pattern.slice(1).replace(/\//g,"-").replace(/[[\]]/g,"_"),b=Z.join("server","pages",`${y}.compiled.json`),A=Z.join("server","fragments",`${y}.html`);await Bun.write(Z.join(Q,b),JSON.stringify(F,null,2)),await Bun.write(Z.join(Q,A),F.fragment),j.push({pattern:Y.pattern,compiledPath:b,fragmentPath:A,isDynamic:F.hasServerScripts,hasParams:Y.pattern.includes(":")||Y.pattern.includes("[")}),console.log(`[stx build] \u2713 ${Y.pattern}`)}catch(F){console.error(`[stx build] \u2717 ${Y.pattern}:`,F instanceof Error?F.message:F)}let M=Z.resolve(z,V);if(G.existsSync(M)){let{copied:Y,bytes:F}=s(M,Z.join(Q,"public"));if(Y>0)console.log(`[stx build] Copied ${Y} public asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${V}/`)}let v=YF(z);if(v){let{copied:Y,bytes:F}=s(v,Z.join(Q,"public",XF));if(Y>0)console.log(`[stx build] Copied ${Y} asset${Y===1?"":"s"} (${(F/1024).toFixed(1)}KB) from ${QF}/`)}let R={runtime:H.filename,router:$.filename},zF=ZF(j,R,Q);qF(zF,Q);let x=Date.now()-q;return console.log(`
3
3
  [stx build] Done in ${x}ms \u2014 ${O.length} pages compiled`),{pageCount:O.length,assets:R,outputDir:Q,duration:x}}
4
4
  export{g as Gf,f as Hf,m as If,UF as Jf,i as Kf,lF as Lf};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{lk as a,mk as b,nk as c,ok as d}from"./chunk-fzxjrdnv.js";import"./chunk-j4ze77e0.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
2
+ import{lk as a,mk as b,nk as c,ok as d}from"./chunk-fzxjrdnv.js";import"./chunk-qs0fp63n.js";export{d as default,c as createHotReloadServer,b as compileToNative,a as NATIVE_COMPONENTS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$e as d,Ye as a,Ze as b,_e as c,af as e,bf as f,cf as g,df as h,ef as i,ff as j,gf as k,hf as l,if as m,jf as n,kf as o}from"./chunk-jy6madxa.js";import"./chunk-j4ze77e0.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};
2
+ import{$e as d,Ye as a,Ze as b,_e as c,af as e,bf as f,cf as g,df as h,ef as i,ff as j,gf as k,hf as l,if as m,jf as n,kf as o}from"./chunk-jy6madxa.js";import"./chunk-qs0fp63n.js";export{k as writeNetlifyConfig,n as initNetlify,l as hasNetlifyConfig,g as getTotalSize,h as generateNetlifyToml,f as formatSize,e as filterRequiredFiles,i as detectProjectConfig,m as deploy,a as createNetlifyClient,d as createFileManifest,j as createDefaultNetlifyConfig,c as collectDeployFiles,b as calculateSha1,o as DeployError};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{lf as t,mf as u,nf as v,of as w,pf as x,qf as y,rf as z,sf as A,tf as B,uf as C,vf as D,wf as E}from"./chunk-j2pmv4jw.js";import{hg as r,ig as s}from"./chunk-n7w8kgfw.js";import{dh as b,eh as c,fh as d,gh as e,hh as f,ih as g,jh as h,lh as i,mh as j,nh as k,oh as l,ph as m,qh as n,rh as o,sh as p,th as q}from"./chunk-k46js7bz.js";import{Ch as a}from"./chunk-rbke5wqk.js";import"./chunk-hk8j3eps.js";import"./chunk-j4ze77e0.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
2
+ import{lf as t,mf as u,nf as v,of as w,pf as x,qf as y,rf as z,sf as A,tf as B,uf as C,vf as D,wf as E}from"./chunk-shh4byc3.js";import{hg as r,ig as s}from"./chunk-1p0r6k2f.js";import{dh as b,eh as c,fh as d,gh as e,hh as f,ih as g,jh as h,lh as i,mh as j,nh as k,oh as l,ph as m,qh as n,rh as o,sh as p,th as q}from"./chunk-9228drk4.js";import{Ch as a}from"./chunk-rbke5wqk.js";import"./chunk-19m7hed6.js";import"./chunk-qs0fp63n.js";export{D as writeImageManifest,a as rewriteImagesWithSiblings,t as renderImageComponent,v as processImageComponents,g as processImage,u as parseImageComponent,A as optimizeImage,B as optimizeDirectory,e as isSharpAvailable,m as isImageFile,f as isImageBackendAvailable,y as imageDirective,r as handleImageRequest,l as groupVariantsByFormat,o as getTotalSize,n as getMimeType,h as getImageMetadata,k as getFallbackVariant,i as generateSrcSet,j as generateSizes,C as generateImageManifest,p as formatSize,E as defaultImageConfig,z as createImagePlugin,s as createImageHandler,x as createImageDirective,w as clearImageCache,q as ImageProcessingError,b as DEFAULT_WIDTHS,d as DEFAULT_QUALITY,c as DEFAULT_FORMATS};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import"./chunk-j4ze77e0.js";import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{createHash as g}from"crypto";var D={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},b=[/node_modules/,/vendor/,/bower_components/,/\.min\./],B=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function L(X,Z={}){let{includeSourceMaps:Q=!1,parseImports:$=!0,detectDuplicates:U=!0,topModulesCount:K=20}=Z;if(!v.existsSync(X))throw Error(`Build directory not found: ${X}`);if(!v.statSync(X).isDirectory())throw Error(`Not a directory: ${X}`);let q=await k(X,Q),J=[],F=[];for(let A of q)try{let O=await f(A,X,$);J.push(O)}catch(O){F.push(`Failed to process ${A}: ${O}`)}let Y=c(J,X),V=J.reduce((A,O)=>A+O.size,0),_=J.reduce((A,O)=>A+O.gzipSize,0),w=m(J),G=U?p(J):[],C=[...J].sort((A,O)=>O.size-A.size).slice(0,K);return{timestamp:Date.now(),buildDir:H.resolve(X),chunks:Y,totalSize:V,totalGzipSize:_,moduleCount:J.length,duplicates:G,byType:w,largestModules:C,warnings:F}}async function k(X,Z){let Q=[];async function $(U){let K=await v.promises.readdir(U,{withFileTypes:!0});for(let j of K){let q=H.join(U,j.name);if(j.isDirectory()){if(!j.name.startsWith(".")&&j.name!=="node_modules")await $(q)}else if(j.isFile()){if(!Z&&j.name.endsWith(".map"))continue;Q.push(q)}}}return await $(X),Q}async function f(X,Z,Q){let $=await v.promises.readFile(X),U=H.relative(Z,X),K=H.extname(X).toLowerCase(),j=$.length,q=y($),J=h($,K),F=g("md5").update($).digest("hex").slice(0,8),Y=D[K]||"other",V=[];if(Q&&Y==="js")V.push(...d($.toString("utf-8")));return{id:U,path:U,size:j,gzipSize:q,parsedSize:J,extension:K,type:Y,imports:V,importedBy:[],hash:F}}function y(X){try{let Z=z(X,{level:9}).length;return Math.min(Z,X.length)}catch{return X.length}}function h(X,Z){if(Z.includes(".min.")||X.length<1000)return X.length;let $=D[Z];if($==="js")return Math.round(X.length*0.6);if($==="css")return Math.round(X.length*0.7);return X.length}function d(X){let Z=[],Q=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,$;while(($=Q.exec(X))!==null)Z.push($[1]);let U=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=U.exec(X))!==null)Z.push($[1]);let K=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=K.exec(X))!==null)Z.push($[1]);return[...new Set(Z)]}function c(X,Z){let Q=new Map;for(let U of X){let K=U.path.split(H.sep),j;if(K.length===1)j=H.basename(U.path,U.extension);else j=K[0];let q=Q.get(j)||[];q.push(U),Q.set(j,q)}let $=[];for(let[U,K]of Q){let j=K.reduce((Y,V)=>Y+V.size,0),q=K.reduce((Y,V)=>Y+V.gzipSize,0),J=K.some((Y)=>B.some((V)=>V.test(Y.path))),F=K.some((Y)=>b.some((V)=>V.test(Y.path)));$.push({name:U,files:K.map((Y)=>Y.path),modules:K,size:j,gzipSize:q,isEntry:J,isVendor:F})}return $.sort((U,K)=>K.size-U.size)}function m(X){let Z={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let Q of X)Z[Q.type].count++,Z[Q.type].size+=Q.size,Z[Q.type].gzipSize+=Q.gzipSize;return Z}function p(X){let Z=new Map;for(let $ of X){let U=Z.get($.hash)||[];U.push($),Z.set($.hash,U)}let Q=[];for(let[,$]of Z)if($.length>1){let U=$[0];Q.push({path:U.path,count:$.length,wastedBytes:U.size*($.length-1),locations:$.map((K)=>K.path)})}return Q.sort(($,U)=>U.wastedBytes-$.wastedBytes)}function W(X){if(X<1024)return`${X} B`;if(X<1048576)return`${(X/1024).toFixed(2)} KB`;return`${(X/1048576).toFixed(2)} MB`}function I(X){let Z=X.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!Z)return 0;let Q=Number.parseFloat(Z[1]);switch((Z[2]||"B").toUpperCase()){case"KB":return Q*1024;case"MB":return Q*1024*1024;case"GB":return Q*1024*1024*1024;default:return Q}}function E(X,Z){if(Z===0)return"0%";return`${(X/Z*100).toFixed(1)}%`}function R(X,Z){switch(Z.format){case"json":return u(X,Z);case"markdown":return l(X,Z);case"text":default:return r(X,Z)}}function u(X,Z){let Q=N(X,Z);return JSON.stringify({timestamp:X.timestamp,buildDir:X.buildDir,summary:{totalSize:X.totalSize,totalSizeFormatted:W(X.totalSize),totalGzipSize:X.totalGzipSize,totalGzipSizeFormatted:W(X.totalGzipSize),moduleCount:X.moduleCount,chunkCount:X.chunks.length,duplicateCount:X.duplicates.length},byType:Object.fromEntries(Object.entries(X.byType).map(([$,U])=>[$,{...U,sizeFormatted:W(U.size),gzipSizeFormatted:W(U.gzipSize)}])),chunks:X.chunks.map(($)=>({name:$.name,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),moduleCount:$.modules.length,isEntry:$.isEntry,isVendor:$.isVendor})),largestModules:X.largestModules.slice(0,Z.topModules||10).map(($)=>({path:$.path,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),type:$.type})),duplicates:X.duplicates,analysis:Q,warnings:X.warnings},null,2)}function r(X,Z){let Q=[],$=Z.showGzip!==!1;if(Q.push(""),Q.push("Bundle Analysis Report"),Q.push("\u2550".repeat(50)),Q.push(""),Q.push("Summary"),Q.push("\u2500".repeat(50)),$)Q.push(`Total Size: ${W(X.totalSize)} (${W(X.totalGzipSize)} gzip)`);else Q.push(`Total Size: ${W(X.totalSize)}`);if(Q.push(`Modules: ${X.moduleCount}`),Q.push(`Chunks: ${X.chunks.length}`),X.duplicates.length>0)Q.push(`Duplicates: ${X.duplicates.length}`);if(Q.push(""),Z.threshold&&X.totalSize>Z.threshold)Q.push(`\u26A0\uFE0F Bundle exceeds threshold of ${W(Z.threshold)}!`),Q.push("");Q.push("Size by Type"),Q.push("\u2500".repeat(50));let U=["js","css","html","image","font","other"];for(let j of U){let q=X.byType[j];if(q.count>0){let J=E(q.size,X.totalSize),F=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${j.padEnd(8)} ${W(q.size).padStart(12)}${F} ${J.padStart(6)} (${q.count} files)`)}}Q.push(""),Q.push("Chunks"),Q.push("\u2500".repeat(50));for(let j of X.chunks.slice(0,10)){let q=[];if(j.isEntry)q.push("entry");if(j.isVendor)q.push("vendor");let J=q.length>0?` [${q.join(", ")}]`:"",F=$?` (${W(j.gzipSize)} gzip)`:"";Q.push(` ${j.name.padEnd(20)} ${W(j.size).padStart(12)}${F}${J}`)}if(X.chunks.length>10)Q.push(` ... and ${X.chunks.length-10} more chunks`);Q.push("");let K=Z.topModules||10;Q.push(`Largest Modules (Top ${K})`),Q.push("\u2500".repeat(50));for(let j=0;j<Math.min(K,X.largestModules.length);j++){let q=X.largestModules[j],J=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${(j+1).toString().padStart(2)}. ${q.path}`),Q.push(` ${W(q.size)}${J}`)}if(Q.push(""),X.duplicates.length>0){Q.push("Duplicate Modules"),Q.push("\u2500".repeat(50));for(let j of X.duplicates.slice(0,5))Q.push(` ${j.path}`),Q.push(` ${j.count} copies, wasting ${W(j.wastedBytes)}`);if(X.duplicates.length>5)Q.push(` ... and ${X.duplicates.length-5} more duplicates`);Q.push("")}if(Z.recommendations!==!1){let j=N(X,Z);if(j.recommendations.length>0){Q.push("Recommendations"),Q.push("\u2500".repeat(50));for(let q of j.recommendations.slice(0,5)){let J=q.impact==="high"?"\u26A1":q.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";Q.push(` ${J} ${q.title}`),Q.push(` ${q.description}`)}Q.push("")}}if(X.warnings.length>0){Q.push("Warnings"),Q.push("\u2500".repeat(50));for(let j of X.warnings)Q.push(` \u26A0\uFE0F ${j}`);Q.push("")}return Q.join(`
2
+ import"./chunk-qs0fp63n.js";import v from"fs";import H from"path";import{gzipSync as z}from"zlib";import{createHash as g}from"crypto";var D={".js":"js",".mjs":"js",".cjs":"js",".ts":"js",".jsx":"js",".tsx":"js",".css":"css",".scss":"css",".sass":"css",".less":"css",".html":"html",".htm":"html",".png":"image",".jpg":"image",".jpeg":"image",".gif":"image",".svg":"image",".webp":"image",".avif":"image",".ico":"image",".woff":"font",".woff2":"font",".ttf":"font",".eot":"font",".otf":"font"},b=[/node_modules/,/vendor/,/bower_components/,/\.min\./],B=[/index\.(js|ts|html)$/,/main\.(js|ts)$/,/app\.(js|ts)$/,/entry\.(js|ts)$/];async function L(X,Z={}){let{includeSourceMaps:Q=!1,parseImports:$=!0,detectDuplicates:U=!0,topModulesCount:K=20}=Z;if(!v.existsSync(X))throw Error(`Build directory not found: ${X}`);if(!v.statSync(X).isDirectory())throw Error(`Not a directory: ${X}`);let q=await k(X,Q),J=[],F=[];for(let A of q)try{let O=await f(A,X,$);J.push(O)}catch(O){F.push(`Failed to process ${A}: ${O}`)}let Y=c(J,X),V=J.reduce((A,O)=>A+O.size,0),_=J.reduce((A,O)=>A+O.gzipSize,0),w=m(J),G=U?p(J):[],C=[...J].sort((A,O)=>O.size-A.size).slice(0,K);return{timestamp:Date.now(),buildDir:H.resolve(X),chunks:Y,totalSize:V,totalGzipSize:_,moduleCount:J.length,duplicates:G,byType:w,largestModules:C,warnings:F}}async function k(X,Z){let Q=[];async function $(U){let K=await v.promises.readdir(U,{withFileTypes:!0});for(let j of K){let q=H.join(U,j.name);if(j.isDirectory()){if(!j.name.startsWith(".")&&j.name!=="node_modules")await $(q)}else if(j.isFile()){if(!Z&&j.name.endsWith(".map"))continue;Q.push(q)}}}return await $(X),Q}async function f(X,Z,Q){let $=await v.promises.readFile(X),U=H.relative(Z,X),K=H.extname(X).toLowerCase(),j=$.length,q=y($),J=h($,K),F=g("md5").update($).digest("hex").slice(0,8),Y=D[K]||"other",V=[];if(Q&&Y==="js")V.push(...d($.toString("utf-8")));return{id:U,path:U,size:j,gzipSize:q,parsedSize:J,extension:K,type:Y,imports:V,importedBy:[],hash:F}}function y(X){try{let Z=z(X,{level:9}).length;return Math.min(Z,X.length)}catch{return X.length}}function h(X,Z){if(Z.includes(".min.")||X.length<1000)return X.length;let $=D[Z];if($==="js")return Math.round(X.length*0.6);if($==="css")return Math.round(X.length*0.7);return X.length}function d(X){let Z=[],Q=/import\s+(?:[\w*{}\s,]+\s+from\s+)?['"]([^'"]+)['"]/g,$;while(($=Q.exec(X))!==null)Z.push($[1]);let U=/import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=U.exec(X))!==null)Z.push($[1]);let K=/require\s*\(\s*['"]([^'"]+)['"]\s*\)/g;while(($=K.exec(X))!==null)Z.push($[1]);return[...new Set(Z)]}function c(X,Z){let Q=new Map;for(let U of X){let K=U.path.split(H.sep),j;if(K.length===1)j=H.basename(U.path,U.extension);else j=K[0];let q=Q.get(j)||[];q.push(U),Q.set(j,q)}let $=[];for(let[U,K]of Q){let j=K.reduce((Y,V)=>Y+V.size,0),q=K.reduce((Y,V)=>Y+V.gzipSize,0),J=K.some((Y)=>B.some((V)=>V.test(Y.path))),F=K.some((Y)=>b.some((V)=>V.test(Y.path)));$.push({name:U,files:K.map((Y)=>Y.path),modules:K,size:j,gzipSize:q,isEntry:J,isVendor:F})}return $.sort((U,K)=>K.size-U.size)}function m(X){let Z={js:{count:0,size:0,gzipSize:0},css:{count:0,size:0,gzipSize:0},html:{count:0,size:0,gzipSize:0},image:{count:0,size:0,gzipSize:0},font:{count:0,size:0,gzipSize:0},other:{count:0,size:0,gzipSize:0}};for(let Q of X)Z[Q.type].count++,Z[Q.type].size+=Q.size,Z[Q.type].gzipSize+=Q.gzipSize;return Z}function p(X){let Z=new Map;for(let $ of X){let U=Z.get($.hash)||[];U.push($),Z.set($.hash,U)}let Q=[];for(let[,$]of Z)if($.length>1){let U=$[0];Q.push({path:U.path,count:$.length,wastedBytes:U.size*($.length-1),locations:$.map((K)=>K.path)})}return Q.sort(($,U)=>U.wastedBytes-$.wastedBytes)}function W(X){if(X<1024)return`${X} B`;if(X<1048576)return`${(X/1024).toFixed(2)} KB`;return`${(X/1048576).toFixed(2)} MB`}function I(X){let Z=X.match(/^([\d.]+)\s*(B|KB|MB|GB)?$/i);if(!Z)return 0;let Q=Number.parseFloat(Z[1]);switch((Z[2]||"B").toUpperCase()){case"KB":return Q*1024;case"MB":return Q*1024*1024;case"GB":return Q*1024*1024*1024;default:return Q}}function E(X,Z){if(Z===0)return"0%";return`${(X/Z*100).toFixed(1)}%`}function R(X,Z){switch(Z.format){case"json":return u(X,Z);case"markdown":return l(X,Z);case"text":default:return r(X,Z)}}function u(X,Z){let Q=N(X,Z);return JSON.stringify({timestamp:X.timestamp,buildDir:X.buildDir,summary:{totalSize:X.totalSize,totalSizeFormatted:W(X.totalSize),totalGzipSize:X.totalGzipSize,totalGzipSizeFormatted:W(X.totalGzipSize),moduleCount:X.moduleCount,chunkCount:X.chunks.length,duplicateCount:X.duplicates.length},byType:Object.fromEntries(Object.entries(X.byType).map(([$,U])=>[$,{...U,sizeFormatted:W(U.size),gzipSizeFormatted:W(U.gzipSize)}])),chunks:X.chunks.map(($)=>({name:$.name,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),moduleCount:$.modules.length,isEntry:$.isEntry,isVendor:$.isVendor})),largestModules:X.largestModules.slice(0,Z.topModules||10).map(($)=>({path:$.path,size:$.size,sizeFormatted:W($.size),gzipSize:$.gzipSize,gzipSizeFormatted:W($.gzipSize),type:$.type})),duplicates:X.duplicates,analysis:Q,warnings:X.warnings},null,2)}function r(X,Z){let Q=[],$=Z.showGzip!==!1;if(Q.push(""),Q.push("Bundle Analysis Report"),Q.push("\u2550".repeat(50)),Q.push(""),Q.push("Summary"),Q.push("\u2500".repeat(50)),$)Q.push(`Total Size: ${W(X.totalSize)} (${W(X.totalGzipSize)} gzip)`);else Q.push(`Total Size: ${W(X.totalSize)}`);if(Q.push(`Modules: ${X.moduleCount}`),Q.push(`Chunks: ${X.chunks.length}`),X.duplicates.length>0)Q.push(`Duplicates: ${X.duplicates.length}`);if(Q.push(""),Z.threshold&&X.totalSize>Z.threshold)Q.push(`\u26A0\uFE0F Bundle exceeds threshold of ${W(Z.threshold)}!`),Q.push("");Q.push("Size by Type"),Q.push("\u2500".repeat(50));let U=["js","css","html","image","font","other"];for(let j of U){let q=X.byType[j];if(q.count>0){let J=E(q.size,X.totalSize),F=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${j.padEnd(8)} ${W(q.size).padStart(12)}${F} ${J.padStart(6)} (${q.count} files)`)}}Q.push(""),Q.push("Chunks"),Q.push("\u2500".repeat(50));for(let j of X.chunks.slice(0,10)){let q=[];if(j.isEntry)q.push("entry");if(j.isVendor)q.push("vendor");let J=q.length>0?` [${q.join(", ")}]`:"",F=$?` (${W(j.gzipSize)} gzip)`:"";Q.push(` ${j.name.padEnd(20)} ${W(j.size).padStart(12)}${F}${J}`)}if(X.chunks.length>10)Q.push(` ... and ${X.chunks.length-10} more chunks`);Q.push("");let K=Z.topModules||10;Q.push(`Largest Modules (Top ${K})`),Q.push("\u2500".repeat(50));for(let j=0;j<Math.min(K,X.largestModules.length);j++){let q=X.largestModules[j],J=$?` (${W(q.gzipSize)} gzip)`:"";Q.push(` ${(j+1).toString().padStart(2)}. ${q.path}`),Q.push(` ${W(q.size)}${J}`)}if(Q.push(""),X.duplicates.length>0){Q.push("Duplicate Modules"),Q.push("\u2500".repeat(50));for(let j of X.duplicates.slice(0,5))Q.push(` ${j.path}`),Q.push(` ${j.count} copies, wasting ${W(j.wastedBytes)}`);if(X.duplicates.length>5)Q.push(` ... and ${X.duplicates.length-5} more duplicates`);Q.push("")}if(Z.recommendations!==!1){let j=N(X,Z);if(j.recommendations.length>0){Q.push("Recommendations"),Q.push("\u2500".repeat(50));for(let q of j.recommendations.slice(0,5)){let J=q.impact==="high"?"\u26A1":q.impact==="medium"?"\uD83D\uDCCA":"\uD83D\uDCA1";Q.push(` ${J} ${q.title}`),Q.push(` ${q.description}`)}Q.push("")}}if(X.warnings.length>0){Q.push("Warnings"),Q.push("\u2500".repeat(50));for(let j of X.warnings)Q.push(` \u26A0\uFE0F ${j}`);Q.push("")}return Q.join(`
3
3
  `)}function l(X,Z){let Q=[],$=Z.showGzip!==!1;if(Q.push("# Bundle Analysis Report"),Q.push(""),Q.push(`Generated: ${new Date(X.timestamp).toISOString()}`),Q.push(""),Q.push("## Summary"),Q.push(""),Q.push("| Metric | Value |"),Q.push("|--------|-------|"),Q.push(`| Total Size | ${W(X.totalSize)} |`),$)Q.push(`| Gzip Size | ${W(X.totalGzipSize)} |`);Q.push(`| Modules | ${X.moduleCount} |`),Q.push(`| Chunks | ${X.chunks.length} |`),Q.push(`| Duplicates | ${X.duplicates.length} |`),Q.push(""),Q.push("## Size by Type"),Q.push(""),Q.push("| Type | Size | Gzip | % | Files |"),Q.push("|------|------|------|---|-------|");let U=["js","css","html","image","font","other"];for(let j of U){let q=X.byType[j];if(q.count>0)Q.push(`| ${j} | ${W(q.size)} | ${W(q.gzipSize)} | ${E(q.size,X.totalSize)} | ${q.count} |`)}Q.push(""),Q.push("## Chunks"),Q.push(""),Q.push("| Name | Size | Gzip | Modules | Type |"),Q.push("|------|------|------|---------|------|");for(let j of X.chunks.slice(0,15)){let q=j.isEntry?"Entry":j.isVendor?"Vendor":"-";Q.push(`| ${j.name} | ${W(j.size)} | ${W(j.gzipSize)} | ${j.modules.length} | ${q} |`)}Q.push("");let K=Z.topModules||10;Q.push(`## Largest Modules (Top ${K})`),Q.push(""),Q.push("| # | Path | Size | Gzip |"),Q.push("|---|------|------|------|");for(let j=0;j<Math.min(K,X.largestModules.length);j++){let q=X.largestModules[j];Q.push(`| ${j+1} | \`${q.path}\` | ${W(q.size)} | ${W(q.gzipSize)} |`)}if(Q.push(""),X.duplicates.length>0){Q.push("## Duplicates"),Q.push(""),Q.push("| Path | Copies | Wasted |"),Q.push("|------|--------|--------|");for(let j of X.duplicates.slice(0,10))Q.push(`| \`${j.path}\` | ${j.count} | ${W(j.wastedBytes)} |`);Q.push("")}if(Z.recommendations!==!1){let j=N(X,Z);if(j.recommendations.length>0){Q.push("## Recommendations"),Q.push("");for(let q of j.recommendations)Q.push(`### ${q.title}`),Q.push(""),Q.push(q.description),Q.push(""),Q.push(`- **Impact:** ${q.impact}`),Q.push(`- **Effort:** ${q.effort}`),Q.push("")}}return Q.join(`
4
4
  `)}function N(X,Z){let Q=[],$=[];if(Z.threshold&&X.totalSize>Z.threshold)Q.push({severity:"error",message:`Bundle size (${W(X.totalSize)}) exceeds threshold (${W(Z.threshold)})`});if(X.totalSize>1048576)Q.push({severity:"warning",message:`Bundle is over 1MB (${W(X.totalSize)})`,details:"Large bundles can significantly impact load time"});if(X.duplicates.length>0){let q=X.duplicates.reduce((J,F)=>J+F.wastedBytes,0);Q.push({severity:"warning",message:`${X.duplicates.length} duplicate modules found, wasting ${W(q)}`}),$.push({title:"Remove Duplicate Modules",description:"Consider using import aliases or ensuring consistent package versions to eliminate duplicates.",impact:"medium",effort:"low"})}if(X.byType.js.size/X.totalSize>0.8&&X.totalSize>512000)$.push({title:"Code Splitting",description:"Over 80% of your bundle is JavaScript. Consider splitting code by route or feature.",impact:"high",effort:"medium"});let K=X.largestModules.filter((q)=>q.size>102400);if(K.length>0){Q.push({severity:"info",message:`${K.length} modules are over 100KB`});for(let q of K){if(q.path.includes("lodash")&&!q.path.includes("lodash-es"))$.push({title:"Use lodash-es instead of lodash",description:"lodash-es supports tree-shaking and can significantly reduce bundle size.",impact:"high",effort:"low"});if(q.path.includes("moment"))$.push({title:"Replace moment.js",description:"Consider using date-fns or dayjs for smaller date handling libraries.",impact:"high",effort:"medium"})}}if(X.byType.image.size>512000)$.push({title:"Optimize Images",description:`Images account for ${W(X.byType.image.size)}. Consider using WebP/AVIF formats and responsive images.`,impact:"high",effort:"low"});let j=100;if(X.totalSize>1048576)j-=20;else if(X.totalSize>512000)j-=10;if(j-=Math.min(20,X.duplicates.length*2),j-=Math.min(15,K.length*3),Z.threshold&&X.totalSize>Z.threshold)j-=25;return{score:Math.max(0,j),issues:Q,recommendations:$}}var i={lodash:{alternative:"lodash-es or individual imports",savings:"~70%"},moment:{alternative:"date-fns or dayjs",savings:"~90%"},"chart.js":{alternative:"chart.js with tree-shaking",savings:"~50%"},"highlight.js":{alternative:"Selective language imports",savings:"~80%"},fontawesome:{alternative:"Individual icon imports",savings:"~90%"},"material-ui":{alternative:"Named imports from @mui/*",savings:"~60%"}};function n(X){for(let[Z,Q]of Object.entries(i))if(X.includes(Z))return{title:`Optimize ${Z}`,description:`Consider using ${Q.alternative}. Potential savings: ${Q.savings}`,impact:"high",effort:"low"};return null}var o={default:{js:"#f7df1e",css:"#264de4",html:"#e34c26",image:"#4caf50",font:"#9c27b0",other:"#607d8b",vendor:"#ff5722"},pastel:{js:"#fff3b0",css:"#b0d4ff",html:"#ffb0b0",image:"#b0ffb0",font:"#e0b0ff",other:"#d0d0d0",vendor:"#ffcfb0"},monochrome:{js:"#333333",css:"#555555",html:"#777777",image:"#999999",font:"#bbbbbb",other:"#dddddd",vendor:"#444444"}};function x(X,Z={}){let{title:Q="Bundle Analysis",gzip:$=!0,colorScheme:U="default"}=Z,K=o[U],j=a(X),q=JSON.stringify(j);return`<!DOCTYPE html>
5
5
  <html lang="en">
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Ai as c,Bi as d,Ci as e,Di as f,Ei as g,yi as a,zi as b}from"./chunk-pv9at6r1.js";import"./chunk-j4ze77e0.js";export{d as useVirtualList,b as processVirtualListDirectives,f as processVirtualGridDirectives,e as processInfiniteListDirectives,c as generateVirtualListCSS,g as default,a as createVirtualList};
2
+ import{Ai as c,Bi as d,Ci as e,Di as f,Ei as g,yi as a,zi as b}from"./chunk-pv9at6r1.js";import"./chunk-qs0fp63n.js";export{d as useVirtualList,b as processVirtualListDirectives,f as processVirtualGridDirectives,e as processInfiniteListDirectives,c as generateVirtualListCSS,g as default,a as createVirtualList};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{ft as a,gt as b,ht as c,it as d,jt as e,kt as f}from"./chunk-1px4xey5.js";import"./chunk-qs0fp63n.js";export{d as stateDirName,e as stateDir,c as setStateDir,f as rebaseOntoStateDir,b as STATE_DIR_ENV_VAR,a as DEFAULT_STATE_DIR};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{$ as ll,$a as cn,$b as vo,$c as vp,$d as vq,A as Xj,Aa as nm,Ab as Pn,Ac as Wo,Ad as Wp,Ae as ar,B as Yj,Ba as om,Bb as Qn,Bc as Xo,Bd as Xp,Be as br,C as Zj,Ca as Bm,Cb as Rn,Cc as Yo,Cd as Yp,Ce as cr,D as _j,Da as Cm,Db as Sn,Dc as Zo,Dd as Zp,De as dr,E as Qk,Ea as Dm,Eb as Tn,Ec as _o,Ed as _p,Ee as er,F as Rk,Fa as Em,Fb as Un,Fc as $o,Fd as $p,Fe as fr,G as Sk,Ga as Fm,Gb as Vn,Gc as ap,Gd as aq,Ge as gr,H as Tk,Ha as Jm,Hb as Wn,Hc as bp,Hd as bq,He as hr,I as Uk,Ia as Km,Ib as Xn,Ic as cp,Id as cq,Ie as ir,J as Vk,Ja as Lm,Jb as Yn,Jc as dp,Jd as dq,Je as jr,K as Wk,Ka as Mm,Kb as Zn,Kc as ep,Kd as eq,Ke as kr,L as Xk,La as Nm,Lb as _n,Lc as fp,Ld as fq,Le as lr,M as Yk,Ma as Om,Mb as $n,Mc as gp,Md as gq,Me as mr,N as Zk,Na as Pm,Nb as ho,Nc as hp,Nd as hq,Ne as nr,O as _k,Oa as Qm,Ob as io,Oc as ip,Od as iq,Oe as or,P as $k,Pa as Rm,Pb as jo,Pc as jp,Pd as jq,Pe as pr,Q as al,Qa as Sm,Qb as ko,Qc as kp,Qd as kq,Qe as qr,R as bl,Ra as Tm,Rb as lo,Rc as lp,Rd as lq,Re as rr,S as cl,Sa as Um,Sb as mo,Sc as mp,Sd as mq,Se as sr,T as dl,Ta as Vm,Tb as no,Tc as np,Td as nq,Te as tr,U as el,Ua as Wm,Ub as oo,Uc as op,Ud as oq,Ue as ur,V as fl,Va as Xm,Vb as po,Vc as pp,Vd as pq,Ve as vr,W as gl,Wa as Ym,Wb as qo,Wc as qp,Wd as qq,We as wr,X as hl,Xa as _m,Xb as ro,Xc as rp,Xd as rq,Xe as xr,Y as il,Ya as $m,Yb as so,Yc as sp,Yd as sq,Z as jl,Za as an,Zb as to,Zc as tp,Zd as tq,_ as kl,_a as bn,_b as uo,_c as up,_d as uq,aa as ml,ab as dn,ac as wo,ad as wp,ae as wq,ba as nl,bb as en,bc as xo,bd as xp,be as xq,ca as ol,cb as fn,cc as yo,cd as yp,ce as yq,da as pl,db as gn,dc as zo,dd as zp,de as zq,ea as ql,eb as hn,ec as Ao,ed as Ap,ee as Aq,fa as rl,fb as jn,fc as Bo,fd as Bp,fe as Bq,ga as sl,gb as kn,gc as Co,gd as Cp,ge as Cq,ha as tl,hb as ln,hc as Do,hd as Dp,he as Dq,ia as ul,ib as mn,ic as Eo,id as Ep,ie as Eq,ja as vl,jb as nn,jc as Fo,jd as Fp,je as Fq,ka as wl,kb as on,kc as Go,kd as Gp,ke as Gq,la as xl,lb as pn,lc as Ho,ld as Hp,le as Hq,ma as yl,mb as qn,mc as Io,md as Ip,me as Iq,na as zl,nb as rn,nc as Jo,nd as Jp,ne as Jq,o as a,oa as Al,ob as un,oc as Ko,od as Kp,oe as Qq,p as Ij,pa as cm,pb as vn,pc as Lo,pd as Lp,pe as Rq,q as Jj,qa as dm,qb as wn,qc as Mo,qd as Mp,qe as Sq,r as Kj,ra as em,rb as xn,rc as No,rd as Np,re as Tq,s as Lj,sa as fm,sb as Dn,sc as Oo,sd as Op,se as Uq,t as Mj,ta as gm,tb as En,tc as Po,td as Pp,te as Vq,u as Nj,ua as hm,ub as Fn,uc as Qo,ud as Qp,ue as Wq,v as Oj,va as im,vb as Gn,vc as Ro,vd as Rp,ve as Xq,w as Pj,wa as jm,wb as Ln,wc as So,wd as Sp,we as Yq,x as Qj,xa as km,xb as Mn,xc as To,xd as Tp,xe as Zq,y as Vj,ya as lm,yb as Nn,yc as Uo,yd as Up,ye as _q,z as Wj,za as mm,zb as On,zc as Vo,zd as Vp,ze as $q}from"./chunk-ft61rs60.js";import{$e as ck,Ye as $j,Ze as ak,_e as bk,af as dk,bf as ek,cf as fk,df as gk,ef as hk,ff as ik,gf as jk,hf as kk,if as lk,jf as mk,kf as nk}from"./chunk-jy6madxa.js";import{lf as Ek,mf as Fk,nf as Gk,of as Hk,pf as Ik,qf as Jk,rf as Kk,sf as Lk,tf as Mk,uf as Nk,vf as Ok,wf as Pk}from"./chunk-shh4byc3.js";import{Af as eo,Bf as fo,Cf as go,xf as ao,yf as bo,zf as co}from"./chunk-j79s71z4.js";import{Df as sn,Ef as tn}from"./chunk-vzskgbqj.js";import{Ff as yn}from"./chunk-15rgmdtq.js";import{Gf as Sl,Hf as Tl,If as Ul,Jf as Vl,Kf as Yl,Lf as am}from"./chunk-brpvf652.js";import{Mf as Wl,Pf as Xl}from"./chunk-b5w02n3z.js";import{$f as tm,Xf as pm,Yf as qm,Zf as rm,_f as sm,ag as um,bg as vm,cg as wm,dg as xm,eg as ym,fg as zm,gg as Am}from"./chunk-d19bydks.js";import{hg as Ck,ig as Dk}from"./chunk-1p0r6k2f.js";import{jg as bm}from"./chunk-enewax5b.js";import{kg as Gm,lg as Hm,mg as Im,ng as Zm,og as zn,pg as An,qg as Bn,rg as Cn,sg as Hn,tg as In,ug as Jn,vg as Kn}from"./chunk-6mtc3b9a.js";import{Ag as Fl,Bg as Gl,Cg as Hl,Dg as Il,Eg as Jl,Fg as Kl,Gg as Ll,Hg as Ml,Ig as Nl,Jg as Zl,Kg as _l,Lg as $l,wg as Bl,xg as Cl,yg as Dl,zg as El}from"./chunk-nw7y6zw8.js";import{Mg as Xi,Ng as Yi,Og as Zi,Pg as _i,Qg as $i,Rg as aj,Sg as bj,Tg as cj,Ug as dj,Vg as ej,Wg as fj}from"./chunk-n3tj3h1q.js";import{Xg as xj,Zg as yj}from"./chunk-cs1dc1n7.js";import{dh as ok,eh as pk,fh as qk,gh as rk,hh as sk,ih as tk,jh as uk,lh as vk,mh as wk,nh as xk,oh as yk,ph as zk,qh as Ak,th as Bk}from"./chunk-9228drk4.js";import{uh as hh,vh as ih,wh as jh,xh as kh}from"./chunk-tv4n71jy.js";import{Ch as lh}from"./chunk-rbke5wqk.js";import{Dh as sh,Eh as th,Fh as uh,Gh as vh,Hh as wh,Ih as xh}from"./chunk-7mqbw6qv.js";import{Jh as Mi,Kh as Ni,Lh as Oi,Ph as Pi,Qh as Qi,Rh as Ri}from"./chunk-78bpc81t.js";import{$h as Ki,Sh as Ci,Th as Di,Uh as Ei,Vh as Fi,Wh as Gi,Yh as Hi,Zh as Ii,_h as Ji,ai as Li}from"./chunk-j93x5fzs.js";import{bi as sg,ci as tg,di as ug,ei as vg,fi as wg,gi as xg}from"./chunk-ntnv2f7a.js";import{hi as yg,ii as zg,ji as Ag,ki as Bg,li as Cg}from"./chunk-1gdzz04h.js";import{mi as Dg,ni as Eg,oi as Fg,pi as Gg,qi as Hg}from"./chunk-ssfhndm6.js";import{ri as Ig,si as Jg,ti as Kg,ui as Lg,vi as Mg,wi as Ng,xi as Og}from"./chunk-94fee5jw.js";import{Ai as Rg,Bi as Sg,Ci as Tg,Di as Ug,yi as Pg,zi as Qg}from"./chunk-pv9at6r1.js";import{Fi as Vg,Gi as Wg,Hi as Xg,Ii as Yg,Ji as Zg,Ki as _g,Li as $g,Mi as ah,Ni as bh,Oi as ch,Pi as dh,Qi as eh,Ri as fh,Si as gh}from"./chunk-dq88kv1p.js";import{Ui as mg,Vi as ng}from"./chunk-gaj725dz.js";import{Yi as og}from"./chunk-5w362c8x.js";import"./chunk-ht51fz7w.js";import{aj as pg}from"./chunk-fvjh7rx0.js";import{bj as qg,cj as rg}from"./chunk-b6jhznkh.js";import{dj as fe,ej as ge,fj as he,gj as ie,hj as je,ij as ke,jj as le,kj as me,lj as ne,mj as oe,nj as pe,oj as qe,pj as re,qj as se}from"./chunk-etx5vb1n.js";import{rj as Pe,sj as Qe}from"./chunk-g553n48p.js";import{Aj as Ce,Bj as De,Cj as Ee,Dj as Fe,Ej as Ge,Fj as He,Gj as Ie,Hj as Je,Ij as Ke,Jj as Le,Kj as Me,Lj as Ne,Mj as Oe,zj as Be}from"./chunk-nhmq45hh.js";import{Nj as Re,Oj as Se,Pj as Te,Qj as Ue,Rj as Ve,Sj as We,Tj as Xe,Uj as Ye,Vj as Ze,Wj as _e,Xj as $e}from"./chunk-m0xp6xjr.js";import{pk as Kq,qk as Lq,rk as Mq,sk as Nq,tk as Oq,uk as Pq}from"./chunk-37nm0f2v.js";import{Ak as Pl,Bk as Ql,Ck as Rl,vk as Rj,wk as Sj,xk as Tj,yk as Uj,zk as Ol}from"./chunk-b212gjes.js";import"./chunk-frp9fc7j.js";import"./chunk-r84h7wxw.js";import{$m as Wb,$n as Wc,$o as Ae,$p as Jf,$q as Yh,$r as zj,Al as da,An as vc,Ao as Ld,Ap as hf,Aq as ig,Ar as xi,Bl as ea,Bm as xb,Bn as wc,Bo as Md,Bp as jf,Bq as jg,Br as yi,Cl as fa,Cm as yb,Cn as xc,Co as Nd,Cp as kf,Cq as kg,Cr as zi,Dl as ga,Dm as zb,Dn as yc,Do as Od,Dp as lf,Dq as lg,Dr as Ai,El as ha,Em as Ab,En as zc,Eo as Pd,Ep as mf,Eq as mh,Er as Bi,Fl as ia,Fm as Bb,Fn as Ac,Fo as Qd,Fp as nf,Fq as nh,Fr as Si,Gm as Cb,Gn as Bc,Go as Rd,Gp as of,Gq as oh,Gr as Ti,Hm as Db,Hn as Cc,Ho as Sd,Hp as pf,Hq as ph,Hr as Ui,Il as za,In as Dc,Io as Td,Ip as qf,Iq as qh,Ir as Vi,Jl as Aa,Jm as Eb,Jn as Ec,Jo as Ud,Jp as rf,Jq as rh,Jr as Wi,Kl as Ba,Km as Fb,Kn as Fc,Ko as Vd,Kp as sf,Kq as yh,Kr as gj,Ll as Ca,Lm as Gb,Ln as Gc,Lo as Wd,Lp as tf,Lq as zh,Lr as hj,Ml as Da,Mm as Hb,Mn as Hc,Mo as Xd,Mp as uf,Mq as Ah,Mr as ij,Nm as Ib,Nn as Ic,No as Yd,Np as vf,Nq as Bh,Nr as jj,Om as Jb,On as Jc,Oo as Zd,Op as wf,Oq as Ch,Or as kj,Pl as Ga,Pm as Kb,Pn as Kc,Po as _d,Pp as xf,Pq as Dh,Pr as lj,Ql as Ha,Qm as Lb,Qn as Lc,Qo as $d,Qp as yf,Qq as Eh,Qr as mj,Rl as Oa,Rm as Mb,Rn as Mc,Ro as ae,Rp as zf,Rq as Fh,Rr as nj,Sl as Pa,Sm as Nb,Sn as Nc,So as be,Sp as Af,Sq as Gh,Sr as oj,Tl as Qa,Tm as Ob,Tn as Oc,To as ce,Tp as Bf,Tq as Hh,Tr as pj,Ul as Ra,Um as Pb,Un as Pc,Uo as de,Up as Cf,Uq as Ih,Ur as qj,Vl as Sa,Vm as Qb,Vn as Qc,Vo as ee,Vp as Df,Vq as Jh,Vr as rj,Wl as Ta,Wm as Rb,Wn as Rc,Wp as Ef,Wq as Kh,Wr as sj,Xl as Ua,Xm as Sb,Xn as Sc,Xo as ye,Xp as Ff,Xq as Lh,Xr as tj,Yl as Va,Ym as Tb,Yn as Tc,Yp as Gf,Yq as Mh,Yr as uj,Zl as Wa,Zm as Ub,Zn as Uc,Zp as Hf,Zq as Nh,Zr as vj,_l as Xa,_m as Vb,_n as Vc,_o as ze,_p as If,_q as Oh,_r as wj,an as Xb,ao as Xc,aq as Kf,ar as Zh,as as Aj,bn as Yb,bo as Yc,bp as af,bq as Lf,br as _h,bs as Bj,cn as Zb,co as Zc,cq as Mf,cr as $h,cs as Cj,dm as Ya,dn as _b,do as _c,dq as Nf,dr as ai,ds as Dj,em as Za,en as $b,eo as $c,eq as Of,er as bi,es as Ej,fm as _a,fn as ac,fo as ad,fq as Pf,fr as ci,fs as Fj,gm as $a,gn as bc,go as bd,gq as Qf,gr as di,gs as Gj,hm as ab,hn as cc,ho as cd,hq as Rf,hr as ei,hs as Hj,il as s,im as bb,in as dc,io as dd,iq as Sf,ir as fi,jl as t,jn as ec,jo as ed,jq as Tf,jr as gi,kl as u,kn as fc,ko as fd,kq as Uf,kr as hi,ll as v,lm as cb,ln as gc,lo as gd,lq as Vf,lr as ii,ml as w,mm as db,mn as hc,mo as hd,mq as Wf,mr as ji,nl as x,nm as eb,nn as ic,no as id,nq as Xf,nr as ki,ol as y,om as fb,on as jc,oo as zd,oq as Yf,or as li,pl as z,pm as gb,pn as kc,po as Ad,pq as Zf,pr as mi,ql as A,qm as hb,qn as lc,qo as Bd,qq as _f,qr as ni,rl as B,rm as ib,rn as mc,ro as Cd,rq as $f,rr as oi,sl as C,sm as jb,sn as nc,so as Dd,sp as bf,sq as ag,sr as pi,tl as D,tm as kb,tn as oc,to as Ed,tq as bg,tr as qi,ul as E,um as lb,un as pc,uo as Fd,up as cf,uq as cg,ur as ri,vl as F,vm as mb,vn as qc,vo as Gd,vq as dg,vr as si,wl as G,wm as nb,wn as rc,wo as Hd,wp as df,wq as eg,wr as ti,xl as H,xm as ob,xn as sc,xo as Id,xp as ef,xq as fg,xr as ui,yl as I,ym as pb,yn as tc,yo as Jd,yp as ff,yq as gg,yr as vi,zl as J,zm as qb,zn as uc,zo as Kd,zp as gf,zq as hg,zr as wi}from"./chunk-v2vv4etv.js";import{is as d,js as e,ks as f,ls as g,ms as h,ns as i,os as j,ps as k,qs as l,rs as m,ss as n,ts as o,us as p,vs as q,ws as r}from"./chunk-092sm06a.js";import{As as Sh,Bs as Th,Cs as Uh,Ds as Vh,Es as Wh,Fs as Xh,xs as Ph,ys as Qh,zs as Rh}from"./chunk-19m7hed6.js";import{Gs as b,Hs as c}from"./chunk-nhn7qftp.js";import{Is as Ea,Js as Fa}from"./chunk-mv2v3g62.js";import{Ks as rb,Ls as sb,Ns as tb,Xs as ub,Ys as vb,Zs as wb}from"./chunk-b220zqbz.js";import{$s as ue,_s as te,at as ve,bt as we,et as xe}from"./chunk-2qkasmq1.js";import{ft as Ia,gt as Ja,ht as Ka,it as La,jt as Ma,kt as Na}from"./chunk-1px4xey5.js";import{At as yd,lt as jd,mt as kd,nt as ld,ot as md,pt as nd,qt as od,rt as pd,st as qd,tt as rd,ut as sd,vt as td,wt as ud,xt as vd,yt as wd,zt as xd}from"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import{Dt as ja,Et as ka,Ft as la,Gt as ma,Ht as na,It as oa,Jt as pa,Kt as qa,Lt as ra,Mt as sa,Nt as ta,Ot as ua,Pt as va,Qt as wa,Rt as xa,St as ya}from"./chunk-ax56kn66.js";import{Au as ca,Wt as K,Xt as L,_t as M,du as N,eu as O,ku as P,lu as Q,mu as R,nu as S,ou as T,pu as U,qu as V,ru as W,su as X,tu as Y,uu as Z,vu as _,wu as $,xu as aa,yu as ba}from"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{jk as writeNetlifyConfig,_l as writeManifest,Ok as writeImageManifest,qo as wrapComponentForHMR,kr as withDefaults,wj as webComponentDirectiveHandler,fp as watermark,hq as watchViews,Yk as watchMultiple,Zk as watchEffect,Xk as watch,xe as warmImagePlaceholders,kl as waitForStore,Yd as waitForLocale,bo as virtualPathFor,jj as videoDirective,tc as validators,or as validated,Kd as validateValueEnhanced,nh as validateTemplate,kp as validateParams,Ld as validateFormEnhanced,Yp as validateFile,Gd as validateFields,Fd as validateField,ph as validateDirective,dd as validateCspDirectives,Ej as validateConfig,dm as validateComponentScripts,Bm as validateComponentProps,lg as validateClientScript,kh as v,jb as usesSignalsInScript,pa as usesReactiveRuntime,Ch as userComponentFileExists,Sg as useVirtualList,rd as useTitle,jl as useStoreOrThrow,Io as useStore,Vj as useStorage,sq as useSlots,Xj as useSessionStorage,od as useSeoMeta,ll as useRouteParams,nl as useRouteParamOrThrow,ml as useRouteParam,rd as usePageTitle,Oe as useOptimistic,pl as useMiddlewareValue,ol as useMiddlewareState,Wj as useLocalStorage,jo as useLoadingIndicator,md as useHead,hh as useForm,uq as useAttrs,_p as uploadFiles,Zp as uploadFile,gl as updateInstance,Me as untrack,Sh as unregisterDirective,hl as unmountInstance,qb as unescapeHtml,fo as typecheckStxFiles,Bh as transpileTypeScript,Zq as translate,w as transitionDirective,vm as toUsers,um as toUser,Qo as thumbnail,Rp as thumbHashToRGBA,Sp as thumbHashToDataURL,ra as templateNeedsRuntime,qa as templateHasReactiveContext,Re as templateCache,Mb as syncRecordedResponse,no as stxClientHelpers,wf as structuredDataDirective,ar as stripLocalePrefix,Ll as stripDocumentWrapper,Fa as stripCommentsAndLiterals,hn as stringToStream,Tc as strictCspPreset,ne as streamingSuspenseDirective,re as streamToResponse,le as streamTemplateSimple,fe as streamTemplate,Qj as stopHmrServer,rm as stopBroadcasting,La as stateDirName,Ma as stateDir,Be as state,fg as startsDocument,Kn as startProductionServer,yn as startInteractive,qm as startBroadcasting,cr as stampLocaleLayoutGroup,D as staggerDirective,ip as srcsetUrls,E as springDirective,Cc as splitByPipe,Hl as spaNavVaryHeaders,co as sourcePathFor,pp as smartBatchSign,Eh as slotContentHasExpressions,np as signUrl,zh as shouldTranspileTypeScript,Nj as shouldReloadOnChange,sp as shouldRefreshSignature,Oj as shouldIgnoreFile,Kg as shouldCacheComponent,Uo as sharpen,rr as shape,Ka as setStateDir,tl as setRouteParams,ul as setMiddlewareState,we as setImagePlaceholder,mq as setGlobalProvide,Qb as setErrorLocale,Qk as setCurrentInstance,Zi as setCachedVideoResult,Oi as setCachedImageResult,Ii as setCached,ur as serveStxFile,wr as serveMultipleStxFiles,Ij as serveMarkdownFile,Un as serveFile,xr as serveApp,Tn as serve,to as serializeState,Zm as serializeSetCookie,Wo as sepia,pd as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,nj as scopeHTML,mj as scopeCSS,zf as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,_o as saturation,lp as sanitizeParams,vc as sanitizeFilePath,wc as sanitizeExpression,xc as sanitizeDirectiveParams,uc as sanitizeDirectiveParam,yc as sanitizeComponentProps,oc as safeExecuteAsync,nc as safeExecute,xa as runtimeHandledXAttrsLiteral,pf as runPreProcessingMiddleware,qf as runPostProcessingMiddleware,Bn as runPageAction,He as runMountCallbacks,ba as runMiddleware,el as runHooks,Sq as runDoctor,Ie as runDestroyCallbacks,Ef as runComposers,$o as rotate,lh as rewriteImagesWithSiblings,Nb as responseBindings,Ih as resolveTemplatePath,c as resolveStxTargets,Aj as resolveStxDirectories,Yq as resolveI18n,Oo as resize,Ya as resetPlaceholders,ld as resetHead,so as resetHMRHandler,bc as resetErrorConfig,mr as required,ab as replacePlaceholders,fq as renderView,gj as renderVideoComponent,Pa as renderVendorStyleTags,Bq as renderToString,Cq as renderToStream,Dq as renderToDOM,Qp as renderThumbhashToCanvas,Pq as renderTemplateString,Nq as renderTemplate,Oq as renderString,ie as renderStreamingPage,uh as renderSlot,Ag as renderSSRSuspense,Ap as renderProtectedVideo,zp as renderProtectedImg,mp as renderMediaUpload,Mq as renderMarkdownView,Ql as renderLayoutTypes,Si as renderImgComponent,Ek as renderImageComponent,td as renderHtmlAttrs,sd as renderHead,iq as renderEmail,Gh as renderComponentWithSlot,ud as renderBodyAttrs,Do as render,Vc as relaxedCspPreset,Ed as registerValidationRule,pe as registerStreamingDirectives,Ko as registerStoresClient,rl as registerStore,xf as registerSeoDirectives,V as registerMiddleware,eb as registerFilters,db as registerFilter,Sb as registerErrorMessages,Jd as registerEnhancedValidationRule,Ph as registerDirective,cd as registerCspDirectives,Em as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Uk as ref,qn as redirect,Ib as recordResponseStatus,Jb as recordResponseHeader,Na as rebaseOntoStateDir,Kb as readResponseStatus,Lb as readResponseHeaders,Gj as readMarkdownFile,Se as readFileCached,Vk as reactive,dp as quality,xp as pruneSignatureCache,Li as pruneCache,kq as provide,Lq as protectCodeBlocks,lr as prop,If as processVueTemplate,Qg as processVirtualListDirectives,Ug as processVirtualGridDirectives,fj as processVideo,Hd as processValidateDirective,de as processTranslateDirective,ug as processTransitionDirectives,xg as processTransitionAttributes,xd as processTitleDirective,Ab as processTemplateBindings,qg as processTeleportDirectives,yg as processSuspenseDirectives,sf as processStructuredData,je as processStreamDirectives,Ob as processStatusDirective,fh as processStaticDirectives,nf as processStackReplacements,mf as processStackPushDirectives,vh as processSlots,Jl as processShell,Gf as processServerBindings,tf as processSeoDirective,qe as processSectionDirectives,Lf as processScopedStyles,yb as processReactiveBindings,Bp as processProtectedMedia,_g as processPartialHydrationDirectives,kg as processOnceDirective,of as processMiddleware,rf as processMetaDirectives,yd as processMetaDirective,Hj as processMarkdownFileDirectives,Nh as processMarkdownDirectives,gf as processLoops,Ig as processKeepAliveDirectives,jg as processJsonDirective,Tg as processInfiniteListDirectives,lf as processIncludes,Ui as processImgComponents,Gk as processImageComponents,tk as processImage,wd as processHeadDirective,Ad as processForms,Cd as processFormInputDirectives,nb as processExpressions,Ca as processEventDirectives,Dd as processErrorDirective,Jf as processDynamicComponents,mh as processDirectives,Xh as processDirectiveAttributes,pg as processDeferDirectives,hd as processCustomDirectives,$c as processCspDirectives,sr as processComponentProps,Xa as processClientScript,Bd as processBasicFormDirectives,Dg as processAsyncDirectives,id as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Ud as preloadTranslationsBackground,Td as preloadTranslations,io as preloadIslandHandlers,ye as preloadIconCollection,mm as poolStrings,yj as pluginManager,ue as placeholdersWarmed,tg as performLeave,sg as performEnter,Je as pendingLifecycleCounts,Ne as peek,hf as partialsCache,hj as parseVideoDirectiveOptions,Mo as parseUrl,Tp as parseThumbhashString,Ic as parseSwitchBlock,sh as parseSlots,th as parseSlotElement,Nc as parseScriptDeclarations,uj as parseSFCComponent,Cp as parseProtectedArgs,ff as parseLoopBinding,Ti as parseImgComponent,ji as parseImageUrl,Fk as parseImageComponent,zn as parseFormBody,Kc as parseExpressionWithFilters,nn as parseCookies,Jm as parseContainerSelector,Fc as parseConditionalBlock,Lc as parseArguments,H as parseAnimationShorthand,nr as optional,nm as optimizeTemplate,Lk as optimizeImage,Mk as optimizeDirectory,pr as oneOf,jf as onceStore,bl as onUpdated,xb as onUpdate,dl as onUnmounted,yl as onServer,$k as onMounted,Fe as onMount,eh as onHydrated,qq as onErrorCaptured,Ge as onDestroy,Og as onDeactivated,xl as onClient,al as onBeforeUpdate,cl as onBeforeUnmount,_k as onBeforeMount,Ng as onActivated,Mp as observeElement,rn as notFound,Qf as normalizeCriticalHeadOrder,pq as nextTick,Hm as negotiateEncoding,P as navigateTo,fl as mountInstance,z as motionDirective,Uc as moderateCspPreset,lm as minifyHtml,vf as metaDirective,_f as metaDedupKey,No as mergeParams,ag as mergeHtmlAttrs,nd as mergeHeadConfigs,Yc as mergeCspDirectives,sb as mergeCrosswindConfig,M as matchRoute,Oh as markdownDirectiveHandler,Fj as markdownCache,b as looksLikeGlob,$q as localizePath,Vd as loadTranslationLazy,$d as loadTranslation,Bj as loadStxConfig,_ as loadMiddlewareFromDirectory,$l as loadManifest,Ip as loadElement,sm as loadChannels,gr as lintStxStrict,Kp as lazyLoadAll,Jp as lazyLoad,C as keyframeDirective,zq as jsxs,Aq as jsxDEV,yq as jsx,pn as jsonResponse,oe as islandDirective,_b as isTest,Ml as isSpaNavigation,Fl as isSpaNavRequest,qp as isSignatureValid,Ke as isSignal,rk as isSharpAvailable,an as isServerEnvironment,vl as isServer,ta as isRuntimeOwnedColonAttr,Yb as isProduction,d as isPresentationalRole,Fp as isNativeLazySupported,Kq as isMarkdownPath,Rd as isLoading,Sd as isLoaded,yh as isJavaScriptScript,Gp as isIntersectionObserverSupported,zk as isImageFile,sk as isImageBackendAvailable,be as isICUFormat,dh as isHydrated,Dh as isHydrateTrigger,Gb as isHttpStatus,$m as isEdgeEnvironment,hr as isDirectiveKind,Zb as isDevelopment,Le as isDerived,Mj as isCssOnlyChange,Gm as isCompressible,wl as isClient,Fg as isAsyncComponent,An as isActionableMethod,Xo as invert,Ue as invalidateFileCacheByDir,Te as invalidateFileCache,mb as interpolateScriptsInTemplate,kb as interpolateScriptExpressions,lb as interpolateScriptAttributes,kc as inlineError,Xq as injectThemeBootstrap,uf as injectSeoTags,Uq as injectSeo,af as injectRouterScript,Lj as injectHotReload,fa as injectHeatmap,Zc as injectCspMetaTag,wb as injectCrosswindCSS,hg as injectConfigHeadTags,Pf as injectColorModeBootScript,cg as injectCloakStyle,Wf as injectBuildId,Sa as injectBrowserCoreAutoImports,Cb as injectAnalytics,lq as inject,ql as initStoreRegistry,mk as initNetlify,ko as initLoadingIndicator,Hp as initLazyLoading,xn as initFile,Pp as initBlurUp,Vp as initAllBlurUp,Wi as imgDirective,Jk as imageDirective,In as hydrateTemplateStream,Hn as hydrateTemplate,ho as hydrateIslands,ah as hydrateIsland,Jn as hydrateFragment,bh as hydrateByStrategy,ch as hydrateAll,Ao as hydrate,Sn as htmlResponse,dg as hoistLeadingHeadTags,Rf as hoistColorModeBootScript,ga as heatmapDirective,Ei as hashString,$e as hashFilePath,Ci as hashFile,Di as hashBuffer,Hf as hasVueTemplateSyntax,ef as hasVariables,Fo as hasStore,bb as hasPlaceholders,kk as hasNetlifyConfig,X as hasMiddleware,Da as hasEventDirectives,gg as hasDocumentShell,qh as hasDirectives,h as hasDOMSupport,Ck as handleImageRequest,rq as handleError,Hq as h,yk as groupVariantsByFormat,Vo as grayscale,Ln as gitHash,fm as getUnusedDirectives,Wd as getTranslationSync,Pd as getTranslationCacheStats,Xd as getTranslationAsync,ce as getTranslation,fk as getTotalSize,rp as getTimeUntilExpiry,mg as getStoreScript,Go as getStoreNames,Eo as getStore,_j as getStorageSize,Zj as getStorageKeys,Jh as getSourceLineInfo,Ah as getSharedTranspiler,g as getScreenReaderOnlyStyle,oj as getScopeAttribute,Ae as getRouteParams,Ga as getPublicEnvDefine,Ha as getPublicEnv,oh as getPositionInfo,_a as getPlaceholderRegistry,Bi as getPlaceholderCacheStats,kd as getPageMeta,Pc as getNonce,Ak as getMimeType,Z as getMiddlewareNames,W as getMiddleware,Qd as getLoadingState,Zd as getLoadingLocales,te as getImagePlaceholder,uk as getImageMetadata,zo as getHydrationRuntime,sl as getHydratedStoreState,Pj as getHmrServer,jd as getHead,ro as getHMRHandler,ni as getFormatExtension,Gi as getFileMtime,xk as getFallbackVariant,Ub as getErrorMessage,Rb as getErrorLocale,ac as getErrorConfig,Xb as getErrorCodeName,Rh as getDirectives,Qh as getDirective,Rk as getCurrentInstance,Xc as getCspPreset,ed as getCspHeaderName,tb as getCrosswindServeAsset,Mh as getComponentCacheStats,Yi as getCachedVideoResult,vp as getCachedSignature,We as getCachedSignalsRuntime,Xe as getCachedRouterScript,zi as getCachedPlaceholder,Ni as getCachedImageResult,Hi as getCached,Ki as getCacheStats,Uf as getBuildId,pm as getBroadcastServer,mi as getBestVariant,fb as getAllFilters,ai as generateWidthSrcset,Rg as generateVirtualListCSS,aq as generateVideoPreview,Md as generateValidationScript,bq as generateUploadRuntime,gm as generateTreeShakenBundle,wg as generateTransitionRuntime,vg as generateTransitionCSS,aj as generateThumbnails,si as generateThumbhashPlaceholder,Sm as generateTemplatesDocs,Cg as generateSuspenseRuntime,Bg as generateSuspenseCSS,uo as generateStateScript,ki as generateSrcsetData,Ri as generateSrcset,vk as generateSrcSet,bj as generateSpriteSheet,jq as generateSpaShell,li as generateSourceTags,gi as generateSizesFromBreakpoints,fi as generateSizesAttribute,wk as generateSizes,yf as generateSitemapIndex,Vq as generateSitemap,Ep as generateSimpleMediaPicker,yp as generateSignatureRuntime,Qe as generateSignalsRuntimeDev,Pe as generateSignalsRuntime,Wa as generateServerDataBridge,lj as generateScopeId,vj as generateSFCWebComponent,Aa as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Af as generateRobotsTxt,Wq as generateRobots,Qi as generateResponsiveVariants,rj as generateReactiveWebComponentTS,qj as generateReactiveWebComponent,tj as generateReactiveRuntime,sj as generateReactiveMixin,$i as generatePoster,yi as generatePlaceholderStyle,xi as generatePlaceholderCSS,ri as generatePlaceholder,$g as generatePartialHydrationCSS,Oc as generateNonce,gk as generateNetlifyToml,dq as generateMinifiedMediaRuntime,cq as generateMediaRuntime,Dp as generateMediaManagerEmbed,Zl as generateManifest,mo as generateLoadingIndicatorHtml,Op as generateLazyLoadRuntime,Rl as generateLayoutTypes,ui as generateLQIP,Mg as generateKeepAliveRuntime,Lg as generateKeepAliveCSS,gh as generateIslandManifest,$p as generateImagePreview,Nk as generateImageManifest,yo as generateHydrationScript,se as generateHydrationRuntime,Bo as generateHydrationCSS,Vg as generateHydrationBootstrap,Kj as generateHotReloadScript,ea as generateHeatmapScript,po as generateHMRClientScript,cj as generateHLSManifest,vo as generateEventBindings,ei as generateDprSrcsetWithVariableQuality,di as generateDprSrcset,eg as generateDocumentShell,Xm as generateDocs,Tm as generateDirectivesDocs,Wh as generateDirectiveRuntime,Bf as generateDefaultRobotsTxt,dj as generateDASHManifest,Sc as generateCspMetaTag,Rc as generateCspHeader,vb as generateCrosswindCSS,wq as generateCompositionRuntime,Rm as generateComponentsDocs,Wg as generateComponentManifest,Pm as generateComponentDoc,wi as generateColorPlaceholder,Of as generateColorModeBootScript,il as generateClientRuntime,Fi as generateCacheKey,Ua as generateBrowserAutoImportDestructuring,Wp as generateBlurUpRuntime,Xp as generateBlurUpCSS,zb as generateBindingsRuntime,bi as generateAutoWidthSrcset,Ta as generateAutoImportDestructuring,Hg as generateAsyncComponentRuntime,Gg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,Bb as generateAnalyticsScript,go as formatTypecheckDiagnostics,$n as formatTypeErrors,un as formatStxContent,ek as formatSize,O as formatRoutes,vn as formatMarkdownContent,Vb as formatLocalizedError,ae as formatICU,cc as formatFilePath,jc as formatError,Tq as formatDoctorReport,Um as formatDocsAsMarkdown,Wm as formatDocsAsJson,Vm as formatDocsAsHtml,cp as format,km as foldConstants,bp as flipVertical,ap as flipHorizontal,Sl as fingerprint,eo as findRuntimeTypeDeclarations,Rq as findPantryPackage,Ec as findMatchingEndTag,Ac as findMatchingDelimiter,Ea as findInterpolationEnd,Gc as findIfBlocks,Jc as findExpressions,N as findErrorPage,Hc as findDirectiveBlocks,hm as findDeadCode,hm as findDeadBranches,Km as findContainerRegion,Qm as findComponentFiles,vr as findCommonDir,dk as filterRequiredFiles,Hh as fileExists,bf as extractVariables,Xl as extractTemplateExpressions,ke as extractStreamBoundaries,wo as extractState,wh as extractSlotContent,df as extractScriptFromTemplate,Wl as extractScriptBlocks,$a as extractPlaceholders,Dc as extractParenthesizedExpression,Hb as extractPageResponseStatus,ca as extractLayoutMetadata,vi as extractDominantColor,Mc as extractDirectiveParams,rh as extractDirectiveNames,Nl as extractContainerContent,Nm as extractComponentProps,Xg as extractComponentName,Om as extractComponentDescription,ub as extractClassNames,Va as extractBridgeData,Yg as extractBoundProps,Bc as extractBalancedExpression,Oa as extractAndStripCssImports,pj as extractAndScopeStyles,Ba as extractAndProcessEvents,Tj as externalizeSharedAssets,Uj as externalizeRepeatedAssets,Sj as externalizeHtml,pb as evaluateExpression,jm as evaluateConstant,Pb as evaluateAuthExpression,ib as escapeHtmlValue,hb as escapeHtml,pc as errorRecovery,rc as errorLogger,rg as ensureTeleportTargets,ig as ensureDocumentShell,Id as enhancedValidationRules,Lm as enableDevTools,im as eliminateDeadCode,De as effect,jp as dprUrls,Ym as docsCommand,Pl as discoverLayoutNames,Np as disconnectObserver,Mm as disableDevTools,sc as devHelpers,Il as detectShell,_m as detectRuntime,hk as detectProjectConfig,oi as detectFormat,cm as detectBuildMode,Ce as derived,lk as deploy,Dj as defineStxConfig,Jo as defineStore,tq as defineSlots,fr as defineSiteConfig,jr as definePropsWithValidation,ir as defineProps,xj as definePlugin,qd as definePageMeta,R as defineMiddleware,ih as defineForm,oq as defineExpose,nq as defineEmits,Th as defineDirective,Jq as defineCustomElement,Gn as defineConfig,Uh as defineClientDirective,Eg as defineAsyncComponent,eq as defaultMediaConfig,Pk as defaultImageConfig,Nd as defaultI18nConfig,da as defaultHeatmapConfig,zd as defaultFormClasses,cb as defaultFilters,gd as defaultCspConfig,zj as defaultConfig,tr as default,rb as deepMergeThemes,Kf as dedupeScopedStyles,ti as decodeThumbhash,bd as cspNonceDirective,ad as cspDirective,Up as crossfadeTransition,Po as crop,Pg as createVirtualList,ij as createVideoDirective,ln as createVercelHandler,Yn as createTypeChecker,ee as createTranslateFilter,gn as createTextEncoderStream,Iq as createStxApp,fn as createStreamingResponse,me as createStreamRenderer,Ho as createStore,U as createStorageManager,S as createServerCookieManager,Tk as createScope,zg as createSSRSuspense,ze as createRouter,$ as createRouteLocation,Wn as createRoute,Uk as createRef,Vk as createReactive,vq as createProvideContext,Nn as createProject,Fn as createProductionBuild,Za as createPlaceholder,om as createOptimizedBuild,mn as createNetlifyHandler,$j as createNetlifyClient,aa as createMiddlewareContext,Vn as createMiddleware,Lp as createLazyObserver,Jg as createKeepAliveCache,cn as createKVNamespace,Zg as createIslandRegistry,Vi as createImgDirective,Kk as createImagePlugin,Dk as createImageHandler,Ik as createImageDirective,ia as createHeatmapAggregator,ck as createFileManifest,bn as createEnvAccessor,mc as createEnhancedError,en as createEdgeHandler,dn as createEdgeCache,Kh as createDetailedErrorMessage,kn as createDenoHandler,ik as createDefaultNetlifyConfig,fd as createCspHeaders,on as createCookie,Wk as createComputed,Sk as createComponentInstance,jn as createCloudflareHandler,T as createClientCookieManager,Vh as createBuiltinDirectives,Iq as createApp,F as createAnimationTimeline,So as cover,cf as convertToCommonJS,Zo as contrast,Ro as contain,lc as consoleError,$b as configureErrorHandling,Cj as config,Wk as computed,Im as compressResponse,Df as composerPattern,Cf as composer,Kl as composeShellWithPage,Dm as componentDirective,Fh as componentClientSignalNames,Yl as compileTemplate,a as collectRepeatedFlag,bk as collectDeployFiles,_i as clearVideoCache,Od as clearTranslationCache,ng as clearStoreCache,Yj as clearStorage,wp as clearSignatureCache,Ai as clearPlaceholderCache,kf as clearOnceStore,Qc as clearNonce,Y as clearMiddleware,ve as clearImagePlaceholders,Hk as clearImageCache,Tb as clearErrorMessages,Ye as clearDevCaches,gb as clearCustomFilters,Ff as clearComposers,og as clearComposableCache,Lh as clearComponentCache,Ji as clearCache,lo as cleanupLoadingIndicator,Bl as classifyScript,Cl as classifyAllScripts,Zn as checkTemplateFile,_n as checkTemplate,Ze as checkCache,tp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,ym as channel,tn as captureScreenshots,sn as captureScreenshot,_d as cancelPendingLoads,ak as calculateSha1,ci as calculateOptimalWidths,_e as cacheTemplate,kj as buildWebComponents,ao as buildVirtualSource,gq as buildViews,Lo as buildUrl,ge as buildSuspenseResolveScript,er as buildStaticSite,la as buildRuntimeGlobalsDestructure,Tl as buildRuntimeAsset,Ul as buildRouterAsset,dr as buildLangPickerScript,ii as buildImageUrl,$f as buildHtmlAttrs,am as buildForProduction,Fm as buildComponentLibrary,up as buildAuthParams,bm as buildApp,br as buildAlternateLinks,En as build,wm as broadcastPrivate,xm as broadcastPresence,tm as broadcast,Yo as brightness,To as blur,ya as blankInertHtmlRegions,op as batchSignUrls,Ee as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,ep as auto,e as attributeValue,Vl as assetTags,za as asInvocableStatement,qr as arrayOf,_q as applyTranslations,Pi as applyTransformations,xh as applySlots,Cm as applyPropDefaults,hp as applyPreset,bg as applyHtmlAttrs,vd as applyHead,ob as applyFilters,Gl as appendVary,Wc as apiCspPreset,y as animationGroupDirective,ej as analyzeVideo,em as analyzeUsage,zl as analyzeTemplate,Al as analyzeProject,em as analyzeDirectiveUsage,Db as analyticsDirective,Qn as addStore,Pn as addPage,_c as addNonceToInlineContent,Rn as addLayout,On as addComponent,Cn as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Ve as __setSignalsGeneratorsForTest,Vf as __setBuildIdForTest,Xi as VideoProcessorCache,jh as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,zc as Tokenizer,Xn as TemplateTypeChecker,wn as TEMPLATE_PRESETS,ic as StxValidationError,ec as StxSyntaxError,gc as StxSecurityError,fc as StxRuntimeError,hc as StxFileError,dc as StxError,Eq as Show,he as SUSPENSE_RESOLVER_RUNTIME,ja as STX_RUNTIME_GLOBALS,Qa as STX_AUTO_IMPORTS,Ja as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,Dl as SPA_NAV_HEADER,sa as RUNTIME_OWNED_COLON_ATTRS,ua as RUNTIME_HANDLED_X_ATTRS,Eb as RESPONSE_STATUS_KEY,Fb as RESPONSE_HEADERS_KEY,oa as REACTIVE_RUNTIME_GLOBALS,Dn as ProductionBuild,Gq as Portal,Mn as PROJECT_TEMPLATES,gp as PRESETS,na as NON_CLIENT_PRIMITIVES,Co as MemorySessionStore,$h as MIME_TYPES,Yh as MEDIA_DEFAULT_WIDTHS,_h as MEDIA_DEFAULT_FORMATS,Ol as LAYOUT_TYPES_FILE,Mi as ImageProcessorCache,Bk as ImageProcessingError,xo as HydrationRuntime,Jj as HotReloadServer,ha as HeatmapAggregator,Zf as HTML_CLASS_MARKER,Yf as HTML_ATTRS_MARKER,xq as Fragment,Fq as For,El as FRAGMENT_CACHE_CONTROL,qc as ErrorLogger,Wb as ErrorCodes,Rj as EXTERNALIZED_ASSET_DIR,nk as DeployError,ok as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,Ia as DEFAULT_STATE_DIR,qk as DEFAULT_QUALITY,pi as DEFAULT_PLACEHOLDER_OPTIONS,pk as DEFAULT_FORMATS,Zh as DEFAULT_DPR_VALUES,oo as ComponentHMRHandler,ka as COMPONENT_SCOPE_LOCAL_GLOBALS,wa as COMPONENT_PASSTHROUGH_X_ATTRS,ma as COMPILE_TIME_ONLY_GLOBALS,hi as COMMON_SIZES,Mf as COLOR_MODE_BOOT_MARKER,Nf as COLOR_MODE_BOOT_GLOBAL,Xf as CLOAK_STYLE,Am as BroadcastServer,zm as Broadcast,Sf as BUILD_ID_META,Tf as BUILD_ID_HEADER,Ra as BROWSER_CORE_IMPORTS,qi as BLUR_UP_CSS,va as ALPINE_BRIDGE_X_ATTRS,Qq as $path};
@@ -1,3 +1,3 @@
1
1
  // @bun
2
- import{as as E}from"./chunk-spnkgsft.js";import{Nu as D}from"./chunk-j4ze77e0.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,...q.ssg})}else{let{buildForProduction:z}=await import("./chunk-gcn830km.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
2
+ import{bs as E}from"./chunk-v2vv4etv.js";import{Ou as D}from"./chunk-qs0fp63n.js";import I from"path";async function M(q={}){let G=performance.now(),J=q.root||process.cwd(),j=await E(),y=j.ssr?"ssr":"ssg";console.log(`[stx build] Mode: ${y.toUpperCase()}${j.ssr?" (ssr: true in stx.config.ts)":" (default \u2014 ssr is false)"}`);let A,B;if(y==="ssg"){let{generateStaticSite:z}=await import("./ssg.js");A=await z({pagesDir:I.join(j.root||".",j.pagesDir||j.build?.pagesDir||"pages"),publicDir:j.publicDir||j.build?.publicDir||"public",outputDir:j.build?.outputDir||"dist",generate404:j.build?.generate404??!0,minify:j.build?.minify??!0,cleanOutput:j.build?.cleanOutput??!0,...q.ssg})}else{let{buildForProduction:z}=await import("./chunk-h4ccaa7d.js");B=await z({outputDir:".output",debug:q.debug,...q.ssr})}let H=Math.round(performance.now()-G);return{mode:y,ssg:A,ssr:B,duration:H}}
3
3
  export{M as jg};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Dq as H,Vq as x,_r as g,pm as O,rp as R}from"./chunk-spnkgsft.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{$r as g,Eq as H,Wq as x,qm as O,sp as R}from"./chunk-v2vv4etv.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>
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{Ch as a}from"./chunk-rbke5wqk.js";import"./chunk-qs0fp63n.js";export{a as rewriteImagesWithSiblings};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{vg as a}from"./chunk-6mtc3b9a.js";import"./chunk-nw7y6zw8.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{a as startProductionServer};
@@ -0,0 +1,2 @@
1
+ // @bun
2
+ import{hk as a,ik as b,jk as c,kk as d}from"./chunk-0ks60fk1.js";import"./chunk-37nm0f2v.js";import"./chunk-v2vv4etv.js";import"./chunk-092sm06a.js";import"./chunk-19m7hed6.js";import"./chunk-nhn7qftp.js";import"./chunk-mv2v3g62.js";import"./chunk-b220zqbz.js";import"./chunk-2qkasmq1.js";import"./chunk-1px4xey5.js";import"./chunk-a8fx6wcb.js";import"./chunk-x41v697c.js";import"./chunk-ax56kn66.js";import"./chunk-z2gmz9ew.js";import"./chunk-k26kt6fp.js";import"./chunk-qs0fp63n.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$s as c,Zs as a,_s as b,at as d,bt as e,ct as f,dt as g}from"./chunk-msxcd1kp.js";import"./chunk-j4ze77e0.js";export{g as warmImagePlaceholders,f as svgDataUrl,d as setImagePlaceholder,b as placeholdersWarmed,e as meshSvg,a as getImagePlaceholder,c as clearImagePlaceholders};
2
+ import{$s as b,_s as a,at as c,bt as d,ct as e,dt as f,et as g}from"./chunk-2qkasmq1.js";import"./chunk-qs0fp63n.js";export{g as warmImagePlaceholders,f as svgDataUrl,d as setImagePlaceholder,b as placeholdersWarmed,e as meshSvg,a as getImagePlaceholder,c as clearImagePlaceholders};